@fluidframework/replay-driver 2.43.0-343119 → 2.50.0-345060
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/dist/replayDocumentService.d.ts +12 -2
- package/dist/replayDocumentService.d.ts.map +1 -1
- package/dist/replayDocumentService.js +9 -2
- package/dist/replayDocumentService.js.map +1 -1
- package/lib/replayDocumentService.d.ts +12 -2
- package/lib/replayDocumentService.d.ts.map +1 -1
- package/lib/replayDocumentService.js +9 -2
- package/lib/replayDocumentService.js.map +1 -1
- package/package.json +10 -10
- package/src/replayDocumentService.ts +13 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
import { TypedEventEmitter } from "@fluid-internal/client-utils";
|
|
5
|
+
import { TypedEventEmitter, type ILayerCompatDetails } from "@fluid-internal/client-utils";
|
|
6
6
|
import { IClient } from "@fluidframework/driver-definitions";
|
|
7
7
|
import { IDocumentServiceEvents, IDocumentService, IDocumentStorageService, IDocumentDeltaConnection, IResolvedUrl, IDocumentDeltaStorageService } from "@fluidframework/driver-definitions/internal";
|
|
8
8
|
import { ReplayController } from "./replayController.js";
|
|
@@ -15,8 +15,18 @@ import { ReplayController } from "./replayController.js";
|
|
|
15
15
|
export declare class ReplayDocumentService extends TypedEventEmitter<IDocumentServiceEvents> implements IDocumentService {
|
|
16
16
|
private readonly controller;
|
|
17
17
|
private readonly deltaStorage;
|
|
18
|
+
/**
|
|
19
|
+
* The compatibility details of the base Driver layer that is exposed to the Loader layer
|
|
20
|
+
* for validating Loader-Driver compatibility.
|
|
21
|
+
*/
|
|
22
|
+
readonly ILayerCompatDetails: ILayerCompatDetails | undefined;
|
|
18
23
|
static create(documentService: IDocumentService, controller: ReplayController): Promise<IDocumentService>;
|
|
19
|
-
constructor(controller: IDocumentStorageService, deltaStorage: IDocumentDeltaConnection
|
|
24
|
+
constructor(controller: IDocumentStorageService, deltaStorage: IDocumentDeltaConnection,
|
|
25
|
+
/**
|
|
26
|
+
* The compatibility details of the base Driver layer that is exposed to the Loader layer
|
|
27
|
+
* for validating Loader-Driver compatibility.
|
|
28
|
+
*/
|
|
29
|
+
ILayerCompatDetails: ILayerCompatDetails | undefined);
|
|
20
30
|
dispose(): void;
|
|
21
31
|
get resolvedUrl(): IResolvedUrl;
|
|
22
32
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"replayDocumentService.d.ts","sourceRoot":"","sources":["../src/replayDocumentService.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"replayDocumentService.d.ts","sourceRoot":"","sources":["../src/replayDocumentService.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,iBAAiB,EAAE,KAAK,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAE3F,OAAO,EAAE,OAAO,EAAE,MAAM,oCAAoC,CAAC;AAC7D,OAAO,EACN,sBAAsB,EACtB,gBAAgB,EAChB,uBAAuB,EACvB,wBAAwB,EACxB,YAAY,EACZ,4BAA4B,EAC5B,MAAM,6CAA6C,CAAC;AAGrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAGzD;;;;;GAKG;AACH,qBAAa,qBACZ,SAAQ,iBAAiB,CAAC,sBAAsB,CAChD,YAAW,gBAAgB;IAwB1B,OAAO,CAAC,QAAQ,CAAC,UAAU;IAC3B,OAAO,CAAC,QAAQ,CAAC,YAAY;IAC7B;;;OAGG;aACa,mBAAmB,EAAE,mBAAmB,GAAG,SAAS;WA5BjD,MAAM,CACzB,eAAe,EAAE,gBAAgB,EACjC,UAAU,EAAE,gBAAgB,GAC1B,OAAO,CAAC,gBAAgB,CAAC;gBAmBV,UAAU,EAAE,uBAAuB,EACnC,YAAY,EAAE,wBAAwB;IACvD;;;OAGG;IACa,mBAAmB,EAAE,mBAAmB,GAAG,SAAS;IAK9D,OAAO;IAGd,IAAW,WAAW,IAAI,YAAY,CAErC;IAED;;;OAGG;IACU,gBAAgB,IAAI,OAAO,CAAC,uBAAuB,CAAC;IAIjE;;;OAGG;IACU,qBAAqB,IAAI,OAAO,CAAC,4BAA4B,CAAC;IAI3E;;;;;OAKG;IACU,oBAAoB,CAAC,MAAM,EAAE,OAAO,GAAG,OAAO,CAAC,wBAAwB,CAAC;CAGrF"}
|
|
@@ -21,12 +21,19 @@ class ReplayDocumentService extends client_utils_1.TypedEventEmitter {
|
|
|
21
21
|
return documentService;
|
|
22
22
|
}
|
|
23
23
|
const deltaConnection = replayDocumentDeltaConnection_js_1.ReplayDocumentDeltaConnection.create(await documentService.connectToDeltaStorage(), controller);
|
|
24
|
-
|
|
24
|
+
const maybeDriverCompatDetails = documentService;
|
|
25
|
+
return new ReplayDocumentService(controller, deltaConnection, maybeDriverCompatDetails.ILayerCompatDetails);
|
|
25
26
|
}
|
|
26
|
-
constructor(controller, deltaStorage
|
|
27
|
+
constructor(controller, deltaStorage,
|
|
28
|
+
/**
|
|
29
|
+
* The compatibility details of the base Driver layer that is exposed to the Loader layer
|
|
30
|
+
* for validating Loader-Driver compatibility.
|
|
31
|
+
*/
|
|
32
|
+
ILayerCompatDetails) {
|
|
27
33
|
super();
|
|
28
34
|
this.controller = controller;
|
|
29
35
|
this.deltaStorage = deltaStorage;
|
|
36
|
+
this.ILayerCompatDetails = ILayerCompatDetails;
|
|
30
37
|
}
|
|
31
38
|
dispose() { }
|
|
32
39
|
// TODO: Issue-2109 Implement detach container api or put appropriate comment.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"replayDocumentService.js","sourceRoot":"","sources":["../src/replayDocumentService.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,+
|
|
1
|
+
{"version":3,"file":"replayDocumentService.js","sourceRoot":"","sources":["../src/replayDocumentService.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,+DAA2F;AAY3F,+EAAyE;AAEzE,yFAAmF;AAEnF;;;;;GAKG;AACH,MAAa,qBACZ,SAAQ,gCAAyC;IAG1C,MAAM,CAAC,KAAK,CAAC,MAAM,CACzB,eAAiC,EACjC,UAA4B;QAE5B,MAAM,aAAa,GAAG,MAAM,UAAU,CAAC,WAAW,CAAC,eAAe,CAAC,CAAC;QACpE,IAAI,CAAC,aAAa,EAAE,CAAC;YACpB,OAAO,eAAe,CAAC;QACxB,CAAC;QAED,MAAM,eAAe,GAAG,gEAA6B,CAAC,MAAM,CAC3D,MAAM,eAAe,CAAC,qBAAqB,EAAE,EAC7C,UAAU,CACV,CAAC;QACF,MAAM,wBAAwB,GAAG,eAAmD,CAAC;QACrF,OAAO,IAAI,qBAAqB,CAC/B,UAAU,EACV,eAAe,EACf,wBAAwB,CAAC,mBAAmB,CAC5C,CAAC;IACH,CAAC;IAED,YACkB,UAAmC,EACnC,YAAsC;IACvD;;;OAGG;IACa,mBAAoD;QAEpE,KAAK,EAAE,CAAC;QARS,eAAU,GAAV,UAAU,CAAyB;QACnC,iBAAY,GAAZ,YAAY,CAA0B;QAKvC,wBAAmB,GAAnB,mBAAmB,CAAiC;IAGrE,CAAC;IAEM,OAAO,KAAI,CAAC;IAEnB,8EAA8E;IAC9E,IAAW,WAAW;QACrB,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAC;IACpC,CAAC;IAED;;;OAGG;IACI,KAAK,CAAC,gBAAgB;QAC5B,OAAO,IAAI,CAAC,UAAU,CAAC;IACxB,CAAC;IAED;;;OAGG;IACI,KAAK,CAAC,qBAAqB;QACjC,OAAO,IAAI,sDAAwB,EAAE,CAAC;IACvC,CAAC;IAED;;;;;OAKG;IACI,KAAK,CAAC,oBAAoB,CAAC,MAAe;QAChD,OAAO,IAAI,CAAC,YAAY,CAAC;IAC1B,CAAC;CACD;AArED,sDAqEC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { TypedEventEmitter, type ILayerCompatDetails } from \"@fluid-internal/client-utils\";\nimport type { FluidObject } from \"@fluidframework/core-interfaces\";\nimport { IClient } from \"@fluidframework/driver-definitions\";\nimport {\n\tIDocumentServiceEvents,\n\tIDocumentService,\n\tIDocumentStorageService,\n\tIDocumentDeltaConnection,\n\tIResolvedUrl,\n\tIDocumentDeltaStorageService,\n} from \"@fluidframework/driver-definitions/internal\";\n\nimport { EmptyDeltaStorageService } from \"./emptyDeltaStorageService.js\";\nimport { ReplayController } from \"./replayController.js\";\nimport { ReplayDocumentDeltaConnection } from \"./replayDocumentDeltaConnection.js\";\n\n/**\n * The Replay document service dummies out the snapshot and the delta storage.\n * Delta connection simulates the socket by fetching the ops from delta storage\n * and emitting them with a pre determined delay\n * @internal\n */\nexport class ReplayDocumentService\n\textends TypedEventEmitter<IDocumentServiceEvents>\n\timplements IDocumentService\n{\n\tpublic static async create(\n\t\tdocumentService: IDocumentService,\n\t\tcontroller: ReplayController,\n\t): Promise<IDocumentService> {\n\t\tconst useController = await controller.initStorage(documentService);\n\t\tif (!useController) {\n\t\t\treturn documentService;\n\t\t}\n\n\t\tconst deltaConnection = ReplayDocumentDeltaConnection.create(\n\t\t\tawait documentService.connectToDeltaStorage(),\n\t\t\tcontroller,\n\t\t);\n\t\tconst maybeDriverCompatDetails = documentService as FluidObject<ILayerCompatDetails>;\n\t\treturn new ReplayDocumentService(\n\t\t\tcontroller,\n\t\t\tdeltaConnection,\n\t\t\tmaybeDriverCompatDetails.ILayerCompatDetails,\n\t\t);\n\t}\n\n\tconstructor(\n\t\tprivate readonly controller: IDocumentStorageService,\n\t\tprivate readonly deltaStorage: IDocumentDeltaConnection,\n\t\t/**\n\t\t * The compatibility details of the base Driver layer that is exposed to the Loader layer\n\t\t * for validating Loader-Driver compatibility.\n\t\t */\n\t\tpublic readonly ILayerCompatDetails: ILayerCompatDetails | undefined,\n\t) {\n\t\tsuper();\n\t}\n\n\tpublic dispose() {}\n\n\t// TODO: Issue-2109 Implement detach container api or put appropriate comment.\n\tpublic get resolvedUrl(): IResolvedUrl {\n\t\tthrow new Error(\"Not implemented\");\n\t}\n\n\t/**\n\t * Connects to a storage endpoint for snapshot service and blobs.\n\t * @returns returns the dummy document storage service for replay driver.\n\t */\n\tpublic async connectToStorage(): Promise<IDocumentStorageService> {\n\t\treturn this.controller;\n\t}\n\n\t/**\n\t * Connects to a delta storage endpoint for getting ops between a range.\n\t * @returns returns the dummy document delta storage service for replay driver.\n\t */\n\tpublic async connectToDeltaStorage(): Promise<IDocumentDeltaStorageService> {\n\t\treturn new EmptyDeltaStorageService();\n\t}\n\n\t/**\n\t * Connects to a delta storage endpoint of provided documentService to get ops and then replaying\n\t * them so as to mimic a delta stream endpoint.\n\t * @param client - Client that connects to socket.\n\t * @returns returns the delta stream service which replay ops from --from to --to arguments.\n\t */\n\tpublic async connectToDeltaStream(client: IClient): Promise<IDocumentDeltaConnection> {\n\t\treturn this.deltaStorage;\n\t}\n}\n"]}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
import { TypedEventEmitter } from "@fluid-internal/client-utils";
|
|
5
|
+
import { TypedEventEmitter, type ILayerCompatDetails } from "@fluid-internal/client-utils";
|
|
6
6
|
import { IClient } from "@fluidframework/driver-definitions";
|
|
7
7
|
import { IDocumentServiceEvents, IDocumentService, IDocumentStorageService, IDocumentDeltaConnection, IResolvedUrl, IDocumentDeltaStorageService } from "@fluidframework/driver-definitions/internal";
|
|
8
8
|
import { ReplayController } from "./replayController.js";
|
|
@@ -15,8 +15,18 @@ import { ReplayController } from "./replayController.js";
|
|
|
15
15
|
export declare class ReplayDocumentService extends TypedEventEmitter<IDocumentServiceEvents> implements IDocumentService {
|
|
16
16
|
private readonly controller;
|
|
17
17
|
private readonly deltaStorage;
|
|
18
|
+
/**
|
|
19
|
+
* The compatibility details of the base Driver layer that is exposed to the Loader layer
|
|
20
|
+
* for validating Loader-Driver compatibility.
|
|
21
|
+
*/
|
|
22
|
+
readonly ILayerCompatDetails: ILayerCompatDetails | undefined;
|
|
18
23
|
static create(documentService: IDocumentService, controller: ReplayController): Promise<IDocumentService>;
|
|
19
|
-
constructor(controller: IDocumentStorageService, deltaStorage: IDocumentDeltaConnection
|
|
24
|
+
constructor(controller: IDocumentStorageService, deltaStorage: IDocumentDeltaConnection,
|
|
25
|
+
/**
|
|
26
|
+
* The compatibility details of the base Driver layer that is exposed to the Loader layer
|
|
27
|
+
* for validating Loader-Driver compatibility.
|
|
28
|
+
*/
|
|
29
|
+
ILayerCompatDetails: ILayerCompatDetails | undefined);
|
|
20
30
|
dispose(): void;
|
|
21
31
|
get resolvedUrl(): IResolvedUrl;
|
|
22
32
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"replayDocumentService.d.ts","sourceRoot":"","sources":["../src/replayDocumentService.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"replayDocumentService.d.ts","sourceRoot":"","sources":["../src/replayDocumentService.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,iBAAiB,EAAE,KAAK,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAE3F,OAAO,EAAE,OAAO,EAAE,MAAM,oCAAoC,CAAC;AAC7D,OAAO,EACN,sBAAsB,EACtB,gBAAgB,EAChB,uBAAuB,EACvB,wBAAwB,EACxB,YAAY,EACZ,4BAA4B,EAC5B,MAAM,6CAA6C,CAAC;AAGrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAGzD;;;;;GAKG;AACH,qBAAa,qBACZ,SAAQ,iBAAiB,CAAC,sBAAsB,CAChD,YAAW,gBAAgB;IAwB1B,OAAO,CAAC,QAAQ,CAAC,UAAU;IAC3B,OAAO,CAAC,QAAQ,CAAC,YAAY;IAC7B;;;OAGG;aACa,mBAAmB,EAAE,mBAAmB,GAAG,SAAS;WA5BjD,MAAM,CACzB,eAAe,EAAE,gBAAgB,EACjC,UAAU,EAAE,gBAAgB,GAC1B,OAAO,CAAC,gBAAgB,CAAC;gBAmBV,UAAU,EAAE,uBAAuB,EACnC,YAAY,EAAE,wBAAwB;IACvD;;;OAGG;IACa,mBAAmB,EAAE,mBAAmB,GAAG,SAAS;IAK9D,OAAO;IAGd,IAAW,WAAW,IAAI,YAAY,CAErC;IAED;;;OAGG;IACU,gBAAgB,IAAI,OAAO,CAAC,uBAAuB,CAAC;IAIjE;;;OAGG;IACU,qBAAqB,IAAI,OAAO,CAAC,4BAA4B,CAAC;IAI3E;;;;;OAKG;IACU,oBAAoB,CAAC,MAAM,EAAE,OAAO,GAAG,OAAO,CAAC,wBAAwB,CAAC;CAGrF"}
|
|
@@ -18,12 +18,19 @@ export class ReplayDocumentService extends TypedEventEmitter {
|
|
|
18
18
|
return documentService;
|
|
19
19
|
}
|
|
20
20
|
const deltaConnection = ReplayDocumentDeltaConnection.create(await documentService.connectToDeltaStorage(), controller);
|
|
21
|
-
|
|
21
|
+
const maybeDriverCompatDetails = documentService;
|
|
22
|
+
return new ReplayDocumentService(controller, deltaConnection, maybeDriverCompatDetails.ILayerCompatDetails);
|
|
22
23
|
}
|
|
23
|
-
constructor(controller, deltaStorage
|
|
24
|
+
constructor(controller, deltaStorage,
|
|
25
|
+
/**
|
|
26
|
+
* The compatibility details of the base Driver layer that is exposed to the Loader layer
|
|
27
|
+
* for validating Loader-Driver compatibility.
|
|
28
|
+
*/
|
|
29
|
+
ILayerCompatDetails) {
|
|
24
30
|
super();
|
|
25
31
|
this.controller = controller;
|
|
26
32
|
this.deltaStorage = deltaStorage;
|
|
33
|
+
this.ILayerCompatDetails = ILayerCompatDetails;
|
|
27
34
|
}
|
|
28
35
|
dispose() { }
|
|
29
36
|
// TODO: Issue-2109 Implement detach container api or put appropriate comment.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"replayDocumentService.js","sourceRoot":"","sources":["../src/replayDocumentService.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,iBAAiB,
|
|
1
|
+
{"version":3,"file":"replayDocumentService.js","sourceRoot":"","sources":["../src/replayDocumentService.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,iBAAiB,EAA4B,MAAM,8BAA8B,CAAC;AAY3F,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAEzE,OAAO,EAAE,6BAA6B,EAAE,MAAM,oCAAoC,CAAC;AAEnF;;;;;GAKG;AACH,MAAM,OAAO,qBACZ,SAAQ,iBAAyC;IAG1C,MAAM,CAAC,KAAK,CAAC,MAAM,CACzB,eAAiC,EACjC,UAA4B;QAE5B,MAAM,aAAa,GAAG,MAAM,UAAU,CAAC,WAAW,CAAC,eAAe,CAAC,CAAC;QACpE,IAAI,CAAC,aAAa,EAAE,CAAC;YACpB,OAAO,eAAe,CAAC;QACxB,CAAC;QAED,MAAM,eAAe,GAAG,6BAA6B,CAAC,MAAM,CAC3D,MAAM,eAAe,CAAC,qBAAqB,EAAE,EAC7C,UAAU,CACV,CAAC;QACF,MAAM,wBAAwB,GAAG,eAAmD,CAAC;QACrF,OAAO,IAAI,qBAAqB,CAC/B,UAAU,EACV,eAAe,EACf,wBAAwB,CAAC,mBAAmB,CAC5C,CAAC;IACH,CAAC;IAED,YACkB,UAAmC,EACnC,YAAsC;IACvD;;;OAGG;IACa,mBAAoD;QAEpE,KAAK,EAAE,CAAC;QARS,eAAU,GAAV,UAAU,CAAyB;QACnC,iBAAY,GAAZ,YAAY,CAA0B;QAKvC,wBAAmB,GAAnB,mBAAmB,CAAiC;IAGrE,CAAC;IAEM,OAAO,KAAI,CAAC;IAEnB,8EAA8E;IAC9E,IAAW,WAAW;QACrB,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAC;IACpC,CAAC;IAED;;;OAGG;IACI,KAAK,CAAC,gBAAgB;QAC5B,OAAO,IAAI,CAAC,UAAU,CAAC;IACxB,CAAC;IAED;;;OAGG;IACI,KAAK,CAAC,qBAAqB;QACjC,OAAO,IAAI,wBAAwB,EAAE,CAAC;IACvC,CAAC;IAED;;;;;OAKG;IACI,KAAK,CAAC,oBAAoB,CAAC,MAAe;QAChD,OAAO,IAAI,CAAC,YAAY,CAAC;IAC1B,CAAC;CACD","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { TypedEventEmitter, type ILayerCompatDetails } from \"@fluid-internal/client-utils\";\nimport type { FluidObject } from \"@fluidframework/core-interfaces\";\nimport { IClient } from \"@fluidframework/driver-definitions\";\nimport {\n\tIDocumentServiceEvents,\n\tIDocumentService,\n\tIDocumentStorageService,\n\tIDocumentDeltaConnection,\n\tIResolvedUrl,\n\tIDocumentDeltaStorageService,\n} from \"@fluidframework/driver-definitions/internal\";\n\nimport { EmptyDeltaStorageService } from \"./emptyDeltaStorageService.js\";\nimport { ReplayController } from \"./replayController.js\";\nimport { ReplayDocumentDeltaConnection } from \"./replayDocumentDeltaConnection.js\";\n\n/**\n * The Replay document service dummies out the snapshot and the delta storage.\n * Delta connection simulates the socket by fetching the ops from delta storage\n * and emitting them with a pre determined delay\n * @internal\n */\nexport class ReplayDocumentService\n\textends TypedEventEmitter<IDocumentServiceEvents>\n\timplements IDocumentService\n{\n\tpublic static async create(\n\t\tdocumentService: IDocumentService,\n\t\tcontroller: ReplayController,\n\t): Promise<IDocumentService> {\n\t\tconst useController = await controller.initStorage(documentService);\n\t\tif (!useController) {\n\t\t\treturn documentService;\n\t\t}\n\n\t\tconst deltaConnection = ReplayDocumentDeltaConnection.create(\n\t\t\tawait documentService.connectToDeltaStorage(),\n\t\t\tcontroller,\n\t\t);\n\t\tconst maybeDriverCompatDetails = documentService as FluidObject<ILayerCompatDetails>;\n\t\treturn new ReplayDocumentService(\n\t\t\tcontroller,\n\t\t\tdeltaConnection,\n\t\t\tmaybeDriverCompatDetails.ILayerCompatDetails,\n\t\t);\n\t}\n\n\tconstructor(\n\t\tprivate readonly controller: IDocumentStorageService,\n\t\tprivate readonly deltaStorage: IDocumentDeltaConnection,\n\t\t/**\n\t\t * The compatibility details of the base Driver layer that is exposed to the Loader layer\n\t\t * for validating Loader-Driver compatibility.\n\t\t */\n\t\tpublic readonly ILayerCompatDetails: ILayerCompatDetails | undefined,\n\t) {\n\t\tsuper();\n\t}\n\n\tpublic dispose() {}\n\n\t// TODO: Issue-2109 Implement detach container api or put appropriate comment.\n\tpublic get resolvedUrl(): IResolvedUrl {\n\t\tthrow new Error(\"Not implemented\");\n\t}\n\n\t/**\n\t * Connects to a storage endpoint for snapshot service and blobs.\n\t * @returns returns the dummy document storage service for replay driver.\n\t */\n\tpublic async connectToStorage(): Promise<IDocumentStorageService> {\n\t\treturn this.controller;\n\t}\n\n\t/**\n\t * Connects to a delta storage endpoint for getting ops between a range.\n\t * @returns returns the dummy document delta storage service for replay driver.\n\t */\n\tpublic async connectToDeltaStorage(): Promise<IDocumentDeltaStorageService> {\n\t\treturn new EmptyDeltaStorageService();\n\t}\n\n\t/**\n\t * Connects to a delta storage endpoint of provided documentService to get ops and then replaying\n\t * them so as to mimic a delta stream endpoint.\n\t * @param client - Client that connects to socket.\n\t * @returns returns the delta stream service which replay ops from --from to --to arguments.\n\t */\n\tpublic async connectToDeltaStream(client: IClient): Promise<IDocumentDeltaConnection> {\n\t\treturn this.deltaStorage;\n\t}\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluidframework/replay-driver",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.50.0-345060",
|
|
4
4
|
"description": "Document replay version of Socket.IO implementation",
|
|
5
5
|
"homepage": "https://fluidframework.com",
|
|
6
6
|
"repository": {
|
|
@@ -37,21 +37,21 @@
|
|
|
37
37
|
"main": "lib/index.js",
|
|
38
38
|
"types": "lib/public.d.ts",
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@fluid-internal/client-utils": "2.
|
|
41
|
-
"@fluidframework/core-interfaces": "2.
|
|
42
|
-
"@fluidframework/core-utils": "2.
|
|
43
|
-
"@fluidframework/driver-definitions": "2.
|
|
44
|
-
"@fluidframework/driver-utils": "2.
|
|
45
|
-
"@fluidframework/telemetry-utils": "2.
|
|
40
|
+
"@fluid-internal/client-utils": "2.50.0-345060",
|
|
41
|
+
"@fluidframework/core-interfaces": "2.50.0-345060",
|
|
42
|
+
"@fluidframework/core-utils": "2.50.0-345060",
|
|
43
|
+
"@fluidframework/driver-definitions": "2.50.0-345060",
|
|
44
|
+
"@fluidframework/driver-utils": "2.50.0-345060",
|
|
45
|
+
"@fluidframework/telemetry-utils": "2.50.0-345060"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@arethetypeswrong/cli": "^0.17.1",
|
|
49
49
|
"@biomejs/biome": "~1.9.3",
|
|
50
|
-
"@fluid-tools/build-cli": "^0.
|
|
50
|
+
"@fluid-tools/build-cli": "^0.56.0",
|
|
51
51
|
"@fluidframework/build-common": "^2.0.3",
|
|
52
|
-
"@fluidframework/build-tools": "^0.
|
|
52
|
+
"@fluidframework/build-tools": "^0.56.0",
|
|
53
53
|
"@fluidframework/eslint-config-fluid": "^5.7.4",
|
|
54
|
-
"@fluidframework/replay-driver-previous": "npm:@fluidframework/replay-driver@2.
|
|
54
|
+
"@fluidframework/replay-driver-previous": "npm:@fluidframework/replay-driver@2.43.0",
|
|
55
55
|
"@microsoft/api-extractor": "7.52.8",
|
|
56
56
|
"@types/nock": "^9.3.0",
|
|
57
57
|
"@types/node": "^18.19.0",
|
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import { TypedEventEmitter } from "@fluid-internal/client-utils";
|
|
6
|
+
import { TypedEventEmitter, type ILayerCompatDetails } from "@fluid-internal/client-utils";
|
|
7
|
+
import type { FluidObject } from "@fluidframework/core-interfaces";
|
|
7
8
|
import { IClient } from "@fluidframework/driver-definitions";
|
|
8
9
|
import {
|
|
9
10
|
IDocumentServiceEvents,
|
|
@@ -41,12 +42,22 @@ export class ReplayDocumentService
|
|
|
41
42
|
await documentService.connectToDeltaStorage(),
|
|
42
43
|
controller,
|
|
43
44
|
);
|
|
44
|
-
|
|
45
|
+
const maybeDriverCompatDetails = documentService as FluidObject<ILayerCompatDetails>;
|
|
46
|
+
return new ReplayDocumentService(
|
|
47
|
+
controller,
|
|
48
|
+
deltaConnection,
|
|
49
|
+
maybeDriverCompatDetails.ILayerCompatDetails,
|
|
50
|
+
);
|
|
45
51
|
}
|
|
46
52
|
|
|
47
53
|
constructor(
|
|
48
54
|
private readonly controller: IDocumentStorageService,
|
|
49
55
|
private readonly deltaStorage: IDocumentDeltaConnection,
|
|
56
|
+
/**
|
|
57
|
+
* The compatibility details of the base Driver layer that is exposed to the Loader layer
|
|
58
|
+
* for validating Loader-Driver compatibility.
|
|
59
|
+
*/
|
|
60
|
+
public readonly ILayerCompatDetails: ILayerCompatDetails | undefined,
|
|
50
61
|
) {
|
|
51
62
|
super();
|
|
52
63
|
}
|