@fluidframework/routerlicious-driver 2.13.0 → 2.21.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 +8 -0
- package/dist/documentService.js +3 -3
- package/dist/documentService.js.map +1 -1
- package/dist/documentServiceFactory.js +4 -4
- package/dist/documentServiceFactory.js.map +1 -1
- package/dist/package.json +2 -1
- package/dist/packageVersion.d.ts +1 -1
- package/dist/packageVersion.js +1 -1
- package/dist/packageVersion.js.map +1 -1
- package/dist/restWrapper.js +6 -6
- package/dist/restWrapper.js.map +1 -1
- package/dist/wholeSummaryDocumentStorageService.d.ts.map +1 -1
- package/dist/wholeSummaryDocumentStorageService.js +2 -2
- package/dist/wholeSummaryDocumentStorageService.js.map +1 -1
- package/lib/documentService.js +3 -3
- package/lib/documentService.js.map +1 -1
- package/lib/documentServiceFactory.js +4 -4
- package/lib/documentServiceFactory.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/restWrapper.js +7 -7
- package/lib/restWrapper.js.map +1 -1
- package/lib/wholeSummaryDocumentStorageService.d.ts.map +1 -1
- package/lib/wholeSummaryDocumentStorageService.js +3 -3
- package/lib/wholeSummaryDocumentStorageService.js.map +1 -1
- package/package.json +12 -12
- package/src/documentService.ts +3 -3
- package/src/documentServiceFactory.ts +4 -4
- package/src/packageVersion.ts +1 -1
- package/src/restWrapper.ts +7 -7
- package/src/wholeSummaryDocumentStorageService.ts +7 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluidframework/routerlicious-driver",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.21.0",
|
|
4
4
|
"description": "Socket.IO + Git implementation of Fluid service API",
|
|
5
5
|
"homepage": "https://fluidframework.com",
|
|
6
6
|
"repository": {
|
|
@@ -69,14 +69,14 @@
|
|
|
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.
|
|
72
|
+
"@fluid-internal/client-utils": "~2.21.0",
|
|
73
|
+
"@fluidframework/core-interfaces": "~2.21.0",
|
|
74
|
+
"@fluidframework/core-utils": "~2.21.0",
|
|
75
|
+
"@fluidframework/driver-base": "~2.21.0",
|
|
76
|
+
"@fluidframework/driver-definitions": "~2.21.0",
|
|
77
|
+
"@fluidframework/driver-utils": "~2.21.0",
|
|
78
78
|
"@fluidframework/server-services-client": "^5.0.0",
|
|
79
|
-
"@fluidframework/telemetry-utils": "~2.
|
|
79
|
+
"@fluidframework/telemetry-utils": "~2.21.0",
|
|
80
80
|
"cross-fetch": "^3.1.5",
|
|
81
81
|
"json-stringify-safe": "5.0.1",
|
|
82
82
|
"socket.io-client": "~4.7.5",
|
|
@@ -85,12 +85,12 @@
|
|
|
85
85
|
"devDependencies": {
|
|
86
86
|
"@arethetypeswrong/cli": "^0.17.1",
|
|
87
87
|
"@biomejs/biome": "~1.9.3",
|
|
88
|
-
"@fluid-internal/mocha-test-setup": "~2.
|
|
88
|
+
"@fluid-internal/mocha-test-setup": "~2.21.0",
|
|
89
89
|
"@fluid-tools/build-cli": "^0.51.0",
|
|
90
90
|
"@fluidframework/build-common": "^2.0.3",
|
|
91
91
|
"@fluidframework/build-tools": "^0.51.0",
|
|
92
|
-
"@fluidframework/eslint-config-fluid": "^5.
|
|
93
|
-
"@fluidframework/routerlicious-driver-previous": "npm:@fluidframework/routerlicious-driver@2.
|
|
92
|
+
"@fluidframework/eslint-config-fluid": "^5.7.3",
|
|
93
|
+
"@fluidframework/routerlicious-driver-previous": "npm:@fluidframework/routerlicious-driver@2.20.0",
|
|
94
94
|
"@microsoft/api-extractor": "7.47.8",
|
|
95
95
|
"@types/mocha": "^10.0.10",
|
|
96
96
|
"@types/nock": "^9.3.0",
|
|
@@ -146,7 +146,7 @@
|
|
|
146
146
|
"ci:build:api-reports:current": "api-extractor run --config api-extractor/api-extractor.current.json",
|
|
147
147
|
"ci:build:api-reports:legacy": "api-extractor run --config api-extractor/api-extractor.legacy.json",
|
|
148
148
|
"ci:build:docs": "api-extractor run",
|
|
149
|
-
"clean": "rimraf --glob dist lib
|
|
149
|
+
"clean": "rimraf --glob dist lib {alpha,beta,internal,legacy}.d.ts \"**/*.tsbuildinfo\" \"**/*.build.log\" _api-extractor-temp nyc",
|
|
150
150
|
"eslint": "eslint --format stylish src",
|
|
151
151
|
"eslint:fix": "eslint --format stylish src --fix --fix-type problem,suggestion,layout",
|
|
152
152
|
"format": "npm run format:biome",
|
package/src/documentService.ts
CHANGED
|
@@ -302,9 +302,9 @@ export class DocumentService
|
|
|
302
302
|
}
|
|
303
303
|
const fluidResolvedUrl = response.resolvedUrl;
|
|
304
304
|
this._resolvedUrl = fluidResolvedUrl;
|
|
305
|
-
this.storageUrl = fluidResolvedUrl.endpoints
|
|
306
|
-
this.ordererUrl = fluidResolvedUrl.endpoints
|
|
307
|
-
this.deltaStorageUrl = fluidResolvedUrl.endpoints
|
|
305
|
+
this.storageUrl = fluidResolvedUrl.endpoints.storageUrl;
|
|
306
|
+
this.ordererUrl = fluidResolvedUrl.endpoints.ordererUrl;
|
|
307
|
+
this.deltaStorageUrl = fluidResolvedUrl.endpoints.deltaStorageUrl;
|
|
308
308
|
this.deltaStreamUrl = fluidResolvedUrl.endpoints.deltaStreamUrl ?? this.ordererUrl;
|
|
309
309
|
return true;
|
|
310
310
|
}
|
|
@@ -213,7 +213,7 @@ export class RouterliciousDocumentServiceFactory implements IDocumentServiceFact
|
|
|
213
213
|
}
|
|
214
214
|
|
|
215
215
|
parsedUrl.pathname = replaceDocumentIdInPath(parsedUrl.pathname, documentId);
|
|
216
|
-
const deltaStorageUrl = resolvedUrl.endpoints
|
|
216
|
+
const deltaStorageUrl = resolvedUrl.endpoints.deltaStorageUrl;
|
|
217
217
|
if (!deltaStorageUrl) {
|
|
218
218
|
throw new Error(
|
|
219
219
|
`All endpoints urls must be provided. [deltaStorageUrl:${deltaStorageUrl}]`,
|
|
@@ -303,9 +303,9 @@ export class RouterliciousDocumentServiceFactory implements IDocumentServiceFact
|
|
|
303
303
|
},
|
|
304
304
|
);
|
|
305
305
|
|
|
306
|
-
const storageUrl = fluidResolvedUrl.endpoints
|
|
307
|
-
const ordererUrl = fluidResolvedUrl.endpoints
|
|
308
|
-
const deltaStorageUrl = fluidResolvedUrl.endpoints
|
|
306
|
+
const storageUrl = fluidResolvedUrl.endpoints.storageUrl;
|
|
307
|
+
const ordererUrl = fluidResolvedUrl.endpoints.ordererUrl;
|
|
308
|
+
const deltaStorageUrl = fluidResolvedUrl.endpoints.deltaStorageUrl;
|
|
309
309
|
const deltaStreamUrl = fluidResolvedUrl.endpoints.deltaStreamUrl || ordererUrl; // backward compatibility
|
|
310
310
|
if (!ordererUrl || !deltaStorageUrl) {
|
|
311
311
|
throw new Error(
|
package/src/packageVersion.ts
CHANGED
package/src/restWrapper.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import { fromUtf8ToBase64,
|
|
6
|
+
import { fromUtf8ToBase64, performanceNow } from "@fluid-internal/client-utils";
|
|
7
7
|
import { ITelemetryBaseProperties } from "@fluidframework/core-interfaces";
|
|
8
8
|
import { assert } from "@fluidframework/core-utils/internal";
|
|
9
9
|
import {
|
|
@@ -172,7 +172,7 @@ class RouterliciousRestWrapper extends RestWrapper {
|
|
|
172
172
|
const fetchRequestConfig = axiosBuildRequestInitConfig(translatedConfig);
|
|
173
173
|
|
|
174
174
|
const res = await this.rateLimiter.schedule(async () => {
|
|
175
|
-
const perfStart =
|
|
175
|
+
const perfStart = performanceNow();
|
|
176
176
|
const result = await fetch(completeRequestUrl, fetchRequestConfig).catch(
|
|
177
177
|
async (error) => {
|
|
178
178
|
// on failure, add the request entry into the retryCounter map to count the subsequent retries, if any
|
|
@@ -211,25 +211,25 @@ class RouterliciousRestWrapper extends RestWrapper {
|
|
|
211
211
|
);
|
|
212
212
|
return {
|
|
213
213
|
response: result,
|
|
214
|
-
duration:
|
|
214
|
+
duration: performanceNow() - perfStart,
|
|
215
215
|
};
|
|
216
216
|
});
|
|
217
217
|
|
|
218
218
|
const response = res.response;
|
|
219
219
|
const headers = headersToMap(response.headers);
|
|
220
220
|
|
|
221
|
-
let start =
|
|
221
|
+
let start = performanceNow();
|
|
222
222
|
const text = await response.text();
|
|
223
|
-
const receiveContentTime =
|
|
223
|
+
const receiveContentTime = performanceNow() - start;
|
|
224
224
|
|
|
225
225
|
const bodySize = text.length;
|
|
226
|
-
start =
|
|
226
|
+
start = performanceNow();
|
|
227
227
|
const responseBody: any = response.headers
|
|
228
228
|
.get("content-type")
|
|
229
229
|
?.includes("application/json")
|
|
230
230
|
? JSON.parse(text)
|
|
231
231
|
: text;
|
|
232
|
-
const parseTime =
|
|
232
|
+
const parseTime = performanceNow() - start;
|
|
233
233
|
|
|
234
234
|
// Success
|
|
235
235
|
if (response.ok || response.status === statusCode) {
|
|
@@ -3,7 +3,11 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import {
|
|
6
|
+
import {
|
|
7
|
+
Uint8ArrayToString,
|
|
8
|
+
performanceNow,
|
|
9
|
+
stringToBuffer,
|
|
10
|
+
} from "@fluid-internal/client-utils";
|
|
7
11
|
import { assert } from "@fluidframework/core-utils/internal";
|
|
8
12
|
import { getW3CData, promiseRaceWithWinner } from "@fluidframework/driver-base/internal";
|
|
9
13
|
import { ISummaryHandle, ISummaryTree } from "@fluidframework/driver-definitions";
|
|
@@ -306,10 +310,10 @@ export class WholeSummaryDocumentStorageService implements IDocumentStorageServi
|
|
|
306
310
|
const manager = await this.getStorageManager(disableCache);
|
|
307
311
|
const response: IR11sResponse<IWholeFlatSnapshot> =
|
|
308
312
|
await manager.getSnapshot(versionId);
|
|
309
|
-
const start =
|
|
313
|
+
const start = performanceNow();
|
|
310
314
|
const snapshot: INormalizedWholeSnapshot =
|
|
311
315
|
convertWholeFlatSnapshotToSnapshotTreeAndBlobs(response.content);
|
|
312
|
-
const snapshotConversionTime =
|
|
316
|
+
const snapshotConversionTime = performanceNow() - start;
|
|
313
317
|
validateBlobsAndTrees(snapshot.snapshotTree);
|
|
314
318
|
const { trees, numBlobs, encodedBlobsSize } = evalBlobsAndTrees(snapshot);
|
|
315
319
|
|