@fluidframework/replay-driver 0.58.2000 → 0.58.3000-61081

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.
Files changed (32) hide show
  1. package/dist/packageVersion.d.ts +1 -1
  2. package/dist/packageVersion.d.ts.map +1 -1
  3. package/dist/packageVersion.js +1 -1
  4. package/dist/packageVersion.js.map +1 -1
  5. package/dist/replayDocumentServiceFactory.d.ts +2 -2
  6. package/dist/replayDocumentServiceFactory.d.ts.map +1 -1
  7. package/dist/replayDocumentServiceFactory.js +3 -3
  8. package/dist/replayDocumentServiceFactory.js.map +1 -1
  9. package/dist/storageImplementations.d.ts +2 -2
  10. package/dist/storageImplementations.d.ts.map +1 -1
  11. package/dist/storageImplementations.js +2 -2
  12. package/dist/storageImplementations.js.map +1 -1
  13. package/lib/packageVersion.d.ts +1 -1
  14. package/lib/packageVersion.d.ts.map +1 -1
  15. package/lib/packageVersion.js +1 -1
  16. package/lib/packageVersion.js.map +1 -1
  17. package/lib/replayDocumentServiceFactory.d.ts +2 -2
  18. package/lib/replayDocumentServiceFactory.d.ts.map +1 -1
  19. package/lib/replayDocumentServiceFactory.js +3 -3
  20. package/lib/replayDocumentServiceFactory.js.map +1 -1
  21. package/lib/storageImplementations.d.ts +2 -2
  22. package/lib/storageImplementations.d.ts.map +1 -1
  23. package/lib/storageImplementations.js +2 -2
  24. package/lib/storageImplementations.js.map +1 -1
  25. package/lib/test/types/validateReplayDriverPrevious.d.ts +2 -0
  26. package/lib/test/types/validateReplayDriverPrevious.d.ts.map +1 -0
  27. package/lib/test/types/validateReplayDriverPrevious.js +22 -0
  28. package/lib/test/types/validateReplayDriverPrevious.js.map +1 -0
  29. package/package.json +10 -5
  30. package/src/packageVersion.ts +1 -1
  31. package/src/replayDocumentServiceFactory.ts +3 -1
  32. package/src/storageImplementations.ts +6 -1
@@ -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.58.2000";
8
+ export declare const pkgVersion = "0.58.3000-61081";
9
9
  //# sourceMappingURL=packageVersion.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"packageVersion.d.ts","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,eAAO,MAAM,OAAO,kCAAkC,CAAC;AACvD,eAAO,MAAM,UAAU,cAAc,CAAC"}
1
+ {"version":3,"file":"packageVersion.d.ts","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,eAAO,MAAM,OAAO,kCAAkC,CAAC;AACvD,eAAO,MAAM,UAAU,oBAAoB,CAAC"}
@@ -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.58.2000";
11
+ exports.pkgVersion = "0.58.3000-61081";
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.58.2000\";\n"]}
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,iBAAiB,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.58.3000-61081\";\n"]}
@@ -18,7 +18,7 @@ export declare class ReplayDocumentServiceFactory implements IDocumentServiceFac
18
18
  * @param resolvedUrl - URL to be used for connecting to endpoints.
19
19
  * @returns returns the requested document service
20
20
  */
21
- createDocumentService(resolvedUrl: IResolvedUrl, logger?: ITelemetryBaseLogger): Promise<IDocumentService>;
22
- createContainer(createNewSummary: ISummaryTree, resolvedUrl: IResolvedUrl, logger?: ITelemetryBaseLogger): Promise<IDocumentService>;
21
+ createDocumentService(resolvedUrl: IResolvedUrl, logger?: ITelemetryBaseLogger, clientIsSummarizer?: boolean): Promise<IDocumentService>;
22
+ createContainer(createNewSummary: ISummaryTree, resolvedUrl: IResolvedUrl, logger?: ITelemetryBaseLogger, clientIsSummarizer?: boolean): Promise<IDocumentService>;
23
23
  }
