@fluidframework/driver-utils 2.0.0-internal.3.0.5 → 2.0.0-internal.3.1.1
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 +17 -19
- package/.mocharc.js +2 -2
- package/api-extractor.json +2 -2
- package/dist/blobAggregationStorage.d.ts +2 -2
- package/dist/blobAggregationStorage.d.ts.map +1 -1
- package/dist/blobAggregationStorage.js +11 -6
- package/dist/blobAggregationStorage.js.map +1 -1
- package/dist/blobCacheStorageService.d.ts.map +1 -1
- package/dist/blobCacheStorageService.js.map +1 -1
- package/dist/buildSnapshotTree.d.ts.map +1 -1
- package/dist/buildSnapshotTree.js.map +1 -1
- package/dist/documentStorageServiceProxy.d.ts.map +1 -1
- package/dist/documentStorageServiceProxy.js.map +1 -1
- package/dist/emptyDocumentDeltaStorageService.d.ts.map +1 -1
- package/dist/emptyDocumentDeltaStorageService.js.map +1 -1
- package/dist/error.d.ts.map +1 -1
- package/dist/error.js.map +1 -1
- package/dist/fluidResolvedUrl.d.ts.map +1 -1
- package/dist/fluidResolvedUrl.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/insecureUrlResolver.d.ts.map +1 -1
- package/dist/insecureUrlResolver.js +2 -1
- package/dist/insecureUrlResolver.js.map +1 -1
- package/dist/mapWithExpiration.d.ts.map +1 -1
- package/dist/mapWithExpiration.js +5 -3
- package/dist/mapWithExpiration.js.map +1 -1
- package/dist/messageRecognition.d.ts.map +1 -1
- package/dist/messageRecognition.js.map +1 -1
- package/dist/multiDocumentServiceFactory.d.ts.map +1 -1
- package/dist/multiDocumentServiceFactory.js.map +1 -1
- package/dist/multiUrlResolver.d.ts.map +1 -1
- package/dist/multiUrlResolver.js.map +1 -1
- package/dist/network.d.ts +1 -1
- package/dist/network.d.ts.map +1 -1
- package/dist/network.js +4 -3
- package/dist/network.js.map +1 -1
- package/dist/networkUtils.d.ts.map +1 -1
- package/dist/networkUtils.js +2 -3
- package/dist/networkUtils.js.map +1 -1
- 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.map +1 -1
- package/dist/parallelRequests.js +19 -9
- package/dist/parallelRequests.js.map +1 -1
- package/dist/prefetchDocumentStorageService.d.ts.map +1 -1
- package/dist/prefetchDocumentStorageService.js.map +1 -1
- package/dist/rateLimiter.d.ts.map +1 -1
- package/dist/rateLimiter.js.map +1 -1
- package/dist/readAndParse.d.ts.map +1 -1
- package/dist/readAndParse.js.map +1 -1
- package/dist/runWithRetry.d.ts.map +1 -1
- package/dist/runWithRetry.js.map +1 -1
- package/dist/summaryForCreateNew.d.ts.map +1 -1
- package/dist/summaryForCreateNew.js.map +1 -1
- package/dist/treeConversions.d.ts.map +1 -1
- package/dist/treeConversions.js +1 -4
- package/dist/treeConversions.js.map +1 -1
- package/dist/treeUtils.d.ts +10 -10
- package/dist/treeUtils.d.ts.map +1 -1
- package/dist/treeUtils.js +10 -10
- package/dist/treeUtils.js.map +1 -1
- package/lib/blobAggregationStorage.d.ts +2 -2
- package/lib/blobAggregationStorage.d.ts.map +1 -1
- package/lib/blobAggregationStorage.js +11 -6
- package/lib/blobAggregationStorage.js.map +1 -1
- package/lib/blobCacheStorageService.d.ts.map +1 -1
- package/lib/blobCacheStorageService.js.map +1 -1
- package/lib/buildSnapshotTree.d.ts.map +1 -1
- package/lib/buildSnapshotTree.js.map +1 -1
- package/lib/documentStorageServiceProxy.d.ts.map +1 -1
- package/lib/documentStorageServiceProxy.js.map +1 -1
- package/lib/emptyDocumentDeltaStorageService.d.ts.map +1 -1
- package/lib/emptyDocumentDeltaStorageService.js.map +1 -1
- package/lib/error.d.ts.map +1 -1
- package/lib/error.js.map +1 -1
- package/lib/fluidResolvedUrl.d.ts.map +1 -1
- package/lib/fluidResolvedUrl.js.map +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib/insecureUrlResolver.d.ts.map +1 -1
- package/lib/insecureUrlResolver.js +2 -1
- package/lib/insecureUrlResolver.js.map +1 -1
- package/lib/mapWithExpiration.d.ts.map +1 -1
- package/lib/mapWithExpiration.js +5 -3
- package/lib/mapWithExpiration.js.map +1 -1
- package/lib/messageRecognition.d.ts.map +1 -1
- package/lib/messageRecognition.js +1 -1
- package/lib/messageRecognition.js.map +1 -1
- package/lib/multiDocumentServiceFactory.d.ts.map +1 -1
- package/lib/multiDocumentServiceFactory.js.map +1 -1
- package/lib/multiUrlResolver.d.ts.map +1 -1
- package/lib/multiUrlResolver.js.map +1 -1
- package/lib/network.d.ts +1 -1
- package/lib/network.d.ts.map +1 -1
- package/lib/network.js +4 -3
- package/lib/network.js.map +1 -1
- package/lib/networkUtils.d.ts.map +1 -1
- package/lib/networkUtils.js +2 -3
- package/lib/networkUtils.js.map +1 -1
- package/lib/packageVersion.d.ts +1 -1
- package/lib/packageVersion.js +1 -1
- package/lib/packageVersion.js.map +1 -1
- package/lib/parallelRequests.d.ts.map +1 -1
- package/lib/parallelRequests.js +19 -9
- package/lib/parallelRequests.js.map +1 -1
- package/lib/prefetchDocumentStorageService.d.ts.map +1 -1
- package/lib/prefetchDocumentStorageService.js.map +1 -1
- package/lib/rateLimiter.d.ts.map +1 -1
- package/lib/rateLimiter.js.map +1 -1
- package/lib/readAndParse.d.ts.map +1 -1
- package/lib/readAndParse.js.map +1 -1
- package/lib/runWithRetry.d.ts.map +1 -1
- package/lib/runWithRetry.js.map +1 -1
- package/lib/summaryForCreateNew.d.ts.map +1 -1
- package/lib/summaryForCreateNew.js.map +1 -1
- package/lib/treeConversions.d.ts.map +1 -1
- package/lib/treeConversions.js +4 -7
- package/lib/treeConversions.js.map +1 -1
- package/lib/treeUtils.d.ts +10 -10
- package/lib/treeUtils.d.ts.map +1 -1
- package/lib/treeUtils.js +11 -11
- package/lib/treeUtils.js.map +1 -1
- package/package.json +128 -127
- package/prettier.config.cjs +1 -1
- package/src/blobAggregationStorage.ts +374 -322
- package/src/blobCacheStorageService.ts +20 -17
- package/src/buildSnapshotTree.ts +54 -51
- package/src/documentStorageServiceProxy.ts +49 -43
- package/src/emptyDocumentDeltaStorageService.ts +11 -10
- package/src/error.ts +5 -7
- package/src/fluidResolvedUrl.ts +9 -6
- package/src/index.ts +5 -1
- package/src/insecureUrlResolver.ts +127 -116
- package/src/mapWithExpiration.ts +111 -104
- package/src/messageRecognition.ts +25 -19
- package/src/multiDocumentServiceFactory.ts +73 -62
- package/src/multiUrlResolver.ts +26 -29
- package/src/network.ts +114 -112
- package/src/networkUtils.ts +37 -34
- package/src/packageVersion.ts +1 -1
- package/src/parallelRequests.ts +571 -509
- package/src/prefetchDocumentStorageService.ts +76 -74
- package/src/rateLimiter.ts +29 -29
- package/src/readAndParse.ts +7 -4
- package/src/runWithRetry.ts +105 -94
- package/src/summaryForCreateNew.ts +27 -24
- package/src/treeConversions.ts +48 -70
- package/src/treeUtils.ts +70 -74
- package/tsconfig.esnext.json +6 -6
- package/tsconfig.json +8 -12
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"documentStorageServiceProxy.d.ts","sourceRoot":"","sources":["../src/documentStorageServiceProxy.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,
|
|
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,eAAe,EACf,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EACN,mBAAmB,EACnB,aAAa,EACb,cAAc,EACd,YAAY,EACZ,QAAQ,EACR,MAAM,sCAAsC,CAAC;AAE9C,qBAAa,2BAA4B,YAAW,uBAAuB;IAe9D,SAAS,CAAC,QAAQ,CAAC,sBAAsB,EAAE,uBAAuB;IAd9E,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;IAED,IAAW,aAAa,IAAI,MAAM,CAEjC;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,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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"documentStorageServiceProxy.js","sourceRoot":"","sources":["../src/documentStorageServiceProxy.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAgBH,MAAM,OAAO,2BAA2B;
|
|
1
|
+
{"version":3,"file":"documentStorageServiceProxy.js","sourceRoot":"","sources":["../src/documentStorageServiceProxy.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAgBH,MAAM,OAAO,2BAA2B;IAevC,YAA+B,sBAA+C;QAA/C,2BAAsB,GAAtB,sBAAsB,CAAyB;IAAG,CAAC;IAZlF,IAAW,QAAQ,CAAC,QAAqD;QACxE,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;IAC3B,CAAC;IAED,IAAW,QAAQ;;QAClB,OAAO,MAAA,IAAI,CAAC,SAAS,mCAAI,IAAI,CAAC,sBAAsB,CAAC,QAAQ,CAAC;IAC/D,CAAC;IAED,IAAW,aAAa;QACvB,OAAO,IAAI,CAAC,sBAAsB,CAAC,aAAa,CAAC;IAClD,CAAC;IAIM,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,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\tISummaryContext,\n} from \"@fluidframework/driver-definitions\";\nimport {\n\tICreateBlobResponse,\n\tISnapshotTree,\n\tISummaryHandle,\n\tISummaryTree,\n\tIVersion,\n} from \"@fluidframework/protocol-definitions\";\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\tpublic get repositoryUrl(): string {\n\t\treturn this.internalStorageService.repositoryUrl;\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 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"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"emptyDocumentDeltaStorageService.d.ts","sourceRoot":"","sources":["../src/emptyDocumentDeltaStorageService.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,4BAA4B,EAAE,OAAO,EAAE,MAAM,oCAAoC,CAAC;AAC3F,OAAO,EAAE,yBAAyB,EAAE,MAAM,sCAAsC,CAAC;AAGjF;;GAEG;AACH,qBAAa,gCAAiC,YAAW,4BAA4B;
|
|
1
|
+
{"version":3,"file":"emptyDocumentDeltaStorageService.d.ts","sourceRoot":"","sources":["../src/emptyDocumentDeltaStorageService.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,4BAA4B,EAAE,OAAO,EAAE,MAAM,oCAAoC,CAAC;AAC3F,OAAO,EAAE,yBAAyB,EAAE,MAAM,sCAAsC,CAAC;AAGjF;;GAEG;AACH,qBAAa,gCAAiC,YAAW,4BAA4B;IAC7E,aAAa,CACnB,IAAI,EAAE,MAAM,EACZ,GAAG,EAAE,MAAM,GAAG,SAAS,EACvB,YAAY,CAAC,EAAE,WAAW,EAC1B,WAAW,CAAC,EAAE,OAAO,EACrB,YAAY,CAAC,EAAE,MAAM,GACnB,OAAO,CAAC,yBAAyB,EAAE,CAAC;CAKvC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"emptyDocumentDeltaStorageService.js","sourceRoot":"","sources":["../src/emptyDocumentDeltaStorageService.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAE3C;;GAEG;AACH,MAAM,OAAO,gCAAgC;
|
|
1
|
+
{"version":3,"file":"emptyDocumentDeltaStorageService.js","sourceRoot":"","sources":["../src/emptyDocumentDeltaStorageService.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAE3C;;GAEG;AACH,MAAM,OAAO,gCAAgC;IACrC,aAAa,CACnB,IAAY,EACZ,GAAuB,EACvB,YAA0B,EAC1B,WAAqB,EACrB,YAAqB;QAErB,MAAM,KAAK,GAAG,IAAI,KAAK,EAA+B,CAAC;QACvD,KAAK,CAAC,QAAQ,EAAE,CAAC;QACjB,OAAO,KAAK,CAAC;IACd,CAAC;CACD","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IDocumentDeltaStorageService, IStream } from \"@fluidframework/driver-definitions\";\nimport { ISequencedDocumentMessage } from \"@fluidframework/protocol-definitions\";\nimport { Queue } from \"./parallelRequests\";\n\n/**\n * Implementation of IDocumentDeltaStorageService that will always return an empty message queue when fetching messages\n */\nexport class EmptyDocumentDeltaStorageService implements IDocumentDeltaStorageService {\n\tpublic fetchMessages(\n\t\tfrom: number,\n\t\t_to: number | undefined,\n\t\t_abortSignal?: AbortSignal,\n\t\t_cachedOnly?: boolean,\n\t\t_fetchReason?: string,\n\t): IStream<ISequencedDocumentMessage[]> {\n\t\tconst queue = new Queue<ISequencedDocumentMessage[]>();\n\t\tqueue.pushDone();\n\t\treturn queue;\n\t}\n}\n"]}
|
package/lib/error.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../src/error.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AACvF,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAEhF,0FAA0F;AAC1F,qBAAa,UAAW,SAAQ,YAAa,YAAW,gBAAgB,EAAE,eAAe;
|
|
1
|
+
{"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../src/error.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AACvF,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAEhF,0FAA0F;AAC1F,qBAAa,UAAW,SAAQ,YAAa,YAAW,gBAAgB,EAAE,eAAe;IACxF,QAAQ,CAAC,SAAS,8BAA8B;IAChD,QAAQ,CAAC,QAAQ,SAAS;gBAEd,OAAO,EAAE,MAAM;CAG3B"}
|
package/lib/error.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error.js","sourceRoot":"","sources":["../src/error.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,eAAe,EAAoB,MAAM,oCAAoC,CAAC;AACvF,OAAO,EAAmB,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAEhF,0FAA0F;AAC1F,MAAM,OAAO,UAAW,SAAQ,YAAY;
|
|
1
|
+
{"version":3,"file":"error.js","sourceRoot":"","sources":["../src/error.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,eAAe,EAAoB,MAAM,oCAAoC,CAAC;AACvF,OAAO,EAAmB,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAEhF,0FAA0F;AAC1F,MAAM,OAAO,UAAW,SAAQ,YAAY;IAI3C,YAAY,OAAe;QAC1B,KAAK,CAAC,OAAO,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC,CAAC;QAJ7B,cAAS,GAAG,eAAe,CAAC,UAAU,CAAC;QACvC,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 { DriverErrorType, IDriverErrorBase } from \"@fluidframework/driver-definitions\";\nimport { IFluidErrorBase, LoggingError } from \"@fluidframework/telemetry-utils\";\n\n/** Error indicating an API is being used improperly resulting in an invalid operation. */\nexport class UsageError extends LoggingError implements IDriverErrorBase, IFluidErrorBase {\n\treadonly errorType = DriverErrorType.usageError;\n\treadonly canRetry = false;\n\n\tconstructor(message: string) {\n\t\tsuper(message, { usageError: true });\n\t}\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fluidResolvedUrl.d.ts","sourceRoot":"","sources":["../src/fluidResolvedUrl.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AAErF,eAAO,MAAM,kBAAkB,
|
|
1
|
+
{"version":3,"file":"fluidResolvedUrl.d.ts","sourceRoot":"","sources":["../src/fluidResolvedUrl.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AAErF,eAAO,MAAM,kBAAkB,aACpB,YAAY,GAAG,SAAS,kCAC2B,CAAC;AAE/D,wBAAgB,sBAAsB,CACrC,QAAQ,EAAE,YAAY,GAAG,SAAS,GAChC,OAAO,CAAC,QAAQ,IAAI,iBAAiB,CAIvC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fluidResolvedUrl.js","sourceRoot":"","sources":["../src/fluidResolvedUrl.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,MAAM,CAAC,MAAM,kBAAkB,
|
|
1
|
+
{"version":3,"file":"fluidResolvedUrl.js","sourceRoot":"","sources":["../src/fluidResolvedUrl.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CACjC,QAAkC,EACF,EAAE,CAAC,CAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,IAAI,MAAK,OAAO,CAAC;AAE/D,MAAM,UAAU,sBAAsB,CACrC,QAAkC;IAElC,IAAI,CAAC,kBAAkB,CAAC,QAAQ,CAAC,EAAE;QAClC,MAAM,IAAI,KAAK,CAAC,sCAAsC,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,IAAI,EAAE,CAAC,CAAC;KACxE;AACF,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IResolvedUrl, IFluidResolvedUrl } from \"@fluidframework/driver-definitions\";\n\nexport const isFluidResolvedUrl = (\n\tresolved: IResolvedUrl | undefined,\n): resolved is IFluidResolvedUrl => resolved?.type === \"fluid\";\n\nexport function ensureFluidResolvedUrl(\n\tresolved: IResolvedUrl | undefined,\n): asserts resolved is IFluidResolvedUrl {\n\tif (!isFluidResolvedUrl(resolved)) {\n\t\tthrow new Error(`resolved is not a Fluid url. Type: ${resolved?.type}`);\n\t}\n}\n"]}
|
package/lib/index.d.ts
CHANGED
|
@@ -23,5 +23,5 @@ export { readAndParse } from "./readAndParse";
|
|
|
23
23
|
export { IProgress, runWithRetry } from "./runWithRetry";
|
|
24
24
|
export { combineAppAndProtocolSummary, getDocAttributesFromProtocolSummary, getQuorumValuesFromProtocolSummary, } from "./summaryForCreateNew";
|
|
25
25
|
export { convertSummaryTreeToSnapshotITree } from "./treeConversions";
|
|
26
|
-
export { convertSnapshotAndBlobsToSummaryTree, ISummaryTreeAssemblerProps, SummaryTreeAssembler } from "./treeUtils";
|
|
26
|
+
export { convertSnapshotAndBlobsToSummaryTree, ISummaryTreeAssemblerProps, SummaryTreeAssembler, } from "./treeUtils";
|
|
27
27
|
//# sourceMappingURL=index.d.ts.map
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AACrF,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAC5E,OAAO,EAAE,gCAAgC,EAAE,MAAM,oCAAoC,CAAC;AACtF,OAAO,EAAE,UAAU,EAAE,MAAM,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Ac,GACd,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,8BAA8B,EAAE,MAAM,kCAAkC,CAAC;AAClF,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,EACN,4BAA4B,EAC5B,mCAAmC,EACnC,kCAAkC,GAClC,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,iCAAiC,EAAE,MAAM,mBAAmB,CAAC;AACtE,OAAO,EACN,oCAAoC,EACpC,0BAA0B,EAC1B,oBAAoB,GACpB,MAAM,aAAa,CAAC"}
|
package/lib/index.js
CHANGED
|
@@ -23,5 +23,5 @@ export { readAndParse } from "./readAndParse";
|
|
|
23
23
|
export { runWithRetry } from "./runWithRetry";
|
|
24
24
|
export { combineAppAndProtocolSummary, getDocAttributesFromProtocolSummary, getQuorumValuesFromProtocolSummary, } from "./summaryForCreateNew";
|
|
25
25
|
export { convertSummaryTreeToSnapshotITree } from "./treeConversions";
|
|
26
|
-
export { convertSnapshotAndBlobsToSummaryTree, SummaryTreeAssembler } from "./treeUtils";
|
|
26
|
+
export { convertSnapshotAndBlobsToSummaryTree, SummaryTreeAssembler, } from "./treeUtils";
|
|
27
27
|
//# 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,sBAAsB,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AACrF,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAC5E,O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,kBAAkB,EAClB,cAAc,GACd,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,8BAA8B,EAAE,MAAM,kCAAkC,CAAC;AAClF,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAa,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,EACN,4BAA4B,EAC5B,mCAAmC,EACnC,kCAAkC,GAClC,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,iCAAiC,EAAE,MAAM,mBAAmB,CAAC;AACtE,OAAO,EACN,oCAAoC,EAEpC,oBAAoB,GACpB,MAAM,aAAa,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport { BlobAggregationStorage, SnapshotExtractor } from \"./blobAggregationStorage\";\nexport { BlobCacheStorageService } from \"./blobCacheStorageService\";\nexport { buildSnapshotTree } from \"./buildSnapshotTree\";\nexport { DocumentStorageServiceProxy } from \"./documentStorageServiceProxy\";\nexport { EmptyDocumentDeltaStorageService } from \"./emptyDocumentDeltaStorageService\";\nexport { UsageError } from \"./error\";\nexport { ensureFluidResolvedUrl, isFluidResolvedUrl } from \"./fluidResolvedUrl\";\nexport { InsecureUrlResolver } from \"./insecureUrlResolver\";\nexport { MapWithExpiration } from \"./mapWithExpiration\";\nexport {\n\tcanBeCoalescedByService,\n\tisRuntimeMessage,\n\tisUnpackedRuntimeMessage,\n\tMessageType2,\n} from \"./messageRecognition\";\nexport { MultiDocumentServiceFactory } from \"./multiDocumentServiceFactory\";\nexport { configurableUrlResolver, MultiUrlResolver } from \"./multiUrlResolver\";\nexport {\n\tAuthorizationError,\n\tcanRetryOnError,\n\tcreateGenericNetworkError,\n\tcreateWriteError,\n\tDeltaStreamConnectionForbiddenError,\n\tDriverErrorTelemetryProps,\n\tFluidInvalidSchemaError,\n\tGenericNetworkError,\n\tgetRetryDelayFromError,\n\tgetRetryDelaySecondsFromError,\n\tIAnyDriverError,\n\tisOnline,\n\tLocationRedirectionError,\n\tNetworkErrorBasic,\n\tNonRetryableError,\n\tOnlineStatus,\n\tRetryableError,\n\tThrottlingError,\n} from \"./network\";\nexport { logNetworkFailure, waitForConnectedState } from \"./networkUtils\";\nexport {\n\temptyMessageStream,\n\tParallelRequests,\n\tQueue,\n\trequestOps,\n\tstreamFromMessages,\n\tstreamObserver,\n} from \"./parallelRequests\";\nexport { PrefetchDocumentStorageService } from \"./prefetchDocumentStorageService\";\nexport { RateLimiter } from \"./rateLimiter\";\nexport { readAndParse } from \"./readAndParse\";\nexport { IProgress, runWithRetry } from \"./runWithRetry\";\nexport {\n\tcombineAppAndProtocolSummary,\n\tgetDocAttributesFromProtocolSummary,\n\tgetQuorumValuesFromProtocolSummary,\n} from \"./summaryForCreateNew\";\nexport { convertSummaryTreeToSnapshotITree } from \"./treeConversions\";\nexport {\n\tconvertSnapshotAndBlobsToSummaryTree,\n\tISummaryTreeAssemblerProps,\n\tSummaryTreeAssembler,\n} from \"./treeUtils\";\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"insecureUrlResolver.d.ts","sourceRoot":"","sources":["../src/insecureUrlResolver.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAC3D,OAAO,
|
|
1
|
+
{"version":3,"file":"insecureUrlResolver.d.ts","sourceRoot":"","sources":["../src/insecureUrlResolver.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAC3D,OAAO,EAEN,YAAY,EACZ,YAAY,EAEZ,MAAM,oCAAoC,CAAC;AAG5C;;;;;;;;;;;;;GAaG;AACH,qBAAa,mBAAoB,YAAW,YAAY;IAItD,OAAO,CAAC,QAAQ,CAAC,OAAO;IACxB,OAAO,CAAC,QAAQ,CAAC,UAAU;IAC3B,OAAO,CAAC,QAAQ,CAAC,UAAU;IAC3B,OAAO,CAAC,QAAQ,CAAC,QAAQ;IACzB,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,aAAa;IAR/B,OAAO,CAAC,QAAQ,CAAC,KAAK,CAA4C;gBAGhD,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,EACd,aAAa,GAAE,OAAe;IAGnC,OAAO,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,YAAY,GAAG,SAAS,CAAC;IA+C1E,OAAO,CAAC,aAAa;IAiDR,cAAc,CAAC,WAAW,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAkBrF,sBAAsB,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,QAAQ;CAU1D"}
|
|
@@ -93,7 +93,8 @@ export class InsecureUrlResolver {
|
|
|
93
93
|
}
|
|
94
94
|
const encodedDocId = encodeURIComponent(documentId);
|
|
95
95
|
const relativePath = !documentRelativePath || documentRelativePath.startsWith("/")
|
|
96
|
-
? documentRelativePath
|
|
96
|
+
? documentRelativePath
|
|
97
|
+
: `/${documentRelativePath}`;
|
|
97
98
|
const documentUrl = `fluid://${host}/${encodedTenantId}/${encodedDocId}${relativePath}${queryParams}`;
|
|
98
99
|
const deltaStorageUrl = `${this.ordererUrl}/deltas/${encodedTenantId}/${encodedDocId}`;
|
|
99
100
|
const storageUrl = `${this.storageUrl}/repos/${encodedTenantId}`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"insecureUrlResolver.js","sourceRoot":"","sources":["../src/insecureUrlResolver.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,KAAK,EAAE,MAAM,KAAK,CAAC;AAC5B,OAAO,EA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served.\n * Licensed under the MIT License.\n */\n\nimport { parse } from \"url\";\nimport { assert } from \"@fluidframework/common-utils\";\nimport { IRequest } from \"@fluidframework/core-interfaces\";\nimport {\n IFluidResolvedUrl,\n IResolvedUrl,\n IUrlResolver,\n DriverHeader,\n} from \"@fluidframework/driver-definitions\";\nimport Axios from \"axios\";\n\n/**\n * As the name implies this is not secure and should not be used in production. It simply makes the example easier\n * to get up and running.\n *\n * In our example we run a simple web server via webpack-dev-server. This defines a URL format of the form\n * http://localhost:8080/<documentId>/<path>.\n *\n * We then need to map that to a Fluid based URL. These are of the form\n * fluid://orderingUrl/<tenantId>/<documentId>/<path>.\n *\n * The tenantId/documentId pair defines the 'full' document ID the service makes use of. The path is then an optional\n * part of the URL that the document interprets and maps to a data store. It's exactly similar to how a web service\n * works or a router inside of a single page app framework.\n */\nexport class InsecureUrlResolver implements IUrlResolver {\n private readonly cache = new Map<string, Promise<IResolvedUrl>>();\n\n constructor(\n private readonly hostUrl: string,\n private readonly ordererUrl: string,\n private readonly storageUrl: string,\n private readonly tenantId: string,\n private readonly bearer: string,\n private readonly isForNodeTest: boolean = false,\n ) { }\n\n public async resolve(request: IRequest): Promise<IResolvedUrl | undefined> {\n // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions\n if (request.headers?.[DriverHeader.createNew]) {\n const [, queryString] = request.url.split(\"?\");\n const searchParams = new URLSearchParams(queryString);\n const fileName = searchParams.get(\"fileName\");\n return this.resolveHelper(fileName);\n }\n const parsedUrl = new URL(request.url);\n // If hosts match then we use the local tenant information. Otherwise we make a REST call out to the hosting\n // service using our bearer token.\n if (this.isForNodeTest) {\n const [, documentId, tmpRelativePath] = parsedUrl.pathname.substr(1).split(\"/\");\n const relativePath = tmpRelativePath === undefined ? \"\" : tmpRelativePath;\n return this.resolveHelper(documentId, relativePath, parsedUrl.search);\n } else if (parsedUrl.host === window.location.host) {\n const fullPath = parsedUrl.pathname.substr(1);\n const documentId = fullPath.split(\"/\")[0];\n const documentRelativePath = fullPath.slice(documentId.length);\n return this.resolveHelper(documentId, documentRelativePath);\n } else {\n const maybeResolvedUrl = this.cache.get(request.url);\n if (maybeResolvedUrl) {\n return maybeResolvedUrl;\n }\n\n const headers = {\n Authorization: `Bearer ${this.bearer}`,\n };\n const resolvedP = Axios.post<IResolvedUrl>(\n `${this.hostUrl}/api/v1/load`,\n {\n url: request.url,\n },\n {\n headers,\n });\n this.cache.set(request.url, resolvedP.then((resolved) => resolved.data));\n\n return this.cache.get(request.url);\n }\n }\n\n private resolveHelper(documentId: string | null, documentRelativePath: string = \"\", queryParams: string = \"\") {\n const encodedTenantId = encodeURIComponent(this.tenantId);\n const host = new URL(this.ordererUrl).host;\n // when the document ID is not provided we need to resolve a special create new document URL.\n // the actual container ID will be generated by the driver.\n // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions\n if (!documentId) {\n const createNewResponse: IFluidResolvedUrl = {\n endpoints: {\n deltaStorageUrl: `${this.ordererUrl}/deltas/${encodedTenantId}/new`,\n ordererUrl: this.ordererUrl,\n storageUrl: `${this.storageUrl}/repos/${encodedTenantId}`,\n },\n // document ID is ignored by the driver for new container requests\n id: \"\",\n tokens: {},\n type: \"fluid\",\n url: `fluid://${host}/${encodedTenantId}/new`,\n };\n return createNewResponse;\n }\n const encodedDocId = encodeURIComponent(documentId);\n const relativePath = !documentRelativePath || documentRelativePath.startsWith(\"/\")\n ? documentRelativePath : `/${documentRelativePath}`;\n const documentUrl = `fluid://${host}/${encodedTenantId}/${encodedDocId}${relativePath}${queryParams}`;\n\n const deltaStorageUrl = `${this.ordererUrl}/deltas/${encodedTenantId}/${encodedDocId}`;\n const storageUrl = `${this.storageUrl}/repos/${encodedTenantId}`;\n\n const response: IFluidResolvedUrl = {\n endpoints: {\n deltaStorageUrl,\n ordererUrl: this.ordererUrl,\n storageUrl,\n },\n id: documentId,\n tokens: {},\n type: \"fluid\",\n url: documentUrl,\n };\n return response;\n }\n\n public async getAbsoluteUrl(resolvedUrl: IResolvedUrl, relativeUrl: string): Promise<string> {\n const fluidResolvedUrl = resolvedUrl as IFluidResolvedUrl;\n\n const parsedUrl = parse(fluidResolvedUrl.url);\n const [, , documentId] = parsedUrl.pathname?.split(\"/\") ?? [];\n // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions\n assert(!!documentId, 0x273 /* \"Invalid document id from parsed URL\" */);\n\n let url = relativeUrl;\n if (url.startsWith(\"/\")) {\n url = url.substr(1);\n }\n\n return `${this.hostUrl}/${encodeURIComponent(\n this.tenantId)}/${encodeURIComponent(documentId)}/${url}`;\n }\n\n public createCreateNewRequest(fileName?: string): IRequest {\n const createNewRequest: IRequest = {\n // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions\n url: fileName ? `${this.hostUrl}?fileName=${fileName}` : this.hostUrl,\n headers: {\n [DriverHeader.createNew]: true,\n },\n };\n return createNewRequest;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"insecureUrlResolver.js","sourceRoot":"","sources":["../src/insecureUrlResolver.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,KAAK,EAAE,MAAM,KAAK,CAAC;AAC5B,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AAEtD,OAAO,EAIN,YAAY,GACZ,MAAM,oCAAoC,CAAC;AAC5C,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B;;;;;;;;;;;;;GAaG;AACH,MAAM,OAAO,mBAAmB;IAG/B,YACkB,OAAe,EACf,UAAkB,EAClB,UAAkB,EAClB,QAAgB,EAChB,MAAc,EACd,gBAAyB,KAAK;QAL9B,YAAO,GAAP,OAAO,CAAQ;QACf,eAAU,GAAV,UAAU,CAAQ;QAClB,eAAU,GAAV,UAAU,CAAQ;QAClB,aAAQ,GAAR,QAAQ,CAAQ;QAChB,WAAM,GAAN,MAAM,CAAQ;QACd,kBAAa,GAAb,aAAa,CAAiB;QAR/B,UAAK,GAAG,IAAI,GAAG,EAAiC,CAAC;IAS/D,CAAC;IAEG,KA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,KAAK,CAAC,2CAA2C,CAAC,CAAC;QAExE,IAAI,GAAG,GAAG,WAAW,CAAC;QACtB,IAAI,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE;YACxB,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;SACpB;QAED,OAAO,GAAG,IAAI,CAAC,OAAO,IAAI,kBAAkB,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,kBAAkB,CAChF,UAAU,CACV,IAAI,GAAG,EAAE,CAAC;IACZ,CAAC;IAEM,sBAAsB,CAAC,QAAiB;QAC9C,MAAM,gBAAgB,GAAa;YAClC,yEAAyE;YACzE,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,OAAO,aAAa,QAAQ,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO;YACrE,OAAO,EAAE;gBACR,CAAC,YAAY,CAAC,SAAS,CAAC,EAAE,IAAI;aAC9B;SACD,CAAC;QACF,OAAO,gBAAgB,CAAC;IACzB,CAAC;CACD","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { parse } from \"url\";\nimport { assert } from \"@fluidframework/common-utils\";\nimport { IRequest } from \"@fluidframework/core-interfaces\";\nimport {\n\tIFluidResolvedUrl,\n\tIResolvedUrl,\n\tIUrlResolver,\n\tDriverHeader,\n} from \"@fluidframework/driver-definitions\";\nimport Axios from \"axios\";\n\n/**\n * As the name implies this is not secure and should not be used in production. It simply makes the example easier\n * to get up and running.\n *\n * In our example we run a simple web server via webpack-dev-server. This defines a URL format of the form\n * http://localhost:8080/<documentId>/<path>.\n *\n * We then need to map that to a Fluid based URL. These are of the form\n * fluid://orderingUrl/<tenantId>/<documentId>/<path>.\n *\n * The tenantId/documentId pair defines the 'full' document ID the service makes use of. The path is then an optional\n * part of the URL that the document interprets and maps to a data store. It's exactly similar to how a web service\n * works or a router inside of a single page app framework.\n */\nexport class InsecureUrlResolver implements IUrlResolver {\n\tprivate readonly cache = new Map<string, Promise<IResolvedUrl>>();\n\n\tconstructor(\n\t\tprivate readonly hostUrl: string,\n\t\tprivate readonly ordererUrl: string,\n\t\tprivate readonly storageUrl: string,\n\t\tprivate readonly tenantId: string,\n\t\tprivate readonly bearer: string,\n\t\tprivate readonly isForNodeTest: boolean = false,\n\t) {}\n\n\tpublic async resolve(request: IRequest): Promise<IResolvedUrl | undefined> {\n\t\t// eslint-disable-next-line @typescript-eslint/strict-boolean-expressions\n\t\tif (request.headers?.[DriverHeader.createNew]) {\n\t\t\tconst [, queryString] = request.url.split(\"?\");\n\t\t\tconst searchParams = new URLSearchParams(queryString);\n\t\t\tconst fileName = searchParams.get(\"fileName\");\n\t\t\treturn this.resolveHelper(fileName);\n\t\t}\n\t\tconst parsedUrl = new URL(request.url);\n\t\t// If hosts match then we use the local tenant information. Otherwise we make a REST call out to the hosting\n\t\t// service using our bearer token.\n\t\tif (this.isForNodeTest) {\n\t\t\tconst [, documentId, tmpRelativePath] = parsedUrl.pathname.substr(1).split(\"/\");\n\t\t\tconst relativePath = tmpRelativePath === undefined ? \"\" : tmpRelativePath;\n\t\t\treturn this.resolveHelper(documentId, relativePath, parsedUrl.search);\n\t\t} else if (parsedUrl.host === window.location.host) {\n\t\t\tconst fullPath = parsedUrl.pathname.substr(1);\n\t\t\tconst documentId = fullPath.split(\"/\")[0];\n\t\t\tconst documentRelativePath = fullPath.slice(documentId.length);\n\t\t\treturn this.resolveHelper(documentId, documentRelativePath);\n\t\t} else {\n\t\t\tconst maybeResolvedUrl = this.cache.get(request.url);\n\t\t\tif (maybeResolvedUrl) {\n\t\t\t\treturn maybeResolvedUrl;\n\t\t\t}\n\n\t\t\tconst headers = {\n\t\t\t\tAuthorization: `Bearer ${this.bearer}`,\n\t\t\t};\n\t\t\tconst resolvedP = Axios.post<IResolvedUrl>(\n\t\t\t\t`${this.hostUrl}/api/v1/load`,\n\t\t\t\t{\n\t\t\t\t\turl: request.url,\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\theaders,\n\t\t\t\t},\n\t\t\t);\n\t\t\tthis.cache.set(\n\t\t\t\trequest.url,\n\t\t\t\tresolvedP.then((resolved) => resolved.data),\n\t\t\t);\n\n\t\t\treturn this.cache.get(request.url);\n\t\t}\n\t}\n\n\tprivate resolveHelper(\n\t\tdocumentId: string | null,\n\t\tdocumentRelativePath: string = \"\",\n\t\tqueryParams: string = \"\",\n\t) {\n\t\tconst encodedTenantId = encodeURIComponent(this.tenantId);\n\t\tconst host = new URL(this.ordererUrl).host;\n\t\t// when the document ID is not provided we need to resolve a special create new document URL.\n\t\t// the actual container ID will be generated by the driver.\n\t\t// eslint-disable-next-line @typescript-eslint/strict-boolean-expressions\n\t\tif (!documentId) {\n\t\t\tconst createNewResponse: IFluidResolvedUrl = {\n\t\t\t\tendpoints: {\n\t\t\t\t\tdeltaStorageUrl: `${this.ordererUrl}/deltas/${encodedTenantId}/new`,\n\t\t\t\t\tordererUrl: this.ordererUrl,\n\t\t\t\t\tstorageUrl: `${this.storageUrl}/repos/${encodedTenantId}`,\n\t\t\t\t},\n\t\t\t\t// document ID is ignored by the driver for new container requests\n\t\t\t\tid: \"\",\n\t\t\t\ttokens: {},\n\t\t\t\ttype: \"fluid\",\n\t\t\t\turl: `fluid://${host}/${encodedTenantId}/new`,\n\t\t\t};\n\t\t\treturn createNewResponse;\n\t\t}\n\t\tconst encodedDocId = encodeURIComponent(documentId);\n\t\tconst relativePath =\n\t\t\t!documentRelativePath || documentRelativePath.startsWith(\"/\")\n\t\t\t\t? documentRelativePath\n\t\t\t\t: `/${documentRelativePath}`;\n\t\tconst documentUrl = `fluid://${host}/${encodedTenantId}/${encodedDocId}${relativePath}${queryParams}`;\n\n\t\tconst deltaStorageUrl = `${this.ordererUrl}/deltas/${encodedTenantId}/${encodedDocId}`;\n\t\tconst storageUrl = `${this.storageUrl}/repos/${encodedTenantId}`;\n\n\t\tconst response: IFluidResolvedUrl = {\n\t\t\tendpoints: {\n\t\t\t\tdeltaStorageUrl,\n\t\t\t\tordererUrl: this.ordererUrl,\n\t\t\t\tstorageUrl,\n\t\t\t},\n\t\t\tid: documentId,\n\t\t\ttokens: {},\n\t\t\ttype: \"fluid\",\n\t\t\turl: documentUrl,\n\t\t};\n\t\treturn response;\n\t}\n\n\tpublic async getAbsoluteUrl(resolvedUrl: IResolvedUrl, relativeUrl: string): Promise<string> {\n\t\tconst fluidResolvedUrl = resolvedUrl as IFluidResolvedUrl;\n\n\t\tconst parsedUrl = parse(fluidResolvedUrl.url);\n\t\tconst [, , documentId] = parsedUrl.pathname?.split(\"/\") ?? [];\n\t\t// eslint-disable-next-line @typescript-eslint/strict-boolean-expressions\n\t\tassert(!!documentId, 0x273 /* \"Invalid document id from parsed URL\" */);\n\n\t\tlet url = relativeUrl;\n\t\tif (url.startsWith(\"/\")) {\n\t\t\turl = url.substr(1);\n\t\t}\n\n\t\treturn `${this.hostUrl}/${encodeURIComponent(this.tenantId)}/${encodeURIComponent(\n\t\t\tdocumentId,\n\t\t)}/${url}`;\n\t}\n\n\tpublic createCreateNewRequest(fileName?: string): IRequest {\n\t\tconst createNewRequest: IRequest = {\n\t\t\t// eslint-disable-next-line @typescript-eslint/strict-boolean-expressions\n\t\t\turl: fileName ? `${this.hostUrl}?fileName=${fileName}` : this.hostUrl,\n\t\t\theaders: {\n\t\t\t\t[DriverHeader.createNew]: true,\n\t\t\t},\n\t\t};\n\t\treturn createNewRequest;\n\t}\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mapWithExpiration.d.ts","sourceRoot":"","sources":["../src/mapWithExpiration.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH;;;GAGG;AACH,qBAAa,iBAAiB,CAAC,IAAI,GAAG,GAAG,EAAE,MAAM,GAAG,GAAG,CAAE,SAAQ,GAAG,CAAC,IAAI,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"mapWithExpiration.d.ts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ithExpiration extends Map {
|
|
|
15
15
|
this.lastRefreshedTimes = new Map();
|
|
16
16
|
}
|
|
17
17
|
refresh(key) {
|
|
18
|
-
this.lastRefreshedTimes.set(key,
|
|
18
|
+
this.lastRefreshedTimes.set(key, new Date().valueOf());
|
|
19
19
|
}
|
|
20
20
|
/**
|
|
21
21
|
* Returns true if the key is present and expired, false if it's not expired, and undefined if it's not found
|
|
@@ -27,7 +27,7 @@ export class MapWithExpiration extends Map {
|
|
|
27
27
|
if (refreshTime === undefined) {
|
|
28
28
|
return undefined;
|
|
29
29
|
}
|
|
30
|
-
const expired =
|
|
30
|
+
const expired = new Date().valueOf() - refreshTime >= this.expiryMs;
|
|
31
31
|
if (expired && cleanUp) {
|
|
32
32
|
this.delete(key);
|
|
33
33
|
}
|
|
@@ -73,7 +73,9 @@ export class MapWithExpiration extends Map {
|
|
|
73
73
|
}
|
|
74
74
|
});
|
|
75
75
|
// Clean up keys we know are expired now that we're done iterating
|
|
76
|
-
expiredKeys.forEach((key) => {
|
|
76
|
+
expiredKeys.forEach((key) => {
|
|
77
|
+
this.delete(key);
|
|
78
|
+
});
|
|
77
79
|
}
|
|
78
80
|
entries() {
|
|
79
81
|
this.clearExpiredEntries();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mapWithExpiration.js","sourceRoot":"","sources":["../src/mapWithExpiration.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AAEtD;;;GAGG;AACH,MAAM,OAAO,iBAA4C,SAAQ,GAAiB;
|
|
1
|
+
{"version":3,"file":"mapWithExpiration.js","sourceRoot":"","sources":["../src/mapWithExpiration.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AAEtD;;;GAGG;AACH,MAAM,OAAO,iBAA4C,SAAQ,GAAiB;IAIjF,YAA6B,QAAgB;QAC5C,KAAK,EAAE,CAA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AC,mBAAmB,EAAE,CAAC;QAC3B,OAAO,KAAK,CAAC,IAAI,EAAE,CAAC;IACrB,CAAC;IACD,MAAM;QACL,IAAI,CAAC,mBAAmB,EAAE,CAAC;QAC3B,OAAO,KAAK,CAAC,MAAM,EAAE,CAAC;IACvB,CAAC;IACD,CAAC,MAAM,CAAC,QAAQ,CAAC;QAChB,IAAI,CAAC,mBAAmB,EAAE,CAAC;QAC3B,OAAO,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC;IACjC,CAAC;IAED,OAAO;QACN,IAAI,CAAC,mBAAmB,EAAE,CAAC;QAC3B,OAAO,KAAK,CAAC,OAAO,EAAE,CAAC;IACxB,CAAC;CACD","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert } from \"@fluidframework/common-utils\";\n\n/**\n * An extension of Map that expires (deletes) entries after a period of inactivity.\n * The policy is based on the last time a key was written to.\n */\nexport class MapWithExpiration<TKey = any, TValue = any> extends Map<TKey, TValue> {\n\t/** Timestamps (as epoch ms numbers) of when each key was last refreshed */\n\tprivate readonly lastRefreshedTimes = new Map<TKey, number>();\n\n\tconstructor(private readonly expiryMs: number) {\n\t\tsuper();\n\t}\n\n\tprivate refresh(key: TKey): void {\n\t\tthis.lastRefreshedTimes.set(key, new Date().valueOf());\n\t}\n\n\t/**\n\t * Returns true if the key is present and expired, false if it's not expired, and undefined if it's not found\n\t * If cleanUp is passed as true, then delete any expired entry before returning.\n\t */\n\tprivate checkExpiry(key: TKey, cleanUp: boolean = false): boolean | undefined {\n\t\tconst refreshTime = this.lastRefreshedTimes.get(key);\n\t\tassert(\n\t\t\t(refreshTime !== undefined) === super.has(key),\n\t\t\t0x50c /* freshness map out of sync */,\n\t\t);\n\n\t\tif (refreshTime === undefined) {\n\t\t\treturn undefined;\n\t\t}\n\t\tconst expired = new Date().valueOf() - refreshTime >= this.expiryMs;\n\t\tif (expired && cleanUp) {\n\t\t\tthis.delete(key);\n\t\t}\n\t\treturn expired;\n\t}\n\n\tprivate clearExpiredEntries() {\n\t\t// forEach clears out any expired entries\n\t\tthis.forEach(() => {});\n\t}\n\n\tget size(): number {\n\t\tthis.clearExpiredEntries();\n\t\treturn super.size;\n\t}\n\n\thas(key: TKey): boolean {\n\t\tthis.checkExpiry(key, true /* cleanUp */);\n\t\treturn super.has(key);\n\t}\n\n\tget(key: TKey): TValue | undefined {\n\t\tthis.checkExpiry(key, true /* cleanUp */);\n\t\treturn super.get(key);\n\t}\n\n\tset(key: TKey, value: TValue): this {\n\t\t// Sliding window expiration policy (on write)\n\t\tthis.refresh(key);\n\t\treturn super.set(key, value);\n\t}\n\n\tdelete(key: TKey): boolean {\n\t\tthis.lastRefreshedTimes.delete(key);\n\t\treturn super.delete(key);\n\t}\n\n\tclear(): void {\n\t\tthis.lastRefreshedTimes.clear();\n\t\tsuper.clear();\n\t}\n\n\tforEach(\n\t\tcallbackfn: (value: TValue, key: TKey, map: Map<TKey, TValue>) => void,\n\t\tthisArg?: any,\n\t): void {\n\t\tconst expiredKeys: TKey[] = [];\n\t\tsuper.forEach(\n\t\t\t(v, k, m) => {\n\t\t\t\tif (this.checkExpiry(k) === true) {\n\t\t\t\t\texpiredKeys.push(k);\n\t\t\t\t} else {\n\t\t\t\t\tcallbackfn.bind(thisArg)(v, k, m);\n\t\t\t\t}\n\t\t\t},\n\t\t\t// Note we don't pass thisArg here, since we bind it directly to callbackFn and don't need it otherwise\n\t\t);\n\n\t\t// Clean up keys we know are expired now that we're done iterating\n\t\texpiredKeys.forEach((key: TKey) => {\n\t\t\tthis.delete(key);\n\t\t});\n\t}\n\n\tentries(): IterableIterator<[TKey, TValue]> {\n\t\tthis.clearExpiredEntries();\n\t\treturn super.entries();\n\t}\n\tkeys(): IterableIterator<TKey> {\n\t\tthis.clearExpiredEntries();\n\t\treturn super.keys();\n\t}\n\tvalues(): IterableIterator<TValue> {\n\t\tthis.clearExpiredEntries();\n\t\treturn super.values();\n\t}\n\t[Symbol.iterator](): IterableIterator<[TKey, TValue]> {\n\t\tthis.clearExpiredEntries();\n\t\treturn super[Symbol.iterator]();\n\t}\n\n\tvalueOf() {\n\t\tthis.clearExpiredEntries();\n\t\treturn super.valueOf();\n\t}\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messageRecognition.d.ts","sourceRoot":"","sources":["../src/messageRecognition.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,
|
|
1
|
+
{"version":3,"file":"messageRecognition.d.ts","sourceRoot":"","sources":["../src/messageRecognition.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EACN,gBAAgB,EAChB,yBAAyB,EAEzB,MAAM,sCAAsC,CAAC;AAE9C;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAEnE;AAYD;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,yBAAyB,GAAG,OAAO,CAKpF;AAID,oBAAY,YAAY;IACvB,MAAM,WAAW;CACjB;AAGD,wBAAgB,uBAAuB,CACtC,OAAO,EAAE,yBAAyB,GAAG,gBAAgB,GACnD,OAAO,CAIT"}
|
|
@@ -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 { MessageType } from "@fluidframework/protocol-definitions";
|
|
5
|
+
import { MessageType, } from "@fluidframework/protocol-definitions";
|
|
6
6
|
/**
|
|
7
7
|
* Tells if message was sent by container runtime
|
|
8
8
|
* @privateRemarks ADO #1385: To be moved to container-definitions
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messageRecognition.js","sourceRoot":"","sources":["../src/messageRecognition.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,
|
|
1
|
+
{"version":3,"file":"messageRecognition.js","sourceRoot":"","sources":["../src/messageRecognition.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAGN,WAAW,GACX,MAAM,sCAAsC,CAAC;AAE9C;;;;GAIG;AACH,MAAM,UAAU,gBAAgB,CAAC,OAAyB;IACzD,OAAO,OAAO,CAAC,IAAI,KAAK,WAAW,CAAC,SAAS,CAAC;AAC/C,CAAC;AAED,IAAK,cAQJ;AARD,WAAK,cAAc;IAClB,gDAA8B,CAAA;IAC9B,mCAAiB,CAAA;IACjB,yCAAuB,CAAA;IACvB,2CAAyB,CAAA;IACzB,mCAAiB,CAAA;IACjB,iCAAe,CAAA;IACf,kCAAgB,CAAA;AACjB,CAAC,EARI,cAAc,KAAd,cAAc,QAQlB;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,UAAU,wBAAwB,CAAC,OAAkC;IAC1E,IAAK,MAAM,CAAC,MAAM,CAAC,cAAc,CAAc,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;QACvE,OAAO,IAAI,CAAC;KACZ;IACD,OAAO,KAAK,CAAC;AACd,CAAC;AAED,iDAAiD;AACjD,kDAAkD;AAClD,MAAM,CAAN,IAAY,YAEX;AAFD,WAAY,YAAY;IACvB,iCAAiB,CAAA;AAClB,CAAC,EAFW,YAAY,KAAZ,YAAY,QAEvB;AAED,mEAAmE;AACnE,MAAM,UAAU,uBAAuB,CACtC,OAAqD;IAErD,6FAA6F;IAC7F,mEAAmE;IACnE,OAAO,OAAO,CAAC,IAAI,KAAK,WAAW,CAAC,IAAI,IAAI,OAAO,CAAC,IAAI,KAAK,YAAY,CAAC,MAAM,CAAC;AAClF,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\nimport {\n\tIDocumentMessage,\n\tISequencedDocumentMessage,\n\tMessageType,\n} from \"@fluidframework/protocol-definitions\";\n\n/**\n * Tells if message was sent by container runtime\n * @privateRemarks ADO #1385: To be moved to container-definitions\n * @returns whether the message is a runtime message\n */\nexport function isRuntimeMessage(message: { type: string }): boolean {\n\treturn message.type === MessageType.Operation;\n}\n\nenum RuntimeMessage {\n\tFluidDataStoreOp = \"component\",\n\tAttach = \"attach\",\n\tChunkedOp = \"chunkedOp\",\n\tBlobAttach = \"blobAttach\",\n\tRejoin = \"rejoin\",\n\tAlias = \"alias\",\n\tOperation = \"op\",\n}\n\n/**\n * Determines whether or not the message type is one of the following: (legacy)\n *\n * - \"component\"\n *\n * - \"attach\"\n *\n * - \"chunkedOp\"\n *\n * - \"blobAttach\"\n *\n * - \"rejoin\"\n *\n * - \"alias\"\n *\n * - \"op\"\n *\n * @deprecated This API should not be used.\n */\nexport function isUnpackedRuntimeMessage(message: ISequencedDocumentMessage): boolean {\n\tif ((Object.values(RuntimeMessage) as string[]).includes(message.type)) {\n\t\treturn true;\n\t}\n\treturn false;\n}\n\n// ADO #1385: staging code changes across layers.\n// Eventually to be replaced by MessageType.accept\nexport enum MessageType2 {\n\tAccept = \"accept\",\n}\n\n// ADO #1385: To be moved to packages/protocol-base/src/protocol.ts\nexport function canBeCoalescedByService(\n\tmessage: ISequencedDocumentMessage | IDocumentMessage,\n): boolean {\n\t// This assumes that in the future relay service may implement coalescing of accept messages,\n\t// same way it was doing coalescing of immediate noops in the past.\n\treturn message.type === MessageType.NoOp || message.type === MessageType2.Accept;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"multiDocumentServiceFactory.d.ts","sourceRoot":"","sources":["../src/multiDocumentServiceFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,
|
|
1
|
+
{"version":3,"file":"multiDocumentServiceFactory.d.ts","sourceRoot":"","sources":["../src/multiDocumentServiceFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EACN,uBAAuB,EACvB,YAAY,EACZ,gBAAgB,EAChB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAG1E,qBAAa,2BAA4B,YAAW,uBAAuB;WAC5D,MAAM,CACnB,sBAAsB,EAAE,uBAAuB,GAAG,uBAAuB,EAAE;IAoB5E,OAAO,CAAC,QAAQ,CAAC,4BAA4B,CAAuC;gBAExE,wBAAwB,EAAE,uBAAuB,EAAE;IAM/D,SAAgB,YAAY,WAAW;IACjC,qBAAqB,CAC1B,WAAW,EAAE,YAAY,EACzB,MAAM,CAAC,EAAE,oBAAoB,EAC7B,kBAAkB,CAAC,EAAE,OAAO,GAC1B,OAAO,CAAC,gBAAgB,CAAC;IAgBf,eAAe,CAC3B,gBAAgB,EAAE,YAAY,EAC9B,oBAAoB,EAAE,YAAY,EAClC,MAAM,CAAC,EAAE,oBAAoB,EAC7B,kBAAkB,CAAC,EAAE,OAAO,GAC1B,OAAO,CAAC,gBAAgB,CAAC;CAmB5B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"multiDocumentServiceFactory.js","sourceRoot":"","sources":["../src/multiDocumentServiceFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,KAAK,EAAE,MAAM,KAAK,CAAC;AAQ5B,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAE5D,MAAM,OAAO,2BAA2B;
|
|
1
|
+
{"version":3,"file":"multiDocumentServiceFactory.js","sourceRoot":"","sources":["../src/multiDocumentServiceFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,KAAK,EAAE,MAAM,KAAK,CAAC;AAQ5B,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAE5D,MAAM,OAAO,2BAA2B;IAwBvC,YAAY,wBAAmD;QAM/C,iBAAY,GAAG,OAAO,CAAC;QALtC,IAAI,CAAC,4BAA4B,GAAG,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C,GAAG,CACzF,MAAM,CAAC,QAAQ,CACf,CAAC;QACF,IAAI,OAAO,KAAK,SAAS,EAAE;YAC1B,MAAM,IAAI,KAAK,CAAC,wBAAwB,CAAC,CAAC;SAC1C;QAED,OAAO,OAAO,CAAC,qBAAqB,CAAC,WAAW,EAAE,MAAM,EAAE,kBAAkB,CAAC,CAAC;IAC/E,CAAC;IAEM,KAAK,CAAC,eAAe,CAC3B,gBAA8B,EAC9B,oBAAkC,EAClC,MAA6B,EAC7B,kBAA4B;QAE5B,sBAAsB,CAAC,oBAAoB,CAAC,CAAC;QAC7C,MAAM,MAAM,GAAG,KAAK,CAAC,oBAAoB,CAAC,GAAG,CAAC,CAAC;QAC/C,IAAI,MAAM,CAAC,QAAQ,KAAK,SAAS,IAAI,MAAM,CAAC,QAAQ,KAAK,IAAI,EAAE;YAC9D,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;SACxC;QACD,MAAM,OAAO,GAAwC,IAAI,CAAC,4BAA4B,CAAC,GAAG,CACzF,MAAM,CAAC,QAAQ,CACf,CAAC;QACF,IAAI,OAAO,KAAK,SAAS,EAAE;YAC1B,MAAM,IAAI,KAAK,CAAC,wBAAwB,CAAC,CAAC;SAC1C;QACD,OAAO,OAAO,CAAC,eAAe,CAC7B,gBAAgB,EAChB,oBAAoB,EACpB,MAAM,EACN,kBAAkB,CAClB,CAAC;IACH,CAAC;CACD","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { parse } from \"url\";\nimport {\n\tIDocumentServiceFactory,\n\tIResolvedUrl,\n\tIDocumentService,\n} from \"@fluidframework/driver-definitions\";\nimport { ISummaryTree } from \"@fluidframework/protocol-definitions\";\nimport { ITelemetryBaseLogger } from \"@fluidframework/common-definitions\";\nimport { ensureFluidResolvedUrl } from \"./fluidResolvedUrl\";\n\nexport class MultiDocumentServiceFactory implements IDocumentServiceFactory {\n\tpublic static create(\n\t\tdocumentServiceFactory: IDocumentServiceFactory | IDocumentServiceFactory[],\n\t) {\n\t\tif (Array.isArray(documentServiceFactory)) {\n\t\t\tconst factories: IDocumentServiceFactory[] = [];\n\t\t\tdocumentServiceFactory.forEach((factory) => {\n\t\t\t\tconst maybeMulti = factory as MultiDocumentServiceFactory;\n\t\t\t\tif (maybeMulti.protocolToDocumentFactoryMap !== undefined) {\n\t\t\t\t\tfactories.push(...maybeMulti.protocolToDocumentFactoryMap.values());\n\t\t\t\t} else {\n\t\t\t\t\tfactories.push(factory);\n\t\t\t\t}\n\t\t\t});\n\t\t\tif (factories.length === 1) {\n\t\t\t\treturn factories[0];\n\t\t\t}\n\t\t\treturn new MultiDocumentServiceFactory(factories);\n\t\t}\n\t\treturn documentServiceFactory;\n\t}\n\n\tprivate readonly protocolToDocumentFactoryMap: Map<string, IDocumentServiceFactory>;\n\n\tconstructor(documentServiceFactories: IDocumentServiceFactory[]) {\n\t\tthis.protocolToDocumentFactoryMap = new Map();\n\t\tdocumentServiceFactories.forEach((factory: IDocumentServiceFactory) => {\n\t\t\tthis.protocolToDocumentFactoryMap.set(factory.protocolName, factory);\n\t\t});\n\t}\n\tpublic readonly protocolName = \"none:\";\n\tasync createDocumentService(\n\t\tresolvedUrl: IResolvedUrl,\n\t\tlogger?: ITelemetryBaseLogger,\n\t\tclientIsSummarizer?: boolean,\n\t): Promise<IDocumentService> {\n\t\tensureFluidResolvedUrl(resolvedUrl);\n\t\tconst urlObj = parse(resolvedUrl.url);\n\t\tif (urlObj.protocol === undefined || urlObj.protocol === null) {\n\t\t\tthrow new Error(\"No protocol provided\");\n\t\t}\n\t\tconst factory: IDocumentServiceFactory | undefined = this.protocolToDocumentFactoryMap.get(\n\t\t\turlObj.protocol,\n\t\t);\n\t\tif (factory === undefined) {\n\t\t\tthrow new Error(\"Unknown Fluid protocol\");\n\t\t}\n\n\t\treturn factory.createDocumentService(resolvedUrl, logger, clientIsSummarizer);\n\t}\n\n\tpublic async createContainer(\n\t\tcreateNewSummary: ISummaryTree,\n\t\tcreateNewResolvedUrl: IResolvedUrl,\n\t\tlogger?: ITelemetryBaseLogger,\n\t\tclientIsSummarizer?: boolean,\n\t): Promise<IDocumentService> {\n\t\tensureFluidResolvedUrl(createNewResolvedUrl);\n\t\tconst urlObj = parse(createNewResolvedUrl.url);\n\t\tif (urlObj.protocol === undefined || urlObj.protocol === null) {\n\t\t\tthrow new Error(\"No protocol provided\");\n\t\t}\n\t\tconst factory: IDocumentServiceFactory | undefined = this.protocolToDocumentFactoryMap.get(\n\t\t\turlObj.protocol,\n\t\t);\n\t\tif (factory === undefined) {\n\t\t\tthrow new Error(\"Unknown Fluid protocol\");\n\t\t}\n\t\treturn factory.createContainer(\n\t\t\tcreateNewSummary,\n\t\t\tcreateNewResolvedUrl,\n\t\t\tlogger,\n\t\t\tclientIsSummarizer,\n\t\t);\n\t}\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"multiUrlResolver.d.ts","sourceRoot":"","sources":["../src/multiUrlResolver.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAC3D,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAEhF;;;;GAIG;AACH,wBAAsB,uBAAuB,
|
|
1
|
+
{"version":3,"file":"multiUrlResolver.d.ts","sourceRoot":"","sources":["../src/multiUrlResolver.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAC3D,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAEhF;;;;GAIG;AACH,wBAAsB,uBAAuB,CAC5C,aAAa,EAAE,YAAY,EAAE,EAC7B,OAAO,EAAE,QAAQ,GACf,OAAO,CAAC,YAAY,GAAG,SAAS,CAAC,CASnC;AAED,qBAAa,gBAAiB,YAAW,YAAY;IAWhC,OAAO,CAAC,QAAQ,CAAC,YAAY;WAVnC,MAAM,CAAC,WAAW,EAAE,YAAY,GAAG,YAAY,EAAE;IAU/D,OAAO;IAED,OAAO,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,YAAY,GAAG,SAAS,CAAC;IAItD,cAAc,CAAC,WAAW,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;CAG5F"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"multiUrlResolver.js","sourceRoot":"","sources":["../src/multiUrlResolver.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,uBAAuB,
|
|
1
|
+
{"version":3,"file":"multiUrlResolver.js","sourceRoot":"","sources":["../src/multiUrlResolver.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAC5C,aAA6B,EAC7B,OAAiB;IAEjB,IAAI,QAAkC,CAAC;IACvC,KAAK,MAAM,QAAQ,IAAI,aAAa,EAAE;QACrC,QAAQ,GAAG,MAAM,QAAQ,CAAC,OAAO,mBAAM,OAAO,EAAG,CAAC;QAClD,IAAI,QAAQ,KAAK,SAAS,EAAE;YAC3B,OAAO,QAAQ,CAAC;SAChB;KACD;IACD,OAAO,SAAS,CAAC;AAClB,CAAC;AAED,MAAM,OAAO,gBAAgB;IAW5B,YAAqC,YAA4B;QAA5B,iBAAY,GAAZ,YAAY,CAAgB;IAAG,CAAC;IAV9D,MAAM,CAAC,MAAM,CAAC,WAA0C;QAC9D,IAAI,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE;YAC/B,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC,EAAE;gBAC7B,OAAO,WAAW,CAAC,CAAC,CAAC,CAAC;aACtB;YACD,OAAO,IAAI,gBAAgB,CAAC,WAAW,CAAC,CAAC;SACzC;QACD,OAAO,WAAW,CAAC;IACpB,CAAC;IAID,KAAK,CAAC,OAAO,CAAC,OAAiB;QAC9B,OAAO,uBAAuB,CAAC,IAAI,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;IAC5D,CAAC;IAEM,KAAK,CAAC,cAAc,CAAC,WAAyB,EAAE,WAAmB;QACzE,MAAM,IAAI,KAAK,CAAC,gBAAgB,CAAC,CAAC;IACnC,CAAC;CACD","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IRequest } from \"@fluidframework/core-interfaces\";\nimport { IResolvedUrl, IUrlResolver } from \"@fluidframework/driver-definitions\";\n\n/**\n * Resolver that takes a list of url resolvers and then try each of them to resolve the url.\n * @param resolversList - List of url resolvers to be used to resolve the request.\n * @param request - Request to be resolved.\n */\nexport async function configurableUrlResolver(\n\tresolversList: IUrlResolver[],\n\trequest: IRequest,\n): Promise<IResolvedUrl | undefined> {\n\tlet resolved: IResolvedUrl | undefined;\n\tfor (const resolver of resolversList) {\n\t\tresolved = await resolver.resolve({ ...request });\n\t\tif (resolved !== undefined) {\n\t\t\treturn resolved;\n\t\t}\n\t}\n\treturn undefined;\n}\n\nexport class MultiUrlResolver implements IUrlResolver {\n\tpublic static create(urlResolver: IUrlResolver | IUrlResolver[]) {\n\t\tif (Array.isArray(urlResolver)) {\n\t\t\tif (urlResolver.length === 1) {\n\t\t\t\treturn urlResolver[0];\n\t\t\t}\n\t\t\treturn new MultiUrlResolver(urlResolver);\n\t\t}\n\t\treturn urlResolver;\n\t}\n\n\tprivate constructor(private readonly urlResolvers: IUrlResolver[]) {}\n\n\tasync resolve(request: IRequest): Promise<IResolvedUrl | undefined> {\n\t\treturn configurableUrlResolver(this.urlResolvers, request);\n\t}\n\n\tpublic async getAbsoluteUrl(resolvedUrl: IResolvedUrl, relativeUrl: string): Promise<string> {\n\t\tthrow new Error(\"Not implmented\");\n\t}\n}\n"]}
|
package/lib/network.d.ts
CHANGED
|
@@ -22,7 +22,7 @@ export declare function isOnline(): OnlineStatus;
|
|
|
22
22
|
*
|
|
23
23
|
* @deprecated - In favour of {@link @fluidframework/driver-definitions#IAnyDriverError} so that
|
|
24
24
|
* it can used from the base to upper layers.
|
|
25
|
-
*/
|
|
25
|
+
*/
|
|
26
26
|
export interface IAnyDriverError extends Omit<IDriverErrorBase, "errorType"> {
|
|
27
27
|
readonly errorType: string;
|
|
28
28
|
}
|
package/lib/network.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"network.d.ts","sourceRoot":"","sources":["../src/network.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"network.d.ts","sourceRoot":"","sources":["../src/network.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,kBAAkB,EAClB,gBAAgB,EAChB,mBAAmB,EACnB,eAAe,EACf,yBAAyB,EACzB,YAAY,EACZ,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAC1E,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAEhF,oBAAY,YAAY;IACvB,OAAO,IAAA;IACP,MAAM,IAAA;IACN,OAAO,IAAA;CACP;AAKD,wBAAgB,QAAQ,IAAI,YAAY,CASvC;AAED;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,eAAgB,SAAQ,IAAI,CAAC,gBAAgB,EAAE,WAAW,CAAC;IAC3E,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC3B;AAED,+DAA+D;AAC/D,oBAAY,yBAAyB,GAAG,oBAAoB,GAAG;IAC9D,aAAa,EAAE,MAAM,GAAG,SAAS,CAAC;CAClC,CAAC;AAEF;;GAEG;AACH,qBAAa,mBAAoB,SAAQ,YAAa,YAAW,gBAAgB,EAAE,eAAe;IAGpE,QAAQ,CAAC,QAAQ,EAAE,OAAO;IAFvD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,GAAG,KAAG,MAAM,GAAG,SACrB,CAAC;AAEhD,kEAAkE;AAClE,eAAO,MAAM,sBAAsB,UAAW,GAAG,KAAG,MAAM,GAAG,SACuB,CAAC"}
|
package/lib/network.js
CHANGED
|
@@ -14,7 +14,9 @@ export var OnlineStatus;
|
|
|
14
14
|
// No solution for node.js (other than resolve dns names / ping specific sites)
|
|
15
15
|
// Can also use window.addEventListener("online" / "offline")
|
|
16
16
|
export function isOnline() {
|
|
17
|
-
if (typeof navigator === "object" &&
|
|
17
|
+
if (typeof navigator === "object" &&
|
|
18
|
+
navigator !== null &&
|
|
19
|
+
typeof navigator.onLine === "boolean") {
|
|
18
20
|
return navigator.onLine ? OnlineStatus.Online : OnlineStatus.Offline;
|
|
19
21
|
}
|
|
20
22
|
return OnlineStatus.Unknown;
|
|
@@ -112,6 +114,5 @@ export const canRetryOnError = (error) => (error === null || error === void 0 ?
|
|
|
112
114
|
/** Check retryAfterSeconds property on error */
|
|
113
115
|
export const getRetryDelaySecondsFromError = (error) => error === null || error === void 0 ? void 0 : error.retryAfterSeconds;
|
|
114
116
|
/** Check retryAfterSeconds property on error and convert to ms */
|
|
115
|
-
export const getRetryDelayFromError = (error) => (error === null || error === void 0 ? void 0 : error.retryAfterSeconds) !== undefined ?
|
|
116
|
-
error.retryAfterSeconds * 1000 : undefined;
|
|
117
|
+
export const getRetryDelayFromError = (error) => (error === null || error === void 0 ? void 0 : error.retryAfterSeconds) !== undefined ? error.retryAfterSeconds * 1000 : undefined;
|
|
117
118
|
//# sourceMappingURL=network.js.map
|
package/lib/network.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"network.js","sourceRoot":"","sources":["../src/network.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAIH,eAAe,GAGlB,MAAM,oCAAoC,CAAC;AAE5C,OAAO,EAAmB,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAEhF,MAAM,CAAN,IAAY,YAIX;AAJD,WAAY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AAK,aAAL,KAAK,uBAAL,KAAK,CAAE,iBAAiB,MAAK,SAAS,CAAC,CAAC;IAC9G,KAAK,CAAC,iBAAiB,GAAG,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport {\n IThrottlingWarning,\n IDriverErrorBase,\n IAuthorizationError,\n DriverErrorType,\n ILocationRedirectionError,\n IResolvedUrl,\n} from \"@fluidframework/driver-definitions\";\nimport { ITelemetryProperties } from \"@fluidframework/common-definitions\";\nimport { IFluidErrorBase, LoggingError } from \"@fluidframework/telemetry-utils\";\n\nexport enum OnlineStatus {\n Offline,\n Online,\n Unknown,\n}\n\n// It tells if we have local connection only - we might not have connection to web.\n// No solution for node.js (other than resolve dns names / ping specific sites)\n// Can also use window.addEventListener(\"online\" / \"offline\")\nexport function isOnline(): OnlineStatus {\n if (typeof navigator === \"object\" && navigator !== null && typeof navigator.onLine === \"boolean\") {\n return navigator.onLine ? OnlineStatus.Online : OnlineStatus.Offline;\n }\n return OnlineStatus.Unknown;\n}\n\n/**\n * Interface describing errors and warnings raised by any driver code.\n * Not expected to be implemented by a class or an object literal, but rather used in place of\n * any or unknown in various function signatures that pass errors around.\n *\n * \"Any\" in the interface name is a nod to the fact that errorType has lost its type constraint.\n * It will be either DriverErrorType or the specific driver's specialized error type enum,\n * but we can't reference a specific driver's error type enum in this code.\n *\n * @deprecated - In favour of {@link @fluidframework/driver-definitions#IAnyDriverError} so that\n * it can used from the base to upper layers.\n*/\nexport interface IAnyDriverError extends Omit<IDriverErrorBase, \"errorType\"> {\n readonly errorType: string;\n}\n\n/** Telemetry props with driver-specific required properties */\nexport type DriverErrorTelemetryProps = ITelemetryProperties & { driverVersion: string | undefined; };\n\n/**\n * Generic network error class.\n */\nexport class GenericNetworkError extends LoggingError implements IDriverErrorBase, IFluidErrorBase {\n readonly errorType = DriverErrorType.genericNetworkError;\n\n constructor(\n message: string,\n readonly canRetry: boolean,\n props: DriverErrorTelemetryProps,\n ) {\n super(message, props);\n }\n}\n\n/**\n * FluidInvalidSchema error class.\n */\n export class FluidInvalidSchemaError extends LoggingError implements IDriverErrorBase, IFluidErrorBase {\n readonly errorType = DriverErrorType.fluidInvalidSchema;\n readonly canRetry = false;\n\n constructor(\n message: string,\n props: DriverErrorTelemetryProps,\n ) {\n super(message, props);\n }\n}\n\nexport class DeltaStreamConnectionForbiddenError extends LoggingError implements IDriverErrorBase, IFluidErrorBase {\n static readonly errorType = DriverErrorType.deltaStreamConnectionForbidden;\n readonly errorType = DeltaStreamConnectionForbiddenError.errorType;\n readonly canRetry = false;\n\n constructor(message: string, props: DriverErrorTelemetryProps) {\n super(message, { ...props, statusCode: 400 });\n }\n}\n\nexport class AuthorizationError extends LoggingError implements IAuthorizationError, IFluidErrorBase {\n readonly errorType = DriverErrorType.authorizationError;\n readonly canRetry = false;\n\n constructor(\n message: string,\n readonly claims: string | undefined,\n readonly tenantId: string | undefined,\n props: DriverErrorTelemetryProps,\n ) {\n // don't log claims or tenantId\n super(message, props, new Set([\"claims\", \"tenantId\"]));\n }\n}\n\nexport class LocationRedirectionError extends LoggingError implements ILocationRedirectionError, IFluidErrorBase {\n readonly errorType = DriverErrorType.locationRedirection;\n readonly canRetry = false;\n\n constructor(\n message: string,\n readonly redirectUrl: IResolvedUrl,\n props: DriverErrorTelemetryProps,\n ) {\n // do not log redirectURL\n super(message, props, new Set([\"redirectUrl\"]));\n }\n}\n\nexport class NetworkErrorBasic<T extends string> extends LoggingError implements IFluidErrorBase {\n constructor(\n message: string,\n readonly errorType: T,\n readonly canRetry: boolean,\n props: DriverErrorTelemetryProps,\n ) {\n super(message, props);\n }\n}\n\nexport class NonRetryableError<T extends string> extends NetworkErrorBasic<T> {\n constructor(\n message: string,\n readonly errorType: T,\n props: DriverErrorTelemetryProps,\n ) {\n super(message, errorType, false, props);\n }\n}\n\nexport class RetryableError<T extends string> extends NetworkErrorBasic<T> {\n constructor(\n message: string,\n readonly errorType: T,\n props: DriverErrorTelemetryProps,\n ) {\n super(message, errorType, true, props);\n }\n}\n\n/**\n * Throttling error class - used to communicate all throttling errors\n */\nexport class ThrottlingError extends LoggingError implements IThrottlingWarning, IFluidErrorBase {\n readonly errorType = DriverErrorType.throttlingError;\n readonly canRetry = true;\n\n constructor(\n message: string,\n readonly retryAfterSeconds: number,\n props: DriverErrorTelemetryProps,\n ) {\n super(message, props);\n }\n}\n\nexport const createWriteError = (message: string, props: DriverErrorTelemetryProps) =>\n new NonRetryableError(message, DriverErrorType.writeError, props);\n\nexport function createGenericNetworkError(\n message: string,\n retryInfo: { canRetry: boolean; retryAfterMs?: number; },\n props: DriverErrorTelemetryProps,\n): ThrottlingError | GenericNetworkError {\n if (retryInfo.retryAfterMs !== undefined && retryInfo.canRetry) {\n return new ThrottlingError(\n message, retryInfo.retryAfterMs / 1000, props);\n }\n return new GenericNetworkError(message, retryInfo.canRetry, props);\n}\n\n/**\n * Check if a connection error can be retried. Unless explicitly allowed, retry is disallowed.\n * I.e. asserts or unexpected exceptions in our code result in container failure.\n * @param error - The error to inspect for ability to retry\n */\nexport const canRetryOnError = (error: any): boolean => error?.canRetry === true;\n\n/** Check retryAfterSeconds property on error */\nexport const getRetryDelaySecondsFromError = (error: any): number | undefined =>\n error?.retryAfterSeconds as number | undefined;\n\n/** Check retryAfterSeconds property on error and convert to ms */\nexport const getRetryDelayFromError = (error: any): number | undefined => error?.retryAfterSeconds !== undefined ?\n error.retryAfterSeconds * 1000 : undefined;\n"]}
|
|
1
|
+
{"version":3,"file":"network.js","sourceRoot":"","sources":["../src/network.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAIN,eAAe,GAGf,MAAM,oCAAoC,CAAC;AAE5C,OAAO,EAAmB,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAEhF,MAAM,CAAN,IAAY,YAIX;AAJD,WAAY,YAAY;IACvB,qDAAO,CAAA;IACP,mDAAM,CAAA;IAC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C,CAAC,CAAC,KAAK,CAAC,iBAAiB,GAAG,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport {\n\tIThrottlingWarning,\n\tIDriverErrorBase,\n\tIAuthorizationError,\n\tDriverErrorType,\n\tILocationRedirectionError,\n\tIResolvedUrl,\n} from \"@fluidframework/driver-definitions\";\nimport { ITelemetryProperties } from \"@fluidframework/common-definitions\";\nimport { IFluidErrorBase, LoggingError } from \"@fluidframework/telemetry-utils\";\n\nexport enum OnlineStatus {\n\tOffline,\n\tOnline,\n\tUnknown,\n}\n\n// It tells if we have local connection only - we might not have connection to web.\n// No solution for node.js (other than resolve dns names / ping specific sites)\n// Can also use window.addEventListener(\"online\" / \"offline\")\nexport function isOnline(): OnlineStatus {\n\tif (\n\t\ttypeof navigator === \"object\" &&\n\t\tnavigator !== null &&\n\t\ttypeof navigator.onLine === \"boolean\"\n\t) {\n\t\treturn navigator.onLine ? OnlineStatus.Online : OnlineStatus.Offline;\n\t}\n\treturn OnlineStatus.Unknown;\n}\n\n/**\n * Interface describing errors and warnings raised by any driver code.\n * Not expected to be implemented by a class or an object literal, but rather used in place of\n * any or unknown in various function signatures that pass errors around.\n *\n * \"Any\" in the interface name is a nod to the fact that errorType has lost its type constraint.\n * It will be either DriverErrorType or the specific driver's specialized error type enum,\n * but we can't reference a specific driver's error type enum in this code.\n *\n * @deprecated - In favour of {@link @fluidframework/driver-definitions#IAnyDriverError} so that\n * it can used from the base to upper layers.\n */\nexport interface IAnyDriverError extends Omit<IDriverErrorBase, \"errorType\"> {\n\treadonly errorType: string;\n}\n\n/** Telemetry props with driver-specific required properties */\nexport type DriverErrorTelemetryProps = ITelemetryProperties & {\n\tdriverVersion: string | undefined;\n};\n\n/**\n * Generic network error class.\n */\nexport class GenericNetworkError extends LoggingError implements IDriverErrorBase, IFluidErrorBase {\n\treadonly errorType = DriverErrorType.genericNetworkError;\n\n\tconstructor(message: string, readonly canRetry: boolean, props: DriverErrorTelemetryProps) {\n\t\tsuper(message, props);\n\t}\n}\n\n/**\n * FluidInvalidSchema error class.\n */\nexport class FluidInvalidSchemaError\n\textends LoggingError\n\timplements IDriverErrorBase, IFluidErrorBase\n{\n\treadonly errorType = DriverErrorType.fluidInvalidSchema;\n\treadonly canRetry = false;\n\n\tconstructor(message: string, props: DriverErrorTelemetryProps) {\n\t\tsuper(message, props);\n\t}\n}\n\nexport class DeltaStreamConnectionForbiddenError\n\textends LoggingError\n\timplements IDriverErrorBase, IFluidErrorBase\n{\n\tstatic readonly errorType = DriverErrorType.deltaStreamConnectionForbidden;\n\treadonly errorType = DeltaStreamConnectionForbiddenError.errorType;\n\treadonly canRetry = false;\n\n\tconstructor(message: string, props: DriverErrorTelemetryProps) {\n\t\tsuper(message, { ...props, statusCode: 400 });\n\t}\n}\n\nexport class AuthorizationError\n\textends LoggingError\n\timplements IAuthorizationError, IFluidErrorBase\n{\n\treadonly errorType = DriverErrorType.authorizationError;\n\treadonly canRetry = false;\n\n\tconstructor(\n\t\tmessage: string,\n\t\treadonly claims: string | undefined,\n\t\treadonly tenantId: string | undefined,\n\t\tprops: DriverErrorTelemetryProps,\n\t) {\n\t\t// don't log claims or tenantId\n\t\tsuper(message, props, new Set([\"claims\", \"tenantId\"]));\n\t}\n}\n\nexport class LocationRedirectionError\n\textends LoggingError\n\timplements ILocationRedirectionError, IFluidErrorBase\n{\n\treadonly errorType = DriverErrorType.locationRedirection;\n\treadonly canRetry = false;\n\n\tconstructor(\n\t\tmessage: string,\n\t\treadonly redirectUrl: IResolvedUrl,\n\t\tprops: DriverErrorTelemetryProps,\n\t) {\n\t\t// do not log redirectURL\n\t\tsuper(message, props, new Set([\"redirectUrl\"]));\n\t}\n}\n\nexport class NetworkErrorBasic<T extends string> extends LoggingError implements IFluidErrorBase {\n\tconstructor(\n\t\tmessage: string,\n\t\treadonly errorType: T,\n\t\treadonly canRetry: boolean,\n\t\tprops: DriverErrorTelemetryProps,\n\t) {\n\t\tsuper(message, props);\n\t}\n}\n\nexport class NonRetryableError<T extends string> extends NetworkErrorBasic<T> {\n\tconstructor(message: string, readonly errorType: T, props: DriverErrorTelemetryProps) {\n\t\tsuper(message, errorType, false, props);\n\t}\n}\n\nexport class RetryableError<T extends string> extends NetworkErrorBasic<T> {\n\tconstructor(message: string, readonly errorType: T, props: DriverErrorTelemetryProps) {\n\t\tsuper(message, errorType, true, props);\n\t}\n}\n\n/**\n * Throttling error class - used to communicate all throttling errors\n */\nexport class ThrottlingError extends LoggingError implements IThrottlingWarning, IFluidErrorBase {\n\treadonly errorType = DriverErrorType.throttlingError;\n\treadonly canRetry = true;\n\n\tconstructor(\n\t\tmessage: string,\n\t\treadonly retryAfterSeconds: number,\n\t\tprops: DriverErrorTelemetryProps,\n\t) {\n\t\tsuper(message, props);\n\t}\n}\n\nexport const createWriteError = (message: string, props: DriverErrorTelemetryProps) =>\n\tnew NonRetryableError(message, DriverErrorType.writeError, props);\n\nexport function createGenericNetworkError(\n\tmessage: string,\n\tretryInfo: { canRetry: boolean; retryAfterMs?: number },\n\tprops: DriverErrorTelemetryProps,\n): ThrottlingError | GenericNetworkError {\n\tif (retryInfo.retryAfterMs !== undefined && retryInfo.canRetry) {\n\t\treturn new ThrottlingError(message, retryInfo.retryAfterMs / 1000, props);\n\t}\n\treturn new GenericNetworkError(message, retryInfo.canRetry, props);\n}\n\n/**\n * Check if a connection error can be retried. Unless explicitly allowed, retry is disallowed.\n * I.e. asserts or unexpected exceptions in our code result in container failure.\n * @param error - The error to inspect for ability to retry\n */\nexport const canRetryOnError = (error: any): boolean => error?.canRetry === true;\n\n/** Check retryAfterSeconds property on error */\nexport const getRetryDelaySecondsFromError = (error: any): number | undefined =>\n\terror?.retryAfterSeconds as number | undefined;\n\n/** Check retryAfterSeconds property on error and convert to ms */\nexport const getRetryDelayFromError = (error: any): number | undefined =>\n\terror?.retryAfterSeconds !== undefined ? error.retryAfterSeconds * 1000 : undefined;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"networkUtils.d.ts","sourceRoot":"","sources":["../src/networkUtils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAG5F,wBAAgB,iBAAiB,
|
|
1
|
+
{"version":3,"file":"networkUtils.d.ts","sourceRoot":"","sources":["../src/networkUtils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAG5F,wBAAgB,iBAAiB,CAChC,MAAM,EAAE,gBAAgB,EACxB,KAAK,EAAE,oBAAoB,EAC3B,KAAK,CAAC,EAAE,GAAG,QAmBX;AAED;;;;;;;;GAQG;AAEH,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAoBrE"}
|
package/lib/networkUtils.js
CHANGED
|
@@ -7,9 +7,8 @@ export function logNetworkFailure(logger, event, error) {
|
|
|
7
7
|
var _a, _b;
|
|
8
8
|
const newEvent = Object.assign({}, event);
|
|
9
9
|
const errorOnlineProp = error.online;
|
|
10
|
-
newEvent.online =
|
|
11
|
-
? errorOnlineProp
|
|
12
|
-
: OnlineStatus[isOnline()];
|
|
10
|
+
newEvent.online =
|
|
11
|
+
typeof errorOnlineProp === "string" ? errorOnlineProp : OnlineStatus[isOnline()];
|
|
13
12
|
if (typeof navigator === "object" && navigator !== null) {
|
|
14
13
|
const nav = navigator;
|
|
15
14
|
const connection = (_b = (_a = nav.connection) !== null && _a !== void 0 ? _a : nav.mozConnection) !== null && _b !== void 0 ? _b : nav.webkitConnection;
|
package/lib/networkUtils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"networkUtils.js","sourceRoot":"","sources":["../src/networkUtils.ts"],"names":[],"mappings":"AAAA;;;GAG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B,MAAM,oBAAoB,GAAG,KAAK,CAAC;IAEnC,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;QAC9B,IAAI,QAAQ,GAAe,OAAO,CAAC;QACnC,IAAI,KAAK,GAAG,QAAQ,CAAC;QACrB,IAAI,QAAQ,EAAE,KAAK,YAAY,CAAC,OAAO,EAAE;YACxC,IAAI,CAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,gBAAgB,MAAK,SAAS,EAAE;gBAC3C,QAAQ,GAAG,GAAG,EAAE;oBACf,OAAO,EAAE,CAAC;oBACV,MAAM,CAAC,mBAAmB,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;gBAChD,CAAC,CAAC;gBACF,MAAM,CAAC,gBAAgB,CAAC,QAAQ,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAC;gBACnD,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE,oBAAoB,CAAC,CAAC;aACjD;SACD;QACD,UAAU,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;IAC7B,CAAC,CAAC,CAAC;AACJ,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { ITelemetryErrorEvent, ITelemetryLogger } from \"@fluidframework/common-definitions\";\nimport { isOnline, OnlineStatus, canRetryOnError } from \"./network\";\n\nexport function logNetworkFailure(\n\tlogger: ITelemetryLogger,\n\tevent: ITelemetryErrorEvent,\n\terror?: any,\n) {\n\tconst newEvent = { ...event };\n\n\tconst errorOnlineProp = error.online;\n\tnewEvent.online =\n\t\ttypeof errorOnlineProp === \"string\" ? errorOnlineProp : OnlineStatus[isOnline()];\n\n\tif (typeof navigator === \"object\" && navigator !== null) {\n\t\tconst nav = navigator as any;\n\t\tconst connection = nav.connection ?? nav.mozConnection ?? nav.webkitConnection;\n\t\tif (connection !== null && typeof connection === \"object\") {\n\t\t\tnewEvent.connectionType = connection.type;\n\t\t}\n\t}\n\n\t// non-retryable errors are fatal and should be logged as errors\n\tnewEvent.category = canRetryOnError(error) ? \"generic\" : \"error\";\n\tlogger.sendTelemetryEvent(newEvent, error);\n}\n\n/**\n * Wait for browser to get to connected state.\n * If connected, waits minimum of minDelay anyway (between network retries)\n * If disconnected, polls every 30 seconds anyway, to make sure we are not getting stuck because of wrong signal\n * Note that browsers will have false positives (like having Hyper-V adapter on machine,\n * or machine connected to router that is not connected to internet)\n * But there should be no false negatives.\n * The only exception - Opera returns false when user enters \"Work Offline\" mode, regardless of actual connectivity.\n */\n// eslint-disable-next-line @typescript-eslint/promise-function-async\nexport function waitForConnectedState(minDelay: number): Promise<void> {\n\t// Use this frequency to poll even when we are offline and able to setup online/offline listener\n\t// This is mostly safety net\n\tconst offlinePollFrequency = 30000;\n\n\treturn new Promise((resolve) => {\n\t\tlet listener: () => void = resolve;\n\t\tlet delay = minDelay;\n\t\tif (isOnline() === OnlineStatus.Offline) {\n\t\t\tif (window?.addEventListener !== undefined) {\n\t\t\t\tlistener = () => {\n\t\t\t\t\tresolve();\n\t\t\t\t\twindow.removeEventListener(\"online\", listener);\n\t\t\t\t};\n\t\t\t\twindow.addEventListener(\"online\", listener, false);\n\t\t\t\tdelay = Math.max(minDelay, offlinePollFrequency);\n\t\t\t}\n\t\t}\n\t\tsetTimeout(listener, delay);\n\t});\n}\n"]}
|
package/lib/packageVersion.d.ts
CHANGED
|
@@ -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/driver-utils";
|
|
8
|
-
export declare const pkgVersion = "2.0.0-internal.3.
|
|
8
|
+
export declare const pkgVersion = "2.0.0-internal.3.1.1";
|
|
9
9
|
//# sourceMappingURL=packageVersion.d.ts.map
|
package/lib/packageVersion.js
CHANGED
|
@@ -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/driver-utils";
|
|
8
|
-
export const pkgVersion = "2.0.0-internal.3.
|
|
8
|
+
export const pkgVersion = "2.0.0-internal.3.1.1";
|
|
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,sBAAsB,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/driver-utils\";\nexport const pkgVersion = \"2.0.0-internal.3.
|
|
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,sBAAsB,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/driver-utils\";\nexport const pkgVersion = \"2.0.0-internal.3.1.1\";\n"]}
|