@fluidframework/odsp-driver 2.117.0 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +92 -2
- package/README.md +53 -50
- package/api-extractor/api-extractor-lint-pointInTime.cjs.json +5 -0
- package/api-extractor/api-extractor-lint-pointInTime.esm.json +5 -0
- package/{api-extractor.json → api-extractor/api-extractor-model.json} +1 -1
- package/api-extractor/api-extractor-report.pointInTime.json +9 -0
- package/api-report/odsp-driver.legacy.alpha.api.md +28 -3
- package/api-report/odsp-driver.legacy.beta.api.md +28 -3
- package/api-report/odsp-driver.point-in-time.legacy.beta.api.md +117 -0
- package/dist/ReadBufferUtils.js +2 -1
- package/dist/ReadBufferUtils.js.map +1 -1
- package/dist/WriteBufferUtils.js +4 -6
- package/dist/WriteBufferUtils.js.map +1 -1
- package/dist/checkUrl.js +1 -2
- package/dist/checkUrl.js.map +1 -1
- package/dist/compactSnapshotParser.d.ts.map +1 -1
- package/dist/compactSnapshotParser.js +5 -4
- package/dist/compactSnapshotParser.js.map +1 -1
- package/dist/compactSnapshotWriter.js +1 -2
- package/dist/compactSnapshotWriter.js.map +1 -1
- package/dist/createFile/createFile.js +4 -5
- package/dist/createFile/createFile.js.map +1 -1
- package/dist/createFile/createNewContainerOnExistingFile.js +1 -2
- package/dist/createFile/createNewContainerOnExistingFile.js.map +1 -1
- package/dist/createFile/createNewUtils.d.ts.map +1 -1
- package/dist/createFile/createNewUtils.js +4 -5
- package/dist/createFile/createNewUtils.js.map +1 -1
- package/dist/createFile/index.js +1 -2
- package/dist/createFile/index.js.map +1 -1
- package/dist/createOdspCreateContainerRequest.js +1 -2
- package/dist/createOdspCreateContainerRequest.js.map +1 -1
- package/dist/createOdspUrl.js +1 -2
- package/dist/createOdspUrl.js.map +1 -1
- package/dist/epochTracker.d.ts.map +1 -1
- package/dist/epochTracker.js +17 -6
- package/dist/epochTracker.js.map +1 -1
- package/dist/fetchSnapshot.d.ts.map +1 -1
- package/dist/fetchSnapshot.js +5 -5
- package/dist/fetchSnapshot.js.map +1 -1
- package/dist/getFileLink.d.ts.map +1 -1
- package/dist/getQueryString.js +1 -2
- package/dist/getQueryString.js.map +1 -1
- package/dist/getUrlAndHeadersWithAuth.js +1 -2
- package/dist/getUrlAndHeadersWithAuth.js.map +1 -1
- package/dist/index.d.ts +3 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -5
- package/dist/index.js.map +1 -1
- package/dist/legacy.d.ts +4 -1
- package/dist/legacyAlpha.d.ts +4 -1
- package/dist/localOdspDriver/localOdspDeltaStorageService.js +2 -0
- package/dist/localOdspDriver/localOdspDeltaStorageService.js.map +1 -1
- package/dist/localOdspDriver/localOdspDocumentService.js +5 -1
- package/dist/localOdspDriver/localOdspDocumentService.js.map +1 -1
- package/dist/localOdspDriver/localOdspDocumentServiceFactory.js +2 -1
- package/dist/localOdspDriver/localOdspDocumentServiceFactory.js.map +1 -1
- package/dist/localOdspDriver/localOdspDocumentStorageManager.js +4 -1
- package/dist/localOdspDriver/localOdspDocumentStorageManager.js.map +1 -1
- package/dist/mockify.js +2 -2
- package/dist/mockify.js.map +1 -1
- package/dist/odspCache.js +7 -8
- package/dist/odspCache.js.map +1 -1
- package/dist/odspDelayLoadedDeltaStream.d.ts.map +1 -1
- package/dist/odspDelayLoadedDeltaStream.js +42 -26
- package/dist/odspDelayLoadedDeltaStream.js.map +1 -1
- package/dist/odspDeltaStorageService.js +14 -1
- package/dist/odspDeltaStorageService.js.map +1 -1
- package/dist/odspDocumentDeltaConnection.d.ts.map +1 -1
- package/dist/odspDocumentDeltaConnection.js +58 -41
- package/dist/odspDocumentDeltaConnection.js.map +1 -1
- package/dist/odspDocumentService.js +16 -1
- package/dist/odspDocumentService.js.map +1 -1
- package/dist/odspDocumentServiceFactory.d.ts +30 -1
- package/dist/odspDocumentServiceFactory.d.ts.map +1 -1
- package/dist/odspDocumentServiceFactory.js +30 -2
- package/dist/odspDocumentServiceFactory.js.map +1 -1
- package/dist/odspDocumentServiceFactoryCore.d.ts +83 -3
- package/dist/odspDocumentServiceFactoryCore.d.ts.map +1 -1
- package/dist/odspDocumentServiceFactoryCore.js +38 -12
- package/dist/odspDocumentServiceFactoryCore.js.map +1 -1
- package/dist/odspDocumentStorageManager.d.ts.map +1 -1
- package/dist/odspDocumentStorageManager.js +31 -13
- package/dist/odspDocumentStorageManager.js.map +1 -1
- package/dist/odspDocumentStorageServiceBase.js +23 -20
- package/dist/odspDocumentStorageServiceBase.js.map +1 -1
- package/dist/odspDriverUrlResolver.js +2 -2
- package/dist/odspDriverUrlResolver.js.map +1 -1
- package/dist/odspDriverUrlResolverForShareLink.d.ts.map +1 -1
- package/dist/odspDriverUrlResolverForShareLink.js +6 -1
- package/dist/odspDriverUrlResolverForShareLink.js.map +1 -1
- package/dist/odspError.js +1 -2
- package/dist/odspError.js.map +1 -1
- package/dist/odspFluidFileLink.js +4 -4
- package/dist/odspFluidFileLink.js.map +1 -1
- package/dist/odspLayerCompatState.d.ts +8 -1
- package/dist/odspLayerCompatState.d.ts.map +1 -1
- package/dist/odspLayerCompatState.js +20 -1
- package/dist/odspLayerCompatState.js.map +1 -1
- package/dist/odspLocationRedirection.js +1 -2
- package/dist/odspLocationRedirection.js.map +1 -1
- package/dist/odspPublicUtils.js +1 -2
- package/dist/odspPublicUtils.js.map +1 -1
- package/dist/odspSnapshotParser.js +1 -2
- package/dist/odspSnapshotParser.js.map +1 -1
- package/dist/odspSummaryUploadManager.js +7 -0
- package/dist/odspSummaryUploadManager.js.map +1 -1
- package/dist/odspUrlHelper.js +6 -7
- package/dist/odspUrlHelper.js.map +1 -1
- package/dist/odspUtils.d.ts.map +1 -1
- package/dist/odspUtils.js +21 -21
- package/dist/odspUtils.js.map +1 -1
- package/dist/odspVersionManager/odspFileVersionFetcher.js +1 -2
- package/dist/odspVersionManager/odspFileVersionFetcher.js.map +1 -1
- package/dist/odspVersionManager/odspVersionManager.js +9 -8
- package/dist/odspVersionManager/odspVersionManager.js.map +1 -1
- package/dist/opsCaching.js +7 -1
- package/dist/opsCaching.js.map +1 -1
- package/dist/packageVersion.d.ts +1 -1
- package/dist/packageVersion.d.ts.map +1 -1
- package/dist/packageVersion.js +1 -1
- package/dist/packageVersion.js.map +1 -1
- package/dist/pointInTime.d.ts +15 -0
- package/dist/pointInTime.d.ts.map +1 -0
- package/dist/pointInTime.js +16 -0
- package/dist/pointInTime.js.map +1 -0
- package/dist/pointInTimeDriver/createPointInTimeDocumentService.d.ts +34 -0
- package/dist/pointInTimeDriver/createPointInTimeDocumentService.d.ts.map +1 -0
- package/dist/pointInTimeDriver/createPointInTimeDocumentService.js +101 -0
- package/dist/pointInTimeDriver/createPointInTimeDocumentService.js.map +1 -0
- package/dist/pointInTimeDriver/odspPointInTimeDocumentService.js +10 -6
- package/dist/pointInTimeDriver/odspPointInTimeDocumentService.js.map +1 -1
- package/dist/prefetchLatestSnapshot.js +1 -2
- package/dist/prefetchLatestSnapshot.js.map +1 -1
- package/dist/retryErrorsStorageAdapter.js +3 -1
- package/dist/retryErrorsStorageAdapter.js.map +1 -1
- package/dist/retryUtils.js +1 -2
- package/dist/retryUtils.js.map +1 -1
- package/dist/vroom.d.ts.map +1 -1
- package/dist/zipItDataRepresentationUtils.d.ts.map +1 -1
- package/dist/zipItDataRepresentationUtils.js +20 -15
- package/dist/zipItDataRepresentationUtils.js.map +1 -1
- package/lib/ReadBufferUtils.js +2 -1
- package/lib/ReadBufferUtils.js.map +1 -1
- package/lib/WriteBufferUtils.js +2 -4
- package/lib/WriteBufferUtils.js.map +1 -1
- package/lib/compactSnapshotParser.d.ts.map +1 -1
- package/lib/compactSnapshotParser.js +3 -2
- package/lib/compactSnapshotParser.js.map +1 -1
- package/lib/createFile/createNewUtils.d.ts.map +1 -1
- package/lib/createFile/createNewUtils.js +2 -2
- package/lib/createFile/createNewUtils.js.map +1 -1
- package/lib/epochTracker.d.ts.map +1 -1
- package/lib/epochTracker.js +15 -4
- package/lib/epochTracker.js.map +1 -1
- package/lib/fetchSnapshot.d.ts.map +1 -1
- package/lib/getFileLink.d.ts.map +1 -1
- package/lib/index.d.ts +3 -4
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +3 -6
- package/lib/index.js.map +1 -1
- package/lib/legacy.d.ts +5 -2
- package/lib/legacyAlpha.d.ts +5 -2
- package/lib/localOdspDriver/localOdspDeltaStorageService.js +2 -0
- package/lib/localOdspDriver/localOdspDeltaStorageService.js.map +1 -1
- package/lib/localOdspDriver/localOdspDocumentService.js +5 -1
- package/lib/localOdspDriver/localOdspDocumentService.js.map +1 -1
- package/lib/localOdspDriver/localOdspDocumentServiceFactory.js +2 -1
- package/lib/localOdspDriver/localOdspDocumentServiceFactory.js.map +1 -1
- package/lib/localOdspDriver/localOdspDocumentStorageManager.js +4 -1
- package/lib/localOdspDriver/localOdspDocumentStorageManager.js.map +1 -1
- package/lib/odspCache.js +7 -8
- package/lib/odspCache.js.map +1 -1
- package/lib/odspDelayLoadedDeltaStream.d.ts.map +1 -1
- package/lib/odspDelayLoadedDeltaStream.js +42 -26
- package/lib/odspDelayLoadedDeltaStream.js.map +1 -1
- package/lib/odspDeltaStorageService.js +14 -1
- package/lib/odspDeltaStorageService.js.map +1 -1
- package/lib/odspDocumentDeltaConnection.d.ts.map +1 -1
- package/lib/odspDocumentDeltaConnection.js +58 -41
- package/lib/odspDocumentDeltaConnection.js.map +1 -1
- package/lib/odspDocumentService.js +16 -1
- package/lib/odspDocumentService.js.map +1 -1
- package/lib/odspDocumentServiceFactory.d.ts +30 -1
- package/lib/odspDocumentServiceFactory.d.ts.map +1 -1
- package/lib/odspDocumentServiceFactory.js +28 -1
- package/lib/odspDocumentServiceFactory.js.map +1 -1
- package/lib/odspDocumentServiceFactoryCore.d.ts +83 -3
- package/lib/odspDocumentServiceFactoryCore.d.ts.map +1 -1
- package/lib/odspDocumentServiceFactoryCore.js +39 -13
- package/lib/odspDocumentServiceFactoryCore.js.map +1 -1
- package/lib/odspDocumentStorageManager.d.ts.map +1 -1
- package/lib/odspDocumentStorageManager.js +32 -14
- package/lib/odspDocumentStorageManager.js.map +1 -1
- package/lib/odspDocumentStorageServiceBase.js +23 -20
- package/lib/odspDocumentStorageServiceBase.js.map +1 -1
- package/lib/odspDriverUrlResolverForShareLink.d.ts.map +1 -1
- package/lib/odspDriverUrlResolverForShareLink.js +6 -1
- package/lib/odspDriverUrlResolverForShareLink.js.map +1 -1
- package/lib/odspLayerCompatState.d.ts +8 -1
- package/lib/odspLayerCompatState.d.ts.map +1 -1
- package/lib/odspLayerCompatState.js +20 -1
- package/lib/odspLayerCompatState.js.map +1 -1
- package/lib/odspSummaryUploadManager.js +7 -0
- package/lib/odspSummaryUploadManager.js.map +1 -1
- package/lib/odspUtils.d.ts.map +1 -1
- package/lib/odspVersionManager/odspVersionManager.js +7 -6
- package/lib/odspVersionManager/odspVersionManager.js.map +1 -1
- package/lib/opsCaching.js +7 -1
- package/lib/opsCaching.js.map +1 -1
- package/lib/packageVersion.d.ts +1 -1
- package/lib/packageVersion.d.ts.map +1 -1
- package/lib/packageVersion.js +1 -1
- package/lib/packageVersion.js.map +1 -1
- package/lib/pointInTime.d.ts +15 -0
- package/lib/pointInTime.d.ts.map +1 -0
- package/lib/pointInTime.js +12 -0
- package/lib/pointInTime.js.map +1 -0
- package/lib/pointInTimeDriver/createPointInTimeDocumentService.d.ts +34 -0
- package/lib/pointInTimeDriver/createPointInTimeDocumentService.d.ts.map +1 -0
- package/lib/pointInTimeDriver/createPointInTimeDocumentService.js +99 -0
- package/lib/pointInTimeDriver/createPointInTimeDocumentService.js.map +1 -0
- package/lib/pointInTimeDriver/odspPointInTimeDocumentService.js +10 -6
- package/lib/pointInTimeDriver/odspPointInTimeDocumentService.js.map +1 -1
- package/lib/public.d.ts +1 -1
- package/lib/retryErrorsStorageAdapter.js +3 -1
- package/lib/retryErrorsStorageAdapter.js.map +1 -1
- package/lib/vroom.d.ts.map +1 -1
- package/lib/zipItDataRepresentationUtils.d.ts.map +1 -1
- package/lib/zipItDataRepresentationUtils.js +10 -5
- package/lib/zipItDataRepresentationUtils.js.map +1 -1
- package/package.json +49 -54
- package/src/compactSnapshotParser.ts +6 -2
- package/src/createFile/createNewUtils.ts +6 -2
- package/src/index.ts +10 -6
- package/src/odspDocumentServiceFactory.ts +69 -1
- package/src/odspDocumentServiceFactoryCore.ts +105 -4
- package/src/odspDocumentStorageManager.ts +2 -2
- package/src/odspLayerCompatState.ts +29 -1
- package/src/odspVersionManager/DEV.md +9 -8
- package/src/packageVersion.ts +1 -1
- package/src/pointInTime.ts +30 -0
- package/src/pointInTimeDriver/createPointInTimeDocumentService.ts +193 -0
- package/src/zipItDataRepresentationUtils.ts +3 -3
- package/tsconfig.json +1 -1
- package/dist/pointInTimeDriver/odspPointInTimeDocumentServiceFactory.d.ts +0 -41
- package/dist/pointInTimeDriver/odspPointInTimeDocumentServiceFactory.d.ts.map +0 -1
- package/dist/pointInTimeDriver/odspPointInTimeDocumentServiceFactory.js +0 -132
- package/dist/pointInTimeDriver/odspPointInTimeDocumentServiceFactory.js.map +0 -1
- package/internal.d.ts +0 -11
- package/legacy/alpha.d.ts +0 -11
- package/legacy.d.ts +0 -11
- package/lib/pointInTimeDriver/odspPointInTimeDocumentServiceFactory.d.ts +0 -41
- package/lib/pointInTimeDriver/odspPointInTimeDocumentServiceFactory.d.ts.map +0 -1
- package/lib/pointInTimeDriver/odspPointInTimeDocumentServiceFactory.js +0 -128
- package/lib/pointInTimeDriver/odspPointInTimeDocumentServiceFactory.js.map +0 -1
- package/src/pointInTimeDriver/odspPointInTimeDocumentServiceFactory.ts +0 -260
- /package/api-extractor/{api-extractor.current.json → api-extractor-report.current.json} +0 -0
- /package/api-extractor/{api-extractor.legacy.json → api-extractor-report.legacy.json} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,8 +1,98 @@
|
|
|
1
1
|
# @fluidframework/odsp-driver
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## 3.0.0
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- Removal of direct CommonJS support ([#28124](https://github.com/microsoft/FluidFramework/pull/28124)) [0f84e3b8878](https://github.com/microsoft/FluidFramework/commit/0f84e3b8878a5e75b2253976d98fd963bbd9db88)
|
|
8
|
+
|
|
9
|
+
Direct `require()` import is no longer directly supported.
|
|
10
|
+
Package is transpiled as ECMAScript Module.
|
|
11
|
+
|
|
12
|
+
See [Removal of direct CommonJS support in v3.0](https://github.com/microsoft/FluidFramework/issues/27444) for more information.
|
|
13
|
+
|
|
14
|
+
- New ILayerCompatSupportRequirements property on LocalDocumentServiceFactory and OdspDocumentServiceFactoryCore ([#27516](https://github.com/microsoft/FluidFramework/pull/27516)) [f8bcc56859f](https://github.com/microsoft/FluidFramework/commit/f8bcc56859fc51957d45453bcf59ce154a2e0c18)
|
|
15
|
+
|
|
16
|
+
A new optional property, `ILayerCompatSupportRequirements`, has been added to [`LocalDocumentServiceFactory`](https://fluidframework.com/docs/api/local-driver/localdocumentservicefactory-class) and [`OdspDocumentServiceFactoryCore`](https://fluidframework.com/docs/api/odsp-driver/odspdocumentservicefactorycore-class).
|
|
17
|
+
|
|
18
|
+
The Driver layer uses this property to publish the requirements that the Loader layer must meet to be compatible with it. Because the Driver has no reference to the Loader, it cannot validate the Loader directly; instead the Loader reads these requirements and validates itself against them on the Driver's behalf. This enables the Loader / Driver compatibility check to run in both directions.
|
|
19
|
+
|
|
20
|
+
- Make point-in-time support optional and consumer-supplied ([#28055](https://github.com/microsoft/FluidFramework/pull/28055)) [9a55f89f0ac](https://github.com/microsoft/FluidFramework/commit/9a55f89f0acb4afde7b189bab352b6140a668b92)
|
|
21
|
+
|
|
22
|
+
Point-in-time loading is now an optional implementation supplied by the host. Consumers that do
|
|
23
|
+
not enable the feature no longer include its implementation in their dependency graph. Hosts can
|
|
24
|
+
control when the feature is loaded by dynamically importing its dedicated entrypoint:
|
|
25
|
+
|
|
26
|
+
```typescript
|
|
27
|
+
const factory = createOdspDocumentServiceFactory({
|
|
28
|
+
getStorageToken,
|
|
29
|
+
getWebsocketToken,
|
|
30
|
+
persistedCache,
|
|
31
|
+
hostPolicy,
|
|
32
|
+
pointInTimeDocumentServiceImplementation: async (props) => {
|
|
33
|
+
const { createPointInTimeDocumentService } = await import(
|
|
34
|
+
"@fluidframework/odsp-driver/legacy/point-in-time"
|
|
35
|
+
);
|
|
36
|
+
return createPointInTimeDocumentService(props);
|
|
37
|
+
},
|
|
38
|
+
});
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
The legacy-beta `getOdspPointInTimeDocumentServiceFactory` helper is removed. Point-in-time
|
|
42
|
+
consumers should use `createOdspDocumentServiceFactory`, which accepts tokens, cache, host policy,
|
|
43
|
+
and optional feature implementations in one options object. Existing `OdspDocumentServiceFactory`
|
|
44
|
+
and `OdspDocumentServiceFactoryCore` constructor signatures remain unchanged.
|
|
45
|
+
|
|
46
|
+
- Require modern TypeScript module resolution ([#27970](https://github.com/microsoft/FluidFramework/pull/27970)) [325e2016ca9](https://github.com/microsoft/FluidFramework/commit/325e2016ca9978d4a1f7552c97ba34feac9df41f)
|
|
47
|
+
|
|
48
|
+
Fluid Framework Client packages no longer include type declaration compatibility entrypoints for TypeScript's legacy Node10 resolution mode (`"moduleResolution": "node"` or `"node10"`).
|
|
49
|
+
Applications upgrading to Fluid Framework 3.0 must use one of the following supported configurations:
|
|
50
|
+
- `"module": "Node16"` with `"moduleResolution": "Node16"`
|
|
51
|
+
- `"module": "NodeNext"` with `"moduleResolution": "NodeNext"`
|
|
52
|
+
- `"module": "ESNext"` with `"moduleResolution": "Bundler"`
|
|
53
|
+
|
|
54
|
+
Existing public package entrypoints exposed through `package.json` exports, including `/alpha`, `/beta`, and `/legacy`, remain available under supported module resolution modes.
|
|
55
|
+
|
|
56
|
+
See [Removal of Node10 resolutions in v3.0](https://github.com/microsoft/FluidFramework/issues/27457) for more information.
|
|
57
|
+
|
|
58
|
+
- Enable point-in-time loading on the standard ODSP document service factory ([#28007](https://github.com/microsoft/FluidFramework/pull/28007)) [1336342a572](https://github.com/microsoft/FluidFramework/commit/1336342a572d620d9390802c82a8f6d06727087b)
|
|
59
|
+
|
|
60
|
+
[`OdspDocumentServiceFactoryCore`](https://fluidframework.com/docs/api/odsp-driver/odspdocumentservicefactorycore-class)
|
|
61
|
+
now exposes the optional `createPointInTimeDocumentService` capability.
|
|
62
|
+
[`OdspDocumentServiceFactory`](https://fluidframework.com/docs/api/odsp-driver/odspdocumentservicefactory-class)
|
|
63
|
+
inherits this capability, so hosts can use the standard factory with
|
|
64
|
+
[`loadContainerToSequenceNumber`](https://fluidframework.com/docs/api/container-loader/loadcontainertosequencenumber-function)
|
|
65
|
+
for sequence-number-based document loading. Factories that do not support point-in-time loading
|
|
66
|
+
leave the capability undefined.
|
|
67
|
+
|
|
68
|
+
```typescript
|
|
69
|
+
const factory = new OdspDocumentServiceFactory(
|
|
70
|
+
getStorageToken,
|
|
71
|
+
getWebsocketToken,
|
|
72
|
+
);
|
|
73
|
+
|
|
74
|
+
if (factory.createPointInTimeDocumentService !== undefined) {
|
|
75
|
+
const documentService = await factory.createPointInTimeDocumentService(
|
|
76
|
+
resolvedUrl,
|
|
77
|
+
targetSequenceNumber,
|
|
78
|
+
);
|
|
79
|
+
}
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
- Client packages now target ES2022 ([#27846](https://github.com/microsoft/FluidFramework/pull/27846)) [91c78541bdd](https://github.com/microsoft/FluidFramework/commit/91c78541bddcbca5d6c5f357b023eeaee617d885)
|
|
83
|
+
|
|
84
|
+
The TypeScript compilation `target` and `lib` for the Fluid Framework client packages have been raised from ES2021/ES2020 to **ES2022**.
|
|
85
|
+
The published JavaScript now uses ES2022 language features (with correspondingly less down-leveling), so consuming these packages requires a runtime that supports ES2022.
|
|
86
|
+
All actively supported Node.js versions and evergreen browsers already meet this requirement.
|
|
87
|
+
|
|
88
|
+
Note that Fluid Framework has not officially supported targets older than ES2022 since before 2.0: this is documented in [ClientRequirements.md](https://github.com/microsoft/FluidFramework/blob/main/ClientRequirements.md) as well as the README for every client package.
|
|
89
|
+
|
|
90
|
+
It is possible this change could impact users of less up to date JavaScript runtimes.
|
|
91
|
+
Impacted users can use a tool like [babel](https://babeljs.io/) to transpile out unsupported language features.
|
|
92
|
+
|
|
93
|
+
- Build with TypeScript 6 ([#28052](https://github.com/microsoft/FluidFramework/pull/28052)) [7ab015c49de](https://github.com/microsoft/FluidFramework/commit/7ab015c49deec84833cdfe1fb5e1606b901f6e81)
|
|
94
|
+
|
|
95
|
+
FluidFramework Client SDK is now built using TypeScript 6. Consumers should build with TypeScript v6 or v7 or compatible tooling.
|
|
6
96
|
|
|
7
97
|
## 2.116.0
|
|
8
98
|
|
package/README.md
CHANGED
|
@@ -33,15 +33,15 @@ In the table I have used the failure ones.
|
|
|
33
33
|
|
|
34
34
|
## Using Fluid Framework libraries
|
|
35
35
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
library consumers should always prefer `^`.
|
|
36
|
+
For a dependency on a Fluid Framework library's public APIs, we recommend a `^` (caret) version range.
|
|
37
|
+
For example, use `^1.3.4`.
|
|
39
38
|
|
|
40
|
-
|
|
39
|
+
For a dependency on an unstable API, such as a `beta` API, we recommend a more restrictive version range.
|
|
40
|
+
For example, use a `~` version range.
|
|
41
41
|
|
|
42
42
|
## Installation
|
|
43
43
|
|
|
44
|
-
|
|
44
|
+
Run this command to install the package:
|
|
45
45
|
|
|
46
46
|
```bash
|
|
47
47
|
npm i @fluidframework/odsp-driver
|
|
@@ -49,16 +49,16 @@ npm i @fluidframework/odsp-driver
|
|
|
49
49
|
|
|
50
50
|
## Importing from this package
|
|
51
51
|
|
|
52
|
-
This package
|
|
53
|
-
For
|
|
52
|
+
This package uses [package.json exports](https://nodejs.org/api/packages.html#exports) to separate APIs by support level.
|
|
53
|
+
For information about the support guarantees, read [API Support Levels](https://fluidframework.com/docs/build/releases-and-apitags/#api-support-levels).
|
|
54
54
|
|
|
55
|
-
|
|
55
|
+
Import the `public` APIs from `@fluidframework/odsp-driver`.
|
|
56
56
|
|
|
57
|
-
|
|
57
|
+
Import the `legacy` APIs from `@fluidframework/odsp-driver/legacy`.
|
|
58
58
|
|
|
59
59
|
## API Documentation
|
|
60
60
|
|
|
61
|
-
|
|
61
|
+
Read the **@fluidframework/odsp-driver** API documentation at <https://fluidframework.com/docs/apis/odsp-driver>.
|
|
62
62
|
|
|
63
63
|
<!-- prettier-ignore-end -->
|
|
64
64
|
|
|
@@ -89,62 +89,69 @@ Documenting some basics about opds-driver specific apis that are relevant for cr
|
|
|
89
89
|
|
|
90
90
|
## Minimum Client Requirements
|
|
91
91
|
|
|
92
|
-
|
|
93
|
-
These requirements
|
|
94
|
-
|
|
92
|
+
Fluid Framework client libraries support the platforms in this document.
|
|
93
|
+
These requirements are intentionally restrictive.
|
|
94
|
+
Within a major version series, we can relax these requirements, but we cannot make them stricter.
|
|
95
|
+
For a Long Term Support (LTS) version, we might need to support these platforms for several years.
|
|
95
96
|
|
|
96
|
-
|
|
97
|
-
If
|
|
98
|
-
|
|
97
|
+
Other configurations can work, but Fluid Framework does not support them.
|
|
98
|
+
If an unsupported configuration stops working, we do not classify this as a bug.
|
|
99
|
+
To request support for a configuration that is not listed, file an issue.
|
|
100
|
+
The product team will evaluate your request.
|
|
101
|
+
In the issue, specify the current status of the configuration:
|
|
102
|
+
|
|
103
|
+
- The configuration works but needs official support.
|
|
104
|
+
- The configuration does not work and requires changes.
|
|
99
105
|
|
|
100
106
|
### Supported Runtimes
|
|
101
107
|
|
|
102
|
-
-
|
|
103
|
-
-
|
|
104
|
-
-
|
|
108
|
+
- Fluid Framework supports Node.js versions 22 and 24 while they receive [upstream support](https://nodejs.org/en/about/previous-releases).
|
|
109
|
+
- Fluid Framework will stop support for version 22 [when upstream support ends on 2027-04-30](https://github.com/nodejs/release#release-schedule).
|
|
110
|
+
- Fluid Framework does not support Node.js with the `--no-experimental-fetch` flag.
|
|
111
|
+
- Fluid Framework supports modern browsers that support the ES2022 standard library.
|
|
105
112
|
|
|
106
113
|
### Supported Tools
|
|
107
114
|
|
|
108
|
-
- TypeScript
|
|
109
|
-
-
|
|
110
|
-
-
|
|
111
|
-
- [
|
|
112
|
-
-
|
|
113
|
-
|
|
115
|
+
- [TypeScript 6.0](https://typescriptdocs.com/release-notes/TypeScript%206.0):
|
|
116
|
+
- Fluid Framework supports all [`strict`](https://www.typescriptlang.org/tsconfig) options.
|
|
117
|
+
- Set the build targets (`lib`, `target`) to `ES2022` or later.
|
|
118
|
+
- Enable [`strictNullChecks`](https://www.typescriptlang.org/tsconfig).
|
|
119
|
+
- Fluid Framework does not support [configuration options deprecated in TypeScript 6.0](https://typescriptdocs.com/release-notes/TypeScript%206.0#breaking-changes-and-deprecations-in-typescript-6-0).
|
|
120
|
+
- Fluid Framework does not fully support `exactOptionalPropertyTypes`.
|
|
121
|
+
If you enable this option, do not use `in`, `Reflect.has`, `Object.hasOwn`, or `Object.prototype.hasOwnProperty` to narrow members of Fluid Framework types.
|
|
122
|
+
These methods can incorrectly exclude `undefined` from the possible values.
|
|
114
123
|
- [webpack](https://webpack.js.org/) 5
|
|
115
|
-
- We
|
|
116
|
-
Other bundlers
|
|
124
|
+
- We do not require a specific bundler.
|
|
125
|
+
Other bundlers that handle ES Modules can work, but we actively test only webpack.
|
|
117
126
|
|
|
118
127
|
### Module Resolution
|
|
119
128
|
|
|
120
|
-
[`Node16`, `NodeNext`, or `Bundler`](https://www.typescriptlang.org/tsconfig#moduleResolution)
|
|
121
|
-
|
|
129
|
+
In TypeScript `compilerOptions`, use [`Node16`, `Node20`, `NodeNext`, or `Bundler`](https://www.typescriptlang.org/tsconfig#moduleResolution) module resolution.
|
|
130
|
+
These settings follow the [Node.js v12+ ESM Resolution and Loading algorithm](https://nodejs.github.io/nodejs.dev/en/api/v20/esm/#resolution-and-loading-algorithm).
|
|
131
|
+
|
|
132
|
+
Do not use `Node10` module resolution.
|
|
122
133
|
|
|
123
134
|
### Module Formats
|
|
124
135
|
|
|
125
136
|
- ES Modules:
|
|
126
|
-
ES Modules
|
|
127
|
-
-
|
|
128
|
-
|
|
129
|
-
This is done to accommodate some workflows without good ES Module support.
|
|
130
|
-
If you have a workflow you would like included in this list, file an issue.
|
|
131
|
-
Once this list of workflows motivating CommonJS support is empty, we may drop support for CommonJS one year after notice of the change is posted here.
|
|
132
|
-
|
|
133
|
-
- Testing with Jest (which lacks [stable ESM support](https://jestjs.io/docs/ecmascript-modules) due to [unstable APIs in NodeJs](https://github.com/nodejs/node/issues/37648))
|
|
137
|
+
Use ES Modules to consume Fluid Framework client packages, including in Node.js.
|
|
138
|
+
- CommonJS:
|
|
139
|
+
Fluid Framework does not officially support CommonJS in version 3.0 or later.
|
|
134
140
|
|
|
135
141
|
## Contribution Guidelines
|
|
136
142
|
|
|
137
|
-
|
|
143
|
+
You can [contribute](https://github.com/microsoft/FluidFramework/blob/main/CONTRIBUTING.md) to Fluid Framework in these ways:
|
|
138
144
|
|
|
139
|
-
-
|
|
140
|
-
- [Submit
|
|
141
|
-
- Review
|
|
145
|
+
- Answer questions in [GitHub Discussions](https://github.com/microsoft/FluidFramework/discussions).
|
|
146
|
+
- [Submit bug reports](https://github.com/microsoft/FluidFramework/issues) and help verify fixes.
|
|
147
|
+
- Review [source code changes](https://github.com/microsoft/FluidFramework/pulls).
|
|
142
148
|
- [Contribute bug fixes](https://github.com/microsoft/FluidFramework/blob/main/CONTRIBUTING.md).
|
|
143
149
|
|
|
144
|
-
|
|
150
|
+
For detailed instructions, read the [repo documentation](https://github.com/microsoft/FluidFramework/blob/main/docs/content/Home.md).
|
|
145
151
|
|
|
146
|
-
This project
|
|
147
|
-
For more information
|
|
152
|
+
This project follows the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
|
|
153
|
+
For more information, read the [Code of Conduct frequently asked questions](https://opensource.microsoft.com/codeofconduct/faq/).
|
|
154
|
+
For questions or comments, contact [opencode@microsoft.com](mailto:opencode@microsoft.com).
|
|
148
155
|
|
|
149
156
|
This project may contain Microsoft trademarks or logos for Microsoft projects, products, or services.
|
|
150
157
|
Use of these trademarks or logos must follow Microsoft’s [Trademark & Brand Guidelines](https://www.microsoft.com/trademarks).
|
|
@@ -152,13 +159,9 @@ Use of Microsoft trademarks or logos in modified versions of this project must n
|
|
|
152
159
|
|
|
153
160
|
## Help
|
|
154
161
|
|
|
155
|
-
|
|
156
|
-
Check out [fluidframework.com](https://fluidframework.com/docs/).
|
|
157
|
-
|
|
158
|
-
Still not finding what you're looking for?
|
|
159
|
-
Please [file an issue](https://github.com/microsoft/FluidFramework/blob/main/docs/content/Contributing/Submitting-Bugs-and-Feature-Requests.md).
|
|
162
|
+
Read the [Fluid Framework documentation](https://fluidframework.com/docs/) for information about Fluid Framework concepts and APIs.
|
|
160
163
|
|
|
161
|
-
|
|
164
|
+
To request information that the documentation does not contain, [create an issue](https://github.com/microsoft/FluidFramework/blob/main/docs/content/Contributing/Submitting-Bugs-and-Feature-Requests.md).
|
|
162
165
|
|
|
163
166
|
## Trademark
|
|
164
167
|
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
|
|
3
|
+
"extends": "<projectFolder>/../../../common/build/build-common/api-extractor-lint.entrypoint.json",
|
|
4
|
+
"mainEntryPointFilePath": "<projectFolder>/dist/pointInTime.d.ts"
|
|
5
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
|
|
3
|
+
"extends": "<projectFolder>/../../../common/build/build-common/api-extractor-lint.entrypoint.json",
|
|
4
|
+
"mainEntryPointFilePath": "<projectFolder>/lib/pointInTime.d.ts"
|
|
5
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
|
|
3
|
-
"extends": "
|
|
3
|
+
"extends": "<projectFolder>/../../../common/build/build-common/api-extractor-model.esm.json"
|
|
4
4
|
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
|
|
3
|
+
"extends": "<projectFolder>/../../../common/build/build-common/api-extractor-report.esm.legacy.json",
|
|
4
|
+
"mainEntryPointFilePath": "<projectFolder>/lib/pointInTime.d.ts",
|
|
5
|
+
"apiReport": {
|
|
6
|
+
"reportFileName": "<unscopedPackageName>.point-in-time.legacy",
|
|
7
|
+
"reportVariants": ["beta"]
|
|
8
|
+
}
|
|
9
|
+
}
|
|
@@ -13,6 +13,9 @@ export function createLocalOdspDocumentServiceFactory(localSnapshot: Uint8Array
|
|
|
13
13
|
// @beta @legacy
|
|
14
14
|
export function createOdspCreateContainerRequest(siteUrl: string, driveId: string, filePath: string, fileName: string, createShareLinkType?: ISharingLinkKind, containerPackageInfo?: IContainerPackageInfo | undefined): IRequest;
|
|
15
15
|
|
|
16
|
+
// @beta @legacy
|
|
17
|
+
export function createOdspDocumentServiceFactory(options: IOdspDocumentServiceFactoryOptions): OdspDocumentServiceFactory;
|
|
18
|
+
|
|
16
19
|
// @beta @legacy
|
|
17
20
|
export function createOdspUrl(l: OdspFluidDataStoreLocator): string;
|
|
18
21
|
|
|
@@ -65,9 +68,6 @@ export function getHashedDocumentId(driveId: string, itemId: string): Promise<st
|
|
|
65
68
|
// @beta @legacy
|
|
66
69
|
export function getLocatorFromOdspUrl(url: URL, requireFluidSignature?: boolean): OdspFluidDataStoreLocator | undefined;
|
|
67
70
|
|
|
68
|
-
// @beta @legacy
|
|
69
|
-
export function getOdspPointInTimeDocumentServiceFactory(getStorageToken: TokenFetcher<OdspResourceTokenFetchOptions>, getWebsocketToken: TokenFetcher<OdspResourceTokenFetchOptions> | undefined, persistedCache?: IPersistedCache, hostPolicy?: HostStoragePolicy): IPointInTimeDocumentServiceFactory;
|
|
70
|
-
|
|
71
71
|
// @beta @legacy (undocumented)
|
|
72
72
|
export interface ICacheAndTracker {
|
|
73
73
|
// (undocumented)
|
|
@@ -91,6 +91,26 @@ export interface IOdspCache extends INonPersistentCache {
|
|
|
91
91
|
readonly persistedCache: IPersistedFileCache;
|
|
92
92
|
}
|
|
93
93
|
|
|
94
|
+
// @beta @legacy
|
|
95
|
+
export interface IOdspDocumentServiceFactoryOptions {
|
|
96
|
+
readonly getStorageToken: TokenFetcher<OdspResourceTokenFetchOptions>;
|
|
97
|
+
readonly getWebsocketToken: TokenFetcher<OdspResourceTokenFetchOptions> | undefined;
|
|
98
|
+
readonly hostPolicy?: HostStoragePolicy | undefined;
|
|
99
|
+
readonly persistedCache?: IPersistedCache | undefined;
|
|
100
|
+
readonly pointInTimeDocumentServiceImplementation?: OdspPointInTimeDocumentServiceImplementation | undefined;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
// @beta @legacy
|
|
104
|
+
export interface IOdspPointInTimeDocumentServiceImplementationProps {
|
|
105
|
+
readonly clientIsSummarizer?: boolean;
|
|
106
|
+
readonly createDocumentService: (resolvedUrl: IResolvedUrl, logger: ITelemetryBaseLogger, cacheAndTracker: ICacheAndTracker, clientIsSummarizer?: boolean) => Promise<IDocumentService>;
|
|
107
|
+
readonly getStorageToken: TokenFetcher<OdspResourceTokenFetchOptions>;
|
|
108
|
+
readonly logger?: ITelemetryBaseLogger;
|
|
109
|
+
readonly persistedCache: IPersistedCache;
|
|
110
|
+
readonly resolvedUrl: IResolvedUrl;
|
|
111
|
+
readonly targetSequenceNumber: number;
|
|
112
|
+
}
|
|
113
|
+
|
|
94
114
|
// @beta @legacy (undocumented)
|
|
95
115
|
export interface IOdspResponse<T> {
|
|
96
116
|
// (undocumented)
|
|
@@ -164,8 +184,10 @@ export class OdspDocumentServiceFactoryCore implements IDocumentServiceFactory,
|
|
|
164
184
|
createDocumentService(resolvedUrl: IResolvedUrl, logger?: ITelemetryBaseLogger, clientIsSummarizer?: boolean): Promise<IDocumentService>;
|
|
165
185
|
// (undocumented)
|
|
166
186
|
protected createDocumentServiceCore(resolvedUrl: IResolvedUrl, odspLogger: ITelemetryBaseLogger, cacheAndTrackerArg?: ICacheAndTracker, clientIsSummarizer?: boolean): Promise<IDocumentService>;
|
|
187
|
+
readonly createPointInTimeDocumentService?: IPointInTimeDocumentServiceFactory["createPointInTimeDocumentService"];
|
|
167
188
|
getRelayServiceSessionInfo(resolvedUrl: IResolvedUrl): Promise<ISocketStorageDiscovery | undefined>;
|
|
168
189
|
readonly ILayerCompatDetails?: unknown;
|
|
190
|
+
readonly ILayerCompatSupportRequirements?: unknown;
|
|
169
191
|
// (undocumented)
|
|
170
192
|
get IRelaySessionAwareDriverFactory(): this;
|
|
171
193
|
// (undocumented)
|
|
@@ -205,6 +227,9 @@ export interface OdspFluidDataStoreLocator extends IOdspUrlParts {
|
|
|
205
227
|
fileVersion?: string | undefined;
|
|
206
228
|
}
|
|
207
229
|
|
|
230
|
+
// @beta @legacy
|
|
231
|
+
export type OdspPointInTimeDocumentServiceImplementation = (props: IOdspPointInTimeDocumentServiceImplementationProps) => Promise<IDocumentService>;
|
|
232
|
+
|
|
208
233
|
// @beta @legacy
|
|
209
234
|
export function prefetchLatestSnapshot(resolvedUrl: IResolvedUrl, getStorageToken: TokenFetcher<OdspResourceTokenFetchOptions>, persistedCache: IPersistedCache, _forceAccessTokenViaAuthorizationHeader: boolean, logger: ITelemetryBaseLogger, hostSnapshotFetchOptions: ISnapshotOptions | undefined, enableRedeemFallback?: boolean, _fetchBinarySnapshotFormat?: boolean, _snapshotFormatFetchType?: SnapshotFormatSupportType, odspDocumentServiceFactory?: OdspDocumentServiceFactory): Promise<boolean>;
|
|
210
235
|
|
|
@@ -13,6 +13,9 @@ export function createLocalOdspDocumentServiceFactory(localSnapshot: Uint8Array
|
|
|
13
13
|
// @beta @legacy
|
|
14
14
|
export function createOdspCreateContainerRequest(siteUrl: string, driveId: string, filePath: string, fileName: string, createShareLinkType?: ISharingLinkKind, containerPackageInfo?: IContainerPackageInfo | undefined): IRequest;
|
|
15
15
|
|
|
16
|
+
// @beta @legacy
|
|
17
|
+
export function createOdspDocumentServiceFactory(options: IOdspDocumentServiceFactoryOptions): OdspDocumentServiceFactory;
|
|
18
|
+
|
|
16
19
|
// @beta @legacy
|
|
17
20
|
export function createOdspUrl(l: OdspFluidDataStoreLocator): string;
|
|
18
21
|
|
|
@@ -65,9 +68,6 @@ export function getHashedDocumentId(driveId: string, itemId: string): Promise<st
|
|
|
65
68
|
// @beta @legacy
|
|
66
69
|
export function getLocatorFromOdspUrl(url: URL, requireFluidSignature?: boolean): OdspFluidDataStoreLocator | undefined;
|
|
67
70
|
|
|
68
|
-
// @beta @legacy
|
|
69
|
-
export function getOdspPointInTimeDocumentServiceFactory(getStorageToken: TokenFetcher<OdspResourceTokenFetchOptions>, getWebsocketToken: TokenFetcher<OdspResourceTokenFetchOptions> | undefined, persistedCache?: IPersistedCache, hostPolicy?: HostStoragePolicy): IPointInTimeDocumentServiceFactory;
|
|
70
|
-
|
|
71
71
|
// @beta @legacy (undocumented)
|
|
72
72
|
export interface ICacheAndTracker {
|
|
73
73
|
// (undocumented)
|
|
@@ -91,6 +91,26 @@ export interface IOdspCache extends INonPersistentCache {
|
|
|
91
91
|
readonly persistedCache: IPersistedFileCache;
|
|
92
92
|
}
|
|
93
93
|
|
|
94
|
+
// @beta @legacy
|
|
95
|
+
export interface IOdspDocumentServiceFactoryOptions {
|
|
96
|
+
readonly getStorageToken: TokenFetcher<OdspResourceTokenFetchOptions>;
|
|
97
|
+
readonly getWebsocketToken: TokenFetcher<OdspResourceTokenFetchOptions> | undefined;
|
|
98
|
+
readonly hostPolicy?: HostStoragePolicy | undefined;
|
|
99
|
+
readonly persistedCache?: IPersistedCache | undefined;
|
|
100
|
+
readonly pointInTimeDocumentServiceImplementation?: OdspPointInTimeDocumentServiceImplementation | undefined;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
// @beta @legacy
|
|
104
|
+
export interface IOdspPointInTimeDocumentServiceImplementationProps {
|
|
105
|
+
readonly clientIsSummarizer?: boolean;
|
|
106
|
+
readonly createDocumentService: (resolvedUrl: IResolvedUrl, logger: ITelemetryBaseLogger, cacheAndTracker: ICacheAndTracker, clientIsSummarizer?: boolean) => Promise<IDocumentService>;
|
|
107
|
+
readonly getStorageToken: TokenFetcher<OdspResourceTokenFetchOptions>;
|
|
108
|
+
readonly logger?: ITelemetryBaseLogger;
|
|
109
|
+
readonly persistedCache: IPersistedCache;
|
|
110
|
+
readonly resolvedUrl: IResolvedUrl;
|
|
111
|
+
readonly targetSequenceNumber: number;
|
|
112
|
+
}
|
|
113
|
+
|
|
94
114
|
// @beta @legacy (undocumented)
|
|
95
115
|
export interface IOdspResponse<T> {
|
|
96
116
|
// (undocumented)
|
|
@@ -164,8 +184,10 @@ export class OdspDocumentServiceFactoryCore implements IDocumentServiceFactory,
|
|
|
164
184
|
createDocumentService(resolvedUrl: IResolvedUrl, logger?: ITelemetryBaseLogger, clientIsSummarizer?: boolean): Promise<IDocumentService>;
|
|
165
185
|
// (undocumented)
|
|
166
186
|
protected createDocumentServiceCore(resolvedUrl: IResolvedUrl, odspLogger: ITelemetryBaseLogger, cacheAndTrackerArg?: ICacheAndTracker, clientIsSummarizer?: boolean): Promise<IDocumentService>;
|
|
187
|
+
readonly createPointInTimeDocumentService?: IPointInTimeDocumentServiceFactory["createPointInTimeDocumentService"];
|
|
167
188
|
getRelayServiceSessionInfo(resolvedUrl: IResolvedUrl): Promise<ISocketStorageDiscovery | undefined>;
|
|
168
189
|
readonly ILayerCompatDetails?: unknown;
|
|
190
|
+
readonly ILayerCompatSupportRequirements?: unknown;
|
|
169
191
|
// (undocumented)
|
|
170
192
|
get IRelaySessionAwareDriverFactory(): this;
|
|
171
193
|
// (undocumented)
|
|
@@ -205,6 +227,9 @@ export interface OdspFluidDataStoreLocator extends IOdspUrlParts {
|
|
|
205
227
|
fileVersion?: string | undefined;
|
|
206
228
|
}
|
|
207
229
|
|
|
230
|
+
// @beta @legacy
|
|
231
|
+
export type OdspPointInTimeDocumentServiceImplementation = (props: IOdspPointInTimeDocumentServiceImplementationProps) => Promise<IDocumentService>;
|
|
232
|
+
|
|
208
233
|
// @beta @legacy
|
|
209
234
|
export function prefetchLatestSnapshot(resolvedUrl: IResolvedUrl, getStorageToken: TokenFetcher<OdspResourceTokenFetchOptions>, persistedCache: IPersistedCache, _forceAccessTokenViaAuthorizationHeader: boolean, logger: ITelemetryBaseLogger, hostSnapshotFetchOptions: ISnapshotOptions | undefined, enableRedeemFallback?: boolean, _fetchBinarySnapshotFormat?: boolean, _snapshotFormatFetchType?: SnapshotFormatSupportType, odspDocumentServiceFactory?: OdspDocumentServiceFactory): Promise<boolean>;
|
|
210
235
|
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
## Beta API Report File for "@fluidframework/odsp-driver"
|
|
2
|
+
|
|
3
|
+
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
|
|
7
|
+
// @beta @legacy
|
|
8
|
+
export function createPointInTimeDocumentService(props: IOdspPointInTimeDocumentServiceImplementationProps): Promise<IDocumentService>;
|
|
9
|
+
|
|
10
|
+
// @beta @legacy
|
|
11
|
+
export class EpochTracker implements IPersistedFileCache {
|
|
12
|
+
constructor(cache: IPersistedCache, fileEntry: IFileEntry, logger: ITelemetryLoggerExt, clientIsSummarizer?: boolean | undefined);
|
|
13
|
+
// (undocumented)
|
|
14
|
+
protected readonly cache: IPersistedCache;
|
|
15
|
+
// (undocumented)
|
|
16
|
+
protected readonly clientIsSummarizer?: boolean | undefined;
|
|
17
|
+
fetch(url: string, fetchOptions: RequestInit, fetchType: FetchType, addInBody?: boolean, fetchReason?: string): Promise<IOdspResponse<Response>>;
|
|
18
|
+
fetchAndParseAsJSON<T>(url: string, fetchOptions: RequestInit, fetchType: FetchType, addInBody?: boolean, fetchReason?: string): Promise<IOdspResponse<T>>;
|
|
19
|
+
fetchArray(url: string, fetchOptions: {
|
|
20
|
+
[index: string]: RequestInit;
|
|
21
|
+
}, fetchType: FetchType, addInBody?: boolean, fetchReason?: string): Promise<IOdspResponse<ArrayBuffer>>;
|
|
22
|
+
// (undocumented)
|
|
23
|
+
protected readonly fileEntry: IFileEntry;
|
|
24
|
+
// (undocumented)
|
|
25
|
+
get fluidEpoch(): string | undefined;
|
|
26
|
+
// (undocumented)
|
|
27
|
+
get(entry: IEntry): Promise<any>;
|
|
28
|
+
// (undocumented)
|
|
29
|
+
protected readonly logger: ITelemetryLoggerExt;
|
|
30
|
+
// (undocumented)
|
|
31
|
+
put(entry: IEntry, value: any): Promise<void>;
|
|
32
|
+
// (undocumented)
|
|
33
|
+
readonly rateLimiter: RateLimiter;
|
|
34
|
+
// (undocumented)
|
|
35
|
+
removeEntries(): Promise<void>;
|
|
36
|
+
// (undocumented)
|
|
37
|
+
setEpoch(epoch: string, fromCache: boolean, fetchType: FetchTypeInternal): void;
|
|
38
|
+
// (undocumented)
|
|
39
|
+
validateEpoch(epoch: string | undefined, fetchType: FetchType): Promise<void>;
|
|
40
|
+
// (undocumented)
|
|
41
|
+
protected validateEpochFromResponse(epochFromResponse: string | undefined, fetchType: FetchTypeInternal, fromCache?: boolean): void;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// @beta @legacy (undocumented)
|
|
45
|
+
export type FetchType = "blob" | "createBlob" | "createFile" | "joinSession" | "ops" | "test" | "snapshotTree" | "treesLatest" | "uploadSummary" | "push" | "versions" | "renameFile";
|
|
46
|
+
|
|
47
|
+
// @beta @legacy (undocumented)
|
|
48
|
+
export type FetchTypeInternal = FetchType | "cache";
|
|
49
|
+
|
|
50
|
+
// @beta @legacy (undocumented)
|
|
51
|
+
export interface ICacheAndTracker {
|
|
52
|
+
// (undocumented)
|
|
53
|
+
cache: IOdspCache;
|
|
54
|
+
// (undocumented)
|
|
55
|
+
epochTracker: EpochTracker;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
// @beta @legacy
|
|
59
|
+
export interface INonPersistentCache {
|
|
60
|
+
readonly fileUrlCache: PromiseCache<string, IOdspResolvedUrl>;
|
|
61
|
+
readonly sessionJoinCache: PromiseCache<string, {
|
|
62
|
+
entryTime: number;
|
|
63
|
+
joinSessionResponse: ISocketStorageDiscovery;
|
|
64
|
+
}>;
|
|
65
|
+
readonly snapshotPrefetchResultCache: PromiseCache<string, IPrefetchSnapshotContents>;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
// @beta @legacy
|
|
69
|
+
export interface IOdspCache extends INonPersistentCache {
|
|
70
|
+
readonly persistedCache: IPersistedFileCache;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
// @beta @legacy
|
|
74
|
+
export interface IOdspPointInTimeDocumentServiceImplementationProps {
|
|
75
|
+
readonly clientIsSummarizer?: boolean;
|
|
76
|
+
readonly createDocumentService: (resolvedUrl: IResolvedUrl, logger: ITelemetryBaseLogger, cacheAndTracker: ICacheAndTracker, clientIsSummarizer?: boolean) => Promise<IDocumentService>;
|
|
77
|
+
readonly getStorageToken: TokenFetcher<OdspResourceTokenFetchOptions>;
|
|
78
|
+
readonly logger?: ITelemetryBaseLogger;
|
|
79
|
+
readonly persistedCache: IPersistedCache;
|
|
80
|
+
readonly resolvedUrl: IResolvedUrl;
|
|
81
|
+
readonly targetSequenceNumber: number;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
// @beta @legacy (undocumented)
|
|
85
|
+
export interface IOdspResponse<T> {
|
|
86
|
+
// (undocumented)
|
|
87
|
+
content: T;
|
|
88
|
+
// (undocumented)
|
|
89
|
+
duration: number;
|
|
90
|
+
// (undocumented)
|
|
91
|
+
headers: Map<string, string>;
|
|
92
|
+
// (undocumented)
|
|
93
|
+
propsToLog: ITelemetryBaseProperties;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
// @beta @legacy
|
|
97
|
+
export interface IPersistedFileCache {
|
|
98
|
+
// (undocumented)
|
|
99
|
+
get(entry: IEntry): Promise<any>;
|
|
100
|
+
// (undocumented)
|
|
101
|
+
put(entry: IEntry, value: any): Promise<void>;
|
|
102
|
+
// (undocumented)
|
|
103
|
+
removeEntries(): Promise<void>;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
// @beta @legacy (undocumented)
|
|
107
|
+
export interface IPrefetchSnapshotContents extends ISnapshot {
|
|
108
|
+
// (undocumented)
|
|
109
|
+
fluidEpoch: string;
|
|
110
|
+
// (undocumented)
|
|
111
|
+
prefetchStartTime: number;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
// @beta @legacy
|
|
115
|
+
export type OdspPointInTimeDocumentServiceImplementation = (props: IOdspPointInTimeDocumentServiceImplementationProps) => Promise<IDocumentService>;
|
|
116
|
+
|
|
117
|
+
```
|
package/dist/ReadBufferUtils.js
CHANGED
|
@@ -11,12 +11,13 @@ const internal_1 = require("@fluidframework/core-utils/internal");
|
|
|
11
11
|
* Used by tree code to reconstruct a tree from binary representation.
|
|
12
12
|
*/
|
|
13
13
|
class ReadBuffer {
|
|
14
|
+
data;
|
|
15
|
+
index = 0;
|
|
14
16
|
get buffer() {
|
|
15
17
|
return this.data;
|
|
16
18
|
}
|
|
17
19
|
constructor(data) {
|
|
18
20
|
this.data = data;
|
|
19
|
-
this.index = 0;
|
|
20
21
|
// BlobShallowCopy will return to users parts of this array.
|
|
21
22
|
// We need to ensure that nobody can change it, as it will have
|
|
22
23
|
// catastrophic result and will be really hard to investigate.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReadBufferUtils.js","sourceRoot":"","sources":["../src/ReadBufferUtils.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,kEAA6D;AAE7D;;;GAGG;AACH,MAAa,UAAU;
|
|
1
|
+
{"version":3,"file":"ReadBufferUtils.js","sourceRoot":"","sources":["../src/ReadBufferUtils.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,kEAA6D;AAE7D;;;GAGG;AACH,MAAa,UAAU;IAOS;IANrB,KAAK,GAAG,CAAC,CAAC;IAEpB,IAAW,MAAM;QAChB,OAAO,IAAI,CAAC,IAAI,CAAC;IAClB,CAAC;IAED,YAA+B,IAAgB;QAAhB,SAAI,GAAJ,IAAI,CAAY;QAC9C,4DAA4D;QAC5D,+DAA+D;QAC/D,8DAA8D;QAC9D,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAC5B,CAAC;IAED,IAAW,GAAG;QACb,OAAO,IAAI,CAAC,KAAK,KAAK,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC;IACxC,CAAC;IACD,IAAW,GAAG;QACb,OAAO,IAAI,CAAC,KAAK,CAAC;IACnB,CAAC;IACD,IAAW,MAAM;QAChB,OAAO,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC;IACzB,CAAC;IAEM,KAAK,CAAC,KAAa,EAAE,GAAW;QACtC,OAAO,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IACpC,CAAC;IAEM,KAAK;QACX,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC;IAChB,CAAC;IAEM,IAAI,CAAC,SAAS,GAAG,CAAC;QACxB,IAAI,GAAG,GAAG,CAAC,CAAC;QACZ,IAAI,UAAU,GAAG,CAAC,CAAC;QACnB,IAAI,MAAM,GAAG,SAAS,CAAC;QACvB,OAAO,MAAM,GAAG,CAAC,EAAE,CAAC;YACnB,IAAA,iBAAM,EAAC,CAAC,IAAI,CAAC,GAAG,EAAE,KAAK,CAAC,gCAAgC,CAAC,CAAC;YAC1D,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,UAAU,CAAC;YAC1C,IAAI,CAAC,KAAK,EAAE,CAAC;YACb,UAAU,IAAI,GAAG,CAAC;YAClB,MAAM,EAAE,CAAC;QACV,CAAC;QACD,OAAO,GAAG,CAAC;IACZ,CAAC;IAEM,IAAI,CAAC,MAAc;QACzB,IAAA,iBAAM,EAAC,MAAM,IAAI,CAAC,EAAE,KAAK,CAAC,sCAAsC,CAAC,CAAC;QAClE,IAAI,CAAC,KAAK,IAAI,MAAM,CAAC;QACrB,IAAA,iBAAM,EAAC,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,KAAK,CAAC,kCAAkC,CAAC,CAAC;IAClF,CAAC;CACD;AAnDD,gCAmDC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert } from \"@fluidframework/core-utils/internal\";\n\n/**\n * Buffer class, used to sequentially read data.\n * Used by tree code to reconstruct a tree from binary representation.\n */\nexport class ReadBuffer {\n\tprotected index = 0;\n\n\tpublic get buffer(): Uint8Array {\n\t\treturn this.data;\n\t}\n\n\tconstructor(protected readonly data: Uint8Array) {\n\t\t// BlobShallowCopy will return to users parts of this array.\n\t\t// We need to ensure that nobody can change it, as it will have\n\t\t// catastrophic result and will be really hard to investigate.\n\t\tObject.freeze(data.buffer);\n\t}\n\n\tpublic get eof(): boolean {\n\t\treturn this.index === this.data.length;\n\t}\n\tpublic get pos(): number {\n\t\treturn this.index;\n\t}\n\tpublic get length(): number {\n\t\treturn this.data.length;\n\t}\n\n\tpublic slice(start: number, end: number): Uint8Array {\n\t\treturn this.data.slice(start, end);\n\t}\n\n\tpublic reset(): void {\n\t\tthis.index = 0;\n\t}\n\n\tpublic read(lengthArg = 1): number {\n\t\tlet res = 0;\n\t\tlet multiplier = 1;\n\t\tlet length = lengthArg;\n\t\twhile (length > 0) {\n\t\t\tassert(!this.eof, 0x223 /* \"unexpected end of buffer\" */);\n\t\t\tres += this.data[this.index] * multiplier;\n\t\t\tthis.index++;\n\t\t\tmultiplier *= 256;\n\t\t\tlength--;\n\t\t}\n\t\treturn res;\n\t}\n\n\tpublic skip(length: number): void {\n\t\tassert(length >= 0, 0x224 /* \"Skip length should be positive\" */);\n\t\tthis.index += length;\n\t\tassert(this.index <= this.data.length, 0x3dc /* skipping past size of buffer */);\n\t}\n}\n"]}
|
package/dist/WriteBufferUtils.js
CHANGED
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
* Licensed under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.TreeBuilderSerializer = exports.
|
|
7
|
+
exports.TreeBuilderSerializer = exports.WriteBuffer = void 0;
|
|
8
|
+
exports.calcLength = calcLength;
|
|
8
9
|
const client_utils_1 = require("@fluid-internal/client-utils");
|
|
9
10
|
const internal_1 = require("@fluidframework/core-utils/internal");
|
|
10
11
|
const zipItDataRepresentationUtils_js_1 = require("./zipItDataRepresentationUtils.js");
|
|
@@ -13,10 +14,8 @@ const zipItDataRepresentationUtils_js_1 = require("./zipItDataRepresentationUtil
|
|
|
13
14
|
* Used by tree code to serialize tree into binary representation.
|
|
14
15
|
*/
|
|
15
16
|
class WriteBuffer {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
this.index = 0;
|
|
19
|
-
}
|
|
17
|
+
data = new Uint8Array(4096);
|
|
18
|
+
index = 0;
|
|
20
19
|
push(code) {
|
|
21
20
|
(0, internal_1.assert)(this.data !== undefined, 0x225 /* "Data should be there" */);
|
|
22
21
|
const length = this.data.length;
|
|
@@ -123,7 +122,6 @@ function calcLength(numArg) {
|
|
|
123
122
|
}
|
|
124
123
|
return res;
|
|
125
124
|
}
|
|
126
|
-
exports.calcLength = calcLength;
|
|
127
125
|
/**
|
|
128
126
|
* Implementation of serialization of blobs in buffer with Marker Codes etc.
|
|
129
127
|
* @param buffer - Buffer to serialize to.
|