@fluid-experimental/ot 2.74.0-370705 → 2.80.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 +8 -0
- package/dist/ot.d.ts.map +1 -1
- package/dist/ot.js.map +1 -1
- package/dist/packageVersion.d.ts +1 -1
- package/dist/packageVersion.d.ts.map +1 -1
- package/dist/packageVersion.js +1 -1
- package/dist/packageVersion.js.map +1 -1
- package/eslint.config.mts +11 -0
- package/lib/ot.d.ts.map +1 -1
- package/lib/ot.js.map +1 -1
- package/lib/packageVersion.d.ts +1 -1
- package/lib/packageVersion.d.ts.map +1 -1
- package/lib/packageVersion.js +1 -1
- package/lib/packageVersion.js.map +1 -1
- package/package.json +20 -19
- package/src/ot.ts +4 -4
- package/src/packageVersion.ts +1 -1
package/CHANGELOG.md
CHANGED
package/dist/ot.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ot.d.ts","sourceRoot":"","sources":["../src/ot.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EACN,kBAAkB,EAClB,sBAAsB,EACtB,sBAAsB,EACtB,MAAM,gDAAgD,CAAC;AACxD,OAAO,EACN,qBAAqB,EACrB,KAAK,yBAAyB,EAG9B,MAAM,8CAA8C,CAAC;AACtD,OAAO,EACN,gBAAgB,EAChB,YAAY,EAEZ,MAAM,6CAA6C,CAAC;AAQrD;;GAEG;AACH,8BAAsB,QAAQ,CAAC,MAAM,EAAE,GAAG,CAAE,SAAQ,YAAY;IAC/D;;;;OAIG;IACH,OAAO,CAAC,QAAQ,CAAC,YAAY,CAA+B;IAE5D;;;;OAIG;IACH,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAa;IAExC,sEAAsE;IACtE,OAAO,CAAC,MAAM,CAAS;IAEvB;;;OAGG;IACH,OAAO,CAAC,KAAK,CAAS;IACtB,OAAO,CAAC,UAAU,CAAS;gBAG1B,EAAE,EAAE,MAA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C,EAAE,CAAC,GAAG,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;gBACjD,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,QAAe,CAAC,CAAC;YAC1E,CAAC;QACF,CAAC;IACF,CAAC;IAED,IAAc,KAAK;QAClB,qFAAqF;QACrF,sCAAsC;QACtC,IAAI,IAAI,CAAC,UAAU,EAAE,CAAC;YACrB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC;YAEzB,KAAK,MAAM,EAAE,IAAI,IAAI,CAAC,UAAU,EAAE,CAAC;gBAClC,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;YAC7C,CAAC;YAED,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC;QACzB,CAAC;QAED,OAAO,IAAI,CAAC,KAAK,CAAC;IACnB,CAAC;IAES,cAAc;QACvB,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAC;IACpC,CAAC;CACD;AA/JD,4BA+JC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { bufferToString } from \"@fluid-internal/client-utils\";\nimport { assert } from \"@fluidframework/core-utils/internal\";\nimport {\n\tIChannelAttributes,\n\tIFluidDataStoreRuntime,\n\tIChannelStorageService,\n} from \"@fluidframework/datastore-definitions/internal\";\nimport {\n\tISummaryTreeWithStats,\n\ttype IRuntimeMessageCollection,\n\ttype IRuntimeMessagesContent,\n\ttype ISequencedMessageEnvelope,\n} from \"@fluidframework/runtime-definitions/internal\";\nimport {\n\tIFluidSerializer,\n\tSharedObject,\n\tcreateSingleBlobSummary,\n} from \"@fluidframework/shared-object-base/internal\";\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): void {\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) as TState;\n\t}\n\n\tprotected onDisconnect(): void {}\n\n\t/**\n\t * {@inheritDoc @fluidframework/shared-object-base#SharedObject.processMessagesCore}\n\t */\n\tprotected processMessagesCore(messagesCollection: IRuntimeMessageCollection): void {\n\t\tconst { envelope, local, messagesContent } = messagesCollection;\n\t\tfor (const messageContent of messagesContent) {\n\t\t\tthis.processMessage(envelope, messageContent, local);\n\t\t}\n\t}\n\n\tprivate processMessage(\n\t\tmessageEnvelope: ISequencedMessageEnvelope,\n\t\tmessagesContent: IRuntimeMessagesContent,\n\t\tlocal: boolean,\n\t): void {\n\t\t// Discard any sequenced ops that are now below the minimum sequence number.\n\t\tconst minSeq = this.deltaManager.minimumSequenceNumber;\n\t\twhile (this.sequencedOps[0]?.seq < minSeq) {\n\t\t\tthis.sequencedOps.shift();\n\t\t}\n\n\t\tlet remoteOp = messagesContent.contents;\n\t\tconst messageSeq = messageEnvelope.sequenceNumber;\n\t\tconst remoteRefSeq = messageEnvelope.referenceSequenceNumber;\n\t\tconst remoteClient = messageEnvelope.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\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(): TState {\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(): void {\n\t\tthrow new Error(\"not implemented\");\n\t}\n}\n"]}
|
package/dist/packageVersion.d.ts
CHANGED
|
@@ -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.
|
|
8
|
+
export declare const pkgVersion = "2.80.0";
|
|
9
9
|
//# sourceMappingURL=packageVersion.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"packageVersion.d.ts","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,eAAO,MAAM,OAAO,2BAA2B,CAAC;AAChD,eAAO,MAAM,UAAU,
|
|
1
|
+
{"version":3,"file":"packageVersion.d.ts","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,eAAO,MAAM,OAAO,2BAA2B,CAAC;AAChD,eAAO,MAAM,UAAU,WAAW,CAAC"}
|
package/dist/packageVersion.js
CHANGED
|
@@ -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.
|
|
11
|
+
exports.pkgVersion = "2.80.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,
|
|
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,QAAQ,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.80.0\";\n"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
/**
|
|
3
|
+
* GENERATED FILE - DO NOT EDIT DIRECTLY.
|
|
4
|
+
* To regenerate: pnpm tsx scripts/generate-flat-eslint-configs.ts --typescript
|
|
5
|
+
*/
|
|
6
|
+
import type { Linter } from "eslint";
|
|
7
|
+
import { minimalDeprecated } from "../../../../common/build/eslint-config-fluid/flat.mts";
|
|
8
|
+
|
|
9
|
+
const config: Linter.Config[] = [...minimalDeprecated];
|
|
10
|
+
|
|
11
|
+
export default config;
|
package/lib/ot.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ot.d.ts","sourceRoot":"","sources":["../src/ot.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EACN,kBAAkB,EAClB,sBAAsB,EACtB,sBAAsB,EACtB,MAAM,gDAAgD,CAAC;AACxD,OAAO,EACN,qBAAqB,EACrB,KAAK,yBAAyB,EAG9B,MAAM,8CAA8C,CAAC;AACtD,OAAO,EACN,gBAAgB,EAChB,YAAY,EAEZ,MAAM,6CAA6C,CAAC;AAQrD;;GAEG;AACH,8BAAsB,QAAQ,CAAC,MAAM,EAAE,GAAG,CAAE,SAAQ,YAAY;IAC/D;;;;OAIG;IACH,OAAO,CAAC,QAAQ,CAAC,YAAY,CAA+B;IAE5D;;;;OAIG;IACH,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAa;IAExC,sEAAsE;IACtE,OAAO,CAAC,MAAM,CAAS;IAEvB;;;OAGG;IACH,OAAO,CAAC,KAAK,CAAS;IACtB,OAAO,CAAC,UAAU,CAAS;gBAG1B,EAAE,EAAE,MAAM,EACV,OAAO,EAAE,sBAAsB,EAC/B,UAAU,EAAE,kBAAkB,EAC9B,YAAY,EAAE,MAAM;IAOrB,SAAS,CAAC,KAAK,CAAC,EAAE,EAAE,GAAG;
|
|
1
|
+
{"version":3,"file":"ot.d.ts","sourceRoot":"","sources":["../src/ot.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EACN,kBAAkB,EAClB,sBAAsB,EACtB,sBAAsB,EACtB,MAAM,gDAAgD,CAAC;AACxD,OAAO,EACN,qBAAqB,EACrB,KAAK,yBAAyB,EAG9B,MAAM,8CAA8C,CAAC;AACtD,OAAO,EACN,gBAAgB,EAChB,YAAY,EAEZ,MAAM,6CAA6C,CAAC;AA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CAAC;IACF,CAAC;IAED,IAAc,KAAK;QAClB,qFAAqF;QACrF,sCAAsC;QACtC,IAAI,IAAI,CAAC,UAAU,EAAE,CAAC;YACrB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC;YAEzB,KAAK,MAAM,EAAE,IAAI,IAAI,CAAC,UAAU,EAAE,CAAC;gBAClC,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;YAC7C,CAAC;YAED,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC;QACzB,CAAC;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 { bufferToString } from \"@fluid-internal/client-utils\";\nimport { assert } from \"@fluidframework/core-utils/internal\";\nimport {\n\tIChannelAttributes,\n\tIFluidDataStoreRuntime,\n\tIChannelStorageService,\n} from \"@fluidframework/datastore-definitions/internal\";\nimport {\n\tISummaryTreeWithStats,\n\ttype IRuntimeMessageCollection,\n\ttype IRuntimeMessagesContent,\n\ttype ISequencedMessageEnvelope,\n} from \"@fluidframework/runtime-definitions/internal\";\nimport {\n\tIFluidSerializer,\n\tSharedObject,\n\tcreateSingleBlobSummary,\n} from \"@fluidframework/shared-object-base/internal\";\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): void {\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) as TState;\n\t}\n\n\tprotected onDisconnect(): void {}\n\n\t/**\n\t * {@inheritDoc @fluidframework/shared-object-base#SharedObject.processMessagesCore}\n\t */\n\tprotected processMessagesCore(messagesCollection: IRuntimeMessageCollection): void {\n\t\tconst { envelope, local, messagesContent } = messagesCollection;\n\t\tfor (const messageContent of messagesContent) {\n\t\t\tthis.processMessage(envelope, messageContent, local);\n\t\t}\n\t}\n\n\tprivate processMessage(\n\t\tmessageEnvelope: ISequencedMessageEnvelope,\n\t\tmessagesContent: IRuntimeMessagesContent,\n\t\tlocal: boolean,\n\t): void {\n\t\t// Discard any sequenced ops that are now below the minimum sequence number.\n\t\tconst minSeq = this.deltaManager.minimumSequenceNumber;\n\t\twhile (this.sequencedOps[0]?.seq < minSeq) {\n\t\t\tthis.sequencedOps.shift();\n\t\t}\n\n\t\tlet remoteOp = messagesContent.contents;\n\t\tconst messageSeq = messageEnvelope.sequenceNumber;\n\t\tconst remoteRefSeq = messageEnvelope.referenceSequenceNumber;\n\t\tconst remoteClient = messageEnvelope.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\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(): TState {\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(): void {\n\t\tthrow new Error(\"not implemented\");\n\t}\n}\n"]}
|
package/lib/packageVersion.d.ts
CHANGED
|
@@ -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.
|
|
8
|
+
export declare const pkgVersion = "2.80.0";
|
|
9
9
|
//# sourceMappingURL=packageVersion.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"packageVersion.d.ts","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,eAAO,MAAM,OAAO,2BAA2B,CAAC;AAChD,eAAO,MAAM,UAAU,
|
|
1
|
+
{"version":3,"file":"packageVersion.d.ts","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,eAAO,MAAM,OAAO,2BAA2B,CAAC;AAChD,eAAO,MAAM,UAAU,WAAW,CAAC"}
|
package/lib/packageVersion.js
CHANGED
|
@@ -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,
|
|
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,QAAQ,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.80.0\";\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-experimental/ot",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.80.0",
|
|
4
4
|
"description": "Distributed data structure for hosting ottypes",
|
|
5
5
|
"homepage": "https://fluidframework.com",
|
|
6
6
|
"repository": {
|
|
@@ -49,37 +49,38 @@
|
|
|
49
49
|
"temp-directory": "nyc/.nyc_output"
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@fluid-internal/client-utils": "2.
|
|
53
|
-
"@fluidframework/core-interfaces": "2.
|
|
54
|
-
"@fluidframework/core-utils": "2.
|
|
55
|
-
"@fluidframework/datastore-definitions": "2.
|
|
56
|
-
"@fluidframework/driver-definitions": "2.
|
|
57
|
-
"@fluidframework/runtime-definitions": "2.
|
|
58
|
-
"@fluidframework/shared-object-base": "2.
|
|
52
|
+
"@fluid-internal/client-utils": "~2.80.0",
|
|
53
|
+
"@fluidframework/core-interfaces": "~2.80.0",
|
|
54
|
+
"@fluidframework/core-utils": "~2.80.0",
|
|
55
|
+
"@fluidframework/datastore-definitions": "~2.80.0",
|
|
56
|
+
"@fluidframework/driver-definitions": "~2.80.0",
|
|
57
|
+
"@fluidframework/runtime-definitions": "~2.80.0",
|
|
58
|
+
"@fluidframework/shared-object-base": "~2.80.0"
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
|
-
"@arethetypeswrong/cli": "^0.
|
|
61
|
+
"@arethetypeswrong/cli": "^0.18.2",
|
|
62
62
|
"@biomejs/biome": "~1.9.3",
|
|
63
|
-
"@fluid-internal/mocha-test-setup": "2.
|
|
64
|
-
"@fluid-private/test-dds-utils": "2.
|
|
65
|
-
"@fluid-tools/build-cli": "^0.
|
|
63
|
+
"@fluid-internal/mocha-test-setup": "~2.80.0",
|
|
64
|
+
"@fluid-private/test-dds-utils": "~2.80.0",
|
|
65
|
+
"@fluid-tools/build-cli": "^0.62.0",
|
|
66
66
|
"@fluidframework/build-common": "^2.0.3",
|
|
67
|
-
"@fluidframework/build-tools": "^0.
|
|
68
|
-
"@fluidframework/eslint-config-fluid": "2.
|
|
69
|
-
"@fluidframework/test-runtime-utils": "2.
|
|
67
|
+
"@fluidframework/build-tools": "^0.62.0",
|
|
68
|
+
"@fluidframework/eslint-config-fluid": "~2.80.0",
|
|
69
|
+
"@fluidframework/test-runtime-utils": "~2.80.0",
|
|
70
70
|
"@microsoft/api-extractor": "7.52.11",
|
|
71
71
|
"@types/mocha": "^10.0.10",
|
|
72
72
|
"@types/node": "^18.19.0",
|
|
73
73
|
"best-random": "^1.0.0",
|
|
74
74
|
"c8": "^10.1.3",
|
|
75
|
-
"concurrently": "^
|
|
75
|
+
"concurrently": "^9.2.1",
|
|
76
76
|
"copyfiles": "^2.4.1",
|
|
77
|
-
"cross-env": "^
|
|
78
|
-
"eslint": "~
|
|
77
|
+
"cross-env": "^10.1.0",
|
|
78
|
+
"eslint": "~9.39.1",
|
|
79
|
+
"jiti": "^2.6.1",
|
|
79
80
|
"mocha": "^10.8.2",
|
|
80
81
|
"mocha-multi-reporters": "^1.5.1",
|
|
81
82
|
"quill-delta": "^4.2.2",
|
|
82
|
-
"rimraf": "^
|
|
83
|
+
"rimraf": "^6.1.2",
|
|
83
84
|
"typescript": "~5.4.5"
|
|
84
85
|
},
|
|
85
86
|
"typeValidation": {
|
package/src/ot.ts
CHANGED
|
@@ -67,7 +67,7 @@ export abstract class SharedOT<TState, TOp> extends SharedObject {
|
|
|
67
67
|
this.global = this.local = initialValue;
|
|
68
68
|
}
|
|
69
69
|
|
|
70
|
-
protected apply(op: TOp) {
|
|
70
|
+
protected apply(op: TOp): void {
|
|
71
71
|
this.local = this.applyCore(this.state, op);
|
|
72
72
|
|
|
73
73
|
// If we are not attached, don't submit the op.
|
|
@@ -105,7 +105,7 @@ export abstract class SharedOT<TState, TOp> extends SharedObject {
|
|
|
105
105
|
this.global = this.local = this.serializer.parse(rawContent) as TState;
|
|
106
106
|
}
|
|
107
107
|
|
|
108
|
-
protected onDisconnect() {}
|
|
108
|
+
protected onDisconnect(): void {}
|
|
109
109
|
|
|
110
110
|
/**
|
|
111
111
|
* {@inheritDoc @fluidframework/shared-object-base#SharedObject.processMessagesCore}
|
|
@@ -121,7 +121,7 @@ export abstract class SharedOT<TState, TOp> extends SharedObject {
|
|
|
121
121
|
messageEnvelope: ISequencedMessageEnvelope,
|
|
122
122
|
messagesContent: IRuntimeMessagesContent,
|
|
123
123
|
local: boolean,
|
|
124
|
-
) {
|
|
124
|
+
): void {
|
|
125
125
|
// Discard any sequenced ops that are now below the minimum sequence number.
|
|
126
126
|
const minSeq = this.deltaManager.minimumSequenceNumber;
|
|
127
127
|
while (this.sequencedOps[0]?.seq < minSeq) {
|
|
@@ -171,7 +171,7 @@ export abstract class SharedOT<TState, TOp> extends SharedObject {
|
|
|
171
171
|
}
|
|
172
172
|
}
|
|
173
173
|
|
|
174
|
-
protected get state() {
|
|
174
|
+
protected get state(): TState {
|
|
175
175
|
// If the locally cached state is dirty, reset it to the global state and reapply our
|
|
176
176
|
// pending ops to bring it up to date.
|
|
177
177
|
if (this.localDirty) {
|
package/src/packageVersion.ts
CHANGED