@fluidframework/local-driver 2.43.0-343119 → 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.
Files changed (38) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/dist/index.d.ts +1 -1
  3. package/dist/index.d.ts.map +1 -1
  4. package/dist/index.js +2 -2
  5. package/dist/index.js.map +1 -1
  6. package/dist/localDocumentService.js +2 -2
  7. package/dist/localDocumentService.js.map +1 -1
  8. package/dist/{localRuntimeLayerCompatState.d.ts → localLayerCompatState.d.ts} +1 -1
  9. package/dist/localLayerCompatState.d.ts.map +1 -0
  10. package/dist/{localRuntimeLayerCompatState.js → localLayerCompatState.js} +1 -1
  11. package/dist/localLayerCompatState.js.map +1 -0
  12. package/dist/packageVersion.d.ts +1 -1
  13. package/dist/packageVersion.d.ts.map +1 -1
  14. package/dist/packageVersion.js +1 -1
  15. package/dist/packageVersion.js.map +1 -1
  16. package/lib/index.d.ts +1 -1
  17. package/lib/index.d.ts.map +1 -1
  18. package/lib/index.js +1 -1
  19. package/lib/index.js.map +1 -1
  20. package/lib/localDocumentService.js +1 -1
  21. package/lib/localDocumentService.js.map +1 -1
  22. package/lib/{localRuntimeLayerCompatState.d.ts → localLayerCompatState.d.ts} +1 -1
  23. package/lib/localLayerCompatState.d.ts.map +1 -0
  24. package/lib/{localRuntimeLayerCompatState.js → localLayerCompatState.js} +1 -1
  25. package/lib/localLayerCompatState.js.map +1 -0
  26. package/lib/packageVersion.d.ts +1 -1
  27. package/lib/packageVersion.d.ts.map +1 -1
  28. package/lib/packageVersion.js +1 -1
  29. package/lib/packageVersion.js.map +1 -1
  30. package/package.json +12 -12
  31. package/src/index.ts +1 -1
  32. package/src/localDocumentService.ts +1 -1
  33. package/src/packageVersion.ts +1 -1
  34. package/dist/localRuntimeLayerCompatState.d.ts.map +0 -1
  35. package/dist/localRuntimeLayerCompatState.js.map +0 -1
  36. package/lib/localRuntimeLayerCompatState.d.ts.map +0 -1
  37. package/lib/localRuntimeLayerCompatState.js.map +0 -1
  38. /package/src/{localRuntimeLayerCompatState.ts → localLayerCompatState.ts} +0 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # @fluidframework/local-driver
2
2
 
3
+ ## 2.43.0
4
+
5
+ Dependency updates only.
6
+
3
7
  ## 2.42.0
4
8
 
5
9
  Dependency updates only.
package/dist/index.d.ts CHANGED
@@ -8,6 +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 "./localRuntimeLayerCompatState.js";
11
+ export { localDriverCompatDetailsForLoader } from "./localLayerCompatState.js";
12
12
  export { LocalSessionStorageDbFactory } from "./localSessionStorageDb.js";
13
13
  //# sourceMappingURL=index.d.ts.map
@@ -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,iCAAiC,EAAE,MAAM,mCAAmC,CAAC;AACtF,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
@@ -19,8 +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 localRuntimeLayerCompatState_js_1 = require("./localRuntimeLayerCompatState.js");
23
- Object.defineProperty(exports, "localDriverCompatDetailsForLoader", { enumerable: true, get: function () { return localRuntimeLayerCompatState_js_1.localDriverCompatDetailsForLoader; } });
22
+ var localLayerCompatState_js_1 = require("./localLayerCompatState.js");
23
+ Object.defineProperty(exports, "localDriverCompatDetailsForLoader", { enumerable: true, get: function () { return localLayerCompatState_js_1.localDriverCompatDetailsForLoader; } });
24
24
  var localSessionStorageDb_js_1 = require("./localSessionStorageDb.js");
25
25
  Object.defineProperty(exports, "LocalSessionStorageDbFactory", { enumerable: true, get: function () { return localSessionStorageDb_js_1.LocalSessionStorageDbFactory; } });
26
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,qFAAsF;AAA7E,oJAAA,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 \"./localRuntimeLayerCompatState.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"]}
@@ -11,7 +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 localRuntimeLayerCompatState_js_1 = require("./localRuntimeLayerCompatState.js");
14
+ const localLayerCompatState_js_1 = require("./localLayerCompatState.js");
15
15
  /**
16
16
  * Basic implementation of a document service for local use.
17
17
  * @internal
@@ -40,7 +40,7 @@ class LocalDocumentService extends client_utils_1.TypedEventEmitter {
40
40
  * for validating Loader-Driver compatibility.
41
41
  */
