@fluid-experimental/tree 2.70.0-361092 → 2.70.0-361788
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/api-report/experimental-tree.alpha.api.md +1 -1
- package/dist/SharedTree.d.ts +10 -9
- package/dist/SharedTree.d.ts.map +1 -1
- package/dist/SharedTree.js +21 -15
- package/dist/SharedTree.js.map +1 -1
- package/dist/migration-shim/migrationShim.d.ts +1 -1
- package/dist/migration-shim/migrationShim.js +1 -1
- package/dist/migration-shim/migrationShim.js.map +1 -1
- package/lib/SharedTree.d.ts +10 -9
- package/lib/SharedTree.d.ts.map +1 -1
- package/lib/SharedTree.js +21 -15
- package/lib/SharedTree.js.map +1 -1
- package/lib/migration-shim/migrationShim.d.ts +1 -1
- package/lib/migration-shim/migrationShim.js +1 -1
- package/lib/migration-shim/migrationShim.js.map +1 -1
- package/package.json +23 -23
- package/src/SharedTree.ts +31 -22
- package/src/migration-shim/migrationShim.ts +1 -1
package/lib/SharedTree.d.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { ITelemetryBaseProperties } from '@fluidframework/core-interfaces';
|
|
6
6
|
import { IChannelAttributes, IChannelFactory, IFluidDataStoreRuntime, IChannelServices, IChannelStorageService } from '@fluidframework/datastore-definitions/internal';
|
|
7
|
-
import { ISummaryTreeWithStats, ITelemetryContext } from '@fluidframework/runtime-definitions/internal';
|
|
7
|
+
import { ISummaryTreeWithStats, ITelemetryContext, type IRuntimeMessageCollection } from '@fluidframework/runtime-definitions/internal';
|
|
8
8
|
import { IFluidSerializer, ISharedObjectEvents, SharedObject } from '@fluidframework/shared-object-base/internal';
|
|
9
9
|
import { ITelemetryLoggerExt } from '@fluidframework/telemetry-utils/internal';
|
|
10
10
|
import { Change } from './ChangeTypes.js';
|
|
@@ -109,8 +109,8 @@ export declare class SharedTreeFactory implements IChannelFactory {
|
|
|
109
109
|
private readonly args;
|
|
110
110
|
/**
|
|
111
111
|
* Get a factory for SharedTree to register with the data store.
|
|
112
|
-
* @param writeFormat - Determines the format version the SharedTree will write ops and summaries in. See
|
|
113
|
-
* documentation
|
|
112
|
+
* @param writeFormat - Determines the format version the SharedTree will write ops and summaries in. See {@link https://github.com/microsoft/FluidFramework/blob/main/experimental/dds/tree/docs/Write-Format.md | the write format
|
|
113
|
+
* documentation} for more information.
|
|
114
114
|
* @param options - Configuration options for this tree
|
|
115
115
|
* @returns A factory that creates `SharedTree`s and loads them from storage.
|
|
116
116
|
*/
|
|
@@ -215,7 +215,7 @@ export interface StashedLocalOpMetadata {
|
|
|
215
215
|
transformedEdit?: Edit<ChangeInternal>;
|
|
216
216
|
}
|
|
217
217
|
/**
|
|
218
|
-
* A
|
|
218
|
+
* A {@link https://github.com/microsoft/FluidFramework/blob/main/experimental/dds/tree/README.md | distributed tree}.
|
|
219
219
|
* @alpha
|
|
220
220
|
*/
|
|
221
221
|
export declare class SharedTree extends SharedObject<ISharedTreeEvents> implements NodeIdContext {
|
|
@@ -231,7 +231,7 @@ export declare class SharedTree extends SharedObject<ISharedTreeEvents> implemen
|
|
|
231
231
|
* that was initialized with a newer write version connects to the session. Care must be taken when changing this value,
|
|
232
232
|
* as a staged rollout must of occurred such that all collaborating clients must have the code to read at least the version
|
|
233
233
|
* written.
|
|
234
|
-
* See
|
|
234
|
+
* See {@link https://github.com/microsoft/FluidFramework/blob/main/experimental/dds/tree/docs/Write-Format.md | the write format documentation} for more information.
|
|
235
235
|
* @param options - Configuration options for this tree
|
|
236
236
|
* @returns A factory that creates `SharedTree`s and loads them from storage.
|
|
237
237
|
*/
|
|
@@ -287,8 +287,8 @@ export declare class SharedTree extends SharedObject<ISharedTreeEvents> implemen
|
|
|
287
287
|
* Create a new SharedTree.
|
|
288
288
|
* @param runtime - The runtime the SharedTree will be associated with
|
|
289
289
|
* @param id - Unique ID for the SharedTree
|
|
290
|
-
* @param writeFormat - Determines the format version the SharedTree will write ops and summaries in. See
|
|
291
|
-
* documentation
|
|
290
|
+
* @param writeFormat - Determines the format version the SharedTree will write ops and summaries in. See {@link https://github.com/microsoft/FluidFramework/blob/main/experimental/dds/tree/docs/Write-Format.md | the write format
|
|
291
|
+
* documentation} for more information.
|
|
292
292
|
* @param options - Configuration options for this tree
|
|
293
293
|
*/
|
|
294
294
|
constructor(runtime: IFluidDataStoreRuntime, id: string, ...args: SharedTreeArgs<WriteFormat.v0_0_2>);
|
|
@@ -422,9 +422,10 @@ export declare class SharedTree extends SharedObject<ISharedTreeEvents> implemen
|
|
|
422
422
|
*/
|
|
423
423
|
protected loadCore(storage: IChannelStorageService): Promise<void>;
|
|
424
424
|
/**
|
|
425
|
-
* {@inheritDoc @fluidframework/shared-object-base#SharedObject.
|
|
425
|
+
* {@inheritDoc @fluidframework/shared-object-base#SharedObject.processMessagesCore}
|
|
426
426
|
*/
|
|
427
|
-
protected
|
|
427
|
+
protected processMessagesCore(messagesCollection: IRuntimeMessageCollection): void;
|
|
428
|
+
private processMessage;
|
|
428
429
|
/**
|
|
429
430
|
* {@inheritDoc @fluidframework/shared-object-base#SharedObject.registerCore}
|
|
430
431
|
*/
|
package/lib/SharedTree.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SharedTree.d.ts","sourceRoot":"","sources":["../src/SharedTree.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AAE3E,OAAO,EACN,kBAAkB,EAClB,eAAe,EACf,sBAAsB,EACtB,gBAAgB,EAChB,sBAAsB,EACtB,MAAM,gDAAgD,CAAC;
|
|
1
|
+
{"version":3,"file":"SharedTree.d.ts","sourceRoot":"","sources":["../src/SharedTree.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AAE3E,OAAO,EACN,kBAAkB,EAClB,eAAe,EACf,sBAAsB,EACtB,gBAAgB,EAChB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,cAAc,CACpB,KAAK,EAAE,UAAU,EACjB,KAAK,EAAE,QAAQ,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC,EACzC,gBAAgB,CAAC,EAAE,CAAC,EAAE,EAAE,YAAY,KAAK,YAAY,GACnD,MAAM,EAAE;IAaX;;;;;OAKG;IACI,iBAAiB,CAAC,aAAa,EAAE,IAAI,CAAC,cAAc,CAAC,GAAG,SAAS,cAAc,EAAE,GAAG,IAAI,CAAC,cAAc,CAAC;IAa/G;;;OAGG;IACI,iBAAiB,CAAC,MAAM,EAAE,MAAM,GAAG,cAAc;IAmExD,OAAO,CAAC,gBAAgB;IAgBxB;;;;OAIG;IACI,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;IAYjD;;;;;OAKG;IACI,aAAa,CAAC,OAAO,EAAE,SAAS,kBAAkB,EAAE,EAAE,MAAM,EAAE,YAAY,GAAG,cAAc,EAAE,GAAG,SAAS;IAIhH;;OAEG;IACH,OAAO,CAAC,YAAY;IAyBpB,oEAAoE;IACpE,OAAO,CAAC,QAAQ;IAQT,UAAU,IAAI,sBAAsB;IAI3C;;;;;;;;OAQG;IACH,SAAS,CAAC,cAAc,CAAC,EAAE,EAAE,OAAO,GAAG,IAAI;IA8E3C,SAAS,CAAC,YAAY,CAAC,EAAE,EAAE,OAAO,EAAE,eAAe,CAAC,EAAE,sBAAsB,GAAG,IAAI;IAoBnF,OAAO,CAAC,iBAAiB;IAKzB;;;;OAIG;IACH,OAAO,CAAC,qBAAqB;CAuB7B"}
|
package/lib/SharedTree.js
CHANGED
|
@@ -35,8 +35,8 @@ import { SharedTreeAttributes, SharedTreeFactoryType } from './publicContracts.j
|
|
|
35
35
|
export class SharedTreeFactory {
|
|
36
36
|
/**
|
|
37
37
|
* Get a factory for SharedTree to register with the data store.
|
|
38
|
-
* @param writeFormat - Determines the format version the SharedTree will write ops and summaries in. See
|
|
39
|
-
* documentation
|
|
38
|
+
* @param writeFormat - Determines the format version the SharedTree will write ops and summaries in. See {@link https://github.com/microsoft/FluidFramework/blob/main/experimental/dds/tree/docs/Write-Format.md | the write format
|
|
39
|
+
* documentation} for more information.
|
|
40
40
|
* @param options - Configuration options for this tree
|
|
41
41
|
* @returns A factory that creates `SharedTree`s and loads them from storage.
|
|
42
42
|
*/
|
|
@@ -107,7 +107,7 @@ const sharedTreeTelemetryProperties = {
|
|
|
107
107
|
/** The SessionId of the temporary IdCompressor that records stashed ops */
|
|
108
108
|
const stashedSessionId = '8477b8d5-cf6c-4673-8345-8f076a8f9bc6';
|
|
109
109
|
/**
|
|
110
|
-
* A
|
|
110
|
+
* A {@link https://github.com/microsoft/FluidFramework/blob/main/experimental/dds/tree/README.md | distributed tree}.
|
|
111
111
|
* @alpha
|
|
112
112
|
*/
|
|
113
113
|
export class SharedTree extends SharedObject {
|
|
@@ -546,12 +546,18 @@ export class SharedTree extends SharedObject {
|
|
|
546
546
|
}
|
|
547
547
|
}
|
|
548
548
|
/**
|
|
549
|
-
* {@inheritDoc @fluidframework/shared-object-base#SharedObject.
|
|
549
|
+
* {@inheritDoc @fluidframework/shared-object-base#SharedObject.processMessagesCore}
|
|
550
550
|
*/
|
|
551
|
-
|
|
552
|
-
const
|
|
553
|
-
|
|
554
|
-
|
|
551
|
+
processMessagesCore(messagesCollection) {
|
|
552
|
+
const { envelope, messagesContent } = messagesCollection;
|
|
553
|
+
for (const messageContent of messagesContent) {
|
|
554
|
+
this.processMessage(envelope, messageContent.contents);
|
|
555
|
+
}
|
|
556
|
+
}
|
|
557
|
+
processMessage(messageEnvelope, contents) {
|
|
558
|
+
const typedContents = contents;
|
|
559
|
+
this.cachingLogViewer.setMinimumSequenceNumber(messageEnvelope.minimumSequenceNumber);
|
|
560
|
+
const op = typedContents;
|
|
555
561
|
if (op.version === undefined) {
|
|
556
562
|
// Back-compat: some legacy documents may contain trailing ops with an unstamped version; normalize them.
|
|
557
563
|
op.version = WriteFormat.v0_0_2;
|
|
@@ -573,7 +579,7 @@ export class SharedTree extends SharedObject {
|
|
|
573
579
|
if (op.version === WriteFormat.v0_1_1) {
|
|
574
580
|
this.internStringsFromEdit(edit);
|
|
575
581
|
}
|
|
576
|
-
this.processSequencedEdit(edit,
|
|
582
|
+
this.processSequencedEdit(edit, messageEnvelope);
|
|
577
583
|
}
|
|
578
584
|
}
|
|
579
585
|
else if (type === SharedTreeOpType.Update) {
|
|
@@ -615,7 +621,7 @@ export class SharedTree extends SharedObject {
|
|
|
615
621
|
fail('Unknown op version');
|
|
616
622
|
}
|
|
617
623
|
}
|
|
618
|
-
processSequencedEdit(edit,
|
|
624
|
+
processSequencedEdit(edit, messageEnvelope) {
|
|
619
625
|
const { id: editId } = edit;
|
|
620
626
|
const wasLocalEdit = this.editLog.isLocalEdit(editId);
|
|
621
627
|
// If the id of the supplied edit matches a non-local edit already present in the log, this would normally be indicative of an error.
|
|
@@ -628,10 +634,10 @@ export class SharedTree extends SharedObject {
|
|
|
628
634
|
return;
|
|
629
635
|
}
|
|
630
636
|
if (wasLocalEdit) {
|
|
631
|
-
this.editLog.addSequencedEdit(edit,
|
|
637
|
+
this.editLog.addSequencedEdit(edit, messageEnvelope);
|
|
632
638
|
}
|
|
633
639
|
else {
|
|
634
|
-
this.applyEditLocally(edit,
|
|
640
|
+
this.applyEditLocally(edit, messageEnvelope);
|
|
635
641
|
}
|
|
636
642
|
}
|
|
637
643
|
/**
|
|
@@ -817,10 +823,10 @@ export class SharedTree extends SharedObject {
|
|
|
817
823
|
fail('unexpected change type');
|
|
818
824
|
}
|
|
819
825
|
}
|
|
820
|
-
applyEditLocally(edit,
|
|
821
|
-
const isSequenced =
|
|
826
|
+
applyEditLocally(edit, messageEnvelope) {
|
|
827
|
+
const isSequenced = messageEnvelope !== undefined;
|
|
822
828
|
if (isSequenced) {
|
|
823
|
-
this.editLog.addSequencedEdit(edit,
|
|
829
|
+
this.editLog.addSequencedEdit(edit, messageEnvelope);
|
|
824
830
|
}
|
|
825
831
|
else {
|
|
826
832
|
this.editLog.addLocalEdit(edit);
|