24
24
  //# sourceMappingURL=replayDocumentServiceFactory.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"replayDocumentServiceFactory.d.ts","sourceRoot":"","sources":["../src/replayDocumentServiceFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAC7G,OAAO,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAE1E,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAItD,qBAAa,4BAA6B,YAAW,uBAAuB;IAcpE,OAAO,CAAC,QAAQ,CAAC,sBAAsB;IACvC,OAAO,CAAC,QAAQ,CAAC,UAAU;WAdjB,MAAM,CAChB,IAA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,YAAY,EAC9B,WAAW,EAAE,YAAY,EACzB,MAAM,CAAC,EAAE,oBAAoB,EAC7B,kBAAkB,CAAC,EAAE,OAAO,GAC7B,OAAO,CAAC,gBAAgB,CAAC;CAG/B"}
@@ -23,14 +23,14 @@ class ReplayDocumentServiceFactory {
23
23
  * @param resolvedUrl - URL to be used for connecting to endpoints.
24
24
  * @returns returns the requested document service
25
25
  */
26
- async createDocumentService(resolvedUrl, logger) {
26
+ async createDocumentService(resolvedUrl, logger, clientIsSummarizer) {
27
27
  // Always include isReplay: true on events for the Replay Driver.
28
28
  // It's used in testing/debugging scenarios, so we want to be able to filter these events out sometimes.
29
29
  const replayLogger = telemetry_utils_1.ChildLogger.create(logger, undefined /* namespace */, { all: { isReplay: true } } /* properties */);
30
- return replayDocumentService_1.ReplayDocumentService.create(await this.documentServiceFactory.createDocumentService(resolvedUrl, replayLogger), this.controller);
30
+ return replayDocumentService_1.ReplayDocumentService.create(await this.documentServiceFactory.createDocumentService(resolvedUrl, replayLogger, clientIsSummarizer), this.controller);
31
31
  }
32
32
  // TODO: Issue-2109 Implement detach container api or put appropriate comment.
33
- async createContainer(createNewSummary, resolvedUrl, logger) {
33
+ async createContainer(createNewSummary, resolvedUrl, logger, clientIsSummarizer) {
34
34
  throw new Error("Not implemented");
35
35
  }
36
36
  }
@@ -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;QAE7B,iEAAiE;QACjE,wGAAwG;QACxG,MAAM,YAAY,GAAG,6BAAW,CAAC,MAAM,CACnC,MAAM,EAAE,SAAS,CAAC,eAAe,EAAE,EAAC,GAAG,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAC,CAAC,gBAAgB,CAAC,CAAC;QAEnF,OAAO,6CAAqB,CAAC,MAAM,CAC/B,MAAM,IAAI,CAAC,sBAAsB,CAAC,qBAAqB,CAAC,WAAW,EAAE,YAAY,CAAC,EAClF,IAAI,CAAC,UAAU,CAAC,CAAC;IACzB,CAAC;IAED,8EAA8E;IACvE,KAAK,CAAC,eAAe,CACxB,gBAA8B,EAC9B,WAAyB,EACzB,MAA6B;QAE7B,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAC;IACvC,CAAC;CACJ;AA/CD,oEA+CC","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 ): 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),\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 ): Promise<IDocumentService> {\n throw new Error(\"Not implemented\");\n }\n}\n"]}
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,EAAC,GAAG,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAC,CAAC,gBAAgB,CAAC,CAAC;QAEnF,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"]}
@@ -58,7 +58,7 @@ export declare class StaticStorageDocumentServiceFactory implements IDocumentSer
58
58
  protected readonly storage: IDocumentStorageService;
59
59
  readonly protocolName = "fluid-static-storage:";
60
60
  constructor(storage: IDocumentStorageService);
61
- createDocumentService(fileURL: IResolvedUrl): Promise<IDocumentService>;
62
- createContainer(createNewSummary: ISummaryTree, resolvedUrl: IResolvedUrl, logger: ITelemetryLogger): Promise<IDocumentService>;
61
+ createDocumentService(fileURL: IResolvedUrl, logger?: ITelemetryLogger, clientIsSummarizer?: boolean): Promise<IDocumentService>;
62
+ createContainer(createNewSummary: ISummaryTree, resolvedUrl: IResolvedUrl, logger: ITelemetryLogger, clientIsSummarizer?: boolean): Promise<IDocumentService>;
63
63
  }