42
42
  get ILayerCompatDetails() {
43
- return localRuntimeLayerCompatState_js_1.localDriverCompatDetailsForLoader;
43
+ return localLayerCompatState_js_1.localDriverCompatDetailsForLoader;
44
44
  }
45
45
  dispose() { }
46
46
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"localDocumentService.js","sourceRoot":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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 \"./localRuntimeLayerCompatState.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"]}
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,EACD;YACC,sBAAsB,EAAE,WAAW,EAA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AE,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"]}
@@ -8,4 +8,4 @@ import { type ILayerCompatDetails } from "@fluid-internal/client-utils";
8
8
  * @internal
9
9
  */
10
10
  export declare const localDriverCompatDetailsForLoader: ILayerCompatDetails;
11
- //# sourceMappingURL=localRuntimeLayerCompatState.d.ts.map
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"}
@@ -24,4 +24,4 @@ exports.localDriverCompatDetailsForLoader = {
24
24
  */
25
25
  supportedFeatures: new Set(),
26
26
  };
27
- //# sourceMappingURL=localRuntimeLayerCompatState.js.map
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"]}
@@ -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/local-driver";
8
- export declare const pkgVersion = "2.43.0-343119";
8
+ export declare const pkgVersion = "2.43.0";
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,iCAAiC,CAAC;AACtD,eAAO,MAAM,UAAU,kBAAkB,CAAC"}
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"}
@@ -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/local-driver";
11
- exports.pkgVersion = "2.43.0-343119";
11
+ exports.pkgVersion = "2.43.0";
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,8BAA8B,CAAC;AACzC,QAAA,UAAU,GAAG,eAAe,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-343119\";\n"]}
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,6 +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 "./localRuntimeLayerCompatState.js";
11
+ export { localDriverCompatDetailsForLoader } from "./localLayerCompatState.js";
12
12
  export { LocalSessionStorageDbFactory } from "./localSessionStorageDb.js";
13
13
  //# sourceMappingURL=index.d.ts.map
@@ -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,iCAAiC,EAAE,MAAM,mCAAmC,CAAC;AACtF,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,6 +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 "./localRuntimeLayerCompatState.js";
11
+ export { localDriverCompatDetailsForLoader } from "./localLayerCompatState.js";
12
12
  export { LocalSessionStorageDbFactory } from "./localSessionStorageDb.js";
13
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,iCAAiC,EAAE,MAAM,mCAAmC,CAAC;AACtF,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 \"./localRuntimeLayerCompatState.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"]}
@@ -8,7 +8,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 "./localRuntimeLayerCompatState.js";
11
+ import { localDriverCompatDetailsForLoader } from "./localLayerCompatState.js";
12
12
  /**
13
13
  * Basic implementation of a document service for local use.
14
14
  * @internal
@@ -1 +1 @@
1
- {"version":3,"file":"localDocumentService.js","sourceRoot":"","sources":["../src/localDocumentService.ts"],"names":[],"mappings":"AAAA;;;GAGG;A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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;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 \"./localRuntimeLayerCompatState.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"]}
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,MAAM,mCAAmC,CAAC;AAElE,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAC;AACjF,OAAO,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAC;AAC/E,OAAO,EAAE,iCAAiC,EAAE,MAAM,4BAA4B,CAAC;AAE/E;;;GAGG;AACH,MAAM,OAAO,oBACZ,SAAQ,iBAAyC;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,GAA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EACb,IAAI,CAAC,UAAU,CACf,CAAC;QACF,MAAM,uBAAuB,GAAG,MAAM,4BAA4B,CAAC,MAAM,CACxE,IAAI,CAAC,QAAQ,EACb,IAAI,CAAC,UAAU,EACf,YAAY,CAAC,GAAG,EAChB,MAAM,EACN,IAAI,CAAC,0BAA0B,CAAC,eAAe,EAC/C,SAAS,EACT,IAAI,CAAC,MAAM,CACX,CAAC;QACF,MAAM,QAAQ,GAAG,uBAAuB,CAAC,QAAQ,CAAC;QAElD,8EAA8E;QAC9E,IAAI,CAAC,2BAA2B,CAAC,GAAG,CAAC,QAAQ,EAAE,uBAAuB,CAAC,CAAC;QAExE,kFAAkF;QAClF,uBAAuB,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;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"]}
@@ -8,4 +8,4 @@ import { type ILayerCompatDetails } from "@fluid-internal/client-utils";
8
8
  * @internal
9
9
  */
