@fluidframework/replay-driver 2.0.0-rc.1.0.4 → 2.0.0-rc.2.0.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/{.eslintrc.js → .eslintrc.cjs} +4 -1
- package/CHANGELOG.md +20 -0
- package/{api-extractor-esm.json → api-extractor-cjs.json} +5 -1
- package/api-extractor-lint.json +1 -1
- package/api-extractor.json +1 -1
- package/api-report/replay-driver.api.md +2 -13
- package/dist/index.d.ts +4 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -13
- package/dist/index.js.map +1 -1
- package/dist/package.json +3 -0
- package/dist/replay-driver-alpha.d.ts +1 -2
- package/dist/replay-driver-beta.d.ts +1 -2
- package/dist/replay-driver-public.d.ts +1 -2
- package/dist/replay-driver-untrimmed.d.ts +2 -11
- package/dist/replayController.d.ts +0 -1
- package/dist/replayController.d.ts.map +1 -1
- package/dist/replayController.js +0 -3
- package/dist/replayController.js.map +1 -1
- package/dist/replayDocumentDeltaConnection.d.ts +1 -1
- package/dist/replayDocumentDeltaConnection.d.ts.map +1 -1
- package/dist/replayDocumentDeltaConnection.js +2 -2
- package/dist/replayDocumentDeltaConnection.js.map +1 -1
- package/dist/replayDocumentService.d.ts +3 -2
- package/dist/replayDocumentService.d.ts.map +1 -1
- package/dist/replayDocumentService.js +7 -5
- package/dist/replayDocumentService.js.map +1 -1
- package/dist/replayDocumentServiceFactory.d.ts +1 -1
- package/dist/replayDocumentServiceFactory.d.ts.map +1 -1
- package/dist/replayDocumentServiceFactory.js +4 -4
- package/dist/replayDocumentServiceFactory.js.map +1 -1
- package/dist/storageImplementations.d.ts +4 -11
- package/dist/storageImplementations.d.ts.map +1 -1
- package/dist/storageImplementations.js +9 -22
- package/dist/storageImplementations.js.map +1 -1
- package/dist/tsdoc-metadata.json +1 -1
- package/lib/{emptyDeltaStorageService.d.mts → emptyDeltaStorageService.d.ts} +1 -1
- package/lib/emptyDeltaStorageService.d.ts.map +1 -0
- package/lib/{emptyDeltaStorageService.mjs → emptyDeltaStorageService.js} +1 -1
- package/lib/emptyDeltaStorageService.js.map +1 -0
- package/lib/index.d.ts +9 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +9 -0
- package/lib/index.js.map +1 -0
- package/lib/{replay-driver-alpha.d.mts → replay-driver-alpha.d.ts} +1 -2
- package/lib/{replay-driver-beta.d.mts → replay-driver-beta.d.ts} +1 -2
- package/lib/{replay-driver-public.d.mts → replay-driver-public.d.ts} +1 -2
- package/lib/{replay-driver-untrimmed.d.mts → replay-driver-untrimmed.d.ts} +2 -11
- package/lib/{replayController.d.mts → replayController.d.ts} +1 -2
- package/lib/replayController.d.ts.map +1 -0
- package/lib/{replayController.mjs → replayController.js} +1 -4
- package/lib/replayController.js.map +1 -0
- package/lib/{replayDocumentDeltaConnection.d.mts → replayDocumentDeltaConnection.d.ts} +2 -2
- package/lib/replayDocumentDeltaConnection.d.ts.map +1 -0
- package/lib/{replayDocumentDeltaConnection.mjs → replayDocumentDeltaConnection.js} +2 -2
- package/lib/replayDocumentDeltaConnection.js.map +1 -0
- package/lib/{replayDocumentService.d.mts → replayDocumentService.d.ts} +4 -3
- package/lib/replayDocumentService.d.ts.map +1 -0
- package/lib/{replayDocumentService.mjs → replayDocumentService.js} +6 -4
- package/lib/replayDocumentService.js.map +1 -0
- package/lib/{replayDocumentServiceFactory.d.mts → replayDocumentServiceFactory.d.ts} +2 -2
- package/lib/replayDocumentServiceFactory.d.ts.map +1 -0
- package/lib/{replayDocumentServiceFactory.mjs → replayDocumentServiceFactory.js} +3 -3
- package/lib/replayDocumentServiceFactory.js.map +1 -0
- package/lib/{storageImplementations.d.mts → storageImplementations.d.ts} +5 -12
- package/lib/storageImplementations.d.ts.map +1 -0
- package/lib/{storageImplementations.mjs → storageImplementations.js} +6 -18
- package/lib/storageImplementations.js.map +1 -0
- package/lib/test/types/validateReplayDriverPrevious.generated.d.ts +2 -0
- package/lib/test/types/validateReplayDriverPrevious.generated.d.ts.map +1 -0
- package/lib/test/types/{validateReplayDriverPrevious.generated.mjs → validateReplayDriverPrevious.generated.js} +16 -8
- package/lib/test/types/validateReplayDriverPrevious.generated.js.map +1 -0
- package/package.json +50 -48
- package/src/index.ts +4 -5
- package/src/replayController.ts +0 -4
- package/src/replayDocumentDeltaConnection.ts +1 -1
- package/src/replayDocumentService.ts +11 -5
- package/src/replayDocumentServiceFactory.ts +3 -3
- package/src/storageImplementations.ts +11 -21
- package/tsconfig.cjs.json +7 -0
- package/tsconfig.json +2 -5
- package/lib/emptyDeltaStorageService.d.mts.map +0 -1
- package/lib/emptyDeltaStorageService.mjs.map +0 -1
- package/lib/index.d.mts +0 -9
- package/lib/index.d.mts.map +0 -1
- package/lib/index.mjs +0 -9
- package/lib/index.mjs.map +0 -1
- package/lib/replayController.d.mts.map +0 -1
- package/lib/replayController.mjs.map +0 -1
- package/lib/replayDocumentDeltaConnection.d.mts.map +0 -1
- package/lib/replayDocumentDeltaConnection.mjs.map +0 -1
- package/lib/replayDocumentService.d.mts.map +0 -1
- package/lib/replayDocumentService.mjs.map +0 -1
- package/lib/replayDocumentServiceFactory.d.mts.map +0 -1
- package/lib/replayDocumentServiceFactory.mjs.map +0 -1
- package/lib/storageImplementations.d.mts.map +0 -1
- package/lib/storageImplementations.mjs.map +0 -1
- package/lib/test/types/validateReplayDriverPrevious.generated.d.mts +0 -2
- package/lib/test/types/validateReplayDriverPrevious.generated.d.mts.map +0 -1
- package/lib/test/types/validateReplayDriverPrevious.generated.mjs.map +0 -1
|
@@ -2,10 +2,11 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
import {
|
|
5
|
+
import { TypedEventEmitter } from "@fluid-internal/client-utils";
|
|
6
|
+
import { IDocumentDeltaConnection, IDocumentDeltaStorageService, IDocumentService, IDocumentServiceEvents, IDocumentServiceFactory, IDocumentStorageService, IResolvedUrl } from "@fluidframework/driver-definitions";
|
|
6
7
|
import { IClient, ISnapshotTree, ITree, IVersion, ISummaryTree } from "@fluidframework/protocol-definitions";
|
|
7
8
|
import { ITelemetryLoggerExt } from "@fluidframework/telemetry-utils";
|
|
8
|
-
import { ReadDocumentStorageServiceBase } from "./replayController.
|
|
9
|
+
import { ReadDocumentStorageServiceBase } from "./replayController.js";
|
|
9
10
|
/**
|
|
10
11
|
* Structure of snapshot on disk, when we store snapshot as single file
|
|
11
12
|
* @internal
|
|
@@ -47,15 +48,7 @@ export declare class SnapshotStorage extends ReadDocumentStorageServiceBase {
|
|
|
47
48
|
getSnapshotTree(versionRequested?: IVersion): Promise<ISnapshotTree | null>;
|
|
48
49
|
readBlob(blobId: string): Promise<ArrayBufferLike>;
|
|
49
50
|
}
|
|
50
|
-
|
|
51
|
-
* @internal
|
|
52
|
-
*/
|
|
53
|
-
export declare class OpStorage extends ReadDocumentStorageServiceBase {
|
|
54
|
-
getVersions(versionId: string | null, count: number): Promise<IVersion[]>;
|
|
55
|
-
getSnapshotTree(version?: IVersion): Promise<ISnapshotTree | null>;
|
|
56
|
-
readBlob(blobId: string): Promise<ArrayBufferLike>;
|
|
57
|
-
}
|
|
58
|
-
export declare class StaticStorageDocumentService implements IDocumentService {
|
|
51
|
+
export declare class StaticStorageDocumentService extends TypedEventEmitter<IDocumentServiceEvents> implements IDocumentService {
|
|
59
52
|
readonly resolvedUrl: IResolvedUrl;
|
|
60
53
|
private readonly storage;
|
|
61
54
|
constructor(resolvedUrl: IResolvedUrl, storage: IDocumentStorageService);
|
|
@@ -73,4 +66,4 @@ export declare class StaticStorageDocumentServiceFactory implements IDocumentSer
|
|
|
73
66
|
createDocumentService(fileURL: IResolvedUrl, logger?: ITelemetryLoggerExt, clientIsSummarizer?: boolean): Promise<IDocumentService>;
|
|
74
67
|
createContainer(createNewSummary: ISummaryTree, resolvedUrl: IResolvedUrl, logger: ITelemetryLoggerExt, clientIsSummarizer?: boolean): Promise<IDocumentService>;
|
|
75
68
|
}
|
|
76
|
-
//# sourceMappingURL=storageImplementations.d.
|
|
69
|
+
//# sourceMappingURL=storageImplementations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"storageImplementations.d.ts","sourceRoot":"","sources":["../src/storageImplementations.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EACN,wBAAwB,EACxB,4BAA4B,EAC5B,gBAAgB,EAChB,sBAAsB,EACtB,uBAAuB,EACvB,uBAAuB,EACvB,YAAY,EACZ,MAAM,oCAAoC,CAAC;AAE5C,OAAO,EACN,OAAO,EACP,aAAa,EACb,KAAK,EACL,QAAQ,EACR,YAAY,EACZ,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAEtE,OAAO,EAAE,8BAA8B,EAAE,MAAM,uBAAuB,CAAC;AAEvE;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC7B,IAAI,EAAE,KAAK,CAAC;IACZ,OAAO,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,KAAK,CAAA;KAAE,CAAC;CAClC;AAED;;GAEG;AACH,qBAAa,kBACZ,SAAQ,8BACR,YAAW,uBAAuB;IAGlC,SAAS,CAAC,MAAM,CAAC,QAAQ,CAAC,wBAAwB,uBAAuB;IAEzE,SAAS,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,OAAO,EAAE,aAAa,CAAC;IACjC,SAAS,CAAC,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;IAC9C,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,KAAK,CAAA;KAAE,CAAM;IAC1D,SAAS,CAAC,QAAQ,CAAC,KAAK,EAAE;QAAE,CAAC,GAAG,EAAE,MAA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wBAAwB,CAAC;CAIrF;AAED;;GAEG;AACH,qBAAa,mCAAoC,YAAW,uBAAuB;IAC/D,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAE,uBAAuB;gBAAhC,OAAO,EAAE,uBAAuB;IAEzD,qBAAqB,CACjC,OAAO,EAAE,YAAY,EACrB,MAAM,CAAC,EAAE,mBAAmB,EAC5B,kBAAkB,CAAC,EAAE,OAAO,GAC1B,OAAO,CAAC,gBAAgB,CAAC;IAKf,eAAe,CAC3B,gBAAgB,EAAE,YAAY,EAC9B,WAAW,EAAE,YAAY,EACzB,MAAM,EAAE,mBAAmB,EAC3B,kBAAkB,CAAC,EAAE,OAAO,GAC1B,OAAO,CAAC,gBAAgB,CAAC;CAG5B"}
|
|
@@ -3,9 +3,10 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
import { assert } from "@fluidframework/core-utils";
|
|
6
|
+
import { TypedEventEmitter } from "@fluid-internal/client-utils";
|
|
6
7
|
import { buildSnapshotTree } from "@fluidframework/driver-utils";
|
|
7
|
-
import { EmptyDeltaStorageService } from "./emptyDeltaStorageService.
|
|
8
|
-
import { ReadDocumentStorageServiceBase } from "./replayController.
|
|
8
|
+
import { EmptyDeltaStorageService } from "./emptyDeltaStorageService.js";
|
|
9
|
+
import { ReadDocumentStorageServiceBase } from "./replayController.js";
|
|
9
10
|
/**
|
|
10
11
|
* @internal
|
|
11
12
|
*/
|
|
@@ -87,22 +88,9 @@ export class SnapshotStorage extends ReadDocumentStorageServiceBase {
|
|
|
87
88
|
return this.storage.readBlob(blobId);
|
|
88
89
|
}
|
|
89
90
|
}
|
|
90
|
-
|
|
91
|
-
* @internal
|
|
92
|
-
*/
|
|
93
|
-
export class OpStorage extends ReadDocumentStorageServiceBase {
|
|
94
|
-
async getVersions(versionId, count) {
|
|
95
|
-
return [];
|
|
96
|
-
}
|
|
97
|
-
async getSnapshotTree(version) {
|
|
98
|
-
throw new Error("no snapshot tree should be asked when playing ops");
|
|
99
|
-
}
|
|
100
|
-
async readBlob(blobId) {
|
|
101
|
-
throw new Error(`Unknown blob ID: ${blobId}`);
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
export class StaticStorageDocumentService {
|
|
91
|
+
export class StaticStorageDocumentService extends TypedEventEmitter {
|
|
105
92
|
constructor(resolvedUrl, storage) {
|
|
93
|
+
super();
|
|
106
94
|
this.resolvedUrl = resolvedUrl;
|
|
107
95
|
this.storage = storage;
|
|
108
96
|
}
|
|
@@ -133,4 +121,4 @@ export class StaticStorageDocumentServiceFactory {
|
|
|
133
121
|
throw new Error("Not implemented");
|
|
134
122
|
}
|
|
135
123
|
}
|
|
136
|
-
//# sourceMappingURL=storageImplementations.
|
|
124
|
+
//# sourceMappingURL=storageImplementations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"storageImplementations.js","sourceRoot":"","sources":["../src/storageImplementations.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAUjE,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AASjE,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,8BAA8B,EAAE,MAAM,uBAAuB,CAAC;AAWvE;;GAEG;AACH,MAAM,OAAO,kBACZ,SAAQ,8BAA8B;IAYtC,YAAmB,IAAmB;QACrC,KAAK,EAAE,CAAC;QAJU,YAAO,GAA6B,EAAE,CAAC;QACvC,UAAK,GAAqC,EAAE,CAAC;QAI/D,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;QAE5B,IAAI,CAAC,KAAK,GAAG,IAAI,GAAG,EAA2B,CAAC;QAChD,IAAI,CAAC,OAAO,GAAG,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI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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 { TypedEventEmitter } from \"@fluid-internal/client-utils\";\nimport {\n\tIDocumentDeltaConnection,\n\tIDocumentDeltaStorageService,\n\tIDocumentService,\n\tIDocumentServiceEvents,\n\tIDocumentServiceFactory,\n\tIDocumentStorageService,\n\tIResolvedUrl,\n} from \"@fluidframework/driver-definitions\";\nimport { buildSnapshotTree } from \"@fluidframework/driver-utils\";\nimport {\n\tIClient,\n\tISnapshotTree,\n\tITree,\n\tIVersion,\n\tISummaryTree,\n} from \"@fluidframework/protocol-definitions\";\nimport { ITelemetryLoggerExt } from \"@fluidframework/telemetry-utils\";\nimport { EmptyDeltaStorageService } from \"./emptyDeltaStorageService.js\";\nimport { ReadDocumentStorageServiceBase } from \"./replayController.js\";\n\n/**\n * Structure of snapshot on disk, when we store snapshot as single file\n * @internal\n */\nexport interface IFileSnapshot {\n\ttree: ITree;\n\tcommits: { [key: string]: ITree };\n}\n\n/**\n * @internal\n */\nexport class FileSnapshotReader\n\textends ReadDocumentStorageServiceBase\n\timplements IDocumentStorageService\n{\n\t// IVersion.treeId used to communicate between getVersions() & getSnapshotTree() calls to indicate IVersion is ours.\n\tprotected static readonly FileStorageVersionTreeId = \"FileStorageTreeId\";\n\n\tprotected docId?: string;\n\tprotected docTree: ISnapshotTree;\n\tprotected blobs: Map<string, ArrayBufferLike>;\n\tprotected readonly commits: { [key: string]: ITree } = {};\n\tprotected readonly trees: { [key: string]: ISnapshotTree } = {};\n\n\tpublic constructor(json: IFileSnapshot) {\n\t\tsuper();\n\t\tthis.commits = json.commits;\n\n\t\tthis.blobs = new Map<string, ArrayBufferLike>();\n\t\tthis.docTree = buildSnapshotTree(json.tree.entries, this.blobs);\n\t}\n\n\tpublic async getVersions(versionId: string | null, count: number): Promise<IVersion[]> {\n\t\tif (this.docId === undefined || this.docId === versionId || versionId === null) {\n\t\t\tif (versionId !== null) {\n\t\t\t\tthis.docId = versionId;\n\t\t\t}\n\t\t\treturn [{ id: \"latest\", treeId: \"\" }];\n\t\t}\n\n\t\tif (this.commits[versionId] !== undefined) {\n\t\t\treturn [{ id: versionId, treeId: FileSnapshotReader.FileStorageVersionTreeId }];\n\t\t}\n\t\tthrow new Error(`Unknown version ID: ${versionId}`);\n\t}\n\n\tpublic async getSnapshotTree(versionRequested?: IVersion): Promise<ISnapshotTree | null> {\n\t\tif (!versionRequested || versionRequested.id === \"latest\") {\n\t\t\treturn this.docTree;\n\t\t}\n\t\tif (versionRequested.treeId !== FileSnapshotReader.FileStorageVersionTreeId) {\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-base-to-string\n\t\t\tthrow new Error(`Unknown version id: ${versionRequested}`);\n\t\t}\n\n\t\tlet snapshotTree = this.trees[versionRequested.id];\n\t\tif (snapshotTree === undefined) {\n\t\t\tconst tree = this.commits[versionRequested.id];\n\t\t\tif (tree === undefined) {\n\t\t\t\tthrow new Error(`Can't find version ${versionRequested.id}`);\n\t\t\t}\n\n\t\t\tthis.trees[versionRequested.id] = snapshotTree = buildSnapshotTree(\n\t\t\t\ttree.entries,\n\t\t\t\tthis.blobs,\n\t\t\t);\n\t\t}\n\t\treturn snapshotTree;\n\t}\n\n\tpublic async readBlob(blobId: string): Promise<ArrayBufferLike> {\n\t\tconst blob = this.blobs.get(blobId);\n\t\tif (blob !== undefined) {\n\t\t\treturn blob;\n\t\t}\n\t\tthrow new Error(`Unknown blob ID: ${blobId}`);\n\t}\n}\n\n/**\n * @internal\n */\nexport class SnapshotStorage extends ReadDocumentStorageServiceBase {\n\tprotected docId?: string;\n\n\tconstructor(\n\t\tprotected readonly storage: IDocumentStorageService,\n\t\tprotected readonly docTree: ISnapshotTree | null,\n\t) {\n\t\tsuper();\n\t\tassert(!!this.docTree, 0x0b0 /* \"Missing document snapshot tree!\" */);\n\t}\n\n\tpublic async getVersions(versionId: string | null, count: number): Promise<IVersion[]> {\n\t\tif (this.docId === undefined || this.docId === versionId || versionId === null) {\n\t\t\tif (versionId !== null) {\n\t\t\t\tthis.docId = versionId;\n\t\t\t}\n\t\t\treturn [{ id: \"latest\", treeId: \"\" }];\n\t\t}\n\t\treturn this.storage.getVersions(versionId, count);\n\t}\n\n\tpublic async getSnapshotTree(versionRequested?: IVersion): Promise<ISnapshotTree | null> {\n\t\tif (versionRequested && versionRequested.id !== \"latest\") {\n\t\t\treturn this.storage.getSnapshotTree(versionRequested);\n\t\t}\n\n\t\treturn this.docTree;\n\t}\n\n\tpublic async readBlob(blobId: string): Promise<ArrayBufferLike> {\n\t\treturn this.storage.readBlob(blobId);\n\t}\n}\n\nexport class StaticStorageDocumentService\n\textends TypedEventEmitter<IDocumentServiceEvents>\n\timplements IDocumentService\n{\n\tconstructor(\n\t\tpublic readonly resolvedUrl: IResolvedUrl,\n\t\tprivate readonly storage: IDocumentStorageService,\n\t) {\n\t\tsuper();\n\t}\n\n\tpublic dispose() {}\n\n\tpublic async connectToStorage(): Promise<IDocumentStorageService> {\n\t\treturn this.storage;\n\t}\n\n\tpublic async connectToDeltaStorage(): Promise<IDocumentDeltaStorageService> {\n\t\treturn new EmptyDeltaStorageService();\n\t}\n\n\tpublic async connectToDeltaStream(client: IClient): Promise<IDocumentDeltaConnection> {\n\t\t// We have no delta stream, so make it not return forever...\n\t\treturn new Promise(() => {});\n\t}\n}\n\n/**\n * @internal\n */\nexport class StaticStorageDocumentServiceFactory implements IDocumentServiceFactory {\n\tpublic constructor(protected readonly storage: IDocumentStorageService) {}\n\n\tpublic async createDocumentService(\n\t\tfileURL: IResolvedUrl,\n\t\tlogger?: ITelemetryLoggerExt,\n\t\tclientIsSummarizer?: boolean,\n\t): Promise<IDocumentService> {\n\t\treturn new StaticStorageDocumentService(fileURL, this.storage);\n\t}\n\n\t// TODO: Issue-2109 Implement detach container api or put appropriate comment.\n\tpublic async createContainer(\n\t\tcreateNewSummary: ISummaryTree,\n\t\tresolvedUrl: IResolvedUrl,\n\t\tlogger: ITelemetryLoggerExt,\n\t\tclientIsSummarizer?: boolean,\n\t): Promise<IDocumentService> {\n\t\tthrow new Error(\"Not implemented\");\n\t}\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validateReplayDriverPrevious.generated.d.ts","sourceRoot":"","sources":["../../../src/test/types/validateReplayDriverPrevious.generated.ts"],"names":[],"mappings":""}
|
|
@@ -1,20 +1,28 @@
|
|
|
1
1
|
use_current_ClassDeclaration_FileSnapshotReader(get_old_ClassDeclaration_FileSnapshotReader());
|
|
2
|
-
use_old_ClassDeclaration_FileSnapshotReader(
|
|
2
|
+
use_old_ClassDeclaration_FileSnapshotReader(
|
|
3
|
+
// @ts-expect-error compatibility expected to be broken
|
|
4
|
+
get_current_ClassDeclaration_FileSnapshotReader());
|
|
3
5
|
use_current_InterfaceDeclaration_IFileSnapshot(get_old_InterfaceDeclaration_IFileSnapshot());
|
|
4
6
|
use_old_InterfaceDeclaration_IFileSnapshot(get_current_InterfaceDeclaration_IFileSnapshot());
|
|
5
|
-
use_current_ClassDeclaration_OpStorage(get_old_ClassDeclaration_OpStorage());
|
|
6
|
-
use_old_ClassDeclaration_OpStorage(get_current_ClassDeclaration_OpStorage());
|
|
7
7
|
use_current_ClassDeclaration_ReadDocumentStorageServiceBase(get_old_ClassDeclaration_ReadDocumentStorageServiceBase());
|
|
8
|
-
use_old_ClassDeclaration_ReadDocumentStorageServiceBase(
|
|
8
|
+
use_old_ClassDeclaration_ReadDocumentStorageServiceBase(
|
|
9
|
+
// @ts-expect-error compatibility expected to be broken
|
|
10
|
+
get_current_ClassDeclaration_ReadDocumentStorageServiceBase());
|
|
9
11
|
use_current_ClassDeclaration_ReplayController(get_old_ClassDeclaration_ReplayController());
|
|
10
|
-
use_old_ClassDeclaration_ReplayController(
|
|
11
|
-
|
|
12
|
+
use_old_ClassDeclaration_ReplayController(
|
|
13
|
+
// @ts-expect-error compatibility expected to be broken
|
|
14
|
+
get_current_ClassDeclaration_ReplayController());
|
|
15
|
+
use_current_ClassDeclaration_ReplayDocumentService(
|
|
16
|
+
// @ts-expect-error compatibility expected to be broken
|
|
17
|
+
get_old_ClassDeclaration_ReplayDocumentService());
|
|
12
18
|
use_old_ClassDeclaration_ReplayDocumentService(get_current_ClassDeclaration_ReplayDocumentService());
|
|
13
19
|
use_current_ClassDeclaration_ReplayDocumentServiceFactory(get_old_ClassDeclaration_ReplayDocumentServiceFactory());
|
|
14
20
|
use_old_ClassDeclaration_ReplayDocumentServiceFactory(get_current_ClassDeclaration_ReplayDocumentServiceFactory());
|
|
15
21
|
use_current_ClassDeclaration_SnapshotStorage(get_old_ClassDeclaration_SnapshotStorage());
|
|
16
|
-
use_old_ClassDeclaration_SnapshotStorage(
|
|
22
|
+
use_old_ClassDeclaration_SnapshotStorage(
|
|
23
|
+
// @ts-expect-error compatibility expected to be broken
|
|
24
|
+
get_current_ClassDeclaration_SnapshotStorage());
|
|
17
25
|
use_current_ClassDeclaration_StaticStorageDocumentServiceFactory(get_old_ClassDeclaration_StaticStorageDocumentServiceFactory());
|
|
18
26
|
use_old_ClassDeclaration_StaticStorageDocumentServiceFactory(get_current_ClassDeclaration_StaticStorageDocumentServiceFactory());
|
|
19
27
|
export {};
|
|
20
|
-
//# sourceMappingURL=validateReplayDriverPrevious.generated.
|
|
28
|
+
//# sourceMappingURL=validateReplayDriverPrevious.generated.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validateReplayDriverPrevious.generated.js","sourceRoot":"","sources":["../../../src/test/types/validateReplayDriverPrevious.generated.ts"],"names":[],"mappings":"AAgCA,+CAA+C,CAC3C,2CAA2C,EAAE,CAAC,CAAC;AAWnD,2CAA2C;AACvC,uDAAuD;AACvD,+CAA+C,EAAE,CAAC,CAAC;AAWvD,8CAA8C,CAC1C,0CAA0C,EAAE,CAAC,CAAC;AAWlD,0CAA0C,CACtC,8CAA8C,EAAE,CAAC,CAAC;AAuBtD,2DAA2D,CACvD,uDAAuD,EAAE,CAAC,CAAC;AAW/D,uDAAuD;AACnD,uDAAuD;AACvD,2DAA2D,EAAE,CAAC,CAAC;AAWnE,6CAA6C,CACzC,yCAAyC,EAAE,CAAC,CAAC;AAWjD,yCAAyC;AACrC,uDAAuD;AACvD,6CAA6C,EAAE,CAAC,CAAC;AAWrD,kDAAkD;AAC9C,uDAAuD;AACvD,8CAA8C,EAAE,CAAC,CAAC;AAWtD,8CAA8C,CAC1C,kDAAkD,EAAE,CAAC,CAAC;AAW1D,yDAAyD,CACrD,qDAAqD,EAAE,CAAC,CAAC;AAW7D,qDAAqD,CACjD,yDAAyD,EAAE,CAAC,CAAC;AAWjE,4CAA4C,CACxC,wCAAwC,EAAE,CAAC,CAAC;AAWhD,wCAAwC;AACpC,uDAAuD;AACvD,4CAA4C,EAAE,CAAC,CAAC;AAWpD,gEAAgE,CAC5D,4DAA4D,EAAE,CAAC,CAAC;AAWpE,4DAA4D,CACxD,gEAAgE,EAAE,CAAC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n/*\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.\n * Generated by fluid-type-test-generator in @fluidframework/build-tools.\n */\nimport type * as old from \"@fluidframework/replay-driver-previous\";\nimport type * as current from \"../../index.js\";\n\n\n// See 'build-tools/src/type-test-generator/compatibility.ts' for more information.\ntype TypeOnly<T> = T extends number\n\t? number\n\t: T extends string\n\t? string\n\t: T extends boolean | bigint | symbol\n\t? T\n\t: {\n\t\t\t[P in keyof T]: TypeOnly<T[P]>;\n\t };\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"ClassDeclaration_FileSnapshotReader\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_ClassDeclaration_FileSnapshotReader():\n TypeOnly<old.FileSnapshotReader>;\ndeclare function use_current_ClassDeclaration_FileSnapshotReader(\n use: TypeOnly<current.FileSnapshotReader>): void;\nuse_current_ClassDeclaration_FileSnapshotReader(\n get_old_ClassDeclaration_FileSnapshotReader());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"ClassDeclaration_FileSnapshotReader\": {\"backCompat\": false}\n*/\ndeclare function get_current_ClassDeclaration_FileSnapshotReader():\n TypeOnly<current.FileSnapshotReader>;\ndeclare function use_old_ClassDeclaration_FileSnapshotReader(\n use: TypeOnly<old.FileSnapshotReader>): void;\nuse_old_ClassDeclaration_FileSnapshotReader(\n // @ts-expect-error compatibility expected to be broken\n get_current_ClassDeclaration_FileSnapshotReader());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"InterfaceDeclaration_IFileSnapshot\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_InterfaceDeclaration_IFileSnapshot():\n TypeOnly<old.IFileSnapshot>;\ndeclare function use_current_InterfaceDeclaration_IFileSnapshot(\n use: TypeOnly<current.IFileSnapshot>): void;\nuse_current_InterfaceDeclaration_IFileSnapshot(\n get_old_InterfaceDeclaration_IFileSnapshot());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"InterfaceDeclaration_IFileSnapshot\": {\"backCompat\": false}\n*/\ndeclare function get_current_InterfaceDeclaration_IFileSnapshot():\n TypeOnly<current.IFileSnapshot>;\ndeclare function use_old_InterfaceDeclaration_IFileSnapshot(\n use: TypeOnly<old.IFileSnapshot>): void;\nuse_old_InterfaceDeclaration_IFileSnapshot(\n get_current_InterfaceDeclaration_IFileSnapshot());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"RemovedClassDeclaration_OpStorage\": {\"forwardCompat\": false}\n*/\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"RemovedClassDeclaration_OpStorage\": {\"backCompat\": false}\n*/\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"ClassDeclaration_ReadDocumentStorageServiceBase\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_ClassDeclaration_ReadDocumentStorageServiceBase():\n TypeOnly<old.ReadDocumentStorageServiceBase>;\ndeclare function use_current_ClassDeclaration_ReadDocumentStorageServiceBase(\n use: TypeOnly<current.ReadDocumentStorageServiceBase>): void;\nuse_current_ClassDeclaration_ReadDocumentStorageServiceBase(\n get_old_ClassDeclaration_ReadDocumentStorageServiceBase());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"ClassDeclaration_ReadDocumentStorageServiceBase\": {\"backCompat\": false}\n*/\ndeclare function get_current_ClassDeclaration_ReadDocumentStorageServiceBase():\n TypeOnly<current.ReadDocumentStorageServiceBase>;\ndeclare function use_old_ClassDeclaration_ReadDocumentStorageServiceBase(\n use: TypeOnly<old.ReadDocumentStorageServiceBase>): void;\nuse_old_ClassDeclaration_ReadDocumentStorageServiceBase(\n // @ts-expect-error compatibility expected to be broken\n get_current_ClassDeclaration_ReadDocumentStorageServiceBase());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"ClassDeclaration_ReplayController\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_ClassDeclaration_ReplayController():\n TypeOnly<old.ReplayController>;\ndeclare function use_current_ClassDeclaration_ReplayController(\n use: TypeOnly<current.ReplayController>): void;\nuse_current_ClassDeclaration_ReplayController(\n get_old_ClassDeclaration_ReplayController());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"ClassDeclaration_ReplayController\": {\"backCompat\": false}\n*/\ndeclare function get_current_ClassDeclaration_ReplayController():\n TypeOnly<current.ReplayController>;\ndeclare function use_old_ClassDeclaration_ReplayController(\n use: TypeOnly<old.ReplayController>): void;\nuse_old_ClassDeclaration_ReplayController(\n // @ts-expect-error compatibility expected to be broken\n get_current_ClassDeclaration_ReplayController());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"ClassDeclaration_ReplayDocumentService\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_ClassDeclaration_ReplayDocumentService():\n TypeOnly<old.ReplayDocumentService>;\ndeclare function use_current_ClassDeclaration_ReplayDocumentService(\n use: TypeOnly<current.ReplayDocumentService>): void;\nuse_current_ClassDeclaration_ReplayDocumentService(\n // @ts-expect-error compatibility expected to be broken\n get_old_ClassDeclaration_ReplayDocumentService());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"ClassDeclaration_ReplayDocumentService\": {\"backCompat\": false}\n*/\ndeclare function get_current_ClassDeclaration_ReplayDocumentService():\n TypeOnly<current.ReplayDocumentService>;\ndeclare function use_old_ClassDeclaration_ReplayDocumentService(\n use: TypeOnly<old.ReplayDocumentService>): void;\nuse_old_ClassDeclaration_ReplayDocumentService(\n get_current_ClassDeclaration_ReplayDocumentService());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"ClassDeclaration_ReplayDocumentServiceFactory\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_ClassDeclaration_ReplayDocumentServiceFactory():\n TypeOnly<old.ReplayDocumentServiceFactory>;\ndeclare function use_current_ClassDeclaration_ReplayDocumentServiceFactory(\n use: TypeOnly<current.ReplayDocumentServiceFactory>): void;\nuse_current_ClassDeclaration_ReplayDocumentServiceFactory(\n get_old_ClassDeclaration_ReplayDocumentServiceFactory());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"ClassDeclaration_ReplayDocumentServiceFactory\": {\"backCompat\": false}\n*/\ndeclare function get_current_ClassDeclaration_ReplayDocumentServiceFactory():\n TypeOnly<current.ReplayDocumentServiceFactory>;\ndeclare function use_old_ClassDeclaration_ReplayDocumentServiceFactory(\n use: TypeOnly<old.ReplayDocumentServiceFactory>): void;\nuse_old_ClassDeclaration_ReplayDocumentServiceFactory(\n get_current_ClassDeclaration_ReplayDocumentServiceFactory());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"ClassDeclaration_SnapshotStorage\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_ClassDeclaration_SnapshotStorage():\n TypeOnly<old.SnapshotStorage>;\ndeclare function use_current_ClassDeclaration_SnapshotStorage(\n use: TypeOnly<current.SnapshotStorage>): void;\nuse_current_ClassDeclaration_SnapshotStorage(\n get_old_ClassDeclaration_SnapshotStorage());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"ClassDeclaration_SnapshotStorage\": {\"backCompat\": false}\n*/\ndeclare function get_current_ClassDeclaration_SnapshotStorage():\n TypeOnly<current.SnapshotStorage>;\ndeclare function use_old_ClassDeclaration_SnapshotStorage(\n use: TypeOnly<old.SnapshotStorage>): void;\nuse_old_ClassDeclaration_SnapshotStorage(\n // @ts-expect-error compatibility expected to be broken\n get_current_ClassDeclaration_SnapshotStorage());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"ClassDeclaration_StaticStorageDocumentServiceFactory\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_ClassDeclaration_StaticStorageDocumentServiceFactory():\n TypeOnly<old.StaticStorageDocumentServiceFactory>;\ndeclare function use_current_ClassDeclaration_StaticStorageDocumentServiceFactory(\n use: TypeOnly<current.StaticStorageDocumentServiceFactory>): void;\nuse_current_ClassDeclaration_StaticStorageDocumentServiceFactory(\n get_old_ClassDeclaration_StaticStorageDocumentServiceFactory());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"ClassDeclaration_StaticStorageDocumentServiceFactory\": {\"backCompat\": false}\n*/\ndeclare function get_current_ClassDeclaration_StaticStorageDocumentServiceFactory():\n TypeOnly<current.StaticStorageDocumentServiceFactory>;\ndeclare function use_old_ClassDeclaration_StaticStorageDocumentServiceFactory(\n use: TypeOnly<old.StaticStorageDocumentServiceFactory>): void;\nuse_old_ClassDeclaration_StaticStorageDocumentServiceFactory(\n get_current_ClassDeclaration_StaticStorageDocumentServiceFactory());\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluidframework/replay-driver",
|
|
3
|
-
"version": "2.0.0-rc.
|
|
3
|
+
"version": "2.0.0-rc.2.0.0",
|
|
4
4
|
"description": "Document replay version of Socket.IO implementation",
|
|
5
5
|
"homepage": "https://fluidframework.com",
|
|
6
6
|
"repository": {
|
|
@@ -11,86 +11,65 @@
|
|
|
11
11
|
"license": "MIT",
|
|
12
12
|
"author": "Microsoft and contributors",
|
|
13
13
|
"sideEffects": false,
|
|
14
|
+
"type": "module",
|
|
14
15
|
"exports": {
|
|
15
16
|
".": {
|
|
16
17
|
"import": {
|
|
17
|
-
"types": "./lib/index.d.
|
|
18
|
-
"default": "./lib/index.
|
|
18
|
+
"types": "./lib/index.d.ts",
|
|
19
|
+
"default": "./lib/index.js"
|
|
19
20
|
},
|
|
20
21
|
"require": {
|
|
21
22
|
"types": "./dist/index.d.ts",
|
|
22
23
|
"default": "./dist/index.js"
|
|
23
24
|
}
|
|
24
25
|
},
|
|
25
|
-
"./
|
|
26
|
-
"import": {
|
|
27
|
-
"types": "./lib/replay-driver-alpha.d.mts",
|
|
28
|
-
"default": "./lib/index.mjs"
|
|
29
|
-
},
|
|
30
|
-
"require": {
|
|
31
|
-
"types": "./dist/replay-driver-alpha.d.ts",
|
|
32
|
-
"default": "./dist/index.js"
|
|
33
|
-
}
|
|
34
|
-
},
|
|
35
|
-
"./beta": {
|
|
26
|
+
"./public": {
|
|
36
27
|
"import": {
|
|
37
|
-
"types": "./lib/replay-driver-
|
|
38
|
-
"default": "./lib/index.
|
|
28
|
+
"types": "./lib/replay-driver-public.d.ts",
|
|
29
|
+
"default": "./lib/index.js"
|
|
39
30
|
},
|
|
40
31
|
"require": {
|
|
41
|
-
"types": "./dist/replay-driver-
|
|
32
|
+
"types": "./dist/replay-driver-public.d.ts",
|
|
42
33
|
"default": "./dist/index.js"
|
|
43
34
|
}
|
|
44
35
|
},
|
|
45
36
|
"./internal": {
|
|
46
37
|
"import": {
|
|
47
|
-
"types": "./lib/index.d.
|
|
48
|
-
"default": "./lib/index.
|
|
38
|
+
"types": "./lib/index.d.ts",
|
|
39
|
+
"default": "./lib/index.js"
|
|
49
40
|
},
|
|
50
41
|
"require": {
|
|
51
42
|
"types": "./dist/index.d.ts",
|
|
52
43
|
"default": "./dist/index.js"
|
|
53
44
|
}
|
|
54
|
-
},
|
|
55
|
-
"./public": {
|
|
56
|
-
"import": {
|
|
57
|
-
"types": "./lib/replay-driver-public.d.mts",
|
|
58
|
-
"default": "./lib/index.mjs"
|
|
59
|
-
},
|
|
60
|
-
"require": {
|
|
61
|
-
"types": "./dist/replay-driver-public.d.ts",
|
|
62
|
-
"default": "./dist/index.js"
|
|
63
|
-
}
|
|
64
45
|
}
|
|
65
46
|
},
|
|
66
47
|
"main": "dist/index.js",
|
|
67
|
-
"module": "lib/index.mjs",
|
|
68
48
|
"types": "dist/index.d.ts",
|
|
69
49
|
"dependencies": {
|
|
70
|
-
"@fluid-internal/client-utils": ">=2.0.0-rc.
|
|
71
|
-
"@fluidframework/core-interfaces": ">=2.0.0-rc.
|
|
72
|
-
"@fluidframework/core-utils": ">=2.0.0-rc.
|
|
73
|
-
"@fluidframework/driver-definitions": ">=2.0.0-rc.
|
|
74
|
-
"@fluidframework/driver-utils": ">=2.0.0-rc.
|
|
75
|
-
"@fluidframework/protocol-definitions": "^3.
|
|
76
|
-
"@fluidframework/telemetry-utils": ">=2.0.0-rc.
|
|
50
|
+
"@fluid-internal/client-utils": ">=2.0.0-rc.2.0.0 <2.0.0-rc.2.1.0",
|
|
51
|
+
"@fluidframework/core-interfaces": ">=2.0.0-rc.2.0.0 <2.0.0-rc.2.1.0",
|
|
52
|
+
"@fluidframework/core-utils": ">=2.0.0-rc.2.0.0 <2.0.0-rc.2.1.0",
|
|
53
|
+
"@fluidframework/driver-definitions": ">=2.0.0-rc.2.0.0 <2.0.0-rc.2.1.0",
|
|
54
|
+
"@fluidframework/driver-utils": ">=2.0.0-rc.2.0.0 <2.0.0-rc.2.1.0",
|
|
55
|
+
"@fluidframework/protocol-definitions": "^3.2.0",
|
|
56
|
+
"@fluidframework/telemetry-utils": ">=2.0.0-rc.2.0.0 <2.0.0-rc.2.1.0"
|
|
77
57
|
},
|
|
78
58
|
"devDependencies": {
|
|
79
59
|
"@arethetypeswrong/cli": "^0.13.3",
|
|
80
|
-
"@fluid-tools/build-cli": "^0.
|
|
60
|
+
"@fluid-tools/build-cli": "^0.34.0",
|
|
81
61
|
"@fluidframework/build-common": "^2.0.3",
|
|
82
|
-
"@fluidframework/build-tools": "^0.
|
|
83
|
-
"@fluidframework/eslint-config-fluid": "^
|
|
62
|
+
"@fluidframework/build-tools": "^0.34.0",
|
|
63
|
+
"@fluidframework/eslint-config-fluid": "^4.0.0",
|
|
84
64
|
"@fluidframework/replay-driver-previous": "npm:@fluidframework/replay-driver@2.0.0-internal.8.0.0",
|
|
85
|
-
"@microsoft/api-extractor": "^7.
|
|
65
|
+
"@microsoft/api-extractor": "^7.42.3",
|
|
86
66
|
"@types/nock": "^9.3.0",
|
|
87
67
|
"@types/node": "^18.19.0",
|
|
88
68
|
"copyfiles": "^2.4.1",
|
|
89
|
-
"eslint": "~8.
|
|
69
|
+
"eslint": "~8.55.0",
|
|
90
70
|
"nock": "^13.3.3",
|
|
91
71
|
"prettier": "~3.0.3",
|
|
92
72
|
"rimraf": "^4.4.0",
|
|
93
|
-
"tsc-multi": "^1.1.0",
|
|
94
73
|
"typescript": "~5.1.6"
|
|
95
74
|
},
|
|
96
75
|
"fluidBuild": {
|
|
@@ -110,16 +89,39 @@
|
|
|
110
89
|
}
|
|
111
90
|
},
|
|
112
91
|
"typeValidation": {
|
|
113
|
-
"broken": {
|
|
92
|
+
"broken": {
|
|
93
|
+
"ClassDeclaration_ReplayDocumentService": {
|
|
94
|
+
"forwardCompat": false
|
|
95
|
+
},
|
|
96
|
+
"ClassDeclaration_FileSnapshotReader": {
|
|
97
|
+
"backCompat": false
|
|
98
|
+
},
|
|
99
|
+
"ClassDeclaration_OpStorage": {
|
|
100
|
+
"backCompat": false
|
|
101
|
+
},
|
|
102
|
+
"ClassDeclaration_ReadDocumentStorageServiceBase": {
|
|
103
|
+
"backCompat": false
|
|
104
|
+
},
|
|
105
|
+
"ClassDeclaration_ReplayController": {
|
|
106
|
+
"backCompat": false
|
|
107
|
+
},
|
|
108
|
+
"ClassDeclaration_SnapshotStorage": {
|
|
109
|
+
"backCompat": false
|
|
110
|
+
},
|
|
111
|
+
"RemovedClassDeclaration_OpStorage": {
|
|
112
|
+
"backCompat": false,
|
|
113
|
+
"forwardCompat": false
|
|
114
|
+
}
|
|
115
|
+
}
|
|
114
116
|
},
|
|
115
117
|
"scripts": {
|
|
116
118
|
"api": "fluid-build . --task api",
|
|
117
|
-
"api-extractor:commonjs": "api-extractor run --
|
|
118
|
-
"api-extractor:esnext": "api-extractor run --
|
|
119
|
+
"api-extractor:commonjs": "api-extractor run --config ./api-extractor-cjs.json",
|
|
120
|
+
"api-extractor:esnext": "api-extractor run --local",
|
|
119
121
|
"build": "fluid-build . --task build",
|
|
120
122
|
"build:compile": "fluid-build . --task compile",
|
|
121
123
|
"build:docs": "fluid-build . --task api",
|
|
122
|
-
"build:esnext": "tsc
|
|
124
|
+
"build:esnext": "tsc --project ./tsconfig.json",
|
|
123
125
|
"check:are-the-types-wrong": "attw --pack . --entrypoints .",
|
|
124
126
|
"check:release-tags": "api-extractor run --local --config ./api-extractor-lint.json",
|
|
125
127
|
"ci:build:docs": "api-extractor run",
|
|
@@ -131,7 +133,7 @@
|
|
|
131
133
|
"lint:fix": "npm run prettier:fix && npm run eslint:fix",
|
|
132
134
|
"prettier": "prettier --check . --cache --ignore-path ../../../.prettierignore",
|
|
133
135
|
"prettier:fix": "prettier --write . --cache --ignore-path ../../../.prettierignore",
|
|
134
|
-
"tsc": "tsc",
|
|
136
|
+
"tsc": "fluid-tsc commonjs --project ./tsconfig.cjs.json && copyfiles -f ../../../common/build/build-common/src/cjs/package.json ./dist",
|
|
135
137
|
"typetests:gen": "fluid-type-test-generator",
|
|
136
138
|
"typetests:prepare": "flub typetests --dir . --reset --previous --normalize"
|
|
137
139
|
}
|
package/src/index.ts
CHANGED
|
@@ -3,13 +3,12 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
export { ReadDocumentStorageServiceBase, ReplayController } from "./replayController";
|
|
7
|
-
export { ReplayDocumentService } from "./replayDocumentService";
|
|
8
|
-
export { ReplayDocumentServiceFactory } from "./replayDocumentServiceFactory";
|
|
6
|
+
export { ReadDocumentStorageServiceBase, ReplayController } from "./replayController.js";
|
|
7
|
+
export { ReplayDocumentService } from "./replayDocumentService.js";
|
|
8
|
+
export { ReplayDocumentServiceFactory } from "./replayDocumentServiceFactory.js";
|
|
9
9
|
export {
|
|
10
10
|
FileSnapshotReader,
|
|
11
11
|
IFileSnapshot,
|
|
12
|
-
OpStorage,
|
|
13
12
|
SnapshotStorage,
|
|
14
13
|
StaticStorageDocumentServiceFactory,
|
|
15
|
-
} from "./storageImplementations";
|
|
14
|
+
} from "./storageImplementations.js";
|
package/src/replayController.ts
CHANGED
|
@@ -33,10 +33,6 @@ export abstract class ReadDocumentStorageServiceBase implements IDocumentStorage
|
|
|
33
33
|
public async downloadSummary(handle: api.ISummaryHandle): Promise<api.ISummaryTree> {
|
|
34
34
|
throw new Error("Invalid operation");
|
|
35
35
|
}
|
|
36
|
-
|
|
37
|
-
public get repositoryUrl(): string {
|
|
38
|
-
throw new Error("Invalid operation");
|
|
39
|
-
}
|
|
40
36
|
}
|
|
41
37
|
|
|
42
38
|
/**
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
} from "@fluidframework/protocol-definitions";
|
|
25
25
|
import { TypedEventEmitter } from "@fluid-internal/client-utils";
|
|
26
26
|
import { delay } from "@fluidframework/core-utils";
|
|
27
|
-
import { ReplayController } from "./replayController";
|
|
27
|
+
import { ReplayController } from "./replayController.js";
|
|
28
28
|
|
|
29
29
|
const ReplayDocumentId = "documentId";
|
|
30
30
|
|
|
@@ -3,11 +3,12 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
+
import { TypedEventEmitter } from "@fluid-internal/client-utils";
|
|
6
7
|
import * as api from "@fluidframework/driver-definitions";
|
|
7
8
|
import { IClient } from "@fluidframework/protocol-definitions";
|
|
8
|
-
import { EmptyDeltaStorageService } from "./emptyDeltaStorageService";
|
|
9
|
-
import { ReplayController } from "./replayController";
|
|
10
|
-
import { ReplayDocumentDeltaConnection } from "./replayDocumentDeltaConnection";
|
|
9
|
+
import { EmptyDeltaStorageService } from "./emptyDeltaStorageService.js";
|
|
10
|
+
import { ReplayController } from "./replayController.js";
|
|
11
|
+
import { ReplayDocumentDeltaConnection } from "./replayDocumentDeltaConnection.js";
|
|
11
12
|
|
|
12
13
|
/**
|
|
13
14
|
* The Replay document service dummies out the snapshot and the delta storage.
|
|
@@ -16,7 +17,10 @@ import { ReplayDocumentDeltaConnection } from "./replayDocumentDeltaConnection";
|
|
|
16
17
|
* @internal
|
|
17
18
|
*/
|
|
18
19
|
// eslint-disable-next-line import/namespace
|
|
19
|
-
export class ReplayDocumentService
|
|
20
|
+
export class ReplayDocumentService
|
|
21
|
+
extends TypedEventEmitter<api.IDocumentServiceEvents>
|
|
22
|
+
implements api.IDocumentService
|
|
23
|
+
{
|
|
20
24
|
public static async create(
|
|
21
25
|
documentService: api.IDocumentService,
|
|
22
26
|
controller: ReplayController,
|
|
@@ -36,7 +40,9 @@ export class ReplayDocumentService implements api.IDocumentService {
|
|
|
36
40
|
constructor(
|
|
37
41
|
private readonly controller: api.IDocumentStorageService,
|
|
38
42
|
private readonly deltaStorage: api.IDocumentDeltaConnection,
|
|
39
|
-
) {
|
|
43
|
+
) {
|
|
44
|
+
super();
|
|
45
|
+
}
|
|
40
46
|
|
|
41
47
|
public dispose() {}
|
|
42
48
|
|
|
@@ -11,9 +11,9 @@ import {
|
|
|
11
11
|
import { ISummaryTree } from "@fluidframework/protocol-definitions";
|
|
12
12
|
import { ITelemetryBaseLogger } from "@fluidframework/core-interfaces";
|
|
13
13
|
import { createChildLogger } from "@fluidframework/telemetry-utils";
|
|
14
|
-
import { ReplayController } from "./replayController";
|
|
15
|
-
import { ReplayControllerStatic } from "./replayDocumentDeltaConnection";
|
|
16
|
-
import { ReplayDocumentService } from "./replayDocumentService";
|
|
14
|
+
import { ReplayController } from "./replayController.js";
|
|
15
|
+
import { ReplayControllerStatic } from "./replayDocumentDeltaConnection.js";
|
|
16
|
+
import { ReplayDocumentService } from "./replayDocumentService.js";
|
|
17
17
|
|
|
18
18
|
/**
|
|
19
19
|
* @internal
|
|
@@ -4,10 +4,12 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import { assert } from "@fluidframework/core-utils";
|
|
7
|
+
import { TypedEventEmitter } from "@fluid-internal/client-utils";
|
|
7
8
|
import {
|
|
8
9
|
IDocumentDeltaConnection,
|
|
9
10
|
IDocumentDeltaStorageService,
|
|
10
11
|
IDocumentService,
|
|
12
|
+
IDocumentServiceEvents,
|
|
11
13
|
IDocumentServiceFactory,
|
|
12
14
|
IDocumentStorageService,
|
|
13
15
|
IResolvedUrl,
|
|
@@ -21,8 +23,8 @@ import {
|
|
|
21
23
|
ISummaryTree,
|
|
22
24
|
} from "@fluidframework/protocol-definitions";
|
|
23
25
|
import { ITelemetryLoggerExt } from "@fluidframework/telemetry-utils";
|
|
24
|
-
import { EmptyDeltaStorageService } from "./emptyDeltaStorageService";
|
|
25
|
-
import { ReadDocumentStorageServiceBase } from "./replayController";
|
|
26
|
+
import { EmptyDeltaStorageService } from "./emptyDeltaStorageService.js";
|
|
27
|
+
import { ReadDocumentStorageServiceBase } from "./replayController.js";
|
|
26
28
|
|
|
27
29
|
/**
|
|
28
30
|
* Structure of snapshot on disk, when we store snapshot as single file
|
|
@@ -141,28 +143,16 @@ export class SnapshotStorage extends ReadDocumentStorageServiceBase {
|
|
|
141
143
|
}
|
|
142
144
|
}
|
|
143
145
|
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
public async getVersions(versionId: string | null, count: number): Promise<IVersion[]> {
|
|
149
|
-
return [];
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
public async getSnapshotTree(version?: IVersion): Promise<ISnapshotTree | null> {
|
|
153
|
-
throw new Error("no snapshot tree should be asked when playing ops");
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
public async readBlob(blobId: string): Promise<ArrayBufferLike> {
|
|
157
|
-
throw new Error(`Unknown blob ID: ${blobId}`);
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
export class StaticStorageDocumentService implements IDocumentService {
|
|
146
|
+
export class StaticStorageDocumentService
|
|
147
|
+
extends TypedEventEmitter<IDocumentServiceEvents>
|
|
148
|
+
implements IDocumentService
|
|
149
|
+
{
|
|
162
150
|
constructor(
|
|
163
151
|
public readonly resolvedUrl: IResolvedUrl,
|
|
164
152
|
private readonly storage: IDocumentStorageService,
|
|
165
|
-
) {
|
|
153
|
+
) {
|
|
154
|
+
super();
|
|
155
|
+
}
|
|
166
156
|
|
|
167
157
|
public dispose() {}
|
|
168
158
|
|
package/tsconfig.json
CHANGED
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
{
|
|
2
|
-
"extends":
|
|
3
|
-
"../../../common/build/build-common/tsconfig.base.json",
|
|
4
|
-
"../../../common/build/build-common/tsconfig.cjs.json",
|
|
5
|
-
],
|
|
2
|
+
"extends": "../../../common/build/build-common/tsconfig.node16.json",
|
|
6
3
|
"include": ["src/**/*"],
|
|
7
4
|
"exclude": ["dist", "node_modules"],
|
|
8
5
|
"compilerOptions": {
|
|
9
6
|
"rootDir": "./src",
|
|
10
|
-
"outDir": "./
|
|
7
|
+
"outDir": "./lib",
|
|
11
8
|
},
|
|
12
9
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"emptyDeltaStorageService.d.mts","sourceRoot":"","sources":["../src/emptyDeltaStorageService.ts"],"names":[],"mappings":"AAAA;;;GAGG;OAEI,EAAE,4BAA4B,EAAE,OAAO,EAAE,MAAM,oCAAoC;OACnF,EAAE,yBAAyB,EAAE,MAAM,sCAAsC;AAGhF,qBAAa,wBAAyB,YAAW,4BAA4B;IAC5E;;;;;OAKG;IACI,aAAa,CACnB,IAAI,EAAE,MAAM,EACZ,EAAE,EAAE,MAAM,GAAG,SAAS,EACtB,WAAW,CAAC,EAAE,WAAW,EACzB,UAAU,CAAC,EAAE,OAAO,GAClB,OAAO,CAAC,yBAAyB,EAAE,CAAC;CAGvC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"emptyDeltaStorageService.mjs","sourceRoot":"","sources":["../src/emptyDeltaStorageService.ts"],"names":[],"mappings":"AAAA;;;GAGG;OAII,EAAE,kBAAkB,EAAE,MAAM,8BAA8B;AAEjE,MAAM,OAAO,wBAAwB;IACpC;;;;;OAKG;IACI,aAAa,CACnB,IAAY,EACZ,EAAsB,EACtB,WAAyB,EACzB,UAAoB;QAEpB,OAAO,kBAAkB,CAAC;IAC3B,CAAC;CACD","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IDocumentDeltaStorageService, IStream } from \"@fluidframework/driver-definitions\";\nimport { ISequencedDocumentMessage } from \"@fluidframework/protocol-definitions\";\nimport { emptyMessageStream } from \"@fluidframework/driver-utils\";\n\nexport class EmptyDeltaStorageService implements IDocumentDeltaStorageService {\n\t/**\n\t * Returns ops from the list of ops generated till now.\n\t * @param from - Ops are returned from + 1.\n\t * @param to - Op are returned from to - 1.\n\t * @returns Array of ops requested by the user.\n\t */\n\tpublic fetchMessages(\n\t\tfrom: number,\n\t\tto: number | undefined,\n\t\tabortSignal?: AbortSignal,\n\t\tcachedOnly?: boolean,\n\t): IStream<ISequencedDocumentMessage[]> {\n\t\treturn emptyMessageStream;\n\t}\n}\n"]}
|
package/lib/index.d.mts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
-
* Licensed under the MIT License.
|
|
4
|
-
*/
|
|
5
|
-
export { ReadDocumentStorageServiceBase, ReplayController } from "./replayController.mjs";
|
|
6
|
-
export { ReplayDocumentService } from "./replayDocumentService.mjs";
|
|
7
|
-
export { ReplayDocumentServiceFactory } from "./replayDocumentServiceFactory.mjs";
|
|
8
|
-
export { FileSnapshotReader, IFileSnapshot, OpStorage, SnapshotStorage, StaticStorageDocumentServiceFactory, } from "./storageImplementations.mjs";
|
|
9
|
-
//# sourceMappingURL=index.d.mts.map
|
package/lib/index.d.mts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;OAEI,EAAE,8BAA8B,EAAE,gBAAgB,EAAE;OACpD,EAAE,qBAAqB,EAAE;OACzB,EAAE,4BAA4B,EAAE;OAChC,EACN,kBAAkB,EAClB,aAAa,EACb,SAAS,EACT,eAAe,EACf,mCAAmC,GACnC"}
|
package/lib/index.mjs
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
-
* Licensed under the MIT License.
|
|
4
|
-
*/
|
|
5
|
-
export { ReadDocumentStorageServiceBase, ReplayController } from "./replayController.mjs";
|
|
6
|
-
export { ReplayDocumentService } from "./replayDocumentService.mjs";
|
|
7
|
-
export { ReplayDocumentServiceFactory } from "./replayDocumentServiceFactory.mjs";
|
|
8
|
-
export { FileSnapshotReader, OpStorage, SnapshotStorage, StaticStorageDocumentServiceFactory, } from "./storageImplementations.mjs";
|
|
9
|
-
//# sourceMappingURL=index.mjs.map
|
package/lib/index.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;OAEI,EAAE,8BAA8B,EAAE,gBAAgB,EAAE;OACpD,EAAE,qBAAqB,EAAE;OACzB,EAAE,4BAA4B,EAAE;OAChC,EACN,kBAAkB,EAElB,SAAS,EACT,eAAe,EACf,mCAAmC,GACnC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport { ReadDocumentStorageServiceBase, ReplayController } from \"./replayController\";\nexport { ReplayDocumentService } from \"./replayDocumentService\";\nexport { ReplayDocumentServiceFactory } from \"./replayDocumentServiceFactory\";\nexport {\n\tFileSnapshotReader,\n\tIFileSnapshot,\n\tOpStorage,\n\tSnapshotStorage,\n\tStaticStorageDocumentServiceFactory,\n} from \"./storageImplementations\";\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"replayController.d.mts","sourceRoot":"","sources":["../src/replayController.ts"],"names":[],"mappings":"AAAA;;;GAGG;OAEI,EACN,gBAAgB,EAChB,uBAAuB,EACvB,eAAe,EACf,MAAM,oCAAoC;OACpC,KAAK,GAAG,MAAM,sCAAsC;AAE3D;;;GAGG;AACH,8BAAsB,8BAA+B,YAAW,uBAAuB;aACtE,WAAW,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,QAAQ,E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CAAC,wBAAwB,CACpC,OAAyB,EACzB,OAAwB;QAExB,MAAM,IAAI,KAAK,CAAC,mBAAmB,CAAC,CAAC;IACtC,CAAC;IAEM,KAAK,CAAC,UAAU,CAAC,IAAqB;QAC5C,MAAM,IAAI,KAAK,CAAC,mBAAmB,CAAC,CAAC;IACtC,CAAC;IAEM,KAAK,CAAC,eAAe,CAAC,MAA0B;QACtD,MAAM,IAAI,KAAK,CAAC,mBAAmB,CAAC,CAAC;IACtC,CAAC;IAED,IAAW,aAAa;QACvB,MAAM,IAAI,KAAK,CAAC,mBAAmB,CAAC,CAAC;IACtC,CAAC;CACD;AAED;;;;;GAKG;AACH,MAAM,OAAgB,gBAAiB,SAAQ,8BAA8B;CA2C5E","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport {\n\tIDocumentService,\n\tIDocumentStorageService,\n\tISummaryContext,\n} from \"@fluidframework/driver-definitions\";\nimport * as api from \"@fluidframework/protocol-definitions\";\n\n/**\n * Partial implementation of IDocumentStorageService\n * @internal\n */\nexport abstract class ReadDocumentStorageServiceBase implements IDocumentStorageService {\n\tpublic abstract getVersions(versionId: string | null, count: number): Promise<api.IVersion[]>;\n\tpublic abstract getSnapshotTree(version?: api.IVersion): Promise<api.ISnapshotTree | null>;\n\tpublic abstract readBlob(blobId: string): Promise<ArrayBufferLike>;\n\n\tpublic async uploadSummaryWithContext(\n\t\tsummary: api.ISummaryTree,\n\t\tcontext: ISummaryContext,\n\t): Promise<string> {\n\t\tthrow new Error(\"Invalid operation\");\n\t}\n\n\tpublic async createBlob(file: ArrayBufferLike): Promise<api.ICreateBlobResponse> {\n\t\tthrow new Error(\"Invalid operation\");\n\t}\n\n\tpublic async downloadSummary(handle: api.ISummaryHandle): Promise<api.ISummaryTree> {\n\t\tthrow new Error(\"Invalid operation\");\n\t}\n\n\tpublic get repositoryUrl(): string {\n\t\tthrow new Error(\"Invalid operation\");\n\t}\n}\n\n/**\n * Replay controller object\n * It controls where we start (snapshot, local file, no snapshots)\n * As well as dispatch of ops\n * @internal\n */\nexport abstract class ReplayController extends ReadDocumentStorageServiceBase {\n\t/**\n\t * Initialize reply controller\n\t * @param documentService - the real document service\n\t * @returns Whether or not the controller should be used.\n\t * If `false` is returned, caller should fallback to original storage.\n\t */\n\tpublic abstract initStorage(documentService: IDocumentService): Promise<boolean>;\n\n\t/**\n\t * Returns sequence number to start processing ops\n\t * Should be zero if not using snapshot, and snapshot seq# otherwise\n\t */\n\tpublic abstract getStartingOpSequence(): Promise<number>;\n\n\t/**\n\t * Returns last op number to fetch from current op\n\t * Note: this API is called while replay() is in progress - next batch of ops is downloaded in parallel\n\t * @param currentOp - current op\n\t */\n\tpublic abstract fetchTo(currentOp: number): number | undefined;\n\n\t/**\n\t * Returns true if no more ops should be processed (or downloaded for future processing).\n\t * It's called at end of each batch with latest op timestamp.\n\t * Also it's called when there are no more ops available (lastTimeStamp === undefined).\n\t * If false is returned and there are no more ops, request for more ops is made every 2 seconds.\n\t * Note: this API is called while replay() is in progress - next batch of ops is downloaded in parallel\n\t * @param currentOp - current op\n\t * @param lastTimeStamp - timestamp of last op (if more ops are available). Undefined otherwise.\n\t */\n\tpublic abstract isDoneFetch(currentOp: number, lastTimeStamp?: number): boolean;\n\n\t/**\n\t * Replay batch of ops\n\t * NOTE: new batch of ops is fetched (fetchTo() & isDoneFetch() APIs are called) while this call is in flights\n\t * @param emitter - callback to emit ops\n\t * @param fetchedOps - ops to process\n\t */\n\tpublic abstract replay(\n\t\temitter: (op: api.ISequencedDocumentMessage[]) => void,\n\t\tfetchedOps: api.ISequencedDocumentMessage[],\n\t): Promise<void>;\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"replayDocumentDeltaConnection.d.mts","sourceRoot":"","sources":["../src/replayDocumentDeltaConnection.ts"],"names":[],"mappings":"AAAA;;;GAGG;OAEI,EAAE,WAAW,EAAE,MAAM,iCAAiC;OACtD,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