64
64
  //# sourceMappingURL=storageImplementations.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"storageImplementations.d.ts","sourceRoot":"","sources":["../src/storageImplementations.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EACH,wBAAwB,EAC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C,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"}
@@ -123,11 +123,11 @@ class StaticStorageDocumentServiceFactory {
123
123
  this.storage = storage;
124
124
  this.protocolName = "fluid-static-storage:";
125
125
  }
126
- async createDocumentService(fileURL) {
126
+ async createDocumentService(fileURL, logger, clientIsSummarizer) {
127
127
  return new StaticStorageDocumentService(this.storage);
128
128
  }
129
129
  // TODO: Issue-2109 Implement detach container api or put appropriate comment.
130
- async createContainer(createNewSummary, resolvedUrl, logger) {
130
+ async createContainer(createNewSummary, resolvedUrl, logger, clientIsSummarizer) {
131
131
  throw new Error("Not implemented");
132
132
  }
133
133
  }
@@ -1 +1 @@
1
- {"version":3,"file":"storageImplementations.js","sourceRoot":"","sources":["../src/storageImplementations.ts"],"names":[],"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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,CAAC,OAAqB;QACpD,OAAO,IAAI,4BAA4B,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC1D,CAAC;IAED,8EAA8E;IACvE,KAAK,CAAC,eAAe,CACxB,gBAA8B,EAC9B,WAAyB,EACzB,MAAwB;QAExB,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAC;IACvC,CAAC;CACJ;AAhBD,kFAgBC","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(fileURL: IResolvedUrl): 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 ): 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,GAA6B,EAAE,CAAC;QACvC,UAAK,GAAqC,EAAE,CAAC;QAI5D,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;QAE5B,IAAI,CAAC,KAAK,GAAG,IAAI,GAAG,EAA2B,CAAC;QAChD,IAAI,CAAC,OAAO,GAAG,gCAAiB,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,CAAC;SACzC;QAED,IAAI,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,KAAK,SAAS,EAAE;YACvC,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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"]}
@@ -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.58.2000";
8
+ export declare const pkgVersion = "0.58.3000-61081";
9
9
  //# sourceMappingURL=packageVersion.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"packageVersion.d.ts","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,eAAO,MAAM,OAAO,kCAAkC,CAAC;AACvD,eAAO,MAAM,UAAU,cAAc,CAAC"}
1
+ {"version":3,"file":"packageVersion.d.ts","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,eAAO,MAAM,OAAO,kCAAkC,CAAC;AACvD,eAAO,MAAM,UAAU,oBAAoB,CAAC"}
@@ -5,5 +5,5 @@
5
5
  * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY
6
6
  */
7
7
  export const pkgName = "@fluidframework/replay-driver";
8
- export const pkgVersion = "0.58.2000";
8
+ export const pkgVersion = "0.58.3000-61081";
9
9
  //# sourceMappingURL=packageVersion.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,CAAC,MAAM,OAAO,GAAG,+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.58.2000\";\n"]}
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,iBAAiB,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.58.3000-61081\";\n"]}
@@ -18,7 +18,7 @@ export declare class ReplayDocumentServiceFactory implements IDocumentServiceFac
18
18
  * @param resolvedUrl - URL to be used for connecting to endpoints.
19
19
  * @returns returns the requested document service
20
20
  */
21
- createDocumentService(resolvedUrl: IResolvedUrl, logger?: ITelemetryBaseLogger): Promise<IDocumentService>;
22
- createContainer(createNewSummary: ISummaryTree, resolvedUrl: IResolvedUrl, logger?: ITelemetryBaseLogger): Promise<IDocumentService>;
21
+ createDocumentService(resolvedUrl: IResolvedUrl, logger?: ITelemetryBaseLogger, clientIsSummarizer?: boolean): Promise<IDocumentService>;
22
+ createContainer(createNewSummary: ISummaryTree, resolvedUrl: IResolvedUrl, logger?: ITelemetryBaseLogger, clientIsSummarizer?: boolean): Promise<IDocumentService>;
23
23
  }
