@fluid-experimental/ot 2.0.0-internal.7.2.2 → 2.0.0-internal.7.4.0

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/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @fluid-experimental/ot
2
2
 
3
+ ## 2.0.0-internal.7.4.0
4
+
5
+ Dependency updates only.
6
+
7
+ ## 2.0.0-internal.7.3.0
8
+
9
+ Dependency updates only.
10
+
3
11
  ## 2.0.0-internal.7.2.0
4
12
 
5
13
  Dependency updates only.
package/README.md CHANGED
@@ -1 +1,75 @@
1
1
  # @fluid-experimental/ot
2
+
3
+ <!-- AUTO-GENERATED-CONTENT:START (LIBRARY_PACKAGE_README:scripts=FALSE) -->
4
+
5
+ <!-- prettier-ignore-start -->
6
+ <!-- NOTE: This section is automatically generated using @fluid-tools/markdown-magic. Do not update these generated contents directly. -->
7
+
8
+ **IMPORTANT: This package is experimental.**
9
+ **Its APIs may change without notice.**
10
+
11
+ **Do not use in production scenarios.**
12
+
13
+ ## Using Fluid Framework libraries
14
+
15
+ When taking a dependency on a Fluid Framework library, we recommend using a `^` (caret) version range, such as `^1.3.4`.
16
+ While Fluid Framework libraries may use different ranges with interdependencies between other Fluid Framework libraries,
17
+ library consumers should always prefer `^`.
18
+
19
+ Note that when depending on a library version of the form `2.0.0-internal.x.y.z`, called the Fluid internal version scheme,
20
+ you must use a `>= <` dependency range (such as `>=2.0.0-internal.x.y.z <2.0.0-internal.w.0.0` where `w` is `x+1`).
21
+ Standard `^` and `~` ranges will not work as expected.
22
+ See the [@fluid-tools/version-tools](https://github.com/microsoft/FluidFramework/blob/main/build-tools/packages/version-tools/README.md)
23
+ package for more information including tools to convert between version schemes.
24
+
25
+ ## Installation
26
+
27
+ To get started, install the package by running the following command:
28
+
29
+ ```bash
30
+ npm i @fluid-experimental/ot
31
+ ```
32
+
33
+ ## API Documentation
34
+
35
+ API documentation for **@fluid-experimental/ot** is available at <https://fluidframework.com/docs/apis/ot>.
36
+
37
+ ## Contribution Guidelines
38
+
39
+ There are many ways to [contribute](https://github.com/microsoft/FluidFramework/blob/main/CONTRIBUTING.md) to Fluid.
40
+
41
+ - Participate in Q&A in our [GitHub Discussions](https://github.com/microsoft/FluidFramework/discussions).
42
+ - [Submit bugs](https://github.com/microsoft/FluidFramework/issues) and help us verify fixes as they are checked in.
43
+ - Review the [source code changes](https://github.com/microsoft/FluidFramework/pulls).
44
+ - [Contribute bug fixes](https://github.com/microsoft/FluidFramework/blob/main/CONTRIBUTING.md).
45
+
46
+ Detailed instructions for working in the repo can be found in the [Wiki](https://github.com/microsoft/FluidFramework/wiki).
47
+
48
+ This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
49
+ For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
50
+
51
+ This project may contain Microsoft trademarks or logos for Microsoft projects, products, or services.
52
+ Use of these trademarks or logos must follow Microsoft’s [Trademark & Brand Guidelines](https://www.microsoft.com/trademarks).
53
+ Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship.
54
+
55
+ ## Help
56
+
57
+ Not finding what you're looking for in this README? Check out our [GitHub
58
+ Wiki](https://github.com/microsoft/FluidFramework/wiki) or [fluidframework.com](https://fluidframework.com/docs/).
59
+
60
+ Still not finding what you're looking for? Please [file an
61
+ issue](https://github.com/microsoft/FluidFramework/wiki/Submitting-Bugs-and-Feature-Requests).
62
+
63
+ Thank you!
64
+
65
+ ## Trademark
66
+
67
+ This project may contain Microsoft trademarks or logos for Microsoft projects, products, or services.
68
+
69
+ Use of these trademarks or logos must follow Microsoft's [Trademark & Brand Guidelines](https://www.microsoft.com/en-us/legal/intellectualproperty/trademarks/usage/general).
70
+
71
+ Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship.
72
+
73
+ <!-- prettier-ignore-end -->
74
+
75
+ <!-- AUTO-GENERATED-CONTENT:END -->
@@ -0,0 +1,13 @@
1
+ {
2
+ "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
3
+ "extends": "../../../../common/build/build-common/api-extractor-lint.json",
4
+ "messages": {
5
+ "extractorMessageReporting": {
6
+ // TODO: remove once base config has this enabled as an error
7
+ "ae-incompatible-release-tags": {
8
+ "logLevel": "error",
9
+ "addToApiReportFile": false
10
+ }
11
+ }
12
+ }
13
+ }
@@ -1,4 +1,12 @@
1
1
  {
2
2
  "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
3
- "extends": "@fluidframework/build-common/api-extractor-base.json"
3
+ "extends": "../../../../common/build/build-common/api-extractor-base.json",
4
+ // TODO: Fix violations and remove these rule overrides
5
+ "messages": {
6
+ "extractorMessageReporting": {
7
+ "ae-undocumented": {
8
+ "logLevel": "none"
9
+ }
10
+ }
11
+ }
4
12
  }
@@ -12,7 +12,7 @@ import { ISequencedDocumentMessage } from '@fluidframework/protocol-definitions'
12
12
  import { ISummaryTreeWithStats } from '@fluidframework/runtime-definitions';
13
13
  import { SharedObject } from '@fluidframework/shared-object-base';
14
14
 
15
- // @public (undocumented)
15
+ // @internal (undocumented)
16
16
  export abstract class SharedOT<TState, TOp> extends SharedObject {
17
17
  constructor(id: string, runtime: IFluidDataStoreRuntime, attributes: IChannelAttributes, initialValue: TState);
18
18
  // (undocumented)
@@ -0,0 +1,11 @@
1
+ import { IChannelAttributes } from '@fluidframework/datastore-definitions';
2
+ import { IChannelStorageService } from '@fluidframework/datastore-definitions';
3
+ import { IFluidDataStoreRuntime } from '@fluidframework/datastore-definitions';
4
+ import { IFluidSerializer } from '@fluidframework/shared-object-base';
5
+ import { ISequencedDocumentMessage } from '@fluidframework/protocol-definitions';
6
+ import { ISummaryTreeWithStats } from '@fluidframework/runtime-definitions';
7
+ import { SharedObject } from '@fluidframework/shared-object-base';
8
+
9
+ /* Excluded from this release type: SharedOT */
10
+
11
+ export { }
@@ -0,0 +1,23 @@
1
+ import { IChannelAttributes } from '@fluidframework/datastore-definitions';
2
+ import { IChannelStorageService } from '@fluidframework/datastore-definitions';
3
+ import { IFluidDataStoreRuntime } from '@fluidframework/datastore-definitions';
4
+ import { IFluidSerializer } from '@fluidframework/shared-object-base';
5
+ import { ISequencedDocumentMessage } from '@fluidframework/protocol-definitions';
6
+ import { ISummaryTreeWithStats } from '@fluidframework/runtime-definitions';
7
+ import { SharedObject } from '@fluidframework/shared-object-base';
8
+
9
+ /* Excluded from this release type: IChannelAttributes */
10
+
11
+ /* Excluded from this release type: IChannelStorageService */
12
+
13
+ /* Excluded from this release type: IFluidDataStoreRuntime */
14
+
15
+ /* Excluded from this release type: IFluidSerializer */
16
+
17
+ /* Excluded from this release type: ISummaryTreeWithStats */
18
+
19
+ /* Excluded from this release type: SharedObject */
20
+
21
+ /* Excluded from this release type: SharedOT */
22
+
23
+ export { }
@@ -0,0 +1,23 @@
1
+ import { IChannelAttributes } from '@fluidframework/datastore-definitions';
2
+ import { IChannelStorageService } from '@fluidframework/datastore-definitions';
3
+ import { IFluidDataStoreRuntime } from '@fluidframework/datastore-definitions';
4
+ import { IFluidSerializer } from '@fluidframework/shared-object-base';
5
+ import { ISequencedDocumentMessage } from '@fluidframework/protocol-definitions';
6
+ import { ISummaryTreeWithStats } from '@fluidframework/runtime-definitions';
7
+ import { SharedObject } from '@fluidframework/shared-object-base';
8
+
9
+ /* Excluded from this release type: IChannelAttributes */
10
+
11
+ /* Excluded from this release type: IChannelStorageService */
12
+
13
+ /* Excluded from this release type: IFluidDataStoreRuntime */
14
+
15
+ /* Excluded from this release type: IFluidSerializer */
16
+
17
+ /* Excluded from this release type: ISummaryTreeWithStats */
18
+
19
+ /* Excluded from this release type: SharedObject */
20
+
21
+ /* Excluded from this release type: SharedOT */
22
+
23
+ export { }
@@ -0,0 +1,51 @@
1
+ import { IChannelAttributes } from '@fluidframework/datastore-definitions';
2
+ import { IChannelStorageService } from '@fluidframework/datastore-definitions';
3
+ import { IFluidDataStoreRuntime } from '@fluidframework/datastore-definitions';
4
+ import { IFluidSerializer } from '@fluidframework/shared-object-base';
5
+ import { ISequencedDocumentMessage } from '@fluidframework/protocol-definitions';
6
+ import { ISummaryTreeWithStats } from '@fluidframework/runtime-definitions';
7
+ import { SharedObject } from '@fluidframework/shared-object-base';
8
+
9
+ /**
10
+ * @internal
11
+ */
12
+ export declare abstract class SharedOT<TState, TOp> extends SharedObject {
13
+ /**
14
+ * Queue of sequenced ops that are above minSeq. Used by 'processCore' to
15
+ * adjust incoming ops to account for prior ops that the sender didn't know about
16
+ * at the time they submitted their op.
17
+ */
18
+ private readonly sequencedOps;
19
+ /**
20
+ * Queue of local pending ops that have not yet been ACKed by the service. Used
21
+ * to lazily rebuild the "local" state cache when it is invalidated by interleaved
22
+ * remote ops.
23
+ */
24
+ private readonly pendingOps;
25
+ /** The "global" state is the result of applying all sequenced ops. */
26
+ private global;
27
+ /**
28
+ * Lazily cached result of optimistically applying pendingOps on top of the current
29
+ * "global" state.
30
+ */
31
+ private local;
32
+ private localDirty;
33
+ constructor(id: string, runtime: IFluidDataStoreRuntime, attributes: IChannelAttributes, initialValue: TState);
34
+ protected apply(op: TOp): void;
35
+ /**
36
+ * Apply the given 'op' to the provided 'state', producing a new instance of state.
37
+ */
38
+ protected abstract applyCore(state: TState, op: TOp): TState;
39
+ /**
40
+ * Transform the 'input' op to adjust for the earlier 'transform' op.
41
+ */
42
+ protected abstract transform(input: TOp, transform: TOp): TOp;
43
+ protected summarizeCore(serializer: IFluidSerializer): ISummaryTreeWithStats;
44
+ protected loadCore(storage: IChannelStorageService): Promise<void>;
45
+ protected onDisconnect(): void;
46
+ protected processCore(message: ISequencedDocumentMessage, local: boolean): void;
47
+ protected get state(): TState;
48
+ protected applyStashedOp(): void;
49
+ }
50
+
51
+ export { }
package/dist/ot.d.ts CHANGED
@@ -7,7 +7,7 @@ import { IChannelAttributes, IFluidDataStoreRuntime, IChannelStorageService } fr
7
7
  import { ISummaryTreeWithStats } from "@fluidframework/runtime-definitions";
8
8
  import { IFluidSerializer, SharedObject } from "@fluidframework/shared-object-base";
9
9
  /**
10
- * @public
10
+ * @internal
11
11
  */
12
12
  export declare abstract class SharedOT<TState, TOp> extends SharedObject {
13
13
  /**
package/dist/ot.js CHANGED
@@ -9,7 +9,7 @@ const core_utils_1 = require("@fluidframework/core-utils");
9
9
  const client_utils_1 = require("@fluid-internal/client-utils");
10
10
  const shared_object_base_1 = require("@fluidframework/shared-object-base");
11
11
  /**
12
- * @public
12
+ * @internal
13
13
  */
14
14
  class SharedOT extends shared_object_base_1.SharedObject {
15
15
  constructor(id, runtime, attributes, initialValue) {
package/dist/ot.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"ot.js","sourceRoot":"","sources":["../src/ot.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,2DAAoD;AACpD,+DAA8D;AAQ9D,2EAI4C;AAQ5C;;GAEG;AACH,MAAsB,QAAsB,SAAQ,iCAAY;IAyB/D,YACC,EAAU,EACV,OAA+B,EAC/B,UAA8B,EAC9B,YAAoB;QAEpB,KAAK,CAAC,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE,WAAW,CAAC,CAAC;QA9B7C;;;;WAIG;QACc,iBAAY,GAA4B,EAAE,CAAC;QAE5D;;;;WAIG;QACc,eAAU,GAAU,EAAE,CAAC;QAUhC,eAAU,GAAG,KAAK,CAAC;QAU1B,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,KAAK,GAAG,YAAY,CAAC;IACzC,CAAC;IAES,KAAK,CAAC,EAAO;QACtB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QAE5C,+CAA+C;QAC/C,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,EAAE;YACvB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC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C,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;aAC5C;YAED,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC;SACxB;QAED,OAAO,IAAI,CAAC,KAAK,CAAC;IACnB,CAAC;IAES,cAAc;QACvB,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAC;IACpC,CAAC;CACD;AAjJD,4BAiJC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert } from \"@fluidframework/core-utils\";\nimport { bufferToString } from \"@fluid-internal/client-utils\";\nimport { ISequencedDocumentMessage } from \"@fluidframework/protocol-definitions\";\nimport {\n\tIChannelAttributes,\n\tIFluidDataStoreRuntime,\n\tIChannelStorageService,\n} from \"@fluidframework/datastore-definitions\";\nimport { ISummaryTreeWithStats } from \"@fluidframework/runtime-definitions\";\nimport {\n\tcreateSingleBlobSummary,\n\tIFluidSerializer,\n\tSharedObject,\n} from \"@fluidframework/shared-object-base\";\n\ninterface ISequencedOpInfo<TOp> {\n\tclient: string;\n\tseq: number;\n\top: TOp;\n}\n\n/**\n * @public\n */\nexport abstract class SharedOT<TState, TOp> extends SharedObject {\n\t/**\n\t * Queue of sequenced ops that are above minSeq. Used by 'processCore' to\n\t * adjust incoming ops to account for prior ops that the sender didn't know about\n\t * at the time they submitted their op.\n\t */\n\tprivate readonly sequencedOps: ISequencedOpInfo<TOp>[] = [];\n\n\t/**\n\t * Queue of local pending ops that have not yet been ACKed by the service. Used\n\t * to lazily rebuild the \"local\" state cache when it is invalidated by interleaved\n\t * remote ops.\n\t */\n\tprivate readonly pendingOps: TOp[] = [];\n\n\t/** The \"global\" state is the result of applying all sequenced ops. */\n\tprivate global: TState;\n\n\t/**\n\t * Lazily cached result of optimistically applying pendingOps on top of the current\n\t * \"global\" state.\n\t */\n\tprivate local: TState;\n\tprivate localDirty = false;\n\n\tconstructor(\n\t\tid: string,\n\t\truntime: IFluidDataStoreRuntime,\n\t\tattributes: IChannelAttributes,\n\t\tinitialValue: TState,\n\t) {\n\t\tsuper(id, runtime, attributes, \"fluid_ot_\");\n\n\t\tthis.global = this.local = initialValue;\n\t}\n\n\tprotected apply(op: TOp) {\n\t\tthis.local = this.applyCore(this.state, op);\n\n\t\t// If we are not attached, don't submit the op.\n\t\tif (!this.isAttached()) {\n\t\t\tthis.global = this.local;\n\t\t\treturn;\n\t\t}\n\n\t\tthis.pendingOps.push(op);\n\t\tthis.submitLocalMessage(op);\n\t}\n\n\t/**\n\t * Apply the given 'op' to the provided 'state', producing a new instance of state.\n\t */\n\tprotected abstract applyCore(state: TState, op: TOp): TState;\n\n\t/**\n\t * Transform the 'input' op to adjust for the earlier 'transform' op.\n\t */\n\tprotected abstract transform(input: TOp, transform: TOp): TOp;\n\n\tprotected summarizeCore(serializer: IFluidSerializer): ISummaryTreeWithStats {\n\t\tassert(\n\t\t\tthis.pendingOps.length === 0,\n\t\t\t0x5f6 /* Summarizer must not have locally pending changes. */,\n\t\t);\n\n\t\treturn createSingleBlobSummary(\"header\", serializer.stringify(this.global, this.handle));\n\t}\n\n\tprotected async loadCore(storage: IChannelStorageService): Promise<void> {\n\t\tconst blob = await storage.readBlob(\"header\");\n\t\tconst rawContent = bufferToString(blob, \"utf8\");\n\t\tthis.global = this.local = this.serializer.parse(rawContent);\n\t}\n\n\tprotected onDisconnect() {}\n\n\tprotected processCore(message: ISequencedDocumentMessage, local: boolean) {\n\t\t// Discard any sequenced ops that are now below the minimum sequence number.\n\t\tconst minSeq = this.runtime.deltaManager.minimumSequenceNumber;\n\t\twhile (this.sequencedOps[0]?.seq < minSeq) {\n\t\t\tthis.sequencedOps.shift();\n\t\t}\n\n\t\tlet remoteOp = message.contents;\n\t\tconst messageSeq = message.sequenceNumber;\n\t\tconst remoteRefSeq = message.referenceSequenceNumber;\n\t\tconst remoteClient = message.clientId;\n\n\t\t// Adjust the incoming sequenced op to account for prior sequenced ops that the\n\t\t// sender hadn't yet seen at the time they sent the op.\n\t\tfor (const { op, seq, client } of this.sequencedOps) {\n\t\t\tif (remoteRefSeq < seq && remoteClient !== client) {\n\t\t\t\tremoteOp = this.transform(remoteOp as TOp, op);\n\t\t\t}\n\t\t}\n\n\t\t// Retain the adjusted op in order to adjust future remote ops.\n\t\t// TODO: Verify whether this should be able to handle server-generated ops (with null clientId)\n\t\tthis.sequencedOps.push({\n\t\t\tseq: messageSeq,\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion\n\t\t\tclient: remoteClient as string,\n\t\t\top: remoteOp as TOp,\n\t\t});\n\n\t\t// The incoming sequenced op is now part of the \"global\" state. Apply it to \"this.global\"\n\t\t// now.\n\t\t//\n\t\t// TODO: If the op is local, we could defer applying the remoteOp and wait and see if\n\t\t// the global state catches up with our local state.\n\t\tthis.global = this.applyCore(this.global, remoteOp as TOp);\n\n\t\tif (local) {\n\t\t\tthis.pendingOps.shift();\n\t\t} else {\n\t\t\t// Our optimistic local cache (if any) did not account for the incoming op.\n\t\t\tthis.localDirty = true;\n\n\t\t\t// Adjust our queue of locally pending ops to account for the incoming op so that they\n\t\t\t// may be reapplied to the global state if needed.\n\t\t\tfor (let i = 0; i < this.pendingOps.length; i++) {\n\t\t\t\tthis.pendingOps[i] = this.transform(this.pendingOps[i], remoteOp as TOp);\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected get state() {\n\t\t// If the locally cached state is dirty, reset it to the global state and reapply our\n\t\t// pending ops to bring it up to date.\n\t\tif (this.localDirty) {\n\t\t\tthis.local = this.global;\n\n\t\t\tfor (const op of this.pendingOps) {\n\t\t\t\tthis.local = this.applyCore(this.local, op);\n\t\t\t}\n\n\t\t\tthis.localDirty = false;\n\t\t}\n\n\t\treturn this.local;\n\t}\n\n\tprotected applyStashedOp() {\n\t\tthrow new Error(\"not implemented\");\n\t}\n}\n"]}
1
+ {"version":3,"file":"ot.js","sourceRoot":"","sources":["../src/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IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,EAAE,QAAe,CAAC,CAAC;QAE3D,IAAI,KAAK,EAAE;YACV,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE,CAAC;SACxB;aAAM;YACN,2EAA2E;YAC3E,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;YAEvB,sFAAsF;YACtF,kDAAkD;YAClD,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;gBAChD,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,QAAe,CAAC,CAAC;aACzE;SACD;IACF,CAAC;IAED,IAAc,KAAK;QAClB,qFAAqF;QACrF,sCAAsC;QACtC,IAAI,IAAI,CAAC,UAAU,EAAE;YACpB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC;YAEzB,KAAK,MAAM,EAAE,IAAI,IAAI,CAAC,UAAU,EAAE;gBACjC,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;aAC5C;YAED,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC;SACxB;QAED,OAAO,IAAI,CAAC,KAAK,CAAC;IACnB,CAAC;IAES,cAAc;QACvB,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAC;IACpC,CAAC;CACD;AAjJD,4BAiJC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert } from \"@fluidframework/core-utils\";\nimport { bufferToString } from \"@fluid-internal/client-utils\";\nimport { ISequencedDocumentMessage } from \"@fluidframework/protocol-definitions\";\nimport {\n\tIChannelAttributes,\n\tIFluidDataStoreRuntime,\n\tIChannelStorageService,\n} from \"@fluidframework/datastore-definitions\";\nimport { ISummaryTreeWithStats } from \"@fluidframework/runtime-definitions\";\nimport {\n\tcreateSingleBlobSummary,\n\tIFluidSerializer,\n\tSharedObject,\n} from \"@fluidframework/shared-object-base\";\n\ninterface ISequencedOpInfo<TOp> {\n\tclient: string;\n\tseq: number;\n\top: TOp;\n}\n\n/**\n * @internal\n */\nexport abstract class SharedOT<TState, TOp> extends SharedObject {\n\t/**\n\t * Queue of sequenced ops that are above minSeq. Used by 'processCore' to\n\t * adjust incoming ops to account for prior ops that the sender didn't know about\n\t * at the time they submitted their op.\n\t */\n\tprivate readonly sequencedOps: ISequencedOpInfo<TOp>[] = [];\n\n\t/**\n\t * Queue of local pending ops that have not yet been ACKed by the service. Used\n\t * to lazily rebuild the \"local\" state cache when it is invalidated by interleaved\n\t * remote ops.\n\t */\n\tprivate readonly pendingOps: TOp[] = [];\n\n\t/** The \"global\" state is the result of applying all sequenced ops. */\n\tprivate global: TState;\n\n\t/**\n\t * Lazily cached result of optimistically applying pendingOps on top of the current\n\t * \"global\" state.\n\t */\n\tprivate local: TState;\n\tprivate localDirty = false;\n\n\tconstructor(\n\t\tid: string,\n\t\truntime: IFluidDataStoreRuntime,\n\t\tattributes: IChannelAttributes,\n\t\tinitialValue: TState,\n\t) {\n\t\tsuper(id, runtime, attributes, \"fluid_ot_\");\n\n\t\tthis.global = this.local = initialValue;\n\t}\n\n\tprotected apply(op: TOp) {\n\t\tthis.local = this.applyCore(this.state, op);\n\n\t\t// If we are not attached, don't submit the op.\n\t\tif (!this.isAttached()) {\n\t\t\tthis.global = this.local;\n\t\t\treturn;\n\t\t}\n\n\t\tthis.pendingOps.push(op);\n\t\tthis.submitLocalMessage(op);\n\t}\n\n\t/**\n\t * Apply the given 'op' to the provided 'state', producing a new instance of state.\n\t */\n\tprotected abstract applyCore(state: TState, op: TOp): TState;\n\n\t/**\n\t * Transform the 'input' op to adjust for the earlier 'transform' op.\n\t */\n\tprotected abstract transform(input: TOp, transform: TOp): TOp;\n\n\tprotected summarizeCore(serializer: IFluidSerializer): ISummaryTreeWithStats {\n\t\tassert(\n\t\t\tthis.pendingOps.length === 0,\n\t\t\t0x5f6 /* Summarizer must not have locally pending changes. */,\n\t\t);\n\n\t\treturn createSingleBlobSummary(\"header\", serializer.stringify(this.global, this.handle));\n\t}\n\n\tprotected async loadCore(storage: IChannelStorageService): Promise<void> {\n\t\tconst blob = await storage.readBlob(\"header\");\n\t\tconst rawContent = bufferToString(blob, \"utf8\");\n\t\tthis.global = this.local = this.serializer.parse(rawContent);\n\t}\n\n\tprotected onDisconnect() {}\n\n\tprotected processCore(message: ISequencedDocumentMessage, local: boolean) {\n\t\t// Discard any sequenced ops that are now below the minimum sequence number.\n\t\tconst minSeq = this.runtime.deltaManager.minimumSequenceNumber;\n\t\twhile (this.sequencedOps[0]?.seq < minSeq) {\n\t\t\tthis.sequencedOps.shift();\n\t\t}\n\n\t\tlet remoteOp = message.contents;\n\t\tconst messageSeq = message.sequenceNumber;\n\t\tconst remoteRefSeq = message.referenceSequenceNumber;\n\t\tconst remoteClient = message.clientId;\n\n\t\t// Adjust the incoming sequenced op to account for prior sequenced ops that the\n\t\t// sender hadn't yet seen at the time they sent the op.\n\t\tfor (const { op, seq, client } of this.sequencedOps) {\n\t\t\tif (remoteRefSeq < seq && remoteClient !== client) {\n\t\t\t\tremoteOp = this.transform(remoteOp as TOp, op);\n\t\t\t}\n\t\t}\n\n\t\t// Retain the adjusted op in order to adjust future remote ops.\n\t\t// TODO: Verify whether this should be able to handle server-generated ops (with null clientId)\n\t\tthis.sequencedOps.push({\n\t\t\tseq: messageSeq,\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion\n\t\t\tclient: remoteClient as string,\n\t\t\top: remoteOp as TOp,\n\t\t});\n\n\t\t// The incoming sequenced op is now part of the \"global\" state. Apply it to \"this.global\"\n\t\t// now.\n\t\t//\n\t\t// TODO: If the op is local, we could defer applying the remoteOp and wait and see if\n\t\t// the global state catches up with our local state.\n\t\tthis.global = this.applyCore(this.global, remoteOp as TOp);\n\n\t\tif (local) {\n\t\t\tthis.pendingOps.shift();\n\t\t} else {\n\t\t\t// Our optimistic local cache (if any) did not account for the incoming op.\n\t\t\tthis.localDirty = true;\n\n\t\t\t// Adjust our queue of locally pending ops to account for the incoming op so that they\n\t\t\t// may be reapplied to the global state if needed.\n\t\t\tfor (let i = 0; i < this.pendingOps.length; i++) {\n\t\t\t\tthis.pendingOps[i] = this.transform(this.pendingOps[i], remoteOp as TOp);\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected get state() {\n\t\t// If the locally cached state is dirty, reset it to the global state and reapply our\n\t\t// pending ops to bring it up to date.\n\t\tif (this.localDirty) {\n\t\t\tthis.local = this.global;\n\n\t\t\tfor (const op of this.pendingOps) {\n\t\t\t\tthis.local = this.applyCore(this.local, op);\n\t\t\t}\n\n\t\t\tthis.localDirty = false;\n\t\t}\n\n\t\treturn this.local;\n\t}\n\n\tprotected applyStashedOp() {\n\t\tthrow new Error(\"not implemented\");\n\t}\n}\n"]}
@@ -5,5 +5,5 @@
5
5
  * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY
6
6
  */
7
7
  export declare const pkgName = "@fluid-experimental/ot";
8
- export declare const pkgVersion = "2.0.0-internal.7.2.2";
8
+ export declare const pkgVersion = "2.0.0-internal.7.4.0";
9
9
  //# sourceMappingURL=packageVersion.d.ts.map
@@ -8,5 +8,5 @@
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
9
  exports.pkgVersion = exports.pkgName = void 0;
10
10
  exports.pkgName = "@fluid-experimental/ot";
11
- exports.pkgVersion = "2.0.0-internal.7.2.2";
11
+ exports.pkgVersion = "2.0.0-internal.7.4.0";
12
12
  //# sourceMappingURL=packageVersion.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEU,QAAA,OAAO,GAAG,wBAAwB,CAAC;AACnC,QAAA,UAAU,GAAG,sBAAsB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n *\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY\n */\n\nexport const pkgName = \"@fluid-experimental/ot\";\nexport const pkgVersion = \"2.0.0-internal.7.2.2\";\n"]}
1
+ {"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEU,QAAA,OAAO,GAAG,wBAAwB,CAAC;AACnC,QAAA,UAAU,GAAG,sBAAsB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n *\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY\n */\n\nexport const pkgName = \"@fluid-experimental/ot\";\nexport const pkgVersion = \"2.0.0-internal.7.4.0\";\n"]}
@@ -5,7 +5,7 @@
5
5
  "toolPackages": [
6
6
  {
7
7
  "packageName": "@microsoft/api-extractor",
8
- "packageVersion": "7.38.0"
8
+ "packageVersion": "7.38.3"
9
9
  }
10
10
  ]
11
11
  }
package/lib/ot.d.ts CHANGED
@@ -7,7 +7,7 @@ import { IChannelAttributes, IFluidDataStoreRuntime, IChannelStorageService } fr
7
7
  import { ISummaryTreeWithStats } from "@fluidframework/runtime-definitions";
8
8
  import { IFluidSerializer, SharedObject } from "@fluidframework/shared-object-base";
9
9
  /**
10
- * @public
10
+ * @internal
11
11
  */
12
12
  export declare abstract class SharedOT<TState, TOp> extends SharedObject {
13
13
  /**
package/lib/ot.js CHANGED
@@ -6,7 +6,7 @@ import { assert } from "@fluidframework/core-utils";
6
6
  import { bufferToString } from "@fluid-internal/client-utils";
7
7
  import { createSingleBlobSummary, SharedObject, } from "@fluidframework/shared-object-base";
8
8
  /**
9
- * @public
9
+ * @internal
10
10
  */
11
11
  export class SharedOT extends SharedObject {
12
12
  constructor(id, runtime, attributes, initialValue) {
package/lib/ot.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"ot.js","sourceRoot":"","sources":["../src/ot.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAQ9D,OAAO,EACN,uBAAuB,EAEvB,YAAY,GACZ,MAAM,oCAAoC,CAAC;AAQ5C;;GAEG;AACH,MAAM,OAAgB,QAAsB,SAAQ,YAAY;IAyB/D,YACC,EAAU,EACV,OAA+B,EAC/B,UAA8B,EAC9B,YAAoB;QAEpB,KAAK,CAAC,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE,WAAW,CAAC,CAAC;QA9B7C;;;;WAIG;QACc,iBAAY,GAA4B,EAAE,CAAC;QAE5D;;;;WAIG;QACc,eAAU,GAAU,EAAE,CAAC;QAUhC,eAAU,GAAG,KAAK,CAAC;QAU1B,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,KAAK,GAAG,YAAY,CAAC;IACzC,CAAC;IAES,KAAK,CAAC,EAAO;QACtB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QAE5C,+CAA+C;QAC/C,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,EAAE;YACvB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC;YACzB,OAAO;SACP;QAED,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACzB,IAAI,CAAC,kBAAkB,CAAC,EAAE,CAAC,CAAC;IAC7B,CAAC;IAYS,aAAa,CAAC,UAA4B;QACnD,MAAM,CACL,IAAI,CAAC,UAAU,CAAC,MAAM,KAAK,CAAC,EAC5B,KAAK,CAAC,uDAAuD,CAC7D,CAAC;Q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soft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert } from \"@fluidframework/core-utils\";\nimport { bufferToString } from \"@fluid-internal/client-utils\";\nimport { ISequencedDocumentMessage } from \"@fluidframework/protocol-definitions\";\nimport {\n\tIChannelAttributes,\n\tIFluidDataStoreRuntime,\n\tIChannelStorageService,\n} from \"@fluidframework/datastore-definitions\";\nimport { ISummaryTreeWithStats } from \"@fluidframework/runtime-definitions\";\nimport {\n\tcreateSingleBlobSummary,\n\tIFluidSerializer,\n\tSharedObject,\n} from \"@fluidframework/shared-object-base\";\n\ninterface ISequencedOpInfo<TOp> {\n\tclient: string;\n\tseq: number;\n\top: TOp;\n}\n\n/**\n * @public\n */\nexport abstract class SharedOT<TState, TOp> extends SharedObject {\n\t/**\n\t * Queue of sequenced ops that are above minSeq. Used by 'processCore' to\n\t * adjust incoming ops to account for prior ops that the sender didn't know about\n\t * at the time they submitted their op.\n\t */\n\tprivate readonly sequencedOps: ISequencedOpInfo<TOp>[] = [];\n\n\t/**\n\t * Queue of local pending ops that have not yet been ACKed by the service. Used\n\t * to lazily rebuild the \"local\" state cache when it is invalidated by interleaved\n\t * remote ops.\n\t */\n\tprivate readonly pendingOps: TOp[] = [];\n\n\t/** The \"global\" state is the result of applying all sequenced ops. */\n\tprivate global: TState;\n\n\t/**\n\t * Lazily cached result of optimistically applying pendingOps on top of the current\n\t * \"global\" state.\n\t */\n\tprivate local: TState;\n\tprivate localDirty = false;\n\n\tconstructor(\n\t\tid: string,\n\t\truntime: IFluidDataStoreRuntime,\n\t\tattributes: IChannelAttributes,\n\t\tinitialValue: TState,\n\t) {\n\t\tsuper(id, runtime, attributes, \"fluid_ot_\");\n\n\t\tthis.global = this.local = initialValue;\n\t}\n\n\tprotected apply(op: TOp) {\n\t\tthis.local = this.applyCore(this.state, op);\n\n\t\t// If we are not attached, don't submit the op.\n\t\tif (!this.isAttached()) {\n\t\t\tthis.global = this.local;\n\t\t\treturn;\n\t\t}\n\n\t\tthis.pendingOps.push(op);\n\t\tthis.submitLocalMessage(op);\n\t}\n\n\t/**\n\t * Apply the given 'op' to the provided 'state', producing a new instance of state.\n\t */\n\tprotected abstract applyCore(state: TState, op: TOp): TState;\n\n\t/**\n\t * Transform the 'input' op to adjust for the earlier 'transform' op.\n\t */\n\tprotected abstract transform(input: TOp, transform: TOp): TOp;\n\n\tprotected summarizeCore(serializer: IFluidSerializer): ISummaryTreeWithStats {\n\t\tassert(\n\t\t\tthis.pendingOps.length === 0,\n\t\t\t0x5f6 /* Summarizer must not have locally pending changes. */,\n\t\t);\n\n\t\treturn createSingleBlobSummary(\"header\", serializer.stringify(this.global, this.handle));\n\t}\n\n\tprotected async loadCore(storage: IChannelStorageService): Promise<void> {\n\t\tconst blob = await storage.readBlob(\"header\");\n\t\tconst rawContent = bufferToString(blob, \"utf8\");\n\t\tthis.global = this.local = this.serializer.parse(rawContent);\n\t}\n\n\tprotected onDisconnect() {}\n\n\tprotected processCore(message: ISequencedDocumentMessage, local: boolean) {\n\t\t// Discard any sequenced ops that are now below the minimum sequence number.\n\t\tconst minSeq = this.runtime.deltaManager.minimumSequenceNumber;\n\t\twhile (this.sequencedOps[0]?.seq < minSeq) {\n\t\t\tthis.sequencedOps.shift();\n\t\t}\n\n\t\tlet remoteOp = message.contents;\n\t\tconst messageSeq = message.sequenceNumber;\n\t\tconst remoteRefSeq = message.referenceSequenceNumber;\n\t\tconst remoteClient = message.clientId;\n\n\t\t// Adjust the incoming sequenced op to account for prior sequenced ops that the\n\t\t// sender hadn't yet seen at the time they sent the op.\n\t\tfor (const { op, seq, client } of this.sequencedOps) {\n\t\t\tif (remoteRefSeq < seq && remoteClient !== client) {\n\t\t\t\tremoteOp = this.transform(remoteOp as TOp, op);\n\t\t\t}\n\t\t}\n\n\t\t// Retain the adjusted op in order to adjust future remote ops.\n\t\t// TODO: Verify whether this should be able to handle server-generated ops (with null clientId)\n\t\tthis.sequencedOps.push({\n\t\t\tseq: messageSeq,\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion\n\t\t\tclient: remoteClient as string,\n\t\t\top: remoteOp as TOp,\n\t\t});\n\n\t\t// The incoming sequenced op is now part of the \"global\" state. Apply it to \"this.global\"\n\t\t// now.\n\t\t//\n\t\t// TODO: If the op is local, we could defer applying the remoteOp and wait and see if\n\t\t// the global state catches up with our local state.\n\t\tthis.global = this.applyCore(this.global, remoteOp as TOp);\n\n\t\tif (local) {\n\t\t\tthis.pendingOps.shift();\n\t\t} else {\n\t\t\t// Our optimistic local cache (if any) did not account for the incoming op.\n\t\t\tthis.localDirty = true;\n\n\t\t\t// Adjust our queue of locally pending ops to account for the incoming op so that they\n\t\t\t// may be reapplied to the global state if needed.\n\t\t\tfor (let i = 0; i < this.pendingOps.length; i++) {\n\t\t\t\tthis.pendingOps[i] = this.transform(this.pendingOps[i], remoteOp as TOp);\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected get state() {\n\t\t// If the locally cached state is dirty, reset it to the global state and reapply our\n\t\t// pending ops to bring it up to date.\n\t\tif (this.localDirty) {\n\t\t\tthis.local = this.global;\n\n\t\t\tfor (const op of this.pendingOps) {\n\t\t\t\tthis.local = this.applyCore(this.local, op);\n\t\t\t}\n\n\t\t\tthis.localDirty = false;\n\t\t}\n\n\t\treturn this.local;\n\t}\n\n\tprotected applyStashedOp() {\n\t\tthrow new Error(\"not implemented\");\n\t}\n}\n"]}
1
+ {"version":3,"file":"ot.js","sourceRoot":"","sources":["../src/ot.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAQ9D,OAAO,EACN,uBAAuB,EAEvB,YAAY,GACZ,MAAM,oCAAoC,CAAC;AAQ5C;;GAEG;AACH,MAAM,OAAgB,QAAsB,SAAQ,YAAY;IAyB/D,YACC,EAAU,EACV,OAA+B,EAC/B,UAA8B,EAC9B,YAAo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vB,sFAAsF;YACtF,kDAAkD;YAClD,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;gBAChD,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,QAAe,CAAC,CAAC;aACzE;SACD;IACF,CAAC;IAED,IAAc,KAAK;QAClB,qFAAqF;QACrF,sCAAsC;QACtC,IAAI,IAAI,CAAC,UAAU,EAAE;YACpB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC;YAEzB,KAAK,MAAM,EAAE,IAAI,IAAI,CAAC,UAAU,EAAE;gBACjC,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;aAC5C;YAED,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC;SACxB;QAED,OAAO,IAAI,CAAC,KAAK,CAAC;IACnB,CAAC;IAES,cAAc;QACvB,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAC;IACpC,CAAC;CACD","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert } from \"@fluidframework/core-utils\";\nimport { bufferToString } from \"@fluid-internal/client-utils\";\nimport { ISequencedDocumentMessage } from \"@fluidframework/protocol-definitions\";\nimport {\n\tIChannelAttributes,\n\tIFluidDataStoreRuntime,\n\tIChannelStorageService,\n} from \"@fluidframework/datastore-definitions\";\nimport { ISummaryTreeWithStats } from \"@fluidframework/runtime-definitions\";\nimport {\n\tcreateSingleBlobSummary,\n\tIFluidSerializer,\n\tSharedObject,\n} from \"@fluidframework/shared-object-base\";\n\ninterface ISequencedOpInfo<TOp> {\n\tclient: string;\n\tseq: number;\n\top: TOp;\n}\n\n/**\n * @internal\n */\nexport abstract class SharedOT<TState, TOp> extends SharedObject {\n\t/**\n\t * Queue of sequenced ops that are above minSeq. Used by 'processCore' to\n\t * adjust incoming ops to account for prior ops that the sender didn't know about\n\t * at the time they submitted their op.\n\t */\n\tprivate readonly sequencedOps: ISequencedOpInfo<TOp>[] = [];\n\n\t/**\n\t * Queue of local pending ops that have not yet been ACKed by the service. Used\n\t * to lazily rebuild the \"local\" state cache when it is invalidated by interleaved\n\t * remote ops.\n\t */\n\tprivate readonly pendingOps: TOp[] = [];\n\n\t/** The \"global\" state is the result of applying all sequenced ops. */\n\tprivate global: TState;\n\n\t/**\n\t * Lazily cached result of optimistically applying pendingOps on top of the current\n\t * \"global\" state.\n\t */\n\tprivate local: TState;\n\tprivate localDirty = false;\n\n\tconstructor(\n\t\tid: string,\n\t\truntime: IFluidDataStoreRuntime,\n\t\tattributes: IChannelAttributes,\n\t\tinitialValue: TState,\n\t) {\n\t\tsuper(id, runtime, attributes, \"fluid_ot_\");\n\n\t\tthis.global = this.local = initialValue;\n\t}\n\n\tprotected apply(op: TOp) {\n\t\tthis.local = this.applyCore(this.state, op);\n\n\t\t// If we are not attached, don't submit the op.\n\t\tif (!this.isAttached()) {\n\t\t\tthis.global = this.local;\n\t\t\treturn;\n\t\t}\n\n\t\tthis.pendingOps.push(op);\n\t\tthis.submitLocalMessage(op);\n\t}\n\n\t/**\n\t * Apply the given 'op' to the provided 'state', producing a new instance of state.\n\t */\n\tprotected abstract applyCore(state: TState, op: TOp): TState;\n\n\t/**\n\t * Transform the 'input' op to adjust for the earlier 'transform' op.\n\t */\n\tprotected abstract transform(input: TOp, transform: TOp): TOp;\n\n\tprotected summarizeCore(serializer: IFluidSerializer): ISummaryTreeWithStats {\n\t\tassert(\n\t\t\tthis.pendingOps.length === 0,\n\t\t\t0x5f6 /* Summarizer must not have locally pending changes. */,\n\t\t);\n\n\t\treturn createSingleBlobSummary(\"header\", serializer.stringify(this.global, this.handle));\n\t}\n\n\tprotected async loadCore(storage: IChannelStorageService): Promise<void> {\n\t\tconst blob = await storage.readBlob(\"header\");\n\t\tconst rawContent = bufferToString(blob, \"utf8\");\n\t\tthis.global = this.local = this.serializer.parse(rawContent);\n\t}\n\n\tprotected onDisconnect() {}\n\n\tprotected processCore(message: ISequencedDocumentMessage, local: boolean) {\n\t\t// Discard any sequenced ops that are now below the minimum sequence number.\n\t\tconst minSeq = this.runtime.deltaManager.minimumSequenceNumber;\n\t\twhile (this.sequencedOps[0]?.seq < minSeq) {\n\t\t\tthis.sequencedOps.shift();\n\t\t}\n\n\t\tlet remoteOp = message.contents;\n\t\tconst messageSeq = message.sequenceNumber;\n\t\tconst remoteRefSeq = message.referenceSequenceNumber;\n\t\tconst remoteClient = message.clientId;\n\n\t\t// Adjust the incoming sequenced op to account for prior sequenced ops that the\n\t\t// sender hadn't yet seen at the time they sent the op.\n\t\tfor (const { op, seq, client } of this.sequencedOps) {\n\t\t\tif (remoteRefSeq < seq && remoteClient !== client) {\n\t\t\t\tremoteOp = this.transform(remoteOp as TOp, op);\n\t\t\t}\n\t\t}\n\n\t\t// Retain the adjusted op in order to adjust future remote ops.\n\t\t// TODO: Verify whether this should be able to handle server-generated ops (with null clientId)\n\t\tthis.sequencedOps.push({\n\t\t\tseq: messageSeq,\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion\n\t\t\tclient: remoteClient as string,\n\t\t\top: remoteOp as TOp,\n\t\t});\n\n\t\t// The incoming sequenced op is now part of the \"global\" state. Apply it to \"this.global\"\n\t\t// now.\n\t\t//\n\t\t// TODO: If the op is local, we could defer applying the remoteOp and wait and see if\n\t\t// the global state catches up with our local state.\n\t\tthis.global = this.applyCore(this.global, remoteOp as TOp);\n\n\t\tif (local) {\n\t\t\tthis.pendingOps.shift();\n\t\t} else {\n\t\t\t// Our optimistic local cache (if any) did not account for the incoming op.\n\t\t\tthis.localDirty = true;\n\n\t\t\t// Adjust our queue of locally pending ops to account for the incoming op so that they\n\t\t\t// may be reapplied to the global state if needed.\n\t\t\tfor (let i = 0; i < this.pendingOps.length; i++) {\n\t\t\t\tthis.pendingOps[i] = this.transform(this.pendingOps[i], remoteOp as TOp);\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected get state() {\n\t\t// If the locally cached state is dirty, reset it to the global state and reapply our\n\t\t// pending ops to bring it up to date.\n\t\tif (this.localDirty) {\n\t\t\tthis.local = this.global;\n\n\t\t\tfor (const op of this.pendingOps) {\n\t\t\t\tthis.local = this.applyCore(this.local, op);\n\t\t\t}\n\n\t\t\tthis.localDirty = false;\n\t\t}\n\n\t\treturn this.local;\n\t}\n\n\tprotected applyStashedOp() {\n\t\tthrow new Error(\"not implemented\");\n\t}\n}\n"]}
@@ -5,5 +5,5 @@
5
5
  * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY
6
6
  */
7
7
  export declare const pkgName = "@fluid-experimental/ot";
8
- export declare const pkgVersion = "2.0.0-internal.7.2.2";
8
+ export declare const pkgVersion = "2.0.0-internal.7.4.0";
9
9
  //# sourceMappingURL=packageVersion.d.ts.map
@@ -5,5 +5,5 @@
5
5
  * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY
6
6
  */
7
7
  export const pkgName = "@fluid-experimental/ot";
8
- export const pkgVersion = "2.0.0-internal.7.2.2";
8
+ export const pkgVersion = "2.0.0-internal.7.4.0";
9
9
  //# sourceMappingURL=packageVersion.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,CAAC,MAAM,OAAO,GAAG,wBAAwB,CAAC;AAChD,MAAM,CAAC,MAAM,UAAU,GAAG,sBAAsB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n *\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY\n */\n\nexport const pkgName = \"@fluid-experimental/ot\";\nexport const pkgVersion = \"2.0.0-internal.7.2.2\";\n"]}
1
+ {"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,CAAC,MAAM,OAAO,GAAG,wBAAwB,CAAC;AAChD,MAAM,CAAC,MAAM,UAAU,GAAG,sBAAsB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n *\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY\n */\n\nexport const pkgName = \"@fluid-experimental/ot\";\nexport const pkgVersion = \"2.0.0-internal.7.4.0\";\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluid-experimental/ot",
3
- "version": "2.0.0-internal.7.2.2",
3
+ "version": "2.0.0-internal.7.4.0",
4
4
  "description": "Distributed data structure for hosting ottypes",
5
5
  "homepage": "https://fluidframework.com",
6
6
  "repository": {
@@ -35,24 +35,24 @@
35
35
  "temp-directory": "nyc/.nyc_output"
36
36
  },
37
37
  "dependencies": {
38
- "@fluid-internal/client-utils": ">=2.0.0-internal.7.2.2 <2.0.0-internal.7.3.0",
39
- "@fluidframework/core-interfaces": ">=2.0.0-internal.7.2.2 <2.0.0-internal.7.3.0",
40
- "@fluidframework/core-utils": ">=2.0.0-internal.7.2.2 <2.0.0-internal.7.3.0",
41
- "@fluidframework/datastore-definitions": ">=2.0.0-internal.7.2.2 <2.0.0-internal.7.3.0",
38
+ "@fluid-internal/client-utils": ">=2.0.0-internal.7.4.0 <2.0.0-internal.7.5.0",
39
+ "@fluidframework/core-interfaces": ">=2.0.0-internal.7.4.0 <2.0.0-internal.7.5.0",
40
+ "@fluidframework/core-utils": ">=2.0.0-internal.7.4.0 <2.0.0-internal.7.5.0",
41
+ "@fluidframework/datastore-definitions": ">=2.0.0-internal.7.4.0 <2.0.0-internal.7.5.0",
42
42
  "@fluidframework/protocol-definitions": "^3.0.0",
43
- "@fluidframework/runtime-definitions": ">=2.0.0-internal.7.2.2 <2.0.0-internal.7.3.0",
44
- "@fluidframework/shared-object-base": ">=2.0.0-internal.7.2.2 <2.0.0-internal.7.3.0"
43
+ "@fluidframework/runtime-definitions": ">=2.0.0-internal.7.4.0 <2.0.0-internal.7.5.0",
44
+ "@fluidframework/shared-object-base": ">=2.0.0-internal.7.4.0 <2.0.0-internal.7.5.0"
45
45
  },
46
46
  "devDependencies": {
47
- "@fluid-internal/test-dds-utils": ">=2.0.0-internal.7.2.2 <2.0.0-internal.7.3.0",
47
+ "@fluid-private/test-dds-utils": ">=2.0.0-internal.7.4.0 <2.0.0-internal.7.5.0",
48
48
  "@fluidframework/build-common": "^2.0.3",
49
- "@fluidframework/build-tools": "^0.26.1",
50
- "@fluidframework/eslint-config-fluid": "^3.0.0",
51
- "@fluidframework/mocha-test-setup": ">=2.0.0-internal.7.2.2 <2.0.0-internal.7.3.0",
52
- "@fluidframework/test-runtime-utils": ">=2.0.0-internal.7.2.2 <2.0.0-internal.7.3.0",
53
- "@microsoft/api-extractor": "^7.37.0",
49
+ "@fluidframework/build-tools": "^0.28.0",
50
+ "@fluidframework/eslint-config-fluid": "^3.1.0",
51
+ "@fluidframework/mocha-test-setup": ">=2.0.0-internal.7.4.0 <2.0.0-internal.7.5.0",
52
+ "@fluidframework/test-runtime-utils": ">=2.0.0-internal.7.4.0 <2.0.0-internal.7.5.0",
53
+ "@microsoft/api-extractor": "^7.38.3",
54
54
  "@types/mocha": "^9.1.1",
55
- "@types/node": "^16.18.38",
55
+ "@types/node": "^18.19.0",
56
56
  "best-random": "^1.0.0",
57
57
  "c8": "^7.7.1",
58
58
  "cross-env": "^7.0.3",
@@ -78,15 +78,16 @@
78
78
  "build:esnext": "tsc --project ./tsconfig.esnext.json",
79
79
  "build:genver": "gen-version",
80
80
  "build:test": "tsc --project ./src/test/tsconfig.json",
81
+ "check:release-tags": "api-extractor run --local --config ./api-extractor-lint.json",
81
82
  "ci:build:docs": "api-extractor run",
82
- "clean": "rimraf --glob dist lib \"*.tsbuildinfo\" \"*.build.log\" _api-extractor-temp nyc",
83
+ "clean": "rimraf --glob dist lib \"**/*.tsbuildinfo\" \"**/*.build.log\" _api-extractor-temp nyc",
83
84
  "eslint": "eslint --format stylish src",
84
85
  "eslint:fix": "eslint --format stylish src --fix --fix-type problem,suggestion,layout",
85
86
  "format": "npm run prettier:fix",
86
- "lint": "npm run prettier && npm run eslint",
87
+ "lint": "npm run prettier && npm run check:release-tags && npm run eslint",
87
88
  "lint:fix": "npm run prettier:fix && npm run eslint:fix",
88
- "prettier": "prettier --check . --ignore-path ../../../../.prettierignore",
89
- "prettier:fix": "prettier --write . --ignore-path ../../../../.prettierignore",
89
+ "prettier": "prettier --check . --cache --ignore-path ../../../../.prettierignore",
90
+ "prettier:fix": "prettier --write . --cache --ignore-path ../../../../.prettierignore",
90
91
  "test": "npm run test:mocha",
91
92
  "test:coverage": "c8 npm test",
92
93
  "test:mocha": "mocha --recursive dist/test -r node_modules/@fluidframework/mocha-test-setup",
package/src/ot.ts CHANGED
@@ -25,7 +25,7 @@ interface ISequencedOpInfo<TOp> {
25
25
  }
26
26
 
27
27
  /**
28
- * @public
28
+ * @internal
29
29
  */
30
30
  export abstract class SharedOT<TState, TOp> extends SharedObject {
31
31
  /**
@@ -6,4 +6,4 @@
6
6
  */
7
7
 
8
8
  export const pkgName = "@fluid-experimental/ot";
9
- export const pkgVersion = "2.0.0-internal.7.2.2";
9
+ export const pkgVersion = "2.0.0-internal.7.4.0";