@dxos/echo-pipeline 0.4.8-main.6d7437e → 0.4.8-main.a4c603b
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/dist/lib/browser/{chunk-XR2636AC.mjs → chunk-M7BOB47J.mjs} +22 -21
- package/dist/lib/browser/{chunk-XR2636AC.mjs.map → chunk-M7BOB47J.mjs.map} +3 -3
- package/dist/lib/browser/index.mjs +1 -1
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/testing/index.mjs +1 -1
- package/dist/lib/node/{chunk-LD4R726W.cjs → chunk-B5LDK2PA.cjs} +24 -23
- package/dist/lib/node/{chunk-LD4R726W.cjs.map → chunk-B5LDK2PA.cjs.map} +3 -3
- package/dist/lib/node/index.cjs +30 -30
- package/dist/lib/node/index.cjs.map +1 -1
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/testing/index.cjs +16 -16
- package/dist/types/src/automerge/automerge-host.d.ts +2 -2
- package/dist/types/src/automerge/automerge-host.d.ts.map +1 -1
- package/package.json +33 -33
- package/src/automerge/automerge-host.ts +26 -16
|
@@ -3104,7 +3104,7 @@ var MeshNetworkAdapter = class extends NetworkAdapter2 {
|
|
|
3104
3104
|
import { next as automerge, getHeads } from "@dxos/automerge/automerge";
|
|
3105
3105
|
import { Repo } from "@dxos/automerge/automerge-repo";
|
|
3106
3106
|
import { IndexedDBStorageAdapter } from "@dxos/automerge/automerge-repo-storage-indexeddb";
|
|
3107
|
-
import { Context as Context7 } from "@dxos/context";
|
|
3107
|
+
import { Context as Context7, cancelWithContext as cancelWithContext2 } from "@dxos/context";
|
|
3108
3108
|
import { PublicKey as PublicKey8 } from "@dxos/keys";
|
|
3109
3109
|
import { log as log15 } from "@dxos/log";
|
|
3110
3110
|
import { idCodec } from "@dxos/protocols";
|
|
@@ -3221,7 +3221,7 @@ var AutomergeHost = class {
|
|
|
3221
3221
|
});
|
|
3222
3222
|
return false;
|
|
3223
3223
|
}
|
|
3224
|
-
const authorizedDevices = this._authorizedDevices.get(
|
|
3224
|
+
const authorizedDevices = this._authorizedDevices.get(spaceKey);
|
|
3225
3225
|
const deviceKeyHex = this.repo.peerMetadataByPeerId[peerId]?.dxos_deviceKey;
|
|
3226
3226
|
if (!deviceKeyHex) {
|
|
3227
3227
|
log15("device key not found for share policy check", {
|
|
@@ -3289,8 +3289,8 @@ var AutomergeHost = class {
|
|
|
3289
3289
|
});
|
|
3290
3290
|
}
|
|
3291
3291
|
_onUpdate(event) {
|
|
3292
|
-
const spaceKey =
|
|
3293
|
-
if (!spaceKey
|
|
3292
|
+
const spaceKey = event.doc.access?.spaceKey;
|
|
3293
|
+
if (!spaceKey) {
|
|
3294
3294
|
return;
|
|
3295
3295
|
}
|
|
3296
3296
|
const objectIds = getInlineChanges(event);
|
|
@@ -3302,21 +3302,22 @@ var AutomergeHost = class {
|
|
|
3302
3302
|
if (!lastAvailableHash) {
|
|
3303
3303
|
return;
|
|
3304
3304
|
}
|
|
3305
|
-
const
|
|
3306
|
-
|
|
3307
|
-
|
|
3308
|
-
|
|
3309
|
-
|
|
3310
|
-
|
|
3311
|
-
|
|
3312
|
-
|
|
3313
|
-
|
|
3314
|
-
|
|
3305
|
+
const markingDirtyPromise = Promise.all(objectIds.map(async (objectId) => {
|
|
3306
|
+
const spaceKey2 = getSpaceKeyFromDoc(event.doc);
|
|
3307
|
+
if (!spaceKey2) {
|
|
3308
|
+
return;
|
|
3309
|
+
}
|
|
3310
|
+
await cancelWithContext2(this._ctx, this._metadata.markDirty(idCodec.encode({
|
|
3311
|
+
documentId: event.handle.documentId,
|
|
3312
|
+
objectId,
|
|
3313
|
+
spaceKey: spaceKey2
|
|
3314
|
+
}), lastAvailableHash));
|
|
3315
|
+
})).then(() => {
|
|
3315
3316
|
this._updatingMetadata.delete(event.handle.documentId);
|
|
3316
3317
|
}).catch((err) => {
|
|
3317
|
-
this._ctx.disposed && log15.catch(err, void 0, {
|
|
3318
|
+
!this._ctx.disposed && log15.catch(err, void 0, {
|
|
3318
3319
|
F: __dxlog_file16,
|
|
3319
|
-
L:
|
|
3320
|
+
L: 200,
|
|
3320
3321
|
S: this,
|
|
3321
3322
|
C: (f, a) => f(...a)
|
|
3322
3323
|
});
|
|
@@ -3377,7 +3378,7 @@ var AutomergeHost = class {
|
|
|
3377
3378
|
deviceKey
|
|
3378
3379
|
}, {
|
|
3379
3380
|
F: __dxlog_file16,
|
|
3380
|
-
L:
|
|
3381
|
+
L: 268,
|
|
3381
3382
|
S: this,
|
|
3382
3383
|
C: (f, a) => f(...a)
|
|
3383
3384
|
});
|
|
@@ -3420,10 +3421,10 @@ var getInlineChanges = (event) => {
|
|
|
3420
3421
|
};
|
|
3421
3422
|
var getSpaceKeyFromDoc = (doc) => {
|
|
3422
3423
|
const rawSpaceKey = doc.access?.spaceKey ?? doc.experimental_spaceKey;
|
|
3423
|
-
if (rawSpaceKey
|
|
3424
|
-
return
|
|
3424
|
+
if (!rawSpaceKey) {
|
|
3425
|
+
return;
|
|
3425
3426
|
}
|
|
3426
|
-
return
|
|
3427
|
+
return rawSpaceKey;
|
|
3427
3428
|
};
|
|
3428
3429
|
|
|
3429
3430
|
export {
|
|
@@ -3457,4 +3458,4 @@ export {
|
|
|
3457
3458
|
AutomergeHost,
|
|
3458
3459
|
getSpaceKeyFromDoc
|
|
3459
3460
|
};
|
|
3460
|
-
//# sourceMappingURL=chunk-
|
|
3461
|
+
//# sourceMappingURL=chunk-M7BOB47J.mjs.map
|