24
24
  //# sourceMappingURL=replayDocumentServiceFactory.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"replayDocumentServiceFactory.d.ts","sourceRoot":"","sources":["../src/replayDocumentServiceFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAC7G,OAAO,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAE1E,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAItD,qBAAa,4BAA6B,YAAW,uBAAuB;IAcpE,OAAO,CAAC,QAAQ,CAAC,sBAAsB;IACvC,OAAO,CAAC,QAAQ,CAAC,UAAU;WAdjB,MAAM,CAChB,IAAI,EAAE,MAAM,EACZ,EAAE,EAAE,MAAM,EACV,sBAAsB,EAAE,uBAAuB;IAOnD,SAAgB,YAAY,MAAC;gBAGR,sBAAsB,EAAE,uBAAuB,EAC/C,UAAU,EAAE,gBAAgB;IAIjD;;;;;OAKG;IACU,qBAAqB,CAC9B,WAAW,EAAE,YAAY,EACzB,MAAM,CAAC,EAAE,oBAAoB,GAC9B,OAAO,CAAC,gBAAgB,CAAC;IAYf,eAAe,CACxB,gBAAgB,EAAE,YAAY,EAC9B,WAAW,EAAE,YAAY,EACzB,MAAM,CAAC,EAAE,oBAAoB,GAC9B,OAAO,CAAC,gBAAgB,CAAC;CAG/B"}
1
+ {"version":3,"file":"replayDocumentServiceFactory.d.ts","sourceRoot":"","sources":["../src/replayDocumentServiceFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAC7G,OAAO,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAE1E,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAItD,qBAAa,4BAA6B,YAAW,uBAAuB;IAcpE,OAAO,CAAC,QAAQ,CAAC,sBAAsB;IACvC,OAAO,CAAC,QAAQ,CAAC,UAAU;WAdjB,MAAM,CAChB,IAAI,EAAE,MAAM,EACZ,EAAE,EAAE,MAAM,EACV,sBAAsB,EAAE,uBAAuB;IAOnD,SAAgB,YAAY,MAAC;gBAGR,sBAAsB,EAAE,uBAAuB,EAC/C,UAAU,EAAE,gBAAgB;IAIjD;;;;;OAKG;IACU,qBAAqB,CAC9B,WAAW,EAAE,YAAY,EACzB,MAAM,CAAC,EAAE,oBAAoB,EAC7B,kBAAkB,CAAC,EAAE,OAAO,GAC7B,OAAO,CAAC,gBAAgB,CAAC;IAYf,eAAe,CACxB,gBAAgB,EAAE,YAAY,EAC9B,WAAW,EAAE,YAAY,EACzB,MAAM,CAAC,EAAE,oBAAoB,EAC7B,kBAAkB,CAAC,EAAE,OAAO,GAC7B,OAAO,CAAC,gBAAgB,CAAC;CAG/B"}
@@ -20,14 +20,14 @@ export class ReplayDocumentServiceFactory {
20
20
  * @param resolvedUrl - URL to be used for connecting to endpoints.
21
21
  * @returns returns the requested document service
22
22
  */
23
- async createDocumentService(resolvedUrl, logger) {
23
+ async createDocumentService(resolvedUrl, logger, clientIsSummarizer) {
24
24
  // Always include isReplay: true on events for the Replay Driver.
25
25
  // It's used in testing/debugging scenarios, so we want to be able to filter these events out sometimes.
26
26
  const replayLogger = ChildLogger.create(logger, undefined /* namespace */, { all: { isReplay: true } } /* properties */);
27
- return ReplayDocumentService.create(await this.documentServiceFactory.createDocumentService(resolvedUrl, replayLogger), this.controller);
27
+ return ReplayDocumentService.create(await this.documentServiceFactory.createDocumentService(resolvedUrl, replayLogger, clientIsSummarizer), this.controller);
28
28
  }
29
29
  // TODO: Issue-2109 Implement detach container api or put appropriate comment.
30
- async createContainer(createNewSummary, resolvedUrl, logger) {
30
+ async createContainer(createNewSummary, resolvedUrl, logger, clientIsSummarizer) {
31
31
  throw new Error("Not implemented");
32
32
  }
33
33
  }
@@ -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;QAE7B,iEAAiE;QACjE,wGAAwG;QACxG,MAAM,YAAY,GAAG,WAAW,CAAC,MAAM,CACnC,MAAM,EAAE,SAAS,CAAC,eAAe,EAAE,EAAC,GAAG,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAC,CAAC,gBAAgB,CAAC,CAAC;QAEnF,OAAO,qBAAqB,CAAC,MAAM,CAC/B,MAAM,IAAI,CAAC,sBAAsB,CAAC,qBAAqB,CAAC,WAAW,EAAE,YAAY,CAAC,EAClF,IAAI,CAAC,UAAU,CAAC,CAAC;IACzB,CAAC;IAED,8EAA8E;IACvE,KAAK,CAAC,eAAe,CACxB,gBAA8B,EAC9B,WAAyB,EACzB,MAA6B;QAE7B,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 ): 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),\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 ): Promise<IDocumentService> {\n throw new Error(\"Not implemented\");\n }\n}\n"]}
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,EAAC,GAAG,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAC,CAAC,gBAAgB,CAAC,CAAC;QAEnF,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"]}
@@ -58,7 +58,7 @@ export declare class StaticStorageDocumentServiceFactory implements IDocumentSer
58
58
  protected readonly storage: IDocumentStorageService;
