@fluidframework/routerlicious-driver 2.20.0 → 2.22.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/README.md +1 -0
- package/dist/createNewUtils.d.ts.map +1 -1
- package/dist/createNewUtils.js +1 -3
- package/dist/createNewUtils.js.map +1 -1
- package/dist/documentServiceFactory.js +1 -1
- package/dist/documentServiceFactory.js.map +1 -1
- package/dist/packageVersion.d.ts +1 -1
- package/dist/packageVersion.js +1 -1
- package/dist/packageVersion.js.map +1 -1
- package/dist/restWrapper.js +6 -6
- package/dist/restWrapper.js.map +1 -1
- package/dist/summaryTreeUploadManager.d.ts.map +1 -1
- package/dist/summaryTreeUploadManager.js +1 -2
- package/dist/summaryTreeUploadManager.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/createNewUtils.d.ts.map +1 -1
- package/lib/createNewUtils.js +1 -3
- package/lib/createNewUtils.js.map +1 -1
- package/lib/documentServiceFactory.js +1 -1
- 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/summaryTreeUploadManager.d.ts.map +1 -1
- package/lib/summaryTreeUploadManager.js +1 -2
- package/lib/summaryTreeUploadManager.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 +14 -14
- package/src/createNewUtils.ts +1 -4
- package/src/packageVersion.ts +1 -1
- package/src/restWrapper.ts +7 -7
- package/src/summaryTreeUploadManager.ts +1 -2
- 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.22.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.22.0",
|
|
73
|
+
"@fluidframework/core-interfaces": "~2.22.0",
|
|
74
|
+
"@fluidframework/core-utils": "~2.22.0",
|
|
75
|
+
"@fluidframework/driver-base": "~2.22.0",
|
|
76
|
+
"@fluidframework/driver-definitions": "~2.22.0",
|
|
77
|
+
"@fluidframework/driver-utils": "~2.22.0",
|
|
78
78
|
"@fluidframework/server-services-client": "^5.0.0",
|
|
79
|
-
"@fluidframework/telemetry-utils": "~2.
|
|
79
|
+
"@fluidframework/telemetry-utils": "~2.22.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.22.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.21.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",
|
|
@@ -157,8 +157,8 @@
|
|
|
157
157
|
"test": "npm run test:mocha",
|
|
158
158
|
"test:coverage": "c8 npm test",
|
|
159
159
|
"test:mocha": "npm run test:mocha:cjs && echo \"ADO #7404 - ESM modules cannot be stubbed - npm run test:mocha:esm\"",
|
|
160
|
-
"test:mocha:cjs": "mocha --recursive \"dist/test/**/*.spec.*js\"
|
|
161
|
-
"test:mocha:esm": "mocha --recursive \"lib/test/**/*.spec.*js\"
|
|
160
|
+
"test:mocha:cjs": "mocha --recursive \"dist/test/**/*.spec.*js\"",
|
|
161
|
+
"test:mocha:esm": "mocha --recursive \"lib/test/**/*.spec.*js\"",
|
|
162
162
|
"test:mocha:verbose": "cross-env FLUID_TEST_VERBOSE=1 npm run test:mocha",
|
|
163
163
|
"tsc": "fluid-tsc commonjs --project ./tsconfig.cjs.json && copyfiles -f ../../../common/build/build-common/src/cjs/package.json ./dist",
|
|
164
164
|
"typetests:gen": "flub generate typetests --dir . -v",
|
package/src/createNewUtils.ts
CHANGED
|
@@ -12,10 +12,7 @@ import { ISummaryTree, SummaryType } from "@fluidframework/driver-definitions";
|
|
|
12
12
|
* @returns Modified summary tree where the blob contents could be utf8 string only.
|
|
13
13
|
*/
|
|
14
14
|
export function convertSummaryToCreateNewSummary(summary: ISummaryTree): ISummaryTree {
|
|
15
|
-
const
|
|
16
|
-
for (const key of keys) {
|
|
17
|
-
const summaryObject = summary.tree[key];
|
|
18
|
-
|
|
15
|
+
for (const [key, summaryObject] of Object.entries(summary.tree)) {
|
|
19
16
|
switch (summaryObject.type) {
|
|
20
17
|
case SummaryType.Tree: {
|
|
21
18
|
summary.tree[key] = convertSummaryToCreateNewSummary(summaryObject);
|
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) {
|
|
@@ -41,8 +41,7 @@ export class SummaryTreeUploadManager implements ISummaryUploadManager {
|
|
|
41
41
|
previousFullSnapshot: ISnapshotTreeEx | undefined,
|
|
42
42
|
): Promise<string> {
|
|
43
43
|
const entries = await Promise.all(
|
|
44
|
-
Object.
|
|
45
|
-
const entry = summaryTree.tree[key];
|
|
44
|
+
Object.entries(summaryTree.tree).map(async ([key, entry]) => {
|
|
46
45
|
const pathHandle = await this.writeSummaryTreeObject(entry, previousFullSnapshot);
|
|
47
46
|
const treeEntry: IGitCreateTreeEntry = {
|
|
48
47
|
mode: getGitMode(entry),
|
|
@@ -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
|
|