@unicitylabs/sphere-sdk 0.1.6 → 0.1.7
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/README.md +2 -2
- package/dist/core/index.cjs +8 -11
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.js +8 -11
- package/dist/core/index.js.map +1 -1
- package/dist/impl/browser/index.cjs +14 -3
- package/dist/impl/browser/index.cjs.map +1 -1
- package/dist/impl/browser/index.js +14 -3
- package/dist/impl/browser/index.js.map +1 -1
- package/dist/impl/nodejs/index.cjs +18 -3
- package/dist/impl/nodejs/index.cjs.map +1 -1
- package/dist/impl/nodejs/index.js +18 -3
- package/dist/impl/nodejs/index.js.map +1 -1
- package/dist/index.cjs +8 -11
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +8 -11
- package/dist/index.d.ts +8 -11
- package/dist/index.js +8 -11
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -370,8 +370,15 @@ var IndexedDBTokenStorageProvider = class {
|
|
|
370
370
|
}
|
|
371
371
|
const tokens = await this.getAllFromStore(STORE_TOKENS);
|
|
372
372
|
for (const token of tokens) {
|
|
373
|
-
|
|
374
|
-
|
|
373
|
+
if (token.id.startsWith("token-") || token.id.startsWith("nametag-")) {
|
|
374
|
+
continue;
|
|
375
|
+
}
|
|
376
|
+
if (token.id.startsWith("archived-")) {
|
|
377
|
+
data[token.id] = token.data;
|
|
378
|
+
} else {
|
|
379
|
+
const key = `_${token.id}`;
|
|
380
|
+
data[key] = token.data;
|
|
381
|
+
}
|
|
375
382
|
}
|
|
376
383
|
const tombstones = await this.getFromStore(STORE_META, "tombstones");
|
|
377
384
|
if (tombstones) {
|
|
@@ -426,10 +433,14 @@ var IndexedDBTokenStorageProvider = class {
|
|
|
426
433
|
if (data._invalid) {
|
|
427
434
|
await this.putToStore(STORE_META, "invalid", data._invalid);
|
|
428
435
|
}
|
|
436
|
+
const reservedKeys = ["_meta", "_tombstones", "_outbox", "_sent", "_invalid"];
|
|
429
437
|
for (const [key, value] of Object.entries(data)) {
|
|
430
|
-
if (
|
|
438
|
+
if (reservedKeys.includes(key)) continue;
|
|
439
|
+
if (key.startsWith("_")) {
|
|
431
440
|
const tokenId = key.slice(1);
|
|
432
441
|
await this.putToStore(STORE_TOKENS, tokenId, { id: tokenId, data: value });
|
|
442
|
+
} else if (key.startsWith("archived-")) {
|
|
443
|
+
await this.putToStore(STORE_TOKENS, key, { id: key, data: value });
|
|
433
444
|
}
|
|
434
445
|
}
|
|
435
446
|
if (data._tombstones) {
|