jazz-tools 0.10.4 → 0.10.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +4 -4
- package/CHANGELOG.md +14 -0
- package/dist/{chunk-XRX3CCYY.js → chunk-DPW23T6J.js} +42 -5
- package/dist/chunk-DPW23T6J.js.map +1 -0
- package/dist/index.js +1 -1
- package/dist/testing.js +1 -1
- package/package.json +2 -2
- package/src/auth/AuthSecretStorage.ts +36 -2
- package/src/implementation/createContext.ts +8 -3
- package/src/tests/AuthSecretStorage.test.ts +35 -3
- package/src/tests/ContextManager.test.ts +81 -0
- package/dist/chunk-XRX3CCYY.js.map +0 -1
package/.turbo/turbo-build.log
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
|
2
|
-
> jazz-tools@0.10.
|
2
|
+
> jazz-tools@0.10.6 build /home/runner/_work/jazz/jazz/packages/jazz-tools
|
3
3
|
> tsup
|
4
4
|
|
5
5
|
[34mCLI[39m Building entry: {"index":"src/index.ts","testing":"src/testing.ts"}
|
@@ -11,8 +11,8 @@
|
|
11
11
|
[34mESM[39m Build start
|
12
12
|
[32mESM[39m [1mdist/index.js [22m[32m1.50 KB[39m
|
13
13
|
[32mESM[39m [1mdist/testing.js [22m[32m6.18 KB[39m
|
14
|
-
[32mESM[39m [1mdist/chunk-
|
14
|
+
[32mESM[39m [1mdist/chunk-DPW23T6J.js [22m[32m112.71 KB[39m
|
15
15
|
[32mESM[39m [1mdist/index.js.map [22m[32m259.00 B[39m
|
16
16
|
[32mESM[39m [1mdist/testing.js.map [22m[32m12.19 KB[39m
|
17
|
-
[32mESM[39m [1mdist/chunk-
|
18
|
-
[32mESM[39m ⚡️ Build success in
|
17
|
+
[32mESM[39m [1mdist/chunk-DPW23T6J.js.map [22m[32m270.82 KB[39m
|
18
|
+
[32mESM[39m ⚡️ Build success in 47ms
|
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,19 @@
|
|
1
1
|
# jazz-tools
|
2
2
|
|
3
|
+
## 0.10.6
|
4
|
+
|
5
|
+
### Patch Changes
|
6
|
+
|
7
|
+
- ada802b: Fix Clerk credentials migration
|
8
|
+
- Updated dependencies [5c76e37]
|
9
|
+
- cojson@0.10.6
|
10
|
+
|
11
|
+
## 0.10.5
|
12
|
+
|
13
|
+
### Patch Changes
|
14
|
+
|
15
|
+
- 59ff77e: Critical fix: move the Account migration code execution in the right place to ensure that the changes applied to the right Jazz node.
|
16
|
+
|
3
17
|
## 0.10.4
|
4
18
|
|
5
19
|
### Patch Changes
|
@@ -447,11 +447,17 @@ async function createJazzContextFromExistingCredentials({
|
|
447
447
|
accountSecret: credentials.secret,
|
448
448
|
sessionID,
|
449
449
|
peersToLoadFrom,
|
450
|
-
crypto
|
450
|
+
crypto,
|
451
|
+
migration: async (rawAccount, _node, creationProps) => {
|
452
|
+
const account2 = new CurrentAccountSchema({
|
453
|
+
fromRaw: rawAccount
|
454
|
+
});
|
455
|
+
activeAccountContext.set(account2);
|
456
|
+
await account2.applyMigration(creationProps);
|
457
|
+
}
|
451
458
|
});
|
452
459
|
const account = CurrentAccountSchema.fromNode(node);
|
453
460
|
activeAccountContext.set(account);
|
454
|
-
await account.applyMigration();
|
455
461
|
return {
|
456
462
|
node,
|
457
463
|
account,
|
@@ -3439,15 +3445,46 @@ var AuthSecretStorage = class {
|
|
3439
3445
|
if (!await kvStore.get(STORAGE_KEY)) {
|
3440
3446
|
const demoAuthSecret = await kvStore.get("demo-auth-logged-in-secret");
|
3441
3447
|
if (demoAuthSecret) {
|
3442
|
-
|
3448
|
+
const parsed = JSON.parse(demoAuthSecret);
|
3449
|
+
await kvStore.set(
|
3450
|
+
STORAGE_KEY,
|
3451
|
+
JSON.stringify({
|
3452
|
+
accountID: parsed.accountID,
|
3453
|
+
accountSecret: parsed.accountSecret,
|
3454
|
+
provider: "demo"
|
3455
|
+
})
|
3456
|
+
);
|
3443
3457
|
await kvStore.delete("demo-auth-logged-in-secret");
|
3444
3458
|
}
|
3445
3459
|
const clerkAuthSecret = await kvStore.get("jazz-clerk-auth");
|
3446
3460
|
if (clerkAuthSecret) {
|
3447
|
-
|
3461
|
+
const parsed = JSON.parse(clerkAuthSecret);
|
3462
|
+
await kvStore.set(
|
3463
|
+
STORAGE_KEY,
|
3464
|
+
JSON.stringify({
|
3465
|
+
accountID: parsed.accountID,
|
3466
|
+
accountSecret: parsed.secret,
|
3467
|
+
provider: "clerk"
|
3468
|
+
})
|
3469
|
+
);
|
3448
3470
|
await kvStore.delete("jazz-clerk-auth");
|
3449
3471
|
}
|
3450
3472
|
}
|
3473
|
+
const value = await kvStore.get(STORAGE_KEY);
|
3474
|
+
if (value) {
|
3475
|
+
const parsed = JSON.parse(value);
|
3476
|
+
if ("secret" in parsed) {
|
3477
|
+
await kvStore.set(
|
3478
|
+
STORAGE_KEY,
|
3479
|
+
JSON.stringify({
|
3480
|
+
accountID: parsed.accountID,
|
3481
|
+
secretSeed: parsed.secretSeed,
|
3482
|
+
accountSecret: parsed.secret,
|
3483
|
+
provider: parsed.provider
|
3484
|
+
})
|
3485
|
+
);
|
3486
|
+
}
|
3487
|
+
}
|
3451
3488
|
}
|
3452
3489
|
async get() {
|
3453
3490
|
const kvStore = KvStoreContext_default.getInstance().getStorage();
|
@@ -3919,4 +3956,4 @@ export {
|
|
3919
3956
|
consumeInviteLink
|
3920
3957
|
};
|
3921
3958
|
/* istanbul ignore file -- @preserve */
|
3922
|
-
//# sourceMappingURL=chunk-
|
3959
|
+
//# sourceMappingURL=chunk-DPW23T6J.js.map
|