@fluidframework/replay-driver 0.59.2001 → 0.59.3000
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 +0 -1
- package/dist/emptyDeltaStorageService.d.ts.map +1 -1
- package/dist/emptyDeltaStorageService.js.map +1 -1
- package/dist/packageVersion.d.ts +1 -1
- package/dist/packageVersion.js +1 -1
- package/dist/packageVersion.js.map +1 -1
- package/dist/replayDocumentDeltaConnection.js +1 -1
- package/dist/replayDocumentDeltaConnection.js.map +1 -1
- package/dist/replayDocumentServiceFactory.js.map +1 -1
- package/dist/storageImplementations.d.ts.map +1 -1
- package/dist/storageImplementations.js +3 -3
- package/dist/storageImplementations.js.map +1 -1
- package/lib/emptyDeltaStorageService.d.ts.map +1 -1
- package/lib/emptyDeltaStorageService.js.map +1 -1
- package/lib/packageVersion.d.ts +1 -1
- package/lib/packageVersion.js +1 -1
- package/lib/packageVersion.js.map +1 -1
- package/lib/replayDocumentServiceFactory.js.map +1 -1
- package/lib/storageImplementations.d.ts.map +1 -1
- package/lib/storageImplementations.js.map +1 -1
- package/lib/test/types/validateReplayDriverPrevious.js.map +1 -1
- package/package.json +8 -7
- package/src/emptyDeltaStorageService.ts +1 -2
- package/src/packageVersion.ts +1 -1
- package/src/replayDocumentServiceFactory.ts +1 -1
- package/src/storageImplementations.ts +3 -3
package/.eslintrc.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"emptyDeltaStorageService.d.ts","sourceRoot":"","sources":["../src/emptyDeltaStorageService.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,4BAA4B,EAAE,OAAO,EAAE,MAAM,oCAAoC,CAAC;AAC3F,OAAO,EAAE,yBAAyB,EAAE,MAAM,sCAAsC,CAAC;AAGjF,qBAAa,wBAAyB,YAAW,4BAA4B;IACzE;;;;;OAKG;IACI,aAAa,CAChB,IAAI,EAAE,MAAM,EACZ,EAAE,EAAE,MAAM,GAAG,SAAS,EACtB,WAAW,CAAC,EAAE,WAAW,EACzB,UAAU,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,yBAAyB,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"emptyDeltaStorageService.d.ts","sourceRoot":"","sources":["../src/emptyDeltaStorageService.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,4BAA4B,EAAE,OAAO,EAAE,MAAM,oCAAoC,CAAC;AAC3F,OAAO,EAAE,yBAAyB,EAAE,MAAM,sCAAsC,CAAC;AAGjF,qBAAa,wBAAyB,YAAW,4BAA4B;IACzE;;;;;OAKG;IACI,aAAa,CAChB,IAAI,EAAE,MAAM,EACZ,EAAE,EAAE,MAAM,GAAG,SAAS,EACtB,WAAW,CAAC,EAAE,WAAW,EACzB,UAAU,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,yBAAyB,EAAE,CAAC;CAGlE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"emptyDeltaStorageService.js","sourceRoot":"","sources":["../src/emptyDeltaStorageService.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAIH,+DAAkE;AAElE,MAAa,wBAAwB;IACjC;;;;;OAKG;IACI,aAAa,CAChB,IAAY,EACZ,EAAsB,EACtB,WAAyB,EACzB,UAAoB;
|
|
1
|
+
{"version":3,"file":"emptyDeltaStorageService.js","sourceRoot":"","sources":["../src/emptyDeltaStorageService.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAIH,+DAAkE;AAElE,MAAa,wBAAwB;IACjC;;;;;OAKG;IACI,aAAa,CAChB,IAAY,EACZ,EAAsB,EACtB,WAAyB,EACzB,UAAoB;QACpB,OAAO,iCAAkB,CAAC;IAC9B,CAAC;CACJ;AAdD,4DAcC","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 /**\n * Returns ops from the list of ops generated till now.\n * @param from - Ops are returned from + 1.\n * @param to - Op are returned from to - 1.\n * @returns Array of ops requested by the user.\n */\n public fetchMessages(\n from: number,\n to: number | undefined,\n abortSignal?: AbortSignal,\n cachedOnly?: boolean): IStream<ISequencedDocumentMessage[]> {\n return emptyMessageStream;\n }\n}\n"]}
|
package/dist/packageVersion.d.ts
CHANGED
|
@@ -5,5 +5,5 @@
|
|
|
5
5
|
* THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY
|
|
6
6
|
*/
|
|
7
7
|
export declare const pkgName = "@fluidframework/replay-driver";
|
|
8
|
-
export declare const pkgVersion = "0.59.
|
|
8
|
+
export declare const pkgVersion = "0.59.3000";
|
|
9
9
|
//# sourceMappingURL=packageVersion.d.ts.map
|
package/dist/packageVersion.js
CHANGED
|
@@ -8,5 +8,5 @@
|
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
9
|
exports.pkgVersion = exports.pkgName = void 0;
|
|
10
10
|
exports.pkgName = "@fluidframework/replay-driver";
|
|
11
|
-
exports.pkgVersion = "0.59.
|
|
11
|
+
exports.pkgVersion = "0.59.3000";
|
|
12
12
|
//# sourceMappingURL=packageVersion.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEU,QAAA,OAAO,GAAG,+BAA+B,CAAC;AAC1C,QAAA,UAAU,GAAG,WAAW,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n *\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY\n */\n\nexport const pkgName = \"@fluidframework/replay-driver\";\nexport const pkgVersion = \"0.59.
|
|
1
|
+
{"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEU,QAAA,OAAO,GAAG,+BAA+B,CAAC;AAC1C,QAAA,UAAU,GAAG,WAAW,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n *\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY\n */\n\nexport const pkgName = \"@fluidframework/replay-driver\";\nexport const pkgVersion = \"0.59.3000\";\n"]}
|
|
@@ -237,7 +237,7 @@ class ReplayDocumentDeltaConnection extends common_utils_1.TypedEventEmitter {
|
|
|
237
237
|
// or because another client keeps submitting new ops.
|
|
238
238
|
done = controller.isDoneFetch(currentOp, undefined);
|
|
239
239
|
if (!done) {
|
|
240
|
-
await common_utils_1.delay(2000);
|
|
240
|
+
await (0, common_utils_1.delay)(2000);
|
|
241
241
|
}
|
|
242
242
|
break;
|
|
243
243
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"replayDocumentDeltaConnection.js","sourceRoot":"","sources":["../src/replayDocumentDeltaConnection.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AASH,+EAW8C;AAC9C,+DAAwE;AACxE,yDAAsD;AAEtD,MAAM,gBAAgB,GAAG,YAAY,CAAC;AAEtC,MAAa,sBAAuB,SAAQ,mCAAgB;IAMxD,gDAAgD;IAEhD;;;;;;OAMG;IACH,YACoB,UAAkB,EAClB,QAAgB,EAChB,UAAoB;QACpC,KAAK,EAAE,CAAC;QAHQ,eAAU,GAAV,UAAU,CAAQ;QAClB,aAAQ,GAAR,QAAQ,CAAQ;QAChB,eAAU,GAAV,UAAU,CAAU;QAbhC,kBAAa,GAAG,CAAC,CAAC;QAetB,IAAI,UAAU,KAAK,IAAI,EAAE;YACrB,qFAAqF;YACrF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;AAEjC,oCAAM,GAAiB;IAC3C,UAAU,EAAE,gBAAgB;IAC5B,MAAM,EAAE,CAAC,gCAAS,CAAC,OAAO,CAAC;IAC3B,QAAQ,EAAE,EAAE;IACZ,IAAI,EAAE;QACF,EAAE,EAAE,EAAE;KACT;IACD,GAAG,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC;IAC5C,GAAG,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,GAAG,EAAE,GAAG,EAAE;IACtD,GAAG,EAAE,KAAK;CACb,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IDisposable } from \"@fluidframework/common-definitions\";\nimport {\n IDocumentDeltaConnection,\n IDocumentDeltaStorageService,\n IDocumentDeltaConnectionEvents,\n IDocumentService,\n} from \"@fluidframework/driver-definitions\";\nimport {\n ConnectionMode,\n IClientConfiguration,\n IConnected,\n IDocumentMessage,\n ISequencedDocumentMessage,\n ISignalClient,\n ISignalMessage,\n ITokenClaims,\n IVersion,\n ScopeType,\n} from \"@fluidframework/protocol-definitions\";\nimport { delay, TypedEventEmitter } from \"@fluidframework/common-utils\";\nimport { ReplayController } from \"./replayController\";\n\nconst ReplayDocumentId = \"documentId\";\n\nexport class ReplayControllerStatic extends ReplayController {\n private static readonly DelayInterval = 50;\n private static readonly ReplayResolution = 15;\n\n private firstTimeStamp: number | undefined;\n private replayCurrent = 0;\n // Simulated delay interval for emitting the ops\n\n /**\n * Helper class\n *\n * @param replayFrom - First op to be played on socket.\n * @param replayTo - Last op number to be played on socket.\n * @param unitIsTime - True is user want to play ops that are within a replay resolution window.\n */\n public constructor(\n public readonly replayFrom: number,\n public readonly replayTo: number,\n public readonly unitIsTime?: boolean) {\n super();\n if (unitIsTime !== true) {\n // There is no code in here to start with snapshot, thus we have to start with op #0.\n this.replayTo = 0;\n }\n }\n\n public async initStorage(documentService: IDocumentService) {\n return true;\n }\n\n public async getVersions(versionId: string | null, count: number): Promise<IVersion[]> {\n return [];\n }\n\n public async getSnapshotTree(version?: IVersion) {\n return version ? Promise.reject(new Error(\"Invalid operation\")) : null;\n }\n\n public async readBlob(blobId: string): Promise<ArrayBufferLike> {\n return Promise.reject(new Error(\"Invalid operation\"));\n }\n\n public async getStartingOpSequence(): Promise<number> {\n return 0;\n }\n\n public fetchTo(currentOp: number) {\n if (!(this.unitIsTime !== true && this.replayTo >= 0)) {\n return undefined;\n }\n return this.replayTo;\n }\n\n public isDoneFetch(currentOp: number, lastTimeStamp?: number) {\n if (this.replayTo >= 0) {\n if (this.unitIsTime === true) {\n return (\n lastTimeStamp !== undefined\n && this.firstTimeStamp !== undefined\n && lastTimeStamp - this.firstTimeStamp >= this.replayTo);\n }\n return currentOp >= this.replayTo;\n }\n return lastTimeStamp === undefined; // No more ops\n }\n\n public skipToIndex(fetchedOps: ISequencedDocumentMessage[]) {\n if (this.replayFrom <= 0) {\n return 0;\n }\n if (this.unitIsTime === true) {\n for (let i = 0; i < fetchedOps.length; i += 1) {\n const timeStamp = fetchedOps[i].timestamp;\n if (timeStamp !== undefined) {\n if (this.firstTimeStamp === undefined) {\n this.firstTimeStamp = timeStamp;\n }\n if (timeStamp - this.firstTimeStamp >= this.replayFrom) {\n return i;\n }\n }\n }\n } else if (this.replayFrom > this.replayCurrent) {\n return this.replayFrom - this.replayCurrent;\n }\n return 0;\n }\n\n public async replay(\n emitter: (op: ISequencedDocumentMessage[]) => void,\n fetchedOps: ISequencedDocumentMessage[]): Promise<void> {\n let current = this.skipToIndex(fetchedOps);\n\n return new Promise((resolve) => {\n const replayNextOps = () => {\n // Emit the ops from replay to the end every \"deltainterval\" milliseconds\n // to simulate the socket stream\n const currentOp = fetchedOps[current];\n const playbackOps = [currentOp];\n let nextInterval = ReplayControllerStatic.DelayInterval;\n current += 1;\n\n if (this.unitIsTime === true) {\n const currentTimeStamp = currentOp.timestamp;\n if (currentTimeStamp !== undefined) {\n // Emit more ops that is in the ReplayResolution window\n\n while (current < fetchedOps.length) {\n const op = fetchedOps[current];\n if (op.timestamp === undefined) {\n // Missing timestamp, just delay the standard amount of time\n break;\n }\n const timeDiff = op.timestamp - currentTimeStamp;\n if (timeDiff >= ReplayControllerStatic.ReplayResolution) {\n // Time exceeded the resolution window, break out the loop\n // and delay for the time difference.\n nextInterval = timeDiff;\n break;\n }\n if (timeDiff < 0) {\n // Time have regressed, just delay the standard amount of time\n break;\n }\n\n // The op is within the ReplayResolution emit it now\n playbackOps.push(op);\n current += 1;\n }\n\n if (this.firstTimeStamp !== undefined\n && this.replayTo >= 0\n && currentTimeStamp + nextInterval - this.firstTimeStamp > this.replayTo) {\n nextInterval = -1;\n }\n }\n }\n scheduleNext(nextInterval);\n emitter(playbackOps);\n };\n const scheduleNext = (nextInterval: number) => {\n if (nextInterval >= 0 && current < fetchedOps.length) {\n setTimeout(replayNextOps, nextInterval);\n } else {\n this.replayCurrent += current;\n resolve();\n }\n };\n scheduleNext(ReplayControllerStatic.DelayInterval);\n });\n }\n}\n\nexport class ReplayDocumentDeltaConnection\n extends TypedEventEmitter<IDocumentDeltaConnectionEvents>\n implements IDocumentDeltaConnection, IDisposable {\n /**\n * Creates a new delta connection and mimics the delta connection to replay ops on it.\n * @param documentService - The document service to be used to get underlying endpoints.\n */\n public static create(\n documentStorageService: IDocumentDeltaStorageService,\n controller: ReplayController): IDocumentDeltaConnection {\n const connection: IConnected = {\n claims: ReplayDocumentDeltaConnection.claims,\n clientId: \"PseudoClientId\",\n existing: true,\n initialMessages: [],\n initialSignals: [],\n initialClients: [],\n maxMessageSize: ReplayDocumentDeltaConnection.ReplayMaxMessageSize,\n mode: \"read\",\n serviceConfiguration: {\n blockSize: 64436,\n maxMessageSize: ReplayDocumentDeltaConnection.ReplayMaxMessageSize,\n summary: {\n idleTime: 5000,\n maxOps: 1000,\n maxTime: 5000 * 12,\n maxAckWaitTime: 600000,\n },\n },\n supportedVersions: [ReplayDocumentDeltaConnection.replayProtocolVersion],\n version: ReplayDocumentDeltaConnection.replayProtocolVersion,\n };\n const deltaConnection = new ReplayDocumentDeltaConnection(connection);\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n deltaConnection.fetchAndEmitOps(documentStorageService, controller);\n\n return deltaConnection;\n }\n\n private static readonly replayProtocolVersion = \"^0.1.0\";\n // Since the replay service never actually sends messages the size below is arbitrary\n private static readonly ReplayMaxMessageSize = 16 * 1024;\n\n private static readonly claims: ITokenClaims = {\n documentId: ReplayDocumentId,\n scopes: [ScopeType.DocRead],\n tenantId: \"\",\n user: {\n id: \"\",\n },\n iat: Math.round(new Date().getTime() / 1000),\n exp: Math.round(new Date().getTime() / 1000) + 60 * 60, // 1 hour expiration\n ver: \"1.0\",\n };\n\n public get clientId(): string {\n return this.details.clientId;\n }\n\n public get mode(): ConnectionMode {\n return this.details.mode;\n }\n\n public get claims(): ITokenClaims {\n return this.details.claims;\n }\n\n public get existing(): boolean {\n return this.details.existing;\n }\n\n public get version(): string {\n return this.details.version;\n }\n\n public get initialMessages(): ISequencedDocumentMessage[] {\n return this.details.initialMessages;\n }\n\n public get initialSignals(): ISignalMessage[] {\n return this.details.initialSignals;\n }\n\n public get initialClients(): ISignalClient[] {\n return this.details.initialClients;\n }\n\n public get serviceConfiguration(): IClientConfiguration {\n return this.details.serviceConfiguration;\n }\n\n public readonly maxMessageSize = ReplayDocumentDeltaConnection.ReplayMaxMessageSize;\n\n constructor(\n public details: IConnected,\n ) {\n super();\n }\n\n public submit(documentMessage: IDocumentMessage[]): void {\n // ReplayDocumentDeltaConnection.submit() can't be called - client never sees its own join on,\n // and thus can never move to sending ops.\n throw new Error(\"ReplayDocumentDeltaConnection.submit() can't be called\");\n }\n\n public async submitSignal(message: any) {\n }\n\n private _disposed = false;\n public get disposed() { return this._disposed; }\n public dispose() { this._disposed = true; }\n\n /**\n * This gets the specified ops from the delta storage endpoint and replays them in the replayer.\n */\n private async fetchAndEmitOps(\n documentStorageService: IDocumentDeltaStorageService,\n controller: ReplayController,\n ): Promise<void> {\n let done;\n let replayPromiseChain = Promise.resolve();\n\n let currentOp = await controller.getStartingOpSequence();\n\n do {\n const fetchTo = controller.fetchTo(currentOp);\n\n const abortController = new AbortController();\n const stream = documentStorageService.fetchMessages(currentOp + 1, fetchTo, abortController.signal);\n do {\n const result = await stream.read();\n\n if (result.done) {\n // No more ops. But, they can show up later, either because document was just created,\n // or because another client keeps submitting new ops.\n done = controller.isDoneFetch(currentOp, undefined);\n if (!done) {\n await delay(2000);\n }\n break;\n }\n replayPromiseChain = replayPromiseChain.then(\n async () => controller.replay((ops) => this.emit(\"op\", ReplayDocumentId, ops), messages));\n\n const messages = result.value;\n currentOp += messages.length;\n done = controller.isDoneFetch(currentOp, messages[messages.length - 1].timestamp);\n } while (!done);\n\n abortController.abort();\n } while (!done);\n return replayPromiseChain;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"replayDocumentDeltaConnection.js","sourceRoot":"","sources":["../src/replayDocumentDeltaConnection.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AASH,+EAW8C;AAC9C,+DAAwE;AACxE,yDAAsD;AAEtD,MAAM,gBAAgB,GAAG,YAAY,CAAC;AAEtC,MAAa,sBAAuB,SAAQ,mCAAgB;IAMxD,gDAAgD;IAEhD;;;;;;OAMG;IACH,YACoB,UAAkB,EAClB,QAAgB,EAChB,UAAoB;QACpC,KAAK,EAAE,CAAC;QAHQ,eAAU,GAAV,UAAU,CAAQ;QAClB,aAAQ,GAAR,QAAQ,CAAQ;QAChB,eAAU,GAAV,UAAU,CAAU;QAbhC,kBAAa,GAAG,CAAC,CAAC;QAetB,IAAI,UAAU,KAAK,IAAI,EAAE;YACrB,qFAAqF;YACrF,IAAI,CAAC,QAAQ,GAAG,CAAC,CAAC;SACrB;IACL,CAAC;IAEM,KAAK,CAAC,WAAW,CAAC,eAAiC;QACtD,OAAO,IAA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AC3B,QAAQ,EAAE,EAAE;IACZ,IAAI,EAAE;QACF,EAAE,EAAE,EAAE;KACT;IACD,GAAG,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC;IAC5C,GAAG,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,GAAG,EAAE,GAAG,EAAE;IACtD,GAAG,EAAE,KAAK;CACb,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IDisposable } from \"@fluidframework/common-definitions\";\nimport {\n IDocumentDeltaConnection,\n IDocumentDeltaStorageService,\n IDocumentDeltaConnectionEvents,\n IDocumentService,\n} from \"@fluidframework/driver-definitions\";\nimport {\n ConnectionMode,\n IClientConfiguration,\n IConnected,\n IDocumentMessage,\n ISequencedDocumentMessage,\n ISignalClient,\n ISignalMessage,\n ITokenClaims,\n IVersion,\n ScopeType,\n} from \"@fluidframework/protocol-definitions\";\nimport { delay, TypedEventEmitter } from \"@fluidframework/common-utils\";\nimport { ReplayController } from \"./replayController\";\n\nconst ReplayDocumentId = \"documentId\";\n\nexport class ReplayControllerStatic extends ReplayController {\n private static readonly DelayInterval = 50;\n private static readonly ReplayResolution = 15;\n\n private firstTimeStamp: number | undefined;\n private replayCurrent = 0;\n // Simulated delay interval for emitting the ops\n\n /**\n * Helper class\n *\n * @param replayFrom - First op to be played on socket.\n * @param replayTo - Last op number to be played on socket.\n * @param unitIsTime - True is user want to play ops that are within a replay resolution window.\n */\n public constructor(\n public readonly replayFrom: number,\n public readonly replayTo: number,\n public readonly unitIsTime?: boolean) {\n super();\n if (unitIsTime !== true) {\n // There is no code in here to start with snapshot, thus we have to start with op #0.\n this.replayTo = 0;\n }\n }\n\n public async initStorage(documentService: IDocumentService) {\n return true;\n }\n\n public async getVersions(versionId: string | null, count: number): Promise<IVersion[]> {\n return [];\n }\n\n public async getSnapshotTree(version?: IVersion) {\n return version ? Promise.reject(new Error(\"Invalid operation\")) : null;\n }\n\n public async readBlob(blobId: string): Promise<ArrayBufferLike> {\n return Promise.reject(new Error(\"Invalid operation\"));\n }\n\n public async getStartingOpSequence(): Promise<number> {\n return 0;\n }\n\n public fetchTo(currentOp: number) {\n if (!(this.unitIsTime !== true && this.replayTo >= 0)) {\n return undefined;\n }\n return this.replayTo;\n }\n\n public isDoneFetch(currentOp: number, lastTimeStamp?: number) {\n if (this.replayTo >= 0) {\n if (this.unitIsTime === true) {\n return (\n lastTimeStamp !== undefined\n && this.firstTimeStamp !== undefined\n && lastTimeStamp - this.firstTimeStamp >= this.replayTo);\n }\n return currentOp >= this.replayTo;\n }\n return lastTimeStamp === undefined; // No more ops\n }\n\n public skipToIndex(fetchedOps: ISequencedDocumentMessage[]) {\n if (this.replayFrom <= 0) {\n return 0;\n }\n if (this.unitIsTime === true) {\n for (let i = 0; i < fetchedOps.length; i += 1) {\n const timeStamp = fetchedOps[i].timestamp;\n if (timeStamp !== undefined) {\n if (this.firstTimeStamp === undefined) {\n this.firstTimeStamp = timeStamp;\n }\n if (timeStamp - this.firstTimeStamp >= this.replayFrom) {\n return i;\n }\n }\n }\n } else if (this.replayFrom > this.replayCurrent) {\n return this.replayFrom - this.replayCurrent;\n }\n return 0;\n }\n\n public async replay(\n emitter: (op: ISequencedDocumentMessage[]) => void,\n fetchedOps: ISequencedDocumentMessage[]): Promise<void> {\n let current = this.skipToIndex(fetchedOps);\n\n return new Promise((resolve) => {\n const replayNextOps = () => {\n // Emit the ops from replay to the end every \"deltainterval\" milliseconds\n // to simulate the socket stream\n const currentOp = fetchedOps[current];\n const playbackOps = [currentOp];\n let nextInterval = ReplayControllerStatic.DelayInterval;\n current += 1;\n\n if (this.unitIsTime === true) {\n const currentTimeStamp = currentOp.timestamp;\n if (currentTimeStamp !== undefined) {\n // Emit more ops that is in the ReplayResolution window\n\n while (current < fetchedOps.length) {\n const op = fetchedOps[current];\n if (op.timestamp === undefined) {\n // Missing timestamp, just delay the standard amount of time\n break;\n }\n const timeDiff = op.timestamp - currentTimeStamp;\n if (timeDiff >= ReplayControllerStatic.ReplayResolution) {\n // Time exceeded the resolution window, break out the loop\n // and delay for the time difference.\n nextInterval = timeDiff;\n break;\n }\n if (timeDiff < 0) {\n // Time have regressed, just delay the standard amount of time\n break;\n }\n\n // The op is within the ReplayResolution emit it now\n playbackOps.push(op);\n current += 1;\n }\n\n if (this.firstTimeStamp !== undefined\n && this.replayTo >= 0\n && currentTimeStamp + nextInterval - this.firstTimeStamp > this.replayTo) {\n nextInterval = -1;\n }\n }\n }\n scheduleNext(nextInterval);\n emitter(playbackOps);\n };\n const scheduleNext = (nextInterval: number) => {\n if (nextInterval >= 0 && current < fetchedOps.length) {\n setTimeout(replayNextOps, nextInterval);\n } else {\n this.replayCurrent += current;\n resolve();\n }\n };\n scheduleNext(ReplayControllerStatic.DelayInterval);\n });\n }\n}\n\nexport class ReplayDocumentDeltaConnection\n extends TypedEventEmitter<IDocumentDeltaConnectionEvents>\n implements IDocumentDeltaConnection, IDisposable {\n /**\n * Creates a new delta connection and mimics the delta connection to replay ops on it.\n * @param documentService - The document service to be used to get underlying endpoints.\n */\n public static create(\n documentStorageService: IDocumentDeltaStorageService,\n controller: ReplayController): IDocumentDeltaConnection {\n const connection: IConnected = {\n claims: ReplayDocumentDeltaConnection.claims,\n clientId: \"PseudoClientId\",\n existing: true,\n initialMessages: [],\n initialSignals: [],\n initialClients: [],\n maxMessageSize: ReplayDocumentDeltaConnection.ReplayMaxMessageSize,\n mode: \"read\",\n serviceConfiguration: {\n blockSize: 64436,\n maxMessageSize: ReplayDocumentDeltaConnection.ReplayMaxMessageSize,\n summary: {\n idleTime: 5000,\n maxOps: 1000,\n maxTime: 5000 * 12,\n maxAckWaitTime: 600000,\n },\n },\n supportedVersions: [ReplayDocumentDeltaConnection.replayProtocolVersion],\n version: ReplayDocumentDeltaConnection.replayProtocolVersion,\n };\n const deltaConnection = new ReplayDocumentDeltaConnection(connection);\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n deltaConnection.fetchAndEmitOps(documentStorageService, controller);\n\n return deltaConnection;\n }\n\n private static readonly replayProtocolVersion = \"^0.1.0\";\n // Since the replay service never actually sends messages the size below is arbitrary\n private static readonly ReplayMaxMessageSize = 16 * 1024;\n\n private static readonly claims: ITokenClaims = {\n documentId: ReplayDocumentId,\n scopes: [ScopeType.DocRead],\n tenantId: \"\",\n user: {\n id: \"\",\n },\n iat: Math.round(new Date().getTime() / 1000),\n exp: Math.round(new Date().getTime() / 1000) + 60 * 60, // 1 hour expiration\n ver: \"1.0\",\n };\n\n public get clientId(): string {\n return this.details.clientId;\n }\n\n public get mode(): ConnectionMode {\n return this.details.mode;\n }\n\n public get claims(): ITokenClaims {\n return this.details.claims;\n }\n\n public get existing(): boolean {\n return this.details.existing;\n }\n\n public get version(): string {\n return this.details.version;\n }\n\n public get initialMessages(): ISequencedDocumentMessage[] {\n return this.details.initialMessages;\n }\n\n public get initialSignals(): ISignalMessage[] {\n return this.details.initialSignals;\n }\n\n public get initialClients(): ISignalClient[] {\n return this.details.initialClients;\n }\n\n public get serviceConfiguration(): IClientConfiguration {\n return this.details.serviceConfiguration;\n }\n\n public readonly maxMessageSize = ReplayDocumentDeltaConnection.ReplayMaxMessageSize;\n\n constructor(\n public details: IConnected,\n ) {\n super();\n }\n\n public submit(documentMessage: IDocumentMessage[]): void {\n // ReplayDocumentDeltaConnection.submit() can't be called - client never sees its own join on,\n // and thus can never move to sending ops.\n throw new Error(\"ReplayDocumentDeltaConnection.submit() can't be called\");\n }\n\n public async submitSignal(message: any) {\n }\n\n private _disposed = false;\n public get disposed() { return this._disposed; }\n public dispose() { this._disposed = true; }\n\n /**\n * This gets the specified ops from the delta storage endpoint and replays them in the replayer.\n */\n private async fetchAndEmitOps(\n documentStorageService: IDocumentDeltaStorageService,\n controller: ReplayController,\n ): Promise<void> {\n let done;\n let replayPromiseChain = Promise.resolve();\n\n let currentOp = await controller.getStartingOpSequence();\n\n do {\n const fetchTo = controller.fetchTo(currentOp);\n\n const abortController = new AbortController();\n const stream = documentStorageService.fetchMessages(currentOp + 1, fetchTo, abortController.signal);\n do {\n const result = await stream.read();\n\n if (result.done) {\n // No more ops. But, they can show up later, either because document was just created,\n // or because another client keeps submitting new ops.\n done = controller.isDoneFetch(currentOp, undefined);\n if (!done) {\n await delay(2000);\n }\n break;\n }\n replayPromiseChain = replayPromiseChain.then(\n async () => controller.replay((ops) => this.emit(\"op\", ReplayDocumentId, ops), messages));\n\n const messages = result.value;\n currentOp += messages.length;\n done = controller.isDoneFetch(currentOp, messages[messages.length - 1].timestamp);\n } while (!done);\n\n abortController.abort();\n } while (!done);\n return replayPromiseChain;\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"replayDocumentServiceFactory.js","sourceRoot":"","sources":["../src/replayDocumentServiceFactory.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAKH,qEAA8D;AAE9D,mFAAyE;AACzE,mEAAgE;AAEhE,MAAa,4BAA4B;IAarC,YACqB,sBAA+C,EAC/C,UAA4B;QAD5B,2BAAsB,GAAtB,sBAAsB,CAAyB;QAC/C,eAAU,GAAV,UAAU,CAAkB;QAC7C,IAAI,CAAC,YAAY,GAAG,sBAAsB,CAAC,YAAY,CAAC;IAC5D,CAAC;IAhBM,MAAM,CAAC,MAAM,CAChB,IAAY,EACZ,EAAU,EACV,sBAA+C;QAC/C,OAAO,IAAI,4BAA4B,CACnC,sBAAsB,EACtB,IAAI,sDAAsB,CAAC,IAAI,EAAE,EAAE,CAAC,CACvC,CAAC;IACN,CAAC;IAUD;;;;;OAKG;IACI,KAAK,CAAC,qBAAqB,CAC9B,WAAyB,EACzB,MAA6B,EAC7B,kBAA4B;QAE5B,iEAAiE;QACjE,wGAAwG;QACxG,MAAM,YAAY,GAAG,6BAAW,CAAC,MAAM,CACnC,MAAM,EAAE,SAAS,CAAC,eAAe,EAAE,
|
|
1
|
+
{"version":3,"file":"replayDocumentServiceFactory.js","sourceRoot":"","sources":["../src/replayDocumentServiceFactory.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAKH,qEAA8D;AAE9D,mFAAyE;AACzE,mEAAgE;AAEhE,MAAa,4BAA4B;IAarC,YACqB,sBAA+C,EAC/C,UAA4B;QAD5B,2BAAsB,GAAtB,sBAAsB,CAAyB;QAC/C,eAAU,GAAV,UAAU,CAAkB;QAC7C,IAAI,CAAC,YAAY,GAAG,sBAAsB,CAAC,YAAY,CAAC;IAC5D,CAAC;IAhBM,MAAM,CAAC,MAAM,CAChB,IAAY,EACZ,EAAU,EACV,sBAA+C;QAC/C,OAAO,IAAI,4BAA4B,CACnC,sBAAsB,EACtB,IAAI,sDAAsB,CAAC,IAAI,EAAE,EAAE,CAAC,CACvC,CAAC;IACN,CAAC;IAUD;;;;;OAKG;IACI,KAAK,CAAC,qBAAqB,CAC9B,WAAyB,EACzB,MAA6B,EAC7B,kBAA4B;QAE5B,iEAAiE;QACjE,wGAAwG;QACxG,MAAM,YAAY,GAAG,6BAAW,CAAC,MAAM,CACnC,MAAM,EAAE,SAAS,CAAC,eAAe,EAAE,EAAE,GAAG,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE,CAAC,gBAAgB,CAAC,CAAC;QAErF,OAAO,6CAAqB,CAAC,MAAM,CAC/B,MAAM,IAAI,CAAC,sBAAsB,CAAC,qBAAqB,CAAC,WAAW,EAAE,YAAY,EAAE,kBAAkB,CAAC,EACtG,IAAI,CAAC,UAAU,CAAC,CAAC;IACzB,CAAC;IAED,8EAA8E;IACvE,KAAK,CAAC,eAAe,CACxB,gBAA8B,EAC9B,WAAyB,EACzB,MAA6B,EAC7B,kBAA4B;QAE5B,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAC;IACvC,CAAC;CACJ;AAjDD,oEAiDC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IDocumentService, IDocumentServiceFactory, IResolvedUrl } from \"@fluidframework/driver-definitions\";\nimport { ISummaryTree } from \"@fluidframework/protocol-definitions\";\nimport { ITelemetryBaseLogger } from \"@fluidframework/common-definitions\";\nimport { ChildLogger } from \"@fluidframework/telemetry-utils\";\nimport { ReplayController } from \"./replayController\";\nimport { ReplayControllerStatic } from \"./replayDocumentDeltaConnection\";\nimport { ReplayDocumentService } from \"./replayDocumentService\";\n\nexport class ReplayDocumentServiceFactory implements IDocumentServiceFactory {\n public static create(\n from: number,\n to: number,\n documentServiceFactory: IDocumentServiceFactory) {\n return new ReplayDocumentServiceFactory(\n documentServiceFactory,\n new ReplayControllerStatic(from, to),\n );\n }\n\n public readonly protocolName;\n\n public constructor(\n private readonly documentServiceFactory: IDocumentServiceFactory,\n private readonly controller: ReplayController) {\n this.protocolName = documentServiceFactory.protocolName;\n }\n\n /**\n * Creates a replay document service which uses the document service of provided\n * documentServiceFactory for connecting to delta stream endpoint.\n * @param resolvedUrl - URL to be used for connecting to endpoints.\n * @returns returns the requested document service\n */\n public async createDocumentService(\n resolvedUrl: IResolvedUrl,\n logger?: ITelemetryBaseLogger,\n clientIsSummarizer?: boolean,\n ): Promise<IDocumentService> {\n // Always include isReplay: true on events for the Replay Driver.\n // It's used in testing/debugging scenarios, so we want to be able to filter these events out sometimes.\n const replayLogger = ChildLogger.create(\n logger, undefined /* namespace */, { all: { isReplay: true } } /* properties */);\n\n return ReplayDocumentService.create(\n await this.documentServiceFactory.createDocumentService(resolvedUrl, replayLogger, clientIsSummarizer),\n this.controller);\n }\n\n // TODO: Issue-2109 Implement detach container api or put appropriate comment.\n public async createContainer(\n createNewSummary: ISummaryTree,\n resolvedUrl: IResolvedUrl,\n logger?: ITelemetryBaseLogger,\n clientIsSummarizer?: boolean,\n ): Promise<IDocumentService> {\n throw new Error(\"Not implemented\");\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storageImplementations.d.ts","sourceRoot":"","sources":["../src/storageImplementations.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EACH,wBAAwB,EACxB,4BAA4B,EAC5B,gBAAgB,EAChB,uBAAuB,EACvB,uBAAuB,EACvB,YAAY,EACf,MAAM,oCAAoC,CAAC;AAE5C,OAAO,EACH,OAAO,EACP,aAAa,EACb,KAAK,EACL,QAAQ,EACR,YAAY,EACf,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAEtE,OAAO,EAAE,8BAA8B,EAAE,MAAM,oBAAoB,CAAC;AAEpE;;GAEG;AACH,MAAM,WAAW,aAAa;IAC1B,IAAI,EAAE,KAAK,CAAC;IACZ,OAAO,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,KAAK,
|
|
1
|
+
{"version":3,"file":"storageImplementations.d.ts","sourceRoot":"","sources":["../src/storageImplementations.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EACH,wBAAwB,EACxB,4BAA4B,EAC5B,gBAAgB,EAChB,uBAAuB,EACvB,uBAAuB,EACvB,YAAY,EACf,MAAM,oCAAoC,CAAC;AAE5C,OAAO,EACH,OAAO,EACP,aAAa,EACb,KAAK,EACL,QAAQ,EACR,YAAY,EACf,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAEtE,OAAO,EAAE,8BAA8B,EAAE,MAAM,oBAAoB,CAAC;AAEpE;;GAEG;AACH,MAAM,WAAW,aAAa;IAC1B,IAAI,EAAE,KAAK,CAAC;IACZ,OAAO,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,KAAK,CAAC;KAAE,CAAC;CACtC;AAED,qBAAa,kBAAmB,SAAQ,8BAA+B,YAAW,uBAAuB;IAErG,SAAS,CAAC,MAAM,CAAC,QAAQ,CAAC,wBAAwB,uBAAuB;IA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Q,8BAA8B;IAC5C,WAAW,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC;IAIzE,eAAe,CAAC,OAAO,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC;IAIlE,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC;CAGlE;AAED,qBAAa,4BAA6B,YAAW,gBAAgB;IACrD,OAAO,CAAC,QAAQ,CAAC,OAAO;gBAAP,OAAO,EAAE,uBAAuB;IAEtD,OAAO;IAGd,IAAW,WAAW,IAAI,YAAY,CAErC;IAEY,gBAAgB,IAAI,OAAO,CAAC,uBAAuB,CAAC;IAIpD,qBAAqB,IAAI,OAAO,CAAC,4BAA4B,CAAC;IAI9D,oBAAoB,CAAC,MAAM,EAAE,OAAO,GAAG,OAAO,CAAC,wBAAwB,CAAC;CAIxF;AAED,qBAAa,mCAAoC,YAAW,uBAAuB;IAE5D,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAE,uBAAuB;IADtE,SAAgB,YAAY,2BAA2B;gBACjB,OAAO,EAAE,uBAAuB;IAEzD,qBAAqB,CAC9B,OAAO,EAAE,YAAY,EACrB,MAAM,CAAC,EAAE,gBAAgB,EACzB,kBAAkB,CAAC,EAAE,OAAO,GAC7B,OAAO,CAAC,gBAAgB,CAAC;IAKf,eAAe,CACxB,gBAAgB,EAAE,YAAY,EAC9B,WAAW,EAAE,YAAY,EACzB,MAAM,EAAE,gBAAgB,EACxB,kBAAkB,CAAC,EAAE,OAAO,GAC7B,OAAO,CAAC,gBAAgB,CAAC;CAG/B"}
|
|
@@ -16,7 +16,7 @@ class FileSnapshotReader extends replayController_1.ReadDocumentStorageServiceBa
|
|
|
16
16
|
this.trees = {};
|
|
17
17
|
this.commits = json.commits;
|
|
18
18
|
this.blobs = new Map();
|
|
19
|
-
this.docTree = driver_utils_1.buildSnapshotTree(json.tree.entries, this.blobs);
|
|
19
|
+
this.docTree = (0, driver_utils_1.buildSnapshotTree)(json.tree.entries, this.blobs);
|
|
20
20
|
}
|
|
21
21
|
async getVersions(versionId, count) {
|
|
22
22
|
if (this.docId === undefined || this.docId === versionId || versionId === null) {
|
|
@@ -43,7 +43,7 @@ class FileSnapshotReader extends replayController_1.ReadDocumentStorageServiceBa
|
|
|
43
43
|
if (tree === undefined) {
|
|
44
44
|
throw new Error(`Can't find version ${versionRequested.id}`);
|
|
45
45
|
}
|
|
46
|
-
this.trees[versionRequested.id] = snapshotTree = driver_utils_1.buildSnapshotTree(tree.entries, this.blobs);
|
|
46
|
+
this.trees[versionRequested.id] = snapshotTree = (0, driver_utils_1.buildSnapshotTree)(tree.entries, this.blobs);
|
|
47
47
|
}
|
|
48
48
|
return snapshotTree;
|
|
49
49
|
}
|
|
@@ -63,7 +63,7 @@ class SnapshotStorage extends replayController_1.ReadDocumentStorageServiceBase
|
|
|
63
63
|
super();
|
|
64
64
|
this.storage = storage;
|
|
65
65
|
this.docTree = docTree;
|
|
66
|
-
common_utils_1.assert(!!this.docTree, 0x0b0 /* "Missing document snapshot tree!" */);
|
|
66
|
+
(0, common_utils_1.assert)(!!this.docTree, 0x0b0 /* "Missing document snapshot tree!" */);
|
|
67
67
|
}
|
|
68
68
|
async getVersions(versionId, count) {
|
|
69
69
|
if (this.docId === undefined || this.docId === versionId || versionId === null) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storageImplementations.js","sourceRoot":"","sources":["../src/storageImplementations.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,+DAAsD;AAStD,+DAAiE;AASjE,yEAAsE;AACtE,yDAAoE;AAUpE,MAAa,kBAAmB,SAAQ,iDAA8B;IAUlE,YAAmB,IAAmB;QAClC,KAAK,EAAE,CAAC;QAJO,YAAO,GAA6B,EAAE,CAAC;QACvC,UAAK,GAAqC,EAAE,CAAC;QAI5D,IAAI,CAAC,OAAO,G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C,MAAe;QAC7C,4DAA4D;QAC5D,OAAO,IAAI,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC;IAClC,CAAC;CACJ;AAtBD,oEAsBC;AAED,MAAa,mCAAmC;IAE5C,YAAsC,OAAgC;QAAhC,YAAO,GAAP,OAAO,CAAyB;QADtD,iBAAY,GAAG,uBAAuB,CAAC;IACmB,CAAC;IAEpE,KAAK,CAAC,qBAAqB,CAC9B,OAAqB,EACrB,MAAyB,EACzB,kBAA4B;QAE5B,OAAO,IAAI,4BAA4B,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC1D,CAAC;IAED,8EAA8E;IACvE,KAAK,CAAC,eAAe,CACxB,gBAA8B,EAC9B,WAAyB,EACzB,MAAwB,EACxB,kBAA4B;QAE5B,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAC;IACvC,CAAC;CACJ;AArBD,kFAqBC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert } from \"@fluidframework/common-utils\";\nimport {\n IDocumentDeltaConnection,\n IDocumentDeltaStorageService,\n IDocumentService,\n IDocumentServiceFactory,\n IDocumentStorageService,\n IResolvedUrl,\n} from \"@fluidframework/driver-definitions\";\nimport { buildSnapshotTree } from \"@fluidframework/driver-utils\";\nimport {\n IClient,\n ISnapshotTree,\n ITree,\n IVersion,\n ISummaryTree,\n} from \"@fluidframework/protocol-definitions\";\nimport { ITelemetryLogger } from \"@fluidframework/common-definitions\";\nimport { EmptyDeltaStorageService } from \"./emptyDeltaStorageService\";\nimport { ReadDocumentStorageServiceBase } from \"./replayController\";\n\n/**\n * Structure of snapshot on disk, when we store snapshot as single file\n */\nexport interface IFileSnapshot {\n tree: ITree;\n commits: { [key: string]: ITree };\n}\n\nexport class FileSnapshotReader extends ReadDocumentStorageServiceBase implements IDocumentStorageService {\n // IVersion.treeId used to communicate between getVersions() & getSnapshotTree() calls to indicate IVersion is ours.\n protected static readonly FileStorageVersionTreeId = \"FileStorageTreeId\";\n\n protected docId?: string;\n protected docTree: ISnapshotTree;\n protected blobs: Map<string, ArrayBufferLike>;\n protected readonly commits: { [key: string]: ITree } = {};\n protected readonly trees: { [key: string]: ISnapshotTree } = {};\n\n public constructor(json: IFileSnapshot) {\n super();\n this.commits = json.commits;\n\n this.blobs = new Map<string, ArrayBufferLike>();\n this.docTree = buildSnapshotTree(json.tree.entries, this.blobs);\n }\n\n public async getVersions(\n versionId: string | null,\n count: number,\n ): Promise<IVersion[]> {\n if (this.docId === undefined || this.docId === versionId || versionId === null) {\n if (versionId !== null) {\n this.docId = versionId;\n }\n return [{ id: \"latest\", treeId: \"\" }];\n }\n\n if (this.commits[versionId] !== undefined) {\n return [{ id: versionId, treeId: FileSnapshotReader.FileStorageVersionTreeId }];\n }\n throw new Error(`Unknown version ID: ${versionId}`);\n }\n\n public async getSnapshotTree(versionRequested?: IVersion): Promise<ISnapshotTree | null> {\n if (!versionRequested || versionRequested.id === \"latest\") {\n return this.docTree;\n }\n if (versionRequested.treeId !== FileSnapshotReader.FileStorageVersionTreeId) {\n throw new Error(`Unknown version id: ${versionRequested}`);\n }\n\n let snapshotTree = this.trees[versionRequested.id];\n if (snapshotTree === undefined) {\n const tree = this.commits[versionRequested.id];\n if (tree === undefined) {\n throw new Error(`Can't find version ${versionRequested.id}`);\n }\n\n this.trees[versionRequested.id] = snapshotTree = buildSnapshotTree(tree.entries, this.blobs);\n }\n return snapshotTree;\n }\n\n public async readBlob(blobId: string): Promise<ArrayBufferLike> {\n const blob = this.blobs.get(blobId);\n if (blob !== undefined) {\n return blob;\n }\n throw new Error(`Unknown blob ID: ${blobId}`);\n }\n}\n\nexport class SnapshotStorage extends ReadDocumentStorageServiceBase {\n protected docId?: string;\n\n constructor(\n protected readonly storage: IDocumentStorageService,\n protected readonly docTree: ISnapshotTree | null) {\n super();\n assert(!!this.docTree, 0x0b0 /* \"Missing document snapshot tree!\" */);\n }\n\n public async getVersions(versionId: string | null, count: number): Promise<IVersion[]> {\n if (this.docId === undefined || this.docId === versionId || versionId === null) {\n if (versionId !== null) {\n this.docId = versionId;\n }\n return [{ id: \"latest\", treeId: \"\" }];\n }\n return this.storage.getVersions(versionId, count);\n }\n\n public async getSnapshotTree(versionRequested?: IVersion): Promise<ISnapshotTree | null> {\n if (versionRequested && versionRequested.id !== \"latest\") {\n return this.storage.getSnapshotTree(versionRequested);\n }\n\n return this.docTree;\n }\n\n public async readBlob(blobId: string): Promise<ArrayBufferLike> {\n return this.storage.readBlob(blobId);\n }\n}\n\nexport class OpStorage extends ReadDocumentStorageServiceBase {\n public async getVersions(versionId: string | null, count: number): Promise<IVersion[]> {\n return [];\n }\n\n public async getSnapshotTree(version?: IVersion): Promise<ISnapshotTree | null> {\n throw new Error(\"no snapshot tree should be asked when playing ops\");\n }\n\n public async readBlob(blobId: string): Promise<ArrayBufferLike> {\n throw new Error(`Unknown blob ID: ${blobId}`);\n }\n}\n\nexport class StaticStorageDocumentService implements IDocumentService {\n constructor(private readonly storage: IDocumentStorageService) { }\n\n public dispose() {}\n\n // TODO: Issue-2109 Implement detach container api or put appropriate comment.\n public get resolvedUrl(): IResolvedUrl {\n throw new Error(\"Not implemented\");\n }\n\n public async connectToStorage(): Promise<IDocumentStorageService> {\n return this.storage;\n }\n\n public async connectToDeltaStorage(): Promise<IDocumentDeltaStorageService> {\n return new EmptyDeltaStorageService();\n }\n\n public async connectToDeltaStream(client: IClient): Promise<IDocumentDeltaConnection> {\n // We have no delta stream, so make it not return forever...\n return new Promise(() => { });\n }\n}\n\nexport class StaticStorageDocumentServiceFactory implements IDocumentServiceFactory {\n public readonly protocolName = \"fluid-static-storage:\";\n public constructor(protected readonly storage: IDocumentStorageService) { }\n\n public async createDocumentService(\n fileURL: IResolvedUrl,\n logger?: ITelemetryLogger,\n clientIsSummarizer?: boolean,\n ): Promise<IDocumentService> {\n return new StaticStorageDocumentService(this.storage);\n }\n\n // TODO: Issue-2109 Implement detach container api or put appropriate comment.\n public async createContainer(\n createNewSummary: ISummaryTree,\n resolvedUrl: IResolvedUrl,\n logger: ITelemetryLogger,\n clientIsSummarizer?: boolean,\n ): Promise<IDocumentService> {\n throw new Error(\"Not implemented\");\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"storageImplementations.js","sourceRoot":"","sources":["../src/storageImplementations.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,+DAAsD;AAStD,+DAAiE;AASjE,yEAAsE;AACtE,yDAAoE;AAUpE,MAAa,kBAAmB,SAAQ,iDAA8B;IAUlE,YAAmB,IAAmB;QAClC,KAAK,EAAE,CAAC;QAJO,YAAO,GAA8B,EAAE,CAAC;QACxC,UAAK,GAAsC,EAAE,CAAC;QAI7D,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;QAE5B,IAAI,CAAC,KAAK,GAAG,IAAI,GAAG,EAA2B,CAAC;QAChD,IAAI,CAAC,OAAO,GAAG,IAAA,gCAAiB,EAAC,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;IACpE,CAAC;IAEM,KAAK,CAAC,WAAW,CACpB,SAAwB,EACxB,KAAa;QAEb,IAAI,IAAI,CAAC,KAAK,KAAK,SAAS,IAAI,IAAI,CAAC,KAAK,KAAK,SAAS,IAAI,SAAS,KAAK,IAAI,EAAE;YAC5E,IAAI,SAAS,KAAK,IAAI,EAAE;gBACpB,IAAI,CAAC,KAAK,GAAG,SAAS,CAAC;aAC1B;YACD,OAAO,CAAC,EAAE,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,CAAC;SACzC;QAED,IAAI,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,KAAK,SAAS,EAAE;YACvC,OAAO,CAAC,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,kBAAkB,CAAC,wBAAwB,EAAE,CAAC,CAAC;SACnF;QACD,MAAM,IAAI,KAAK,CAA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AQ,CAAC,MAAc;QAChC,MAAM,IAAI,KAAK,CAAC,oBAAoB,MAAM,EAAE,CAAC,CAAC;IAClD,CAAC;CACJ;AAZD,8BAYC;AAED,MAAa,4BAA4B;IACrC,YAA6B,OAAgC;QAAhC,YAAO,GAAP,OAAO,CAAyB;IAAI,CAAC;IAE3D,OAAO,KAAI,CAAC;IAEnB,8EAA8E;IAC9E,IAAW,WAAW;QAClB,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAC;IACvC,CAAC;IAEM,KAAK,CAAC,gBAAgB;QACzB,OAAO,IAAI,CAAC,OAAO,CAAC;IACxB,CAAC;IAEM,KAAK,CAAC,qBAAqB;QAC9B,OAAO,IAAI,mDAAwB,EAAE,CAAC;IAC1C,CAAC;IAEM,KAAK,CAAC,oBAAoB,CAAC,MAAe;QAC7C,4DAA4D;QAC5D,OAAO,IAAI,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC;IAClC,CAAC;CACJ;AAtBD,oEAsBC;AAED,MAAa,mCAAmC;IAE5C,YAAsC,OAAgC;QAAhC,YAAO,GAAP,OAAO,CAAyB;QADtD,iBAAY,GAAG,uBAAuB,CAAC;IACmB,CAAC;IAEpE,KAAK,CAAC,qBAAqB,CAC9B,OAAqB,EACrB,MAAyB,EACzB,kBAA4B;QAE5B,OAAO,IAAI,4BAA4B,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC1D,CAAC;IAED,8EAA8E;IACvE,KAAK,CAAC,eAAe,CACxB,gBAA8B,EAC9B,WAAyB,EACzB,MAAwB,EACxB,kBAA4B;QAE5B,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAC;IACvC,CAAC;CACJ;AArBD,kFAqBC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert } from \"@fluidframework/common-utils\";\nimport {\n IDocumentDeltaConnection,\n IDocumentDeltaStorageService,\n IDocumentService,\n IDocumentServiceFactory,\n IDocumentStorageService,\n IResolvedUrl,\n} from \"@fluidframework/driver-definitions\";\nimport { buildSnapshotTree } from \"@fluidframework/driver-utils\";\nimport {\n IClient,\n ISnapshotTree,\n ITree,\n IVersion,\n ISummaryTree,\n} from \"@fluidframework/protocol-definitions\";\nimport { ITelemetryLogger } from \"@fluidframework/common-definitions\";\nimport { EmptyDeltaStorageService } from \"./emptyDeltaStorageService\";\nimport { ReadDocumentStorageServiceBase } from \"./replayController\";\n\n/**\n * Structure of snapshot on disk, when we store snapshot as single file\n */\nexport interface IFileSnapshot {\n tree: ITree;\n commits: { [key: string]: ITree; };\n}\n\nexport class FileSnapshotReader extends ReadDocumentStorageServiceBase implements IDocumentStorageService {\n // IVersion.treeId used to communicate between getVersions() & getSnapshotTree() calls to indicate IVersion is ours.\n protected static readonly FileStorageVersionTreeId = \"FileStorageTreeId\";\n\n protected docId?: string;\n protected docTree: ISnapshotTree;\n protected blobs: Map<string, ArrayBufferLike>;\n protected readonly commits: { [key: string]: ITree; } = {};\n protected readonly trees: { [key: string]: ISnapshotTree; } = {};\n\n public constructor(json: IFileSnapshot) {\n super();\n this.commits = json.commits;\n\n this.blobs = new Map<string, ArrayBufferLike>();\n this.docTree = buildSnapshotTree(json.tree.entries, this.blobs);\n }\n\n public async getVersions(\n versionId: string | null,\n count: number,\n ): Promise<IVersion[]> {\n if (this.docId === undefined || this.docId === versionId || versionId === null) {\n if (versionId !== null) {\n this.docId = versionId;\n }\n return [{ id: \"latest\", treeId: \"\" }];\n }\n\n if (this.commits[versionId] !== undefined) {\n return [{ id: versionId, treeId: FileSnapshotReader.FileStorageVersionTreeId }];\n }\n throw new Error(`Unknown version ID: ${versionId}`);\n }\n\n public async getSnapshotTree(versionRequested?: IVersion): Promise<ISnapshotTree | null> {\n if (!versionRequested || versionRequested.id === \"latest\") {\n return this.docTree;\n }\n if (versionRequested.treeId !== FileSnapshotReader.FileStorageVersionTreeId) {\n throw new Error(`Unknown version id: ${versionRequested}`);\n }\n\n let snapshotTree = this.trees[versionRequested.id];\n if (snapshotTree === undefined) {\n const tree = this.commits[versionRequested.id];\n if (tree === undefined) {\n throw new Error(`Can't find version ${versionRequested.id}`);\n }\n\n this.trees[versionRequested.id] = snapshotTree = buildSnapshotTree(tree.entries, this.blobs);\n }\n return snapshotTree;\n }\n\n public async readBlob(blobId: string): Promise<ArrayBufferLike> {\n const blob = this.blobs.get(blobId);\n if (blob !== undefined) {\n return blob;\n }\n throw new Error(`Unknown blob ID: ${blobId}`);\n }\n}\n\nexport class SnapshotStorage extends ReadDocumentStorageServiceBase {\n protected docId?: string;\n\n constructor(\n protected readonly storage: IDocumentStorageService,\n protected readonly docTree: ISnapshotTree | null) {\n super();\n assert(!!this.docTree, 0x0b0 /* \"Missing document snapshot tree!\" */);\n }\n\n public async getVersions(versionId: string | null, count: number): Promise<IVersion[]> {\n if (this.docId === undefined || this.docId === versionId || versionId === null) {\n if (versionId !== null) {\n this.docId = versionId;\n }\n return [{ id: \"latest\", treeId: \"\" }];\n }\n return this.storage.getVersions(versionId, count);\n }\n\n public async getSnapshotTree(versionRequested?: IVersion): Promise<ISnapshotTree | null> {\n if (versionRequested && versionRequested.id !== \"latest\") {\n return this.storage.getSnapshotTree(versionRequested);\n }\n\n return this.docTree;\n }\n\n public async readBlob(blobId: string): Promise<ArrayBufferLike> {\n return this.storage.readBlob(blobId);\n }\n}\n\nexport class OpStorage extends ReadDocumentStorageServiceBase {\n public async getVersions(versionId: string | null, count: number): Promise<IVersion[]> {\n return [];\n }\n\n public async getSnapshotTree(version?: IVersion): Promise<ISnapshotTree | null> {\n throw new Error(\"no snapshot tree should be asked when playing ops\");\n }\n\n public async readBlob(blobId: string): Promise<ArrayBufferLike> {\n throw new Error(`Unknown blob ID: ${blobId}`);\n }\n}\n\nexport class StaticStorageDocumentService implements IDocumentService {\n constructor(private readonly storage: IDocumentStorageService) { }\n\n public dispose() {}\n\n // TODO: Issue-2109 Implement detach container api or put appropriate comment.\n public get resolvedUrl(): IResolvedUrl {\n throw new Error(\"Not implemented\");\n }\n\n public async connectToStorage(): Promise<IDocumentStorageService> {\n return this.storage;\n }\n\n public async connectToDeltaStorage(): Promise<IDocumentDeltaStorageService> {\n return new EmptyDeltaStorageService();\n }\n\n public async connectToDeltaStream(client: IClient): Promise<IDocumentDeltaConnection> {\n // We have no delta stream, so make it not return forever...\n return new Promise(() => { });\n }\n}\n\nexport class StaticStorageDocumentServiceFactory implements IDocumentServiceFactory {\n public readonly protocolName = \"fluid-static-storage:\";\n public constructor(protected readonly storage: IDocumentStorageService) { }\n\n public async createDocumentService(\n fileURL: IResolvedUrl,\n logger?: ITelemetryLogger,\n clientIsSummarizer?: boolean,\n ): Promise<IDocumentService> {\n return new StaticStorageDocumentService(this.storage);\n }\n\n // TODO: Issue-2109 Implement detach container api or put appropriate comment.\n public async createContainer(\n createNewSummary: ISummaryTree,\n resolvedUrl: IResolvedUrl,\n logger: ITelemetryLogger,\n clientIsSummarizer?: boolean,\n ): Promise<IDocumentService> {\n throw new Error(\"Not implemented\");\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"emptyDeltaStorageService.d.ts","sourceRoot":"","sources":["../src/emptyDeltaStorageService.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,4BAA4B,EAAE,OAAO,EAAE,MAAM,oCAAoC,CAAC;AAC3F,OAAO,EAAE,yBAAyB,EAAE,MAAM,sCAAsC,CAAC;AAGjF,qBAAa,wBAAyB,YAAW,4BAA4B;IACzE;;;;;OAKG;IACI,aAAa,CAChB,IAAI,EAAE,MAAM,EACZ,EAAE,EAAE,MAAM,GAAG,SAAS,EACtB,WAAW,CAAC,EAAE,WAAW,EACzB,UAAU,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,yBAAyB,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"emptyDeltaStorageService.d.ts","sourceRoot":"","sources":["../src/emptyDeltaStorageService.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,4BAA4B,EAAE,OAAO,EAAE,MAAM,oCAAoC,CAAC;AAC3F,OAAO,EAAE,yBAAyB,EAAE,MAAM,sCAAsC,CAAC;AAGjF,qBAAa,wBAAyB,YAAW,4BAA4B;IACzE;;;;;OAKG;IACI,aAAa,CAChB,IAAI,EAAE,MAAM,EACZ,EAAE,EAAE,MAAM,GAAG,SAAS,EACtB,WAAW,CAAC,EAAE,WAAW,EACzB,UAAU,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,yBAAyB,EAAE,CAAC;CAGlE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"emptyDeltaStorageService.js","sourceRoot":"","sources":["../src/emptyDeltaStorageService.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAElE,MAAM,OAAO,wBAAwB;IACjC;;;;;OAKG;IACI,aAAa,CAChB,IAAY,EACZ,EAAsB,EACtB,WAAyB,EACzB,UAAoB;
|
|
1
|
+
{"version":3,"file":"emptyDeltaStorageService.js","sourceRoot":"","sources":["../src/emptyDeltaStorageService.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAElE,MAAM,OAAO,wBAAwB;IACjC;;;;;OAKG;IACI,aAAa,CAChB,IAAY,EACZ,EAAsB,EACtB,WAAyB,EACzB,UAAoB;QACpB,OAAO,kBAAkB,CAAC;IAC9B,CAAC;CACJ","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 /**\n * Returns ops from the list of ops generated till now.\n * @param from - Ops are returned from + 1.\n * @param to - Op are returned from to - 1.\n * @returns Array of ops requested by the user.\n */\n public fetchMessages(\n from: number,\n to: number | undefined,\n abortSignal?: AbortSignal,\n cachedOnly?: boolean): IStream<ISequencedDocumentMessage[]> {\n return emptyMessageStream;\n }\n}\n"]}
|
package/lib/packageVersion.d.ts
CHANGED
|
@@ -5,5 +5,5 @@
|
|
|
5
5
|
* THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY
|
|
6
6
|
*/
|
|
7
7
|
export declare const pkgName = "@fluidframework/replay-driver";
|
|
8
|
-
export declare const pkgVersion = "0.59.
|
|
8
|
+
export declare const pkgVersion = "0.59.3000";
|
|
9
9
|
//# sourceMappingURL=packageVersion.d.ts.map
|
package/lib/packageVersion.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,CAAC,MAAM,OAAO,GAAG,+BAA+B,CAAC;AACvD,MAAM,CAAC,MAAM,UAAU,GAAG,WAAW,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n *\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY\n */\n\nexport const pkgName = \"@fluidframework/replay-driver\";\nexport const pkgVersion = \"0.59.
|
|
1
|
+
{"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,CAAC,MAAM,OAAO,GAAG,+BAA+B,CAAC;AACvD,MAAM,CAAC,MAAM,UAAU,GAAG,WAAW,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n *\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY\n */\n\nexport const pkgName = \"@fluidframework/replay-driver\";\nexport const pkgVersion = \"0.59.3000\";\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"replayDocumentServiceFactory.js","sourceRoot":"","sources":["../src/replayDocumentServiceFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAE9D,OAAO,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AACzE,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAEhE,MAAM,OAAO,4BAA4B;IAarC,YACqB,sBAA+C,EAC/C,UAA4B;QAD5B,2BAAsB,GAAtB,sBAAsB,CAAyB;QAC/C,eAAU,GAAV,UAAU,CAAkB;QAC7C,IAAI,CAAC,YAAY,GAAG,sBAAsB,CAAC,YAAY,CAAC;IAC5D,CAAC;IAhBM,MAAM,CAAC,MAAM,CAChB,IAAY,EACZ,EAAU,EACV,sBAA+C;QAC/C,OAAO,IAAI,4BAA4B,CACnC,sBAAsB,EACtB,IAAI,sBAAsB,CAAC,IAAI,EAAE,EAAE,CAAC,CACvC,CAAC;IACN,CAAC;IAUD;;;;;OAKG;IACI,KAAK,CAAC,qBAAqB,CAC9B,WAAyB,EACzB,MAA6B,EAC7B,kBAA4B;QAE5B,iEAAiE;QACjE,wGAAwG;QACxG,MAAM,YAAY,GAAG,WAAW,CAAC,MAAM,CACnC,MAAM,EAAE,SAAS,CAAC,eAAe,EAAE,
|
|
1
|
+
{"version":3,"file":"replayDocumentServiceFactory.js","sourceRoot":"","sources":["../src/replayDocumentServiceFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAE9D,OAAO,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AACzE,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAEhE,MAAM,OAAO,4BAA4B;IAarC,YACqB,sBAA+C,EAC/C,UAA4B;QAD5B,2BAAsB,GAAtB,sBAAsB,CAAyB;QAC/C,eAAU,GAAV,UAAU,CAAkB;QAC7C,IAAI,CAAC,YAAY,GAAG,sBAAsB,CAAC,YAAY,CAAC;IAC5D,CAAC;IAhBM,MAAM,CAAC,MAAM,CAChB,IAAY,EACZ,EAAU,EACV,sBAA+C;QAC/C,OAAO,IAAI,4BAA4B,CACnC,sBAAsB,EACtB,IAAI,sBAAsB,CAAC,IAAI,EAAE,EAAE,CAAC,CACvC,CAAC;IACN,CAAC;IAUD;;;;;OAKG;IACI,KAAK,CAAC,qBAAqB,CAC9B,WAAyB,EACzB,MAA6B,EAC7B,kBAA4B;QAE5B,iEAAiE;QACjE,wGAAwG;QACxG,MAAM,YAAY,GAAG,WAAW,CAAC,MAAM,CACnC,MAAM,EAAE,SAAS,CAAC,eAAe,EAAE,EAAE,GAAG,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE,CAAC,gBAAgB,CAAC,CAAC;QAErF,OAAO,qBAAqB,CAAC,MAAM,CAC/B,MAAM,IAAI,CAAC,sBAAsB,CAAC,qBAAqB,CAAC,WAAW,EAAE,YAAY,EAAE,kBAAkB,CAAC,EACtG,IAAI,CAAC,UAAU,CAAC,CAAC;IACzB,CAAC;IAED,8EAA8E;IACvE,KAAK,CAAC,eAAe,CACxB,gBAA8B,EAC9B,WAAyB,EACzB,MAA6B,EAC7B,kBAA4B;QAE5B,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAC;IACvC,CAAC;CACJ","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IDocumentService, IDocumentServiceFactory, IResolvedUrl } from \"@fluidframework/driver-definitions\";\nimport { ISummaryTree } from \"@fluidframework/protocol-definitions\";\nimport { ITelemetryBaseLogger } from \"@fluidframework/common-definitions\";\nimport { ChildLogger } from \"@fluidframework/telemetry-utils\";\nimport { ReplayController } from \"./replayController\";\nimport { ReplayControllerStatic } from \"./replayDocumentDeltaConnection\";\nimport { ReplayDocumentService } from \"./replayDocumentService\";\n\nexport class ReplayDocumentServiceFactory implements IDocumentServiceFactory {\n public static create(\n from: number,\n to: number,\n documentServiceFactory: IDocumentServiceFactory) {\n return new ReplayDocumentServiceFactory(\n documentServiceFactory,\n new ReplayControllerStatic(from, to),\n );\n }\n\n public readonly protocolName;\n\n public constructor(\n private readonly documentServiceFactory: IDocumentServiceFactory,\n private readonly controller: ReplayController) {\n this.protocolName = documentServiceFactory.protocolName;\n }\n\n /**\n * Creates a replay document service which uses the document service of provided\n * documentServiceFactory for connecting to delta stream endpoint.\n * @param resolvedUrl - URL to be used for connecting to endpoints.\n * @returns returns the requested document service\n */\n public async createDocumentService(\n resolvedUrl: IResolvedUrl,\n logger?: ITelemetryBaseLogger,\n clientIsSummarizer?: boolean,\n ): Promise<IDocumentService> {\n // Always include isReplay: true on events for the Replay Driver.\n // It's used in testing/debugging scenarios, so we want to be able to filter these events out sometimes.\n const replayLogger = ChildLogger.create(\n logger, undefined /* namespace */, { all: { isReplay: true } } /* properties */);\n\n return ReplayDocumentService.create(\n await this.documentServiceFactory.createDocumentService(resolvedUrl, replayLogger, clientIsSummarizer),\n this.controller);\n }\n\n // TODO: Issue-2109 Implement detach container api or put appropriate comment.\n public async createContainer(\n createNewSummary: ISummaryTree,\n resolvedUrl: IResolvedUrl,\n logger?: ITelemetryBaseLogger,\n clientIsSummarizer?: boolean,\n ): Promise<IDocumentService> {\n throw new Error(\"Not implemented\");\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storageImplementations.d.ts","sourceRoot":"","sources":["../src/storageImplementations.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EACH,wBAAwB,EACxB,4BAA4B,EAC5B,gBAAgB,EAChB,uBAAuB,EACvB,uBAAuB,EACvB,YAAY,EACf,MAAM,oCAAoC,CAAC;AAE5C,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QAC9B,OAAO,IAAI,wBAAwB,EAAE,CAAC;IAC1C,CAAC;IAEM,KAAK,CAAC,oBAAoB,CAAC,MAAe;QAC7C,4DAA4D;QAC5D,OAAO,IAAI,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC;IAClC,CAAC;CACJ;AAED,MAAM,OAAO,mCAAmC;IAE5C,YAAsC,OAAgC;QAAhC,YAAO,GAAP,OAAO,CAAyB;QADtD,iBAAY,GAAG,uBAAuB,CAAC;IACmB,CAAC;IAEpE,KAAK,CAAC,qBAAqB,CAC9B,OAAqB,EACrB,MAAyB,EACzB,kBAA4B;QAE5B,OAAO,IAAI,4BAA4B,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC1D,CAAC;IAED,8EAA8E;IACvE,KAAK,CAAC,eAAe,CACxB,gBAA8B,EAC9B,WAAyB,EACzB,MAAwB,EACxB,kBAA4B;QAE5B,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAC;IACvC,CAAC;CACJ","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert } from \"@fluidframework/common-utils\";\nimport {\n IDocumentDeltaConnection,\n IDocumentDeltaStorageService,\n IDocumentService,\n IDocumentServiceFactory,\n IDocumentStorageService,\n IResolvedUrl,\n} from \"@fluidframework/driver-definitions\";\nimport { buildSnapshotTree } from \"@fluidframework/driver-utils\";\nimport {\n IClient,\n ISnapshotTree,\n ITree,\n IVersion,\n ISummaryTree,\n} from \"@fluidframework/protocol-definitions\";\nimport { ITelemetryLogger } from \"@fluidframework/common-definitions\";\nimport { EmptyDeltaStorageService } from \"./emptyDeltaStorageService\";\nimport { ReadDocumentStorageServiceBase } from \"./replayController\";\n\n/**\n * Structure of snapshot on disk, when we store snapshot as single file\n */\nexport interface IFileSnapshot {\n tree: ITree;\n commits: { [key: string]: ITree };\n}\n\nexport class FileSnapshotReader extends ReadDocumentStorageServiceBase implements IDocumentStorageService {\n // IVersion.treeId used to communicate between getVersions() & getSnapshotTree() calls to indicate IVersion is ours.\n protected static readonly FileStorageVersionTreeId = \"FileStorageTreeId\";\n\n protected docId?: string;\n protected docTree: ISnapshotTree;\n protected blobs: Map<string, ArrayBufferLike>;\n protected readonly commits: { [key: string]: ITree } = {};\n protected readonly trees: { [key: string]: ISnapshotTree } = {};\n\n public constructor(json: IFileSnapshot) {\n super();\n this.commits = json.commits;\n\n this.blobs = new Map<string, ArrayBufferLike>();\n this.docTree = buildSnapshotTree(json.tree.entries, this.blobs);\n }\n\n public async getVersions(\n versionId: string | null,\n count: number,\n ): Promise<IVersion[]> {\n if (this.docId === undefined || this.docId === versionId || versionId === null) {\n if (versionId !== null) {\n this.docId = versionId;\n }\n return [{ id: \"latest\", treeId: \"\" }];\n }\n\n if (this.commits[versionId] !== undefined) {\n return [{ id: versionId, treeId: FileSnapshotReader.FileStorageVersionTreeId }];\n }\n throw new Error(`Unknown version ID: ${versionId}`);\n }\n\n public async getSnapshotTree(versionRequested?: IVersion): Promise<ISnapshotTree | null> {\n if (!versionRequested || versionRequested.id === \"latest\") {\n return this.docTree;\n }\n if (versionRequested.treeId !== FileSnapshotReader.FileStorageVersionTreeId) {\n throw new Error(`Unknown version id: ${versionRequested}`);\n }\n\n let snapshotTree = this.trees[versionRequested.id];\n if (snapshotTree === undefined) {\n const tree = this.commits[versionRequested.id];\n if (tree === undefined) {\n throw new Error(`Can't find version ${versionRequested.id}`);\n }\n\n this.trees[versionRequested.id] = snapshotTree = buildSnapshotTree(tree.entries, this.blobs);\n }\n return snapshotTree;\n }\n\n public async readBlob(blobId: string): Promise<ArrayBufferLike> {\n const blob = this.blobs.get(blobId);\n if (blob !== undefined) {\n return blob;\n }\n throw new Error(`Unknown blob ID: ${blobId}`);\n }\n}\n\nexport class SnapshotStorage extends ReadDocumentStorageServiceBase {\n protected docId?: string;\n\n constructor(\n protected readonly storage: IDocumentStorageService,\n protected readonly docTree: ISnapshotTree | null) {\n super();\n assert(!!this.docTree, 0x0b0 /* \"Missing document snapshot tree!\" */);\n }\n\n public async getVersions(versionId: string | null, count: number): Promise<IVersion[]> {\n if (this.docId === undefined || this.docId === versionId || versionId === null) {\n if (versionId !== null) {\n this.docId = versionId;\n }\n return [{ id: \"latest\", treeId: \"\" }];\n }\n return this.storage.getVersions(versionId, count);\n }\n\n public async getSnapshotTree(versionRequested?: IVersion): Promise<ISnapshotTree | null> {\n if (versionRequested && versionRequested.id !== \"latest\") {\n return this.storage.getSnapshotTree(versionRequested);\n }\n\n return this.docTree;\n }\n\n public async readBlob(blobId: string): Promise<ArrayBufferLike> {\n return this.storage.readBlob(blobId);\n }\n}\n\nexport class OpStorage extends ReadDocumentStorageServiceBase {\n public async getVersions(versionId: string | null, count: number): Promise<IVersion[]> {\n return [];\n }\n\n public async getSnapshotTree(version?: IVersion): Promise<ISnapshotTree | null> {\n throw new Error(\"no snapshot tree should be asked when playing ops\");\n }\n\n public async readBlob(blobId: string): Promise<ArrayBufferLike> {\n throw new Error(`Unknown blob ID: ${blobId}`);\n }\n}\n\nexport class StaticStorageDocumentService implements IDocumentService {\n constructor(private readonly storage: IDocumentStorageService) { }\n\n public dispose() {}\n\n // TODO: Issue-2109 Implement detach container api or put appropriate comment.\n public get resolvedUrl(): IResolvedUrl {\n throw new Error(\"Not implemented\");\n }\n\n public async connectToStorage(): Promise<IDocumentStorageService> {\n return this.storage;\n }\n\n public async connectToDeltaStorage(): Promise<IDocumentDeltaStorageService> {\n return new EmptyDeltaStorageService();\n }\n\n public async connectToDeltaStream(client: IClient): Promise<IDocumentDeltaConnection> {\n // We have no delta stream, so make it not return forever...\n return new Promise(() => { });\n }\n}\n\nexport class StaticStorageDocumentServiceFactory implements IDocumentServiceFactory {\n public readonly protocolName = \"fluid-static-storage:\";\n public constructor(protected readonly storage: IDocumentStorageService) { }\n\n public async createDocumentService(\n fileURL: IResolvedUrl,\n logger?: ITelemetryLogger,\n clientIsSummarizer?: boolean,\n ): Promise<IDocumentService> {\n return new StaticStorageDocumentService(this.storage);\n }\n\n // TODO: Issue-2109 Implement detach container api or put appropriate comment.\n public async createContainer(\n createNewSummary: ISummaryTree,\n resolvedUrl: IResolvedUrl,\n logger: ITelemetryLogger,\n clientIsSummarizer?: boolean,\n ): Promise<IDocumentService> {\n throw new Error(\"Not implemented\");\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"storageImplementations.js","sourceRoot":"","sources":["../src/storageImplementations.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AAStD,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AASjE,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAE,8BAA8B,EAAE,MAAM,oBAAoB,CAAC;AAUpE,MAAM,OAAO,kBAAmB,SAAQ,8BAA8B;IAUlE,YAAmB,IAAmB;QAClC,KAAK,EAAE,CAAC;QAJO,YAAO,GAA8B,EAAE,CAAC;QACxC,UAAK,GAAsC,EAAE,CAAC;QAI7D,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,CAAC,KAAK,CAAC,CAAC;IACpE,CAAC;IAEM,KAAK,CAAC,WAAW,CACpB,SAAwB,EACxB,KAAa;QAEb,IAAI,IAAI,CAAC,KAAK,KAAK,SAAS,IAAI,IAAI,CAAC,KAAK,KAAK,SAAS,IAAI,SAAS,KAAK,IAAI,EAAE;YAC5E,IAAI,SAAS,KAAK,IAAI,EAAE;gBACpB,IAAI,CAAC,KAAK,GAAG,SAAS,CAAC;aAC1B;YACD,OAAO,CAAC,EAAE,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,CA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Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert } from \"@fluidframework/common-utils\";\nimport {\n IDocumentDeltaConnection,\n IDocumentDeltaStorageService,\n IDocumentService,\n IDocumentServiceFactory,\n IDocumentStorageService,\n IResolvedUrl,\n} from \"@fluidframework/driver-definitions\";\nimport { buildSnapshotTree } from \"@fluidframework/driver-utils\";\nimport {\n IClient,\n ISnapshotTree,\n ITree,\n IVersion,\n ISummaryTree,\n} from \"@fluidframework/protocol-definitions\";\nimport { ITelemetryLogger } from \"@fluidframework/common-definitions\";\nimport { EmptyDeltaStorageService } from \"./emptyDeltaStorageService\";\nimport { ReadDocumentStorageServiceBase } from \"./replayController\";\n\n/**\n * Structure of snapshot on disk, when we store snapshot as single file\n */\nexport interface IFileSnapshot {\n tree: ITree;\n commits: { [key: string]: ITree; };\n}\n\nexport class FileSnapshotReader extends ReadDocumentStorageServiceBase implements IDocumentStorageService {\n // IVersion.treeId used to communicate between getVersions() & getSnapshotTree() calls to indicate IVersion is ours.\n protected static readonly FileStorageVersionTreeId = \"FileStorageTreeId\";\n\n protected docId?: string;\n protected docTree: ISnapshotTree;\n protected blobs: Map<string, ArrayBufferLike>;\n protected readonly commits: { [key: string]: ITree; } = {};\n protected readonly trees: { [key: string]: ISnapshotTree; } = {};\n\n public constructor(json: IFileSnapshot) {\n super();\n this.commits = json.commits;\n\n this.blobs = new Map<string, ArrayBufferLike>();\n this.docTree = buildSnapshotTree(json.tree.entries, this.blobs);\n }\n\n public async getVersions(\n versionId: string | null,\n count: number,\n ): Promise<IVersion[]> {\n if (this.docId === undefined || this.docId === versionId || versionId === null) {\n if (versionId !== null) {\n this.docId = versionId;\n }\n return [{ id: \"latest\", treeId: \"\" }];\n }\n\n if (this.commits[versionId] !== undefined) {\n return [{ id: versionId, treeId: FileSnapshotReader.FileStorageVersionTreeId }];\n }\n throw new Error(`Unknown version ID: ${versionId}`);\n }\n\n public async getSnapshotTree(versionRequested?: IVersion): Promise<ISnapshotTree | null> {\n if (!versionRequested || versionRequested.id === \"latest\") {\n return this.docTree;\n }\n if (versionRequested.treeId !== FileSnapshotReader.FileStorageVersionTreeId) {\n throw new Error(`Unknown version id: ${versionRequested}`);\n }\n\n let snapshotTree = this.trees[versionRequested.id];\n if (snapshotTree === undefined) {\n const tree = this.commits[versionRequested.id];\n if (tree === undefined) {\n throw new Error(`Can't find version ${versionRequested.id}`);\n }\n\n this.trees[versionRequested.id] = snapshotTree = buildSnapshotTree(tree.entries, this.blobs);\n }\n return snapshotTree;\n }\n\n public async readBlob(blobId: string): Promise<ArrayBufferLike> {\n const blob = this.blobs.get(blobId);\n if (blob !== undefined) {\n return blob;\n }\n throw new Error(`Unknown blob ID: ${blobId}`);\n }\n}\n\nexport class SnapshotStorage extends ReadDocumentStorageServiceBase {\n protected docId?: string;\n\n constructor(\n protected readonly storage: IDocumentStorageService,\n protected readonly docTree: ISnapshotTree | null) {\n super();\n assert(!!this.docTree, 0x0b0 /* \"Missing document snapshot tree!\" */);\n }\n\n public async getVersions(versionId: string | null, count: number): Promise<IVersion[]> {\n if (this.docId === undefined || this.docId === versionId || versionId === null) {\n if (versionId !== null) {\n this.docId = versionId;\n }\n return [{ id: \"latest\", treeId: \"\" }];\n }\n return this.storage.getVersions(versionId, count);\n }\n\n public async getSnapshotTree(versionRequested?: IVersion): Promise<ISnapshotTree | null> {\n if (versionRequested && versionRequested.id !== \"latest\") {\n return this.storage.getSnapshotTree(versionRequested);\n }\n\n return this.docTree;\n }\n\n public async readBlob(blobId: string): Promise<ArrayBufferLike> {\n return this.storage.readBlob(blobId);\n }\n}\n\nexport class OpStorage extends ReadDocumentStorageServiceBase {\n public async getVersions(versionId: string | null, count: number): Promise<IVersion[]> {\n return [];\n }\n\n public async getSnapshotTree(version?: IVersion): Promise<ISnapshotTree | null> {\n throw new Error(\"no snapshot tree should be asked when playing ops\");\n }\n\n public async readBlob(blobId: string): Promise<ArrayBufferLike> {\n throw new Error(`Unknown blob ID: ${blobId}`);\n }\n}\n\nexport class StaticStorageDocumentService implements IDocumentService {\n constructor(private readonly storage: IDocumentStorageService) { }\n\n public dispose() {}\n\n // TODO: Issue-2109 Implement detach container api or put appropriate comment.\n public get resolvedUrl(): IResolvedUrl {\n throw new Error(\"Not implemented\");\n }\n\n public async connectToStorage(): Promise<IDocumentStorageService> {\n return this.storage;\n }\n\n public async connectToDeltaStorage(): Promise<IDocumentDeltaStorageService> {\n return new EmptyDeltaStorageService();\n }\n\n public async connectToDeltaStream(client: IClient): Promise<IDocumentDeltaConnection> {\n // We have no delta stream, so make it not return forever...\n return new Promise(() => { });\n }\n}\n\nexport class StaticStorageDocumentServiceFactory implements IDocumentServiceFactory {\n public readonly protocolName = \"fluid-static-storage:\";\n public constructor(protected readonly storage: IDocumentStorageService) { }\n\n public async createDocumentService(\n fileURL: IResolvedUrl,\n logger?: ITelemetryLogger,\n clientIsSummarizer?: boolean,\n ): Promise<IDocumentService> {\n return new StaticStorageDocumentService(this.storage);\n }\n\n // TODO: Issue-2109 Implement detach container api or put appropriate comment.\n public async createContainer(\n createNewSummary: ISummaryTree,\n resolvedUrl: IResolvedUrl,\n logger: ITelemetryLogger,\n clientIsSummarizer?: boolean,\n ): Promise<IDocumentService> {\n throw new Error(\"Not implemented\");\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validateReplayDriverPrevious.js","sourceRoot":"","sources":["../../../src/test/types/validateReplayDriverPrevious.ts"],"names":[],"mappings":"AAyBA,+CAA+C,CAC3C,2CAA2C,EAAE,CAAC,CAAC;AAWnD,2CAA2C,CACvC,+CAA+C,EAAE,CAAC,CAAC;AAWvD,8CAA8C,CAC1C,0CAA0C,EAAE,CAAC,CAAC;AAWlD,0CAA0C,CACtC,8CAA8C,EAAE,CAAC,CAAC;AAWtD,sCAAsC,CAClC,kCAAkC,EAAE,CAAC,CAAC;AAW1C,kCAAkC,CAC9B,sCAAsC,EAAE,CAAC,CAAC;AAW9C,2DAA2D,CACvD,uDAAuD,EAAE,CAAC,CAAC;AAW/D,uDAAuD,CACnD,2DAA2D,EAAE,CAAC,CAAC;AAWnE,6CAA6C,CACzC,yCAAyC,EAAE,CAAC,CAAC;AAWjD,yCAAyC,CACrC,6CAA6C,EAAE,CAAC,CAAC;AAWrD,kDAAkD,CAC9C,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,CACpC,4CAA4C,EAAE,CAAC,CAAC;AAWpD,yDAAyD,CACrD,qDAAqD,EAAE,CAAC,CAAC;AAW7D,qDAAqD,CACjD,yDAAyD,EAAE,CAAC,CAAC;AAWjE,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-validator in @fluidframework/build-tools.\n */\n/* eslint-disable max-lines */\nimport * as old from \"@fluidframework/replay-driver-previous\";\nimport * as current from \"../../index\";\n\ntype TypeOnly<T> = {\n [P in keyof T]: TypeOnly<T[P]>;\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_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>);\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>);\nuse_old_ClassDeclaration_FileSnapshotReader(\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>);\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>);\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* \"ClassDeclaration_OpStorage\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_ClassDeclaration_OpStorage():\n TypeOnly<old.OpStorage>;\ndeclare function use_current_ClassDeclaration_OpStorage(\n use: TypeOnly<current.OpStorage>);\nuse_current_ClassDeclaration_OpStorage(\n get_old_ClassDeclaration_OpStorage());\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_OpStorage\": {\"backCompat\": false}\n*/\ndeclare function get_current_ClassDeclaration_OpStorage():\n TypeOnly<current.OpStorage>;\ndeclare function use_old_ClassDeclaration_OpStorage(\n use: TypeOnly<old.OpStorage>);\nuse_old_ClassDeclaration_OpStorage(\n get_current_ClassDeclaration_OpStorage());\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>);\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>);\nuse_old_ClassDeclaration_ReadDocumentStorageServiceBase(\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>);\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>);\nuse_old_ClassDeclaration_ReplayController(\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>);\nuse_current_ClassDeclaration_ReplayDocumentService(\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>);\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>);\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>);\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>);\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>);\nuse_old_ClassDeclaration_SnapshotStorage(\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_StaticStorageDocumentService\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_ClassDeclaration_StaticStorageDocumentService():\n TypeOnly<old.StaticStorageDocumentService>;\ndeclare function use_current_ClassDeclaration_StaticStorageDocumentService(\n use: TypeOnly<current.StaticStorageDocumentService>);\nuse_current_ClassDeclaration_StaticStorageDocumentService(\n get_old_ClassDeclaration_StaticStorageDocumentService());\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_StaticStorageDocumentService\": {\"backCompat\": false}\n*/\ndeclare function get_current_ClassDeclaration_StaticStorageDocumentService():\n TypeOnly<current.StaticStorageDocumentService>;\ndeclare function use_old_ClassDeclaration_StaticStorageDocumentService(\n use: TypeOnly<old.StaticStorageDocumentService>);\nuse_old_ClassDeclaration_StaticStorageDocumentService(\n get_current_ClassDeclaration_StaticStorageDocumentService());\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>);\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>);\nuse_old_ClassDeclaration_StaticStorageDocumentServiceFactory(\n get_current_ClassDeclaration_StaticStorageDocumentServiceFactory());\n"]}
|
|
1
|
+
{"version":3,"file":"validateReplayDriverPrevious.js","sourceRoot":"","sources":["../../../src/test/types/validateReplayDriverPrevious.ts"],"names":[],"mappings":"AAwBA,+CAA+C,CAC3C,2CAA2C,EAAE,CAAC,CAAC;AAWnD,2CAA2C,CACvC,+CAA+C,EAAE,CAAC,CAAC;AAWvD,8CAA8C,CAC1C,0CAA0C,EAAE,CAAC,CAAC;AAWlD,0CAA0C,CACtC,8CAA8C,EAAE,CAAC,CAAC;AAWtD,sCAAsC,CAClC,kCAAkC,EAAE,CAAC,CAAC;AAW1C,kCAAkC,CAC9B,sCAAsC,EAAE,CAAC,CAAC;AAW9C,2DAA2D,CACvD,uDAAuD,EAAE,CAAC,CAAC;AAW/D,uDAAuD,CACnD,2DAA2D,EAAE,CAAC,CAAC;AAWnE,6CAA6C,CACzC,yCAAyC,EAAE,CAAC,CAAC;AAWjD,yCAAyC,CACrC,6CAA6C,EAAE,CAAC,CAAC;AAWrD,kDAAkD,CAC9C,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,CACpC,4CAA4C,EAAE,CAAC,CAAC;AAWpD,yDAAyD,CACrD,qDAAqD,EAAE,CAAC,CAAC;AAW7D,qDAAqD,CACjD,yDAAyD,EAAE,CAAC,CAAC;AAWjE,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-validator in @fluidframework/build-tools.\n */\nimport * as old from \"@fluidframework/replay-driver-previous\";\nimport * as current from \"../../index\";\n\ntype TypeOnly<T> = {\n [P in keyof T]: TypeOnly<T[P]>;\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_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>);\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>);\nuse_old_ClassDeclaration_FileSnapshotReader(\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>);\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>);\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* \"ClassDeclaration_OpStorage\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_ClassDeclaration_OpStorage():\n TypeOnly<old.OpStorage>;\ndeclare function use_current_ClassDeclaration_OpStorage(\n use: TypeOnly<current.OpStorage>);\nuse_current_ClassDeclaration_OpStorage(\n get_old_ClassDeclaration_OpStorage());\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_OpStorage\": {\"backCompat\": false}\n*/\ndeclare function get_current_ClassDeclaration_OpStorage():\n TypeOnly<current.OpStorage>;\ndeclare function use_old_ClassDeclaration_OpStorage(\n use: TypeOnly<old.OpStorage>);\nuse_old_ClassDeclaration_OpStorage(\n get_current_ClassDeclaration_OpStorage());\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>);\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>);\nuse_old_ClassDeclaration_ReadDocumentStorageServiceBase(\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>);\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>);\nuse_old_ClassDeclaration_ReplayController(\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>);\nuse_current_ClassDeclaration_ReplayDocumentService(\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>);\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>);\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>);\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>);\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>);\nuse_old_ClassDeclaration_SnapshotStorage(\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_StaticStorageDocumentService\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_ClassDeclaration_StaticStorageDocumentService():\n TypeOnly<old.StaticStorageDocumentService>;\ndeclare function use_current_ClassDeclaration_StaticStorageDocumentService(\n use: TypeOnly<current.StaticStorageDocumentService>);\nuse_current_ClassDeclaration_StaticStorageDocumentService(\n get_old_ClassDeclaration_StaticStorageDocumentService());\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_StaticStorageDocumentService\": {\"backCompat\": false}\n*/\ndeclare function get_current_ClassDeclaration_StaticStorageDocumentService():\n TypeOnly<current.StaticStorageDocumentService>;\ndeclare function use_old_ClassDeclaration_StaticStorageDocumentService(\n use: TypeOnly<old.StaticStorageDocumentService>);\nuse_old_ClassDeclaration_StaticStorageDocumentService(\n get_current_ClassDeclaration_StaticStorageDocumentService());\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>);\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>);\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": "0.59.
|
|
3
|
+
"version": "0.59.3000",
|
|
4
4
|
"description": "Document replay version of Socket.IO implementation",
|
|
5
5
|
"homepage": "https://fluidframework.com",
|
|
6
6
|
"repository": {
|
|
@@ -37,14 +37,15 @@
|
|
|
37
37
|
"@fluidframework/common-definitions": "^0.20.1",
|
|
38
38
|
"@fluidframework/common-utils": "^0.32.1",
|
|
39
39
|
"@fluidframework/driver-definitions": "^0.46.1000",
|
|
40
|
-
"@fluidframework/driver-utils": "^0.59.
|
|
40
|
+
"@fluidframework/driver-utils": "^0.59.3000",
|
|
41
41
|
"@fluidframework/protocol-definitions": "^0.1028.1000",
|
|
42
|
-
"@fluidframework/telemetry-utils": "^0.59.
|
|
42
|
+
"@fluidframework/telemetry-utils": "^0.59.3000"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@fluidframework/build-common": "^0.23.0",
|
|
46
|
-
"@fluidframework/
|
|
47
|
-
"@fluidframework/
|
|
46
|
+
"@fluidframework/build-tools": "^0.2.66793",
|
|
47
|
+
"@fluidframework/eslint-config-fluid": "^0.28.2000",
|
|
48
|
+
"@fluidframework/replay-driver-previous": "npm:@fluidframework/replay-driver@0.59.2000",
|
|
48
49
|
"@microsoft/api-extractor": "^7.22.2",
|
|
49
50
|
"@rushstack/eslint-config": "^2.5.1",
|
|
50
51
|
"@types/mocha": "^8.2.2",
|
|
@@ -67,11 +68,11 @@
|
|
|
67
68
|
"mocha": "^8.4.0",
|
|
68
69
|
"nock": "^10.0.1",
|
|
69
70
|
"rimraf": "^2.6.2",
|
|
70
|
-
"typescript": "~4.
|
|
71
|
+
"typescript": "~4.5.5",
|
|
71
72
|
"typescript-formatter": "7.1.0"
|
|
72
73
|
},
|
|
73
74
|
"typeValidation": {
|
|
74
|
-
"version": "0.59.
|
|
75
|
+
"version": "0.59.3000",
|
|
75
76
|
"broken": {}
|
|
76
77
|
}
|
|
77
78
|
}
|
|
@@ -18,8 +18,7 @@ export class EmptyDeltaStorageService implements IDocumentDeltaStorageService {
|
|
|
18
18
|
from: number,
|
|
19
19
|
to: number | undefined,
|
|
20
20
|
abortSignal?: AbortSignal,
|
|
21
|
-
cachedOnly?: boolean): IStream<ISequencedDocumentMessage[]>
|
|
22
|
-
{
|
|
21
|
+
cachedOnly?: boolean): IStream<ISequencedDocumentMessage[]> {
|
|
23
22
|
return emptyMessageStream;
|
|
24
23
|
}
|
|
25
24
|
}
|
package/src/packageVersion.ts
CHANGED
|
@@ -44,7 +44,7 @@ export class ReplayDocumentServiceFactory implements IDocumentServiceFactory {
|
|
|
44
44
|
// Always include isReplay: true on events for the Replay Driver.
|
|
45
45
|
// It's used in testing/debugging scenarios, so we want to be able to filter these events out sometimes.
|
|
46
46
|
const replayLogger = ChildLogger.create(
|
|
47
|
-
logger, undefined /* namespace */, {all: { isReplay: true }} /* properties */);
|
|
47
|
+
logger, undefined /* namespace */, { all: { isReplay: true } } /* properties */);
|
|
48
48
|
|
|
49
49
|
return ReplayDocumentService.create(
|
|
50
50
|
await this.documentServiceFactory.createDocumentService(resolvedUrl, replayLogger, clientIsSummarizer),
|
|
@@ -29,7 +29,7 @@ import { ReadDocumentStorageServiceBase } from "./replayController";
|
|
|
29
29
|
*/
|
|
30
30
|
export interface IFileSnapshot {
|
|
31
31
|
tree: ITree;
|
|
32
|
-
commits: { [key: string]: ITree };
|
|
32
|
+
commits: { [key: string]: ITree; };
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
export class FileSnapshotReader extends ReadDocumentStorageServiceBase implements IDocumentStorageService {
|
|
@@ -39,8 +39,8 @@ export class FileSnapshotReader extends ReadDocumentStorageServiceBase implement
|
|
|
39
39
|
protected docId?: string;
|
|
40
40
|
protected docTree: ISnapshotTree;
|
|
41
41
|
protected blobs: Map<string, ArrayBufferLike>;
|
|
42
|
-
protected readonly commits: { [key: string]: ITree } = {};
|
|
43
|
-
protected readonly trees: { [key: string]: ISnapshotTree } = {};
|
|
42
|
+
protected readonly commits: { [key: string]: ITree; } = {};
|
|
43
|
+
protected readonly trees: { [key: string]: ISnapshotTree; } = {};
|
|
44
44
|
|
|
45
45
|
public constructor(json: IFileSnapshot) {
|
|
46
46
|
super();
|