@fluidframework/odsp-driver 2.50.0 → 2.51.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.cjs +12 -0
- package/CHANGELOG.md +4 -0
- package/dist/checkUrl.d.ts +1 -1
- package/dist/checkUrl.d.ts.map +1 -1
- package/dist/checkUrl.js.map +1 -1
- package/dist/compactSnapshotParser.d.ts +2 -2
- package/dist/compactSnapshotParser.d.ts.map +1 -1
- package/dist/compactSnapshotParser.js.map +1 -1
- package/dist/compactSnapshotWriter.d.ts +1 -1
- package/dist/compactSnapshotWriter.d.ts.map +1 -1
- package/dist/compactSnapshotWriter.js.map +1 -1
- package/dist/contracts.d.ts +3 -3
- package/dist/contracts.d.ts.map +1 -1
- package/dist/contracts.js.map +1 -1
- package/dist/contractsPublic.d.ts +18 -2
- package/dist/contractsPublic.d.ts.map +1 -1
- package/dist/contractsPublic.js +12 -1
- package/dist/contractsPublic.js.map +1 -1
- package/dist/createFile/createFile.d.ts +6 -6
- package/dist/createFile/createFile.d.ts.map +1 -1
- package/dist/createFile/createFile.js.map +1 -1
- package/dist/createFile/createNewContainerOnExistingFile.d.ts +6 -6
- package/dist/createFile/createNewContainerOnExistingFile.d.ts.map +1 -1
- package/dist/createFile/createNewContainerOnExistingFile.js +11 -2
- package/dist/createFile/createNewContainerOnExistingFile.js.map +1 -1
- package/dist/createFile/createNewUtils.d.ts +9 -6
- package/dist/createFile/createNewUtils.d.ts.map +1 -1
- package/dist/createFile/createNewUtils.js +19 -8
- package/dist/createFile/createNewUtils.js.map +1 -1
- package/dist/createFile/index.d.ts +1 -1
- package/dist/createFile/index.d.ts.map +1 -1
- package/dist/createFile/index.js.map +1 -1
- package/dist/createOdspCreateContainerRequest.d.ts +2 -2
- package/dist/createOdspCreateContainerRequest.d.ts.map +1 -1
- package/dist/createOdspCreateContainerRequest.js.map +1 -1
- package/dist/createOdspUrl.d.ts +1 -1
- package/dist/createOdspUrl.d.ts.map +1 -1
- package/dist/createOdspUrl.js.map +1 -1
- package/dist/epochTracker.d.ts +4 -4
- package/dist/epochTracker.d.ts.map +1 -1
- package/dist/epochTracker.js.map +1 -1
- package/dist/fetchSnapshot.d.ts +6 -6
- package/dist/fetchSnapshot.d.ts.map +1 -1
- package/dist/fetchSnapshot.js +7 -0
- package/dist/fetchSnapshot.js.map +1 -1
- package/dist/getFileLink.d.ts +2 -2
- package/dist/getFileLink.d.ts.map +1 -1
- package/dist/getFileLink.js.map +1 -1
- package/dist/getQueryString.d.ts +1 -1
- package/dist/getQueryString.d.ts.map +1 -1
- package/dist/getQueryString.js.map +1 -1
- package/dist/index.d.ts +7 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/localOdspDriver/localOdspDeltaStorageService.d.ts +2 -2
- package/dist/localOdspDriver/localOdspDeltaStorageService.d.ts.map +1 -1
- package/dist/localOdspDriver/localOdspDeltaStorageService.js.map +1 -1
- package/dist/localOdspDriver/localOdspDocumentService.d.ts +4 -4
- package/dist/localOdspDriver/localOdspDocumentService.d.ts.map +1 -1
- package/dist/localOdspDriver/localOdspDocumentService.js.map +1 -1
- package/dist/localOdspDriver/localOdspDocumentServiceFactory.d.ts +5 -5
- package/dist/localOdspDriver/localOdspDocumentServiceFactory.d.ts.map +1 -1
- package/dist/localOdspDriver/localOdspDocumentServiceFactory.js.map +1 -1
- package/dist/localOdspDriver/localOdspDocumentStorageManager.d.ts +3 -3
- package/dist/localOdspDriver/localOdspDocumentStorageManager.d.ts.map +1 -1
- package/dist/localOdspDriver/localOdspDocumentStorageManager.js.map +1 -1
- package/dist/localOdspDriver/localOdspLayerCompatState.d.ts +1 -1
- package/dist/localOdspDriver/localOdspLayerCompatState.d.ts.map +1 -1
- package/dist/localOdspDriver/localOdspLayerCompatState.js.map +1 -1
- package/dist/odspCache.d.ts +2 -2
- package/dist/odspCache.d.ts.map +1 -1
- package/dist/odspCache.js.map +1 -1
- package/dist/odspDelayLoadedDeltaStream.d.ts +6 -6
- package/dist/odspDelayLoadedDeltaStream.d.ts.map +1 -1
- package/dist/odspDelayLoadedDeltaStream.js +9 -0
- package/dist/odspDelayLoadedDeltaStream.js.map +1 -1
- package/dist/odspDeltaStorageService.d.ts +6 -6
- package/dist/odspDeltaStorageService.d.ts.map +1 -1
- package/dist/odspDeltaStorageService.js.map +1 -1
- package/dist/odspDocumentDeltaConnection.d.ts +5 -5
- package/dist/odspDocumentDeltaConnection.d.ts.map +1 -1
- package/dist/odspDocumentDeltaConnection.js.map +1 -1
- package/dist/odspDocumentService.d.ts +6 -6
- package/dist/odspDocumentService.d.ts.map +1 -1
- package/dist/odspDocumentService.js.map +1 -1
- package/dist/odspDocumentServiceFactory.d.ts +2 -2
- package/dist/odspDocumentServiceFactory.d.ts.map +1 -1
- package/dist/odspDocumentServiceFactory.js.map +1 -1
- package/dist/odspDocumentServiceFactoryCore.d.ts +7 -7
- package/dist/odspDocumentServiceFactoryCore.d.ts.map +1 -1
- package/dist/odspDocumentServiceFactoryCore.js +1 -1
- package/dist/odspDocumentServiceFactoryCore.js.map +1 -1
- package/dist/odspDocumentStorageManager.d.ts +9 -9
- package/dist/odspDocumentStorageManager.d.ts.map +1 -1
- package/dist/odspDocumentStorageManager.js.map +1 -1
- package/dist/odspDocumentStorageServiceBase.d.ts +3 -3
- package/dist/odspDocumentStorageServiceBase.d.ts.map +1 -1
- package/dist/odspDocumentStorageServiceBase.js.map +1 -1
- package/dist/odspDriverUrlResolver.d.ts +3 -3
- package/dist/odspDriverUrlResolver.d.ts.map +1 -1
- package/dist/odspDriverUrlResolver.js +3 -0
- package/dist/odspDriverUrlResolver.js.map +1 -1
- package/dist/odspDriverUrlResolverForShareLink.d.ts +4 -4
- package/dist/odspDriverUrlResolverForShareLink.d.ts.map +1 -1
- package/dist/odspDriverUrlResolverForShareLink.js.map +1 -1
- package/dist/odspError.d.ts +3 -3
- package/dist/odspError.d.ts.map +1 -1
- package/dist/odspError.js.map +1 -1
- package/dist/odspFluidFileLink.d.ts +1 -1
- package/dist/odspFluidFileLink.d.ts.map +1 -1
- package/dist/odspFluidFileLink.js.map +1 -1
- package/dist/odspLayerCompatState.d.ts +1 -1
- package/dist/odspLayerCompatState.d.ts.map +1 -1
- package/dist/odspLayerCompatState.js.map +1 -1
- package/dist/odspLocationRedirection.d.ts +2 -2
- package/dist/odspLocationRedirection.d.ts.map +1 -1
- package/dist/odspLocationRedirection.js.map +1 -1
- package/dist/odspPublicUtils.d.ts +1 -1
- package/dist/odspPublicUtils.d.ts.map +1 -1
- package/dist/odspPublicUtils.js.map +1 -1
- package/dist/odspSnapshotParser.d.ts +2 -2
- package/dist/odspSnapshotParser.d.ts.map +1 -1
- package/dist/odspSnapshotParser.js.map +1 -1
- package/dist/odspSummaryUploadManager.d.ts +5 -5
- package/dist/odspSummaryUploadManager.d.ts.map +1 -1
- package/dist/odspSummaryUploadManager.js.map +1 -1
- package/dist/odspUrlHelper.d.ts +1 -1
- package/dist/odspUrlHelper.d.ts.map +1 -1
- package/dist/odspUrlHelper.js.map +1 -1
- package/dist/odspUtils.d.ts +5 -5
- package/dist/odspUtils.d.ts.map +1 -1
- package/dist/odspUtils.js.map +1 -1
- package/dist/opsCaching.d.ts +1 -1
- package/dist/opsCaching.d.ts.map +1 -1
- package/dist/opsCaching.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/prefetchLatestSnapshot.d.ts +5 -5
- package/dist/prefetchLatestSnapshot.d.ts.map +1 -1
- package/dist/prefetchLatestSnapshot.js.map +1 -1
- package/dist/retryErrorsStorageAdapter.d.ts +4 -4
- package/dist/retryErrorsStorageAdapter.d.ts.map +1 -1
- package/dist/retryErrorsStorageAdapter.js.map +1 -1
- package/dist/retryUtils.d.ts +1 -1
- package/dist/retryUtils.d.ts.map +1 -1
- package/dist/retryUtils.js.map +1 -1
- package/dist/vroom.d.ts +4 -4
- package/dist/vroom.d.ts.map +1 -1
- package/dist/vroom.js.map +1 -1
- package/dist/zipItDataRepresentationUtils.d.ts +2 -2
- package/dist/zipItDataRepresentationUtils.d.ts.map +1 -1
- package/dist/zipItDataRepresentationUtils.js.map +1 -1
- package/lib/checkUrl.d.ts +1 -1
- package/lib/checkUrl.d.ts.map +1 -1
- package/lib/checkUrl.js.map +1 -1
- package/lib/compactSnapshotParser.d.ts +2 -2
- package/lib/compactSnapshotParser.d.ts.map +1 -1
- package/lib/compactSnapshotParser.js.map +1 -1
- package/lib/compactSnapshotWriter.d.ts +1 -1
- package/lib/compactSnapshotWriter.d.ts.map +1 -1
- package/lib/compactSnapshotWriter.js.map +1 -1
- package/lib/contracts.d.ts +3 -3
- package/lib/contracts.d.ts.map +1 -1
- package/lib/contracts.js.map +1 -1
- package/lib/contractsPublic.d.ts +18 -2
- package/lib/contractsPublic.d.ts.map +1 -1
- package/lib/contractsPublic.js +11 -0
- package/lib/contractsPublic.js.map +1 -1
- package/lib/createFile/createFile.d.ts +6 -6
- package/lib/createFile/createFile.d.ts.map +1 -1
- package/lib/createFile/createFile.js.map +1 -1
- package/lib/createFile/createNewContainerOnExistingFile.d.ts +6 -6
- package/lib/createFile/createNewContainerOnExistingFile.d.ts.map +1 -1
- package/lib/createFile/createNewContainerOnExistingFile.js +12 -3
- package/lib/createFile/createNewContainerOnExistingFile.js.map +1 -1
- package/lib/createFile/createNewUtils.d.ts +9 -6
- package/lib/createFile/createNewUtils.d.ts.map +1 -1
- package/lib/createFile/createNewUtils.js +19 -8
- package/lib/createFile/createNewUtils.js.map +1 -1
- package/lib/createFile/index.d.ts +1 -1
- package/lib/createFile/index.d.ts.map +1 -1
- package/lib/createFile/index.js.map +1 -1
- package/lib/createOdspCreateContainerRequest.d.ts +2 -2
- package/lib/createOdspCreateContainerRequest.d.ts.map +1 -1
- package/lib/createOdspCreateContainerRequest.js.map +1 -1
- package/lib/createOdspUrl.d.ts +1 -1
- package/lib/createOdspUrl.d.ts.map +1 -1
- package/lib/createOdspUrl.js.map +1 -1
- package/lib/epochTracker.d.ts +4 -4
- package/lib/epochTracker.d.ts.map +1 -1
- package/lib/epochTracker.js.map +1 -1
- package/lib/fetchSnapshot.d.ts +6 -6
- package/lib/fetchSnapshot.d.ts.map +1 -1
- package/lib/fetchSnapshot.js +7 -0
- package/lib/fetchSnapshot.js.map +1 -1
- package/lib/getFileLink.d.ts +2 -2
- package/lib/getFileLink.d.ts.map +1 -1
- package/lib/getFileLink.js.map +1 -1
- package/lib/getQueryString.d.ts +1 -1
- package/lib/getQueryString.d.ts.map +1 -1
- package/lib/getQueryString.js.map +1 -1
- package/lib/index.d.ts +7 -7
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js.map +1 -1
- package/lib/localOdspDriver/localOdspDeltaStorageService.d.ts +2 -2
- package/lib/localOdspDriver/localOdspDeltaStorageService.d.ts.map +1 -1
- package/lib/localOdspDriver/localOdspDeltaStorageService.js.map +1 -1
- package/lib/localOdspDriver/localOdspDocumentService.d.ts +4 -4
- package/lib/localOdspDriver/localOdspDocumentService.d.ts.map +1 -1
- package/lib/localOdspDriver/localOdspDocumentService.js.map +1 -1
- package/lib/localOdspDriver/localOdspDocumentServiceFactory.d.ts +5 -5
- package/lib/localOdspDriver/localOdspDocumentServiceFactory.d.ts.map +1 -1
- package/lib/localOdspDriver/localOdspDocumentServiceFactory.js.map +1 -1
- package/lib/localOdspDriver/localOdspDocumentStorageManager.d.ts +3 -3
- package/lib/localOdspDriver/localOdspDocumentStorageManager.d.ts.map +1 -1
- package/lib/localOdspDriver/localOdspDocumentStorageManager.js.map +1 -1
- package/lib/localOdspDriver/localOdspLayerCompatState.d.ts +1 -1
- package/lib/localOdspDriver/localOdspLayerCompatState.d.ts.map +1 -1
- package/lib/localOdspDriver/localOdspLayerCompatState.js.map +1 -1
- package/lib/odspCache.d.ts +2 -2
- package/lib/odspCache.d.ts.map +1 -1
- package/lib/odspCache.js.map +1 -1
- package/lib/odspDelayLoadedDeltaStream.d.ts +6 -6
- package/lib/odspDelayLoadedDeltaStream.d.ts.map +1 -1
- package/lib/odspDelayLoadedDeltaStream.js +9 -0
- package/lib/odspDelayLoadedDeltaStream.js.map +1 -1
- package/lib/odspDeltaStorageService.d.ts +6 -6
- package/lib/odspDeltaStorageService.d.ts.map +1 -1
- package/lib/odspDeltaStorageService.js.map +1 -1
- package/lib/odspDocumentDeltaConnection.d.ts +5 -5
- package/lib/odspDocumentDeltaConnection.d.ts.map +1 -1
- package/lib/odspDocumentDeltaConnection.js.map +1 -1
- package/lib/odspDocumentService.d.ts +6 -6
- package/lib/odspDocumentService.d.ts.map +1 -1
- package/lib/odspDocumentService.js.map +1 -1
- package/lib/odspDocumentServiceFactory.d.ts +2 -2
- package/lib/odspDocumentServiceFactory.d.ts.map +1 -1
- package/lib/odspDocumentServiceFactory.js.map +1 -1
- package/lib/odspDocumentServiceFactoryCore.d.ts +7 -7
- package/lib/odspDocumentServiceFactoryCore.d.ts.map +1 -1
- package/lib/odspDocumentServiceFactoryCore.js +1 -1
- package/lib/odspDocumentServiceFactoryCore.js.map +1 -1
- package/lib/odspDocumentStorageManager.d.ts +9 -9
- package/lib/odspDocumentStorageManager.d.ts.map +1 -1
- package/lib/odspDocumentStorageManager.js.map +1 -1
- package/lib/odspDocumentStorageServiceBase.d.ts +3 -3
- package/lib/odspDocumentStorageServiceBase.d.ts.map +1 -1
- package/lib/odspDocumentStorageServiceBase.js.map +1 -1
- package/lib/odspDriverUrlResolver.d.ts +3 -3
- package/lib/odspDriverUrlResolver.d.ts.map +1 -1
- package/lib/odspDriverUrlResolver.js +4 -1
- package/lib/odspDriverUrlResolver.js.map +1 -1
- package/lib/odspDriverUrlResolverForShareLink.d.ts +4 -4
- package/lib/odspDriverUrlResolverForShareLink.d.ts.map +1 -1
- package/lib/odspDriverUrlResolverForShareLink.js.map +1 -1
- package/lib/odspError.d.ts +3 -3
- package/lib/odspError.d.ts.map +1 -1
- package/lib/odspError.js +1 -1
- package/lib/odspError.js.map +1 -1
- package/lib/odspFluidFileLink.d.ts +1 -1
- package/lib/odspFluidFileLink.d.ts.map +1 -1
- package/lib/odspFluidFileLink.js.map +1 -1
- package/lib/odspLayerCompatState.d.ts +1 -1
- package/lib/odspLayerCompatState.d.ts.map +1 -1
- package/lib/odspLayerCompatState.js.map +1 -1
- package/lib/odspLocationRedirection.d.ts +2 -2
- package/lib/odspLocationRedirection.d.ts.map +1 -1
- package/lib/odspLocationRedirection.js.map +1 -1
- package/lib/odspPublicUtils.d.ts +1 -1
- package/lib/odspPublicUtils.d.ts.map +1 -1
- package/lib/odspPublicUtils.js.map +1 -1
- package/lib/odspSnapshotParser.d.ts +2 -2
- package/lib/odspSnapshotParser.d.ts.map +1 -1
- package/lib/odspSnapshotParser.js.map +1 -1
- package/lib/odspSummaryUploadManager.d.ts +5 -5
- package/lib/odspSummaryUploadManager.d.ts.map +1 -1
- package/lib/odspSummaryUploadManager.js +1 -1
- package/lib/odspSummaryUploadManager.js.map +1 -1
- package/lib/odspUrlHelper.d.ts +1 -1
- package/lib/odspUrlHelper.d.ts.map +1 -1
- package/lib/odspUrlHelper.js.map +1 -1
- package/lib/odspUtils.d.ts +5 -5
- package/lib/odspUtils.d.ts.map +1 -1
- package/lib/odspUtils.js.map +1 -1
- package/lib/opsCaching.d.ts +1 -1
- package/lib/opsCaching.d.ts.map +1 -1
- package/lib/opsCaching.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/prefetchLatestSnapshot.d.ts +5 -5
- package/lib/prefetchLatestSnapshot.d.ts.map +1 -1
- package/lib/prefetchLatestSnapshot.js.map +1 -1
- package/lib/retryErrorsStorageAdapter.d.ts +4 -4
- package/lib/retryErrorsStorageAdapter.d.ts.map +1 -1
- package/lib/retryErrorsStorageAdapter.js.map +1 -1
- package/lib/retryUtils.d.ts +1 -1
- package/lib/retryUtils.d.ts.map +1 -1
- package/lib/retryUtils.js.map +1 -1
- package/lib/vroom.d.ts +4 -4
- package/lib/vroom.d.ts.map +1 -1
- package/lib/vroom.js.map +1 -1
- package/lib/zipItDataRepresentationUtils.d.ts +2 -2
- package/lib/zipItDataRepresentationUtils.d.ts.map +1 -1
- package/lib/zipItDataRepresentationUtils.js.map +1 -1
- package/package.json +13 -14
- package/src/checkUrl.ts +1 -1
- package/src/compactSnapshotParser.ts +4 -4
- package/src/compactSnapshotWriter.ts +2 -2
- package/src/contracts.ts +3 -3
- package/src/contractsPublic.ts +20 -2
- package/src/createFile/createFile.ts +10 -10
- package/src/createFile/createNewContainerOnExistingFile.ts +20 -9
- package/src/createFile/createNewUtils.ts +27 -15
- package/src/createFile/index.ts +2 -1
- package/src/createOdspCreateContainerRequest.ts +2 -2
- package/src/createOdspUrl.ts +1 -1
- package/src/epochTracker.ts +11 -11
- package/src/fetchSnapshot.ts +20 -13
- package/src/getFileLink.ts +4 -4
- package/src/getQueryString.ts +1 -1
- package/src/index.ts +10 -10
- package/src/localOdspDriver/localOdspDeltaStorageService.ts +2 -2
- package/src/localOdspDriver/localOdspDocumentService.ts +4 -4
- package/src/localOdspDriver/localOdspDocumentServiceFactory.ts +8 -5
- package/src/localOdspDriver/localOdspDocumentStorageManager.ts +4 -4
- package/src/localOdspDriver/localOdspLayerCompatState.ts +1 -1
- package/src/odspCache.ts +7 -7
- package/src/odspDelayLoadedDeltaStream.ts +24 -14
- package/src/odspDeltaStorageService.ts +8 -8
- package/src/odspDocumentDeltaConnection.ts +9 -9
- package/src/odspDocumentService.ts +8 -8
- package/src/odspDocumentServiceFactory.ts +2 -2
- package/src/odspDocumentServiceFactoryCore.ts +20 -19
- package/src/odspDocumentStorageManager.ts +18 -18
- package/src/odspDocumentStorageServiceBase.ts +13 -13
- package/src/odspDriverUrlResolver.ts +9 -6
- package/src/odspDriverUrlResolverForShareLink.ts +5 -5
- package/src/odspError.ts +6 -3
- package/src/odspFluidFileLink.ts +1 -1
- package/src/odspLayerCompatState.ts +1 -1
- package/src/odspLocationRedirection.ts +2 -2
- package/src/odspPublicUtils.ts +1 -1
- package/src/odspSnapshotParser.ts +2 -2
- package/src/odspSummaryUploadManager.ts +11 -7
- package/src/odspUrlHelper.ts +1 -1
- package/src/odspUtils.ts +13 -13
- package/src/opsCaching.ts +1 -1
- package/src/packageVersion.ts +1 -1
- package/src/prefetchLatestSnapshot.ts +13 -13
- package/src/retryErrorsStorageAdapter.ts +4 -4
- package/src/retryUtils.ts +1 -1
- package/src/vroom.ts +5 -5
- package/src/zipItDataRepresentationUtils.ts +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"zipItDataRepresentationUtils.js","sourceRoot":"","sources":["../src/zipItDataRepresentationUtils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;GAGG;AAEH,OAAO,EAAE,uBAAuB,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAC3F,OAAO,EAAE,MAAM,EAAE,MAAM,qCAAqC,CAAC;AAC7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAC;AAC1E,OAAO,EAAE,cAAc,EAAE,MAAM,kDAAkD,CAAC;AAIlF,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAE,UAAU,IAAI,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAElE,wJAAwJ;AACxJ;;;GAGG;AACH,MAAM,CAAN,IAAY,WA8BX;AA9BD,WAAY,WAAW;IACtB,sDAAa,CAAA;IACb,wDAAc,CAAA;IAEd,4DAAgB,CAAA;IAChB,gEAAkB,CAAA;IAClB,kEAAmB,CAAA;IACnB,kEAAmB,CAAA;IAEnB,kEAAmB,CAAA;IACnB,oEAAoB,CAAA;IACpB,oEAAoB,CAAA;IACpB,0EAAuB,CAAA;IACvB,gFAA0B,CAAA;IAE1B,6CAAQ,CAAA;IACR,+CAAS,CAAA;IACT,iDAAU,CAAA;IACV,iDAAU,CAAA;IACV,iDAAU,CAAA;IACV,6CAAQ,CAAA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;QAChB,aAAa;KACb,CACD,CAAC;AACH,CAAC;AAED,SAAS,WAAW,CAAC,KAAgB;IACpC,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAC/B,OAAO,QAAQ,CAAC;IACjB,CAAC;SAAM,IAAI,KAAK,YAAY,QAAQ,EAAE,CAAC;QACtC,OAAO,UAAU,CAAC;IACnB,CAAC;SAAM,IAAI,KAAK,YAAY,QAAQ,EAAE,CAAC;QACtC,OAAO,UAAU,CAAC;IACnB,CAAC;SAAM,IAAI,OAAO,KAAK,KAAK,SAAS,EAAE,CAAC;QACvC,OAAO,SAAS,CAAC;IAClB,CAAC;SAAM,IAAI,KAAK,CAAC,cAAc,EAAE,CAAC;QACjC,OAAO,QAAQ,CAAC;IACjB,CAAC;IACD,OAAO,aAAa,CAAC;AACtB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * Data representation which is followed(zipIt Protocol) here is described in this document:\n * https://microsoft.sharepoint-df.com/:w:/t/ODSPFileStore/ER06b64K_XdDjEyAKl-UT60BJiId39SCVkYSyo_2pvH9gQ?e=KYQ0c5\n */\n\nimport { Uint8ArrayToArrayBuffer, Uint8ArrayToString } from \"@fluid-internal/client-utils\";\nimport { assert } from \"@fluidframework/core-utils/internal\";\nimport { NonRetryableError } from \"@fluidframework/driver-utils/internal\";\nimport { OdspErrorTypes } from \"@fluidframework/odsp-driver-definitions/internal\";\nimport { ITelemetryLoggerExt } from \"@fluidframework/telemetry-utils/internal\";\n\nimport { ReadBuffer } from \"./ReadBufferUtils.js\";\nimport { measure } from \"./odspUtils.js\";\nimport { pkgVersion as driverVersion } from \"./packageVersion.js\";\n\n// https://onedrive.visualstudio.com/SharePoint%20Online/_git/SPO?path=/cobalt/Base/Property/BinaryEncodedPropertyReader.cs&version=GBmaster&_a=contents\n/**\n * Control codes used by tree serialization / decentralization code. Same as on server. These can be found on\n * filestore code on server too at above link.\n */\nexport enum MarkerCodes {\n\tBoolTrue = 11, // value = true\n\tBoolFalse = 12, // value = false\n\n\tStringEmpty = 13, // value = \"\"\n\tString8Length = 14, // unsigned-8-bit little-endian length, follows by UTF-8 bytes of length\n\tString16Length = 15, // unsigned-16-bit little-endian length, follows by UTF-8 bytes of length\n\tString32Length = 16, // unsigned-32-bit little-endian length, follows by UTF-8 bytes of length\n\n\tConstString8Id = 17, // unsigned-8-bit little-endian const string id follows\n\tConstString16Id = 18, // unsigned-16-bit little-endian const string id follows\n\tConstString32Id = 19, // unsigned-32-bit little-endian const string id follows\n\tConstStringDeclare = 20, // Code for declaring a const string with size <= 1 byte\n\tConstStringDeclareBig = 21, // Code for declaring a const string with size > 1 byte. It is represented in 4 bytes.\n\n\tInt0 = 1, // value = 0\n\tUInt8 = 3, // unsigned-8-bit little-endian follows\n\tUInt16 = 5, // unsigned-16-bit little-endian follows\n\tUInt32 = 7, // unsigned-32-bit little-endian follows\n\tUInt64 = 9, // unsigned-64-bit little-endian follows\n\tInt8 = 2, // signed-8-bit little-endian follows\n\tInt16 = 4, // signed-16-bit little-endian follows\n\tInt32 = 6, // signed-32-bit little-endian follows\n\tInt64 = 8, // signed-64-bit little-endian follows\n\n\tBinaryEmpty = 32, // value = byte[]\n\tBinarySingle8 = 33, // unsigned-8-bit little-endian length, follows by bytes of length\n\tBinarySingle16 = 34, // unsigned-16-bit little-endian length, follows by bytes of length\n\tBinarySingle32 = 35, // unsigned-32-bit little-endian length, follows by bytes of length\n\tBinarySingle64 = 36, // unsigned-64-bit little-endian length, follows by bytes of length\n}\n\n/**\n * Control codes used by tree serialization / decentralization code. They mark the start of sections.\n */\nexport enum MarkerCodesStart {\n\t\"list\" = 49,\n\t\"set\" = 51,\n}\n\n/**\n * Control codes used by tree serialization / decentralization code. They mark the end of sections.\n */\nexport enum MarkerCodesEnd {\n\t\"list\" = 50,\n\t\"set\" = 52,\n}\n\n/**\n * This contains mapping of Marker Codes to number of bytes in which the corresponding data\n * will be stored.\n */\nexport const codeToBytesMap = {\n\t// Integer code to bytes\n\t1: 0,\n\t2: 1,\n\t3: 1,\n\t4: 2,\n\t5: 2,\n\t6: 4,\n\t7: 4,\n\t8: 8,\n\t9: 8,\n\n\t// String code to Bytes\n\t13: 0,\n\t14: 1,\n\t15: 2,\n\t16: 4,\n\n\t17: 1,\n\t18: 2,\n\t19: 4,\n\n\t20: 1,\n\t21: 4,\n\n\t// Binary code to bytes\n\t32: 0,\n\t33: 1,\n\t34: 2,\n\t35: 4,\n\t36: 8,\n};\n\nexport function getValueSafely(map: { [index: number]: number }, key: number): number {\n\tconst val = map[key];\n\tassert(val !== undefined, 0x287 /* key must exist in the map */);\n\treturn val;\n}\n\nexport function getNodeProps(node: NodeCore): Record<string, NodeTypes> {\n\tconst res: Record<string, NodeTypes> = {};\n\tfor (const [keyNode, valueNode] of node.iteratePairs()) {\n\t\tconst id = getStringInstance(keyNode, \"keynode should be a string\");\n\t\tres[id] = valueNode;\n\t}\n\treturn res;\n}\n\nexport function iteratePairs<T>(it: IterableIterator<T>): IterableIterator<[T, T]> {\n\tconst res: IterableIterator<[T, T]> = {\n\t\tnext: () => {\n\t\t\tconst a = it.next();\n\t\t\tif (a.done) {\n\t\t\t\treturn { value: undefined, done: true };\n\t\t\t}\n\t\t\tconst b = it.next();\n\t\t\tassert(b.done !== true, 0x22b /* \"Should be a pair\" */);\n\t\t\treturn { value: [a.value, b.value], done: b.done };\n\t\t},\n\t\t[Symbol.iterator]: () => {\n\t\t\treturn res;\n\t\t},\n\t};\n\treturn res;\n}\n\n/**\n * Helper function that returns iterator from an object\n * @param obj - object that supports iteration\n */\nexport function iterate<T>(obj: {\n\t[Symbol.iterator]: () => IterableIterator<T>;\n}): IterableIterator<T> {\n\treturn obj[Symbol.iterator]();\n}\n\n/**\n * Base class to represent binary blob element.\n * Binary blob is one of three types supported as a leaf node of a tree.\n * Note: concrete implementations (derived classes) are not exposed from this module\n */\nexport abstract class BlobCore {\n\tpublic abstract get buffer(): Uint8Array;\n\tpublic abstract get arrayBuffer(): ArrayBufferLike;\n\n\t/**\n\t * Represents a blob.\n\t */\n\tconstructor() {}\n}\n\n/**\n * \"deep copy\" blob, holds to binary data passed in\n * It is called deep copy as a counter-part to BlobShallowCopy, which\n * is a reference to underlying binary stream (ReadBuffer).\n */\nclass BlobDeepCopy extends BlobCore {\n\t/**\n\t * Represents a deep copy of the blob.\n\t * @param data - Data array of the blob\n\t */\n\tconstructor(protected readonly data: Uint8Array) {\n\t\tsuper();\n\t}\n\n\tpublic get buffer(): Uint8Array {\n\t\treturn this.data;\n\t}\n\n\tpublic get arrayBuffer(): ArrayBufferLike {\n\t\treturn Uint8ArrayToArrayBuffer(this.buffer);\n\t}\n\n\tpublic static read(buffer: ReadBuffer, lengthLen: number): BlobCore {\n\t\tconst length = buffer.read(lengthLen);\n\t\tconst data = new Uint8Array(length);\n\t\tfor (let counter = 0; counter < length; counter++) {\n\t\t\tdata[counter] = buffer.read();\n\t\t}\n\t\treturn new BlobDeepCopy(data);\n\t}\n}\n\n/**\n * Shallow copy blob, keeps a reference to portion of ReadBuffer\n * it was constructed from. It takes much less memory compared to BlobDeepCopy\n */\nexport class BlobShallowCopy extends BlobCore {\n\t/**\n\t * Represents a shallow copy of the blob. It is not a separate blob, just reference to original blobs.\n\t * @param data - Data array of the blob\n\t * @param start - Start point of the blob in the buffer.\n\t * @param end - End point of the blob in the buffer.\n\t */\n\tconstructor(\n\t\tprotected data: Uint8Array,\n\t\tprotected start: number,\n\t\tprotected end: number,\n\t) {\n\t\tsuper();\n\t}\n\n\tpublic get buffer(): Uint8Array {\n\t\treturn this.data.subarray(this.start, this.end);\n\t}\n\n\t// Equivalent to Uint8ArrayToArrayBuffer(this.buffer)\n\tpublic get arrayBuffer(): ArrayBufferLike {\n\t\tconst offset = this.data.byteOffset;\n\t\treturn this.data.buffer.slice(this.start + offset, this.end + offset);\n\t}\n\n\tpublic static read(buffer: ReadBuffer, lengthLen: number): BlobCore {\n\t\tconst length = buffer.read(lengthLen);\n\t\tconst pos = buffer.pos;\n\t\tbuffer.skip(length);\n\t\treturn new BlobShallowCopy(buffer.buffer, pos, pos + length);\n\t}\n}\n\nexport const addStringProperty = (node: NodeCore, a: string, b: string): void => {\n\tnode.addDictionaryString(a);\n\tnode.addString(b);\n};\nexport const addDictionaryStringProperty = (node: NodeCore, a: string, b: string): void => {\n\tnode.addDictionaryString(a);\n\tnode.addString(b);\n};\nexport const addNumberProperty = (node: NodeCore, a: string, b: number): void => {\n\tnode.addDictionaryString(a);\n\tnode.addNumber(b);\n};\nexport const addBoolProperty = (node: NodeCore, a: string, b: boolean): void => {\n\tnode.addDictionaryString(a);\n\tnode.addBool(b);\n};\n\nexport interface IStringElement {\n\tcontent: string;\n\tdictionary: boolean;\n\t_stringElement: true;\n}\n\nexport interface IStringElementInternal extends Omit<IStringElement, \"content\"> {\n\tcontent?: string;\n\tstartPos: number;\n\tendPos: number;\n}\n\n/**\n * Three leaf types supported by tree:\n * 1. Node (sub-tree)\n * 2. binary blob\n * 3. integer\n * 4. boolean\n */\nexport type NodeTypes = NodeCore | BlobCore | number | boolean | IStringElement;\n\nexport type NodeCoreTypes = \"list\" | \"set\";\n\n/**\n * Node - node in the tree (non-leaf element of the tree)\n */\nexport class NodeCore {\n\t// It is an array of nodes.\n\tprivate readonly children: NodeTypes[] = [];\n\tpublic get nodes(): NodeTypes[] {\n\t\treturn this.children;\n\t}\n\n\tconstructor(public type: NodeCoreTypes = \"set\") {}\n\n\tpublic [Symbol.iterator](): IterableIterator<NodeTypes> {\n\t\treturn this.children[Symbol.iterator]();\n\t}\n\n\tpublic iteratePairs(): IterableIterator<[NodeTypes, NodeTypes]> {\n\t\tassert(this.length % 2 === 0, 0x22c /* \"reading pairs\" */);\n\t\treturn iteratePairs(iterate(this));\n\t}\n\n\tpublic get length(): number {\n\t\treturn this.children.length;\n\t}\n\n\tpublic get(index: number): NodeTypes {\n\t\treturn this.children[index];\n\t}\n\n\tpublic getString(index: number): string {\n\t\tconst node = this.children[index];\n\t\treturn getStringInstance(node, \"getString should return string\");\n\t}\n\n\tpublic getMaybeString(index: number): string | undefined {\n\t\tconst node = this.children[index];\n\t\treturn getMaybeStringInstance(node);\n\t}\n\n\tpublic getBlob(index: number): BlobCore {\n\t\tconst node = this.children[index];\n\t\tassertBlobCoreInstance(node, \"getBlob should return a blob\");\n\t\treturn node;\n\t}\n\n\tpublic getNode(index: number): NodeCore {\n\t\tconst node = this.children[index];\n\t\tassertNodeCoreInstance(node, \"getNode should return a node\");\n\t\treturn node;\n\t}\n\n\tpublic getNumber(index: number): number {\n\t\tconst node = this.children[index];\n\t\tassertNumberInstance(node, \"getNumber should return a number\");\n\t\treturn node;\n\t}\n\n\tpublic getBool(index: number): boolean {\n\t\tconst node = this.children[index];\n\t\tassertBoolInstance(node, \"getBool should return a boolean\");\n\t\treturn node;\n\t}\n\n\tpublic addNode(type?: NodeCoreTypes): NodeCore {\n\t\tconst node = new NodeCore(type);\n\t\tthis.children.push(node);\n\t\treturn node;\n\t}\n\n\tpublic addBlob(blob: Uint8Array): void {\n\t\tthis.children.push(new BlobDeepCopy(blob));\n\t}\n\n\tpublic addDictionaryString(payload: string): void {\n\t\tthis.children.push({\n\t\t\tcontent: payload,\n\t\t\tdictionary: true,\n\t\t\t_stringElement: true,\n\t\t});\n\t}\n\n\tpublic addString(payload: string): void {\n\t\tthis.children.push({\n\t\t\tcontent: payload,\n\t\t\tdictionary: false,\n\t\t\t_stringElement: true,\n\t\t});\n\t}\n\n\tpublic addNumber(payload: number | undefined): void {\n\t\tassert(Number.isInteger(payload), 0x231 /* \"Number should be an integer\" */);\n\t\tassert(\n\t\t\tpayload !== undefined && payload >= 0,\n\t\t\t0x232 /* \"Payload should not be negative\" */,\n\t\t);\n\t\tthis.children.push(payload);\n\t}\n\n\tpublic addBool(payload: boolean): void {\n\t\tthis.children.push(payload);\n\t}\n\n\t// Can we do more efficiently here, without extra objects somehow??\n\tprivate static readString(\n\t\tbuffer: ReadBuffer,\n\t\tcode: number,\n\t\tdictionary: boolean,\n\t): IStringElementInternal & IStringElement {\n\t\tconst lengthLen = getValueSafely(codeToBytesMap, code);\n\t\tconst length = buffer.read(lengthLen);\n\t\tconst startPos = buffer.pos;\n\t\tbuffer.skip(length);\n\t\tconst result: IStringElementInternal = {\n\t\t\t// Note: Setting here property 'content: undefined' makes code substantially slower!\n\t\t\tdictionary,\n\t\t\t_stringElement: true,\n\t\t\tstartPos,\n\t\t\tendPos: buffer.pos,\n\t\t};\n\n\t\t// We are lying here in terms of presence of `content` property.\n\t\t// This will be addressed at the bottom of NodeCore.load() by resolving all strings at once!\n\t\t// It's equivalent (but much slower!) to do it here via\n\t\t// result.content = Uint8ArrayToString(buffer.buffer.subarray(startPos, buffer.pos), \"utf-8\");\n\t\treturn result as IStringElementInternal & IStringElement;\n\t}\n\n\t/**\n\t * Load and parse the buffer into a tree.\n\t * @param buffer - buffer to read from.\n\t */\n\tprotected load(\n\t\tbuffer: ReadBuffer,\n\t\tlogger: ITelemetryLoggerExt,\n\t): {\n\t\tdurationStructure: number;\n\t\tdurationStrings: number;\n\t} {\n\t\tconst [stringsToResolve, durationStructure] = measure(() =>\n\t\t\tthis.loadStructure(buffer, logger),\n\t\t);\n\t\tconst [, durationStrings] = measure(() =>\n\t\t\tthis.loadStrings(buffer, stringsToResolve, logger),\n\t\t);\n\t\treturn { durationStructure, durationStrings };\n\t}\n\n\t/**\n\t * Load and parse the buffer into a tree.\n\t * @param buffer - buffer to read from.\n\t */\n\tprotected loadStructure(\n\t\tbuffer: ReadBuffer,\n\t\tlogger: ITelemetryLoggerExt,\n\t): IStringElementInternal[] {\n\t\tconst stack: NodeTypes[][] = [];\n\t\tconst stringsToResolve: IStringElementInternal[] = [];\n\t\tconst dictionary: IStringElement[] = [];\n\n\t\tlet children = this.children;\n\t\tfor (; !buffer.eof; ) {\n\t\t\tconst code = buffer.read();\n\t\t\tswitch (code) {\n\t\t\t\tcase MarkerCodesStart.list:\n\t\t\t\tcase MarkerCodesStart.set: {\n\t\t\t\t\tconst childValue = new NodeCore(code === MarkerCodesStart.set ? \"set\" : \"list\");\n\t\t\t\t\tchildren.push(childValue);\n\t\t\t\t\tstack.push(children);\n\t\t\t\t\tchildren = childValue.children;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tcase MarkerCodes.ConstStringDeclare:\n\t\t\t\tcase MarkerCodes.ConstStringDeclareBig: {\n\t\t\t\t\tconst stringId = buffer.read(getValueSafely(codeToBytesMap, code));\n\t\t\t\t\tconst constString = NodeCore.readString(buffer, code, true /* dictionary */);\n\t\t\t\t\tstringsToResolve.push(constString);\n\t\t\t\t\tdictionary[stringId] = constString;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tcase MarkerCodes.ConstString8Id:\n\t\t\t\tcase MarkerCodes.ConstString16Id:\n\t\t\t\tcase MarkerCodes.ConstString32Id: {\n\t\t\t\t\tconst stringId = buffer.read(getValueSafely(codeToBytesMap, code));\n\t\t\t\t\tconst content = dictionary[stringId];\n\t\t\t\t\tassert(content !== undefined, 0x3de /* const string not found */);\n\t\t\t\t\tchildren.push(content);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tcase MarkerCodes.StringEmpty:\n\t\t\t\tcase MarkerCodes.String8Length:\n\t\t\t\tcase MarkerCodes.String16Length:\n\t\t\t\tcase MarkerCodes.String32Length: {\n\t\t\t\t\tconst str = NodeCore.readString(buffer, code, false /* dictionary */);\n\t\t\t\t\tstringsToResolve.push(str);\n\t\t\t\t\tchildren.push(str);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tcase MarkerCodes.BinaryEmpty:\n\t\t\t\tcase MarkerCodes.BinarySingle8:\n\t\t\t\tcase MarkerCodes.BinarySingle16:\n\t\t\t\tcase MarkerCodes.BinarySingle32:\n\t\t\t\tcase MarkerCodes.BinarySingle64: {\n\t\t\t\t\tchildren.push(BlobShallowCopy.read(buffer, getValueSafely(codeToBytesMap, code)));\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t// If integer is 0.\n\t\t\t\tcase MarkerCodes.Int0: {\n\t\t\t\t\tchildren.push(0);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tcase MarkerCodes.UInt8:\n\t\t\t\tcase MarkerCodes.UInt16:\n\t\t\t\tcase MarkerCodes.UInt32:\n\t\t\t\tcase MarkerCodes.UInt64:\n\t\t\t\tcase MarkerCodes.Int8:\n\t\t\t\tcase MarkerCodes.Int16:\n\t\t\t\tcase MarkerCodes.Int32:\n\t\t\t\tcase MarkerCodes.Int64: {\n\t\t\t\t\tchildren.push(buffer.read(getValueSafely(codeToBytesMap, code)));\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tcase MarkerCodes.BoolTrue: {\n\t\t\t\t\tchildren.push(true);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tcase MarkerCodes.BoolFalse: {\n\t\t\t\t\tchildren.push(false);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tcase MarkerCodesEnd.list:\n\t\t\t\tcase MarkerCodesEnd.set: {\n\t\t\t\t\t// Note: We are not checking that end marker matches start marker.\n\t\t\t\t\t// I.e. that we do not have a case where we start a 'list' but end with a 'set'\n\t\t\t\t\t// Checking it would require more state tracking that seems not very useful, given\n\t\t\t\t\t// our code does not care.\n\t\t\t\t\tchildren = stack.pop()!;\n\n\t\t\t\t\t// To my surprise, checking children !== undefined adds measurable cost!\n\t\t\t\t\t// We will rely on children.push() crashing in case of mismatch, and check below\n\t\t\t\t\t// (outside of the loop)\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tdefault: {\n\t\t\t\t\tthrow new Error(`Invalid code: ${code}`);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// This also ensures that stack.length === 0.\n\t\tassert(children === this.children, 0x3e7 /* Unpaired start/end list/set markers! */);\n\n\t\treturn stringsToResolve;\n\t}\n\n\tprivate loadStrings(\n\t\tbuffer: ReadBuffer,\n\t\tstringsToResolve: IStringElementInternal[],\n\t\tlogger: ITelemetryLoggerExt,\n\t): void {\n\t\t/**\n\t\t * Process all the strings at once!\n\t\t */\n\t\tlet length = 0;\n\t\tfor (const el of stringsToResolve) {\n\t\t\tlength += el.endPos - el.startPos + 1;\n\t\t}\n\t\tconst stringBuffer = new Uint8Array(length);\n\n\t\tlength = 0;\n\t\tconst input = buffer.buffer;\n\t\tassert(input.byteOffset === 0, 0x3e8 /* code below assumes no offset */);\n\n\t\tfor (const el of stringsToResolve) {\n\t\t\tfor (let it = el.startPos; it < el.endPos; it++) {\n\t\t\t\tstringBuffer[length] = input[it];\n\t\t\t\tlength++;\n\t\t\t}\n\t\t\tstringBuffer[length] = 0;\n\t\t\tlength++;\n\t\t}\n\t\tassert(length === stringBuffer.length, 0x418 /* properly encoded */);\n\n\t\tconst result = Uint8ArrayToString(stringBuffer, \"utf8\").split(String.fromCodePoint(0));\n\t\tif (result.length === stringsToResolve.length + 1) {\n\t\t\t// All is good, we expect all the cases to get here\n\t\t\tfor (let i = 0; i < stringsToResolve.length; i++) {\n\t\t\t\tstringsToResolve[i].content = result[i];\n\t\t\t}\n\t\t} else {\n\t\t\t// String content has \\0 chars!\n\t\t\t// Recovery code\n\t\t\tlogger.sendErrorEvent({ eventName: \"StringParsingError\" });\n\t\t\tfor (const el of stringsToResolve) {\n\t\t\t\tassert(\n\t\t\t\t\tel.content === Uint8ArrayToString(input.subarray(el.startPos, el.endPos), \"utf8\"),\n\t\t\t\t\t0x3ea /* test */,\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n}\n\n/**\n * TreeBuilder - Root of the tree.\n * Provides loading and serialization capabilities.\n */\nexport class TreeBuilder extends NodeCore {\n\tstatic load(\n\t\tbuffer: ReadBuffer,\n\t\tlogger: ITelemetryLoggerExt,\n\t): {\n\t\tbuilder: TreeBuilder;\n\t\ttelemetryProps: {\n\t\t\tdurationStructure: number;\n\t\t\tdurationStrings: number;\n\t\t};\n\t} {\n\t\tconst builder = new TreeBuilder();\n\t\tconst telemetryProps = builder.load(buffer, logger);\n\t\tassert(buffer.eof, 0x233 /* \"Unexpected data at the end of buffer\" */);\n\t\treturn { builder, telemetryProps };\n\t}\n}\n\nexport function getMaybeStringInstance(node: NodeTypes): string | undefined {\n\tconst maybeString = node as IStringElement;\n\tif (maybeString._stringElement) {\n\t\treturn maybeString.content;\n\t}\n}\n\nexport function getStringInstance(node: NodeTypes, message: string): string {\n\tconst maybeString = node as IStringElement;\n\tif (maybeString._stringElement) {\n\t\treturn maybeString.content;\n\t}\n\tthrowBufferParseException(node, \"BlobCore\", message);\n}\n\nexport function assertBlobCoreInstance(\n\tnode: NodeTypes,\n\tmessage: string,\n): asserts node is BlobCore {\n\tif (node instanceof BlobCore) {\n\t\treturn;\n\t}\n\tthrowBufferParseException(node, \"BlobCore\", message);\n}\n\nexport function assertNodeCoreInstance(\n\tnode: NodeTypes,\n\tmessage: string,\n): asserts node is NodeCore {\n\tif (node instanceof NodeCore) {\n\t\treturn;\n\t}\n\tthrowBufferParseException(node, \"NodeCore\", message);\n}\n\nexport function assertNumberInstance(\n\tnode: NodeTypes,\n\tmessage: string,\n): asserts node is number {\n\tif (typeof node === \"number\") {\n\t\treturn;\n\t}\n\tthrowBufferParseException(node, \"Number\", message);\n}\n\nexport function assertBoolInstance(node: NodeTypes, message: string): asserts node is boolean {\n\tif (typeof node === \"boolean\") {\n\t\treturn;\n\t}\n\tthrowBufferParseException(node, \"Boolean\", message);\n}\n\nfunction throwBufferParseException(\n\tnode: NodeTypes,\n\texpectedNodeType: NodeType,\n\tmessage: string,\n): never {\n\tthrow new NonRetryableError(\n\t\t`Buffer parsing exception: ${message}`,\n\t\tOdspErrorTypes.incorrectServerResponse,\n\t\t{\n\t\t\tnodeType: getNodeType(node),\n\t\t\texpectedNodeType,\n\t\t\tdriverVersion,\n\t\t},\n\t);\n}\n\nfunction getNodeType(value: NodeTypes): NodeType {\n\tif (typeof value === \"number\") {\n\t\treturn \"Number\";\n\t} else if (value instanceof BlobCore) {\n\t\treturn \"BlobCore\";\n\t} else if (value instanceof NodeCore) {\n\t\treturn \"NodeCore\";\n\t} else if (typeof value === \"boolean\") {\n\t\treturn \"Boolean\";\n\t} else if (value._stringElement) {\n\t\treturn \"String\";\n\t}\n\treturn \"UnknownType\";\n}\n\ntype NodeType = \"Number\" | \"BlobCore\" | \"NodeCore\" | \"Boolean\" | \"UnknownType\" | \"String\";\n"]}
|
|
1
|
+
{"version":3,"file":"zipItDataRepresentationUtils.js","sourceRoot":"","sources":["../src/zipItDataRepresentationUtils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;GAGG;AAEH,OAAO,EAAE,uBAAuB,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAC3F,OAAO,EAAE,MAAM,EAAE,MAAM,qCAAqC,CAAC;AAC7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAC;AAC1E,OAAO,EAAE,cAAc,EAAE,MAAM,kDAAkD,CAAC;AAIlF,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAE,UAAU,IAAI,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAElE,wJAAwJ;AACxJ;;;GAGG;AACH,MAAM,CAAN,IAAY,WA8BX;AA9BD,WAAY,WAAW;IACtB,sDAAa,CAAA;IACb,wDAAc,CAAA;IAEd,4DAAgB,CAAA;IAChB,gEAAkB,CAAA;IAClB,kEAAmB,CAAA;IACnB,kEAAmB,CAAA;IAEnB,kEAAmB,CAAA;IACnB,oEAAoB,CAAA;IACpB,oEAAoB,CAAA;IACpB,0EAAuB,CAAA;IACvB,gFAA0B,CAAA;IAE1B,6CAAQ,CAAA;IACR,+CAAS,CAAA;IACT,iDAAU,CAAA;IACV,iDAAU,CAAA;IACV,iDAAU,CAAA;IACV,6CAAQ,CAAA;IACR,+CAAS,CAAA;IACT,+CAAS,CAAA;IACT,+CAA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AS,WAAW,CAAC,KAAgB;IACpC,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAC/B,OAAO,QAAQ,CAAC;IACjB,CAAC;SAAM,IAAI,KAAK,YAAY,QAAQ,EAAE,CAAC;QACtC,OAAO,UAAU,CAAC;IACnB,CAAC;SAAM,IAAI,KAAK,YAAY,QAAQ,EAAE,CAAC;QACtC,OAAO,UAAU,CAAC;IACnB,CAAC;SAAM,IAAI,OAAO,KAAK,KAAK,SAAS,EAAE,CAAC;QACvC,OAAO,SAAS,CAAC;IAClB,CAAC;SAAM,IAAI,KAAK,CAAC,cAAc,EAAE,CAAC;QACjC,OAAO,QAAQ,CAAC;IACjB,CAAC;IACD,OAAO,aAAa,CAAC;AACtB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * Data representation which is followed(zipIt Protocol) here is described in this document:\n * https://microsoft.sharepoint-df.com/:w:/t/ODSPFileStore/ER06b64K_XdDjEyAKl-UT60BJiId39SCVkYSyo_2pvH9gQ?e=KYQ0c5\n */\n\nimport { Uint8ArrayToArrayBuffer, Uint8ArrayToString } from \"@fluid-internal/client-utils\";\nimport { assert } from \"@fluidframework/core-utils/internal\";\nimport { NonRetryableError } from \"@fluidframework/driver-utils/internal\";\nimport { OdspErrorTypes } from \"@fluidframework/odsp-driver-definitions/internal\";\nimport type { ITelemetryLoggerExt } from \"@fluidframework/telemetry-utils/internal\";\n\nimport type { ReadBuffer } from \"./ReadBufferUtils.js\";\nimport { measure } from \"./odspUtils.js\";\nimport { pkgVersion as driverVersion } from \"./packageVersion.js\";\n\n// https://onedrive.visualstudio.com/SharePoint%20Online/_git/SPO?path=/cobalt/Base/Property/BinaryEncodedPropertyReader.cs&version=GBmaster&_a=contents\n/**\n * Control codes used by tree serialization / decentralization code. Same as on server. These can be found on\n * filestore code on server too at above link.\n */\nexport enum MarkerCodes {\n\tBoolTrue = 11, // value = true\n\tBoolFalse = 12, // value = false\n\n\tStringEmpty = 13, // value = \"\"\n\tString8Length = 14, // unsigned-8-bit little-endian length, follows by UTF-8 bytes of length\n\tString16Length = 15, // unsigned-16-bit little-endian length, follows by UTF-8 bytes of length\n\tString32Length = 16, // unsigned-32-bit little-endian length, follows by UTF-8 bytes of length\n\n\tConstString8Id = 17, // unsigned-8-bit little-endian const string id follows\n\tConstString16Id = 18, // unsigned-16-bit little-endian const string id follows\n\tConstString32Id = 19, // unsigned-32-bit little-endian const string id follows\n\tConstStringDeclare = 20, // Code for declaring a const string with size <= 1 byte\n\tConstStringDeclareBig = 21, // Code for declaring a const string with size > 1 byte. It is represented in 4 bytes.\n\n\tInt0 = 1, // value = 0\n\tUInt8 = 3, // unsigned-8-bit little-endian follows\n\tUInt16 = 5, // unsigned-16-bit little-endian follows\n\tUInt32 = 7, // unsigned-32-bit little-endian follows\n\tUInt64 = 9, // unsigned-64-bit little-endian follows\n\tInt8 = 2, // signed-8-bit little-endian follows\n\tInt16 = 4, // signed-16-bit little-endian follows\n\tInt32 = 6, // signed-32-bit little-endian follows\n\tInt64 = 8, // signed-64-bit little-endian follows\n\n\tBinaryEmpty = 32, // value = byte[]\n\tBinarySingle8 = 33, // unsigned-8-bit little-endian length, follows by bytes of length\n\tBinarySingle16 = 34, // unsigned-16-bit little-endian length, follows by bytes of length\n\tBinarySingle32 = 35, // unsigned-32-bit little-endian length, follows by bytes of length\n\tBinarySingle64 = 36, // unsigned-64-bit little-endian length, follows by bytes of length\n}\n\n/**\n * Control codes used by tree serialization / decentralization code. They mark the start of sections.\n */\nexport enum MarkerCodesStart {\n\t\"list\" = 49,\n\t\"set\" = 51,\n}\n\n/**\n * Control codes used by tree serialization / decentralization code. They mark the end of sections.\n */\nexport enum MarkerCodesEnd {\n\t\"list\" = 50,\n\t\"set\" = 52,\n}\n\n/**\n * This contains mapping of Marker Codes to number of bytes in which the corresponding data\n * will be stored.\n */\nexport const codeToBytesMap = {\n\t// Integer code to bytes\n\t1: 0,\n\t2: 1,\n\t3: 1,\n\t4: 2,\n\t5: 2,\n\t6: 4,\n\t7: 4,\n\t8: 8,\n\t9: 8,\n\n\t// String code to Bytes\n\t13: 0,\n\t14: 1,\n\t15: 2,\n\t16: 4,\n\n\t17: 1,\n\t18: 2,\n\t19: 4,\n\n\t20: 1,\n\t21: 4,\n\n\t// Binary code to bytes\n\t32: 0,\n\t33: 1,\n\t34: 2,\n\t35: 4,\n\t36: 8,\n};\n\nexport function getValueSafely(map: { [index: number]: number }, key: number): number {\n\tconst val = map[key];\n\tassert(val !== undefined, 0x287 /* key must exist in the map */);\n\treturn val;\n}\n\nexport function getNodeProps(node: NodeCore): Record<string, NodeTypes> {\n\tconst res: Record<string, NodeTypes> = {};\n\tfor (const [keyNode, valueNode] of node.iteratePairs()) {\n\t\tconst id = getStringInstance(keyNode, \"keynode should be a string\");\n\t\tres[id] = valueNode;\n\t}\n\treturn res;\n}\n\nexport function iteratePairs<T>(it: IterableIterator<T>): IterableIterator<[T, T]> {\n\tconst res: IterableIterator<[T, T]> = {\n\t\tnext: () => {\n\t\t\tconst a = it.next();\n\t\t\tif (a.done) {\n\t\t\t\treturn { value: undefined, done: true };\n\t\t\t}\n\t\t\tconst b = it.next();\n\t\t\tassert(b.done !== true, 0x22b /* \"Should be a pair\" */);\n\t\t\treturn { value: [a.value, b.value], done: b.done };\n\t\t},\n\t\t[Symbol.iterator]: () => {\n\t\t\treturn res;\n\t\t},\n\t};\n\treturn res;\n}\n\n/**\n * Helper function that returns iterator from an object\n * @param obj - object that supports iteration\n */\nexport function iterate<T>(obj: {\n\t[Symbol.iterator]: () => IterableIterator<T>;\n}): IterableIterator<T> {\n\treturn obj[Symbol.iterator]();\n}\n\n/**\n * Base class to represent binary blob element.\n * Binary blob is one of three types supported as a leaf node of a tree.\n * Note: concrete implementations (derived classes) are not exposed from this module\n */\nexport abstract class BlobCore {\n\tpublic abstract get buffer(): Uint8Array;\n\tpublic abstract get arrayBuffer(): ArrayBufferLike;\n\n\t/**\n\t * Represents a blob.\n\t */\n\tconstructor() {}\n}\n\n/**\n * \"deep copy\" blob, holds to binary data passed in\n * It is called deep copy as a counter-part to BlobShallowCopy, which\n * is a reference to underlying binary stream (ReadBuffer).\n */\nclass BlobDeepCopy extends BlobCore {\n\t/**\n\t * Represents a deep copy of the blob.\n\t * @param data - Data array of the blob\n\t */\n\tconstructor(protected readonly data: Uint8Array) {\n\t\tsuper();\n\t}\n\n\tpublic get buffer(): Uint8Array {\n\t\treturn this.data;\n\t}\n\n\tpublic get arrayBuffer(): ArrayBufferLike {\n\t\treturn Uint8ArrayToArrayBuffer(this.buffer);\n\t}\n\n\tpublic static read(buffer: ReadBuffer, lengthLen: number): BlobCore {\n\t\tconst length = buffer.read(lengthLen);\n\t\tconst data = new Uint8Array(length);\n\t\tfor (let counter = 0; counter < length; counter++) {\n\t\t\tdata[counter] = buffer.read();\n\t\t}\n\t\treturn new BlobDeepCopy(data);\n\t}\n}\n\n/**\n * Shallow copy blob, keeps a reference to portion of ReadBuffer\n * it was constructed from. It takes much less memory compared to BlobDeepCopy\n */\nexport class BlobShallowCopy extends BlobCore {\n\t/**\n\t * Represents a shallow copy of the blob. It is not a separate blob, just reference to original blobs.\n\t * @param data - Data array of the blob\n\t * @param start - Start point of the blob in the buffer.\n\t * @param end - End point of the blob in the buffer.\n\t */\n\tconstructor(\n\t\tprotected data: Uint8Array,\n\t\tprotected start: number,\n\t\tprotected end: number,\n\t) {\n\t\tsuper();\n\t}\n\n\tpublic get buffer(): Uint8Array {\n\t\treturn this.data.subarray(this.start, this.end);\n\t}\n\n\t// Equivalent to Uint8ArrayToArrayBuffer(this.buffer)\n\tpublic get arrayBuffer(): ArrayBufferLike {\n\t\tconst offset = this.data.byteOffset;\n\t\treturn this.data.buffer.slice(this.start + offset, this.end + offset);\n\t}\n\n\tpublic static read(buffer: ReadBuffer, lengthLen: number): BlobCore {\n\t\tconst length = buffer.read(lengthLen);\n\t\tconst pos = buffer.pos;\n\t\tbuffer.skip(length);\n\t\treturn new BlobShallowCopy(buffer.buffer, pos, pos + length);\n\t}\n}\n\nexport const addStringProperty = (node: NodeCore, a: string, b: string): void => {\n\tnode.addDictionaryString(a);\n\tnode.addString(b);\n};\nexport const addDictionaryStringProperty = (node: NodeCore, a: string, b: string): void => {\n\tnode.addDictionaryString(a);\n\tnode.addString(b);\n};\nexport const addNumberProperty = (node: NodeCore, a: string, b: number): void => {\n\tnode.addDictionaryString(a);\n\tnode.addNumber(b);\n};\nexport const addBoolProperty = (node: NodeCore, a: string, b: boolean): void => {\n\tnode.addDictionaryString(a);\n\tnode.addBool(b);\n};\n\nexport interface IStringElement {\n\tcontent: string;\n\tdictionary: boolean;\n\t_stringElement: true;\n}\n\nexport interface IStringElementInternal extends Omit<IStringElement, \"content\"> {\n\tcontent?: string;\n\tstartPos: number;\n\tendPos: number;\n}\n\n/**\n * Three leaf types supported by tree:\n * 1. Node (sub-tree)\n * 2. binary blob\n * 3. integer\n * 4. boolean\n */\nexport type NodeTypes = NodeCore | BlobCore | number | boolean | IStringElement;\n\nexport type NodeCoreTypes = \"list\" | \"set\";\n\n/**\n * Node - node in the tree (non-leaf element of the tree)\n */\nexport class NodeCore {\n\t// It is an array of nodes.\n\tprivate readonly children: NodeTypes[] = [];\n\tpublic get nodes(): NodeTypes[] {\n\t\treturn this.children;\n\t}\n\n\tconstructor(public type: NodeCoreTypes = \"set\") {}\n\n\tpublic [Symbol.iterator](): IterableIterator<NodeTypes> {\n\t\treturn this.children[Symbol.iterator]();\n\t}\n\n\tpublic iteratePairs(): IterableIterator<[NodeTypes, NodeTypes]> {\n\t\tassert(this.length % 2 === 0, 0x22c /* \"reading pairs\" */);\n\t\treturn iteratePairs(iterate(this));\n\t}\n\n\tpublic get length(): number {\n\t\treturn this.children.length;\n\t}\n\n\tpublic get(index: number): NodeTypes {\n\t\treturn this.children[index];\n\t}\n\n\tpublic getString(index: number): string {\n\t\tconst node = this.children[index];\n\t\treturn getStringInstance(node, \"getString should return string\");\n\t}\n\n\tpublic getMaybeString(index: number): string | undefined {\n\t\tconst node = this.children[index];\n\t\treturn getMaybeStringInstance(node);\n\t}\n\n\tpublic getBlob(index: number): BlobCore {\n\t\tconst node = this.children[index];\n\t\tassertBlobCoreInstance(node, \"getBlob should return a blob\");\n\t\treturn node;\n\t}\n\n\tpublic getNode(index: number): NodeCore {\n\t\tconst node = this.children[index];\n\t\tassertNodeCoreInstance(node, \"getNode should return a node\");\n\t\treturn node;\n\t}\n\n\tpublic getNumber(index: number): number {\n\t\tconst node = this.children[index];\n\t\tassertNumberInstance(node, \"getNumber should return a number\");\n\t\treturn node;\n\t}\n\n\tpublic getBool(index: number): boolean {\n\t\tconst node = this.children[index];\n\t\tassertBoolInstance(node, \"getBool should return a boolean\");\n\t\treturn node;\n\t}\n\n\tpublic addNode(type?: NodeCoreTypes): NodeCore {\n\t\tconst node = new NodeCore(type);\n\t\tthis.children.push(node);\n\t\treturn node;\n\t}\n\n\tpublic addBlob(blob: Uint8Array): void {\n\t\tthis.children.push(new BlobDeepCopy(blob));\n\t}\n\n\tpublic addDictionaryString(payload: string): void {\n\t\tthis.children.push({\n\t\t\tcontent: payload,\n\t\t\tdictionary: true,\n\t\t\t_stringElement: true,\n\t\t});\n\t}\n\n\tpublic addString(payload: string): void {\n\t\tthis.children.push({\n\t\t\tcontent: payload,\n\t\t\tdictionary: false,\n\t\t\t_stringElement: true,\n\t\t});\n\t}\n\n\tpublic addNumber(payload: number | undefined): void {\n\t\tassert(Number.isInteger(payload), 0x231 /* \"Number should be an integer\" */);\n\t\tassert(\n\t\t\tpayload !== undefined && payload >= 0,\n\t\t\t0x232 /* \"Payload should not be negative\" */,\n\t\t);\n\t\tthis.children.push(payload);\n\t}\n\n\tpublic addBool(payload: boolean): void {\n\t\tthis.children.push(payload);\n\t}\n\n\t// Can we do more efficiently here, without extra objects somehow??\n\tprivate static readString(\n\t\tbuffer: ReadBuffer,\n\t\tcode: number,\n\t\tdictionary: boolean,\n\t): IStringElementInternal & IStringElement {\n\t\tconst lengthLen = getValueSafely(codeToBytesMap, code);\n\t\tconst length = buffer.read(lengthLen);\n\t\tconst startPos = buffer.pos;\n\t\tbuffer.skip(length);\n\t\tconst result: IStringElementInternal = {\n\t\t\t// Note: Setting here property 'content: undefined' makes code substantially slower!\n\t\t\tdictionary,\n\t\t\t_stringElement: true,\n\t\t\tstartPos,\n\t\t\tendPos: buffer.pos,\n\t\t};\n\n\t\t// We are lying here in terms of presence of `content` property.\n\t\t// This will be addressed at the bottom of NodeCore.load() by resolving all strings at once!\n\t\t// It's equivalent (but much slower!) to do it here via\n\t\t// result.content = Uint8ArrayToString(buffer.buffer.subarray(startPos, buffer.pos), \"utf-8\");\n\t\treturn result as IStringElementInternal & IStringElement;\n\t}\n\n\t/**\n\t * Load and parse the buffer into a tree.\n\t * @param buffer - buffer to read from.\n\t */\n\tprotected load(\n\t\tbuffer: ReadBuffer,\n\t\tlogger: ITelemetryLoggerExt,\n\t): {\n\t\tdurationStructure: number;\n\t\tdurationStrings: number;\n\t} {\n\t\tconst [stringsToResolve, durationStructure] = measure(() =>\n\t\t\tthis.loadStructure(buffer, logger),\n\t\t);\n\t\tconst [, durationStrings] = measure(() =>\n\t\t\tthis.loadStrings(buffer, stringsToResolve, logger),\n\t\t);\n\t\treturn { durationStructure, durationStrings };\n\t}\n\n\t/**\n\t * Load and parse the buffer into a tree.\n\t * @param buffer - buffer to read from.\n\t */\n\tprotected loadStructure(\n\t\tbuffer: ReadBuffer,\n\t\tlogger: ITelemetryLoggerExt,\n\t): IStringElementInternal[] {\n\t\tconst stack: NodeTypes[][] = [];\n\t\tconst stringsToResolve: IStringElementInternal[] = [];\n\t\tconst dictionary: IStringElement[] = [];\n\n\t\tlet children = this.children;\n\t\tfor (; !buffer.eof; ) {\n\t\t\tconst code = buffer.read();\n\t\t\tswitch (code) {\n\t\t\t\tcase MarkerCodesStart.list:\n\t\t\t\tcase MarkerCodesStart.set: {\n\t\t\t\t\tconst childValue = new NodeCore(code === MarkerCodesStart.set ? \"set\" : \"list\");\n\t\t\t\t\tchildren.push(childValue);\n\t\t\t\t\tstack.push(children);\n\t\t\t\t\tchildren = childValue.children;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tcase MarkerCodes.ConstStringDeclare:\n\t\t\t\tcase MarkerCodes.ConstStringDeclareBig: {\n\t\t\t\t\tconst stringId = buffer.read(getValueSafely(codeToBytesMap, code));\n\t\t\t\t\tconst constString = NodeCore.readString(buffer, code, true /* dictionary */);\n\t\t\t\t\tstringsToResolve.push(constString);\n\t\t\t\t\tdictionary[stringId] = constString;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tcase MarkerCodes.ConstString8Id:\n\t\t\t\tcase MarkerCodes.ConstString16Id:\n\t\t\t\tcase MarkerCodes.ConstString32Id: {\n\t\t\t\t\tconst stringId = buffer.read(getValueSafely(codeToBytesMap, code));\n\t\t\t\t\tconst content = dictionary[stringId];\n\t\t\t\t\tassert(content !== undefined, 0x3de /* const string not found */);\n\t\t\t\t\tchildren.push(content);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tcase MarkerCodes.StringEmpty:\n\t\t\t\tcase MarkerCodes.String8Length:\n\t\t\t\tcase MarkerCodes.String16Length:\n\t\t\t\tcase MarkerCodes.String32Length: {\n\t\t\t\t\tconst str = NodeCore.readString(buffer, code, false /* dictionary */);\n\t\t\t\t\tstringsToResolve.push(str);\n\t\t\t\t\tchildren.push(str);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tcase MarkerCodes.BinaryEmpty:\n\t\t\t\tcase MarkerCodes.BinarySingle8:\n\t\t\t\tcase MarkerCodes.BinarySingle16:\n\t\t\t\tcase MarkerCodes.BinarySingle32:\n\t\t\t\tcase MarkerCodes.BinarySingle64: {\n\t\t\t\t\tchildren.push(BlobShallowCopy.read(buffer, getValueSafely(codeToBytesMap, code)));\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t// If integer is 0.\n\t\t\t\tcase MarkerCodes.Int0: {\n\t\t\t\t\tchildren.push(0);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tcase MarkerCodes.UInt8:\n\t\t\t\tcase MarkerCodes.UInt16:\n\t\t\t\tcase MarkerCodes.UInt32:\n\t\t\t\tcase MarkerCodes.UInt64:\n\t\t\t\tcase MarkerCodes.Int8:\n\t\t\t\tcase MarkerCodes.Int16:\n\t\t\t\tcase MarkerCodes.Int32:\n\t\t\t\tcase MarkerCodes.Int64: {\n\t\t\t\t\tchildren.push(buffer.read(getValueSafely(codeToBytesMap, code)));\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tcase MarkerCodes.BoolTrue: {\n\t\t\t\t\tchildren.push(true);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tcase MarkerCodes.BoolFalse: {\n\t\t\t\t\tchildren.push(false);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tcase MarkerCodesEnd.list:\n\t\t\t\tcase MarkerCodesEnd.set: {\n\t\t\t\t\t// Note: We are not checking that end marker matches start marker.\n\t\t\t\t\t// I.e. that we do not have a case where we start a 'list' but end with a 'set'\n\t\t\t\t\t// Checking it would require more state tracking that seems not very useful, given\n\t\t\t\t\t// our code does not care.\n\t\t\t\t\tchildren = stack.pop()!;\n\n\t\t\t\t\t// To my surprise, checking children !== undefined adds measurable cost!\n\t\t\t\t\t// We will rely on children.push() crashing in case of mismatch, and check below\n\t\t\t\t\t// (outside of the loop)\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tdefault: {\n\t\t\t\t\tthrow new Error(`Invalid code: ${code}`);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// This also ensures that stack.length === 0.\n\t\tassert(children === this.children, 0x3e7 /* Unpaired start/end list/set markers! */);\n\n\t\treturn stringsToResolve;\n\t}\n\n\tprivate loadStrings(\n\t\tbuffer: ReadBuffer,\n\t\tstringsToResolve: IStringElementInternal[],\n\t\tlogger: ITelemetryLoggerExt,\n\t): void {\n\t\t/**\n\t\t * Process all the strings at once!\n\t\t */\n\t\tlet length = 0;\n\t\tfor (const el of stringsToResolve) {\n\t\t\tlength += el.endPos - el.startPos + 1;\n\t\t}\n\t\tconst stringBuffer = new Uint8Array(length);\n\n\t\tlength = 0;\n\t\tconst input = buffer.buffer;\n\t\tassert(input.byteOffset === 0, 0x3e8 /* code below assumes no offset */);\n\n\t\tfor (const el of stringsToResolve) {\n\t\t\tfor (let it = el.startPos; it < el.endPos; it++) {\n\t\t\t\tstringBuffer[length] = input[it];\n\t\t\t\tlength++;\n\t\t\t}\n\t\t\tstringBuffer[length] = 0;\n\t\t\tlength++;\n\t\t}\n\t\tassert(length === stringBuffer.length, 0x418 /* properly encoded */);\n\n\t\tconst result = Uint8ArrayToString(stringBuffer, \"utf8\").split(String.fromCodePoint(0));\n\t\tif (result.length === stringsToResolve.length + 1) {\n\t\t\t// All is good, we expect all the cases to get here\n\t\t\tfor (let i = 0; i < stringsToResolve.length; i++) {\n\t\t\t\tstringsToResolve[i].content = result[i];\n\t\t\t}\n\t\t} else {\n\t\t\t// String content has \\0 chars!\n\t\t\t// Recovery code\n\t\t\tlogger.sendErrorEvent({ eventName: \"StringParsingError\" });\n\t\t\tfor (const el of stringsToResolve) {\n\t\t\t\tassert(\n\t\t\t\t\tel.content === Uint8ArrayToString(input.subarray(el.startPos, el.endPos), \"utf8\"),\n\t\t\t\t\t0x3ea /* test */,\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n}\n\n/**\n * TreeBuilder - Root of the tree.\n * Provides loading and serialization capabilities.\n */\nexport class TreeBuilder extends NodeCore {\n\tstatic load(\n\t\tbuffer: ReadBuffer,\n\t\tlogger: ITelemetryLoggerExt,\n\t): {\n\t\tbuilder: TreeBuilder;\n\t\ttelemetryProps: {\n\t\t\tdurationStructure: number;\n\t\t\tdurationStrings: number;\n\t\t};\n\t} {\n\t\tconst builder = new TreeBuilder();\n\t\tconst telemetryProps = builder.load(buffer, logger);\n\t\tassert(buffer.eof, 0x233 /* \"Unexpected data at the end of buffer\" */);\n\t\treturn { builder, telemetryProps };\n\t}\n}\n\nexport function getMaybeStringInstance(node: NodeTypes): string | undefined {\n\tconst maybeString = node as IStringElement;\n\tif (maybeString._stringElement) {\n\t\treturn maybeString.content;\n\t}\n}\n\nexport function getStringInstance(node: NodeTypes, message: string): string {\n\tconst maybeString = node as IStringElement;\n\tif (maybeString._stringElement) {\n\t\treturn maybeString.content;\n\t}\n\tthrowBufferParseException(node, \"BlobCore\", message);\n}\n\nexport function assertBlobCoreInstance(\n\tnode: NodeTypes,\n\tmessage: string,\n): asserts node is BlobCore {\n\tif (node instanceof BlobCore) {\n\t\treturn;\n\t}\n\tthrowBufferParseException(node, \"BlobCore\", message);\n}\n\nexport function assertNodeCoreInstance(\n\tnode: NodeTypes,\n\tmessage: string,\n): asserts node is NodeCore {\n\tif (node instanceof NodeCore) {\n\t\treturn;\n\t}\n\tthrowBufferParseException(node, \"NodeCore\", message);\n}\n\nexport function assertNumberInstance(\n\tnode: NodeTypes,\n\tmessage: string,\n): asserts node is number {\n\tif (typeof node === \"number\") {\n\t\treturn;\n\t}\n\tthrowBufferParseException(node, \"Number\", message);\n}\n\nexport function assertBoolInstance(node: NodeTypes, message: string): asserts node is boolean {\n\tif (typeof node === \"boolean\") {\n\t\treturn;\n\t}\n\tthrowBufferParseException(node, \"Boolean\", message);\n}\n\nfunction throwBufferParseException(\n\tnode: NodeTypes,\n\texpectedNodeType: NodeType,\n\tmessage: string,\n): never {\n\tthrow new NonRetryableError(\n\t\t`Buffer parsing exception: ${message}`,\n\t\tOdspErrorTypes.incorrectServerResponse,\n\t\t{\n\t\t\tnodeType: getNodeType(node),\n\t\t\texpectedNodeType,\n\t\t\tdriverVersion,\n\t\t},\n\t);\n}\n\nfunction getNodeType(value: NodeTypes): NodeType {\n\tif (typeof value === \"number\") {\n\t\treturn \"Number\";\n\t} else if (value instanceof BlobCore) {\n\t\treturn \"BlobCore\";\n\t} else if (value instanceof NodeCore) {\n\t\treturn \"NodeCore\";\n\t} else if (typeof value === \"boolean\") {\n\t\treturn \"Boolean\";\n\t} else if (value._stringElement) {\n\t\treturn \"String\";\n\t}\n\treturn \"UnknownType\";\n}\n\ntype NodeType = \"Number\" | \"BlobCore\" | \"NodeCore\" | \"Boolean\" | \"UnknownType\" | \"String\";\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluidframework/odsp-driver",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.51.0",
|
|
4
4
|
"description": "Socket storage implementation for SPO and ODC",
|
|
5
5
|
"homepage": "https://fluidframework.com",
|
|
6
6
|
"repository": {
|
|
@@ -69,32 +69,31 @@
|
|
|
69
69
|
"temp-directory": "nyc/.nyc_output"
|
|
70
70
|
},
|
|
71
71
|
"dependencies": {
|
|
72
|
-
"@fluid-internal/client-utils": "~2.
|
|
73
|
-
"@fluidframework/core-interfaces": "~2.
|
|
74
|
-
"@fluidframework/core-utils": "~2.
|
|
75
|
-
"@fluidframework/driver-base": "~2.
|
|
76
|
-
"@fluidframework/driver-definitions": "~2.
|
|
77
|
-
"@fluidframework/driver-utils": "~2.
|
|
78
|
-
"@fluidframework/odsp-doclib-utils": "~2.
|
|
79
|
-
"@fluidframework/odsp-driver-definitions": "~2.
|
|
80
|
-
"@fluidframework/telemetry-utils": "~2.
|
|
72
|
+
"@fluid-internal/client-utils": "~2.51.0",
|
|
73
|
+
"@fluidframework/core-interfaces": "~2.51.0",
|
|
74
|
+
"@fluidframework/core-utils": "~2.51.0",
|
|
75
|
+
"@fluidframework/driver-base": "~2.51.0",
|
|
76
|
+
"@fluidframework/driver-definitions": "~2.51.0",
|
|
77
|
+
"@fluidframework/driver-utils": "~2.51.0",
|
|
78
|
+
"@fluidframework/odsp-doclib-utils": "~2.51.0",
|
|
79
|
+
"@fluidframework/odsp-driver-definitions": "~2.51.0",
|
|
80
|
+
"@fluidframework/telemetry-utils": "~2.51.0",
|
|
81
81
|
"socket.io-client": "~4.7.5",
|
|
82
|
-
"uuid": "^
|
|
82
|
+
"uuid": "^11.1.0"
|
|
83
83
|
},
|
|
84
84
|
"devDependencies": {
|
|
85
85
|
"@arethetypeswrong/cli": "^0.17.1",
|
|
86
86
|
"@biomejs/biome": "~1.9.3",
|
|
87
|
-
"@fluid-internal/mocha-test-setup": "~2.
|
|
87
|
+
"@fluid-internal/mocha-test-setup": "~2.51.0",
|
|
88
88
|
"@fluid-tools/build-cli": "^0.56.0",
|
|
89
89
|
"@fluidframework/build-common": "^2.0.3",
|
|
90
90
|
"@fluidframework/build-tools": "^0.56.0",
|
|
91
91
|
"@fluidframework/eslint-config-fluid": "^5.7.4",
|
|
92
|
-
"@fluidframework/odsp-driver-previous": "npm:@fluidframework/odsp-driver@2.
|
|
92
|
+
"@fluidframework/odsp-driver-previous": "npm:@fluidframework/odsp-driver@2.50.0",
|
|
93
93
|
"@microsoft/api-extractor": "7.52.8",
|
|
94
94
|
"@types/mocha": "^10.0.10",
|
|
95
95
|
"@types/node": "^18.19.0",
|
|
96
96
|
"@types/sinon": "^17.0.3",
|
|
97
|
-
"@types/uuid": "^9.0.2",
|
|
98
97
|
"c8": "^8.0.1",
|
|
99
98
|
"concurrently": "^8.2.1",
|
|
100
99
|
"copyfiles": "^2.4.1",
|
package/src/checkUrl.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import { DriverPreCheckInfo } from "@fluidframework/driver-definitions/internal";
|
|
6
|
+
import type { DriverPreCheckInfo } from "@fluidframework/driver-definitions/internal";
|
|
7
7
|
|
|
8
8
|
import { getLocatorFromOdspUrl } from "./odspFluidFileLink.js";
|
|
9
9
|
|
|
@@ -4,18 +4,18 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import { assert } from "@fluidframework/core-utils/internal";
|
|
7
|
-
import {
|
|
7
|
+
import type {
|
|
8
8
|
ISnapshot,
|
|
9
9
|
ISnapshotTree,
|
|
10
10
|
ISequencedDocumentMessage,
|
|
11
11
|
} from "@fluidframework/driver-definitions/internal";
|
|
12
|
-
import { ITelemetryLoggerExt } from "@fluidframework/telemetry-utils/internal";
|
|
12
|
+
import type { ITelemetryLoggerExt } from "@fluidframework/telemetry-utils/internal";
|
|
13
13
|
|
|
14
14
|
import { ReadBuffer } from "./ReadBufferUtils.js";
|
|
15
15
|
import { measure } from "./odspUtils.js";
|
|
16
16
|
import {
|
|
17
|
-
NodeCore,
|
|
18
|
-
NodeTypes,
|
|
17
|
+
type NodeCore,
|
|
18
|
+
type NodeTypes,
|
|
19
19
|
TreeBuilder,
|
|
20
20
|
assertBlobCoreInstance,
|
|
21
21
|
assertBoolInstance,
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
import { stringToBuffer } from "@fluid-internal/client-utils";
|
|
7
7
|
import { assert } from "@fluidframework/core-utils/internal";
|
|
8
|
-
import {
|
|
8
|
+
import type {
|
|
9
9
|
ISnapshot,
|
|
10
10
|
IBlob,
|
|
11
11
|
ISnapshotTree,
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
import { TreeBuilderSerializer } from "./WriteBufferUtils.js";
|
|
16
16
|
import { snapshotMinReadVersion } from "./compactSnapshotParser.js";
|
|
17
17
|
import {
|
|
18
|
-
NodeCore,
|
|
18
|
+
type NodeCore,
|
|
19
19
|
addBoolProperty,
|
|
20
20
|
addDictionaryStringProperty,
|
|
21
21
|
addNumberProperty,
|
package/src/contracts.ts
CHANGED
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import {
|
|
6
|
+
import type {
|
|
7
7
|
ISnapshot,
|
|
8
8
|
ISequencedDocumentMessage,
|
|
9
9
|
} from "@fluidframework/driver-definitions/internal";
|
|
10
|
-
import { HostStoragePolicy } from "@fluidframework/odsp-driver-definitions/internal";
|
|
10
|
+
import type { HostStoragePolicy } from "@fluidframework/odsp-driver-definitions/internal";
|
|
11
11
|
|
|
12
12
|
// eslint-disable-next-line import/no-deprecated
|
|
13
|
-
import { ISnapshotContents } from "./odspPublicUtils.js";
|
|
13
|
+
import type { ISnapshotContents } from "./odspPublicUtils.js";
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
16
|
* Interface for error responses for the WebSocket connection
|
package/src/contractsPublic.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import { IOdspUrlParts } from "@fluidframework/odsp-driver-definitions/internal";
|
|
6
|
+
import type { IOdspUrlParts } from "@fluidframework/odsp-driver-definitions/internal";
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* @legacy
|
|
@@ -56,8 +56,26 @@ export interface IClpCompliantAppHeader {
|
|
|
56
56
|
[ClpCompliantAppHeader.isClpCompliantApp]: boolean;
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
+
/**
|
|
60
|
+
* @internal
|
|
61
|
+
*/
|
|
62
|
+
export enum FileMetadataHeader {
|
|
63
|
+
/**
|
|
64
|
+
* ETag (entity tag) identifier for a specific version of the file.
|
|
65
|
+
* When provided, it will be sent to the snapshot API in the If-Match header.
|
|
66
|
+
*/
|
|
67
|
+
eTag = "eTag",
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* @internal
|
|
71
|
+
*/
|
|
72
|
+
export interface IFileMetadataHeader {
|
|
73
|
+
[FileMetadataHeader.eTag]: string;
|
|
74
|
+
}
|
|
75
|
+
|
|
59
76
|
declare module "@fluidframework/core-interfaces" {
|
|
60
77
|
export interface IRequestHeader
|
|
61
78
|
extends Partial<ISharingLinkHeader>,
|
|
62
|
-
Partial<IClpCompliantAppHeader
|
|
79
|
+
Partial<IClpCompliantAppHeader>,
|
|
80
|
+
Partial<IFileMetadataHeader> {}
|
|
63
81
|
}
|
|
@@ -4,32 +4,32 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import { assert } from "@fluidframework/core-utils/internal";
|
|
7
|
-
import { ISummaryTree } from "@fluidframework/driver-definitions";
|
|
8
|
-
import { ISnapshot } from "@fluidframework/driver-definitions/internal";
|
|
7
|
+
import type { ISummaryTree } from "@fluidframework/driver-definitions";
|
|
8
|
+
import type { ISnapshot } from "@fluidframework/driver-definitions/internal";
|
|
9
9
|
import { NonRetryableError } from "@fluidframework/driver-utils/internal";
|
|
10
10
|
import {
|
|
11
|
-
IFileEntry,
|
|
12
|
-
IOdspResolvedUrl,
|
|
13
|
-
InstrumentedStorageTokenFetcher,
|
|
11
|
+
type IFileEntry,
|
|
12
|
+
type IOdspResolvedUrl,
|
|
13
|
+
type InstrumentedStorageTokenFetcher,
|
|
14
14
|
OdspErrorTypes,
|
|
15
|
-
ShareLinkInfoType,
|
|
15
|
+
type ShareLinkInfoType,
|
|
16
16
|
type IOdspUrlParts,
|
|
17
17
|
} from "@fluidframework/odsp-driver-definitions/internal";
|
|
18
18
|
import {
|
|
19
|
-
ITelemetryLoggerExt,
|
|
19
|
+
type ITelemetryLoggerExt,
|
|
20
20
|
loggerToMonitoringContext,
|
|
21
21
|
PerformanceEvent,
|
|
22
22
|
} from "@fluidframework/telemetry-utils/internal";
|
|
23
23
|
|
|
24
|
-
import { ICreateFileResponse,
|
|
24
|
+
import type { ICreateFileResponse, IRenameFileResponse } from "./../contracts.js";
|
|
25
25
|
import { ClpCompliantAppHeader } from "./../contractsPublic.js";
|
|
26
26
|
import { createOdspUrl } from "./../createOdspUrl.js";
|
|
27
|
-
import { EpochTracker } from "./../epochTracker.js";
|
|
27
|
+
import type { EpochTracker } from "./../epochTracker.js";
|
|
28
28
|
import { getHeadersWithAuth } from "./../getUrlAndHeadersWithAuth.js";
|
|
29
29
|
import { OdspDriverUrlResolver } from "./../odspDriverUrlResolver.js";
|
|
30
30
|
import { checkForKnownServerFarmType, getApiRoot } from "./../odspUrlHelper.js";
|
|
31
31
|
import {
|
|
32
|
-
INewFileInfo,
|
|
32
|
+
type INewFileInfo,
|
|
33
33
|
appendNavParam,
|
|
34
34
|
buildOdspShareLinkReqParams,
|
|
35
35
|
createCacheSnapshotKey,
|
|
@@ -3,27 +3,27 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import { ISummaryTree } from "@fluidframework/driver-definitions";
|
|
7
|
-
import { ISnapshot } from "@fluidframework/driver-definitions/internal";
|
|
6
|
+
import type { ISummaryTree } from "@fluidframework/driver-definitions";
|
|
7
|
+
import type { ISnapshot } from "@fluidframework/driver-definitions/internal";
|
|
8
8
|
import { UsageError } from "@fluidframework/driver-utils/internal";
|
|
9
|
-
import {
|
|
9
|
+
import type {
|
|
10
10
|
IFileEntry,
|
|
11
11
|
IOdspResolvedUrl,
|
|
12
12
|
InstrumentedStorageTokenFetcher,
|
|
13
13
|
} from "@fluidframework/odsp-driver-definitions/internal";
|
|
14
14
|
import {
|
|
15
|
-
ITelemetryLoggerExt,
|
|
15
|
+
type ITelemetryLoggerExt,
|
|
16
16
|
loggerToMonitoringContext,
|
|
17
17
|
} from "@fluidframework/telemetry-utils/internal";
|
|
18
18
|
|
|
19
|
-
import { IWriteSummaryResponse } from "./../contracts.js";
|
|
20
|
-
import { ClpCompliantAppHeader } from "./../contractsPublic.js";
|
|
19
|
+
import type { IWriteSummaryResponse } from "./../contracts.js";
|
|
20
|
+
import { ClpCompliantAppHeader, FileMetadataHeader } from "./../contractsPublic.js";
|
|
21
21
|
import { createOdspUrl } from "./../createOdspUrl.js";
|
|
22
|
-
import { EpochTracker } from "./../epochTracker.js";
|
|
22
|
+
import type { EpochTracker } from "./../epochTracker.js";
|
|
23
23
|
import { OdspDriverUrlResolver } from "./../odspDriverUrlResolver.js";
|
|
24
24
|
import { getApiRoot } from "./../odspUrlHelper.js";
|
|
25
25
|
import {
|
|
26
|
-
IExistingFileInfo,
|
|
26
|
+
type IExistingFileInfo,
|
|
27
27
|
createCacheSnapshotKey,
|
|
28
28
|
snapshotWithLoadingGroupIdSupported,
|
|
29
29
|
} from "./../odspUtils.js";
|
|
@@ -54,6 +54,7 @@ export async function createNewContainerOnExistingFile(
|
|
|
54
54
|
createNewCaching: boolean,
|
|
55
55
|
forceAccessTokenViaAuthorizationHeader: boolean,
|
|
56
56
|
isClpCompliantApp?: boolean,
|
|
57
|
+
eTag?: string,
|
|
57
58
|
): Promise<IOdspResolvedUrl> {
|
|
58
59
|
if (createNewSummary === undefined) {
|
|
59
60
|
throw new UsageError("createNewSummary must exist to create a new container");
|
|
@@ -67,6 +68,12 @@ export async function createNewContainerOnExistingFile(
|
|
|
67
68
|
|
|
68
69
|
const initialUrl = `${baseUrl}/opStream/snapshots/snapshot`;
|
|
69
70
|
|
|
71
|
+
const additionalHeaders: { [key: string]: string } = {};
|
|
72
|
+
if (eTag !== undefined) {
|
|
73
|
+
// Sending the e-tag of the file in the If-Match triggers file conversion logic in the /snapshot api.
|
|
74
|
+
additionalHeaders["If-Match"] = eTag;
|
|
75
|
+
}
|
|
76
|
+
|
|
70
77
|
const { id: summaryHandle } = await createNewFluidContainerCore<IWriteSummaryResponse>({
|
|
71
78
|
containerSnapshot,
|
|
72
79
|
getAuthHeader,
|
|
@@ -76,13 +83,17 @@ export async function createNewContainerOnExistingFile(
|
|
|
76
83
|
epochTracker,
|
|
77
84
|
telemetryName: "CreateNewContainerOnExistingFile",
|
|
78
85
|
fetchType: "uploadSummary",
|
|
86
|
+
additionalHeaders,
|
|
79
87
|
});
|
|
80
88
|
|
|
81
89
|
const odspUrl = createOdspUrl({ ...fileInfo, dataStorePath: "/" });
|
|
82
90
|
const resolver = new OdspDriverUrlResolver();
|
|
83
91
|
const odspResolvedUrl = await resolver.resolve({
|
|
84
92
|
url: odspUrl,
|
|
85
|
-
headers: {
|
|
93
|
+
headers: {
|
|
94
|
+
[ClpCompliantAppHeader.isClpCompliantApp]: isClpCompliantApp,
|
|
95
|
+
[FileMetadataHeader.eTag]: eTag,
|
|
96
|
+
},
|
|
86
97
|
});
|
|
87
98
|
fileEntry.docId = odspResolvedUrl.hashedDocumentId;
|
|
88
99
|
fileEntry.resolvedUrl = odspResolvedUrl;
|
|
@@ -6,31 +6,31 @@
|
|
|
6
6
|
import { Uint8ArrayToString, stringToBuffer } from "@fluid-internal/client-utils";
|
|
7
7
|
import { assert, unreachableCase } from "@fluidframework/core-utils/internal";
|
|
8
8
|
import {
|
|
9
|
-
ISummaryBlob,
|
|
10
|
-
ISummaryTree,
|
|
9
|
+
type ISummaryBlob,
|
|
10
|
+
type ISummaryTree,
|
|
11
11
|
type SummaryObject,
|
|
12
12
|
SummaryType,
|
|
13
13
|
} from "@fluidframework/driver-definitions";
|
|
14
|
-
import { ISnapshot, ISnapshotTree } from "@fluidframework/driver-definitions/internal";
|
|
14
|
+
import type { ISnapshot, ISnapshotTree } from "@fluidframework/driver-definitions/internal";
|
|
15
15
|
import {
|
|
16
16
|
getDocAttributesFromProtocolSummary,
|
|
17
17
|
getGitType,
|
|
18
18
|
isCombinedAppAndProtocolSummary,
|
|
19
19
|
} from "@fluidframework/driver-utils/internal";
|
|
20
|
-
import { InstrumentedStorageTokenFetcher } from "@fluidframework/odsp-driver-definitions/internal";
|
|
20
|
+
import type { InstrumentedStorageTokenFetcher } from "@fluidframework/odsp-driver-definitions/internal";
|
|
21
21
|
import {
|
|
22
|
-
ITelemetryLoggerExt,
|
|
22
|
+
type ITelemetryLoggerExt,
|
|
23
23
|
PerformanceEvent,
|
|
24
24
|
} from "@fluidframework/telemetry-utils/internal";
|
|
25
25
|
import { v4 as uuid } from "uuid";
|
|
26
26
|
|
|
27
|
-
import {
|
|
27
|
+
import type {
|
|
28
28
|
IOdspSummaryPayload,
|
|
29
29
|
IOdspSummaryTree,
|
|
30
30
|
OdspSummaryTreeEntry,
|
|
31
31
|
OdspSummaryTreeValue,
|
|
32
32
|
} from "./../contracts.js";
|
|
33
|
-
import { EpochTracker, FetchType } from "./../epochTracker.js";
|
|
33
|
+
import type { EpochTracker, FetchType } from "./../epochTracker.js";
|
|
34
34
|
import { getHeadersWithAuth } from "./../getUrlAndHeadersWithAuth.js";
|
|
35
35
|
import { checkForKnownServerFarmType } from "./../odspUrlHelper.js";
|
|
36
36
|
import { getWithRetryForTokenRefresh, maxUmpPostBodySize } from "./../odspUtils.js";
|
|
@@ -212,6 +212,7 @@ export async function createNewFluidContainerCore<T>(args: {
|
|
|
212
212
|
telemetryName: string;
|
|
213
213
|
fetchType: FetchType;
|
|
214
214
|
validateResponseCallback?: (content: T) => void;
|
|
215
|
+
additionalHeaders?: { [key: string]: string };
|
|
215
216
|
}): Promise<T> {
|
|
216
217
|
const {
|
|
217
218
|
containerSnapshot,
|
|
@@ -222,6 +223,7 @@ export async function createNewFluidContainerCore<T>(args: {
|
|
|
222
223
|
telemetryName,
|
|
223
224
|
fetchType,
|
|
224
225
|
validateResponseCallback,
|
|
226
|
+
additionalHeaders = {},
|
|
225
227
|
} = args;
|
|
226
228
|
const internalFarmType = checkForKnownServerFarmType(initialUrl);
|
|
227
229
|
|
|
@@ -243,14 +245,23 @@ export async function createNewFluidContainerCore<T>(args: {
|
|
|
243
245
|
{ ...options, request: { url: authInBodyUrl, method } },
|
|
244
246
|
telemetryName,
|
|
245
247
|
);
|
|
246
|
-
const
|
|
247
|
-
|
|
248
|
-
`
|
|
249
|
-
`
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
248
|
+
const postBodyWithAuthHeaders = [
|
|
249
|
+
`Authorization: ${authHeader}`,
|
|
250
|
+
`X-HTTP-Method-Override: POST`,
|
|
251
|
+
`Content-Type: application/json`,
|
|
252
|
+
];
|
|
253
|
+
if (additionalHeaders !== undefined) {
|
|
254
|
+
for (const [key, value] of Object.entries(additionalHeaders)) {
|
|
255
|
+
postBodyWithAuthHeaders.push(`${key}: ${value}`);
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
const postBodyWithAuth = [
|
|
259
|
+
`--${formBoundary}`,
|
|
260
|
+
...postBodyWithAuthHeaders,
|
|
261
|
+
`_post: 1`,
|
|
262
|
+
`\r\n${snapshotBody}`,
|
|
263
|
+
`\r\n--${formBoundary}--`,
|
|
264
|
+
].join("\r\n");
|
|
254
265
|
|
|
255
266
|
let postBody = snapshotBody;
|
|
256
267
|
// We use the byte length of the post body to determine if we should use the multipart/form-data or not. This helps
|
|
@@ -272,6 +283,7 @@ export async function createNewFluidContainerCore<T>(args: {
|
|
|
272
283
|
telemetryName,
|
|
273
284
|
);
|
|
274
285
|
headers = {
|
|
286
|
+
...additionalHeaders,
|
|
275
287
|
...getHeadersWithAuth(authHeaderNoUmp),
|
|
276
288
|
"Content-Type": "application/json",
|
|
277
289
|
};
|
package/src/createFile/index.ts
CHANGED
|
@@ -3,11 +3,12 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import { ITelemetryLoggerExt } from "@fluidframework/telemetry-utils/internal";
|
|
6
|
+
import type { ITelemetryLoggerExt } from "@fluidframework/telemetry-utils/internal";
|
|
7
7
|
|
|
8
8
|
export async function useCreateNewModule<T = void>(
|
|
9
9
|
odspLogger: ITelemetryLoggerExt,
|
|
10
10
|
func: (
|
|
11
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-imports
|
|
11
12
|
m: typeof import("./createNewModule.js") /* webpackChunkName: "createNewModule" */,
|
|
12
13
|
) => Promise<T>,
|
|
13
14
|
): Promise<T> {
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import { IRequest } from "@fluidframework/core-interfaces";
|
|
6
|
+
import type { IRequest } from "@fluidframework/core-interfaces";
|
|
7
7
|
import {
|
|
8
8
|
DriverHeader,
|
|
9
9
|
type IContainerPackageInfo,
|
|
10
10
|
} from "@fluidframework/driver-definitions/internal";
|
|
11
|
-
import { ISharingLinkKind } from "@fluidframework/odsp-driver-definitions/internal";
|
|
11
|
+
import type { ISharingLinkKind } from "@fluidframework/odsp-driver-definitions/internal";
|
|
12
12
|
|
|
13
13
|
import { buildOdspShareLinkReqParams, getContainerPackageName } from "./odspUtils.js";
|
|
14
14
|
|
package/src/createOdspUrl.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import { OdspFluidDataStoreLocator } from "./contractsPublic.js";
|
|
6
|
+
import type { OdspFluidDataStoreLocator } from "./contractsPublic.js";
|
|
7
7
|
|
|
8
8
|
/*
|
|
9
9
|
* Per https://github.com/microsoft/FluidFramework/issues/1556, isolating createOdspUrl() in its own file.
|
package/src/epochTracker.ts
CHANGED
|
@@ -11,20 +11,20 @@ import {
|
|
|
11
11
|
ThrottlingError,
|
|
12
12
|
} from "@fluidframework/driver-utils/internal";
|
|
13
13
|
import {
|
|
14
|
-
ICacheEntry,
|
|
15
|
-
IEntry,
|
|
16
|
-
IFileEntry,
|
|
17
|
-
IOdspError,
|
|
18
|
-
IOdspErrorAugmentations,
|
|
19
|
-
IOdspResolvedUrl,
|
|
20
|
-
IPersistedCache,
|
|
14
|
+
type ICacheEntry,
|
|
15
|
+
type IEntry,
|
|
16
|
+
type IFileEntry,
|
|
17
|
+
type IOdspError,
|
|
18
|
+
type IOdspErrorAugmentations,
|
|
19
|
+
type IOdspResolvedUrl,
|
|
20
|
+
type IPersistedCache,
|
|
21
21
|
OdspErrorTypes,
|
|
22
22
|
maximumCacheDurationMs,
|
|
23
23
|
snapshotKey,
|
|
24
24
|
snapshotWithLoadingGroupIdKey,
|
|
25
25
|
} from "@fluidframework/odsp-driver-definitions/internal";
|
|
26
26
|
import {
|
|
27
|
-
ITelemetryLoggerExt,
|
|
27
|
+
type ITelemetryLoggerExt,
|
|
28
28
|
PerformanceEvent,
|
|
29
29
|
isFluidError,
|
|
30
30
|
loggerToMonitoringContext,
|
|
@@ -33,12 +33,12 @@ import {
|
|
|
33
33
|
} from "@fluidframework/telemetry-utils/internal";
|
|
34
34
|
import { v4 as uuid } from "uuid";
|
|
35
35
|
|
|
36
|
-
import { IVersionedValueWithEpoch, persistedCacheValueVersion } from "./contracts.js";
|
|
36
|
+
import { type IVersionedValueWithEpoch, persistedCacheValueVersion } from "./contracts.js";
|
|
37
37
|
import { ClpCompliantAppHeader } from "./contractsPublic.js";
|
|
38
|
-
import { INonPersistentCache, IOdspCache, IPersistedFileCache } from "./odspCache.js";
|
|
38
|
+
import type { INonPersistentCache, IOdspCache, IPersistedFileCache } from "./odspCache.js";
|
|
39
39
|
import { patchOdspResolvedUrl } from "./odspLocationRedirection.js";
|
|
40
40
|
import {
|
|
41
|
-
IOdspResponse,
|
|
41
|
+
type IOdspResponse,
|
|
42
42
|
fetchAndParseAsJSONHelper,
|
|
43
43
|
fetchArray,
|
|
44
44
|
fetchHelper,
|