59
59
  readonly protocolName = "fluid-static-storage:";
60
60
  constructor(storage: IDocumentStorageService);
61
- createDocumentService(fileURL: IResolvedUrl): Promise<IDocumentService>;
62
- createContainer(createNewSummary: ISummaryTree, resolvedUrl: IResolvedUrl, logger: ITelemetryLogger): Promise<IDocumentService>;
61
+ createDocumentService(fileURL: IResolvedUrl, logger?: ITelemetryLogger, clientIsSummarizer?: boolean): Promise<IDocumentService>;
62
+ createContainer(createNewSummary: ISummaryTree, resolvedUrl: IResolvedUrl, logger: ITelemetryLogger, clientIsSummarizer?: boolean): Promise<IDocumentService>;
63
63
  }
64
64
  //# sourceMappingURL=storageImplementations.d.ts.map
@@ -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,CA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,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"}
@@ -116,11 +116,11 @@ export class StaticStorageDocumentServiceFactory {
116
116
  this.storage = storage;
117
117
  this.protocolName = "fluid-static-storage:";
118
118
  }
119
- async createDocumentService(fileURL) {
119
+ async createDocumentService(fileURL, logger, clientIsSummarizer) {
120
120
  return new StaticStorageDocumentService(this.storage);
121
121
  }
122
122
  // TODO: Issue-2109 Implement detach container api or put appropriate comment.
123
- async createContainer(createNewSummary, resolvedUrl, logger) {
123
+ async createContainer(createNewSummary, resolvedUrl, logger, clientIsSummarizer) {
124
124
  throw new Error("Not implemented");
125
125
  }
126
126
  }
@@ -1 +1 @@
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,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;IACvC,CAAC;IAEM,KAAK,CAAC,gBAAgB;QACzB,OAAO,IAAI,CAAC,OAAO,CAAC;IACxB,CAAC;IAEM,KAAK,CAAC,qBAAqB;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,CAAC,OAAqB;QACpD,OAAO,IAAI,4BAA4B,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC1D,CAAC;IAED,8EAA8E;IACvE,KAAK,CAAC,eAAe,CACxB,gBAA8B,EAC9B,WAAyB,EACzB,MAAwB;QAExB,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(fileURL: IResolvedUrl): 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 ): 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,GAA6B,EAAE,CAAC;QACvC,UAAK,GAAqC,EAAE,CAAC;QAI5D,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,CAAC;SAC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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"]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=validateReplayDriverPrevious.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validateReplayDriverPrevious.d.ts","sourceRoot":"","sources":["../../../src/test/types/validateReplayDriverPrevious.ts"],"names":[],"mappings":""}
@@ -0,0 +1,22 @@
1
+ use_current_ClassDeclaration_FileSnapshotReader(get_old_ClassDeclaration_FileSnapshotReader());
2
+ use_old_ClassDeclaration_FileSnapshotReader(get_current_ClassDeclaration_FileSnapshotReader());
3
+ use_current_InterfaceDeclaration_IFileSnapshot(get_old_InterfaceDeclaration_IFileSnapshot());
4
+ use_old_InterfaceDeclaration_IFileSnapshot(get_current_InterfaceDeclaration_IFileSnapshot());
5
+ use_current_ClassDeclaration_OpStorage(get_old_ClassDeclaration_OpStorage());
6
+ use_old_ClassDeclaration_OpStorage(get_current_ClassDeclaration_OpStorage());
7
+ use_current_ClassDeclaration_ReadDocumentStorageServiceBase(get_old_ClassDeclaration_ReadDocumentStorageServiceBase());
8
+ use_old_ClassDeclaration_ReadDocumentStorageServiceBase(get_current_ClassDeclaration_ReadDocumentStorageServiceBase());
9
+ use_current_ClassDeclaration_ReplayController(get_old_ClassDeclaration_ReplayController());
10
+ use_old_ClassDeclaration_ReplayController(get_current_ClassDeclaration_ReplayController());
11
+ use_current_ClassDeclaration_ReplayDocumentService(get_old_ClassDeclaration_ReplayDocumentService());
12
+ use_old_ClassDeclaration_ReplayDocumentService(get_current_ClassDeclaration_ReplayDocumentService());
13
+ use_current_ClassDeclaration_ReplayDocumentServiceFactory(get_old_ClassDeclaration_ReplayDocumentServiceFactory());
14
+ use_old_ClassDeclaration_ReplayDocumentServiceFactory(get_current_ClassDeclaration_ReplayDocumentServiceFactory());
15
+ use_current_ClassDeclaration_SnapshotStorage(get_old_ClassDeclaration_SnapshotStorage());
16
+ use_old_ClassDeclaration_SnapshotStorage(get_current_ClassDeclaration_SnapshotStorage());
17
+ use_current_ClassDeclaration_StaticStorageDocumentService(get_old_ClassDeclaration_StaticStorageDocumentService());
18
+ use_old_ClassDeclaration_StaticStorageDocumentService(get_current_ClassDeclaration_StaticStorageDocumentService());
19
+ use_current_ClassDeclaration_StaticStorageDocumentServiceFactory(get_old_ClassDeclaration_StaticStorageDocumentServiceFactory());
20
+ use_old_ClassDeclaration_StaticStorageDocumentServiceFactory(get_current_ClassDeclaration_StaticStorageDocumentServiceFactory());
21
+ export {};
22
+ //# sourceMappingURL=validateReplayDriverPrevious.js.map
@@ -0,0 +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.0.58.2000:\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.0.58.2000:\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.0.58.2000:\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.0.58.2000:\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.0.58.2000:\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.0.58.2000:\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.0.58.2000:\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.0.58.2000:\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.0.58.2000:\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.0.58.2000:\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.0.58.2000:\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.0.58.2000:\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.0.58.2000:\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.0.58.2000:\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.0.58.2000:\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.0.58.2000:\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.0.58.2000:\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.0.58.2000:\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.0.58.2000:\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.0.58.2000:\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.58.2000",
3
+ "version": "0.58.3000-61081",
4
4
  "description": "Document replay version of Socket.IO implementation",
