Compare commits
No commits in common. "factory" and "devel" have entirely different histories.
4
_service
4
_service
@ -2,8 +2,8 @@
|
||||
<service name="obs_scm" mode="manual">
|
||||
<param name="scm">git</param>
|
||||
<param name="url">https://github.com/bitwarden/clients.git</param>
|
||||
<param name="revision">desktop-v2024.11.2</param>
|
||||
<param name="version">2024.11.2</param>
|
||||
<param name="revision">desktop-v2024.8.2</param>
|
||||
<param name="version">2024.8.2</param>
|
||||
<param name="filename">bitwarden</param>
|
||||
<param name="exclude">bitwarden_license/*</param>
|
||||
<!-- The code in bitwarden_license MUST NOT be included in published tarballs as it is non-redistributable! -->
|
||||
|
25
argon2-binary-path.patch
Normal file
25
argon2-binary-path.patch
Normal file
@ -0,0 +1,25 @@
|
||||
Remove dependency on node-pre-gyp which brings a lot of garbage
|
||||
|
||||
--- bitwarden/node_modules/argon2/argon2.js.old 2023-02-18 17:54:54.041287237 +0100
|
||||
+++ bitwarden/node_modules/argon2/argon2.js 2023-02-18 19:49:49.145206908 +0100
|
||||
@@ -3,9 +3,8 @@
|
||||
const { randomBytes, timingSafeEqual } = require("crypto");
|
||||
const path = require("path");
|
||||
const { promisify } = require("util");
|
||||
-const binary = require("@mapbox/node-pre-gyp");
|
||||
|
||||
-const bindingPath = binary.find(path.resolve(__dirname, "./package.json"));
|
||||
+const bindingPath = "./lib/binding/napi-v3/argon2.node"
|
||||
const { hash: _hash } = require(bindingPath);
|
||||
|
||||
const { deserialize, serialize } = require("@phc/format");
|
||||
--- bitwarden/node_modules/argon2/package.json.old 2023-02-18 17:54:54.141337239 +0100
|
||||
+++ bitwarden/node_modules/argon2/package.json 2023-02-18 19:51:32.473209049 +0100
|
||||
@@ -46,7 +46,6 @@
|
||||
},
|
||||
"homepage": "https://github.com/ranisalt/node-argon2#readme",
|
||||
"dependencies": {
|
||||
- "@mapbox/node-pre-gyp": "^1.0.11",
|
||||
"@phc/format": "^1.0.0",
|
||||
"node-addon-api": "^7.0.0"
|
||||
},
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:db27dca02155fc984e5664cc12b1c65f0415b14e7dc9fdd755a6c8b2adb76e02
|
||||
size 45144077
|
3
bitwarden-2024.6.2.obscpio
Normal file
3
bitwarden-2024.6.2.obscpio
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:935ad4966f10fcfbdac1784f248f800c7c4bb17834a67dcdd5b9b0e3061db518
|
||||
size 37969933
|
3
bitwarden-2024.7.0.obscpio
Normal file
3
bitwarden-2024.7.0.obscpio
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:1436703e869d9c2735117e4f65948f707281f0eee0c8e287516da11516e9baa8
|
||||
size 39058445
|
3
bitwarden-2024.7.1.obscpio
Normal file
3
bitwarden-2024.7.1.obscpio
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:4e67c98c75ab6b7d7a512f7ad8917fac956d7ce37ee4ed688c927dba433f66bd
|
||||
size 40005133
|
3
bitwarden-2024.8.1.obscpio
Normal file
3
bitwarden-2024.8.1.obscpio
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:a425511c3fd8e9c41079df4bbe7afd8f9678ada7902f322c3f2aa20f3fbcdae7
|
||||
size 41812493
|
3
bitwarden-2024.8.2.obscpio
Normal file
3
bitwarden-2024.8.2.obscpio
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:69fdfe866a500de39e5044fe31b392ede84ddd8786d8f70f3ae358a2230126a5
|
||||
size 41812493
|
@ -1,31 +1,3 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Nov 21 18:06:28 UTC 2024 - Bruno Pitrus <brunopitrus@hotmail.com>
|
||||
|
||||
- New upstream release 2024.11.2
|
||||
* Revert the passphrase minimum back to 3 words
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Nov 15 05:34:33 UTC 2024 - Bruno Pitrus <brunopitrus@hotmail.com>
|
||||
|
||||
- New upstream release 2024.11.0
|
||||
* Security update for generating passphrases
|
||||
* Enable email verification for account creation
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Oct 25 20:27:27 UTC 2024 - Bruno Pitrus <brunopitrus@hotmail.com>
|
||||
|
||||
- New upstream release 2024.10.0
|
||||
* no changelog provided
|
||||
- Add native-messaging.main-fix-path.patch
|
||||
- Remove a temporarily-nonfree new dependency that is currently dead code (gh#bitwarden/clients#11611)
|
||||
* add remove-sdk-internal.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Sep 19 17:13:10 UTC 2024 - Bruno Pitrus <brunopitrus@hotmail.com>
|
||||
|
||||
- New upstream release 2024.9.0
|
||||
* no changelog provided
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Sep 12 14:39:24 UTC 2024 - Bruno Pitrus <brunopitrus@hotmail.com>
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
name: bitwarden
|
||||
version: 2024.11.2
|
||||
mtime: 1732206977
|
||||
commit: 9172f2d6c235d3c38af499a2bb15a5694d27557d
|
||||
version: 2024.8.2
|
||||
mtime: 1725557694
|
||||
commit: 0a3cf4772e79f8acbc297adcae6b39802ebb9eae
|
||||
|
@ -22,7 +22,7 @@
|
||||
|
||||
|
||||
Name: bitwarden
|
||||
Version: 2024.11.2
|
||||
Version: 2024.8.2
|
||||
Release: 0
|
||||
Summary: A secure and free password manager for all of your devices
|
||||
Group: Productivity/Security
|
||||
@ -61,10 +61,7 @@ Patch5: remove-argon2-browser.patch
|
||||
Patch7: bug-reporting-url.patch
|
||||
Patch8: no-sourcemaps.patch
|
||||
Patch9: main-getPath-exe.patch
|
||||
Patch10: native-messaging.main-fix-path.patch
|
||||
|
||||
#patches to remove stuff we do not want
|
||||
Patch500: remove-sdk-internal.patch
|
||||
|
||||
#patches to use system libs
|
||||
Patch1000: system-libargon2.patch
|
||||
@ -130,9 +127,6 @@ Bitwarden is a free and open-source password management service that stores sens
|
||||
%prep
|
||||
%autosetup -p1 -a1
|
||||
|
||||
#fix exe path
|
||||
sed -i 's[XXXLIBDIRXXX[%{_libdir}[g' apps/desktop/src/main/native-messaging.main.ts
|
||||
|
||||
|
||||
# Remove unused postinstall script (electron-rebuild)
|
||||
sed -i '/"postinstall":/d' apps/desktop/package.json
|
||||
@ -193,7 +187,6 @@ auditable='auditable -vv'
|
||||
cd apps/desktop
|
||||
pushd desktop_native
|
||||
cargo -vv $auditable rustc --offline --release --package desktop_napi --lib --crate-type cdylib
|
||||
RUSTFLAGS="$RUSTFLAGS -Crelocation-model=pie" cargo -vv $auditable rustc --offline --release --package desktop_proxy --bin desktop_proxy
|
||||
popd
|
||||
|
||||
npm run build
|
||||
@ -204,7 +197,6 @@ cd build
|
||||
mkdir -pv node_modules/@bitwarden/desktop-napi
|
||||
cp -plv ../desktop_native/napi/{package.json,index.js} -t node_modules/@bitwarden/desktop-napi
|
||||
cp -plvT ../desktop_native/target/release/*.so node_modules/@bitwarden/desktop-napi/desktop_napi.node
|
||||
cp -plv -t . ../desktop_native/target/release/desktop_proxy
|
||||
rm -fv ../../../node_modules/argon2/build-tmp-napi-v3/node_gyp_bins/python3
|
||||
cp -plvr ../../../node_modules/argon2 -t node_modules/
|
||||
cp -plvr ../../../node_modules/node-gyp-build -t node_modules/
|
||||
@ -214,7 +206,7 @@ cp -plvr '../../../node_modules/@phc' -t node_modules/
|
||||
%install
|
||||
cd %{_builddir}/bitwarden-%{version}/apps/desktop
|
||||
mkdir -pv %{buildroot}%{_libdir}
|
||||
cp -ar build %{buildroot}%{_libdir}/%{name}
|
||||
cp -plr build %{buildroot}%{_libdir}/%{name}
|
||||
for i in 16 32 64 128 256 512 1024
|
||||
do
|
||||
install -pvDm644 resources/icons/${i}x${i}.png "%{buildroot}%{_datadir}/icons/hicolor/${i}x${i}/apps/%{name}.png"
|
||||
@ -266,7 +258,6 @@ find -name '.gitignore' -type f -print -delete
|
||||
#Fix file mode
|
||||
find . -type f -exec chmod 644 {} \;
|
||||
find . -name '*.node' -exec chmod 755 {} \;
|
||||
chmod 755 desktop_proxy
|
||||
|
||||
# Remove empty directories
|
||||
find . -type d -empty -print -delete
|
||||
|
@ -1,11 +1,11 @@
|
||||
--- clients/apps/desktop/src/main.ts.orig 2024-10-17 19:47:51.775405137 +0200
|
||||
+++ clients/apps/desktop/src/main.ts 2024-10-17 21:04:06.768260922 +0200
|
||||
@@ -231,7 +231,7 @@ export class Main {
|
||||
--- bitwarden-2024.8.2/apps/desktop/src/main.ts.orig 2024-09-05 19:34:54.000000000 +0200
|
||||
+++ bitwarden-2024.8.2/apps/desktop/src/main.ts 2024-09-12 16:26:40.135229235 +0200
|
||||
@@ -218,7 +218,7 @@ export class Main {
|
||||
this.logService,
|
||||
this.windowMain,
|
||||
app.getPath("userData"),
|
||||
- app.getPath("exe"),
|
||||
+ '/usr/bin/bitwarden-desktop',
|
||||
app.getAppPath(),
|
||||
);
|
||||
|
||||
this.desktopAutofillSettingsService = new DesktopAutofillSettingsService(stateProvider);
|
||||
|
@ -1,30 +0,0 @@
|
||||
--- clients-desktop-v2024.11.0/apps/desktop/src/main/native-messaging.main.ts.orig 2024-11-14 21:24:39.217775953 +0100
|
||||
+++ clients-desktop-v2024.11.0/apps/desktop/src/main/native-messaging.main.ts 2024-11-14 21:37:48.932452741 +0100
|
||||
@@ -399,26 +399,7 @@ export class NativeMessagingMain {
|
||||
}
|
||||
|
||||
private binaryPath() {
|
||||
- const ext = process.platform === "win32" ? ".exe" : "";
|
||||
-
|
||||
- if (isDev()) {
|
||||
- const devPath = path.join(
|
||||
- this.appPath,
|
||||
- "..",
|
||||
- "desktop_native",
|
||||
- "target",
|
||||
- "debug",
|
||||
- `desktop_proxy${ext}`,
|
||||
- );
|
||||
-
|
||||
- // isDev() returns true when using a production build with ELECTRON_IS_DEV=1,
|
||||
- // so we need to fall back to the prod binary if the dev binary doesn't exist.
|
||||
- if (existsSync(devPath)) {
|
||||
- return devPath;
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- return path.join(path.dirname(this.exePath), `desktop_proxy${ext}`);
|
||||
+ return 'XXXLIBDIRXXX/bitwarden/desktop_proxy'
|
||||
}
|
||||
|
||||
private homedir() {
|
3
node-vendor.tar.zst
Normal file
3
node-vendor.tar.zst
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:8e62ee1659f6325677411aa7c8b99d84c328a705fda82370489a4920f646ffbb
|
||||
size 35111893
|
49
prepare-node-vendor.sh
Normal file
49
prepare-node-vendor.sh
Normal file
@ -0,0 +1,49 @@
|
||||
#!/bin/sh -eux
|
||||
|
||||
# dnf install curl gzip jq npm patch tar wget
|
||||
|
||||
PKGDIR="$(pwd)"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
cd clients
|
||||
|
||||
|
||||
|
||||
#These patches touch NPM's files
|
||||
patch --verbose -p1 -b < $PKGDIR/remove-unnecessary-deps.patch
|
||||
|
||||
#remove unnecessary / non-free source
|
||||
rm -rf apps/browser apps/cli apps/web bitwarden_license
|
||||
|
||||
npm ci --verbose --ignore-scripts
|
||||
|
||||
echo ">>>>>> Remove argon2 vendor"
|
||||
rm -rf node_modules/argon2/argon2
|
||||
|
||||
echo ">>>>>> Remove non-free binaries"
|
||||
find . -type f -name "*.wasm" -print -delete
|
||||
find . -type f -name "*.jar" -print -delete
|
||||
find . -type f -name "*.exe" -print -delete
|
||||
find . -type f -name "*.node" -print -delete
|
||||
find . -type f -name "*.dll" -print -delete
|
||||
find . -type f -name "*.dylib" -print -delete
|
||||
find . -type f -name "*.so" -print -delete
|
||||
find . -type f -name "*.o" -print -delete
|
||||
find . -type f -name "*.a" -print -delete
|
||||
|
||||
#We use sponge to avoid a race condition between find and rm
|
||||
find -type f | sponge | xargs -P$(nproc) -- sh -c 'file -S "$@" | grep -v '\'' .*script'\'' | grep '\'' .*executable'\'' | tee /dev/stderr | sed '\''s/: .*//'\'' | xargs rm -fv'
|
||||
|
||||
|
||||
# Remove empty directories
|
||||
echo ">>>>>> Remove empty directories"
|
||||
find . -type d -empty -print -delete
|
||||
|
||||
|
||||
echo ">>>>>> Create tarball"
|
||||
ZSTD_CLEVEL=19 ZSTD_NBTHREADS=$(nproc) tar --zstd --sort=name -vvScf "${PKGDIR}/node-vendor.tar.zst" node_modules
|
||||
|
@ -2,32 +2,32 @@ Remove dependency on argon-browser2 which should be dead code after https://gith
|
||||
We used to path this to use node_modules/argon2 but cannot anymore due to sandbox now being enabled; fortunately, upstream at the same time moved the crypto to main process.
|
||||
Therefore the WASM implementation in web-crypto-function should be dead code now and can be removed because we do not want to compile WASM.
|
||||
|
||||
--- clients/apps/desktop/webpack.renderer.js.orig 2024-10-17 19:47:51.805420136 +0200
|
||||
+++ clients/apps/desktop/webpack.renderer.js 2024-10-17 21:00:08.105664818 +0200
|
||||
@@ -41,11 +41,6 @@ const common = {
|
||||
--- bitwarden/apps/desktop/webpack.renderer.js.old 2023-02-15 19:02:44.000000000 +0100
|
||||
+++ bitwarden/apps/desktop/webpack.renderer.js 2023-02-18 18:41:53.074156675 +0100
|
||||
@@ -40,11 +40,6 @@
|
||||
},
|
||||
type: "asset/resource",
|
||||
},
|
||||
- {
|
||||
- test: /argon2(-simd)?\.wasm$/,
|
||||
- test: /\.wasm$/,
|
||||
- loader: "base64-loader",
|
||||
- type: "javascript/auto",
|
||||
- },
|
||||
],
|
||||
},
|
||||
plugins: [],
|
||||
@@ -142,11 +137,6 @@ const renderer = {
|
||||
@@ -127,11 +122,6 @@
|
||||
test: /[\/\\]@angular[\/\\].+\.js$/,
|
||||
parser: { system: true },
|
||||
},
|
||||
- {
|
||||
- test: /argon2(-simd)?\.wasm$/,
|
||||
- test: /\.wasm$/,
|
||||
- loader: "base64-loader",
|
||||
- type: "javascript/auto",
|
||||
- },
|
||||
],
|
||||
noParse: /argon2(-simd)?\.wasm$/,
|
||||
},
|
||||
plugins: [
|
||||
--- a/libs/common/src/platform/services/web-crypto-function.service.ts
|
||||
+++ b/libs/common/src/platform/services/web-crypto-function.service.ts
|
||||
@@ -1,4 +1,3 @@
|
||||
|
@ -9,14 +9,3 @@
|
||||
throw new Error(`Expected ${JSON.stringify(versionFromPackageJSON)} but got ${JSON.stringify(stdout)}`);
|
||||
}
|
||||
}
|
||||
--- bitwarden/node_modules/vite/node_modules/esbuild/install.js.old 2023-02-18 17:54:51.928231193 +0100
|
||||
+++ bitwarden/node_modules/vite/node_modules/esbuild/install.js 2023-02-18 18:18:42.659268572 +0100
|
||||
@@ -85,7 +85,7 @@
|
||||
}
|
||||
throw err;
|
||||
}
|
||||
- if (stdout !== versionFromPackageJSON) {
|
||||
+ if (0) {
|
||||
throw new Error(`Expected ${JSON.stringify(versionFromPackageJSON)} but got ${JSON.stringify(stdout)}`);
|
||||
}
|
||||
}
|
||||
|
@ -1,179 +0,0 @@
|
||||
https://github.com/bitwarden/sdk-internal might be now free software
|
||||
but we currently don't want to build it as it's a huge WASM blob that is not currently used for anything.
|
||||
This patch will be removed once some _actual_ JS functionality gets migrated to wasm
|
||||
|
||||
--- bitwarden-2024.10.0/apps/desktop/config/base.json.orig 2024-10-17 21:45:41.000000000 +0200
|
||||
+++ bitwarden-2024.10.0/apps/desktop/config/base.json 2024-10-25 21:36:08.368540114 +0200
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"flags": {
|
||||
- "sdk": true
|
||||
+ "sdk": false
|
||||
},
|
||||
"devFlags": {}
|
||||
}
|
||||
--- clients-desktop-v2024.11.0/apps/desktop/src/app/services/services.module.ts.orig 2024-11-14 21:24:33.955145852 +0100
|
||||
+++ clients-desktop-v2024.11.0/apps/desktop/src/app/services/services.module.ts 2024-11-14 21:39:37.686804726 +0100
|
||||
@@ -72,7 +72,6 @@ import { Message, MessageListener, Messa
|
||||
import { SubjectMessageSender } from "@bitwarden/common/platform/messaging/internal";
|
||||
import { TaskSchedulerService } from "@bitwarden/common/platform/scheduling";
|
||||
import { MemoryStorageService } from "@bitwarden/common/platform/services/memory-storage.service";
|
||||
-import { DefaultSdkClientFactory } from "@bitwarden/common/platform/services/sdk/default-sdk-client-factory";
|
||||
import { NoopSdkClientFactory } from "@bitwarden/common/platform/services/sdk/noop-sdk-client-factory";
|
||||
import { SystemService } from "@bitwarden/common/platform/services/system.service";
|
||||
import { GlobalStateProvider, StateProvider } from "@bitwarden/common/platform/state";
|
||||
@@ -344,7 +343,7 @@ const safeProviders: SafeProvider[] = [
|
||||
}),
|
||||
safeProvider({
|
||||
provide: SdkClientFactory,
|
||||
- useClass: flagEnabled("sdk") ? DefaultSdkClientFactory : NoopSdkClientFactory,
|
||||
+ useClass: NoopSdkClientFactory,
|
||||
deps: [],
|
||||
}),
|
||||
safeProvider({
|
||||
--- clients-desktop-v2024.11.0/libs/common/src/platform/abstractions/sdk/sdk.service.ts.orig 2024-11-14 21:24:34.402035860 +0100
|
||||
+++ clients-desktop-v2024.11.0/libs/common/src/platform/abstractions/sdk/sdk.service.ts 2024-11-14 21:40:54.838696107 +0100
|
||||
@@ -1,6 +1,5 @@
|
||||
import { Observable } from "rxjs";
|
||||
|
||||
-import { BitwardenClient } from "@bitwarden/sdk-internal";
|
||||
|
||||
import { UserId } from "../../../types/guid";
|
||||
|
||||
@@ -14,7 +13,7 @@ export abstract class SdkService {
|
||||
* Retrieve a client initialized without a user.
|
||||
* This client can only be used for operations that don't require a user context.
|
||||
*/
|
||||
- client$: Observable<BitwardenClient | undefined>;
|
||||
+ client$: Observable<any>;
|
||||
|
||||
/**
|
||||
* Retrieve a client initialized for a specific user.
|
||||
@@ -27,7 +26,7 @@ export abstract class SdkService {
|
||||
*
|
||||
* @param userId
|
||||
*/
|
||||
- abstract userClient$(userId: UserId): Observable<BitwardenClient>;
|
||||
+ abstract userClient$(userId: UserId): Observable<any>;
|
||||
|
||||
abstract failedToInitialize(category: string, error?: Error): Promise<void>;
|
||||
}
|
||||
--- bitwarden-2024.10.0/libs/common/src/platform/abstractions/sdk/sdk-client-factory.ts.orig 2024-10-17 21:45:41.000000000 +0200
|
||||
+++ bitwarden-2024.10.0/libs/common/src/platform/abstractions/sdk/sdk-client-factory.ts 2024-10-25 21:32:14.591461794 +0200
|
||||
@@ -1,10 +1,9 @@
|
||||
-import type { BitwardenClient } from "@bitwarden/sdk-internal";
|
||||
|
||||
/**
|
||||
* Factory for creating SDK clients.
|
||||
*/
|
||||
export abstract class SdkClientFactory {
|
||||
abstract createSdkClient(
|
||||
- ...args: ConstructorParameters<typeof BitwardenClient>
|
||||
- ): Promise<BitwardenClient>;
|
||||
+ ...args: ConstructorParameters<any>
|
||||
+ ): Promise<any>;
|
||||
}
|
||||
--- bitwarden-2024.10.0/libs/common/src/platform/services/sdk/noop-sdk-client-factory.ts.orig 2024-10-17 21:45:41.000000000 +0200
|
||||
+++ bitwarden-2024.10.0/libs/common/src/platform/services/sdk/noop-sdk-client-factory.ts 2024-10-25 21:41:45.940577943 +0200
|
||||
@@ -1,4 +1,3 @@
|
||||
-import type { BitwardenClient } from "@bitwarden/sdk-internal";
|
||||
|
||||
import { SdkClientFactory } from "../../abstractions/sdk/sdk-client-factory";
|
||||
|
||||
@@ -9,8 +8,8 @@ import { SdkClientFactory } from "../../
|
||||
*/
|
||||
export class NoopSdkClientFactory implements SdkClientFactory {
|
||||
createSdkClient(
|
||||
- ...args: ConstructorParameters<typeof BitwardenClient>
|
||||
- ): Promise<BitwardenClient> {
|
||||
+ ...args: ConstructorParameters<any>
|
||||
+ ): Promise<any> {
|
||||
return Promise.reject(new Error("SDK not available"));
|
||||
}
|
||||
}
|
||||
--- clients-desktop-v2024.11.0/libs/common/src/platform/services/sdk/default-sdk.service.ts.orig 2024-11-14 21:24:34.418710861 +0100
|
||||
+++ clients-desktop-v2024.11.0/libs/common/src/platform/services/sdk/default-sdk.service.ts 2024-11-14 21:43:13.174498626 +0100
|
||||
@@ -11,12 +11,6 @@ import {
|
||||
} from "rxjs";
|
||||
|
||||
import { KeyService } from "@bitwarden/key-management";
|
||||
-import {
|
||||
- BitwardenClient,
|
||||
- ClientSettings,
|
||||
- LogLevel,
|
||||
- DeviceType as SdkDeviceType,
|
||||
-} from "@bitwarden/sdk-internal";
|
||||
|
||||
import { ApiService } from "../../../abstractions/api.service";
|
||||
import { EncryptedOrganizationKeyData } from "../../../admin-console/models/data/encrypted-organization-key.data";
|
||||
@@ -35,12 +29,12 @@ import { compareValues } from "../../mis
|
||||
import { EncryptedString } from "../../models/domain/enc-string";
|
||||
|
||||
export class DefaultSdkService implements SdkService {
|
||||
- private sdkClientCache = new Map<UserId, Observable<BitwardenClient>>();
|
||||
+ private sdkClientCache = new Map<UserId, Observable<any>>();
|
||||
|
||||
client$ = this.environmentService.environment$.pipe(
|
||||
concatMap(async (env) => {
|
||||
const settings = this.toSettings(env);
|
||||
- return await this.sdkClientFactory.createSdkClient(settings, LogLevel.Info);
|
||||
+ return await this.sdkClientFactory.createSdkClient(settings, 'unused');
|
||||
}),
|
||||
shareReplay({ refCount: true, bufferSize: 1 }),
|
||||
);
|
||||
@@ -62,7 +56,7 @@ export class DefaultSdkService implement
|
||||
private userAgent: string = null,
|
||||
) {}
|
||||
|
||||
- userClient$(userId: UserId): Observable<BitwardenClient | undefined> {
|
||||
+ userClient$(userId: UserId): Observable<any> {
|
||||
// TODO: Figure out what happens when the user logs out
|
||||
if (this.sdkClientCache.has(userId)) {
|
||||
return this.sdkClientCache.get(userId);
|
||||
@@ -92,8 +86,8 @@ export class DefaultSdkService implement
|
||||
// switchMap is required to allow the clean-up logic to be executed when `combineLatest` emits a new value.
|
||||
switchMap(([env, account, kdfParams, privateKey, userKey, orgKeys]) => {
|
||||
// Create our own observable to be able to implement clean-up logic
|
||||
- return new Observable<BitwardenClient>((subscriber) => {
|
||||
- let client: BitwardenClient;
|
||||
+ return new Observable<any>((subscriber) => {
|
||||
+ let client: any;
|
||||
|
||||
const createAndInitializeClient = async () => {
|
||||
if (privateKey == null || userKey == null) {
|
||||
@@ -101,7 +95,7 @@ export class DefaultSdkService implement
|
||||
}
|
||||
|
||||
const settings = this.toSettings(env);
|
||||
- client = await this.sdkClientFactory.createSdkClient(settings, LogLevel.Info);
|
||||
+ client = await this.sdkClientFactory.createSdkClient(settings, 'unused');
|
||||
|
||||
await this.initializeClient(client, account, kdfParams, privateKey, userKey, orgKeys);
|
||||
|
||||
@@ -156,7 +150,7 @@ export class DefaultSdkService implement
|
||||
}
|
||||
|
||||
private async initializeClient(
|
||||
- client: BitwardenClient,
|
||||
+ client: any,
|
||||
account: AccountInfo,
|
||||
kdfParams: KdfConfig,
|
||||
privateKey: EncryptedString,
|
||||
@@ -192,7 +186,7 @@ export class DefaultSdkService implement
|
||||
});
|
||||
}
|
||||
|
||||
- private toSettings(env: Environment): ClientSettings {
|
||||
+ private toSettings(env: Environment): any {
|
||||
return {
|
||||
apiUrl: env.getApiUrl(),
|
||||
identityUrl: env.getIdentityUrl(),
|
||||
@@ -201,7 +195,7 @@ export class DefaultSdkService implement
|
||||
};
|
||||
}
|
||||
|
||||
- private toDevice(device: DeviceType): SdkDeviceType {
|
||||
+ private toDevice(device: DeviceType): any {
|
||||
switch (device) {
|
||||
case DeviceType.Android:
|
||||
return "Android";
|
@ -1,7 +1,7 @@
|
||||
@types/semver and path-browserify is normally included transitively by storybook which we delete, adding it here explicitely because it is needed for build
|
||||
|
||||
--- clients-desktop-v2024.11.0/package.json.orig 2024-11-14 21:24:39.344505956 +0100
|
||||
+++ clients-desktop-v2024.11.0/package.json 2024-11-14 21:30:01.698941768 +0100
|
||||
--- clients/package.json.orig 2024-07-15 19:10:38.711610685 +0200
|
||||
+++ clients/package.json 2024-07-15 19:25:13.322024338 +0200
|
||||
@@ -13,7 +13,6 @@
|
||||
},
|
||||
"homepage": "https://bitwarden.com",
|
||||
@ -10,83 +10,83 @@
|
||||
"lint": "eslint . --cache --cache-strategy content && prettier --check .",
|
||||
"lint:fix": "eslint . --cache --cache-strategy content --fix",
|
||||
"lint:clear": "rimraf .eslintcache",
|
||||
@@ -27,7 +26,7 @@
|
||||
@@ -26,7 +25,7 @@
|
||||
"storybook": "ng run components:storybook",
|
||||
"build-storybook": "ng run components:build-storybook",
|
||||
"build-storybook:ci": "ng run components:build-storybook --webpack-stats-json",
|
||||
- "postinstall": "patch-package && rimraf ./node_modules/@types/glob && rimraf ./node_modules/@types/minimatch"
|
||||
+ "postinstall": "rimraf ./node_modules/@types/glob && rimraf ./node_modules/@types/minimatch"
|
||||
- "postinstall": "patch-package"
|
||||
+ "postinstall": "true"
|
||||
},
|
||||
"workspaces": [
|
||||
"apps/*",
|
||||
@@ -36,117 +35,45 @@
|
||||
@@ -35,120 +34,44 @@
|
||||
],
|
||||
"devDependencies": {
|
||||
"@angular-devkit/build-angular": "17.3.9",
|
||||
- "@angular-eslint/eslint-plugin": "17.5.3",
|
||||
- "@angular-eslint/eslint-plugin-template": "17.5.3",
|
||||
- "@angular-eslint/schematics": "17.5.3",
|
||||
- "@angular-eslint/template-parser": "17.5.3",
|
||||
- "@angular/cli": "17.3.9",
|
||||
"@angular/compiler-cli": "17.3.12",
|
||||
- "@angular/elements": "17.3.12",
|
||||
"@babel/core": "7.24.9",
|
||||
"@babel/preset-env": "7.24.8",
|
||||
"@angular-devkit/build-angular": "16.2.14",
|
||||
- "@angular-eslint/eslint-plugin": "16.3.1",
|
||||
- "@angular-eslint/eslint-plugin-template": "16.3.1",
|
||||
- "@angular-eslint/template-parser": "16.3.1",
|
||||
- "@angular/cli": "16.2.14",
|
||||
"@angular/compiler-cli": "16.2.12",
|
||||
- "@angular/elements": "16.2.12",
|
||||
- "@babel/core": "^7.24.6",
|
||||
"@babel/preset-env": "^7.24.6",
|
||||
- "@compodoc/compodoc": "1.1.25",
|
||||
- "@electron/notarize": "2.5.0",
|
||||
- "@electron/rebuild": "3.7.0",
|
||||
"@ngtools/webpack": "17.3.9",
|
||||
- "@storybook/addon-a11y": "8.2.9",
|
||||
- "@storybook/addon-actions": "8.2.9",
|
||||
- "@storybook/addon-designs": "8.0.3",
|
||||
- "@storybook/addon-essentials": "8.2.9",
|
||||
- "@storybook/addon-interactions": "8.2.9",
|
||||
- "@storybook/addon-links": "8.2.9",
|
||||
- "@storybook/angular": "8.2.9",
|
||||
- "@storybook/manager-api": "8.2.9",
|
||||
- "@storybook/theming": "8.2.9",
|
||||
- "@electron/notarize": "2.3.0",
|
||||
- "@electron/rebuild": "3.6.0",
|
||||
"@ngtools/webpack": "16.2.14",
|
||||
- "@storybook/addon-a11y": "7.6.19",
|
||||
- "@storybook/addon-actions": "7.6.19",
|
||||
- "@storybook/addon-designs": "7.0.9",
|
||||
- "@storybook/addon-essentials": "7.6.19",
|
||||
- "@storybook/addon-interactions": "7.6.19",
|
||||
- "@storybook/addon-links": "7.6.19",
|
||||
- "@storybook/angular": "7.6.19",
|
||||
- "@storybook/jest": "0.2.3",
|
||||
- "@storybook/testing-library": "0.2.2",
|
||||
- "@types/argon2-browser": "1.18.4",
|
||||
- "@types/chrome": "0.0.280",
|
||||
- "@types/firefox-webext-browser": "120.0.4",
|
||||
- "@types/chrome": "0.0.262",
|
||||
- "@types/firefox-webext-browser": "111.0.5",
|
||||
- "@types/inquirer": "8.2.10",
|
||||
"@types/jest": "29.5.12",
|
||||
- "@types/jquery": "3.5.32",
|
||||
- "@types/jquery": "3.5.30",
|
||||
- "@types/jsdom": "21.1.7",
|
||||
- "@types/koa": "2.15.0",
|
||||
- "@types/koa": "2.14.0",
|
||||
- "@types/koa__multer": "2.0.7",
|
||||
- "@types/koa__router": "12.0.4",
|
||||
- "@types/koa-bodyparser": "4.3.7",
|
||||
- "@types/koa-json": "2.0.23",
|
||||
- "@types/lowdb": "1.0.15",
|
||||
"@types/lunr": "2.3.7",
|
||||
"@types/node": "20.17.1",
|
||||
"@types/node": "20.14.8",
|
||||
- "@types/node-fetch": "2.6.4",
|
||||
"@types/node-forge": "1.3.11",
|
||||
"@types/node-ipc": "9.2.3",
|
||||
"@types/papaparse": "5.3.15",
|
||||
"@types/papaparse": "5.3.14",
|
||||
- "@types/proper-lockfile": "4.1.4",
|
||||
- "@types/react": "16.14.60",
|
||||
- "@types/retry": "0.12.5",
|
||||
+ "@types/semver": "^7.3.4",
|
||||
"@types/zxcvbn": "4.4.5",
|
||||
"@types/zxcvbn": "4.4.4",
|
||||
- "@typescript-eslint/eslint-plugin": "7.16.1",
|
||||
- "@typescript-eslint/parser": "7.16.1",
|
||||
- "@webcomponents/custom-elements": "1.6.0",
|
||||
- "@yao-pkg/pkg": "5.16.1",
|
||||
"autoprefixer": "10.4.20",
|
||||
- "babel-loader": "9.1.3",
|
||||
- "@yao-pkg/pkg": "^5.12.0",
|
||||
"autoprefixer": "10.4.19",
|
||||
- "babel-loader": "^9.1.3",
|
||||
- "base64-loader": "1.0.0",
|
||||
- "browserslist": "4.23.2",
|
||||
- "chromatic": "11.10.2",
|
||||
"concurrently": "9.0.1",
|
||||
- "browserslist": "^4.23.0",
|
||||
- "chromatic": "10.9.6",
|
||||
"concurrently": "8.2.2",
|
||||
"copy-webpack-plugin": "12.0.2",
|
||||
"cross-env": "7.0.3",
|
||||
"css-loader": "7.1.2",
|
||||
"electron": "32.1.1",
|
||||
"css-loader": "6.10.0",
|
||||
"electron": "31.3.1",
|
||||
- "electron-builder": "24.13.3",
|
||||
"electron-log": "5.0.1",
|
||||
- "electron-reload": "2.0.0-alpha.1",
|
||||
"electron-store": "8.2.0",
|
||||
"electron-updater": "6.3.9",
|
||||
"electron-updater": "6.1.8",
|
||||
- "eslint": "8.57.0",
|
||||
- "eslint-config-prettier": "9.1.0",
|
||||
- "eslint-import-resolver-typescript": "3.6.1",
|
||||
@ -96,89 +96,90 @@
|
||||
- "eslint-plugin-storybook": "0.8.0",
|
||||
- "eslint-plugin-tailwindcss": "3.17.4",
|
||||
- "gulp": "4.0.2",
|
||||
- "gulp-filter": "9.0.1",
|
||||
- "gulp-if": "3.0.0",
|
||||
- "gulp-json-editor": "2.6.0",
|
||||
- "gulp-replace": "1.1.4",
|
||||
- "gulp-zip": "6.0.0",
|
||||
"html-loader": "5.0.0",
|
||||
- "html-webpack-injector": "1.1.4",
|
||||
"html-webpack-plugin": "5.6.3",
|
||||
"html-webpack-plugin": "5.6.0",
|
||||
- "husky": "9.1.4",
|
||||
"jest-extended": "^4.0.2",
|
||||
- "jest-junit": "16.0.0",
|
||||
"jest-mock-extended": "3.0.7",
|
||||
- "jest-preset-angular": "14.1.1",
|
||||
- "lint-staged": "15.2.8",
|
||||
"mini-css-extract-plugin": "2.9.1",
|
||||
"mini-css-extract-plugin": "2.8.1",
|
||||
"node-ipc": "9.2.1",
|
||||
+ "path-browserify": "^1.0.1",
|
||||
"postcss": "8.4.38",
|
||||
"postcss-loader": "8.1.1",
|
||||
- "prettier": "3.3.3",
|
||||
- "prettier-plugin-tailwindcss": "0.6.8",
|
||||
- "prettier-plugin-tailwindcss": "0.6.5",
|
||||
- "process": "0.11.10",
|
||||
- "remark-gfm": "4.0.0",
|
||||
- "react": "18.3.1",
|
||||
- "react-dom": "18.3.1",
|
||||
"regedit": "^3.0.3",
|
||||
- "remark-gfm": "3.0.1",
|
||||
"rimraf": "6.0.1",
|
||||
"sass": "1.74.1",
|
||||
"sass-loader": "16.0.1",
|
||||
- "storybook": "8.2.9",
|
||||
"sass-loader": "14.2.1",
|
||||
- "storybook": "7.6.19",
|
||||
- "style-loader": "3.3.4",
|
||||
- "tailwindcss": "3.4.14",
|
||||
- "tailwindcss": "3.4.3",
|
||||
- "ts-jest": "29.2.2",
|
||||
"ts-loader": "9.5.1",
|
||||
"tsconfig-paths-webpack-plugin": "4.1.0",
|
||||
- "type-fest": "2.19.0",
|
||||
"typescript": "5.4.2",
|
||||
"url": "0.11.4",
|
||||
"typescript": "5.1.6",
|
||||
"url": "0.11.3",
|
||||
- "util": "0.12.5",
|
||||
- "wait-on": "8.0.1",
|
||||
"webpack": "5.94.0",
|
||||
- "wait-on": "7.2.0",
|
||||
"webpack": "5.93.0",
|
||||
- "webpack-cli": "5.1.4",
|
||||
- "webpack-dev-server": "5.0.4",
|
||||
- "webpack-node-externals": "3.0.0"
|
||||
+ "webpack-cli": "5.1.4"
|
||||
},
|
||||
"dependencies": {
|
||||
"@angular/animations": "17.3.12",
|
||||
@@ -158,57 +84,28 @@
|
||||
"@angular/platform-browser": "17.3.12",
|
||||
"@angular/platform-browser-dynamic": "17.3.12",
|
||||
"@angular/router": "17.3.12",
|
||||
- "@bitwarden/sdk-internal": "0.2.0-main.3",
|
||||
- "@electron/fuses": "1.8.0",
|
||||
"@angular/animations": "16.2.12",
|
||||
@@ -160,55 +83,28 @@
|
||||
"@angular/platform-browser": "16.2.12",
|
||||
"@angular/platform-browser-dynamic": "16.2.12",
|
||||
"@angular/router": "16.2.12",
|
||||
- "@koa/multer": "3.0.2",
|
||||
- "@koa/router": "13.1.0",
|
||||
- "@koa/router": "12.0.1",
|
||||
"@microsoft/signalr": "8.0.7",
|
||||
"@microsoft/signalr-protocol-msgpack": "8.0.7",
|
||||
"@ng-select/ng-select": "12.0.7",
|
||||
"argon2": "0.41.1",
|
||||
"@ng-select/ng-select": "11.2.0",
|
||||
"argon2": "0.40.1",
|
||||
- "argon2-browser": "1.18.0",
|
||||
"big-integer": "1.6.52",
|
||||
"big-integer": "1.6.51",
|
||||
- "bootstrap": "4.6.0",
|
||||
- "braintree-web-drop-in": "1.43.0",
|
||||
- "braintree-web-drop-in": "1.42.0",
|
||||
"buffer": "6.0.3",
|
||||
- "bufferutil": "4.0.8",
|
||||
- "chalk": "4.1.2",
|
||||
"commander": "11.1.0",
|
||||
- "core-js": "3.36.1",
|
||||
- "form-data": "4.0.0",
|
||||
- "https-proxy-agent": "7.0.5",
|
||||
- "https-proxy-agent": "7.0.2",
|
||||
- "inquirer": "8.2.6",
|
||||
- "jquery": "3.7.1",
|
||||
- "jsdom": "25.0.1",
|
||||
- "jsdom": "24.1.1",
|
||||
"jszip": "3.10.1",
|
||||
- "koa": "2.15.3",
|
||||
- "koa": "2.15.0",
|
||||
- "koa-bodyparser": "4.4.1",
|
||||
- "koa-json": "2.0.2",
|
||||
- "lowdb": "1.0.0",
|
||||
"lunr": "2.3.9",
|
||||
- "multer": "1.4.5-lts.1",
|
||||
- "ngx-infinite-scroll": "17.0.1",
|
||||
"ngx-toastr": "18.0.0",
|
||||
- "ngx-infinite-scroll": "16.0.0",
|
||||
"ngx-toastr": "17.0.2",
|
||||
"node-fetch": "2.6.12",
|
||||
"node-forge": "1.3.1",
|
||||
"nord": "0.2.1",
|
||||
"oidc-client-ts": "2.4.1",
|
||||
"oidc-client-ts": "2.4.0",
|
||||
- "open": "8.4.2",
|
||||
"papaparse": "5.4.1",
|
||||
- "patch-package": "8.0.0",
|
||||
@ -188,9 +189,9 @@
|
||||
- "qrious": "4.0.2",
|
||||
"rxjs": "7.8.1",
|
||||
- "tabbable": "6.2.0",
|
||||
"tldts": "6.1.58",
|
||||
"tldts": "6.1.38",
|
||||
"utf-8-validate": "6.0.4",
|
||||
"zone.js": "0.14.10",
|
||||
"zone.js": "0.13.3",
|
||||
"zxcvbn": "4.4.2"
|
||||
},
|
||||
"overrides": {
|
||||
@ -198,14 +199,14 @@
|
||||
"@storybook/angular": {
|
||||
"zone.js": "$zone.js"
|
||||
},
|
||||
--- clients-desktop-v2024.10.0/apps/desktop/desktop_native/napi/package.json.orig 2024-10-17 19:25:31.222180130 +0200
|
||||
+++ clients-desktop-v2024.10.0/apps/desktop/desktop_native/napi/package.json 2024-10-17 19:43:45.262219326 +0200
|
||||
@@ -8,9 +8,6 @@
|
||||
--- clients/apps/desktop/desktop_native/napi/package.json.orig 2024-07-15 19:10:33.919215714 +0200
|
||||
+++ clients/apps/desktop/desktop_native/napi/package.json 2024-07-15 19:25:13.322024338 +0200
|
||||
@@ -10,9 +10,6 @@
|
||||
},
|
||||
"author": "",
|
||||
"license": "GPL-3.0",
|
||||
- "devDependencies": {
|
||||
- "@napi-rs/cli": "2.18.4"
|
||||
- "@napi-rs/cli": "2.16.2"
|
||||
- },
|
||||
"napi": {
|
||||
"name": "desktop_napi",
|
||||
|
@ -1,10 +1,10 @@
|
||||
--- vendor/node_modules/argon2/binding.gyp.orig 2024-11-14 21:31:38.677408520 +0100
|
||||
+++ vendor/node_modules/argon2/binding.gyp 2024-11-14 21:51:57.719983077 +0100
|
||||
--- clients/node_modules/argon2/binding.gyp.orig 2024-07-15 19:27:24.157408387 +0200
|
||||
+++ clients/node_modules/argon2/binding.gyp 2024-07-15 19:40:42.806528404 +0200
|
||||
@@ -20,7 +20,7 @@
|
||||
"Release": {
|
||||
"target_conditions": [
|
||||
["OS != 'win'", {
|
||||
- "cflags+": ["-fdata-sections", "-ffunction-sections", "-fvisibility=hidden"],
|
||||
- "cflags+": ["-fdata-sections", "-ffunction-sections", "-flto", "-fvisibility=hidden"],
|
||||
+ "cflags+": ["-fvisibility=hidden"],
|
||||
"ldflags+": ["-Wl,--gc-sections"]
|
||||
}]
|
||||
@ -39,10 +39,10 @@
|
||||
"NAPI_VERSION=<(napi_build_version)",
|
||||
@@ -58,10 +39,15 @@
|
||||
"sources": [
|
||||
"argon2.cpp"
|
||||
"argon2_node.cpp"
|
||||
],
|
||||
- "cflags_cc+": ["-Wall", "-Wextra", "-Wformat", "-Wnon-virtual-dtor", "-pedantic", "-Werror"],
|
||||
+ "cflags_cc+": ["-Wall", "-Wextra", "-Wformat", "-Wnon-virtual-dtor", "-pedantic"],
|
||||
- "cflags_cc+": ["-Wall", "-Wextra", "-Wconversion", "-Wformat", "-Wnon-virtual-dtor", "-pedantic", "-Werror"],
|
||||
+ "cflags_cc+": ["-Wall", "-Wextra", "-Wconversion", "-Wformat", "-Wnon-virtual-dtor", "-pedantic"],
|
||||
"cflags_cc!": ["-fno-exceptions"],
|
||||
"include_dirs": ["<!(node -p \"require('node-addon-api').include_dir\")"],
|
||||
- "dependencies": ["libargon2"],
|
||||
@ -55,11 +55,11 @@
|
||||
"configurations": {
|
||||
"Debug": {
|
||||
"conditions": [
|
||||
--- vendor/node_modules/argon2/argon2.cpp.orig 2024-11-14 21:31:38.537338517 +0100
|
||||
+++ vendor/node_modules/argon2/argon2.cpp 2024-11-14 21:56:26.220837915 +0100
|
||||
--- clients/node_modules/argon2/argon2_node.cpp.orig 2024-07-15 19:27:24.130728388 +0200
|
||||
+++ clients/node_modules/argon2/argon2_node.cpp 2024-07-15 19:42:24.944237666 +0200
|
||||
@@ -1,4 +1,4 @@
|
||||
-#include "argon2/include/argon2.h"
|
||||
+#include <argon2.h>
|
||||
|
||||
#include <cassert>
|
||||
#include <cstdint>
|
||||
#include <napi.h>
|
||||
#include <string>
|
||||
|
@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:37592e18d8e62e38132e348da23bbeb4346dc4d5532d9f989849c205401ff643
|
||||
size 41172785
|
||||
oid sha256:f336dcd548f1fdb65092ee8a86923674ff41284044c96835b5e9693f1e89f9bf
|
||||
size 43032335
|
||||
|
Loading…
Reference in New Issue
Block a user