@fluidframework/odsp-driver 2.118.1 → 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +45 -11
- package/README.md +53 -50
- package/{api-extractor.json → api-extractor/api-extractor-model.json} +1 -1
- package/api-report/odsp-driver.legacy.alpha.api.md +1 -3
- package/api-report/odsp-driver.legacy.beta.api.md +1 -3
- 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 +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/legacy.d.ts +0 -1
- package/dist/legacyAlpha.d.ts +0 -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 +1 -17
- package/dist/odspDocumentServiceFactory.d.ts.map +1 -1
- package/dist/odspDocumentServiceFactory.js +14 -45
- package/dist/odspDocumentServiceFactory.js.map +1 -1
- package/dist/odspDocumentServiceFactoryCore.d.ts +9 -0
- package/dist/odspDocumentServiceFactoryCore.d.ts.map +1 -1
- package/dist/odspDocumentServiceFactoryCore.js +38 -9
- 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/pointInTimeDriver/createPointInTimeDocumentService.d.ts.map +1 -1
- package/dist/pointInTimeDriver/createPointInTimeDocumentService.js +15 -4
- package/dist/pointInTimeDriver/createPointInTimeDocumentService.js.map +1 -1
- 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 +2 -2
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +2 -2
- package/lib/index.js.map +1 -1
- package/lib/legacy.d.ts +1 -2
- package/lib/legacyAlpha.d.ts +1 -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 +1 -17
- package/lib/odspDocumentServiceFactory.d.ts.map +1 -1
- package/lib/odspDocumentServiceFactory.js +11 -41
- package/lib/odspDocumentServiceFactory.js.map +1 -1
- package/lib/odspDocumentServiceFactoryCore.d.ts +9 -0
- package/lib/odspDocumentServiceFactoryCore.d.ts.map +1 -1
- package/lib/odspDocumentServiceFactoryCore.js +39 -10
- 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/pointInTimeDriver/createPointInTimeDocumentService.d.ts.map +1 -1
- package/lib/pointInTimeDriver/createPointInTimeDocumentService.js +13 -1
- package/lib/pointInTimeDriver/createPointInTimeDocumentService.js.map +1 -1
- 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 +43 -62
- package/src/compactSnapshotParser.ts +6 -2
- package/src/createFile/createNewUtils.ts +6 -2
- package/src/index.ts +4 -2
- package/src/odspDocumentServiceFactory.ts +0 -34
- package/src/odspDocumentServiceFactoryCore.ts +15 -1
- package/src/odspDocumentStorageManager.ts +2 -2
- package/src/odspLayerCompatState.ts +29 -1
- package/src/packageVersion.ts +1 -1
- package/src/pointInTimeDriver/createPointInTimeDocumentService.ts +19 -6
- package/src/zipItDataRepresentationUtils.ts +3 -3
- package/tsconfig.json +1 -1
- package/internal.d.ts +0 -11
- package/legacy/alpha.d.ts +0 -11
- package/legacy/point-in-time.d.ts +0 -6
- package/legacy.d.ts +0 -11
- /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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluidframework/odsp-driver",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.1",
|
|
4
4
|
"description": "Socket storage implementation for SPO and ODC",
|
|
5
5
|
"homepage": "https://fluidframework.com",
|
|
6
6
|
"repository": {
|
|
@@ -14,58 +14,35 @@
|
|
|
14
14
|
"type": "module",
|
|
15
15
|
"exports": {
|
|
16
16
|
".": {
|
|
17
|
-
"
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
"require": {
|
|
22
|
-
"types": "./dist/public.d.ts",
|
|
23
|
-
"default": "./dist/index.js"
|
|
17
|
+
"types": "./lib/public.d.ts",
|
|
18
|
+
"default": "./lib/index.js",
|
|
19
|
+
"internal-entrypoint-generation": {
|
|
20
|
+
"types": "./dist/public.d.ts"
|
|
24
21
|
}
|
|
25
22
|
},
|
|
26
23
|
"./legacy": {
|
|
27
|
-
"
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
"require": {
|
|
32
|
-
"types": "./dist/legacy.d.ts",
|
|
33
|
-
"default": "./dist/index.js"
|
|
24
|
+
"types": "./lib/legacy.d.ts",
|
|
25
|
+
"default": "./lib/index.js",
|
|
26
|
+
"internal-entrypoint-generation": {
|
|
27
|
+
"types": "./dist/legacy.d.ts"
|
|
34
28
|
}
|
|
35
29
|
},
|
|
36
30
|
"./legacy/alpha": {
|
|
37
|
-
"
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
"require": {
|
|
42
|
-
"types": "./dist/legacyAlpha.d.ts",
|
|
43
|
-
"default": "./dist/index.js"
|
|
31
|
+
"types": "./lib/legacyAlpha.d.ts",
|
|
32
|
+
"default": "./lib/index.js",
|
|
33
|
+
"internal-entrypoint-generation": {
|
|
34
|
+
"types": "./dist/legacyAlpha.d.ts"
|
|
44
35
|
}
|
|
45
36
|
},
|
|
46
37
|
"./legacy/point-in-time": {
|
|
47
|
-
"
|
|
48
|
-
|
|
49
|
-
"default": "./lib/pointInTime.js"
|
|
50
|
-
},
|
|
51
|
-
"require": {
|
|
52
|
-
"types": "./dist/pointInTime.d.ts",
|
|
53
|
-
"default": "./dist/pointInTime.js"
|
|
54
|
-
}
|
|
38
|
+
"types": "./lib/pointInTime.d.ts",
|
|
39
|
+
"default": "./lib/pointInTime.js"
|
|
55
40
|
},
|
|
56
41
|
"./internal": {
|
|
57
|
-
"
|
|
58
|
-
|
|
59
|
-
"default": "./lib/index.js"
|
|
60
|
-
},
|
|
61
|
-
"require": {
|
|
62
|
-
"types": "./dist/index.d.ts",
|
|
63
|
-
"default": "./dist/index.js"
|
|
64
|
-
}
|
|
42
|
+
"types": "./lib/index.d.ts",
|
|
43
|
+
"default": "./lib/index.js"
|
|
65
44
|
}
|
|
66
45
|
},
|
|
67
|
-
"main": "lib/index.js",
|
|
68
|
-
"types": "lib/public.d.ts",
|
|
69
46
|
"c8": {
|
|
70
47
|
"all": true,
|
|
71
48
|
"cache-dir": "nyc/.cache",
|
|
@@ -89,22 +66,22 @@
|
|
|
89
66
|
"temp-directory": "nyc/.nyc_output"
|
|
90
67
|
},
|
|
91
68
|
"dependencies": {
|
|
92
|
-
"@fluid-internal/client-utils": "~
|
|
93
|
-
"@fluidframework/core-interfaces": "~
|
|
94
|
-
"@fluidframework/core-utils": "~
|
|
95
|
-
"@fluidframework/driver-base": "~
|
|
96
|
-
"@fluidframework/driver-definitions": "~
|
|
97
|
-
"@fluidframework/driver-utils": "~
|
|
98
|
-
"@fluidframework/odsp-doclib-utils": "~
|
|
99
|
-
"@fluidframework/odsp-driver-definitions": "~
|
|
100
|
-
"@fluidframework/telemetry-utils": "~
|
|
69
|
+
"@fluid-internal/client-utils": "~3.0.1",
|
|
70
|
+
"@fluidframework/core-interfaces": "~3.0.1",
|
|
71
|
+
"@fluidframework/core-utils": "~3.0.1",
|
|
72
|
+
"@fluidframework/driver-base": "~3.0.1",
|
|
73
|
+
"@fluidframework/driver-definitions": "~3.0.1",
|
|
74
|
+
"@fluidframework/driver-utils": "~3.0.1",
|
|
75
|
+
"@fluidframework/odsp-doclib-utils": "~3.0.1",
|
|
76
|
+
"@fluidframework/odsp-driver-definitions": "~3.0.1",
|
|
77
|
+
"@fluidframework/telemetry-utils": "~3.0.1",
|
|
101
78
|
"socket.io-client": "^4.8.3",
|
|
102
79
|
"uuid": "^11.1.0"
|
|
103
80
|
},
|
|
104
81
|
"devDependencies": {
|
|
105
82
|
"@arethetypeswrong/cli": "^0.18.5",
|
|
106
83
|
"@biomejs/biome": "~2.4.5",
|
|
107
|
-
"@fluid-internal/mocha-test-setup": "~
|
|
84
|
+
"@fluid-internal/mocha-test-setup": "~3.0.1",
|
|
108
85
|
"@fluid-tools/build-cli": "^0.67.0",
|
|
109
86
|
"@fluidframework/build-common": "^2.0.3",
|
|
110
87
|
"@fluidframework/build-tools": "^0.67.0",
|
|
@@ -124,30 +101,35 @@
|
|
|
124
101
|
"mocha-multi-reporters": "^1.5.1",
|
|
125
102
|
"rimraf": "^6.1.3",
|
|
126
103
|
"sinon": "^18.0.1",
|
|
127
|
-
"typescript": "~
|
|
104
|
+
"typescript": "~6.0.3"
|
|
128
105
|
},
|
|
129
106
|
"typeValidation": {
|
|
130
|
-
"broken": {
|
|
107
|
+
"broken": {
|
|
108
|
+
"Function_getOdspPointInTimeDocumentServiceFactory": {
|
|
109
|
+
"backCompat": false
|
|
110
|
+
}
|
|
111
|
+
},
|
|
131
112
|
"entrypoint": "legacy"
|
|
132
113
|
},
|
|
133
114
|
"scripts": {
|
|
134
115
|
"build": "fluid-build . --task build",
|
|
135
116
|
"build:api-reports": "concurrently \"npm:build:api-reports:*\"",
|
|
136
|
-
"build:api-reports:current": "api-extractor run --local --config api-extractor/api-extractor.current.json",
|
|
137
|
-
"build:api-reports:legacy": "api-extractor run --local --config api-extractor/api-extractor.legacy.json",
|
|
117
|
+
"build:api-reports:current": "api-extractor run --local --config api-extractor/api-extractor-report.current.json",
|
|
118
|
+
"build:api-reports:legacy": "api-extractor run --local --config api-extractor/api-extractor-report.legacy.json",
|
|
138
119
|
"build:api-reports:pointInTime": "api-extractor run --local --config api-extractor/api-extractor-report.pointInTime.json",
|
|
120
|
+
"build:cjs": "fluid-tsc commonjs --project ./tsconfig.cjs.json && copyfiles -f ../../../common/build/build-common/src/cjs/package.json ./dist",
|
|
139
121
|
"build:commonjs": "fluid-build . --task commonjs",
|
|
140
122
|
"build:compile": "fluid-build . --task compile",
|
|
141
|
-
"build:docs": "api-extractor run --local",
|
|
123
|
+
"build:docs": "api-extractor run --local --config api-extractor/api-extractor-model.json",
|
|
142
124
|
"build:entrypoints": "fluid-build . --task build:entrypoints",
|
|
143
125
|
"build:entrypoints:cjs": "flub generate entrypoints --resolutionConditions require --outFileLegacyBeta legacy --outFileLegacyAlpha legacyAlpha --outDir ./dist",
|
|
144
|
-
"build:entrypoints:esm": "flub generate entrypoints --outFileLegacyBeta legacy --outFileLegacyAlpha legacyAlpha --outDir ./lib
|
|
145
|
-
"build:
|
|
126
|
+
"build:entrypoints:esm": "flub generate entrypoints --outFileLegacyBeta legacy --outFileLegacyAlpha legacyAlpha --outDir ./lib",
|
|
127
|
+
"build:esm": "tsc --project ./tsconfig.json",
|
|
146
128
|
"build:genver": "gen-version",
|
|
147
129
|
"build:test": "concurrently npm:build:test:esm npm:build:test:cjs",
|
|
148
130
|
"build:test:cjs": "fluid-tsc commonjs --project ./src/test/tsconfig.cjs.json",
|
|
149
131
|
"build:test:esm": "tsc --project ./src/test/tsconfig.json",
|
|
150
|
-
"check:are-the-types-wrong": "attw --pack .",
|
|
132
|
+
"check:are-the-types-wrong": "attw --pack . --profile esm-only",
|
|
151
133
|
"check:biome": "biome check .",
|
|
152
134
|
"check:exports": "concurrently \"npm:check:exports:*\"",
|
|
153
135
|
"check:exports:bundle-release-tags": "api-extractor run --config api-extractor/api-extractor-lint-bundle.json",
|
|
@@ -161,10 +143,10 @@
|
|
|
161
143
|
"check:exports:esm:public": "api-extractor run --config api-extractor/api-extractor-lint-public.esm.json",
|
|
162
144
|
"check:format": "npm run check:biome",
|
|
163
145
|
"ci:build:api-reports": "concurrently \"npm:ci:build:api-reports:*\"",
|
|
164
|
-
"ci:build:api-reports:current": "api-extractor run --config api-extractor/api-extractor.current.json",
|
|
165
|
-
"ci:build:api-reports:legacy": "api-extractor run --config api-extractor/api-extractor.legacy.json",
|
|
146
|
+
"ci:build:api-reports:current": "api-extractor run --config api-extractor/api-extractor-report.current.json",
|
|
147
|
+
"ci:build:api-reports:legacy": "api-extractor run --config api-extractor/api-extractor-report.legacy.json",
|
|
166
148
|
"ci:build:api-reports:pointInTime": "api-extractor run --config api-extractor/api-extractor-report.pointInTime.json",
|
|
167
|
-
"ci:build:docs": "api-extractor run",
|
|
149
|
+
"ci:build:docs": "api-extractor run --config api-extractor/api-extractor-model.json",
|
|
168
150
|
"clean": "rimraf --glob dist lib {alpha,beta,internal,legacy}.d.ts legacyAlpha.d.ts \"**/*.tsbuildinfo\" \"**/*.build.log\" _api-extractor-temp nyc",
|
|
169
151
|
"eslint": "eslint --quiet --format stylish src",
|
|
170
152
|
"eslint:fix": "eslint --quiet --format stylish src --fix --fix-type problem,suggestion,layout",
|
|
@@ -178,7 +160,6 @@
|
|
|
178
160
|
"test:mocha:cjs": "cross-env FLUID_TEST_MODULE_SYSTEM=CJS mocha",
|
|
179
161
|
"test:mocha:esm": "mocha",
|
|
180
162
|
"test:mocha:verbose": "cross-env FLUID_TEST_VERBOSE=1 npm run test:mocha",
|
|
181
|
-
"tsc": "fluid-tsc commonjs --project ./tsconfig.cjs.json && copyfiles -f ../../../common/build/build-common/src/cjs/package.json ./dist",
|
|
182
163
|
"typetests:gen": "flub generate typetests --dir . -v"
|
|
183
164
|
}
|
|
184
165
|
}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
+
import { ArrayBufferLikeToArrayBuffer } from "@fluid-internal/client-utils";
|
|
6
7
|
import { assert } from "@fluidframework/core-utils/internal";
|
|
7
8
|
import type {
|
|
8
9
|
ISnapshot,
|
|
@@ -63,7 +64,10 @@ function readBlobSection(node: NodeTypes): {
|
|
|
63
64
|
) {
|
|
64
65
|
// "id": <node name>
|
|
65
66
|
// "data": <blob>
|
|
66
|
-
blobContents.set(
|
|
67
|
+
blobContents.set(
|
|
68
|
+
blob.getString(1),
|
|
69
|
+
ArrayBufferLikeToArrayBuffer(blob.getBlob(3).arrayBuffer),
|
|
70
|
+
);
|
|
67
71
|
} else {
|
|
68
72
|
/**
|
|
69
73
|
* More generalized workflow
|
|
@@ -72,7 +76,7 @@ function readBlobSection(node: NodeTypes): {
|
|
|
72
76
|
const records = getNodeProps(blob);
|
|
73
77
|
assertBlobCoreInstance(records.data, "data should be of BlobCore type");
|
|
74
78
|
const id = getStringInstance(records.id, "blob id should be string");
|
|
75
|
-
blobContents.set(id, records.data.arrayBuffer);
|
|
79
|
+
blobContents.set(id, ArrayBufferLikeToArrayBuffer(records.data.arrayBuffer));
|
|
76
80
|
}
|
|
77
81
|
}
|
|
78
82
|
return { blobContents, slowBlobStructureCount };
|
|
@@ -3,7 +3,11 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import {
|
|
6
|
+
import {
|
|
7
|
+
AnyUint8ArrayToArrayBuffer,
|
|
8
|
+
Uint8ArrayToString,
|
|
9
|
+
stringToBuffer,
|
|
10
|
+
} from "@fluid-internal/client-utils";
|
|
7
11
|
import { assert, unreachableCase } from "@fluidframework/core-utils/internal";
|
|
8
12
|
import {
|
|
9
13
|
type ISummaryBlob,
|
|
@@ -87,7 +91,7 @@ function convertCreateNewSummaryTreeToTreeAndBlobsCore(
|
|
|
87
91
|
const contentBuffer =
|
|
88
92
|
typeof summaryObject.content === "string"
|
|
89
93
|
? stringToBuffer(summaryObject.content, "utf8")
|
|
90
|
-
: summaryObject.content;
|
|
94
|
+
: AnyUint8ArrayToArrayBuffer(summaryObject.content);
|
|
91
95
|
const blobId = uuid();
|
|
92
96
|
treeNode.blobs[key] = blobId;
|
|
93
97
|
blobs.set(blobId, contentBuffer);
|
package/src/index.ts
CHANGED
|
@@ -28,7 +28,6 @@ export { prefetchLatestSnapshot } from "./prefetchLatestSnapshot.js";
|
|
|
28
28
|
export {
|
|
29
29
|
createLocalOdspDocumentServiceFactory,
|
|
30
30
|
createOdspDocumentServiceFactory,
|
|
31
|
-
getOdspPointInTimeDocumentServiceFactory,
|
|
32
31
|
type IOdspDocumentServiceFactoryOptions,
|
|
33
32
|
OdspDocumentServiceFactory,
|
|
34
33
|
} from "./odspDocumentServiceFactory.js";
|
|
@@ -77,4 +76,7 @@ export {
|
|
|
77
76
|
} from "./compactSnapshotParser.js";
|
|
78
77
|
|
|
79
78
|
// Layer Compat details
|
|
80
|
-
export {
|
|
79
|
+
export {
|
|
80
|
+
odspDriverCompatDetailsForLoader,
|
|
81
|
+
odspDriverCompatRequirementsForLoader,
|
|
82
|
+
} from "./odspLayerCompatState.js";
|
|
@@ -102,40 +102,6 @@ export function createOdspDocumentServiceFactory(
|
|
|
102
102
|
options.hostPolicy,
|
|
103
103
|
);
|
|
104
104
|
}
|
|
105
|
-
|
|
106
|
-
/**
|
|
107
|
-
* Creates an ODSP document service factory that supports point-in-time loading.
|
|
108
|
-
*
|
|
109
|
-
* @param getStorageToken - Fetches storage access tokens.
|
|
110
|
-
* @param getWebsocketToken - Fetches websocket access tokens, or `undefined` when unavailable.
|
|
111
|
-
* @param persistedCache - Optional persisted ODSP cache.
|
|
112
|
-
* @param hostPolicy - Optional host storage policy.
|
|
113
|
-
* @returns An ODSP document service factory with point-in-time loading capability.
|
|
114
|
-
*
|
|
115
|
-
* @deprecated Use
|
|
116
|
-
* {@link createOdspDocumentServiceFactory} with a point-in-time implementation instead.
|
|
117
|
-
* See {@link https://github.com/microsoft/FluidFramework/issues/26500} for context.
|
|
118
|
-
*
|
|
119
|
-
* @legacy @beta
|
|
120
|
-
*/
|
|
121
|
-
export function getOdspPointInTimeDocumentServiceFactory(
|
|
122
|
-
getStorageToken: TokenFetcher<OdspResourceTokenFetchOptions>,
|
|
123
|
-
getWebsocketToken: TokenFetcher<OdspResourceTokenFetchOptions> | undefined,
|
|
124
|
-
persistedCache?: IPersistedCache,
|
|
125
|
-
hostPolicy?: HostStoragePolicy,
|
|
126
|
-
): IPointInTimeDocumentServiceFactory {
|
|
127
|
-
return createOdspDocumentServiceFactory({
|
|
128
|
-
getStorageToken,
|
|
129
|
-
getWebsocketToken,
|
|
130
|
-
persistedCache,
|
|
131
|
-
hostPolicy,
|
|
132
|
-
pointInTimeDocumentServiceImplementation: async (props) => {
|
|
133
|
-
const { createPointInTimeDocumentService } = await import("./pointInTime.js");
|
|
134
|
-
return createPointInTimeDocumentService(props);
|
|
135
|
-
},
|
|
136
|
-
}) as IPointInTimeDocumentServiceFactory;
|
|
137
|
-
}
|
|
138
|
-
|
|
139
105
|
/**
|
|
140
106
|
* Creates a factory instance for creating a sharepoint document service from a provided snapshot.
|
|
141
107
|
*
|
|
@@ -41,7 +41,10 @@ import {
|
|
|
41
41
|
NonPersistentCache,
|
|
42
42
|
} from "./odspCache.js";
|
|
43
43
|
import { OdspDocumentService } from "./odspDocumentService.js";
|
|
44
|
-
import {
|
|
44
|
+
import {
|
|
45
|
+
odspDriverCompatDetailsForLoader,
|
|
46
|
+
odspDriverCompatRequirementsForLoader,
|
|
47
|
+
} from "./odspLayerCompatState.js";
|
|
45
48
|
import {
|
|
46
49
|
type IExistingFileInfo,
|
|
47
50
|
type INewFileInfo,
|
|
@@ -327,6 +330,17 @@ export class OdspDocumentServiceFactoryCore
|
|
|
327
330
|
*/
|
|
328
331
|
public readonly ILayerCompatDetails?: unknown = odspDriverCompatDetailsForLoader;
|
|
329
332
|
|
|
333
|
+
/**
|
|
334
|
+
* The requirements that the Loader layer must meet to be compatible with this ODSP Driver. This is exposed to
|
|
335
|
+
* the Loader layer so that it can validate Loader / Driver compatibility on this Driver's behalf (the Driver has
|
|
336
|
+
* no reference to the Loader to validate it directly).
|
|
337
|
+
* @remarks This is for internal use only.
|
|
338
|
+
* The type of this should be ILayerCompatSupportRequirements. However, ILayerCompatSupportRequirements is
|
|
339
|
+
* internal and this class is currently marked as legacy alpha. So, using unknown here.
|
|
340
|
+
*/
|
|
341
|
+
public readonly ILayerCompatSupportRequirements?: unknown =
|
|
342
|
+
odspDriverCompatRequirementsForLoader;
|
|
343
|
+
|
|
330
344
|
public async createDocumentService(
|
|
331
345
|
resolvedUrl: IResolvedUrl,
|
|
332
346
|
logger?: ITelemetryBaseLogger,
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import { performanceNow } from "@fluid-internal/client-utils";
|
|
6
|
+
import { ArrayBufferLikeToArrayBuffer, performanceNow } from "@fluid-internal/client-utils";
|
|
7
7
|
import { LogLevel } from "@fluidframework/core-interfaces";
|
|
8
8
|
import { assert, delay } from "@fluidframework/core-utils/internal";
|
|
9
9
|
import { promiseRaceWithWinner } from "@fluidframework/driver-base/internal";
|
|
@@ -158,7 +158,7 @@ export class OdspDocumentStorageService extends OdspDocumentStorageServiceBase {
|
|
|
158
158
|
this.epochTracker.fetchAndParseAsJSON<ICreateBlobResponse>(
|
|
159
159
|
url,
|
|
160
160
|
{
|
|
161
|
-
body: file,
|
|
161
|
+
body: ArrayBufferLikeToArrayBuffer(file),
|
|
162
162
|
headers,
|
|
163
163
|
method,
|
|
164
164
|
},
|
|
@@ -3,7 +3,12 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import {
|
|
6
|
+
import {
|
|
7
|
+
generation,
|
|
8
|
+
LayerCompatibilityPolicyWindowMonths,
|
|
9
|
+
type ILayerCompatDetails,
|
|
10
|
+
type ILayerCompatSupportRequirements,
|
|
11
|
+
} from "@fluid-internal/client-utils";
|
|
7
12
|
|
|
8
13
|
import { pkgVersion } from "./packageVersion.js";
|
|
9
14
|
|
|
@@ -25,3 +30,26 @@ export const odspDriverCompatDetailsForLoader: ILayerCompatDetails = {
|
|
|
25
30
|
*/
|
|
26
31
|
supportedFeatures: new Set<string>(),
|
|
27
32
|
};
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* The requirements that the Loader layer must meet to be compatible with this ODSP Driver. This is published to
|
|
36
|
+
* the Loader layer (which holds the reference to this Driver) so that it can validate Loader / Driver compatibility
|
|
37
|
+
* on this Driver's behalf.
|
|
38
|
+
* @internal
|
|
39
|
+
*/
|
|
40
|
+
export const odspDriverCompatRequirementsForLoader: ILayerCompatSupportRequirements = {
|
|
41
|
+
/**
|
|
42
|
+
* Minimum generation that Loader must be at to be compatible with this Driver. This is calculated based on the
|
|
43
|
+
* LayerCompatibilityPolicyWindowMonths.NewDriverOldLoader value which defines how many months old can the Loader
|
|
44
|
+
* layer be compared to the Driver layer for them to still be considered compatible.
|
|
45
|
+
* The minimum valid generation value is 0.
|
|
46
|
+
*/
|
|
47
|
+
minSupportedGeneration: Math.max(
|
|
48
|
+
0,
|
|
49
|
+
generation - LayerCompatibilityPolicyWindowMonths.NewDriverOldLoader,
|
|
50
|
+
),
|
|
51
|
+
/**
|
|
52
|
+
* The features that the Loader must support to be compatible with this Driver.
|
|
53
|
+
*/
|
|
54
|
+
requiredFeatures: [],
|
|
55
|
+
};
|
package/src/packageVersion.ts
CHANGED
|
@@ -165,12 +165,25 @@ export async function createPointInTimeDocumentServiceCore(
|
|
|
165
165
|
cacheAndTracker,
|
|
166
166
|
clientIsSummarizer,
|
|
167
167
|
);
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
168
|
+
let liveDocumentService: IDocumentService;
|
|
169
|
+
try {
|
|
170
|
+
liveDocumentService = await createDocumentService(
|
|
171
|
+
resolvedUrl,
|
|
172
|
+
odspLogger,
|
|
173
|
+
cacheAndTracker,
|
|
174
|
+
clientIsSummarizer,
|
|
175
|
+
);
|
|
176
|
+
} catch (error) {
|
|
177
|
+
try {
|
|
178
|
+
recoverableDocumentService.dispose();
|
|
179
|
+
} catch (disposeError) {
|
|
180
|
+
extLogger.sendErrorEvent(
|
|
181
|
+
{ eventName: "PointInTimeRecoverableDocumentServiceDisposeError" },
|
|
182
|
+
disposeError,
|
|
183
|
+
);
|
|
184
|
+
}
|
|
185
|
+
throw error;
|
|
186
|
+
}
|
|
174
187
|
return new OdspPointInTimeDocumentService(
|
|
175
188
|
recoverableResolvedUrl,
|
|
176
189
|
recoverableDocumentService,
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* https://microsoft.sharepoint-df.com/:w:/t/ODSPFileStore/ER06b64K_XdDjEyAKl-UT60BJiId39SCVkYSyo_2pvH9gQ?e=KYQ0c5
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
-
import {
|
|
11
|
+
import { Uint8ArrayToArrayBufferLike, Uint8ArrayToString } from "@fluid-internal/client-utils";
|
|
12
12
|
import { assert } from "@fluidframework/core-utils/internal";
|
|
13
13
|
import { NonRetryableError } from "@fluidframework/driver-utils/internal";
|
|
14
14
|
import { OdspErrorTypes } from "@fluidframework/odsp-driver-definitions/internal";
|
|
@@ -186,7 +186,7 @@ class BlobDeepCopy extends BlobCore {
|
|
|
186
186
|
}
|
|
187
187
|
|
|
188
188
|
public get arrayBuffer(): ArrayBufferLike {
|
|
189
|
-
return
|
|
189
|
+
return Uint8ArrayToArrayBufferLike(this.buffer);
|
|
190
190
|
}
|
|
191
191
|
|
|
192
192
|
public static read(buffer: ReadBuffer, lengthLen: number): BlobCore {
|
|
@@ -222,7 +222,7 @@ export class BlobShallowCopy extends BlobCore {
|
|
|
222
222
|
return this.data.subarray(this.start, this.end);
|
|
223
223
|
}
|
|
224
224
|
|
|
225
|
-
// Equivalent to
|
|
225
|
+
// Equivalent to Uint8ArrayToArrayBufferLike(this.buffer)
|
|
226
226
|
public get arrayBuffer(): ArrayBufferLike {
|
|
227
227
|
const offset = this.data.byteOffset;
|
|
228
228
|
return this.data.buffer.slice(this.start + offset, this.end + offset);
|
package/tsconfig.json
CHANGED
package/internal.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
-
* Licensed under the MIT License.
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
/*
|
|
7
|
-
* THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
|
8
|
-
* Generated by "flub generate entrypoints --outFileLegacyBeta legacy --outFileLegacyAlpha legacyAlpha --outDir ./lib --node10TypeCompat" in @fluid-tools/build-cli.
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
export * from "./lib/index.js";
|
package/legacy/alpha.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
-
* Licensed under the MIT License.
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
/*
|
|
7
|
-
* THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
|
8
|
-
* Generated by "flub generate entrypoints --outFileLegacyBeta legacy --outFileLegacyAlpha legacyAlpha --outDir ./lib --node10TypeCompat" in @fluid-tools/build-cli.
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
export * from "../lib/legacyAlpha.js";
|
package/legacy.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
-
* Licensed under the MIT License.
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
/*
|
|
7
|
-
* THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
|
8
|
-
* Generated by "flub generate entrypoints --outFileLegacyBeta legacy --outFileLegacyAlpha legacyAlpha --outDir ./lib --node10TypeCompat" in @fluid-tools/build-cli.
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
export * from "./lib/legacy.js";
|
|
File without changes
|
|
File without changes
|