@fluidframework/driver-utils 2.0.0-rc.1.0.3 → 2.0.0-rc.2.0.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/{.eslintrc.js → .eslintrc.cjs} +5 -2
- package/{.mocharc.js → .mocharc.cjs} +1 -1
- package/CHANGELOG.md +32 -0
- package/{api-extractor-esm.json → api-extractor-cjs.json} +5 -1
- package/api-extractor-lint.json +1 -1
- package/api-extractor.json +1 -1
- package/api-report/driver-utils.api.md +22 -18
- package/dist/adapters/compression/documentServiceCompressionAdapter.d.ts +2 -2
- package/dist/adapters/compression/documentServiceCompressionAdapter.d.ts.map +1 -1
- package/dist/adapters/compression/documentServiceCompressionAdapter.js +8 -4
- package/dist/adapters/compression/documentServiceCompressionAdapter.js.map +1 -1
- package/dist/adapters/compression/documentServiceFactoryCompressionAdapter.d.ts +2 -2
- package/dist/adapters/compression/documentServiceFactoryCompressionAdapter.d.ts.map +1 -1
- package/dist/adapters/compression/documentServiceFactoryCompressionAdapter.js +7 -7
- package/dist/adapters/compression/documentServiceFactoryCompressionAdapter.js.map +1 -1
- package/dist/adapters/compression/index.d.ts +3 -3
- package/dist/adapters/compression/index.d.ts.map +1 -1
- package/dist/adapters/compression/index.js +7 -7
- package/dist/adapters/compression/index.js.map +1 -1
- package/dist/adapters/compression/summaryblob/documentStorageServiceSummaryBlobCompressionAdapter.d.ts +2 -2
- package/dist/adapters/compression/summaryblob/documentStorageServiceSummaryBlobCompressionAdapter.d.ts.map +1 -1
- package/dist/adapters/compression/summaryblob/documentStorageServiceSummaryBlobCompressionAdapter.js +11 -11
- package/dist/adapters/compression/summaryblob/documentStorageServiceSummaryBlobCompressionAdapter.js.map +1 -1
- package/dist/adapters/compression/summaryblob/index.d.ts +1 -1
- package/dist/adapters/compression/summaryblob/index.d.ts.map +1 -1
- package/dist/adapters/compression/summaryblob/index.js +3 -3
- package/dist/adapters/compression/summaryblob/index.js.map +1 -1
- package/dist/adapters/index.d.ts +2 -2
- package/dist/adapters/index.d.ts.map +1 -1
- package/dist/adapters/index.js +6 -6
- package/dist/adapters/index.js.map +1 -1
- package/dist/adapters/predefinedAdapters.d.ts +1 -1
- package/dist/adapters/predefinedAdapters.d.ts.map +1 -1
- package/dist/adapters/predefinedAdapters.js +4 -4
- package/dist/adapters/predefinedAdapters.js.map +1 -1
- package/dist/documentServiceProxy.d.ts +3 -2
- package/dist/documentServiceProxy.d.ts.map +1 -1
- package/dist/documentServiceProxy.js +3 -1
- package/dist/documentServiceProxy.js.map +1 -1
- package/dist/documentStorageServiceProxy.d.ts +2 -2
- package/dist/documentStorageServiceProxy.d.ts.map +1 -1
- package/dist/documentStorageServiceProxy.js +7 -3
- package/dist/documentStorageServiceProxy.js.map +1 -1
- package/dist/driver-utils-alpha.d.ts +6 -2
- package/dist/driver-utils-beta.d.ts +10 -2
- package/dist/driver-utils-public.d.ts +10 -2
- package/dist/driver-utils-untrimmed.d.ts +30 -17
- package/dist/error.d.ts +2 -2
- package/dist/error.d.ts.map +1 -1
- package/dist/error.js +1 -3
- package/dist/error.js.map +1 -1
- package/dist/index.d.ts +17 -16
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +64 -62
- package/dist/index.js.map +1 -1
- package/dist/insecureUrlResolver.d.ts +3 -2
- package/dist/insecureUrlResolver.d.ts.map +1 -1
- package/dist/insecureUrlResolver.js +9 -7
- package/dist/insecureUrlResolver.js.map +1 -1
- package/dist/network.d.ts +13 -10
- package/dist/network.d.ts.map +1 -1
- package/dist/network.js +9 -12
- package/dist/network.js.map +1 -1
- package/dist/networkUtils.d.ts +2 -3
- package/dist/networkUtils.d.ts.map +1 -1
- package/dist/networkUtils.js +3 -3
- package/dist/networkUtils.js.map +1 -1
- package/dist/package.json +3 -0
- package/dist/packageVersion.d.ts +1 -1
- package/dist/packageVersion.js +1 -1
- package/dist/packageVersion.js.map +1 -1
- package/dist/parallelRequests.d.ts +3 -3
- package/dist/parallelRequests.d.ts.map +1 -1
- package/dist/parallelRequests.js +10 -10
- package/dist/parallelRequests.js.map +1 -1
- package/dist/prefetchDocumentStorageService.d.ts +1 -1
- package/dist/prefetchDocumentStorageService.d.ts.map +1 -1
- package/dist/prefetchDocumentStorageService.js +4 -4
- package/dist/prefetchDocumentStorageService.js.map +1 -1
- package/dist/runWithRetry.js +6 -6
- package/dist/runWithRetry.js.map +1 -1
- package/dist/storageUtils.d.ts +13 -0
- package/dist/storageUtils.d.ts.map +1 -0
- package/dist/storageUtils.js +17 -0
- package/dist/storageUtils.js.map +1 -0
- package/dist/treeConversions.d.ts.map +1 -1
- package/dist/treeConversions.js +7 -6
- package/dist/treeConversions.js.map +1 -1
- package/dist/tsdoc-metadata.json +1 -1
- package/lib/adapters/compression/{compressionTypes.d.mts → compressionTypes.d.ts} +1 -1
- package/lib/adapters/compression/compressionTypes.d.ts.map +1 -0
- package/lib/adapters/compression/{compressionTypes.mjs → compressionTypes.js} +1 -1
- package/lib/adapters/compression/compressionTypes.js.map +1 -0
- package/lib/adapters/compression/{documentServiceCompressionAdapter.d.mts → documentServiceCompressionAdapter.d.ts} +3 -3
- package/lib/adapters/compression/documentServiceCompressionAdapter.d.ts.map +1 -0
- package/lib/adapters/compression/{documentServiceCompressionAdapter.mjs → documentServiceCompressionAdapter.js} +7 -3
- package/lib/adapters/compression/documentServiceCompressionAdapter.js.map +1 -0
- package/lib/adapters/compression/{documentServiceFactoryCompressionAdapter.d.mts → documentServiceFactoryCompressionAdapter.d.ts} +3 -3
- package/lib/adapters/compression/documentServiceFactoryCompressionAdapter.d.ts.map +1 -0
- package/lib/adapters/compression/{documentServiceFactoryCompressionAdapter.mjs → documentServiceFactoryCompressionAdapter.js} +4 -4
- package/lib/adapters/compression/documentServiceFactoryCompressionAdapter.js.map +1 -0
- package/lib/adapters/compression/{index.d.mts → index.d.ts} +4 -4
- package/lib/adapters/compression/index.d.ts.map +1 -0
- package/lib/adapters/compression/{index.mjs → index.js} +4 -4
- package/lib/adapters/compression/index.js.map +1 -0
- package/lib/adapters/compression/summaryblob/{documentStorageServiceSummaryBlobCompressionAdapter.d.mts → documentStorageServiceSummaryBlobCompressionAdapter.d.ts} +3 -3
- package/lib/adapters/compression/summaryblob/documentStorageServiceSummaryBlobCompressionAdapter.d.ts.map +1 -0
- package/lib/adapters/compression/summaryblob/{documentStorageServiceSummaryBlobCompressionAdapter.mjs → documentStorageServiceSummaryBlobCompressionAdapter.js} +3 -3
- package/lib/adapters/compression/summaryblob/documentStorageServiceSummaryBlobCompressionAdapter.js.map +1 -0
- package/lib/adapters/compression/summaryblob/{index.mjs → index.d.ts} +2 -2
- package/lib/adapters/compression/summaryblob/index.d.ts.map +1 -0
- package/lib/adapters/compression/summaryblob/{index.d.mts → index.js} +2 -2
- package/lib/adapters/compression/summaryblob/index.js.map +1 -0
- package/lib/adapters/{index.d.mts → index.d.ts} +3 -3
- package/lib/adapters/index.d.ts.map +1 -0
- package/lib/adapters/{index.mjs → index.js} +3 -3
- package/lib/adapters/index.js.map +1 -0
- package/lib/adapters/{predefinedAdapters.d.mts → predefinedAdapters.d.ts} +2 -2
- package/lib/adapters/predefinedAdapters.d.ts.map +1 -0
- package/lib/adapters/{predefinedAdapters.mjs → predefinedAdapters.js} +2 -2
- package/lib/adapters/predefinedAdapters.js.map +1 -0
- package/lib/{blob.d.mts → blob.d.ts} +1 -1
- package/lib/blob.d.ts.map +1 -0
- package/lib/{blob.mjs → blob.js} +1 -1
- package/lib/blob.js.map +1 -0
- package/lib/{buildSnapshotTree.d.mts → buildSnapshotTree.d.ts} +1 -1
- package/lib/buildSnapshotTree.d.ts.map +1 -0
- package/lib/{buildSnapshotTree.mjs → buildSnapshotTree.js} +1 -1
- package/lib/buildSnapshotTree.js.map +1 -0
- package/lib/{documentServiceFactoryProxy.d.mts → documentServiceFactoryProxy.d.ts} +1 -1
- package/lib/documentServiceFactoryProxy.d.ts.map +1 -0
- package/lib/{documentServiceFactoryProxy.mjs → documentServiceFactoryProxy.js} +1 -1
- package/lib/documentServiceFactoryProxy.js.map +1 -0
- package/lib/{documentServiceProxy.d.mts → documentServiceProxy.d.ts} +4 -3
- package/lib/documentServiceProxy.d.ts.map +1 -0
- package/lib/{documentServiceProxy.mjs → documentServiceProxy.js} +4 -2
- package/lib/documentServiceProxy.js.map +1 -0
- package/lib/{documentStorageServiceProxy.d.mts → documentStorageServiceProxy.d.ts} +3 -3
- package/lib/documentStorageServiceProxy.d.ts.map +1 -0
- package/lib/{documentStorageServiceProxy.mjs → documentStorageServiceProxy.js} +8 -4
- package/lib/documentStorageServiceProxy.js.map +1 -0
- package/lib/{driver-utils-alpha.d.mts → driver-utils-alpha.d.ts} +6 -2
- package/lib/{driver-utils-public.d.mts → driver-utils-beta.d.ts} +10 -2
- package/lib/{driver-utils-beta.d.mts → driver-utils-public.d.ts} +10 -2
- package/lib/{driver-utils-untrimmed.d.mts → driver-utils-untrimmed.d.ts} +30 -17
- package/lib/{error.d.mts → error.d.ts} +3 -3
- package/lib/error.d.ts.map +1 -0
- package/lib/{error.mjs → error.js} +3 -4
- package/lib/error.js.map +1 -0
- package/lib/{index.d.mts → index.d.ts} +18 -17
- package/lib/index.d.ts.map +1 -0
- package/lib/{index.mjs → index.js} +18 -17
- package/lib/index.js.map +1 -0
- package/lib/{insecureUrlResolver.d.mts → insecureUrlResolver.d.ts} +4 -3
- package/lib/insecureUrlResolver.d.ts.map +1 -0
- package/lib/{insecureUrlResolver.mjs → insecureUrlResolver.js} +10 -8
- package/lib/insecureUrlResolver.js.map +1 -0
- package/lib/{messageRecognition.d.mts → messageRecognition.d.ts} +5 -1
- package/lib/messageRecognition.d.ts.map +1 -0
- package/lib/{messageRecognition.mjs → messageRecognition.js} +5 -1
- package/lib/messageRecognition.js.map +1 -0
- package/lib/{network.d.mts → network.d.ts} +14 -11
- package/lib/network.d.ts.map +1 -0
- package/lib/{network.mjs → network.js} +11 -16
- package/lib/network.js.map +1 -0
- package/lib/networkUtils.d.ts +10 -0
- package/lib/networkUtils.d.ts.map +1 -0
- package/lib/{networkUtils.mjs → networkUtils.js} +2 -2
- package/lib/networkUtils.js.map +1 -0
- package/lib/{packageVersion.d.mts → packageVersion.d.ts} +2 -2
- package/lib/packageVersion.d.ts.map +1 -0
- package/lib/{packageVersion.mjs → packageVersion.js} +2 -2
- package/lib/packageVersion.js.map +1 -0
- package/lib/{parallelRequests.d.mts → parallelRequests.d.ts} +4 -4
- package/lib/parallelRequests.d.ts.map +1 -0
- package/lib/{parallelRequests.mjs → parallelRequests.js} +10 -5
- package/lib/parallelRequests.js.map +1 -0
- package/lib/{prefetchDocumentStorageService.d.mts → prefetchDocumentStorageService.d.ts} +6 -2
- package/lib/prefetchDocumentStorageService.d.ts.map +1 -0
- package/lib/{prefetchDocumentStorageService.mjs → prefetchDocumentStorageService.js} +7 -3
- package/lib/prefetchDocumentStorageService.js.map +1 -0
- package/lib/{rateLimiter.d.mts → rateLimiter.d.ts} +1 -1
- package/lib/rateLimiter.d.ts.map +1 -0
- package/lib/{rateLimiter.mjs → rateLimiter.js} +1 -1
- package/lib/rateLimiter.js.map +1 -0
- package/lib/{readAndParse.d.mts → readAndParse.d.ts} +1 -1
- package/lib/readAndParse.d.ts.map +1 -0
- package/lib/{readAndParse.mjs → readAndParse.js} +1 -1
- package/lib/readAndParse.js.map +1 -0
- package/lib/{runWithRetry.d.mts → runWithRetry.d.ts} +1 -1
- package/lib/runWithRetry.d.ts.map +1 -0
- package/lib/{runWithRetry.mjs → runWithRetry.js} +3 -3
- package/lib/runWithRetry.js.map +1 -0
- package/lib/storageUtils.d.ts +13 -0
- package/lib/storageUtils.d.ts.map +1 -0
- package/lib/storageUtils.js +13 -0
- package/lib/storageUtils.js.map +1 -0
- package/lib/{summaryForCreateNew.d.mts → summaryForCreateNew.d.ts} +1 -1
- package/lib/summaryForCreateNew.d.ts.map +1 -0
- package/lib/{summaryForCreateNew.mjs → summaryForCreateNew.js} +1 -1
- package/lib/summaryForCreateNew.js.map +1 -0
- package/lib/test/insecureUrlResolverTest.spec.js +101 -0
- package/lib/test/insecureUrlResolverTest.spec.js.map +1 -0
- package/lib/test/parallelRequests.spec.js +186 -0
- package/lib/test/parallelRequests.spec.js.map +1 -0
- package/lib/test/rateLimiter.spec.js +85 -0
- package/lib/test/rateLimiter.spec.js.map +1 -0
- package/lib/test/runWithRetry.spec.js +180 -0
- package/lib/test/runWithRetry.spec.js.map +1 -0
- package/lib/test/summaryCompressionData.js +170 -0
- package/lib/test/summaryCompressionData.js.map +1 -0
- package/lib/test/summaryCompresssionTester.spec.js +429 -0
- package/lib/test/summaryCompresssionTester.spec.js.map +1 -0
- package/lib/test/types/validateDriverUtilsPrevious.generated.js +108 -0
- package/lib/test/types/validateDriverUtilsPrevious.generated.js.map +1 -0
- package/lib/{treeConversions.d.mts → treeConversions.d.ts} +1 -1
- package/lib/treeConversions.d.ts.map +1 -0
- package/lib/{treeConversions.mjs → treeConversions.js} +4 -3
- package/lib/treeConversions.js.map +1 -0
- package/package.json +82 -28
- package/src/adapters/compression/documentServiceCompressionAdapter.ts +9 -3
- package/src/adapters/compression/documentServiceFactoryCompressionAdapter.ts +4 -4
- package/src/adapters/compression/index.ts +3 -3
- package/src/adapters/compression/summaryblob/documentStorageServiceSummaryBlobCompressionAdapter.ts +2 -2
- package/src/adapters/compression/summaryblob/index.ts +1 -1
- package/src/adapters/index.ts +2 -2
- package/src/adapters/predefinedAdapters.ts +1 -1
- package/src/documentServiceProxy.ts +9 -2
- package/src/documentStorageServiceProxy.ts +12 -4
- package/src/error.ts +2 -4
- package/src/index.ts +17 -16
- package/src/insecureUrlResolver.ts +8 -6
- package/src/network.ts +11 -16
- package/src/networkUtils.ts +3 -4
- package/src/packageVersion.ts +1 -1
- package/src/parallelRequests.ts +11 -11
- package/src/prefetchDocumentStorageService.ts +2 -2
- package/src/runWithRetry.ts +2 -2
- package/src/storageUtils.ts +18 -0
- package/src/treeConversions.ts +3 -2
- package/tsconfig.cjs.json +7 -0
- package/tsconfig.json +2 -5
- package/lib/adapters/compression/compressionTypes.d.mts.map +0 -1
- package/lib/adapters/compression/compressionTypes.mjs.map +0 -1
- package/lib/adapters/compression/documentServiceCompressionAdapter.d.mts.map +0 -1
- package/lib/adapters/compression/documentServiceCompressionAdapter.mjs.map +0 -1
- package/lib/adapters/compression/documentServiceFactoryCompressionAdapter.d.mts.map +0 -1
- package/lib/adapters/compression/documentServiceFactoryCompressionAdapter.mjs.map +0 -1
- package/lib/adapters/compression/index.d.mts.map +0 -1
- package/lib/adapters/compression/index.mjs.map +0 -1
- package/lib/adapters/compression/summaryblob/documentStorageServiceSummaryBlobCompressionAdapter.d.mts.map +0 -1
- package/lib/adapters/compression/summaryblob/documentStorageServiceSummaryBlobCompressionAdapter.mjs.map +0 -1
- package/lib/adapters/compression/summaryblob/index.d.mts.map +0 -1
- package/lib/adapters/compression/summaryblob/index.mjs.map +0 -1
- package/lib/adapters/index.d.mts.map +0 -1
- package/lib/adapters/index.mjs.map +0 -1
- package/lib/adapters/predefinedAdapters.d.mts.map +0 -1
- package/lib/adapters/predefinedAdapters.mjs.map +0 -1
- package/lib/blob.d.mts.map +0 -1
- package/lib/blob.mjs.map +0 -1
- package/lib/buildSnapshotTree.d.mts.map +0 -1
- package/lib/buildSnapshotTree.mjs.map +0 -1
- package/lib/documentServiceFactoryProxy.d.mts.map +0 -1
- package/lib/documentServiceFactoryProxy.mjs.map +0 -1
- package/lib/documentServiceProxy.d.mts.map +0 -1
- package/lib/documentServiceProxy.mjs.map +0 -1
- package/lib/documentStorageServiceProxy.d.mts.map +0 -1
- package/lib/documentStorageServiceProxy.mjs.map +0 -1
- package/lib/error.d.mts.map +0 -1
- package/lib/error.mjs.map +0 -1
- package/lib/index.d.mts.map +0 -1
- package/lib/index.mjs.map +0 -1
- package/lib/insecureUrlResolver.d.mts.map +0 -1
- package/lib/insecureUrlResolver.mjs.map +0 -1
- package/lib/messageRecognition.d.mts.map +0 -1
- package/lib/messageRecognition.mjs.map +0 -1
- package/lib/network.d.mts.map +0 -1
- package/lib/network.mjs.map +0 -1
- package/lib/networkUtils.d.mts +0 -11
- package/lib/networkUtils.d.mts.map +0 -1
- package/lib/networkUtils.mjs.map +0 -1
- package/lib/packageVersion.d.mts.map +0 -1
- package/lib/packageVersion.mjs.map +0 -1
- package/lib/parallelRequests.d.mts.map +0 -1
- package/lib/parallelRequests.mjs.map +0 -1
- package/lib/prefetchDocumentStorageService.d.mts.map +0 -1
- package/lib/prefetchDocumentStorageService.mjs.map +0 -1
- package/lib/rateLimiter.d.mts.map +0 -1
- package/lib/rateLimiter.mjs.map +0 -1
- package/lib/readAndParse.d.mts.map +0 -1
- package/lib/readAndParse.mjs.map +0 -1
- package/lib/runWithRetry.d.mts.map +0 -1
- package/lib/runWithRetry.mjs.map +0 -1
- package/lib/summaryForCreateNew.d.mts.map +0 -1
- package/lib/summaryForCreateNew.mjs.map +0 -1
- package/lib/treeConversions.d.mts.map +0 -1
- package/lib/treeConversions.mjs.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/adapters/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,2BAA2B,EAE3B,+BAA+B,EAC/B,mBAAmB,GACnB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport {\n\tSummaryCompressionAlgorithm,\n\tICompressionStorageConfig,\n\tDefaultCompressionStorageConfig,\n\tblobHeadersBlobName,\n} from \"./compression/index.js\";\n\nexport { applyStorageCompression } from \"./predefinedAdapters.js\";\n"]}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
import { IDocumentServiceFactory } from "@fluidframework/driver-definitions";
|
|
6
|
-
import { ICompressionStorageConfig } from "./compression/index.
|
|
6
|
+
import { ICompressionStorageConfig } from "./compression/index.js";
|
|
7
7
|
/**
|
|
8
8
|
* This method optionally applies compression to the given document service factory. The compression
|
|
9
9
|
* must be enabled by setting the config to true or by passing a compression config object.
|
|
@@ -18,4 +18,4 @@ export declare function applyStorageCompression(documentServiceFactory: IDocumen
|
|
|
18
18
|
* a properties expected for the interface ICompressionStorageConfig.
|
|
19
19
|
*/
|
|
20
20
|
export declare function isCompressionConfig(config: any): config is ICompressionStorageConfig;
|
|
21
|
-
//# sourceMappingURL=predefinedAdapters.d.
|
|
21
|
+
//# sourceMappingURL=predefinedAdapters.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"predefinedAdapters.d.ts","sourceRoot":"","sources":["../../src/adapters/predefinedAdapters.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,uBAAuB,EAAE,MAAM,oCAAoC,CAAC;AAC7E,OAAO,EAEN,yBAAyB,EAEzB,MAAM,wBAAwB,CAAC;AAEhC;;;;;;;GAOG;AACH,wBAAgB,uBAAuB,CACtC,sBAAsB,EAAE,uBAAuB,EAC/C,MAAM,CAAC,EAAE,yBAAyB,GAAG,OAAO,GAC1C,uBAAuB,CAgBzB;AAwBD;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,GAAG,GAAG,MAAM,IAAI,yBAAyB,CAKpF"}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
import { assert } from "@fluidframework/core-utils";
|
|
6
|
-
import { DocumentServiceFactoryCompressionAdapter, DefaultCompressionStorageConfig, } from "./compression/index.
|
|
6
|
+
import { DocumentServiceFactoryCompressionAdapter, DefaultCompressionStorageConfig, } from "./compression/index.js";
|
|
7
7
|
/**
|
|
8
8
|
* This method optionally applies compression to the given document service factory. The compression
|
|
9
9
|
* must be enabled by setting the config to true or by passing a compression config object.
|
|
@@ -44,4 +44,4 @@ export function isCompressionConfig(config) {
|
|
|
44
44
|
return (config !== undefined &&
|
|
45
45
|
(config.algorithm !== undefined || config.minSizeToCompress !== undefined));
|
|
46
46
|
}
|
|
47
|
-
//# sourceMappingURL=predefinedAdapters.
|
|
47
|
+
//# sourceMappingURL=predefinedAdapters.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"predefinedAdapters.js","sourceRoot":"","sources":["../../src/adapters/predefinedAdapters.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAEpD,OAAO,EACN,wCAAwC,EAExC,+BAA+B,GAC/B,MAAM,wBAAwB,CAAC;AAEhC;;;;;;;GAOG;AACH,MAAM,UAAU,uBAAuB,CACtC,sBAA+C,EAC/C,MAA4C;IAE5C,IAAI,MAAM,KAAK,SAAS,IAAI,MAAM,KAAK,KAAK,EAAE;QAC7C,OAAO,sBAAsB,CAAC;KAC9B;SAAM,IAAI,MAAM,KAAK,IAAI,EAAE;QAC3B,OAAO,+BAA+B,CACrC,wCAAwC,EACxC,sBAAsB,CACtB,CAAC;KACF;SAAM;QACN,MAAM,CAAC,mBAAmB,CAAC,MAAM,CAAC,EAAE,KAAK,CAAC,gCAAgC,CAAC,CAAC;QAC5E,OAAO,+BAA+B,CACrC,wCAAwC,EACxC,sBAAsB,EACtB,MAAM,CACN,CAAC;KACF;AACF,CAAC;AAED;;;;;GAKG;AACH,SAAS,+BAA+B,CACvC,WAK4B,EAC5B,sBAA+C,EAC/C,SAAoC,+BAA+B;IAEnE,IAAI,MAAM,CAAC,SAAS,KAAK,SAAS,EAAE;QACnC,OAAO,sBAAsB,CAAC;KAC9B;IACD,OAAO,IAAI,WAAW,CAAC,sBAAsB,EAAE,MAAM,CAAC,CAAC;AACxD,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,mBAAmB,CAAC,MAAW;IAC9C,OAAO,CACN,MAAM,KAAK,SAAS;QACpB,CAAC,MAAM,CAAC,SAAS,KAAK,SAAS,IAAI,MAAM,CAAC,iBAAiB,KAAK,SAAS,CAAC,CAC1E,CAAC;AACH,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert } from \"@fluidframework/core-utils\";\nimport { IDocumentServiceFactory } from \"@fluidframework/driver-definitions\";\nimport {\n\tDocumentServiceFactoryCompressionAdapter,\n\tICompressionStorageConfig,\n\tDefaultCompressionStorageConfig,\n} from \"./compression/index.js\";\n\n/**\n * This method optionally applies compression to the given document service factory. The compression\n * must be enabled by setting the config to true or by passing a compression config object.\n * @param documentServiceFactory - The document service factory to apply compression to.\n * @param config - The compression configuration.\n * @returns The document service factory possibly with compression applied.\n * @internal\n */\nexport function applyStorageCompression(\n\tdocumentServiceFactory: IDocumentServiceFactory,\n\tconfig?: ICompressionStorageConfig | boolean,\n): IDocumentServiceFactory {\n\tif (config === undefined || config === false) {\n\t\treturn documentServiceFactory;\n\t} else if (config === true) {\n\t\treturn applyStorageCompressionInternal(\n\t\t\tDocumentServiceFactoryCompressionAdapter,\n\t\t\tdocumentServiceFactory,\n\t\t);\n\t} else {\n\t\tassert(isCompressionConfig(config), 0x6f4 /* Invalid compression config */);\n\t\treturn applyStorageCompressionInternal(\n\t\t\tDocumentServiceFactoryCompressionAdapter,\n\t\t\tdocumentServiceFactory,\n\t\t\tconfig,\n\t\t);\n\t}\n}\n\n/**\n * This method applies compression to the given document service factory.\n * @param documentServiceFactory - The document service factory to apply compression to.\n * @param config - The compression configuration.\n * @returns The document service factory with compression applied.\n */\nfunction applyStorageCompressionInternal(\n\tconstructor: new (\n\t\t// eslint-disable-next-line @typescript-eslint/no-shadow\n\t\tdocumentServiceFactory: IDocumentServiceFactory,\n\t\t// eslint-disable-next-line @typescript-eslint/no-shadow\n\t\tconfig: ICompressionStorageConfig,\n\t) => IDocumentServiceFactory,\n\tdocumentServiceFactory: IDocumentServiceFactory,\n\tconfig: ICompressionStorageConfig = DefaultCompressionStorageConfig,\n): IDocumentServiceFactory {\n\tif (config.algorithm === undefined) {\n\t\treturn documentServiceFactory;\n\t}\n\treturn new constructor(documentServiceFactory, config);\n}\n\n/**\n * This method checks whether given objects contains\n * a properties expected for the interface ICompressionStorageConfig.\n */\nexport function isCompressionConfig(config: any): config is ICompressionStorageConfig {\n\treturn (\n\t\tconfig !== undefined &&\n\t\t(config.algorithm !== undefined || config.minSizeToCompress !== undefined)\n\t);\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"blob.d.ts","sourceRoot":"","sources":["../src/blob.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,QAAQ,EACR,KAAK,EACL,WAAW,EACX,KAAK,EACL,SAAS,EACT,MAAM,sCAAsC,CAAC;AAE9C;;;GAGG;AACH,qBAAa,aAAa;aAYR,IAAI,EAAE,MAAM;IAX7B,SAAgB,IAAI,iBAAiB;IACrC,SAAgB,IAAI,kBAAkB;IACtC,SAAgB,KAAK,EAAE,KAAK,CAAC;IAE7B;;;;;OAKG;gBAEc,IAAI,EAAE,MAAM,EAC5B,QAAQ,EAAE,MAAM,EAChB,QAAQ,GAAE,OAAO,GAAG,QAAkB;CAIvC;AAED;;;GAGG;AACH,qBAAa,aAAa;aAUR,IAAI,EAAE,MAAM;aACZ,KAAK,EAAE,KAAK;IAV7B,SAAgB,IAAI,sBAAsB;IAC1C,SAAgB,IAAI,kBAAkB;IAEtC;;;;OAIG;gBAEc,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,KAAK;CAE7B;AAED;;;GAGG;AACH,qBAAa,mBAAmB;aAWd,IAAI,EAAE,MAAM;aACZ,EAAE,EAAE,MAAM;IAX3B,SAAgB,IAAI,iBAAiB;IACrC,SAAgB,IAAI,wBAAwB;IAC5C,SAAgB,KAAK,EAAE,WAAW,CAAC;IAEnC;;;;OAIG;gBAEc,IAAI,EAAE,MAAM,EACZ,EAAE,EAAE,MAAM;CAI3B"}
|
package/lib/{blob.mjs → blob.js}
RENAMED
package/lib/blob.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"blob.js","sourceRoot":"","sources":["../src/blob.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,QAAQ,EAIR,SAAS,GACT,MAAM,sCAAsC,CAAC;AAE9C;;;GAGG;AACH,MAAM,OAAO,aAAa;IAKzB;;;;;OAKG;IACH,YACiB,IAAY,EAC5B,QAAgB,EAChB,WAA+B,OAAO;QAFtB,SAAI,GAAJ,IAAI,CAAQ;QAXb,SAAI,GAAG,QAAQ,CAAC,IAAI,CAAC;QACrB,SAAI,GAAG,SAAS,CAAC,IAAI,CAAC;QAcrC,IAAI,CAAC,KAAK,GAAG,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC;IACrC,CAAC;CACD;AAED;;;GAGG;AACH,MAAM,OAAO,aAAa;IAIzB;;;;OAIG;IACH,YACiB,IAAY,EACZ,KAAY;QADZ,SAAI,GAAJ,IAAI,CAAQ;QACZ,UAAK,GAAL,KAAK,CAAO;QAVb,SAAI,GAAG,QAAQ,CAAC,SAAS,CAAC;QAC1B,SAAI,GAAG,SAAS,CAAC,IAAI,CAAC;IAUnC,CAAC;CACJ;AAED;;;GAGG;AACH,MAAM,OAAO,mBAAmB;IAK/B;;;;OAIG;IACH,YACiB,IAAY,EACZ,EAAU;QADV,SAAI,GAAJ,IAAI,CAAQ;QACZ,OAAE,GAAF,EAAE,CAAQ;QAXX,SAAI,GAAG,QAAQ,CAAC,IAAI,CAAC;QACrB,SAAI,GAAG,SAAS,CAAC,UAAU,CAAC;QAY3C,IAAI,CAAC,KAAK,GAAG,EAAE,EAAE,EAAE,CAAC;IACrB,CAAC;CACD","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport {\n\tFileMode,\n\tIBlob,\n\tIAttachment,\n\tITree,\n\tTreeEntry,\n} from \"@fluidframework/protocol-definitions\";\n\n/**\n * Basic implementation of a blob ITreeEntry\n * @internal\n */\nexport class BlobTreeEntry {\n\tpublic readonly mode = FileMode.File;\n\tpublic readonly type = TreeEntry.Blob;\n\tpublic readonly value: IBlob;\n\n\t/**\n\t * Creates a blob ITreeEntry\n\t * @param path - path of entry\n\t * @param contents - blob contents\n\t * @param encoding - encoding of contents; defaults to utf-8\n\t */\n\tconstructor(\n\t\tpublic readonly path: string,\n\t\tcontents: string,\n\t\tencoding: \"utf-8\" | \"base64\" = \"utf-8\",\n\t) {\n\t\tthis.value = { contents, encoding };\n\t}\n}\n\n/**\n * Basic implementation of a tree ITreeEntry\n * @internal\n */\nexport class TreeTreeEntry {\n\tpublic readonly mode = FileMode.Directory;\n\tpublic readonly type = TreeEntry.Tree;\n\n\t/**\n\t * Creates a tree ITreeEntry\n\t * @param path - path of entry\n\t * @param value - subtree\n\t */\n\tconstructor(\n\t\tpublic readonly path: string,\n\t\tpublic readonly value: ITree,\n\t) {}\n}\n\n/**\n * Basic implementation of an attachment ITreeEntry\n * @internal\n */\nexport class AttachmentTreeEntry {\n\tpublic readonly mode = FileMode.File;\n\tpublic readonly type = TreeEntry.Attachment;\n\tpublic readonly value: IAttachment;\n\n\t/**\n\t * Creates an attachment ITreeEntry\n\t * @param path - path of entry\n\t * @param id - id of external blob attachment\n\t */\n\tconstructor(\n\t\tpublic readonly path: string,\n\t\tpublic readonly id: string,\n\t) {\n\t\tthis.value = { id };\n\t}\n}\n"]}
|
|
@@ -13,4 +13,4 @@ import { ISnapshotTree, ITreeEntry } from "@fluidframework/protocol-definitions"
|
|
|
13
13
|
* @internal
|
|
14
14
|
*/
|
|
15
15
|
export declare function buildSnapshotTree(entries: ITreeEntry[], blobMap: Map<string, ArrayBufferLike>): ISnapshotTree;
|
|
16
|
-
//# sourceMappingURL=buildSnapshotTree.d.
|
|
16
|
+
//# sourceMappingURL=buildSnapshotTree.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"buildSnapshotTree.d.ts","sourceRoot":"","sources":["../src/buildSnapshotTree.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,EAEN,aAAa,EACb,UAAU,EAEV,MAAM,sCAAsC,CAAC;AAoE9C;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAChC,OAAO,EAAE,UAAU,EAAE,EACrB,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,eAAe,CAAC,GACnC,aAAa,CAGf"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"buildSnapshotTree.js","sourceRoot":"","sources":["../src/buildSnapshotTree.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAEpD,OAAO,EACN,QAAQ,EAGR,SAAS,GACT,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AACtE,OAAO,EAAE,EAAE,IAAI,IAAI,EAAE,MAAM,MAAM,CAAC;AAElC,SAAS,WAAW,CACnB,IAAY,EACZ,WAAyB,EACzB,OAAqC;IAErC,MAAM,OAAO,GAAqB,EAAE,CAAC;IACrC,KAAK,MAAM,SAAS,IAAI,WAAW,EAAE;QACpC,MAAM,OAAO,GAAG,GAAG,IAAI,GAAG,SAAS,CAAC,IAAI,EAAE,CAAC;QAE3C,IAAI,SAAS,CAAC,IAAI,KAAK,SAAS,CAAC,IAAI,EAAE;YACtC,MAAM,IAAI,GAAG,SAAS,CAAC,KAAK,CAAC;YAC7B,MAAM,MAAM,GAAG,cAAc,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;YAC5D,MAAM,EAAE,GAAG,IAAI,EAAE,CAAC;YAClB,OAAO,CAAC,GAAG,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC;YAExB,MAAM,KAAK,GAAmB;gBAC7B,IAAI,EAAE,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC;gBAC9B,IAAI,EAAE,OAAO;gBACb,GAAG,EAAE,EAAE;gBACP,IAAI,EAAE,CAAC;gBACP,IAAI,EAAE,MAAM;gBACZ,GAAG,EAAE,EAAE;aACP,CAAC;YACF,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;SACpB;aAAM,IAAI,SAAS,CAAC,IAAI,KAAK,SAAS,CAAC,IAAI,EAAE;YAC7C,MAAM,CACL,SAAS,CAAC,IAAI,KAAK,SAAS,CAAC,IAAI,EACjC,KAAK,CAAC,8CAA8C,CACpD,CAAC;YACF,MAAM,CAAC,GAAG,SAAS,CAAC,KAAK,CAAC;YAC1B,MAAM,KAAK,GAAmB;gBAC7B,IAAI,EAAE,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC;gBAC9B,IAAI,EAAE,OAAO;gBACb,GAAG,EAAE,EAAE;gBACP,IAAI,EAAE,CAAC,CAAC;gBACR,IAAI,EAAE,MAAM;gBACZ,GAAG,EAAE,EAAE;aACP,CAAC;YACF,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YAEpB,MAAM,cAAc,GAAG,WAAW,CAAC,GAAG,OAAO,GAAG,EAAE,CAAC,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;YACtE,OAAO,CAAC,IAAI,CAAC,GAAG,cAAc,CAAC,CAAC;SAChC;KACD;IAED,OAAO,OAAO,CAAC;AAChB,CAAC;AAED;;;;;;GAMG;AACH,SAAS,OAAO,CAAC,IAAkB,EAAE,OAAqC;IACzE,MAAM,OAAO,GAAG,WAAW,CAAC,EAAE,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;IAC/C,OAAO;QACN,GAAG,EAAE,EAAE;QACP,IAAI,EAAE,OAAO;QACb,GAAG,EAAE,EAAE;KACP,CAAC;AACH,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,iBAAiB,CAChC,OAAqB,EACrB,OAAqC;IAErC,MAAM,SAAS,GAAG,OAAO,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IAC5C,OAAO,qBAAqB,CAAC,SAAS,CAAC,CAAC;AACzC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { stringToBuffer } from \"@fluid-internal/client-utils\";\nimport { assert } from \"@fluidframework/core-utils\";\nimport * as git from \"@fluidframework/gitresources\";\nimport {\n\tFileMode,\n\tISnapshotTree,\n\tITreeEntry,\n\tTreeEntry,\n} from \"@fluidframework/protocol-definitions\";\nimport { buildGitTreeHierarchy } from \"@fluidframework/protocol-base\";\nimport { v4 as uuid } from \"uuid\";\n\nfunction flattenCore(\n\tpath: string,\n\ttreeEntries: ITreeEntry[],\n\tblobMap: Map<string, ArrayBufferLike>,\n): git.ITreeEntry[] {\n\tconst entries: git.ITreeEntry[] = [];\n\tfor (const treeEntry of treeEntries) {\n\t\tconst subPath = `${path}${treeEntry.path}`;\n\n\t\tif (treeEntry.type === TreeEntry.Blob) {\n\t\t\tconst blob = treeEntry.value;\n\t\t\tconst buffer = stringToBuffer(blob.contents, blob.encoding);\n\t\t\tconst id = uuid();\n\t\t\tblobMap.set(id, buffer);\n\n\t\t\tconst entry: git.ITreeEntry = {\n\t\t\t\tmode: FileMode[treeEntry.mode],\n\t\t\t\tpath: subPath,\n\t\t\t\tsha: id,\n\t\t\t\tsize: 0,\n\t\t\t\ttype: \"blob\",\n\t\t\t\turl: \"\",\n\t\t\t};\n\t\t\tentries.push(entry);\n\t\t} else if (treeEntry.type === TreeEntry.Tree) {\n\t\t\tassert(\n\t\t\t\ttreeEntry.type === TreeEntry.Tree,\n\t\t\t\t0x101 /* \"Unexpected tree entry type on flatten!\" */,\n\t\t\t);\n\t\t\tconst t = treeEntry.value;\n\t\t\tconst entry: git.ITreeEntry = {\n\t\t\t\tmode: FileMode[treeEntry.mode],\n\t\t\t\tpath: subPath,\n\t\t\t\tsha: \"\",\n\t\t\t\tsize: -1,\n\t\t\t\ttype: \"tree\",\n\t\t\t\turl: \"\",\n\t\t\t};\n\t\t\tentries.push(entry);\n\n\t\t\tconst subTreeEntries = flattenCore(`${subPath}/`, t.entries, blobMap);\n\t\t\tentries.push(...subTreeEntries);\n\t\t}\n\t}\n\n\treturn entries;\n}\n\n/**\n * Create a flatten view of an array of ITreeEntry\n *\n * @param tree - an array of ITreeEntry to flatten\n * @param blobMap - a map of blob's sha1 to content\n * @returns A flatten with of the ITreeEntry\n */\nfunction flatten(tree: ITreeEntry[], blobMap: Map<string, ArrayBufferLike>): git.ITree {\n\tconst entries = flattenCore(\"\", tree, blobMap);\n\treturn {\n\t\tsha: \"\",\n\t\ttree: entries,\n\t\turl: \"\",\n\t};\n}\n\n/**\n * Build a tree hierarchy base on an array of ITreeEntry\n *\n * @param entries - an array of ITreeEntry to flatten\n * @param blobMap - a map of blob's sha1 to content that gets filled with content from entries\n * NOTE: blobMap's validity is contingent on the returned promise's resolution\n * @returns the hierarchical tree\n * @internal\n */\nexport function buildSnapshotTree(\n\tentries: ITreeEntry[],\n\tblobMap: Map<string, ArrayBufferLike>,\n): ISnapshotTree {\n\tconst flattened = flatten(entries, blobMap);\n\treturn buildGitTreeHierarchy(flattened);\n}\n"]}
|
|
@@ -16,4 +16,4 @@ export declare abstract class DocumentServiceFactoryProxy implements IDocumentSe
|
|
|
16
16
|
createContainer(createNewSummary: ISummaryTree | undefined, createNewResolvedUrl: IResolvedUrl, logger?: ITelemetryBaseLogger, clientIsSummarizer?: boolean): Promise<IDocumentService>;
|
|
17
17
|
createDocumentService(resolvedUrl: IResolvedUrl, logger?: ITelemetryBaseLogger, clientIsSummarizer?: boolean): Promise<IDocumentService>;
|
|
18
18
|
}
|
|
19
|
-
//# sourceMappingURL=documentServiceFactoryProxy.d.
|
|
19
|
+
//# sourceMappingURL=documentServiceFactoryProxy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"documentServiceFactoryProxy.d.ts","sourceRoot":"","sources":["../src/documentServiceFactoryProxy.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AACvE,OAAO,EACN,gBAAgB,EAChB,uBAAuB,EACvB,YAAY,EACZ,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAC;AAEpE;;;GAGG;AAEH,8BAAsB,2BAA4B,YAAW,uBAAuB;IACvE,OAAO,CAAC,QAAQ,CAAC,eAAe;gBAAf,eAAe,EAAE,uBAAuB;IAErE,IAAW,cAAc,IAAI,uBAAuB,CAEnD;IAEY,eAAe,CAC3B,gBAAgB,EAAE,YAAY,GAAG,SAAS,EAC1C,oBAAoB,EAAE,YAAY,EAClC,MAAM,CAAC,EAAE,oBAAoB,EAC7B,kBAAkB,CAAC,EAAE,OAAO,GAC1B,OAAO,CAAC,gBAAgB,CAAC;IASf,qBAAqB,CACjC,WAAW,EAAE,YAAY,EACzB,MAAM,CAAC,EAAE,oBAAoB,EAC7B,kBAAkB,CAAC,EAAE,OAAO,GAC1B,OAAO,CAAC,gBAAgB,CAAC;CAG5B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"documentServiceFactoryProxy.js","sourceRoot":"","sources":["../src/documentServiceFactoryProxy.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAUH;;;GAGG;AAEH,MAAM,OAAgB,2BAA2B;IAChD,YAA6B,eAAwC;QAAxC,oBAAe,GAAf,eAAe,CAAyB;IAAG,CAAC;IAEzE,IAAW,cAAc;QACxB,OAAO,IAAI,CAAC,eAAe,CAAC;IAC7B,CAAC;IAEM,KAAK,CAAC,eAAe,CAC3B,gBAA0C,EAC1C,oBAAkC,EAClC,MAA6B,EAC7B,kBAA4B;QAE5B,OAAO,IAAI,CAAC,cAAc,CAAC,eAAe,CACzC,gBAAgB,EAChB,oBAAoB,EACpB,MAAM,EACN,kBAAkB,CAClB,CAAC;IACH,CAAC;IAEM,KAAK,CAAC,qBAAqB,CACjC,WAAyB,EACzB,MAA6B,EAC7B,kBAA4B;QAE5B,OAAO,IAAI,CAAC,cAAc,CAAC,qBAAqB,CAAC,WAAW,EAAE,MAAM,EAAE,kBAAkB,CAAC,CAAC;IAC3F,CAAC;CACD","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { ITelemetryBaseLogger } from \"@fluidframework/core-interfaces\";\nimport {\n\tIDocumentService,\n\tIDocumentServiceFactory,\n\tIResolvedUrl,\n} from \"@fluidframework/driver-definitions\";\nimport { ISummaryTree } from \"@fluidframework/protocol-definitions\";\n\n/**\n * This abstract class implements IDocumentServiceFactory interface. It uses delegation pattern.\n * It delegates all calls to IDocumentServiceFactory implementation passed to constructor.\n */\n\nexport abstract class DocumentServiceFactoryProxy implements IDocumentServiceFactory {\n\tconstructor(private readonly _serviceFactory: IDocumentServiceFactory) {}\n\n\tpublic get serviceFactory(): IDocumentServiceFactory {\n\t\treturn this._serviceFactory;\n\t}\n\n\tpublic async createContainer(\n\t\tcreateNewSummary: ISummaryTree | undefined,\n\t\tcreateNewResolvedUrl: IResolvedUrl,\n\t\tlogger?: ITelemetryBaseLogger,\n\t\tclientIsSummarizer?: boolean,\n\t): Promise<IDocumentService> {\n\t\treturn this.serviceFactory.createContainer(\n\t\t\tcreateNewSummary,\n\t\t\tcreateNewResolvedUrl,\n\t\t\tlogger,\n\t\t\tclientIsSummarizer,\n\t\t);\n\t}\n\n\tpublic async createDocumentService(\n\t\tresolvedUrl: IResolvedUrl,\n\t\tlogger?: ITelemetryBaseLogger,\n\t\tclientIsSummarizer?: boolean,\n\t): Promise<IDocumentService> {\n\t\treturn this.serviceFactory.createDocumentService(resolvedUrl, logger, clientIsSummarizer);\n\t}\n}\n"]}
|
|
@@ -2,13 +2,14 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
import {
|
|
5
|
+
import { TypedEventEmitter } from "@fluid-internal/client-utils";
|
|
6
|
+
import { IDocumentDeltaConnection, IDocumentDeltaStorageService, IDocumentService, IDocumentServiceEvents, IDocumentStorageService, IResolvedUrl } from "@fluidframework/driver-definitions";
|
|
6
7
|
import { IClient } from "@fluidframework/protocol-definitions";
|
|
7
8
|
/**
|
|
8
9
|
* This abstract class implements IDocumentService interface. It uses delegation pattern.
|
|
9
10
|
* It delegates all calls to IDocumentService implementation passed to constructor.
|
|
10
11
|
*/
|
|
11
|
-
export declare abstract class DocumentServiceProxy implements IDocumentService {
|
|
12
|
+
export declare abstract class DocumentServiceProxy extends TypedEventEmitter<IDocumentServiceEvents> implements IDocumentService {
|
|
12
13
|
private readonly _service;
|
|
13
14
|
constructor(_service: IDocumentService);
|
|
14
15
|
get service(): IDocumentService;
|
|
@@ -18,4 +19,4 @@ export declare abstract class DocumentServiceProxy implements IDocumentService {
|
|
|
18
19
|
dispose(error?: any): void;
|
|
19
20
|
get resolvedUrl(): IResolvedUrl;
|
|
20
21
|
}
|
|
21
|
-
//# sourceMappingURL=documentServiceProxy.d.
|
|
22
|
+
//# sourceMappingURL=documentServiceProxy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"documentServiceProxy.d.ts","sourceRoot":"","sources":["../src/documentServiceProxy.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EACN,wBAAwB,EACxB,4BAA4B,EAC5B,gBAAgB,EAChB,sBAAsB,EACtB,uBAAuB,EACvB,YAAY,EACZ,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,sCAAsC,CAAC;AAE/D;;;GAGG;AAEH,8BAAsB,oBACrB,SAAQ,iBAAiB,CAAC,sBAAsB,CAChD,YAAW,gBAAgB;IAEf,OAAO,CAAC,QAAQ,CAAC,QAAQ;gBAAR,QAAQ,EAAE,gBAAgB;IAIvD,IAAW,OAAO,IAAI,gBAAgB,CAErC;IAEY,gBAAgB,IAAI,OAAO,CAAC,uBAAuB,CAAC;IAIpD,qBAAqB,IAAI,OAAO,CAAC,4BAA4B,CAAC;IAI9D,oBAAoB,CAAC,MAAM,EAAE,OAAO,GAAG,OAAO,CAAC,wBAAwB,CAAC;IAI9E,OAAO,CAAC,KAAK,CAAC,EAAE,GAAG,GAAG,IAAI;IAIjC,IAAW,WAAW,IAAI,YAAY,CAErC;CACD"}
|
|
@@ -2,12 +2,14 @@
|
|
|
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
6
|
/**
|
|
6
7
|
* This abstract class implements IDocumentService interface. It uses delegation pattern.
|
|
7
8
|
* It delegates all calls to IDocumentService implementation passed to constructor.
|
|
8
9
|
*/
|
|
9
|
-
export class DocumentServiceProxy {
|
|
10
|
+
export class DocumentServiceProxy extends TypedEventEmitter {
|
|
10
11
|
constructor(_service) {
|
|
12
|
+
super();
|
|
11
13
|
this._service = _service;
|
|
12
14
|
}
|
|
13
15
|
get service() {
|
|
@@ -29,4 +31,4 @@ export class DocumentServiceProxy {
|
|
|
29
31
|
return this._service.resolvedUrl;
|
|
30
32
|
}
|
|
31
33
|
}
|
|
32
|
-
//# sourceMappingURL=documentServiceProxy.
|
|
34
|
+
//# sourceMappingURL=documentServiceProxy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"documentServiceProxy.js","sourceRoot":"","sources":["../src/documentServiceProxy.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAWjE;;;GAGG;AAEH,MAAM,OAAgB,oBACrB,SAAQ,iBAAyC;IAGjD,YAA6B,QAA0B;QACtD,KAAK,EAAE,CAAC;QADoB,aAAQ,GAAR,QAAQ,CAAkB;IAEvD,CAAC;IAED,IAAW,OAAO;QACjB,OAAO,IAAI,CAAC,QAAQ,CAAC;IACtB,CAAC;IAEM,KAAK,CAAC,gBAAgB;QAC5B,OAAO,IAAI,CAAC,QAAQ,CAAC,gBAAgB,EAAE,CAAC;IACzC,CAAC;IAEM,KAAK,CAAC,qBAAqB;QACjC,OAAO,IAAI,CAAC,QAAQ,CAAC,qBAAqB,EAAE,CAAC;IAC9C,CAAC;IAEM,KAAK,CAAC,oBAAoB,CAAC,MAAe;QAChD,OAAO,IAAI,CAAC,QAAQ,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC;IACnD,CAAC;IAEM,OAAO,CAAC,KAAW;QACzB,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IAC9B,CAAC;IAED,IAAW,WAAW;QACrB,OAAO,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC;IAClC,CAAC;CACD","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { TypedEventEmitter } from \"@fluid-internal/client-utils\";\nimport {\n\tIDocumentDeltaConnection,\n\tIDocumentDeltaStorageService,\n\tIDocumentService,\n\tIDocumentServiceEvents,\n\tIDocumentStorageService,\n\tIResolvedUrl,\n} from \"@fluidframework/driver-definitions\";\nimport { IClient } from \"@fluidframework/protocol-definitions\";\n\n/**\n * This abstract class implements IDocumentService interface. It uses delegation pattern.\n * It delegates all calls to IDocumentService implementation passed to constructor.\n */\n\nexport abstract class DocumentServiceProxy\n\textends TypedEventEmitter<IDocumentServiceEvents>\n\timplements IDocumentService\n{\n\tconstructor(private readonly _service: IDocumentService) {\n\t\tsuper();\n\t}\n\n\tpublic get service(): IDocumentService {\n\t\treturn this._service;\n\t}\n\n\tpublic async connectToStorage(): Promise<IDocumentStorageService> {\n\t\treturn this._service.connectToStorage();\n\t}\n\n\tpublic async connectToDeltaStorage(): Promise<IDocumentDeltaStorageService> {\n\t\treturn this._service.connectToDeltaStorage();\n\t}\n\n\tpublic async connectToDeltaStream(client: IClient): Promise<IDocumentDeltaConnection> {\n\t\treturn this._service.connectToDeltaStream(client);\n\t}\n\n\tpublic dispose(error?: any): void {\n\t\tthis._service.dispose(error);\n\t}\n\n\tpublic get resolvedUrl(): IResolvedUrl {\n\t\treturn this._service.resolvedUrl;\n\t}\n}\n"]}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
import { FetchSource, IDocumentStorageService, IDocumentStorageServicePolicies, ISummaryContext } from "@fluidframework/driver-definitions";
|
|
5
|
+
import { FetchSource, IDocumentStorageService, IDocumentStorageServicePolicies, ISnapshot, ISnapshotFetchOptions, ISummaryContext } from "@fluidframework/driver-definitions";
|
|
6
6
|
import { ICreateBlobResponse, ISnapshotTree, ISummaryHandle, ISummaryTree, IVersion } from "@fluidframework/protocol-definitions";
|
|
7
7
|
/**
|
|
8
8
|
* @internal
|
|
@@ -12,13 +12,13 @@ export declare class DocumentStorageServiceProxy implements IDocumentStorageServ
|
|
|
12
12
|
private _policies;
|
|
13
13
|
set policies(policies: IDocumentStorageServicePolicies | undefined);
|
|
14
14
|
get policies(): IDocumentStorageServicePolicies | undefined;
|
|
15
|
-
get repositoryUrl(): string;
|
|
16
15
|
constructor(internalStorageService: IDocumentStorageService);
|
|
17
16
|
getSnapshotTree(version?: IVersion, scenarioName?: string): Promise<ISnapshotTree | null>;
|
|
17
|
+
getSnapshot(snapshotFetchOptions?: ISnapshotFetchOptions): Promise<ISnapshot>;
|
|
18
18
|
getVersions(versionId: string | null, count: number, scenarioName?: string, fetchSource?: FetchSource): Promise<IVersion[]>;
|
|
19
19
|
uploadSummaryWithContext(summary: ISummaryTree, context: ISummaryContext): Promise<string>;
|
|
20
20
|
downloadSummary(handle: ISummaryHandle): Promise<ISummaryTree>;
|
|
21
21
|
createBlob(file: ArrayBufferLike): Promise<ICreateBlobResponse>;
|
|
22
22
|
readBlob(blobId: string): Promise<ArrayBufferLike>;
|
|
23
23
|
}
|
|
24
|
-
//# sourceMappingURL=documentStorageServiceProxy.d.
|
|
24
|
+
//# sourceMappingURL=documentStorageServiceProxy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"documentStorageServiceProxy.d.ts","sourceRoot":"","sources":["../src/documentStorageServiceProxy.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,WAAW,EACX,uBAAuB,EACvB,+BAA+B,EAC/B,SAAS,EACT,qBAAqB,EACrB,eAAe,EACf,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EACN,mBAAmB,EACnB,aAAa,EACb,cAAc,EACd,YAAY,EACZ,QAAQ,EACR,MAAM,sCAAsC,CAAC;AAG9C;;GAEG;AACH,qBAAa,2BAA4B,YAAW,uBAAuB;IAW9D,SAAS,CAAC,QAAQ,CAAC,sBAAsB,EAAE,uBAAuB;IAV9E,OAAO,CAAC,SAAS,CAA8C;IAE/D,IAAW,QAAQ,CAAC,QAAQ,EAAE,+BAA+B,GAAG,SAAS,EAExE;IAED,IAAW,QAAQ,IAJW,+BAA+B,GAAG,SAAS,CAMxE;gBAE8B,sBAAsB,EAAE,uBAAuB;IAEjE,eAAe,CAC3B,OAAO,CAAC,EAAE,QAAQ,EAClB,YAAY,CAAC,EAAE,MAAM,GACnB,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC;IAInB,WAAW,CAAC,oBAAoB,CAAC,EAAE,qBAAqB,GAAG,OAAO,CAAC,SAAS,CAAC;IAS7E,WAAW,CACvB,SAAS,EAAE,MAAM,GAAG,IAAI,EACxB,KAAK,EAAE,MAAM,EACb,YAAY,CAAC,EAAE,MAAM,EACrB,WAAW,CAAC,EAAE,WAAW,GACvB,OAAO,CAAC,QAAQ,EAAE,CAAC;IAIT,wBAAwB,CACpC,OAAO,EAAE,YAAY,EACrB,OAAO,EAAE,eAAe,GACtB,OAAO,CAAC,MAAM,CAAC;IAIL,eAAe,CAAC,MAAM,EAAE,cAAc,GAAG,OAAO,CAAC,YAAY,CAAC;IAI9D,UAAU,CAAC,IAAI,EAAE,eAAe,GAAG,OAAO,CAAC,mBAAmB,CAAC;IAI/D,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC;CAG/D"}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
+
import { UsageError } from "@fluidframework/telemetry-utils";
|
|
5
6
|
/**
|
|
6
7
|
* @internal
|
|
7
8
|
*/
|
|
@@ -12,15 +13,18 @@ export class DocumentStorageServiceProxy {
|
|
|
12
13
|
get policies() {
|
|
13
14
|
return this._policies ?? this.internalStorageService.policies;
|
|
14
15
|
}
|
|
15
|
-
get repositoryUrl() {
|
|
16
|
-
return this.internalStorageService.repositoryUrl;
|
|
17
|
-
}
|
|
18
16
|
constructor(internalStorageService) {
|
|
19
17
|
this.internalStorageService = internalStorageService;
|
|
20
18
|
}
|
|
21
19
|
async getSnapshotTree(version, scenarioName) {
|
|
22
20
|
return this.internalStorageService.getSnapshotTree(version, scenarioName);
|
|
23
21
|
}
|
|
22
|
+
async getSnapshot(snapshotFetchOptions) {
|
|
23
|
+
if (this.internalStorageService.getSnapshot !== undefined) {
|
|
24
|
+
return this.internalStorageService.getSnapshot(snapshotFetchOptions);
|
|
25
|
+
}
|
|
26
|
+
throw new UsageError("getSnapshot api should exist on internal storage in documentStorageServiceProxy class");
|
|
27
|
+
}
|
|
24
28
|
async getVersions(versionId, count, scenarioName, fetchSource) {
|
|
25
29
|
return this.internalStorageService.getVersions(versionId, count, scenarioName, fetchSource);
|
|
26
30
|
}
|
|
@@ -37,4 +41,4 @@ export class DocumentStorageServiceProxy {
|
|
|
37
41
|
return this.internalStorageService.readBlob(blobId);
|
|
38
42
|
}
|
|
39
43
|
}
|
|
40
|
-
//# sourceMappingURL=documentStorageServiceProxy.
|
|
44
|
+
//# sourceMappingURL=documentStorageServiceProxy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"documentStorageServiceProxy.js","sourceRoot":"","sources":["../src/documentStorageServiceProxy.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAiBH,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAE7D;;GAEG;AACH,MAAM,OAAO,2BAA2B;IAGvC,IAAW,QAAQ,CAAC,QAAqD;QACxE,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;IAC3B,CAAC;IAED,IAAW,QAAQ;QAClB,OAAO,IAAI,CAAC,SAAS,IAAI,IAAI,CAAC,sBAAsB,CAAC,QAAQ,CAAC;IAC/D,CAAC;IAED,YAA+B,sBAA+C;QAA/C,2BAAsB,GAAtB,sBAAsB,CAAyB;IAAG,CAAC;IAE3E,KAAK,CAAC,eAAe,CAC3B,OAAkB,EAClB,YAAqB;QAErB,OAAO,IAAI,CAAC,sBAAsB,CAAC,eAAe,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC;IAC3E,CAAC;IAEM,KAAK,CAAC,WAAW,CAAC,oBAA4C;QACpE,IAAI,IAAI,CAAC,sBAAsB,CAAC,WAAW,KAAK,SAAS,EAAE;YAC1D,OAAO,IAAI,CAAC,sBAAsB,CAAC,WAAW,CAAC,oBAAoB,CAAC,CAAC;SACrE;QACD,MAAM,IAAI,UAAU,CACnB,uFAAuF,CACvF,CAAC;IACH,CAAC;IAEM,KAAK,CAAC,WAAW,CACvB,SAAwB,EACxB,KAAa,EACb,YAAqB,EACrB,WAAyB;QAEzB,OAAO,IAAI,CAAC,sBAAsB,CAAC,WAAW,CAAC,SAAS,EAAE,KAAK,EAAE,YAAY,EAAE,WAAW,CAAC,CAAC;IAC7F,CAAC;IAEM,KAAK,CAAC,wBAAwB,CACpC,OAAqB,EACrB,OAAwB;QAExB,OAAO,IAAI,CAAC,sBAAsB,CAAC,wBAAwB,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IAC/E,CAAC;IAEM,KAAK,CAAC,eAAe,CAAC,MAAsB;QAClD,OAAO,IAAI,CAAC,sBAAsB,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;IAC5D,CAAC;IAEM,KAAK,CAAC,UAAU,CAAC,IAAqB;QAC5C,OAAO,IAAI,CAAC,sBAAsB,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;IACrD,CAAC;IAEM,KAAK,CAAC,QAAQ,CAAC,MAAc;QACnC,OAAO,IAAI,CAAC,sBAAsB,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;IACrD,CAAC;CACD","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport {\n\tFetchSource,\n\tIDocumentStorageService,\n\tIDocumentStorageServicePolicies,\n\tISnapshot,\n\tISnapshotFetchOptions,\n\tISummaryContext,\n} from \"@fluidframework/driver-definitions\";\nimport {\n\tICreateBlobResponse,\n\tISnapshotTree,\n\tISummaryHandle,\n\tISummaryTree,\n\tIVersion,\n} from \"@fluidframework/protocol-definitions\";\nimport { UsageError } from \"@fluidframework/telemetry-utils\";\n\n/**\n * @internal\n */\nexport class DocumentStorageServiceProxy implements IDocumentStorageService {\n\tprivate _policies: IDocumentStorageServicePolicies | undefined;\n\n\tpublic set policies(policies: IDocumentStorageServicePolicies | undefined) {\n\t\tthis._policies = policies;\n\t}\n\n\tpublic get policies() {\n\t\treturn this._policies ?? this.internalStorageService.policies;\n\t}\n\n\tconstructor(protected readonly internalStorageService: IDocumentStorageService) {}\n\n\tpublic async getSnapshotTree(\n\t\tversion?: IVersion,\n\t\tscenarioName?: string,\n\t): Promise<ISnapshotTree | null> {\n\t\treturn this.internalStorageService.getSnapshotTree(version, scenarioName);\n\t}\n\n\tpublic async getSnapshot(snapshotFetchOptions?: ISnapshotFetchOptions): Promise<ISnapshot> {\n\t\tif (this.internalStorageService.getSnapshot !== undefined) {\n\t\t\treturn this.internalStorageService.getSnapshot(snapshotFetchOptions);\n\t\t}\n\t\tthrow new UsageError(\n\t\t\t\"getSnapshot api should exist on internal storage in documentStorageServiceProxy class\",\n\t\t);\n\t}\n\n\tpublic async getVersions(\n\t\tversionId: string | null,\n\t\tcount: number,\n\t\tscenarioName?: string,\n\t\tfetchSource?: FetchSource,\n\t): Promise<IVersion[]> {\n\t\treturn this.internalStorageService.getVersions(versionId, count, scenarioName, fetchSource);\n\t}\n\n\tpublic async uploadSummaryWithContext(\n\t\tsummary: ISummaryTree,\n\t\tcontext: ISummaryContext,\n\t): Promise<string> {\n\t\treturn this.internalStorageService.uploadSummaryWithContext(summary, context);\n\t}\n\n\tpublic async downloadSummary(handle: ISummaryHandle): Promise<ISummaryTree> {\n\t\treturn this.internalStorageService.downloadSummary(handle);\n\t}\n\n\tpublic async createBlob(file: ArrayBufferLike): Promise<ICreateBlobResponse> {\n\t\treturn this.internalStorageService.createBlob(file);\n\t}\n\n\tpublic async readBlob(blobId: string): Promise<ArrayBufferLike> {\n\t\treturn this.internalStorageService.readBlob(blobId);\n\t}\n}\n"]}
|
|
@@ -16,15 +16,17 @@ import { ILocationRedirectionError } from '@fluidframework/driver-definitions';
|
|
|
16
16
|
import { IRequest } from '@fluidframework/core-interfaces';
|
|
17
17
|
import { IResolvedUrl } from '@fluidframework/driver-definitions';
|
|
18
18
|
import { ISequencedDocumentMessage } from '@fluidframework/protocol-definitions';
|
|
19
|
+
import { ISnapshot } from '@fluidframework/driver-definitions';
|
|
20
|
+
import { ISnapshotFetchOptions } from '@fluidframework/driver-definitions';
|
|
19
21
|
import { ISnapshotTree } from '@fluidframework/protocol-definitions';
|
|
20
22
|
import { IStream } from '@fluidframework/driver-definitions';
|
|
21
23
|
import { IStreamResult } from '@fluidframework/driver-definitions';
|
|
22
24
|
import { ISummaryContext } from '@fluidframework/driver-definitions';
|
|
23
25
|
import { ISummaryHandle } from '@fluidframework/protocol-definitions';
|
|
24
26
|
import { ISummaryTree } from '@fluidframework/protocol-definitions';
|
|
25
|
-
import {
|
|
27
|
+
import { ITelemetryBaseProperties } from '@fluidframework/core-interfaces';
|
|
28
|
+
import { ITelemetryErrorEventExt } from '@fluidframework/telemetry-utils';
|
|
26
29
|
import { ITelemetryLoggerExt } from '@fluidframework/telemetry-utils';
|
|
27
|
-
import { ITelemetryProperties } from '@fluidframework/core-interfaces';
|
|
28
30
|
import { IThrottlingWarning } from '@fluidframework/driver-definitions';
|
|
29
31
|
import { ITree } from '@fluidframework/protocol-definitions';
|
|
30
32
|
import { ITreeEntry } from '@fluidframework/protocol-definitions';
|
|
@@ -97,6 +99,8 @@ export declare interface ICompressionStorageConfig {
|
|
|
97
99
|
|
|
98
100
|
/* Excluded from this release type: isCombinedAppAndProtocolSummary */
|
|
99
101
|
|
|
102
|
+
/* Excluded from this release type: isInstanceOfISnapshot */
|
|
103
|
+
|
|
100
104
|
/* Excluded from this release type: isOnline */
|
|
101
105
|
|
|
102
106
|
/* Excluded from this release type: isRuntimeMessage */
|
|
@@ -16,15 +16,17 @@ import { ILocationRedirectionError } from '@fluidframework/driver-definitions';
|
|
|
16
16
|
import { IRequest } from '@fluidframework/core-interfaces';
|
|
17
17
|
import { IResolvedUrl } from '@fluidframework/driver-definitions';
|
|
18
18
|
import { ISequencedDocumentMessage } from '@fluidframework/protocol-definitions';
|
|
19
|
+
import { ISnapshot } from '@fluidframework/driver-definitions';
|
|
20
|
+
import { ISnapshotFetchOptions } from '@fluidframework/driver-definitions';
|
|
19
21
|
import { ISnapshotTree } from '@fluidframework/protocol-definitions';
|
|
20
22
|
import { IStream } from '@fluidframework/driver-definitions';
|
|
21
23
|
import { IStreamResult } from '@fluidframework/driver-definitions';
|
|
22
24
|
import { ISummaryContext } from '@fluidframework/driver-definitions';
|
|
23
25
|
import { ISummaryHandle } from '@fluidframework/protocol-definitions';
|
|
24
26
|
import { ISummaryTree } from '@fluidframework/protocol-definitions';
|
|
25
|
-
import {
|
|
27
|
+
import { ITelemetryBaseProperties } from '@fluidframework/core-interfaces';
|
|
28
|
+
import { ITelemetryErrorEventExt } from '@fluidframework/telemetry-utils';
|
|
26
29
|
import { ITelemetryLoggerExt } from '@fluidframework/telemetry-utils';
|
|
27
|
-
import { ITelemetryProperties } from '@fluidframework/core-interfaces';
|
|
28
30
|
import { IThrottlingWarning } from '@fluidframework/driver-definitions';
|
|
29
31
|
import { ITree } from '@fluidframework/protocol-definitions';
|
|
30
32
|
import { ITreeEntry } from '@fluidframework/protocol-definitions';
|
|
@@ -111,6 +113,12 @@ export declare interface ICompressionStorageConfig {
|
|
|
111
113
|
|
|
112
114
|
/* Excluded from this release type: isCombinedAppAndProtocolSummary */
|
|
113
115
|
|
|
116
|
+
/* Excluded from this release type: isInstanceOfISnapshot */
|
|
117
|
+
|
|
118
|
+
/* Excluded from this release type: ISnapshot */
|
|
119
|
+
|
|
120
|
+
/* Excluded from this release type: ISnapshotFetchOptions */
|
|
121
|
+
|
|
114
122
|
/* Excluded from this release type: isOnline */
|
|
115
123
|
|
|
116
124
|
/* Excluded from this release type: isRuntimeMessage */
|
|
@@ -16,15 +16,17 @@ import { ILocationRedirectionError } from '@fluidframework/driver-definitions';
|
|
|
16
16
|
import { IRequest } from '@fluidframework/core-interfaces';
|
|
17
17
|
import { IResolvedUrl } from '@fluidframework/driver-definitions';
|
|
18
18
|
import { ISequencedDocumentMessage } from '@fluidframework/protocol-definitions';
|
|
19
|
+
import { ISnapshot } from '@fluidframework/driver-definitions';
|
|
20
|
+
import { ISnapshotFetchOptions } from '@fluidframework/driver-definitions';
|
|
19
21
|
import { ISnapshotTree } from '@fluidframework/protocol-definitions';
|
|
20
22
|
import { IStream } from '@fluidframework/driver-definitions';
|
|
21
23
|
import { IStreamResult } from '@fluidframework/driver-definitions';
|
|
22
24
|
import { ISummaryContext } from '@fluidframework/driver-definitions';
|
|
23
25
|
import { ISummaryHandle } from '@fluidframework/protocol-definitions';
|
|
24
26
|
import { ISummaryTree } from '@fluidframework/protocol-definitions';
|
|
25
|
-
import {
|
|
27
|
+
import { ITelemetryBaseProperties } from '@fluidframework/core-interfaces';
|
|
28
|
+
import { ITelemetryErrorEventExt } from '@fluidframework/telemetry-utils';
|
|
26
29
|
import { ITelemetryLoggerExt } from '@fluidframework/telemetry-utils';
|
|
27
|
-
import { ITelemetryProperties } from '@fluidframework/core-interfaces';
|
|
28
30
|
import { IThrottlingWarning } from '@fluidframework/driver-definitions';
|
|
29
31
|
import { ITree } from '@fluidframework/protocol-definitions';
|
|
30
32
|
import { ITreeEntry } from '@fluidframework/protocol-definitions';
|
|
@@ -111,6 +113,12 @@ export declare interface ICompressionStorageConfig {
|
|
|
111
113
|
|
|
112
114
|
/* Excluded from this release type: isCombinedAppAndProtocolSummary */
|
|
113
115
|
|
|
116
|
+
/* Excluded from this release type: isInstanceOfISnapshot */
|
|
117
|
+
|
|
118
|
+
/* Excluded from this release type: ISnapshot */
|
|
119
|
+
|
|
120
|
+
/* Excluded from this release type: ISnapshotFetchOptions */
|
|
121
|
+
|
|
114
122
|
/* Excluded from this release type: isOnline */
|
|
115
123
|
|
|
116
124
|
/* Excluded from this release type: isRuntimeMessage */
|
|
@@ -16,15 +16,17 @@ import { ILocationRedirectionError } from '@fluidframework/driver-definitions';
|
|
|
16
16
|
import { IRequest } from '@fluidframework/core-interfaces';
|
|
17
17
|
import { IResolvedUrl } from '@fluidframework/driver-definitions';
|
|
18
18
|
import { ISequencedDocumentMessage } from '@fluidframework/protocol-definitions';
|
|
19
|
+
import { ISnapshot } from '@fluidframework/driver-definitions';
|
|
20
|
+
import { ISnapshotFetchOptions } from '@fluidframework/driver-definitions';
|
|
19
21
|
import { ISnapshotTree } from '@fluidframework/protocol-definitions';
|
|
20
22
|
import { IStream } from '@fluidframework/driver-definitions';
|
|
21
23
|
import { IStreamResult } from '@fluidframework/driver-definitions';
|
|
22
24
|
import { ISummaryContext } from '@fluidframework/driver-definitions';
|
|
23
25
|
import { ISummaryHandle } from '@fluidframework/protocol-definitions';
|
|
24
26
|
import { ISummaryTree } from '@fluidframework/protocol-definitions';
|
|
25
|
-
import {
|
|
27
|
+
import { ITelemetryBaseProperties } from '@fluidframework/core-interfaces';
|
|
28
|
+
import { ITelemetryErrorEventExt } from '@fluidframework/telemetry-utils';
|
|
26
29
|
import { ITelemetryLoggerExt } from '@fluidframework/telemetry-utils';
|
|
27
|
-
import { ITelemetryProperties } from '@fluidframework/core-interfaces';
|
|
28
30
|
import { IThrottlingWarning } from '@fluidframework/driver-definitions';
|
|
29
31
|
import { ITree } from '@fluidframework/protocol-definitions';
|
|
30
32
|
import { ITreeEntry } from '@fluidframework/protocol-definitions';
|
|
@@ -67,7 +69,7 @@ export declare class AttachmentTreeEntry {
|
|
|
67
69
|
export declare class AuthorizationError extends LoggingError implements IAuthorizationError, IFluidErrorBase {
|
|
68
70
|
readonly claims: string | undefined;
|
|
69
71
|
readonly tenantId: string | undefined;
|
|
70
|
-
readonly errorType
|
|
72
|
+
readonly errorType: "authorizationError";
|
|
71
73
|
readonly canRetry = false;
|
|
72
74
|
constructor(message: string, claims: string | undefined, tenantId: string | undefined, props: DriverErrorTelemetryProps);
|
|
73
75
|
}
|
|
@@ -168,8 +170,8 @@ export declare const createWriteError: (message: string, props: DriverErrorTelem
|
|
|
168
170
|
* @internal
|
|
169
171
|
*/
|
|
170
172
|
export declare class DeltaStreamConnectionForbiddenError extends LoggingError implements IDriverErrorBase, IFluidErrorBase {
|
|
171
|
-
static readonly errorType
|
|
172
|
-
readonly errorType
|
|
173
|
+
static readonly errorType: "deltaStreamConnectionForbidden";
|
|
174
|
+
readonly errorType: "deltaStreamConnectionForbidden";
|
|
173
175
|
readonly canRetry = false;
|
|
174
176
|
readonly storageOnlyReason: string | undefined;
|
|
175
177
|
constructor(message: string, props: DriverErrorTelemetryProps, storageOnlyReason?: string);
|
|
@@ -183,9 +185,9 @@ export declare class DocumentStorageServiceProxy implements IDocumentStorageServ
|
|
|
183
185
|
private _policies;
|
|
184
186
|
set policies(policies: IDocumentStorageServicePolicies | undefined);
|
|
185
187
|
get policies(): IDocumentStorageServicePolicies | undefined;
|
|
186
|
-
get repositoryUrl(): string;
|
|
187
188
|
constructor(internalStorageService: IDocumentStorageService);
|
|
188
189
|
getSnapshotTree(version?: IVersion, scenarioName?: string): Promise<ISnapshotTree | null>;
|
|
190
|
+
getSnapshot(snapshotFetchOptions?: ISnapshotFetchOptions): Promise<ISnapshot>;
|
|
189
191
|
getVersions(versionId: string | null, count: number, scenarioName?: string, fetchSource?: FetchSource): Promise<IVersion[]>;
|
|
190
192
|
uploadSummaryWithContext(summary: ISummaryTree, context: ISummaryContext): Promise<string>;
|
|
191
193
|
downloadSummary(handle: ISummaryHandle): Promise<ISummaryTree>;
|
|
@@ -197,7 +199,7 @@ export declare class DocumentStorageServiceProxy implements IDocumentStorageServ
|
|
|
197
199
|
* Telemetry props with driver-specific required properties
|
|
198
200
|
* @internal
|
|
199
201
|
*/
|
|
200
|
-
export declare type DriverErrorTelemetryProps =
|
|
202
|
+
export declare type DriverErrorTelemetryProps = ITelemetryBaseProperties & {
|
|
201
203
|
driverVersion: string | undefined;
|
|
202
204
|
};
|
|
203
205
|
|
|
@@ -211,7 +213,7 @@ export declare const emptyMessageStream: IStream<ISequencedDocumentMessage[]>;
|
|
|
211
213
|
* @internal
|
|
212
214
|
*/
|
|
213
215
|
export declare class FluidInvalidSchemaError extends LoggingError implements IDriverErrorBase, IFluidErrorBase {
|
|
214
|
-
readonly errorType
|
|
216
|
+
readonly errorType: "fluidInvalidSchema";
|
|
215
217
|
readonly canRetry = false;
|
|
216
218
|
constructor(message: string, props: DriverErrorTelemetryProps);
|
|
217
219
|
}
|
|
@@ -222,7 +224,10 @@ export declare class FluidInvalidSchemaError extends LoggingError implements IDr
|
|
|
222
224
|
*/
|
|
223
225
|
export declare class GenericNetworkError extends LoggingError implements IDriverErrorBase, IFluidErrorBase {
|
|
224
226
|
readonly canRetry: boolean;
|
|
225
|
-
|
|
227
|
+
/**
|
|
228
|
+
* {@inheritDoc @fluidframework/telemetry-utils#IFluidErrorBase.errorType}
|
|
229
|
+
*/
|
|
230
|
+
readonly errorType: "genericNetworkError";
|
|
226
231
|
constructor(message: string, canRetry: boolean, props: DriverErrorTelemetryProps);
|
|
227
232
|
}
|
|
228
233
|
|
|
@@ -268,7 +273,7 @@ export declare interface ICompressionStorageConfig {
|
|
|
268
273
|
* http://localhost:8080/<documentId>/<path>.
|
|
269
274
|
*
|
|
270
275
|
* We then need to map that to a Fluid based URL. These are of the form
|
|
271
|
-
*
|
|
276
|
+
* https://orderingUrl/<tenantId>/<documentId>/<path>.
|
|
272
277
|
*
|
|
273
278
|
* The tenantId/documentId pair defines the 'full' document ID the service makes use of. The path is then an optional
|
|
274
279
|
* part of the URL that the document interprets and maps to a data store. It's exactly similar to how a web service
|
|
@@ -279,11 +284,12 @@ export declare class InsecureUrlResolver implements IUrlResolver {
|
|
|
279
284
|
private readonly hostUrl;
|
|
280
285
|
private readonly ordererUrl;
|
|
281
286
|
private readonly storageUrl;
|
|
287
|
+
private readonly deltaStreamUrl;
|
|
282
288
|
private readonly tenantId;
|
|
283
289
|
private readonly bearer;
|
|
284
290
|
private readonly isForNodeTest;
|
|
285
291
|
private readonly cache;
|
|
286
|
-
constructor(hostUrl: string, ordererUrl: string, storageUrl: string, tenantId: string, bearer: string, isForNodeTest?: boolean);
|
|
292
|
+
constructor(hostUrl: string, ordererUrl: string, storageUrl: string, deltaStreamUrl: string, tenantId: string, bearer: string, isForNodeTest?: boolean);
|
|
287
293
|
resolve(request: IRequest): Promise<IResolvedUrl | undefined>;
|
|
288
294
|
private resolveHelper;
|
|
289
295
|
getAbsoluteUrl(resolvedUrl: IResolvedUrl, relativeUrl: string): Promise<string>;
|
|
@@ -329,6 +335,13 @@ export declare interface IProgress {
|
|
|
329
335
|
*/
|
|
330
336
|
export declare function isCombinedAppAndProtocolSummary(summary: ISummaryTree | undefined, ...optionalRootTrees: string[]): summary is CombinedAppAndProtocolSummary;
|
|
331
337
|
|
|
338
|
+
/**
|
|
339
|
+
* Utility API to check if the type of snapshot contents is `ISnapshot`.
|
|
340
|
+
* @internal
|
|
341
|
+
* @param obj - obj whose type needs to be identified.
|
|
342
|
+
*/
|
|
343
|
+
export declare function isInstanceOfISnapshot(obj: ISnapshotTree | ISnapshot | undefined): obj is ISnapshot;
|
|
344
|
+
|
|
332
345
|
/**
|
|
333
346
|
* It tells if we have local connection only - we might not have connection to web.
|
|
334
347
|
* No solution for node.js (other than resolve dns names / ping specific sites)
|
|
@@ -352,7 +365,7 @@ export declare function isRuntimeMessage(message: {
|
|
|
352
365
|
*/
|
|
353
366
|
export declare class LocationRedirectionError extends LoggingError implements ILocationRedirectionError, IFluidErrorBase {
|
|
354
367
|
readonly redirectUrl: IResolvedUrl;
|
|
355
|
-
readonly errorType
|
|
368
|
+
readonly errorType: "locationRedirection";
|
|
356
369
|
readonly canRetry = false;
|
|
357
370
|
constructor(message: string, redirectUrl: IResolvedUrl, props: DriverErrorTelemetryProps);
|
|
358
371
|
}
|
|
@@ -360,7 +373,7 @@ export declare class LocationRedirectionError extends LoggingError implements IL
|
|
|
360
373
|
/**
|
|
361
374
|
* @internal
|
|
362
375
|
*/
|
|
363
|
-
export declare function logNetworkFailure(logger: ITelemetryLoggerExt, event:
|
|
376
|
+
export declare function logNetworkFailure(logger: ITelemetryLoggerExt, event: ITelemetryErrorEventExt, error?: any): void;
|
|
364
377
|
|
|
365
378
|
/**
|
|
366
379
|
* @privateRemarks ADO #1385: staging code changes across layers.
|
|
@@ -426,7 +439,7 @@ export declare class ParallelRequests<T> {
|
|
|
426
439
|
private readonly knewTo;
|
|
427
440
|
private get working();
|
|
428
441
|
get canceled(): boolean;
|
|
429
|
-
constructor(from: number, to: number | undefined, payloadSize: number, logger: ITelemetryLoggerExt, requestCallback: (request: number, from: number, to: number, strongTo: boolean, props:
|
|
442
|
+
constructor(from: number, to: number | undefined, payloadSize: number, logger: ITelemetryLoggerExt, requestCallback: (request: number, from: number, to: number, strongTo: boolean, props: ITelemetryBaseProperties) => Promise<{
|
|
430
443
|
partial: boolean;
|
|
431
444
|
cancel: boolean;
|
|
432
445
|
payload: T[];
|
|
@@ -516,7 +529,7 @@ export declare function readAndParse<T>(storage: Pick<IDocumentStorageService, "
|
|
|
516
529
|
* @returns Messages fetched
|
|
517
530
|
* @internal
|
|
518
531
|
*/
|
|
519
|
-
export declare function requestOps(get: (from: number, to: number, telemetryProps:
|
|
532
|
+
export declare function requestOps(get: (from: number, to: number, telemetryProps: ITelemetryBaseProperties) => Promise<IDeltasFetchResult>, concurrency: number, fromTotal: number, toTotal: number | undefined, payloadSize: number, logger: ITelemetryLoggerExt, signal?: AbortSignal, scenarioName?: string): IStream<ISequencedDocumentMessage[]>;
|
|
520
533
|
|
|
521
534
|
/**
|
|
522
535
|
* @internal
|
|
@@ -555,7 +568,7 @@ export declare enum SummaryCompressionAlgorithm {
|
|
|
555
568
|
*/
|
|
556
569
|
export declare class ThrottlingError extends LoggingError implements IThrottlingWarning, IFluidErrorBase {
|
|
557
570
|
readonly retryAfterSeconds: number;
|
|
558
|
-
readonly errorType
|
|
571
|
+
readonly errorType: "throttlingError";
|
|
559
572
|
readonly canRetry = true;
|
|
560
573
|
constructor(message: string, retryAfterSeconds: number, props: DriverErrorTelemetryProps);
|
|
561
574
|
}
|
|
@@ -582,7 +595,7 @@ export declare class TreeTreeEntry {
|
|
|
582
595
|
* @internal
|
|
583
596
|
*/
|
|
584
597
|
export declare class UsageError extends LoggingError implements IDriverErrorBase, IFluidErrorBase {
|
|
585
|
-
readonly errorType
|
|
598
|
+
readonly errorType: "usageError";
|
|
586
599
|
readonly canRetry = false;
|
|
587
600
|
constructor(message: string);
|
|
588
601
|
}
|
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
import {
|
|
5
|
+
import { IDriverErrorBase } from "@fluidframework/driver-definitions";
|
|
6
6
|
import { IFluidErrorBase, LoggingError } from "@fluidframework/telemetry-utils";
|
|
7
7
|
/**
|
|
8
8
|
* Error indicating an API is being used improperly resulting in an invalid operation.
|
|
9
9
|
* @internal
|
|
10
10
|
*/
|
|
11
11
|
export declare class UsageError extends LoggingError implements IDriverErrorBase, IFluidErrorBase {
|
|
12
|
-
readonly errorType
|
|
12
|
+
readonly errorType: "usageError";
|
|
13
13
|
readonly canRetry = false;
|
|
14
14
|
constructor(message: string);
|
|
15
15
|
}
|
|
16
|
-
//# sourceMappingURL=error.d.
|
|
16
|
+
//# sourceMappingURL=error.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../src/error.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAoB,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AACxF,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAEhF;;;GAGG;AACH,qBAAa,UAAW,SAAQ,YAAa,YAAW,gBAAgB,EAAE,eAAe;IACxF,QAAQ,CAAC,SAAS,eAA+B;IACjD,QAAQ,CAAC,QAAQ,SAAS;gBAEd,OAAO,EAAE,MAAM;CAG3B"}
|
|
@@ -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 {
|
|
5
|
+
import { DriverErrorTypes } from "@fluidframework/driver-definitions";
|
|
6
6
|
import { LoggingError } from "@fluidframework/telemetry-utils";
|
|
7
7
|
/**
|
|
8
8
|
* Error indicating an API is being used improperly resulting in an invalid operation.
|
|
@@ -11,9 +11,8 @@ import { LoggingError } from "@fluidframework/telemetry-utils";
|
|
|
11
11
|
export class UsageError extends LoggingError {
|
|
12
12
|
constructor(message) {
|
|
13
13
|
super(message, { usageError: true });
|
|
14
|
-
|
|
15
|
-
this.errorType = DriverErrorType.usageError;
|
|
14
|
+
this.errorType = DriverErrorTypes.usageError;
|
|
16
15
|
this.canRetry = false;
|
|
17
16
|
}
|
|
18
17
|
}
|
|
19
|
-
//# sourceMappingURL=error.
|
|
18
|
+
//# sourceMappingURL=error.js.map
|
package/lib/error.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"error.js","sourceRoot":"","sources":["../src/error.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,gBAAgB,EAAoB,MAAM,oCAAoC,CAAC;AACxF,OAAO,EAAmB,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAEhF;;;GAGG;AACH,MAAM,OAAO,UAAW,SAAQ,YAAY;IAI3C,YAAY,OAAe;QAC1B,KAAK,CAAC,OAAO,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC,CAAC;QAJ7B,cAAS,GAAG,gBAAgB,CAAC,UAAU,CAAC;QACxC,aAAQ,GAAG,KAAK,CAAC;IAI1B,CAAC;CACD","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { DriverErrorTypes, IDriverErrorBase } from \"@fluidframework/driver-definitions\";\nimport { IFluidErrorBase, LoggingError } from \"@fluidframework/telemetry-utils\";\n\n/**\n * Error indicating an API is being used improperly resulting in an invalid operation.\n * @internal\n */\nexport class UsageError extends LoggingError implements IDriverErrorBase, IFluidErrorBase {\n\treadonly errorType = DriverErrorTypes.usageError;\n\treadonly canRetry = false;\n\n\tconstructor(message: string) {\n\t\tsuper(message, { usageError: true });\n\t}\n}\n"]}
|