@fluid-experimental/tree 2.80.0 → 2.81.0-374083
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/assertTagging.config.mjs +14 -0
- package/dist/migration-shim/migrationDeltaHandler.d.ts +2 -2
- package/dist/migration-shim/migrationDeltaHandler.d.ts.map +1 -1
- package/dist/migration-shim/migrationDeltaHandler.js.map +1 -1
- package/dist/migration-shim/migrationShim.d.ts +5 -5
- package/dist/migration-shim/migrationShim.d.ts.map +1 -1
- package/dist/migration-shim/migrationShim.js +1 -0
- package/dist/migration-shim/migrationShim.js.map +1 -1
- package/dist/migration-shim/migrationShimFactory.d.ts +3 -3
- package/dist/migration-shim/migrationShimFactory.d.ts.map +1 -1
- package/dist/migration-shim/migrationShimFactory.js.map +1 -1
- package/dist/migration-shim/sharedTreeDeltaHandler.d.ts +2 -2
- package/dist/migration-shim/sharedTreeDeltaHandler.d.ts.map +1 -1
- package/dist/migration-shim/sharedTreeDeltaHandler.js.map +1 -1
- package/dist/migration-shim/sharedTreeShim.d.ts +5 -5
- package/dist/migration-shim/sharedTreeShim.d.ts.map +1 -1
- package/dist/migration-shim/sharedTreeShim.js.map +1 -1
- package/dist/migration-shim/sharedTreeShimFactory.d.ts +1 -1
- package/dist/migration-shim/sharedTreeShimFactory.d.ts.map +1 -1
- package/dist/migration-shim/sharedTreeShimFactory.js.map +1 -1
- package/dist/migration-shim/shimChannelServices.d.ts +1 -1
- package/dist/migration-shim/shimChannelServices.d.ts.map +1 -1
- package/dist/migration-shim/shimChannelServices.js.map +1 -1
- package/dist/migration-shim/shimDeltaConnection.d.ts +2 -2
- package/dist/migration-shim/shimDeltaConnection.d.ts.map +1 -1
- package/dist/migration-shim/shimDeltaConnection.js.map +1 -1
- package/dist/migration-shim/shimHandle.d.ts +1 -1
- package/dist/migration-shim/shimHandle.d.ts.map +1 -1
- package/dist/migration-shim/shimHandle.js.map +1 -1
- package/dist/migration-shim/types.d.ts +4 -4
- package/dist/migration-shim/types.d.ts.map +1 -1
- package/dist/migration-shim/types.js.map +1 -1
- package/dist/migration-shim/utils.d.ts +3 -3
- package/dist/migration-shim/utils.d.ts.map +1 -1
- package/dist/migration-shim/utils.js.map +1 -1
- package/eslint.config.mts +5 -4
- package/lib/migration-shim/migrationDeltaHandler.d.ts +2 -2
- package/lib/migration-shim/migrationDeltaHandler.d.ts.map +1 -1
- package/lib/migration-shim/migrationDeltaHandler.js.map +1 -1
- package/lib/migration-shim/migrationShim.d.ts +5 -5
- package/lib/migration-shim/migrationShim.d.ts.map +1 -1
- package/lib/migration-shim/migrationShim.js +1 -0
- package/lib/migration-shim/migrationShim.js.map +1 -1
- package/lib/migration-shim/migrationShimFactory.d.ts +3 -3
- package/lib/migration-shim/migrationShimFactory.d.ts.map +1 -1
- package/lib/migration-shim/migrationShimFactory.js.map +1 -1
- package/lib/migration-shim/sharedTreeDeltaHandler.d.ts +2 -2
- package/lib/migration-shim/sharedTreeDeltaHandler.d.ts.map +1 -1
- package/lib/migration-shim/sharedTreeDeltaHandler.js.map +1 -1
- package/lib/migration-shim/sharedTreeShim.d.ts +5 -5
- package/lib/migration-shim/sharedTreeShim.d.ts.map +1 -1
- package/lib/migration-shim/sharedTreeShim.js.map +1 -1
- package/lib/migration-shim/sharedTreeShimFactory.d.ts +1 -1
- package/lib/migration-shim/sharedTreeShimFactory.d.ts.map +1 -1
- package/lib/migration-shim/sharedTreeShimFactory.js.map +1 -1
- package/lib/migration-shim/shimChannelServices.d.ts +1 -1
- package/lib/migration-shim/shimChannelServices.d.ts.map +1 -1
- package/lib/migration-shim/shimChannelServices.js.map +1 -1
- package/lib/migration-shim/shimDeltaConnection.d.ts +2 -2
- package/lib/migration-shim/shimDeltaConnection.d.ts.map +1 -1
- package/lib/migration-shim/shimDeltaConnection.js.map +1 -1
- package/lib/migration-shim/shimHandle.d.ts +1 -1
- package/lib/migration-shim/shimHandle.d.ts.map +1 -1
- package/lib/migration-shim/shimHandle.js.map +1 -1
- package/lib/migration-shim/types.d.ts +4 -4
- package/lib/migration-shim/types.d.ts.map +1 -1
- package/lib/migration-shim/types.js.map +1 -1
- package/lib/migration-shim/utils.d.ts +3 -3
- package/lib/migration-shim/utils.d.ts.map +1 -1
- package/lib/migration-shim/utils.js.map +1 -1
- package/package.json +26 -26
- package/src/migration-shim/migrationDeltaHandler.ts +2 -2
- package/src/migration-shim/migrationShim.ts +11 -13
- package/src/migration-shim/migrationShimFactory.ts +7 -10
- package/src/migration-shim/sharedTreeDeltaHandler.ts +2 -2
- package/src/migration-shim/sharedTreeShim.ts +14 -14
- package/src/migration-shim/sharedTreeShimFactory.ts +5 -5
- package/src/migration-shim/shimChannelServices.ts +4 -4
- package/src/migration-shim/shimDeltaConnection.ts +5 -5
- package/src/migration-shim/shimHandle.ts +1 -1
- package/src/migration-shim/types.ts +8 -8
- package/src/migration-shim/utils.ts +3 -3
- package/.eslintrc.cjs +0 -45
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import type { IChannelAttributes, IDeltaConnection, IDeltaHandler } from '@fluidframework/datastore-definitions/internal';
|
|
6
|
+
import type { IShimDeltaHandler, IUnstampedContents } from './types.js';
|
|
7
7
|
/**
|
|
8
8
|
* Represents a connection to a Shim data store that can receive and submit deltas.
|
|
9
9
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shimDeltaConnection.d.ts","sourceRoot":"","sources":["../../src/migration-shim/shimDeltaConnection.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,
|
|
1
|
+
{"version":3,"file":"shimDeltaConnection.d.ts","sourceRoot":"","sources":["../../src/migration-shim/shimDeltaConnection.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,EACX,kBAAkB,EAClB,gBAAgB,EA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ED,gCAAgC;IACzB,MAAM,CAAC,cAAkC,EAAE,eAAwB;QACzE,MAAM,CAAC,cAAc,CAAC,mBAAmB,KAAK,SAAS,EAAE,KAAK,CAAC,uCAAuC,CAAC,CAAC;QACxG,cAAc,CAAC,mBAAmB,GAAG;YACpC,GAAG,IAAI,CAAC,UAAU;SAClB,CAAC;QACF,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,cAAc,EAAE,eAAe,CAAC,CAAC;IAC9D,CAAC;IAED;;;;;;;;OAQG;IACI,MAAM,CAAC,OAAsB;QACnC,qDAAqD;QACrD,IAAI,CAAC,gBAAgB,CAAC,sBAAsB,CAAC,OAAO,CAAC,CAAC;QACtD,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,QAAQ,EAAE,CAAC;YACrC,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;YACnD,IAAI,CAAC,gBAAgB,CAAC,YAAY,EAAE,CAAC;QACtC,CAAC;IACF,CAAC;IAEM,KAAK;QACX,IAAI,CAAC,eAAe,CAAC,KAAK,EAAE,CAAC;IAC9B,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/internal';\nimport {\n\
|
|
1
|
+
{"version":3,"file":"shimDeltaConnection.js","sourceRoot":"","sources":["../../src/migration-shim/shimDeltaConnection.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,qCAAqC,CAAC;AAS7D;;;;;;;;;GASG;AACH,MAAM,OAAO,2BAA2B;IACvC,YACkB,eAAiC,EACjC,gBAAmC;QADnC,oBAAe,GAAf,eAAe,CAAkB;QACjC,qBAAgB,GAAhB,gBAAgB,CAAmB;QAO7C,cAAS,GAAG,IAAI,CAAC;IANtB,CAAC;IAEJ,IAAW,SAAS;QACnB,OAAO,IAAI,CAAC,eAAe,CAAC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AClB,CAAC;QACF,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,cAAc,EAAE,eAAe,CAAC,CAAC;IAC9D,CAAC;IAED;;;;;;;;OAQG;IACI,MAAM,CAAC,OAAsB;QACnC,qDAAqD;QACrD,IAAI,CAAC,gBAAgB,CAAC,sBAAsB,CAAC,OAAO,CAAC,CAAC;QACtD,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,QAAQ,EAAE,CAAC;YACrC,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;YACnD,IAAI,CAAC,gBAAgB,CAAC,YAAY,EAAE,CAAC;QACtC,CAAC;IACF,CAAC;IAEM,KAAK;QACX,IAAI,CAAC,eAAe,CAAC,KAAK,EAAE,CAAC;IAC9B,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/internal';\nimport type {\n\tIChannelAttributes,\n\tIDeltaConnection,\n\tIDeltaHandler,\n} from '@fluidframework/datastore-definitions/internal';\n\nimport type { IShimDeltaHandler, IUnstampedContents } from './types.js';\n\n/**\n * Represents a connection to a Shim data store that can receive and submit deltas.\n *\n * This allows the Shim class to swap out the delta handler on the fly.\n *\n * The PreMigrationDeltaConnection does not stamp ops so that those ops can be considered v1 ops.\n *\n * This special logic allows for connect to be called for the underlying new SharedObject without the need for\n * modifications on the current ChannelDeltaConnection.\n */\nexport class PreMigrationDeltaConnection implements IDeltaConnection {\n\tpublic constructor(\n\t\tprivate readonly deltaConnection: IDeltaConnection,\n\t\tprivate readonly shimDeltaHandler: IShimDeltaHandler\n\t) {}\n\n\tpublic get connected(): boolean {\n\t\treturn this.deltaConnection.connected;\n\t}\n\n\tprivate canSubmit = true;\n\tpublic disableSubmit(): void {\n\t\tthis.canSubmit = false;\n\t}\n\n\t// This is for submitting v1 ops\n\tpublic submit(messageContent: unknown, localOpMetadata: unknown): void {\n\t\tif (this.canSubmit) {\n\t\t\tthis.deltaConnection.submit(messageContent, localOpMetadata);\n\t\t}\n\t\t// We don't want to throw so we can revert local changes on the LegacySharedTree\n\t}\n\n\t// We only want to call attach on the underlying delta connection once, as we'll hit an assert if we call it twice.\n\t// Note: SharedObject.load calls attach as well as SharedObject.connect\n\tpublic attach(handler: IDeltaHandler): void {\n\t\t// There are essentially two delta handlers that process ops, the shim delta handler to process shim ops\n\t\t// preventing them from being processed by the tree delta handler, and the tree delta handler to process tree\n\t\t// ops. Post migration v1 ops can be considered \"shim\" ops as they are dropped.\n\t\tthis.shimDeltaHandler.attachTreeDeltaHandler(handler);\n\t\tif (!this.shimDeltaHandler.attached) {\n\t\t\tthis.deltaConnection.attach(this.shimDeltaHandler);\n\t\t\tthis.shimDeltaHandler.markAttached();\n\t\t}\n\t}\n\tpublic dirty(): void {\n\t\tthis.deltaConnection.dirty();\n\t}\n}\n\n/**\n * A delta connection that stamps ops with a particular channel attributes so that those ops won't get dropped\n */\nexport class StampDeltaConnection implements IDeltaConnection {\n\tpublic constructor(\n\t\tprivate readonly deltaConnection: IDeltaConnection,\n\t\tprivate readonly shimDeltaHandler: IShimDeltaHandler,\n\t\tprivate readonly attributes: IChannelAttributes\n\t) {}\n\n\tpublic get connected(): boolean {\n\t\treturn this.deltaConnection.connected;\n\t}\n\n\t// This is for submitting v2 ops\n\tpublic submit(messageContent: IUnstampedContents, localOpMetadata: unknown): void {\n\t\tassert(messageContent.fluidMigrationStamp === undefined, 0x835 /* Should not be stamping ops twice! */);\n\t\tmessageContent.fluidMigrationStamp = {\n\t\t\t...this.attributes,\n\t\t};\n\t\tthis.deltaConnection.submit(messageContent, localOpMetadata);\n\t}\n\n\t/**\n\t * For the MigrationShim because we only attach once to the actual delta connection, we store state in the\n\t * migrationDeltaHandler to know if we've already attached. We will call attach once on the\n\t * PreMigrationDeltaConnection and once on the StampDeltaConnection.\n\t *\n\t * The SharedTreeShim should not be swapping delta connections and thus the if statement should always be executed.\n\t *\n\t * @param handler - this delta handler can only connect once.\n\t */\n\tpublic attach(handler: IDeltaHandler): void {\n\t\t// Maybe put an assert here to only call attach once?\n\t\tthis.shimDeltaHandler.attachTreeDeltaHandler(handler);\n\t\tif (!this.shimDeltaHandler.attached) {\n\t\t\tthis.deltaConnection.attach(this.shimDeltaHandler);\n\t\t\tthis.shimDeltaHandler.markAttached();\n\t\t}\n\t}\n\n\tpublic dirty(): void {\n\t\tthis.deltaConnection.dirty();\n\t}\n}\n"]}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
import { FluidHandleBase } from '@fluidframework/runtime-utils/internal';
|
|
6
|
-
import {
|
|
6
|
+
import type { IShim } from './types.js';
|
|
7
7
|
/**
|
|
8
8
|
* ShimHandle is a special class to handle the fact that we are essentially creating a proxy for a DDS.
|
|
9
9
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shimHandle.d.ts","sourceRoot":"","sources":["../../src/migration-shim/shimHandle.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,eAAe,EAAyB,MAAM,wCAAwC,CAAC;AAEhG,OAAO,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"shimHandle.d.ts","sourceRoot":"","sources":["../../src/migration-shim/shimHandle.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,eAAe,EAAyB,MAAM,wCAAwC,CAAC;AAEhG,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAExC;;;;;;;GAOG;AACH,qBAAa,UAAU,CAAC,KAAK,SAAS,KAAK,CAAE,SAAQ,eAAe,CAAC,KAAK,CAAC;IACvD,OAAO,CAAC,QAAQ,CAAC,IAAI;gBAAJ,IAAI,EAAE,KAAK;IAI/C,IAAW,YAAY,IAAI,MAAM,CAEhC;IACD,IAAW,UAAU,IAAI,OAAO,CAE/B;IACM,WAAW,IAAI,IAAI;IAGb,GAAG,IAAI,OAAO,CAAC,KAAK,CAAC;CAGlC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shimHandle.js","sourceRoot":"","sources":["../../src/migration-shim/shimHandle.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,wCAAwC,CAAC;AAIhG;;;;;;;GAOG;AACH,MAAM,OAAO,UAAgC,SAAQ,eAAsB;IAC1E,YAAoC,IAAW;QAC9C,KAAK,EAAE,CAAC;QAD2B,SAAI,GAAJ,IAAI,CAAO;IAE/C,CAAC;IAED,IAAW,YAAY;QACtB,OAAO,qBAAqB,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,YAAY,CAAC;IACzE,CAAC;IACD,IAAW,UAAU;QACpB,OAAO,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,UAAU,CAAC;IAChD,CAAC;IACM,WAAW;QACjB,OAAO,qBAAqB,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,WAAW,EAAE,CAAC;IAC1E,CAAC;IACM,KAAK,CAAC,GAAG;QACf,OAAO,IAAI,CAAC,IAAI,CAAC;IAClB,CAAC;CACD","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { FluidHandleBase, toFluidHandleInternal } from '@fluidframework/runtime-utils/internal';\n\nimport {
|
|
1
|
+
{"version":3,"file":"shimHandle.js","sourceRoot":"","sources":["../../src/migration-shim/shimHandle.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,wCAAwC,CAAC;AAIhG;;;;;;;GAOG;AACH,MAAM,OAAO,UAAgC,SAAQ,eAAsB;IAC1E,YAAoC,IAAW;QAC9C,KAAK,EAAE,CAAC;QAD2B,SAAI,GAAJ,IAAI,CAAO;IAE/C,CAAC;IAED,IAAW,YAAY;QACtB,OAAO,qBAAqB,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,YAAY,CAAC;IACzE,CAAC;IACD,IAAW,UAAU;QACpB,OAAO,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,UAAU,CAAC;IAChD,CAAC;IACM,WAAW;QACjB,OAAO,qBAAqB,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,WAAW,EAAE,CAAC;IAC1E,CAAC;IACM,KAAK,CAAC,GAAG;QACf,OAAO,IAAI,CAAC,IAAI,CAAC;IAClB,CAAC;CACD","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { FluidHandleBase, toFluidHandleInternal } from '@fluidframework/runtime-utils/internal';\n\nimport type { IShim } from './types.js';\n\n/**\n * ShimHandle is a special class to handle the fact that we are essentially creating a proxy for a DDS.\n *\n * ShimHandle is designed for MigrationShim and SharedTreeShim.\n *\n * Local handles such as the FluidObjectHandle and the SharedObjectHandle don't work as they do not properly bind the\n * Shim's underlying DDS.\n */\nexport class ShimHandle<TShim extends IShim> extends FluidHandleBase<TShim> {\n\tpublic constructor(private readonly shim: TShim) {\n\t\tsuper();\n\t}\n\n\tpublic get absolutePath(): string {\n\t\treturn toFluidHandleInternal(this.shim.currentTree.handle).absolutePath;\n\t}\n\tpublic get isAttached(): boolean {\n\t\treturn this.shim.currentTree.handle.isAttached;\n\t}\n\tpublic attachGraph(): void {\n\t\treturn toFluidHandleInternal(this.shim.currentTree.handle).attachGraph();\n\t}\n\tpublic async get(): Promise<TShim> {\n\t\treturn this.shim;\n\t}\n}\n"]}
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
5
|
+
import type { IChannel, IChannelAttributes, IChannelServices, IDeltaHandler } from '@fluidframework/datastore-definitions/internal';
|
|
6
|
+
import type { ITree } from '@fluidframework/tree';
|
|
7
|
+
import type { SharedTree as LegacySharedTree } from '../SharedTree.js';
|
|
8
|
+
import type { IMigrationOp } from './migrationShim.js';
|
|
9
9
|
/**
|
|
10
10
|
* An interface for a shim delta handler intercepts another delta handler.
|
|
11
11
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/migration-shim/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/migration-shim/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EACX,QAAQ,EACR,kBAAkB,EAClB,gBAAgB,EAChB,aAAa,EACb,MAAM,gDAAgD,CAAC;AACxD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAElD,OAAO,KAAK,EAAE,UAAU,IAAI,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAEvE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEvD;;;;GAIG;AACH,MAAM,WAAW,iBAAkB,SAAQ,aAAa;IACvD;;;OAGG;IACH,sBAAsB,CAAC,gBAAgB,EAAE,aAAa,GAAG,IAAI,CAAC;IAE9D;;;OAGG;IACH,mBAAmB,IAAI,OAAO,CAAC;IAE/B,QAAQ,EAAE,OAAO,CAAC;IAElB,YAAY,IAAI,IAAI,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IAClC,mBAAmB,CAAC,EAAE,kBAAkB,CAAC;IACzC,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;CAChC;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAChC,mBAAmB,EAAE,kBAAkB,CAAC;IACxC,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;CAChC;AAED;;;;;;;;;GASG;AACH,MAAM,MAAM,WAAW,GAAG,gBAAgB,GAAG,kBAAkB,GAAG,YAAY,CAAC;AAE/E;;;;GAIG;AACH,MAAM,WAAW,KAAM,SAAQ,QAAQ;IACtC,MAAM,IAAI,IAAI,CAAC;IACf,IAAI,CAAC,eAAe,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACvD,WAAW,EAAE,KAAK,GAAG,gBAAgB,CAAC;CACtC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/migration-shim/types.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport {\n\
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/migration-shim/types.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type {\n\tIChannel,\n\tIChannelAttributes,\n\tIChannelServices,\n\tIDeltaHandler,\n} from '@fluidframework/datastore-definitions/internal';\nimport type { ITree } from '@fluidframework/tree';\n\nimport type { SharedTree as LegacySharedTree } from '../SharedTree.js';\n\nimport type { IMigrationOp } from './migrationShim.js';\n\n/**\n * An interface for a shim delta handler intercepts another delta handler.\n *\n * @internal\n */\nexport interface IShimDeltaHandler extends IDeltaHandler {\n\t/**\n\t * Provide the real tree delta handler (either legacy or new) to the shim that will be used to process the tree ops.\n\t * @param treeDeltaHandler - The appropriate tree delta handler.\n\t */\n\tattachTreeDeltaHandler(treeDeltaHandler: IDeltaHandler): void;\n\n\t/**\n\t * The delta handler needs to be attached to the IShimDeltaHandler before attaching it to the delta connection.\n\t * Otherwise the IShimDeltaHandler will not be able to process ops.\n\t */\n\thasTreeDeltaHandler(): boolean;\n\n\tattached: boolean;\n\n\tmarkAttached(): void;\n}\n\n/**\n * A v1 op or a v2 unstamped op\n */\nexport interface IUnstampedContents {\n\tfluidMigrationStamp?: IChannelAttributes;\n\t[key: string | number]: unknown;\n}\n\n/**\n * A v2 op will have a `fluidMigrationStamp` property. This is a type guard to check if the op is a v2 op.\n */\nexport interface IStampedContents {\n\tfluidMigrationStamp: IChannelAttributes;\n\t[key: string | number]: unknown;\n}\n\n/**\n * A type for interrogating ops to see if they are v2 stamped ops or migrate ops. Otherwise, we try not to care\n * what the contents of the op are. The contents could be of type `any` or `unknown`.\n *\n * If `type` specifically === \"barrier\", then we know we are dealing with a barrier op\n *\n * If `fluidMigrationStamp` is present, then we know we are dealing with a v2 op\n *\n * @internal\n */\nexport type IOpContents = IStampedContents | IUnstampedContents | IMigrationOp;\n\n/**\n * An interface for a shim channel that intercepts a LegacySharedTree or new SharedTree DDS.\n *\n * @internal\n */\nexport interface IShim extends IChannel {\n\tcreate(): void;\n\tload(channelServices: IChannelServices): Promise<void>;\n\tcurrentTree: ITree | LegacySharedTree;\n}\n"]}
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
5
|
+
import type { IChannelAttributes } from '@fluidframework/datastore-definitions/internal';
|
|
6
|
+
import type { IMigrationOp } from './migrationShim.js';
|
|
7
|
+
import type { IOpContents, IStampedContents } from './types.js';
|
|
8
8
|
/**
|
|
9
9
|
* Checks if two channel attributes objects match.
|
|
10
10
|
* @param attributes1 - The first channel attributes object to compare.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/migration-shim/utils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/migration-shim/utils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gDAAgD,CAAC;AAEzF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,KAAK,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAEhE;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,WAAW,EAAE,kBAAkB,EAAE,WAAW,EAAE,kBAAkB,GAAG,OAAO,CAMzG;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,QAAQ,EAAE,WAAW,GAAG,QAAQ,IAAI,YAAY,CAE3E;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,QAAQ,EAAE,WAAW,GAAG,QAAQ,IAAI,gBAAgB,CAE/E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/migration-shim/utils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAOH;;;;;GAKG;AACH,MAAM,UAAU,eAAe,CAAC,WAA+B,EAAE,WAA+B;IAC/F,OAAO,CACN,WAAW,CAAC,IAAI,KAAK,WAAW,CAAC,IAAI;QACrC,WAAW,CAAC,cAAc,KAAK,WAAW,CAAC,cAAc;QACzD,WAAW,CAAC,qBAAqB,KAAK,WAAW,CAAC,qBAAqB,CACvE,CAAC;AACH,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,WAAW,CAAC,QAAqB;IAChD,OAAO,QAAQ,CAAC,IAAI,KAAK,SAAS,CAAC;AACpC,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,WAAW,CAAC,QAAqB;IAChD,OAAO,qBAAqB,IAAI,QAAQ,CAAC;AAC1C,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport {
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/migration-shim/utils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAOH;;;;;GAKG;AACH,MAAM,UAAU,eAAe,CAAC,WAA+B,EAAE,WAA+B;IAC/F,OAAO,CACN,WAAW,CAAC,IAAI,KAAK,WAAW,CAAC,IAAI;QACrC,WAAW,CAAC,cAAc,KAAK,WAAW,CAAC,cAAc;QACzD,WAAW,CAAC,qBAAqB,KAAK,WAAW,CAAC,qBAAqB,CACvE,CAAC;AACH,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,WAAW,CAAC,QAAqB;IAChD,OAAO,QAAQ,CAAC,IAAI,KAAK,SAAS,CAAC;AACpC,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,WAAW,CAAC,QAAqB;IAChD,OAAO,qBAAqB,IAAI,QAAQ,CAAC;AAC1C,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { IChannelAttributes } from '@fluidframework/datastore-definitions/internal';\n\nimport type { IMigrationOp } from './migrationShim.js';\nimport type { IOpContents, IStampedContents } from './types.js';\n\n/**\n * Checks if two channel attributes objects match.\n * @param attributes1 - The first channel attributes object to compare.\n * @param attributes2 - The second channel attributes object to compare.\n * @returns True if the two channel attributes objects match, false otherwise.\n */\nexport function attributesMatch(attributes1: IChannelAttributes, attributes2: IChannelAttributes): boolean {\n\treturn (\n\t\tattributes1.type === attributes2.type &&\n\t\tattributes1.packageVersion === attributes2.packageVersion &&\n\t\tattributes1.snapshotFormatVersion === attributes2.snapshotFormatVersion\n\t);\n}\n\n/**\n * Checks if the given op is a barrier op.\n * @param contents - The op to check.\n * @returns True if the op is a barrier op, false otherwise.\n */\nexport function isBarrierOp(contents: IOpContents): contents is IMigrationOp {\n\treturn contents.type === 'barrier';\n}\n\n/**\n * Checks if the given op is a barrier op.\n * @param contents - The op to check.\n * @returns True if the op is a barrier op, false otherwise.\n */\nexport function isStampedOp(contents: IOpContents): contents is IStampedContents {\n\treturn 'fluidMigrationStamp' in contents;\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-experimental/tree",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.81.0-374083",
|
|
4
4
|
"description": "Distributed tree",
|
|
5
5
|
"homepage": "https://fluidframework.com",
|
|
6
6
|
"repository": {
|
|
@@ -27,18 +27,18 @@
|
|
|
27
27
|
"main": "lib/index.js",
|
|
28
28
|
"types": "lib/index.d.ts",
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@fluid-internal/client-utils": "
|
|
31
|
-
"@fluidframework/container-definitions": "
|
|
32
|
-
"@fluidframework/core-interfaces": "
|
|
33
|
-
"@fluidframework/core-utils": "
|
|
34
|
-
"@fluidframework/datastore-definitions": "
|
|
35
|
-
"@fluidframework/driver-definitions": "
|
|
36
|
-
"@fluidframework/id-compressor": "
|
|
37
|
-
"@fluidframework/runtime-definitions": "
|
|
38
|
-
"@fluidframework/runtime-utils": "
|
|
39
|
-
"@fluidframework/shared-object-base": "
|
|
40
|
-
"@fluidframework/telemetry-utils": "
|
|
41
|
-
"@fluidframework/tree": "
|
|
30
|
+
"@fluid-internal/client-utils": "2.81.0-374083",
|
|
31
|
+
"@fluidframework/container-definitions": "2.81.0-374083",
|
|
32
|
+
"@fluidframework/core-interfaces": "2.81.0-374083",
|
|
33
|
+
"@fluidframework/core-utils": "2.81.0-374083",
|
|
34
|
+
"@fluidframework/datastore-definitions": "2.81.0-374083",
|
|
35
|
+
"@fluidframework/driver-definitions": "2.81.0-374083",
|
|
36
|
+
"@fluidframework/id-compressor": "2.81.0-374083",
|
|
37
|
+
"@fluidframework/runtime-definitions": "2.81.0-374083",
|
|
38
|
+
"@fluidframework/runtime-utils": "2.81.0-374083",
|
|
39
|
+
"@fluidframework/shared-object-base": "2.81.0-374083",
|
|
40
|
+
"@fluidframework/telemetry-utils": "2.81.0-374083",
|
|
41
|
+
"@fluidframework/tree": "2.81.0-374083",
|
|
42
42
|
"@tylerbu/sorted-btree-es6": "^1.8.0",
|
|
43
43
|
"buffer": "^6.0.3",
|
|
44
44
|
"denque": "^1.5.1",
|
|
@@ -48,20 +48,20 @@
|
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@arethetypeswrong/cli": "^0.18.2",
|
|
50
50
|
"@biomejs/biome": "~1.9.3",
|
|
51
|
-
"@fluid-internal/mocha-test-setup": "
|
|
52
|
-
"@fluid-private/stochastic-test-utils": "
|
|
53
|
-
"@fluid-private/test-drivers": "
|
|
54
|
-
"@fluid-tools/benchmark": "^0.
|
|
51
|
+
"@fluid-internal/mocha-test-setup": "2.81.0-374083",
|
|
52
|
+
"@fluid-private/stochastic-test-utils": "2.81.0-374083",
|
|
53
|
+
"@fluid-private/test-drivers": "2.81.0-374083",
|
|
54
|
+
"@fluid-tools/benchmark": "^0.52.0",
|
|
55
55
|
"@fluidframework/build-common": "^2.0.3",
|
|
56
|
-
"@fluidframework/build-tools": "^0.
|
|
57
|
-
"@fluidframework/container-definitions": "
|
|
58
|
-
"@fluidframework/container-loader": "
|
|
59
|
-
"@fluidframework/container-runtime": "
|
|
60
|
-
"@fluidframework/eslint-config-fluid": "
|
|
61
|
-
"@fluidframework/runtime-utils": "
|
|
62
|
-
"@fluidframework/test-runtime-utils": "
|
|
63
|
-
"@fluidframework/test-utils": "
|
|
64
|
-
"@fluidframework/undo-redo": "
|
|
56
|
+
"@fluidframework/build-tools": "^0.63.0",
|
|
57
|
+
"@fluidframework/container-definitions": "2.81.0-374083",
|
|
58
|
+
"@fluidframework/container-loader": "2.81.0-374083",
|
|
59
|
+
"@fluidframework/container-runtime": "2.81.0-374083",
|
|
60
|
+
"@fluidframework/eslint-config-fluid": "2.81.0-374083",
|
|
61
|
+
"@fluidframework/runtime-utils": "2.81.0-374083",
|
|
62
|
+
"@fluidframework/test-runtime-utils": "2.81.0-374083",
|
|
63
|
+
"@fluidframework/test-utils": "2.81.0-374083",
|
|
64
|
+
"@fluidframework/undo-redo": "2.81.0-374083",
|
|
65
65
|
"@microsoft/api-extractor": "7.52.11",
|
|
66
66
|
"@types/chai": "^4.0.0",
|
|
67
67
|
"@types/lru-cache": "^5.1.0",
|
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import { assert } from '@fluidframework/core-utils/internal';
|
|
7
|
-
import {
|
|
7
|
+
import type { IChannelAttributes, IDeltaHandler } from '@fluidframework/datastore-definitions/internal';
|
|
8
8
|
import { MessageType, type ISequencedDocumentMessage } from '@fluidframework/driver-definitions/internal';
|
|
9
9
|
import type { IRuntimeMessageCollection, IRuntimeMessagesContent } from '@fluidframework/runtime-definitions/internal';
|
|
10
10
|
|
|
11
|
-
import {
|
|
11
|
+
import type { IOpContents, IShimDeltaHandler } from './types.js';
|
|
12
12
|
import { attributesMatch, isBarrierOp, isStampedOp } from './utils.js';
|
|
13
13
|
|
|
14
14
|
/**
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import {
|
|
6
|
+
import type { EventEmitterEventType } from '@fluid-internal/client-utils';
|
|
7
7
|
import { AttachState } from '@fluidframework/container-definitions';
|
|
8
|
-
import {
|
|
8
|
+
import type { IEvent, IFluidHandle, IFluidLoadable } from '@fluidframework/core-interfaces';
|
|
9
9
|
import { assert } from '@fluidframework/core-utils/internal';
|
|
10
10
|
import {
|
|
11
11
|
type IChannelAttributes,
|
|
@@ -17,25 +17,22 @@ import {
|
|
|
17
17
|
import { MessageType, type ISequencedDocumentMessage } from '@fluidframework/driver-definitions/internal';
|
|
18
18
|
import type { SessionId } from '@fluidframework/id-compressor';
|
|
19
19
|
import type { IIdCompressorCore } from '@fluidframework/id-compressor/internal';
|
|
20
|
-
import {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
20
|
+
import type {
|
|
21
|
+
IExperimentalIncrementalSummaryContext,
|
|
22
|
+
IGarbageCollectionData,
|
|
23
|
+
ISummaryTreeWithStats,
|
|
24
|
+
ITelemetryContext,
|
|
25
25
|
} from '@fluidframework/runtime-definitions/internal';
|
|
26
26
|
import { DataProcessingError, EventEmitterWithErrorHandling } from '@fluidframework/telemetry-utils/internal';
|
|
27
|
-
import {
|
|
27
|
+
import type { ITree } from '@fluidframework/tree';
|
|
28
28
|
|
|
29
|
-
import {
|
|
30
|
-
type SharedTree as LegacySharedTree,
|
|
31
|
-
type SharedTreeFactory as LegacySharedTreeFactory,
|
|
32
|
-
} from '../SharedTree.js';
|
|
29
|
+
import type { SharedTree as LegacySharedTree, SharedTreeFactory as LegacySharedTreeFactory } from '../SharedTree.js';
|
|
33
30
|
|
|
34
31
|
import { MigrationShimDeltaHandler } from './migrationDeltaHandler.js';
|
|
35
32
|
import { type IShimChannelServices, NoDeltasChannelServices } from './shimChannelServices.js';
|
|
36
33
|
import { PreMigrationDeltaConnection, StampDeltaConnection } from './shimDeltaConnection.js';
|
|
37
34
|
import { ShimHandle } from './shimHandle.js';
|
|
38
|
-
import {
|
|
35
|
+
import type { IOpContents, IShim } from './types.js';
|
|
39
36
|
|
|
40
37
|
/**
|
|
41
38
|
* Interface for migration events to indicate the stage of the migration. There really is two stages: before, and after.
|
|
@@ -158,6 +155,7 @@ export class MigrationShim extends EventEmitterWithErrorHandling<IMigrationEvent
|
|
|
158
155
|
* {@inheritDoc @fluidframework/shared-object-base#SharedObject.closeWithError}
|
|
159
156
|
*/
|
|
160
157
|
private closeWithError(error: ReturnType<typeof DataProcessingError.wrapIfUnrecognized>): void {
|
|
158
|
+
// eslint-disable-next-line @typescript-eslint/strict-boolean-expressions, @typescript-eslint/prefer-nullish-coalescing -- intentional behavior
|
|
161
159
|
if (this.closeError === undefined) {
|
|
162
160
|
this.closeError = error;
|
|
163
161
|
}
|
|
@@ -4,18 +4,15 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import { assert } from '@fluidframework/core-utils/internal';
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
import type {
|
|
8
|
+
IChannelAttributes,
|
|
9
|
+
IChannelFactory,
|
|
10
|
+
IFluidDataStoreRuntime,
|
|
11
|
+
IChannelServices,
|
|
12
12
|
} from '@fluidframework/datastore-definitions/internal';
|
|
13
|
-
import {
|
|
13
|
+
import type { ITree } from '@fluidframework/tree';
|
|
14
14
|
|
|
15
|
-
import {
|
|
16
|
-
type SharedTree as LegacySharedTree,
|
|
17
|
-
type SharedTreeFactory as LegacySharedTreeFactory,
|
|
18
|
-
} from '../SharedTree.js';
|
|
15
|
+
import type { SharedTree as LegacySharedTree, SharedTreeFactory as LegacySharedTreeFactory } from '../SharedTree.js';
|
|
19
16
|
|
|
20
17
|
import { MigrationShim } from './migrationShim.js';
|
|
21
18
|
import { attributesMatch } from './utils.js';
|
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import { assert } from '@fluidframework/core-utils/internal';
|
|
7
|
-
import {
|
|
7
|
+
import type { IChannelAttributes, IDeltaHandler } from '@fluidframework/datastore-definitions/internal';
|
|
8
8
|
import { MessageType, type ISequencedDocumentMessage } from '@fluidframework/driver-definitions/internal';
|
|
9
9
|
import type { IRuntimeMessageCollection, IRuntimeMessagesContent } from '@fluidframework/runtime-definitions/internal';
|
|
10
10
|
|
|
11
|
-
import {
|
|
11
|
+
import type { IOpContents, IShimDeltaHandler } from './types.js';
|
|
12
12
|
import { attributesMatch, isStampedOp } from './utils.js';
|
|
13
13
|
|
|
14
14
|
/**
|
|
@@ -4,28 +4,28 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import { AttachState } from '@fluidframework/container-definitions';
|
|
7
|
-
import {
|
|
7
|
+
import type { IFluidHandle, IFluidLoadable } from '@fluidframework/core-interfaces';
|
|
8
8
|
import { assert } from '@fluidframework/core-utils/internal';
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
9
|
+
import type {
|
|
10
|
+
IChannel,
|
|
11
|
+
IChannelAttributes,
|
|
12
|
+
IChannelFactory,
|
|
13
|
+
IFluidDataStoreRuntime,
|
|
14
|
+
IChannelServices,
|
|
15
15
|
} from '@fluidframework/datastore-definitions/internal';
|
|
16
|
-
import {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
16
|
+
import type {
|
|
17
|
+
IExperimentalIncrementalSummaryContext,
|
|
18
|
+
IGarbageCollectionData,
|
|
19
|
+
ISummaryTreeWithStats,
|
|
20
|
+
ITelemetryContext,
|
|
21
21
|
} from '@fluidframework/runtime-definitions/internal';
|
|
22
|
-
import {
|
|
22
|
+
import type { ITree } from '@fluidframework/tree';
|
|
23
23
|
|
|
24
24
|
import { SharedTreeShimDeltaHandler } from './sharedTreeDeltaHandler.js';
|
|
25
25
|
import { type IShimChannelServices, NoDeltasChannelServices } from './shimChannelServices.js';
|
|
26
26
|
import { StampDeltaConnection } from './shimDeltaConnection.js';
|
|
27
27
|
import { ShimHandle } from './shimHandle.js';
|
|
28
|
-
import {
|
|
28
|
+
import type { IShim } from './types.js';
|
|
29
29
|
|
|
30
30
|
/**
|
|
31
31
|
* SharedTreeShim is loaded by clients that join after the migration completes, and holds the new SharedTree.
|
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import { assert } from '@fluidframework/core-utils/internal';
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
import type {
|
|
8
|
+
IChannelAttributes,
|
|
9
|
+
IChannelFactory,
|
|
10
|
+
IFluidDataStoreRuntime,
|
|
11
|
+
IChannelServices,
|
|
12
12
|
} from '@fluidframework/datastore-definitions/internal';
|
|
13
13
|
import type { ITree } from '@fluidframework/tree';
|
|
14
14
|
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
import type {
|
|
7
|
+
IChannelServices,
|
|
8
|
+
IChannelStorageService,
|
|
9
|
+
IDeltaConnection,
|
|
10
10
|
} from '@fluidframework/datastore-definitions/internal';
|
|
11
11
|
|
|
12
12
|
/**
|
|
@@ -4,13 +4,13 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import { assert } from '@fluidframework/core-utils/internal';
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
import type {
|
|
8
|
+
IChannelAttributes,
|
|
9
|
+
IDeltaConnection,
|
|
10
|
+
IDeltaHandler,
|
|
11
11
|
} from '@fluidframework/datastore-definitions/internal';
|
|
12
12
|
|
|
13
|
-
import {
|
|
13
|
+
import type { IShimDeltaHandler, IUnstampedContents } from './types.js';
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
16
|
* Represents a connection to a Shim data store that can receive and submit deltas.
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
import { FluidHandleBase, toFluidHandleInternal } from '@fluidframework/runtime-utils/internal';
|
|
7
7
|
|
|
8
|
-
import {
|
|
8
|
+
import type { IShim } from './types.js';
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* ShimHandle is a special class to handle the fact that we are essentially creating a proxy for a DDS.
|
|
@@ -3,17 +3,17 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
import type {
|
|
7
|
+
IChannel,
|
|
8
|
+
IChannelAttributes,
|
|
9
|
+
IChannelServices,
|
|
10
|
+
IDeltaHandler,
|
|
11
11
|
} from '@fluidframework/datastore-definitions/internal';
|
|
12
|
-
import {
|
|
12
|
+
import type { ITree } from '@fluidframework/tree';
|
|
13
13
|
|
|
14
|
-
import {
|
|
14
|
+
import type { SharedTree as LegacySharedTree } from '../SharedTree.js';
|
|
15
15
|
|
|
16
|
-
import {
|
|
16
|
+
import type { IMigrationOp } from './migrationShim.js';
|
|
17
17
|
|
|
18
18
|
/**
|
|
19
19
|
* An interface for a shim delta handler intercepts another delta handler.
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import {
|
|
6
|
+
import type { IChannelAttributes } from '@fluidframework/datastore-definitions/internal';
|
|
7
7
|
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
8
|
+
import type { IMigrationOp } from './migrationShim.js';
|
|
9
|
+
import type { IOpContents, IStampedContents } from './types.js';
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* Checks if two channel attributes objects match.
|
package/.eslintrc.cjs
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
-
* Licensed under the MIT License.
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
module.exports = {
|
|
7
|
-
extends: ['@fluidframework/eslint-config-fluid/minimal-deprecated', 'prettier'],
|
|
8
|
-
root: true,
|
|
9
|
-
rules: {
|
|
10
|
-
// TODO: Recover "noUnusedLocals" behavior as part of linting. (This rule seems to be broken in the Fluid repo.)
|
|
11
|
-
// '@typescript-eslint/no-unused-vars': ['error', { args: 'none', varsIgnorePattern: '^_' }],
|
|
12
|
-
|
|
13
|
-
// Rules which could be re-enabled (by dropping these overrides, as they are enabled in base config) with some minor fixes:
|
|
14
|
-
'@typescript-eslint/no-shadow': 'off',
|
|
15
|
-
'no-shadow': 'off',
|
|
16
|
-
'@typescript-eslint/no-unsafe-return': 'off',
|
|
17
|
-
'import-x/no-deprecated': 'off',
|
|
18
|
-
'@fluid-internal/fluid/no-unchecked-record-access': 'off',
|
|
19
|
-
},
|
|
20
|
-
overrides: [
|
|
21
|
-
{
|
|
22
|
-
files: ['src/test/**'],
|
|
23
|
-
rules: {
|
|
24
|
-
// Chai assertions trigger the unused expression lint rule.
|
|
25
|
-
'@typescript-eslint/no-unused-expressions': 'off',
|
|
26
|
-
|
|
27
|
-
// Dev dependencies and internal modules may be used in test code
|
|
28
|
-
'import-x/no-extraneous-dependencies': [
|
|
29
|
-
'error',
|
|
30
|
-
{
|
|
31
|
-
devDependencies: true,
|
|
32
|
-
},
|
|
33
|
-
],
|
|
34
|
-
'import-x/no-internal-modules': 'off',
|
|
35
|
-
},
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
files: ['**/test/**', 'src/index.ts'],
|
|
39
|
-
rules: {
|
|
40
|
-
// Test code and the main package export shouldn't be linted for unused exports
|
|
41
|
-
'import-x/no-unused-modules': 'off',
|
|
42
|
-
},
|
|
43
|
-
},
|
|
44
|
-
],
|
|
45
|
-
};
|