10
10
  export declare const localDriverCompatDetailsForLoader: ILayerCompatDetails;
11
- //# sourceMappingURL=localRuntimeLayerCompatState.d.ts.map
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"}
@@ -21,4 +21,4 @@ export const localDriverCompatDetailsForLoader = {
21
21
  */
22
22
  supportedFeatures: new Set(),
23
23
  };
24
- //# sourceMappingURL=localRuntimeLayerCompatState.js.map
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"]}
@@ -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/local-driver";
8
- export declare const pkgVersion = "2.43.0-343119";
8
+ export declare const pkgVersion = "2.43.0";
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,iCAAiC,CAAC;AACtD,eAAO,MAAM,UAAU,kBAAkB,CAAC"}
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"}
@@ -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/local-driver";
8
- export const pkgVersion = "2.43.0-343119";
8
+ export const pkgVersion = "2.43.0";
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,8BAA8B,CAAC;AACtD,MAAM,CAAC,MAAM,UAAU,GAAG,eAAe,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-343119\";\n"]}
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.43.0-343119",
3
+ "version": "2.43.0",
4
4
  "description": "Fluid local driver",
5
5
  "homepage": "https://fluidframework.com",
6
6
  "repository": {
@@ -71,29 +71,29 @@
71
71
  "temp-directory": "nyc/.nyc_output"
72
72
  },
73
73
  "dependencies": {
74
- "@fluid-internal/client-utils": "2.43.0-343119",
75
- "@fluidframework/core-interfaces": "2.43.0-343119",
76
- "@fluidframework/core-utils": "2.43.0-343119",
77
- "@fluidframework/driver-base": "2.43.0-343119",
78
- "@fluidframework/driver-definitions": "2.43.0-343119",
79
- "@fluidframework/driver-utils": "2.43.0-343119",
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.43.0-343119",
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.43.0-343119",
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.43.0-343119",
94
- "@fluid-tools/build-cli": "^0.55.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.55.0",
96
+ "@fluidframework/build-tools": "^0.56.0",
97
97
  "@fluidframework/eslint-config-fluid": "^5.7.4",
98
98
  "@fluidframework/local-driver-previous": "npm:@fluidframework/local-driver@2.42.0",
99
99
  "@microsoft/api-extractor": "7.52.8",
package/src/index.ts CHANGED
@@ -9,5 +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 "./localRuntimeLayerCompatState.js";
12
+ export { localDriverCompatDetailsForLoader } from "./localLayerCompatState.js";
13
13
  export { LocalSessionStorageDbFactory } from "./localSessionStorageDb.js";
@@ -27,7 +27,7 @@ import { TestHistorian } from "@fluidframework/server-test-utils";
27
27
  import { LocalDeltaStorageService } from "./localDeltaStorageService.js";
28
28
  import { LocalDocumentDeltaConnection } from "./localDocumentDeltaConnection.js";
29
29
  import { LocalDocumentStorageService } from "./localDocumentStorageService.js";
30
- import { localDriverCompatDetailsForLoader } from "./localRuntimeLayerCompatState.js";
30
+ import { localDriverCompatDetailsForLoader } from "./localLayerCompatState.js";
31
31
 
32
32
  /**
33
33
  * Basic implementation of a document service for local use.
@@ -6,4 +6,4 @@
6
6
  */
7
7
 
8
8
  export const pkgName = "@fluidframework/local-driver";
9
- export const pkgVersion = "2.43.0-343119";
9
+ export const pkgVersion = "2.43.0";
@@ -1 +0,0 @@
1
- {"version":3,"file":"localRuntimeLayerCompatState.d.ts","sourceRoot":"","sources":["../src/localRuntimeLayerCompatState.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAIxE;;;GAGG;AACH,eAAO,MAAM,iCAAiC,EAAE,mBAa/C,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"localRuntimeLayerCompatState.js","sourceRoot":"","sources":["../src/localRuntimeLayerCompatState.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"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"localRuntimeLayerCompatState.d.ts","sourceRoot":"","sources":["../src/localRuntimeLayerCompatState.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAIxE;;;GAGG;AACH,eAAO,MAAM,iCAAiC,EAAE,mBAa/C,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"localRuntimeLayerCompatState.js","sourceRoot":"","sources":["../src/localRuntimeLayerCompatState.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"]}