5
5
  "homepage": "https://fluidframework.com",
6
6
  "repository": {
@@ -35,14 +35,15 @@
35
35
  "dependencies": {
36
36
  "@fluidframework/common-definitions": "^0.20.1",
37
37
  "@fluidframework/common-utils": "^0.32.1",
38
- "@fluidframework/driver-definitions": "^0.45.1000",
39
- "@fluidframework/driver-utils": "^0.58.2000",
38
+ "@fluidframework/driver-definitions": "^0.45.2000-0",
39
+ "@fluidframework/driver-utils": "0.58.3000-61081",
40
40
  "@fluidframework/protocol-definitions": "^0.1027.1000",
41
- "@fluidframework/telemetry-utils": "^0.58.2000"
41
+ "@fluidframework/telemetry-utils": "0.58.3000-61081"
42
42
  },
43
43
  "devDependencies": {
44
44
  "@fluidframework/build-common": "^0.23.0",
45
- "@fluidframework/eslint-config-fluid": "^0.27.0",
45
+ "@fluidframework/eslint-config-fluid": "^0.27.2000-59622",
46
+ "@fluidframework/replay-driver-previous": "npm:@fluidframework/replay-driver@0.58.2000",
46
47
  "@microsoft/api-extractor": "^7.16.1",
47
48
  "@rushstack/eslint-config": "^2.5.1",
48
49
  "@types/mocha": "^8.2.2",
@@ -64,5 +65,9 @@
64
65
  "rimraf": "^2.6.2",
65
66
  "typescript": "~4.1.3",
66
67
  "typescript-formatter": "7.1.0"
68
+ },
69
+ "typeValidation": {
70
+ "version": "0.58.3000",
71
+ "broken": {}
67
72
  }
68
73
  }
