@fluidframework/local-driver 2.42.0 → 2.43.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/localDocumentService.d.ts +7 -2
- package/dist/localDocumentService.d.ts.map +1 -1
- package/dist/localDocumentService.js +8 -0
- package/dist/localDocumentService.js.map +1 -1
- package/dist/localLayerCompatState.d.ts +11 -0
- package/dist/localLayerCompatState.d.ts.map +1 -0
- package/dist/localLayerCompatState.js +27 -0
- package/dist/localLayerCompatState.js.map +1 -0
- package/dist/packageVersion.d.ts +9 -0
- package/dist/packageVersion.d.ts.map +1 -0
- package/dist/packageVersion.js +12 -0
- package/dist/packageVersion.js.map +1 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/lib/localDocumentService.d.ts +7 -2
- package/lib/localDocumentService.d.ts.map +1 -1
- package/lib/localDocumentService.js +9 -1
- package/lib/localDocumentService.js.map +1 -1
- package/lib/localLayerCompatState.d.ts +11 -0
- package/lib/localLayerCompatState.d.ts.map +1 -0
- package/lib/localLayerCompatState.js +24 -0
- package/lib/localLayerCompatState.js.map +1 -0
- package/lib/packageVersion.d.ts +9 -0
- package/lib/packageVersion.d.ts.map +1 -0
- package/lib/packageVersion.js +9 -0
- package/lib/packageVersion.js.map +1 -0
- package/package.json +14 -13
- package/src/index.ts +1 -0
- package/src/localDocumentService.ts +15 -2
- package/src/localLayerCompatState.ts +27 -0
- package/src/packageVersion.ts +9 -0
package/CHANGELOG.md
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -8,5 +8,6 @@ export { createLocalDocumentService, LocalDocumentService } from "./localDocumen
|
|
|
8
8
|
export { LocalDocumentServiceFactory } from "./localDocumentServiceFactory.js";
|
|
9
9
|
export { LocalDocumentStorageService } from "./localDocumentStorageService.js";
|
|
10
10
|
export { createLocalResolverCreateNewRequest, LocalResolver } from "./localResolver.js";
|
|
11
|
+
export { localDriverCompatDetailsForLoader } from "./localLayerCompatState.js";
|
|
11
12
|
export { LocalSessionStorageDbFactory } from "./localSessionStorageDb.js";
|
|
12
13
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAC;AACjF,OAAO,EAAE,0BAA0B,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAC7F,OAAO,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAC;AAC/E,OAAO,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAC;AAC/E,OAAO,EAAE,mCAAmC,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxF,OAAO,EAAE,4BAA4B,EAAE,MAAM,4BAA4B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAC;AACjF,OAAO,EAAE,0BAA0B,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAC7F,OAAO,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAC;AAC/E,OAAO,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAC;AAC/E,OAAO,EAAE,mCAAmC,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxF,OAAO,EAAE,iCAAiC,EAAE,MAAM,4BAA4B,CAAC;AAC/E,OAAO,EAAE,4BAA4B,EAAE,MAAM,4BAA4B,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Licensed under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.LocalSessionStorageDbFactory = exports.LocalResolver = exports.createLocalResolverCreateNewRequest = exports.LocalDocumentStorageService = exports.LocalDocumentServiceFactory = exports.LocalDocumentService = exports.createLocalDocumentService = exports.LocalDocumentDeltaConnection = exports.LocalDeltaStorageService = void 0;
|
|
7
|
+
exports.LocalSessionStorageDbFactory = exports.localDriverCompatDetailsForLoader = exports.LocalResolver = exports.createLocalResolverCreateNewRequest = exports.LocalDocumentStorageService = exports.LocalDocumentServiceFactory = exports.LocalDocumentService = exports.createLocalDocumentService = exports.LocalDocumentDeltaConnection = exports.LocalDeltaStorageService = void 0;
|
|
8
8
|
var localDeltaStorageService_js_1 = require("./localDeltaStorageService.js");
|
|
9
9
|
Object.defineProperty(exports, "LocalDeltaStorageService", { enumerable: true, get: function () { return localDeltaStorageService_js_1.LocalDeltaStorageService; } });
|
|
10
10
|
var localDocumentDeltaConnection_js_1 = require("./localDocumentDeltaConnection.js");
|
|
@@ -19,6 +19,8 @@ Object.defineProperty(exports, "LocalDocumentStorageService", { enumerable: true
|
|
|
19
19
|
var localResolver_js_1 = require("./localResolver.js");
|
|
20
20
|
Object.defineProperty(exports, "createLocalResolverCreateNewRequest", { enumerable: true, get: function () { return localResolver_js_1.createLocalResolverCreateNewRequest; } });
|
|
21
21
|
Object.defineProperty(exports, "LocalResolver", { enumerable: true, get: function () { return localResolver_js_1.LocalResolver; } });
|
|
22
|
+
var localLayerCompatState_js_1 = require("./localLayerCompatState.js");
|
|
23
|
+
Object.defineProperty(exports, "localDriverCompatDetailsForLoader", { enumerable: true, get: function () { return localLayerCompatState_js_1.localDriverCompatDetailsForLoader; } });
|
|
22
24
|
var localSessionStorageDb_js_1 = require("./localSessionStorageDb.js");
|
|
23
25
|
Object.defineProperty(exports, "LocalSessionStorageDbFactory", { enumerable: true, get: function () { return localSessionStorageDb_js_1.LocalSessionStorageDbFactory; } });
|
|
24
26
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,6EAAyE;AAAhE,uIAAA,wBAAwB,OAAA;AACjC,qFAAiF;AAAxE,+IAAA,4BAA4B,OAAA;AACrC,qEAA6F;AAApF,qIAAA,0BAA0B,OAAA;AAAE,+HAAA,oBAAoB,OAAA;AACzD,mFAA+E;AAAtE,6IAAA,2BAA2B,OAAA;AACpC,mFAA+E;AAAtE,6IAAA,2BAA2B,OAAA;AACpC,uDAAwF;AAA/E,uIAAA,mCAAmC,OAAA;AAAE,iHAAA,aAAa,OAAA;AAC3D,uEAA0E;AAAjE,wIAAA,4BAA4B,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport { LocalDeltaStorageService } from \"./localDeltaStorageService.js\";\nexport { LocalDocumentDeltaConnection } from \"./localDocumentDeltaConnection.js\";\nexport { createLocalDocumentService, LocalDocumentService } from \"./localDocumentService.js\";\nexport { LocalDocumentServiceFactory } from \"./localDocumentServiceFactory.js\";\nexport { LocalDocumentStorageService } from \"./localDocumentStorageService.js\";\nexport { createLocalResolverCreateNewRequest, LocalResolver } from \"./localResolver.js\";\nexport { LocalSessionStorageDbFactory } from \"./localSessionStorageDb.js\";\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,6EAAyE;AAAhE,uIAAA,wBAAwB,OAAA;AACjC,qFAAiF;AAAxE,+IAAA,4BAA4B,OAAA;AACrC,qEAA6F;AAApF,qIAAA,0BAA0B,OAAA;AAAE,+HAAA,oBAAoB,OAAA;AACzD,mFAA+E;AAAtE,6IAAA,2BAA2B,OAAA;AACpC,mFAA+E;AAAtE,6IAAA,2BAA2B,OAAA;AACpC,uDAAwF;AAA/E,uIAAA,mCAAmC,OAAA;AAAE,iHAAA,aAAa,OAAA;AAC3D,uEAA+E;AAAtE,6IAAA,iCAAiC,OAAA;AAC1C,uEAA0E;AAAjE,wIAAA,4BAA4B,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport { LocalDeltaStorageService } from \"./localDeltaStorageService.js\";\nexport { LocalDocumentDeltaConnection } from \"./localDocumentDeltaConnection.js\";\nexport { createLocalDocumentService, LocalDocumentService } from \"./localDocumentService.js\";\nexport { LocalDocumentServiceFactory } from \"./localDocumentServiceFactory.js\";\nexport { LocalDocumentStorageService } from \"./localDocumentStorageService.js\";\nexport { createLocalResolverCreateNewRequest, LocalResolver } from \"./localResolver.js\";\nexport { localDriverCompatDetailsForLoader } from \"./localLayerCompatState.js\";\nexport { LocalSessionStorageDbFactory } from \"./localSessionStorageDb.js\";\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, type IProvideLayerCompatDetails } from "@fluid-internal/client-utils";
|
|
6
6
|
import { ITelemetryBaseLogger } from "@fluidframework/core-interfaces";
|
|
7
7
|
import { IClient } from "@fluidframework/driver-definitions";
|
|
8
8
|
import { IDocumentDeltaConnection, IDocumentDeltaStorageService, IDocumentService, IDocumentServiceEvents, IDocumentServicePolicies, IDocumentStorageService, IResolvedUrl } from "@fluidframework/driver-definitions/internal";
|
|
@@ -13,7 +13,7 @@ import { LocalDocumentDeltaConnection } from "./localDocumentDeltaConnection.js"
|
|
|
13
13
|
* Basic implementation of a document service for local use.
|
|
14
14
|
* @internal
|
|
15
15
|
*/
|
|
16
|
-
export declare class LocalDocumentService extends TypedEventEmitter<IDocumentServiceEvents> implements IDocumentService {
|
|
16
|
+
export declare class LocalDocumentService extends TypedEventEmitter<IDocumentServiceEvents> implements IDocumentService, IProvideLayerCompatDetails {
|
|
17
17
|
readonly resolvedUrl: IResolvedUrl;
|
|
18
18
|
private readonly localDeltaConnectionServer;
|
|
19
19
|
private readonly tokenProvider;
|
|
@@ -30,6 +30,11 @@ export declare class LocalDocumentService extends TypedEventEmitter<IDocumentSer
|
|
|
30
30
|
* @param documentId - ID of document
|
|
31
31
|
*/
|
|
32
32
|
constructor(resolvedUrl: IResolvedUrl, localDeltaConnectionServer: ILocalDeltaConnectionServer, tokenProvider: ITokenProvider, tenantId: string, documentId: string, documentDeltaConnectionsMap: Map<string, LocalDocumentDeltaConnection>, policies?: IDocumentServicePolicies, innerDocumentService?: IDocumentService | undefined, logger?: ITelemetryBaseLogger | undefined);
|
|
33
|
+
/**
|
|
34
|
+
* The compatibility details of the Local Driver layer that is exposed to the Loader layer
|
|
35
|
+
* for validating Loader-Driver compatibility.
|
|
36
|
+
*/
|
|
37
|
+
get ILayerCompatDetails(): ILayerCompatDetails;
|
|
33
38
|
dispose(): void;
|
|
34
39
|
/**
|
|
35
40
|
* Creates and returns a document storage service for local use.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"localDocumentService.d.ts","sourceRoot":"","sources":["../src/localDocumentService.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"localDocumentService.d.ts","sourceRoot":"","sources":["../src/localDocumentService.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,iBAAiB,EACjB,KAAK,mBAAmB,EACxB,KAAK,0BAA0B,EAC/B,MAAM,8BAA8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AI,OAAO,CAAC,uBAAuB,CAAC;IAcjE;;OAEG;IACU,qBAAqB,IAAI,OAAO,CAAC,4BAA4B,CAAC;IAW3E;;;OAGG;IACU,oBAAoB,CAAC,MAAM,EAAE,OAAO,GAAG,OAAO,CAAC,wBAAwB,CAAC;CAgCrF;AAED;;;;;;;GAOG;AACH,wBAAgB,0BAA0B,CACzC,WAAW,EAAE,YAAY,EACzB,0BAA0B,EAAE,2BAA2B,EACvD,aAAa,EAAE,cAAc,EAC7B,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE,MAAM,EAClB,2BAA2B,EAAE,GAAG,CAAC,MAAM,EAAE,4BAA4B,CAAC,EACtE,QAAQ,CAAC,EAAE,wBAAwB,EACnC,oBAAoB,CAAC,EAAE,gBAAgB,EACvC,MAAM,CAAC,EAAE,oBAAoB,GAC3B,gBAAgB,CAYlB"}
|
|
@@ -11,6 +11,7 @@ const server_test_utils_1 = require("@fluidframework/server-test-utils");
|
|
|
11
11
|
const localDeltaStorageService_js_1 = require("./localDeltaStorageService.js");
|
|
12
12
|
const localDocumentDeltaConnection_js_1 = require("./localDocumentDeltaConnection.js");
|
|
13
13
|
const localDocumentStorageService_js_1 = require("./localDocumentStorageService.js");
|
|
14
|
+
const localLayerCompatState_js_1 = require("./localLayerCompatState.js");
|
|
14
15
|
/**
|
|
15
16
|
* Basic implementation of a document service for local use.
|
|
16
17
|
* @internal
|
|
@@ -34,6 +35,13 @@ class LocalDocumentService extends client_utils_1.TypedEventEmitter {
|
|
|
34
35
|
this.innerDocumentService = innerDocumentService;
|
|
35
36
|
this.logger = logger;
|
|
36
37
|
}
|
|
38
|
+
/**
|
|
39
|
+
* The compatibility details of the Local Driver layer that is exposed to the Loader layer
|
|
40
|
+
* for validating Loader-Driver compatibility.
|
|
41
|
+
*/
|
|
42
|
+
get ILayerCompatDetails() {
|
|
43
|
+
return localLayerCompatState_js_1.localDriverCompatDetailsForLoader;
|
|
44
|
+
}
|
|
37
45
|
dispose() { }
|
|
38
46
|
/**
|
|
39
47
|
* Creates and returns a document storage service for local use.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"localDocumentService.js","sourceRoot":"","sources":["../src/localDocumentService.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,+
|
|
1
|
+
{"version":3,"file":"localDocumentService.js","sourceRoot":"","sources":["../src/localDocumentService.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,+DAIsC;AActC,mFAAoE;AACpE,yEAAkE;AAElE,+EAAyE;AACzE,uFAAiF;AACjF,qFAA+E;AAC/E,yEAA+E;AAE/E;;;GAGG;AACH,MAAa,oBACZ,SAAQ,gCAAyC;IAGjD;;;;;OAKG;IACH,YACiB,WAAyB,EACxB,0BAAuD,EACvD,aAA6B,EAC7B,QAAgB,EAChB,UAAkB,EAClB,2BAAsE,EACvE,WAAqC,EAAE,qBAAqB,EAAE,IAAI,EAAE,EACnE,oBAAuC,EACvC,MAA6B;QAE9C,KAAK,EAAE,CAAC;QAVQ,gBAAW,GAAX,WAAW,CAAc;QACxB,+BAA0B,GAA1B,0BAA0B,CAA6B;QACvD,kBAAa,GAAb,aAAa,CAAgB;QAC7B,aAAQ,GAAR,QAAQ,CAAQ;QAChB,eAAU,GAAV,UAAU,CAAQ;QAClB,gCAA2B,GAA3B,2BAA2B,CAA2C;QACvE,aAAQ,GAAR,QAAQ,CAA4D;QACnE,yBAAoB,GAApB,oBAAoB,CAAmB;QACvC,WAAM,GAAN,MAAM,CAAuB;IAG/C,CAAC;IAED;;;OAGG;IACH,IAAW,mBAAmB;QAC7B,OAAO,4DAAiC,CAAC;IAC1C,CAAC;IAEM,OAAO,KAAI,CAAC;IAEnB;;OAEG;IACI,KAAK,CAAC,gBAAgB;QAC5B,OAAO,IAAI,4DAA2B,CACrC,IAAI,CAAC,UAAU,EACf,IAAI,mCAAU,CACb,IAAI,iCAAa,CAAC,IAAI,CAAC,0BAA0B,CAAC,aAAa,CAAC,YAAY,CAAC,CAC7E,E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AAuB,CAAC,EAAE,CAAC,YAAY,EAAE,GAAG,EAAE;YAC7C,IAAI,CAAC,2BAA2B,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;QACnD,CAAC,CAAC,CAAC;QAEH,OAAO,uBAAuB,CAAC;IAChC,CAAC;CACD;AArGD,oDAqGC;AAED;;;;;;;GAOG;AACH,SAAgB,0BAA0B,CACzC,WAAyB,EACzB,0BAAuD,EACvD,aAA6B,EAC7B,QAAgB,EAChB,UAAkB,EAClB,2BAAsE,EACtE,QAAmC,EACnC,oBAAuC,EACvC,MAA6B;IAE7B,OAAO,IAAI,oBAAoB,CAC9B,WAAW,EACX,0BAA0B,EAC1B,aAAa,EACb,QAAQ,EACR,UAAU,EACV,2BAA2B,EAC3B,QAAQ,EACR,oBAAoB,EACpB,MAAM,CACN,CAAC;AACH,CAAC;AAtBD,gEAsBC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport {\n\tTypedEventEmitter,\n\ttype ILayerCompatDetails,\n\ttype IProvideLayerCompatDetails,\n} from \"@fluid-internal/client-utils\";\nimport { ITelemetryBaseLogger } from \"@fluidframework/core-interfaces\";\nimport { IClient } from \"@fluidframework/driver-definitions\";\nimport {\n\tIDocumentDeltaConnection,\n\tIDocumentDeltaStorageService,\n\tIDocumentService,\n\tIDocumentServiceEvents,\n\tIDocumentServicePolicies,\n\tIDocumentStorageService,\n\tIResolvedUrl,\n} from \"@fluidframework/driver-definitions/internal\";\nimport { ITokenProvider } from \"@fluidframework/routerlicious-driver\";\nimport { ILocalDeltaConnectionServer } from \"@fluidframework/server-local-server\";\nimport { GitManager } from \"@fluidframework/server-services-client\";\nimport { TestHistorian } from \"@fluidframework/server-test-utils\";\n\nimport { LocalDeltaStorageService } from \"./localDeltaStorageService.js\";\nimport { LocalDocumentDeltaConnection } from \"./localDocumentDeltaConnection.js\";\nimport { LocalDocumentStorageService } from \"./localDocumentStorageService.js\";\nimport { localDriverCompatDetailsForLoader } from \"./localLayerCompatState.js\";\n\n/**\n * Basic implementation of a document service for local use.\n * @internal\n */\nexport class LocalDocumentService\n\textends TypedEventEmitter<IDocumentServiceEvents>\n\timplements IDocumentService, IProvideLayerCompatDetails\n{\n\t/**\n\t * @param localDeltaConnectionServer - delta connection server for ops\n\t * @param tokenProvider - token provider\n\t * @param tenantId - ID of tenant\n\t * @param documentId - ID of document\n\t */\n\tconstructor(\n\t\tpublic readonly resolvedUrl: IResolvedUrl,\n\t\tprivate readonly localDeltaConnectionServer: ILocalDeltaConnectionServer,\n\t\tprivate readonly tokenProvider: ITokenProvider,\n\t\tprivate readonly tenantId: string,\n\t\tprivate readonly documentId: string,\n\t\tprivate readonly documentDeltaConnectionsMap: Map<string, LocalDocumentDeltaConnection>,\n\t\tpublic readonly policies: IDocumentServicePolicies = { supportGetSnapshotApi: true },\n\t\tprivate readonly innerDocumentService?: IDocumentService,\n\t\tprivate readonly logger?: ITelemetryBaseLogger,\n\t) {\n\t\tsuper();\n\t}\n\n\t/**\n\t * The compatibility details of the Local Driver layer that is exposed to the Loader layer\n\t * for validating Loader-Driver compatibility.\n\t */\n\tpublic get ILayerCompatDetails(): ILayerCompatDetails {\n\t\treturn localDriverCompatDetailsForLoader;\n\t}\n\n\tpublic dispose() {}\n\n\t/**\n\t * Creates and returns a document storage service for local use.\n\t */\n\tpublic async connectToStorage(): Promise<IDocumentStorageService> {\n\t\treturn new LocalDocumentStorageService(\n\t\t\tthis.documentId,\n\t\t\tnew GitManager(\n\t\t\t\tnew TestHistorian(this.localDeltaConnectionServer.testDbFactory.testDatabase),\n\t\t\t),\n\t\t\t{\n\t\t\t\tmaximumCacheDurationMs: 432_000_000, // 5 days in ms. Not actually enforced but shouldn't matter for any local driver scenario\n\t\t\t},\n\t\t\tthis.localDeltaConnectionServer,\n\t\t\tthis.resolvedUrl,\n\t\t);\n\t}\n\n\t/**\n\t * Creates and returns a delta storage service for local use.\n\t */\n\tpublic async connectToDeltaStorage(): Promise<IDocumentDeltaStorageService> {\n\t\tif (this.innerDocumentService) {\n\t\t\treturn this.innerDocumentService.connectToDeltaStorage();\n\t\t}\n\t\treturn new LocalDeltaStorageService(\n\t\t\tthis.tenantId,\n\t\t\tthis.documentId,\n\t\t\tthis.localDeltaConnectionServer.databaseManager,\n\t\t);\n\t}\n\n\t/**\n\t * Creates and returns a delta stream for local use.\n\t * @param client - client data\n\t */\n\tpublic async connectToDeltaStream(client: IClient): Promise<IDocumentDeltaConnection> {\n\t\tif (this.policies.storageOnly === true) {\n\t\t\tthrow new Error(\"can't connect to delta stream in storage-only mode\");\n\t\t}\n\t\tif (this.innerDocumentService) {\n\t\t\treturn this.innerDocumentService.connectToDeltaStream(client);\n\t\t}\n\t\tconst ordererToken = await this.tokenProvider.fetchOrdererToken(\n\t\t\tthis.tenantId,\n\t\t\tthis.documentId,\n\t\t);\n\t\tconst documentDeltaConnection = await LocalDocumentDeltaConnection.create(\n\t\t\tthis.tenantId,\n\t\t\tthis.documentId,\n\t\t\tordererToken.jwt,\n\t\t\tclient,\n\t\t\tthis.localDeltaConnectionServer.webSocketServer,\n\t\t\tundefined,\n\t\t\tthis.logger,\n\t\t);\n\t\tconst clientId = documentDeltaConnection.clientId;\n\n\t\t// Add this document service for the clientId in the document service factory.\n\t\tthis.documentDeltaConnectionsMap.set(clientId, documentDeltaConnection);\n\n\t\t// Add a listener to remove this document service when the client is disconnected.\n\t\tdocumentDeltaConnection.on(\"disconnect\", () => {\n\t\t\tthis.documentDeltaConnectionsMap.delete(clientId);\n\t\t});\n\n\t\treturn documentDeltaConnection;\n\t}\n}\n\n/**\n * Creates and returns a document service for local use.\n * @param localDeltaConnectionServer - delta connection server for ops\n * @param tokenProvider - token provider with a single token\n * @param tenantId - ID of tenant\n * @param documentId - ID of document\n * @internal\n */\nexport function createLocalDocumentService(\n\tresolvedUrl: IResolvedUrl,\n\tlocalDeltaConnectionServer: ILocalDeltaConnectionServer,\n\ttokenProvider: ITokenProvider,\n\ttenantId: string,\n\tdocumentId: string,\n\tdocumentDeltaConnectionsMap: Map<string, LocalDocumentDeltaConnection>,\n\tpolicies?: IDocumentServicePolicies,\n\tinnerDocumentService?: IDocumentService,\n\tlogger?: ITelemetryBaseLogger,\n): IDocumentService {\n\treturn new LocalDocumentService(\n\t\tresolvedUrl,\n\t\tlocalDeltaConnectionServer,\n\t\ttokenProvider,\n\t\ttenantId,\n\t\tdocumentId,\n\t\tdocumentDeltaConnectionsMap,\n\t\tpolicies,\n\t\tinnerDocumentService,\n\t\tlogger,\n\t);\n}\n"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
import { type ILayerCompatDetails } from "@fluid-internal/client-utils";
|
|
6
|
+
/**
|
|
7
|
+
* Local Driver's compatibility details that is exposed to the Loader layer.
|
|
8
|
+
* @internal
|
|
9
|
+
*/
|
|
10
|
+
export declare const localDriverCompatDetailsForLoader: ILayerCompatDetails;
|
|
11
|
+
//# sourceMappingURL=localLayerCompatState.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"localLayerCompatState.d.ts","sourceRoot":"","sources":["../src/localLayerCompatState.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAIxE;;;GAGG;AACH,eAAO,MAAM,iCAAiC,EAAE,mBAa/C,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*!
|
|
3
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
4
|
+
* Licensed under the MIT License.
|
|
5
|
+
*/
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.localDriverCompatDetailsForLoader = void 0;
|
|
8
|
+
const packageVersion_js_1 = require("./packageVersion.js");
|
|
9
|
+
/**
|
|
10
|
+
* Local Driver's compatibility details that is exposed to the Loader layer.
|
|
11
|
+
* @internal
|
|
12
|
+
*/
|
|
13
|
+
exports.localDriverCompatDetailsForLoader = {
|
|
14
|
+
/**
|
|
15
|
+
* The package version of the Local Driver layer.
|
|
16
|
+
*/
|
|
17
|
+
pkgVersion: packageVersion_js_1.pkgVersion,
|
|
18
|
+
/**
|
|
19
|
+
* The current generation of the Local Driver layer.
|
|
20
|
+
*/
|
|
21
|
+
generation: 1,
|
|
22
|
+
/**
|
|
23
|
+
* The features supported by the Local Driver layer across the Driver / Loader boundary.
|
|
24
|
+
*/
|
|
25
|
+
supportedFeatures: new Set(),
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=localLayerCompatState.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"localLayerCompatState.js","sourceRoot":"","sources":["../src/localLayerCompatState.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAIH,2DAAiD;AAEjD;;;GAGG;AACU,QAAA,iCAAiC,GAAwB;IACrE;;OAEG;IACH,UAAU,EAAV,8BAAU;IACV;;OAEG;IACH,UAAU,EAAE,CAAC;IACb;;OAEG;IACH,iBAAiB,EAAE,IAAI,GAAG,EAAU;CACpC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { type ILayerCompatDetails } from \"@fluid-internal/client-utils\";\n\nimport { pkgVersion } from \"./packageVersion.js\";\n\n/**\n * Local Driver's compatibility details that is exposed to the Loader layer.\n * @internal\n */\nexport const localDriverCompatDetailsForLoader: ILayerCompatDetails = {\n\t/**\n\t * The package version of the Local Driver layer.\n\t */\n\tpkgVersion,\n\t/**\n\t * The current generation of the Local Driver layer.\n\t */\n\tgeneration: 1,\n\t/**\n\t * The features supported by the Local Driver layer across the Driver / Loader boundary.\n\t */\n\tsupportedFeatures: new Set<string>(),\n};\n"]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*
|
|
5
|
+
* THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY
|
|
6
|
+
*/
|
|
7
|
+
export declare const pkgName = "@fluidframework/local-driver";
|
|
8
|
+
export declare const pkgVersion = "2.43.0";
|
|
9
|
+
//# sourceMappingURL=packageVersion.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"packageVersion.d.ts","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,eAAO,MAAM,OAAO,iCAAiC,CAAC;AACtD,eAAO,MAAM,UAAU,WAAW,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*!
|
|
3
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
4
|
+
* Licensed under the MIT License.
|
|
5
|
+
*
|
|
6
|
+
* THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.pkgVersion = exports.pkgName = void 0;
|
|
10
|
+
exports.pkgName = "@fluidframework/local-driver";
|
|
11
|
+
exports.pkgVersion = "2.43.0";
|
|
12
|
+
//# sourceMappingURL=packageVersion.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEU,QAAA,OAAO,GAAG,8BAA8B,CAAC;AACzC,QAAA,UAAU,GAAG,QAAQ,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/local-driver\";\nexport const pkgVersion = \"2.43.0\";\n"]}
|
package/lib/index.d.ts
CHANGED
|
@@ -8,5 +8,6 @@ export { createLocalDocumentService, LocalDocumentService } from "./localDocumen
|
|
|
8
8
|
export { LocalDocumentServiceFactory } from "./localDocumentServiceFactory.js";
|
|
9
9
|
export { LocalDocumentStorageService } from "./localDocumentStorageService.js";
|
|
10
10
|
export { createLocalResolverCreateNewRequest, LocalResolver } from "./localResolver.js";
|
|
11
|
+
export { localDriverCompatDetailsForLoader } from "./localLayerCompatState.js";
|
|
11
12
|
export { LocalSessionStorageDbFactory } from "./localSessionStorageDb.js";
|
|
12
13
|
//# sourceMappingURL=index.d.ts.map
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAC;AACjF,OAAO,EAAE,0BAA0B,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAC7F,OAAO,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAC;AAC/E,OAAO,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAC;AAC/E,OAAO,EAAE,mCAAmC,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxF,OAAO,EAAE,4BAA4B,EAAE,MAAM,4BAA4B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAC;AACjF,OAAO,EAAE,0BAA0B,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAC7F,OAAO,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAC;AAC/E,OAAO,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAC;AAC/E,OAAO,EAAE,mCAAmC,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxF,OAAO,EAAE,iCAAiC,EAAE,MAAM,4BAA4B,CAAC;AAC/E,OAAO,EAAE,4BAA4B,EAAE,MAAM,4BAA4B,CAAC"}
|
package/lib/index.js
CHANGED
|
@@ -8,5 +8,6 @@ export { createLocalDocumentService, LocalDocumentService } from "./localDocumen
|
|
|
8
8
|
export { LocalDocumentServiceFactory } from "./localDocumentServiceFactory.js";
|
|
9
9
|
export { LocalDocumentStorageService } from "./localDocumentStorageService.js";
|
|
10
10
|
export { createLocalResolverCreateNewRequest, LocalResolver } from "./localResolver.js";
|
|
11
|
+
export { localDriverCompatDetailsForLoader } from "./localLayerCompatState.js";
|
|
11
12
|
export { LocalSessionStorageDbFactory } from "./localSessionStorageDb.js";
|
|
12
13
|
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAC;AACjF,OAAO,EAAE,0BAA0B,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAC7F,OAAO,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAC;AAC/E,OAAO,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAC;AAC/E,OAAO,EAAE,mCAAmC,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxF,OAAO,EAAE,4BAA4B,EAAE,MAAM,4BAA4B,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport { LocalDeltaStorageService } from \"./localDeltaStorageService.js\";\nexport { LocalDocumentDeltaConnection } from \"./localDocumentDeltaConnection.js\";\nexport { createLocalDocumentService, LocalDocumentService } from \"./localDocumentService.js\";\nexport { LocalDocumentServiceFactory } from \"./localDocumentServiceFactory.js\";\nexport { LocalDocumentStorageService } from \"./localDocumentStorageService.js\";\nexport { createLocalResolverCreateNewRequest, LocalResolver } from \"./localResolver.js\";\nexport { LocalSessionStorageDbFactory } from \"./localSessionStorageDb.js\";\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAC;AACjF,OAAO,EAAE,0BAA0B,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAC7F,OAAO,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAC;AAC/E,OAAO,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAC;AAC/E,OAAO,EAAE,mCAAmC,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxF,OAAO,EAAE,iCAAiC,EAAE,MAAM,4BAA4B,CAAC;AAC/E,OAAO,EAAE,4BAA4B,EAAE,MAAM,4BAA4B,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport { LocalDeltaStorageService } from \"./localDeltaStorageService.js\";\nexport { LocalDocumentDeltaConnection } from \"./localDocumentDeltaConnection.js\";\nexport { createLocalDocumentService, LocalDocumentService } from \"./localDocumentService.js\";\nexport { LocalDocumentServiceFactory } from \"./localDocumentServiceFactory.js\";\nexport { LocalDocumentStorageService } from \"./localDocumentStorageService.js\";\nexport { createLocalResolverCreateNewRequest, LocalResolver } from \"./localResolver.js\";\nexport { localDriverCompatDetailsForLoader } from \"./localLayerCompatState.js\";\nexport { LocalSessionStorageDbFactory } from \"./localSessionStorageDb.js\";\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, type IProvideLayerCompatDetails } from "@fluid-internal/client-utils";
|
|
6
6
|
import { ITelemetryBaseLogger } from "@fluidframework/core-interfaces";
|
|
7
7
|
import { IClient } from "@fluidframework/driver-definitions";
|
|
8
8
|
import { IDocumentDeltaConnection, IDocumentDeltaStorageService, IDocumentService, IDocumentServiceEvents, IDocumentServicePolicies, IDocumentStorageService, IResolvedUrl } from "@fluidframework/driver-definitions/internal";
|
|
@@ -13,7 +13,7 @@ import { LocalDocumentDeltaConnection } from "./localDocumentDeltaConnection.js"
|
|
|
13
13
|
* Basic implementation of a document service for local use.
|
|
14
14
|
* @internal
|
|
15
15
|
*/
|
|
16
|
-
export declare class LocalDocumentService extends TypedEventEmitter<IDocumentServiceEvents> implements IDocumentService {
|
|
16
|
+
export declare class LocalDocumentService extends TypedEventEmitter<IDocumentServiceEvents> implements IDocumentService, IProvideLayerCompatDetails {
|
|
17
17
|
readonly resolvedUrl: IResolvedUrl;
|
|
18
18
|
private readonly localDeltaConnectionServer;
|
|
19
19
|
private readonly tokenProvider;
|
|
@@ -30,6 +30,11 @@ export declare class LocalDocumentService extends TypedEventEmitter<IDocumentSer
|
|
|
30
30
|
* @param documentId - ID of document
|
|
31
31
|
*/
|
|
32
32
|
constructor(resolvedUrl: IResolvedUrl, localDeltaConnectionServer: ILocalDeltaConnectionServer, tokenProvider: ITokenProvider, tenantId: string, documentId: string, documentDeltaConnectionsMap: Map<string, LocalDocumentDeltaConnection>, policies?: IDocumentServicePolicies, innerDocumentService?: IDocumentService | undefined, logger?: ITelemetryBaseLogger | undefined);
|
|
33
|
+
/**
|
|
34
|
+
* The compatibility details of the Local Driver layer that is exposed to the Loader layer
|
|
35
|
+
* for validating Loader-Driver compatibility.
|
|
36
|
+
*/
|
|
37
|
+
get ILayerCompatDetails(): ILayerCompatDetails;
|
|
33
38
|
dispose(): void;
|
|
34
39
|
/**
|
|
35
40
|
* Creates and returns a document storage service for local use.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"localDocumentService.d.ts","sourceRoot":"","sources":["../src/localDocumentService.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"localDocumentService.d.ts","sourceRoot":"","sources":["../src/localDocumentService.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,iBAAiB,EACjB,KAAK,mBAAmB,EACxB,KAAK,0BAA0B,EAC/B,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AACvE,OAAO,EAAE,OAAO,EAAE,MAAM,oCAAoC,CAAC;AAC7D,OAAO,EACN,wBAAwB,EACxB,4BAA4B,EAC5B,gBAAgB,EAChB,sBAAsB,EACtB,wBAAwB,EACxB,uBAAuB,EACvB,YAAY,EACZ,MAAM,6CAA6C,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAC;AACtE,OAAO,EAAE,2BAA2B,EAAE,MAAM,qCAAqC,CAAC;AAKlF,OAAO,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAC;AAIjF;;;GAGG;AACH,qBAAa,oBACZ,SAAQ,iBAAiB,CAAC,sBAAsB,CAChD,YAAW,gBAAgB,EAAE,0BAA0B;aAStC,WAAW,EAAE,YAAY;IACzC,OAAO,CAAC,QAAQ,CAAC,0BAA0B;IAC3C,OAAO,CAAC,QAAQ,CAAC,aAAa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.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
import { TypedEventEmitter } from "@fluid-internal/client-utils";
|
|
5
|
+
import { TypedEventEmitter, } from "@fluid-internal/client-utils";
|
|
6
6
|
import { GitManager } from "@fluidframework/server-services-client";
|
|
7
7
|
import { TestHistorian } from "@fluidframework/server-test-utils";
|
|
8
8
|
import { LocalDeltaStorageService } from "./localDeltaStorageService.js";
|
|
9
9
|
import { LocalDocumentDeltaConnection } from "./localDocumentDeltaConnection.js";
|
|
10
10
|
import { LocalDocumentStorageService } from "./localDocumentStorageService.js";
|
|
11
|
+
import { localDriverCompatDetailsForLoader } from "./localLayerCompatState.js";
|
|
11
12
|
/**
|
|
12
13
|
* Basic implementation of a document service for local use.
|
|
13
14
|
* @internal
|
|
@@ -31,6 +32,13 @@ export class LocalDocumentService extends TypedEventEmitter {
|
|
|
31
32
|
this.innerDocumentService = innerDocumentService;
|
|
32
33
|
this.logger = logger;
|
|
33
34
|
}
|
|
35
|
+
/**
|
|
36
|
+
* The compatibility details of the Local Driver layer that is exposed to the Loader layer
|
|
37
|
+
* for validating Loader-Driver compatibility.
|
|
38
|
+
*/
|
|
39
|
+
get ILayerCompatDetails() {
|
|
40
|
+
return localDriverCompatDetailsForLoader;
|
|
41
|
+
}
|
|
34
42
|
dispose() { }
|
|
35
43
|
/**
|
|
36
44
|
* Creates and returns a document storage service for local use.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"localDocumentService.js","sourceRoot":"","sources":["../src/localDocumentService.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"localDocumentService.js","sourceRoot":"","sources":["../src/localDocumentService.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,iBAAiB,GAGjB,MAAM,8BAA8B,CAAC;AActC,OAAO,EAAE,UAAU,EAAE,MAAM,wCAAwC,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,MA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AC;QAEH,OAAO,uBAAuB,CAAC;IAChC,CAAC;CACD;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,0BAA0B,CACzC,WAAyB,EACzB,0BAAuD,EACvD,aAA6B,EAC7B,QAAgB,EAChB,UAAkB,EAClB,2BAAsE,EACtE,QAAmC,EACnC,oBAAuC,EACvC,MAA6B;IAE7B,OAAO,IAAI,oBAAoB,CAC9B,WAAW,EACX,0BAA0B,EAC1B,aAAa,EACb,QAAQ,EACR,UAAU,EACV,2BAA2B,EAC3B,QAAQ,EACR,oBAAoB,EACpB,MAAM,CACN,CAAC;AACH,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport {\n\tTypedEventEmitter,\n\ttype ILayerCompatDetails,\n\ttype IProvideLayerCompatDetails,\n} from \"@fluid-internal/client-utils\";\nimport { ITelemetryBaseLogger } from \"@fluidframework/core-interfaces\";\nimport { IClient } from \"@fluidframework/driver-definitions\";\nimport {\n\tIDocumentDeltaConnection,\n\tIDocumentDeltaStorageService,\n\tIDocumentService,\n\tIDocumentServiceEvents,\n\tIDocumentServicePolicies,\n\tIDocumentStorageService,\n\tIResolvedUrl,\n} from \"@fluidframework/driver-definitions/internal\";\nimport { ITokenProvider } from \"@fluidframework/routerlicious-driver\";\nimport { ILocalDeltaConnectionServer } from \"@fluidframework/server-local-server\";\nimport { GitManager } from \"@fluidframework/server-services-client\";\nimport { TestHistorian } from \"@fluidframework/server-test-utils\";\n\nimport { LocalDeltaStorageService } from \"./localDeltaStorageService.js\";\nimport { LocalDocumentDeltaConnection } from \"./localDocumentDeltaConnection.js\";\nimport { LocalDocumentStorageService } from \"./localDocumentStorageService.js\";\nimport { localDriverCompatDetailsForLoader } from \"./localLayerCompatState.js\";\n\n/**\n * Basic implementation of a document service for local use.\n * @internal\n */\nexport class LocalDocumentService\n\textends TypedEventEmitter<IDocumentServiceEvents>\n\timplements IDocumentService, IProvideLayerCompatDetails\n{\n\t/**\n\t * @param localDeltaConnectionServer - delta connection server for ops\n\t * @param tokenProvider - token provider\n\t * @param tenantId - ID of tenant\n\t * @param documentId - ID of document\n\t */\n\tconstructor(\n\t\tpublic readonly resolvedUrl: IResolvedUrl,\n\t\tprivate readonly localDeltaConnectionServer: ILocalDeltaConnectionServer,\n\t\tprivate readonly tokenProvider: ITokenProvider,\n\t\tprivate readonly tenantId: string,\n\t\tprivate readonly documentId: string,\n\t\tprivate readonly documentDeltaConnectionsMap: Map<string, LocalDocumentDeltaConnection>,\n\t\tpublic readonly policies: IDocumentServicePolicies = { supportGetSnapshotApi: true },\n\t\tprivate readonly innerDocumentService?: IDocumentService,\n\t\tprivate readonly logger?: ITelemetryBaseLogger,\n\t) {\n\t\tsuper();\n\t}\n\n\t/**\n\t * The compatibility details of the Local Driver layer that is exposed to the Loader layer\n\t * for validating Loader-Driver compatibility.\n\t */\n\tpublic get ILayerCompatDetails(): ILayerCompatDetails {\n\t\treturn localDriverCompatDetailsForLoader;\n\t}\n\n\tpublic dispose() {}\n\n\t/**\n\t * Creates and returns a document storage service for local use.\n\t */\n\tpublic async connectToStorage(): Promise<IDocumentStorageService> {\n\t\treturn new LocalDocumentStorageService(\n\t\t\tthis.documentId,\n\t\t\tnew GitManager(\n\t\t\t\tnew TestHistorian(this.localDeltaConnectionServer.testDbFactory.testDatabase),\n\t\t\t),\n\t\t\t{\n\t\t\t\tmaximumCacheDurationMs: 432_000_000, // 5 days in ms. Not actually enforced but shouldn't matter for any local driver scenario\n\t\t\t},\n\t\t\tthis.localDeltaConnectionServer,\n\t\t\tthis.resolvedUrl,\n\t\t);\n\t}\n\n\t/**\n\t * Creates and returns a delta storage service for local use.\n\t */\n\tpublic async connectToDeltaStorage(): Promise<IDocumentDeltaStorageService> {\n\t\tif (this.innerDocumentService) {\n\t\t\treturn this.innerDocumentService.connectToDeltaStorage();\n\t\t}\n\t\treturn new LocalDeltaStorageService(\n\t\t\tthis.tenantId,\n\t\t\tthis.documentId,\n\t\t\tthis.localDeltaConnectionServer.databaseManager,\n\t\t);\n\t}\n\n\t/**\n\t * Creates and returns a delta stream for local use.\n\t * @param client - client data\n\t */\n\tpublic async connectToDeltaStream(client: IClient): Promise<IDocumentDeltaConnection> {\n\t\tif (this.policies.storageOnly === true) {\n\t\t\tthrow new Error(\"can't connect to delta stream in storage-only mode\");\n\t\t}\n\t\tif (this.innerDocumentService) {\n\t\t\treturn this.innerDocumentService.connectToDeltaStream(client);\n\t\t}\n\t\tconst ordererToken = await this.tokenProvider.fetchOrdererToken(\n\t\t\tthis.tenantId,\n\t\t\tthis.documentId,\n\t\t);\n\t\tconst documentDeltaConnection = await LocalDocumentDeltaConnection.create(\n\t\t\tthis.tenantId,\n\t\t\tthis.documentId,\n\t\t\tordererToken.jwt,\n\t\t\tclient,\n\t\t\tthis.localDeltaConnectionServer.webSocketServer,\n\t\t\tundefined,\n\t\t\tthis.logger,\n\t\t);\n\t\tconst clientId = documentDeltaConnection.clientId;\n\n\t\t// Add this document service for the clientId in the document service factory.\n\t\tthis.documentDeltaConnectionsMap.set(clientId, documentDeltaConnection);\n\n\t\t// Add a listener to remove this document service when the client is disconnected.\n\t\tdocumentDeltaConnection.on(\"disconnect\", () => {\n\t\t\tthis.documentDeltaConnectionsMap.delete(clientId);\n\t\t});\n\n\t\treturn documentDeltaConnection;\n\t}\n}\n\n/**\n * Creates and returns a document service for local use.\n * @param localDeltaConnectionServer - delta connection server for ops\n * @param tokenProvider - token provider with a single token\n * @param tenantId - ID of tenant\n * @param documentId - ID of document\n * @internal\n */\nexport function createLocalDocumentService(\n\tresolvedUrl: IResolvedUrl,\n\tlocalDeltaConnectionServer: ILocalDeltaConnectionServer,\n\ttokenProvider: ITokenProvider,\n\ttenantId: string,\n\tdocumentId: string,\n\tdocumentDeltaConnectionsMap: Map<string, LocalDocumentDeltaConnection>,\n\tpolicies?: IDocumentServicePolicies,\n\tinnerDocumentService?: IDocumentService,\n\tlogger?: ITelemetryBaseLogger,\n): IDocumentService {\n\treturn new LocalDocumentService(\n\t\tresolvedUrl,\n\t\tlocalDeltaConnectionServer,\n\t\ttokenProvider,\n\t\ttenantId,\n\t\tdocumentId,\n\t\tdocumentDeltaConnectionsMap,\n\t\tpolicies,\n\t\tinnerDocumentService,\n\t\tlogger,\n\t);\n}\n"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
import { type ILayerCompatDetails } from "@fluid-internal/client-utils";
|
|
6
|
+
/**
|
|
7
|
+
* Local Driver's compatibility details that is exposed to the Loader layer.
|
|
8
|
+
* @internal
|
|
9
|
+
*/
|
|
10
|
+
export declare const localDriverCompatDetailsForLoader: ILayerCompatDetails;
|
|
11
|
+
//# sourceMappingURL=localLayerCompatState.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"localLayerCompatState.d.ts","sourceRoot":"","sources":["../src/localLayerCompatState.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAIxE;;;GAGG;AACH,eAAO,MAAM,iCAAiC,EAAE,mBAa/C,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
import { pkgVersion } from "./packageVersion.js";
|
|
6
|
+
/**
|
|
7
|
+
* Local Driver's compatibility details that is exposed to the Loader layer.
|
|
8
|
+
* @internal
|
|
9
|
+
*/
|
|
10
|
+
export const localDriverCompatDetailsForLoader = {
|
|
11
|
+
/**
|
|
12
|
+
* The package version of the Local Driver layer.
|
|
13
|
+
*/
|
|
14
|
+
pkgVersion,
|
|
15
|
+
/**
|
|
16
|
+
* The current generation of the Local Driver layer.
|
|
17
|
+
*/
|
|
18
|
+
generation: 1,
|
|
19
|
+
/**
|
|
20
|
+
* The features supported by the Local Driver layer across the Driver / Loader boundary.
|
|
21
|
+
*/
|
|
22
|
+
supportedFeatures: new Set(),
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=localLayerCompatState.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"localLayerCompatState.js","sourceRoot":"","sources":["../src/localLayerCompatState.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjD;;;GAGG;AACH,MAAM,CAAC,MAAM,iCAAiC,GAAwB;IACrE;;OAEG;IACH,UAAU;IACV;;OAEG;IACH,UAAU,EAAE,CAAC;IACb;;OAEG;IACH,iBAAiB,EAAE,IAAI,GAAG,EAAU;CACpC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { type ILayerCompatDetails } from \"@fluid-internal/client-utils\";\n\nimport { pkgVersion } from \"./packageVersion.js\";\n\n/**\n * Local Driver's compatibility details that is exposed to the Loader layer.\n * @internal\n */\nexport const localDriverCompatDetailsForLoader: ILayerCompatDetails = {\n\t/**\n\t * The package version of the Local Driver layer.\n\t */\n\tpkgVersion,\n\t/**\n\t * The current generation of the Local Driver layer.\n\t */\n\tgeneration: 1,\n\t/**\n\t * The features supported by the Local Driver layer across the Driver / Loader boundary.\n\t */\n\tsupportedFeatures: new Set<string>(),\n};\n"]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*
|
|
5
|
+
* THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY
|
|
6
|
+
*/
|
|
7
|
+
export declare const pkgName = "@fluidframework/local-driver";
|
|
8
|
+
export declare const pkgVersion = "2.43.0";
|
|
9
|
+
//# sourceMappingURL=packageVersion.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"packageVersion.d.ts","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,eAAO,MAAM,OAAO,iCAAiC,CAAC;AACtD,eAAO,MAAM,UAAU,WAAW,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*
|
|
5
|
+
* THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY
|
|
6
|
+
*/
|
|
7
|
+
export const pkgName = "@fluidframework/local-driver";
|
|
8
|
+
export const pkgVersion = "2.43.0";
|
|
9
|
+
//# sourceMappingURL=packageVersion.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,CAAC,MAAM,OAAO,GAAG,8BAA8B,CAAC;AACtD,MAAM,CAAC,MAAM,UAAU,GAAG,QAAQ,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/local-driver\";\nexport const pkgVersion = \"2.43.0\";\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluidframework/local-driver",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.43.0",
|
|
4
4
|
"description": "Fluid local driver",
|
|
5
5
|
"homepage": "https://fluidframework.com",
|
|
6
6
|
"repository": {
|
|
@@ -71,31 +71,31 @@
|
|
|
71
71
|
"temp-directory": "nyc/.nyc_output"
|
|
72
72
|
},
|
|
73
73
|
"dependencies": {
|
|
74
|
-
"@fluid-internal/client-utils": "~2.
|
|
75
|
-
"@fluidframework/core-interfaces": "~2.
|
|
76
|
-
"@fluidframework/core-utils": "~2.
|
|
77
|
-
"@fluidframework/driver-base": "~2.
|
|
78
|
-
"@fluidframework/driver-definitions": "~2.
|
|
79
|
-
"@fluidframework/driver-utils": "~2.
|
|
74
|
+
"@fluid-internal/client-utils": "~2.43.0",
|
|
75
|
+
"@fluidframework/core-interfaces": "~2.43.0",
|
|
76
|
+
"@fluidframework/core-utils": "~2.43.0",
|
|
77
|
+
"@fluidframework/driver-base": "~2.43.0",
|
|
78
|
+
"@fluidframework/driver-definitions": "~2.43.0",
|
|
79
|
+
"@fluidframework/driver-utils": "~2.43.0",
|
|
80
80
|
"@fluidframework/protocol-base": "^5.0.0",
|
|
81
|
-
"@fluidframework/routerlicious-driver": "~2.
|
|
81
|
+
"@fluidframework/routerlicious-driver": "~2.43.0",
|
|
82
82
|
"@fluidframework/server-local-server": "^5.0.0",
|
|
83
83
|
"@fluidframework/server-services-client": "^5.0.0",
|
|
84
84
|
"@fluidframework/server-services-core": "^5.0.0",
|
|
85
85
|
"@fluidframework/server-test-utils": "^5.0.0",
|
|
86
|
-
"@fluidframework/telemetry-utils": "~2.
|
|
86
|
+
"@fluidframework/telemetry-utils": "~2.43.0",
|
|
87
87
|
"jsrsasign": "^11.0.0",
|
|
88
88
|
"uuid": "^9.0.0"
|
|
89
89
|
},
|
|
90
90
|
"devDependencies": {
|
|
91
91
|
"@arethetypeswrong/cli": "^0.17.1",
|
|
92
92
|
"@biomejs/biome": "~1.9.3",
|
|
93
|
-
"@fluid-internal/mocha-test-setup": "~2.
|
|
94
|
-
"@fluid-tools/build-cli": "^0.
|
|
93
|
+
"@fluid-internal/mocha-test-setup": "~2.43.0",
|
|
94
|
+
"@fluid-tools/build-cli": "^0.56.0",
|
|
95
95
|
"@fluidframework/build-common": "^2.0.3",
|
|
96
|
-
"@fluidframework/build-tools": "^0.
|
|
96
|
+
"@fluidframework/build-tools": "^0.56.0",
|
|
97
97
|
"@fluidframework/eslint-config-fluid": "^5.7.4",
|
|
98
|
-
"@fluidframework/local-driver-previous": "npm:@fluidframework/local-driver@2.
|
|
98
|
+
"@fluidframework/local-driver-previous": "npm:@fluidframework/local-driver@2.42.0",
|
|
99
99
|
"@microsoft/api-extractor": "7.52.8",
|
|
100
100
|
"@types/jsrsasign": "^10.5.12",
|
|
101
101
|
"@types/mocha": "^10.0.10",
|
|
@@ -128,6 +128,7 @@
|
|
|
128
128
|
"build:compile": "fluid-build . --task compile",
|
|
129
129
|
"build:docs": "api-extractor run --local",
|
|
130
130
|
"build:esnext": "tsc --project ./tsconfig.json",
|
|
131
|
+
"build:genver": "gen-version",
|
|
131
132
|
"build:test": "npm run build:test:esm && npm run build:test:cjs",
|
|
132
133
|
"build:test:cjs": "fluid-tsc commonjs --project ./src/test/tsconfig.cjs.json",
|
|
133
134
|
"build:test:esm": "tsc --project ./src/test/tsconfig.json",
|
package/src/index.ts
CHANGED
|
@@ -9,4 +9,5 @@ export { createLocalDocumentService, LocalDocumentService } from "./localDocumen
|
|
|
9
9
|
export { LocalDocumentServiceFactory } from "./localDocumentServiceFactory.js";
|
|
10
10
|
export { LocalDocumentStorageService } from "./localDocumentStorageService.js";
|
|
11
11
|
export { createLocalResolverCreateNewRequest, LocalResolver } from "./localResolver.js";
|
|
12
|
+
export { localDriverCompatDetailsForLoader } from "./localLayerCompatState.js";
|
|
12
13
|
export { LocalSessionStorageDbFactory } from "./localSessionStorageDb.js";
|
|
@@ -3,7 +3,11 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import {
|
|
6
|
+
import {
|
|
7
|
+
TypedEventEmitter,
|
|
8
|
+
type ILayerCompatDetails,
|
|
9
|
+
type IProvideLayerCompatDetails,
|
|
10
|
+
} from "@fluid-internal/client-utils";
|
|
7
11
|
import { ITelemetryBaseLogger } from "@fluidframework/core-interfaces";
|
|
8
12
|
import { IClient } from "@fluidframework/driver-definitions";
|
|
9
13
|
import {
|
|
@@ -23,6 +27,7 @@ import { TestHistorian } from "@fluidframework/server-test-utils";
|
|
|
23
27
|
import { LocalDeltaStorageService } from "./localDeltaStorageService.js";
|
|
24
28
|
import { LocalDocumentDeltaConnection } from "./localDocumentDeltaConnection.js";
|
|
25
29
|
import { LocalDocumentStorageService } from "./localDocumentStorageService.js";
|
|
30
|
+
import { localDriverCompatDetailsForLoader } from "./localLayerCompatState.js";
|
|
26
31
|
|
|
27
32
|
/**
|
|
28
33
|
* Basic implementation of a document service for local use.
|
|
@@ -30,7 +35,7 @@ import { LocalDocumentStorageService } from "./localDocumentStorageService.js";
|
|
|
30
35
|
*/
|
|
31
36
|
export class LocalDocumentService
|
|
32
37
|
extends TypedEventEmitter<IDocumentServiceEvents>
|
|
33
|
-
implements IDocumentService
|
|
38
|
+
implements IDocumentService, IProvideLayerCompatDetails
|
|
34
39
|
{
|
|
35
40
|
/**
|
|
36
41
|
* @param localDeltaConnectionServer - delta connection server for ops
|
|
@@ -52,6 +57,14 @@ export class LocalDocumentService
|
|
|
52
57
|
super();
|
|
53
58
|
}
|
|
54
59
|
|
|
60
|
+
/**
|
|
61
|
+
* The compatibility details of the Local Driver layer that is exposed to the Loader layer
|
|
62
|
+
* for validating Loader-Driver compatibility.
|
|
63
|
+
*/
|
|
64
|
+
public get ILayerCompatDetails(): ILayerCompatDetails {
|
|
65
|
+
return localDriverCompatDetailsForLoader;
|
|
66
|
+
}
|
|
67
|
+
|
|
55
68
|
public dispose() {}
|
|
56
69
|
|
|
57
70
|
/**
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { type ILayerCompatDetails } from "@fluid-internal/client-utils";
|
|
7
|
+
|
|
8
|
+
import { pkgVersion } from "./packageVersion.js";
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Local Driver's compatibility details that is exposed to the Loader layer.
|
|
12
|
+
* @internal
|
|
13
|
+
*/
|
|
14
|
+
export const localDriverCompatDetailsForLoader: ILayerCompatDetails = {
|
|
15
|
+
/**
|
|
16
|
+
* The package version of the Local Driver layer.
|
|
17
|
+
*/
|
|
18
|
+
pkgVersion,
|
|
19
|
+
/**
|
|
20
|
+
* The current generation of the Local Driver layer.
|
|
21
|
+
*/
|
|
22
|
+
generation: 1,
|
|
23
|
+
/**
|
|
24
|
+
* The features supported by the Local Driver layer across the Driver / Loader boundary.
|
|
25
|
+
*/
|
|
26
|
+
supportedFeatures: new Set<string>(),
|
|
27
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*
|
|
5
|
+
* THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
export const pkgName = "@fluidframework/local-driver";
|
|
9
|
+
export const pkgVersion = "2.43.0";
|