@@ -6,4 +6,4 @@
6
6
  */
7
7
 
8
8
  export const pkgName = "@fluidframework/replay-driver";
9
- export const pkgVersion = "0.58.2000";
9
+ export const pkgVersion = "0.58.3000-61081";
@@ -39,6 +39,7 @@ export class ReplayDocumentServiceFactory implements IDocumentServiceFactory {
39
39
  public async createDocumentService(
40
40
  resolvedUrl: IResolvedUrl,
41
41
  logger?: ITelemetryBaseLogger,
42
+ clientIsSummarizer?: boolean,
42
43
  ): Promise<IDocumentService> {
43
44
  // Always include isReplay: true on events for the Replay Driver.
44
45
  // It's used in testing/debugging scenarios, so we want to be able to filter these events out sometimes.
@@ -46,7 +47,7 @@ export class ReplayDocumentServiceFactory implements IDocumentServiceFactory {
46
47
  logger, undefined /* namespace */, {all: { isReplay: true }} /* properties */);
47
48
 
48
49
  return ReplayDocumentService.create(
49
- await this.documentServiceFactory.createDocumentService(resolvedUrl, replayLogger),
50
+ await this.documentServiceFactory.createDocumentService(resolvedUrl, replayLogger, clientIsSummarizer),
50
51
  this.controller);
51
52
  }
52
53
 
@@ -55,6 +56,7 @@ export class ReplayDocumentServiceFactory implements IDocumentServiceFactory {
55
56
  createNewSummary: ISummaryTree,
56
57
  resolvedUrl: IResolvedUrl,
57
58
  logger?: ITelemetryBaseLogger,
59
+ clientIsSummarizer?: boolean,
58
60
  ): Promise<IDocumentService> {
59
61
  throw new Error("Not implemented");
60
62
  }
@@ -171,7 +171,11 @@ export class StaticStorageDocumentServiceFactory implements IDocumentServiceFact
171
171
  public readonly protocolName = "fluid-static-storage:";
172
172
  public constructor(protected readonly storage: IDocumentStorageService) { }
173
173
 
174
- public async createDocumentService(fileURL: IResolvedUrl): Promise<IDocumentService> {
174
+ public async createDocumentService(
175
+ fileURL: IResolvedUrl,
176
+ logger?: ITelemetryLogger,
177
+ clientIsSummarizer?: boolean,
178
+ ): Promise<IDocumentService> {
175
179
  return new StaticStorageDocumentService(this.storage);
176
180
  }
177
181
 
@@ -180,6 +184,7 @@ export class StaticStorageDocumentServiceFactory implements IDocumentServiceFact
180
184
  createNewSummary: ISummaryTree,
181
185
  resolvedUrl: IResolvedUrl,
182
186
  logger: ITelemetryLogger,
187
+ clientIsSummarizer?: boolean,
183
188
  ): Promise<IDocumentService> {
184
189
  throw new Error("Not implemented");
185
190
  }