@fluidframework/runtime-utils 2.0.0-rc.1.0.6 → 2.0.0-rc.2.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/{.eslintrc.js → .eslintrc.cjs} +4 -1
- package/{.mocharc.js → .mocharc.cjs} +1 -1
- package/CHANGELOG.md +30 -0
- package/{api-extractor-esm.json → api-extractor-cjs.json} +5 -1
- package/api-extractor-lint.json +1 -1
- package/api-extractor.json +1 -1
- package/api-report/runtime-utils.api.md +7 -11
- package/dist/index.d.ts +10 -10
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +40 -40
- package/dist/index.js.map +1 -1
- package/dist/package.json +3 -0
- package/dist/runtime-utils-alpha.d.ts +3 -3
- package/dist/runtime-utils-beta.d.ts +3 -3
- package/dist/runtime-utils-public.d.ts +3 -3
- package/dist/runtime-utils-untrimmed.d.ts +19 -9
- package/dist/summaryUtils.d.ts +4 -8
- package/dist/summaryUtils.d.ts.map +1 -1
- package/dist/summaryUtils.js +5 -10
- package/dist/summaryUtils.js.map +1 -1
- package/dist/tsdoc-metadata.json +1 -1
- package/dist/utils.d.ts +14 -0
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +49 -1
- package/dist/utils.js.map +1 -1
- package/lib/{dataStoreHandleContextUtils.d.mts → dataStoreHandleContextUtils.d.ts} +1 -1
- package/lib/dataStoreHandleContextUtils.d.ts.map +1 -0
- package/lib/{dataStoreHandleContextUtils.mjs → dataStoreHandleContextUtils.js} +1 -1
- package/lib/dataStoreHandleContextUtils.js.map +1 -0
- package/lib/{dataStoreHelpers.d.mts → dataStoreHelpers.d.ts} +1 -1
- package/lib/dataStoreHelpers.d.ts.map +1 -0
- package/lib/{dataStoreHelpers.mjs → dataStoreHelpers.js} +1 -1
- package/lib/dataStoreHelpers.js.map +1 -0
- package/lib/{handles.d.mts → handles.d.ts} +1 -1
- package/lib/handles.d.ts.map +1 -0
- package/lib/{handles.mjs → handles.js} +1 -1
- package/lib/handles.js.map +1 -0
- package/lib/index.d.ts +15 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +15 -0
- package/lib/index.js.map +1 -0
- package/lib/{objectstoragepartition.d.mts → objectstoragepartition.d.ts} +1 -1
- package/lib/objectstoragepartition.d.ts.map +1 -0
- package/lib/{objectstoragepartition.mjs → objectstoragepartition.js} +1 -1
- package/lib/objectstoragepartition.js.map +1 -0
- package/lib/{objectstorageutils.d.mts → objectstorageutils.d.ts} +1 -1
- package/lib/objectstorageutils.d.ts.map +1 -0
- package/lib/{objectstorageutils.mjs → objectstorageutils.js} +1 -1
- package/lib/objectstorageutils.js.map +1 -0
- package/lib/{requestParser.d.mts → requestParser.d.ts} +5 -1
- package/lib/requestParser.d.ts.map +1 -0
- package/lib/{requestParser.mjs → requestParser.js} +1 -1
- package/lib/requestParser.js.map +1 -0
- package/lib/{runtime-utils-alpha.d.mts → runtime-utils-alpha.d.ts} +3 -3
- package/lib/{runtime-utils-beta.d.mts → runtime-utils-beta.d.ts} +3 -3
- package/lib/{runtime-utils-public.d.mts → runtime-utils-public.d.ts} +3 -3
- package/lib/{runtime-utils-untrimmed.d.mts → runtime-utils-untrimmed.d.ts} +19 -9
- package/lib/{runtimeFactoryHelper.d.mts → runtimeFactoryHelper.d.ts} +1 -1
- package/lib/runtimeFactoryHelper.d.ts.map +1 -0
- package/lib/{runtimeFactoryHelper.mjs → runtimeFactoryHelper.js} +1 -1
- package/lib/runtimeFactoryHelper.js.map +1 -0
- package/lib/{summaryUtils.d.mts → summaryUtils.d.ts} +5 -9
- package/lib/summaryUtils.d.ts.map +1 -0
- package/lib/{summaryUtils.mjs → summaryUtils.js} +5 -9
- package/lib/summaryUtils.js.map +1 -0
- package/lib/test/dataStoreHelpers.spec.js +29 -0
- package/lib/test/dataStoreHelpers.spec.js.map +1 -0
- package/lib/test/requestParser.spec.js +111 -0
- package/lib/test/requestParser.spec.js.map +1 -0
- package/lib/test/runtimeFactoryHelper.spec.js +44 -0
- package/lib/test/runtimeFactoryHelper.spec.js.map +1 -0
- package/lib/test/summaryUtils.spec.js +283 -0
- package/lib/test/summaryUtils.spec.js.map +1 -0
- package/lib/test/types/validateRuntimeUtilsPrevious.generated.js +58 -0
- package/lib/test/types/validateRuntimeUtilsPrevious.generated.js.map +1 -0
- package/lib/test/utils.spec.js +65 -0
- package/lib/test/utils.spec.js.map +1 -0
- package/lib/{unpackUsedRoutes.d.mts → unpackUsedRoutes.d.ts} +1 -1
- package/lib/unpackUsedRoutes.d.ts.map +1 -0
- package/lib/{unpackUsedRoutes.mjs → unpackUsedRoutes.js} +1 -1
- package/lib/unpackUsedRoutes.js.map +1 -0
- package/lib/utils.d.ts +34 -0
- package/lib/utils.d.ts.map +1 -0
- package/lib/utils.js +64 -0
- package/lib/utils.js.map +1 -0
- package/package.json +48 -49
- package/src/index.ts +10 -11
- package/src/summaryUtils.ts +9 -18
- package/src/utils.ts +48 -0
- package/tsconfig.cjs.json +7 -0
- package/tsconfig.json +2 -5
- package/lib/dataStoreHandleContextUtils.d.mts.map +0 -1
- package/lib/dataStoreHandleContextUtils.mjs.map +0 -1
- package/lib/dataStoreHelpers.d.mts.map +0 -1
- package/lib/dataStoreHelpers.mjs.map +0 -1
- package/lib/handles.d.mts.map +0 -1
- package/lib/handles.mjs.map +0 -1
- package/lib/index.d.mts +0 -15
- package/lib/index.d.mts.map +0 -1
- package/lib/index.mjs +0 -15
- package/lib/index.mjs.map +0 -1
- package/lib/objectstoragepartition.d.mts.map +0 -1
- package/lib/objectstoragepartition.mjs.map +0 -1
- package/lib/objectstorageutils.d.mts.map +0 -1
- package/lib/objectstorageutils.mjs.map +0 -1
- package/lib/requestParser.d.mts.map +0 -1
- package/lib/requestParser.mjs.map +0 -1
- package/lib/runtimeFactoryHelper.d.mts.map +0 -1
- package/lib/runtimeFactoryHelper.mjs.map +0 -1
- package/lib/summaryUtils.d.mts.map +0 -1
- package/lib/summaryUtils.mjs.map +0 -1
- package/lib/unpackUsedRoutes.d.mts.map +0 -1
- package/lib/unpackUsedRoutes.mjs.map +0 -1
- package/lib/utils.d.mts +0 -20
- package/lib/utils.d.mts.map +0 -1
- package/lib/utils.mjs +0 -17
- package/lib/utils.mjs.map +0 -1
|
@@ -4,7 +4,10 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
module.exports = {
|
|
7
|
-
extends: [
|
|
7
|
+
extends: [
|
|
8
|
+
require.resolve("@fluidframework/eslint-config-fluid/minimal-deprecated"),
|
|
9
|
+
"prettier",
|
|
10
|
+
],
|
|
8
11
|
parserOptions: {
|
|
9
12
|
project: ["./tsconfig.json", "./src/test/tsconfig.json"],
|
|
10
13
|
},
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
"use strict";
|
|
7
7
|
|
|
8
|
-
const getFluidTestMochaConfig = require("@
|
|
8
|
+
const getFluidTestMochaConfig = require("@fluid-internal/mocha-test-setup/mocharc-common");
|
|
9
9
|
|
|
10
10
|
const packageDir = __dirname;
|
|
11
11
|
const config = getFluidTestMochaConfig(packageDir);
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,35 @@
|
|
|
1
1
|
# @fluidframework/runtime-utils
|
|
2
2
|
|
|
3
|
+
## 2.0.0-rc.2.0.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- container-runtime: New feature: ID compression for DataStores & DDSs ([#19859](https://github.com/microsoft/FluidFramework/issues/19859)) [51f0d3db73](https://github.com/microsoft/FluidFramework/commits/51f0d3db737800e1c30ea5e3952d38ff30ffc7da)
|
|
8
|
+
|
|
9
|
+
### Key changes
|
|
10
|
+
|
|
11
|
+
1. A new API IContainerRuntimeBase.generateDocumentUniqueId() is exposed. This API will opportunistically generate IDs in short format (non-negative numbers). If it can't achieve that, it will return UUID strings. UUIDs generated will have low entropy in groups and will compress well. It can be leveraged anywhere in container where container unique IDs are required. I.e. any place that uses uuid() and stores data in container is likely candidate to start leveraging this API.
|
|
12
|
+
2. Data store internal IDs (IDs that are auto generated by FF system) will opportunistically be generated in shorter form. Data stores created in detached container will always have short IDs, data stores created in attached container will opportunistically be short (by using newly added IContainerRuntimeBase.generateDocumentUniqueId() capability)
|
|
13
|
+
3. Similar DDS names will be opportunistically short (same considerations for detached DDS vs. attached DDS)
|
|
14
|
+
|
|
15
|
+
### Implementation details
|
|
16
|
+
|
|
17
|
+
1. Container level ID Compressor can now be enabled with delay. With such setting, only new IContainerRuntimeBase.generateDocumentUniqueId() is exposed (ID Compressor is not exposed in such case, as leveraging any of its other capabilities requires future container sessions to load ID Compressor on container load, for correctness reasons). Once Container establishes connection and any changes are made in container, newly added API will start generating more compact IDs (in most cases).
|
|
18
|
+
|
|
19
|
+
### Breaking changes
|
|
20
|
+
|
|
21
|
+
1. DDS names can no longer start with "\_" symbol - this is reserved for FF needs. I've validated that's not an issue for AzureClient (it only creates root object by name, everything else is referred by handle). Our main internal partners almost never use named DDSs (I can find only 4 instances in Loop).
|
|
22
|
+
|
|
23
|
+
### Backward compatibility considerations
|
|
24
|
+
|
|
25
|
+
1. Data store internal IDs could collide with earlier used names data stores. Earlier versions of FF framework (before DataStore aliasing feature was added) allowed customers to supply IDs for data stores. And thus, files created with earlier versions of framework could have data store IDs that will be similar to names FF will use for newly created data stores ("A", ... "Z", "a"..."z", "AA", etc.). While such collision is possible, it's very unlikely (almost impossible) if user-provided names were at least 4-5 characters long.
|
|
26
|
+
2. If application runs to these problems, or wants to reduce risks, consider disabling ID compressor via IContainerRuntimeOptions.enableRuntimeIdCompressor = "off".
|
|
27
|
+
|
|
28
|
+
### Minor changes
|
|
29
|
+
|
|
30
|
+
1. IContainerRuntime.createDetachedRootDataStore() is removed. Please use IContainerRuntime.createDetachedDataStore and IDataStore.trySetAlias() instead
|
|
31
|
+
2. IContainerRuntimeOptions.enableRuntimeIdCompressor has been changes from boolean to tri-state.
|
|
32
|
+
|
|
3
33
|
## 2.0.0-rc.1.0.0
|
|
4
34
|
|
|
5
35
|
### Minor Changes
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
|
|
3
|
-
"extends": "../../../common/build/build-common/api-extractor-base
|
|
3
|
+
"extends": "../../../common/build/build-common/api-extractor-base.cjs.primary.json",
|
|
4
|
+
// CJS is actually secondary; so, no report.
|
|
5
|
+
"apiReport": {
|
|
6
|
+
"enabled": false
|
|
7
|
+
}
|
|
4
8
|
}
|
package/api-extractor-lint.json
CHANGED
package/api-extractor.json
CHANGED
|
@@ -28,7 +28,7 @@ import { ITelemetryContext } from '@fluidframework/runtime-definitions';
|
|
|
28
28
|
import { ITree } from '@fluidframework/protocol-definitions';
|
|
29
29
|
import { SummaryObject } from '@fluidframework/protocol-definitions';
|
|
30
30
|
import { SummaryType } from '@fluidframework/protocol-definitions';
|
|
31
|
-
import {
|
|
31
|
+
import type { TelemetryBaseEventPropertyType } from '@fluidframework/core-interfaces';
|
|
32
32
|
|
|
33
33
|
// @internal (undocumented)
|
|
34
34
|
export function addBlobToSummary(summary: ISummaryTreeWithStats, key: string, content: string | Uint8Array): void;
|
|
@@ -36,9 +36,6 @@ export function addBlobToSummary(summary: ISummaryTreeWithStats, key: string, co
|
|
|
36
36
|
// @internal (undocumented)
|
|
37
37
|
export function addSummarizeResultToSummary(summary: ISummaryTreeWithStats, key: string, summarizeResult: ISummarizeResult): void;
|
|
38
38
|
|
|
39
|
-
// @internal (undocumented)
|
|
40
|
-
export function addTreeToSummary(summary: ISummaryTreeWithStats, key: string, summarizeResult: ISummarizeResult): void;
|
|
41
|
-
|
|
42
39
|
// @internal (undocumented)
|
|
43
40
|
export function calculateStats(summary: SummaryObject): ISummaryStats;
|
|
44
41
|
|
|
@@ -65,6 +62,9 @@ export function createResponseError(status: number, value: string, request: IReq
|
|
|
65
62
|
[key: string]: any;
|
|
66
63
|
}): IResponse;
|
|
67
64
|
|
|
65
|
+
// @internal
|
|
66
|
+
export function encodeCompactIdToString(idArg: number | string, prefix?: string): string;
|
|
67
|
+
|
|
68
68
|
// @internal (undocumented)
|
|
69
69
|
export function exceptionToResponse(err: any): IResponse;
|
|
70
70
|
|
|
@@ -194,14 +194,10 @@ export class SummaryTreeBuilder implements ISummaryTreeWithStats {
|
|
|
194
194
|
|
|
195
195
|
// @internal (undocumented)
|
|
196
196
|
export class TelemetryContext implements ITelemetryContext {
|
|
197
|
-
|
|
198
|
-
get(prefix: string, property: string): TelemetryEventPropertyType;
|
|
199
|
-
// (undocumented)
|
|
197
|
+
get(prefix: string, property: string): TelemetryBaseEventPropertyType;
|
|
200
198
|
serialize(): string;
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
// (undocumented)
|
|
204
|
-
setMultiple(prefix: string, property: string, values: Record<string, TelemetryEventPropertyType>): void;
|
|
199
|
+
set(prefix: string, property: string, value: TelemetryBaseEventPropertyType): void;
|
|
200
|
+
setMultiple(prefix: string, property: string, values: Record<string, TelemetryBaseEventPropertyType>): void;
|
|
205
201
|
}
|
|
206
202
|
|
|
207
203
|
// @internal
|
package/dist/index.d.ts
CHANGED
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
export { generateHandleContextPath } from "./dataStoreHandleContextUtils";
|
|
6
|
-
export { create404Response, createDataStoreFactory, createResponseError, exceptionToResponse, Factory, responseToException, } from "./dataStoreHelpers";
|
|
7
|
-
export { ISerializedHandle, isSerializedHandle } from "./handles";
|
|
8
|
-
export { ObjectStoragePartition } from "./objectstoragepartition";
|
|
9
|
-
export { getNormalizedObjectStoragePathParts, listBlobsAtTreePath } from "./objectstorageutils";
|
|
10
|
-
export { RequestParser } from "./requestParser";
|
|
11
|
-
export { RuntimeFactoryHelper } from "./runtimeFactoryHelper";
|
|
12
|
-
export { addBlobToSummary, addSummarizeResultToSummary,
|
|
13
|
-
export { unpackChildNodesUsedRoutes } from "./unpackUsedRoutes";
|
|
14
|
-
export { ReadAndParseBlob, seqFromTree } from "./utils";
|
|
5
|
+
export { generateHandleContextPath } from "./dataStoreHandleContextUtils.js";
|
|
6
|
+
export { create404Response, createDataStoreFactory, createResponseError, exceptionToResponse, Factory, responseToException, } from "./dataStoreHelpers.js";
|
|
7
|
+
export { ISerializedHandle, isSerializedHandle } from "./handles.js";
|
|
8
|
+
export { ObjectStoragePartition } from "./objectstoragepartition.js";
|
|
9
|
+
export { getNormalizedObjectStoragePathParts, listBlobsAtTreePath } from "./objectstorageutils.js";
|
|
10
|
+
export { RequestParser } from "./requestParser.js";
|
|
11
|
+
export { RuntimeFactoryHelper } from "./runtimeFactoryHelper.js";
|
|
12
|
+
export { addBlobToSummary, addSummarizeResultToSummary, calculateStats, convertSnapshotTreeToSummaryTree, convertSummaryTreeToITree, convertToSummaryTree, convertToSummaryTreeWithStats, GCDataBuilder, getBlobSize, mergeStats, processAttachMessageGCData, SummaryTreeBuilder, TelemetryContext, utf8ByteLength, } from "./summaryUtils.js";
|
|
13
|
+
export { unpackChildNodesUsedRoutes } from "./unpackUsedRoutes.js";
|
|
14
|
+
export { ReadAndParseBlob, seqFromTree, encodeCompactIdToString } from "./utils.js";
|
|
15
15
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,yBAAyB,EAAE,MAAM
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,yBAAyB,EAAE,MAAM,kCAAkC,CAAC;AAC7E,OAAO,EACN,iBAAiB,EACjB,sBAAsB,EACtB,mBAAmB,EACnB,mBAAmB,EACnB,OAAO,EACP,mBAAmB,GACnB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AACrE,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,mCAAmC,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AACnG,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EACN,gBAAgB,EAChB,2BAA2B,EAC3B,cAAc,EACd,gCAAgC,EAChC,yBAAyB,EACzB,oBAAoB,EACpB,6BAA6B,EAC7B,aAAa,EACb,WAAW,EACX,UAAU,EACV,0BAA0B,EAC1B,kBAAkB,EAClB,gBAAgB,EAChB,cAAc,GACd,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,0BAA0B,EAAE,MAAM,uBAAuB,CAAC;AACnE,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -4,44 +4,44 @@
|
|
|
4
4
|
* Licensed under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.seqFromTree = exports.unpackChildNodesUsedRoutes = exports.utf8ByteLength = exports.TelemetryContext = exports.SummaryTreeBuilder = exports.processAttachMessageGCData = exports.mergeStats = exports.getBlobSize = exports.GCDataBuilder = exports.convertToSummaryTreeWithStats = exports.convertToSummaryTree = exports.convertSummaryTreeToITree = exports.convertSnapshotTreeToSummaryTree = exports.calculateStats = exports.
|
|
8
|
-
var
|
|
9
|
-
Object.defineProperty(exports, "generateHandleContextPath", { enumerable: true, get: function () { return
|
|
10
|
-
var
|
|
11
|
-
Object.defineProperty(exports, "create404Response", { enumerable: true, get: function () { return
|
|
12
|
-
Object.defineProperty(exports, "createDataStoreFactory", { enumerable: true, get: function () { return
|
|
13
|
-
Object.defineProperty(exports, "createResponseError", { enumerable: true, get: function () { return
|
|
14
|
-
Object.defineProperty(exports, "exceptionToResponse", { enumerable: true, get: function () { return
|
|
15
|
-
Object.defineProperty(exports, "responseToException", { enumerable: true, get: function () { return
|
|
16
|
-
var
|
|
17
|
-
Object.defineProperty(exports, "isSerializedHandle", { enumerable: true, get: function () { return
|
|
18
|
-
var
|
|
19
|
-
Object.defineProperty(exports, "ObjectStoragePartition", { enumerable: true, get: function () { return
|
|
20
|
-
var
|
|
21
|
-
Object.defineProperty(exports, "getNormalizedObjectStoragePathParts", { enumerable: true, get: function () { return
|
|
22
|
-
Object.defineProperty(exports, "listBlobsAtTreePath", { enumerable: true, get: function () { return
|
|
23
|
-
var
|
|
24
|
-
Object.defineProperty(exports, "RequestParser", { enumerable: true, get: function () { return
|
|
25
|
-
var
|
|
26
|
-
Object.defineProperty(exports, "RuntimeFactoryHelper", { enumerable: true, get: function () { return
|
|
27
|
-
var
|
|
28
|
-
Object.defineProperty(exports, "addBlobToSummary", { enumerable: true, get: function () { return
|
|
29
|
-
Object.defineProperty(exports, "addSummarizeResultToSummary", { enumerable: true, get: function () { return
|
|
30
|
-
Object.defineProperty(exports, "
|
|
31
|
-
Object.defineProperty(exports, "
|
|
32
|
-
Object.defineProperty(exports, "
|
|
33
|
-
Object.defineProperty(exports, "
|
|
34
|
-
Object.defineProperty(exports, "
|
|
35
|
-
Object.defineProperty(exports, "
|
|
36
|
-
Object.defineProperty(exports, "
|
|
37
|
-
Object.defineProperty(exports, "
|
|
38
|
-
Object.defineProperty(exports, "
|
|
39
|
-
Object.defineProperty(exports, "
|
|
40
|
-
Object.defineProperty(exports, "
|
|
41
|
-
Object.defineProperty(exports, "
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
Object.defineProperty(exports, "
|
|
7
|
+
exports.encodeCompactIdToString = exports.seqFromTree = exports.unpackChildNodesUsedRoutes = exports.utf8ByteLength = exports.TelemetryContext = exports.SummaryTreeBuilder = exports.processAttachMessageGCData = exports.mergeStats = exports.getBlobSize = exports.GCDataBuilder = exports.convertToSummaryTreeWithStats = exports.convertToSummaryTree = exports.convertSummaryTreeToITree = exports.convertSnapshotTreeToSummaryTree = exports.calculateStats = exports.addSummarizeResultToSummary = exports.addBlobToSummary = exports.RuntimeFactoryHelper = exports.RequestParser = exports.listBlobsAtTreePath = exports.getNormalizedObjectStoragePathParts = exports.ObjectStoragePartition = exports.isSerializedHandle = exports.responseToException = exports.exceptionToResponse = exports.createResponseError = exports.createDataStoreFactory = exports.create404Response = exports.generateHandleContextPath = void 0;
|
|
8
|
+
var dataStoreHandleContextUtils_js_1 = require("./dataStoreHandleContextUtils.js");
|
|
9
|
+
Object.defineProperty(exports, "generateHandleContextPath", { enumerable: true, get: function () { return dataStoreHandleContextUtils_js_1.generateHandleContextPath; } });
|
|
10
|
+
var dataStoreHelpers_js_1 = require("./dataStoreHelpers.js");
|
|
11
|
+
Object.defineProperty(exports, "create404Response", { enumerable: true, get: function () { return dataStoreHelpers_js_1.create404Response; } });
|
|
12
|
+
Object.defineProperty(exports, "createDataStoreFactory", { enumerable: true, get: function () { return dataStoreHelpers_js_1.createDataStoreFactory; } });
|
|
13
|
+
Object.defineProperty(exports, "createResponseError", { enumerable: true, get: function () { return dataStoreHelpers_js_1.createResponseError; } });
|
|
14
|
+
Object.defineProperty(exports, "exceptionToResponse", { enumerable: true, get: function () { return dataStoreHelpers_js_1.exceptionToResponse; } });
|
|
15
|
+
Object.defineProperty(exports, "responseToException", { enumerable: true, get: function () { return dataStoreHelpers_js_1.responseToException; } });
|
|
16
|
+
var handles_js_1 = require("./handles.js");
|
|
17
|
+
Object.defineProperty(exports, "isSerializedHandle", { enumerable: true, get: function () { return handles_js_1.isSerializedHandle; } });
|
|
18
|
+
var objectstoragepartition_js_1 = require("./objectstoragepartition.js");
|
|
19
|
+
Object.defineProperty(exports, "ObjectStoragePartition", { enumerable: true, get: function () { return objectstoragepartition_js_1.ObjectStoragePartition; } });
|
|
20
|
+
var objectstorageutils_js_1 = require("./objectstorageutils.js");
|
|
21
|
+
Object.defineProperty(exports, "getNormalizedObjectStoragePathParts", { enumerable: true, get: function () { return objectstorageutils_js_1.getNormalizedObjectStoragePathParts; } });
|
|
22
|
+
Object.defineProperty(exports, "listBlobsAtTreePath", { enumerable: true, get: function () { return objectstorageutils_js_1.listBlobsAtTreePath; } });
|
|
23
|
+
var requestParser_js_1 = require("./requestParser.js");
|
|
24
|
+
Object.defineProperty(exports, "RequestParser", { enumerable: true, get: function () { return requestParser_js_1.RequestParser; } });
|
|
25
|
+
var runtimeFactoryHelper_js_1 = require("./runtimeFactoryHelper.js");
|
|
26
|
+
Object.defineProperty(exports, "RuntimeFactoryHelper", { enumerable: true, get: function () { return runtimeFactoryHelper_js_1.RuntimeFactoryHelper; } });
|
|
27
|
+
var summaryUtils_js_1 = require("./summaryUtils.js");
|
|
28
|
+
Object.defineProperty(exports, "addBlobToSummary", { enumerable: true, get: function () { return summaryUtils_js_1.addBlobToSummary; } });
|
|
29
|
+
Object.defineProperty(exports, "addSummarizeResultToSummary", { enumerable: true, get: function () { return summaryUtils_js_1.addSummarizeResultToSummary; } });
|
|
30
|
+
Object.defineProperty(exports, "calculateStats", { enumerable: true, get: function () { return summaryUtils_js_1.calculateStats; } });
|
|
31
|
+
Object.defineProperty(exports, "convertSnapshotTreeToSummaryTree", { enumerable: true, get: function () { return summaryUtils_js_1.convertSnapshotTreeToSummaryTree; } });
|
|
32
|
+
Object.defineProperty(exports, "convertSummaryTreeToITree", { enumerable: true, get: function () { return summaryUtils_js_1.convertSummaryTreeToITree; } });
|
|
33
|
+
Object.defineProperty(exports, "convertToSummaryTree", { enumerable: true, get: function () { return summaryUtils_js_1.convertToSummaryTree; } });
|
|
34
|
+
Object.defineProperty(exports, "convertToSummaryTreeWithStats", { enumerable: true, get: function () { return summaryUtils_js_1.convertToSummaryTreeWithStats; } });
|
|
35
|
+
Object.defineProperty(exports, "GCDataBuilder", { enumerable: true, get: function () { return summaryUtils_js_1.GCDataBuilder; } });
|
|
36
|
+
Object.defineProperty(exports, "getBlobSize", { enumerable: true, get: function () { return summaryUtils_js_1.getBlobSize; } });
|
|
37
|
+
Object.defineProperty(exports, "mergeStats", { enumerable: true, get: function () { return summaryUtils_js_1.mergeStats; } });
|
|
38
|
+
Object.defineProperty(exports, "processAttachMessageGCData", { enumerable: true, get: function () { return summaryUtils_js_1.processAttachMessageGCData; } });
|
|
39
|
+
Object.defineProperty(exports, "SummaryTreeBuilder", { enumerable: true, get: function () { return summaryUtils_js_1.SummaryTreeBuilder; } });
|
|
40
|
+
Object.defineProperty(exports, "TelemetryContext", { enumerable: true, get: function () { return summaryUtils_js_1.TelemetryContext; } });
|
|
41
|
+
Object.defineProperty(exports, "utf8ByteLength", { enumerable: true, get: function () { return summaryUtils_js_1.utf8ByteLength; } });
|
|
42
|
+
var unpackUsedRoutes_js_1 = require("./unpackUsedRoutes.js");
|
|
43
|
+
Object.defineProperty(exports, "unpackChildNodesUsedRoutes", { enumerable: true, get: function () { return unpackUsedRoutes_js_1.unpackChildNodesUsedRoutes; } });
|
|
44
|
+
var utils_js_1 = require("./utils.js");
|
|
45
|
+
Object.defineProperty(exports, "seqFromTree", { enumerable: true, get: function () { return utils_js_1.seqFromTree; } });
|
|
46
|
+
Object.defineProperty(exports, "encodeCompactIdToString", { enumerable: true, get: function () { return utils_js_1.encodeCompactIdToString; } });
|
|
47
47
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,mFAA6E;AAApE,2IAAA,yBAAyB,OAAA;AAClC,6DAO+B;AAN9B,wHAAA,iBAAiB,OAAA;AACjB,6HAAA,sBAAsB,OAAA;AACtB,0HAAA,mBAAmB,OAAA;AACnB,0HAAA,mBAAmB,OAAA;AAEnB,0HAAA,mBAAmB,OAAA;AAEpB,2CAAqE;AAAzC,gHAAA,kBAAkB,OAAA;AAC9C,yEAAqE;AAA5D,mIAAA,sBAAsB,OAAA;AAC/B,iEAAmG;AAA1F,4IAAA,mCAAmC,OAAA;AAAE,4HAAA,mBAAmB,OAAA;AACjE,uDAAmD;AAA1C,iHAAA,aAAa,OAAA;AACtB,qEAAiE;AAAxD,+HAAA,oBAAoB,OAAA;AAC7B,qDAe2B;AAd1B,mHAAA,gBAAgB,OAAA;AAChB,8HAAA,2BAA2B,OAAA;AAC3B,iHAAA,cAAc,OAAA;AACd,mIAAA,gCAAgC,OAAA;AAChC,4HAAA,yBAAyB,OAAA;AACzB,uHAAA,oBAAoB,OAAA;AACpB,gIAAA,6BAA6B,OAAA;AAC7B,gHAAA,aAAa,OAAA;AACb,8GAAA,WAAW,OAAA;AACX,6GAAA,UAAU,OAAA;AACV,6HAAA,0BAA0B,OAAA;AAC1B,qHAAA,kBAAkB,OAAA;AAClB,mHAAA,gBAAgB,OAAA;AAChB,iHAAA,cAAc,OAAA;AAEf,6DAAmE;AAA1D,iIAAA,0BAA0B,OAAA;AACnC,uCAAoF;AAAzD,uGAAA,WAAW,OAAA;AAAE,mHAAA,uBAAuB,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport { generateHandleContextPath } from \"./dataStoreHandleContextUtils.js\";\nexport {\n\tcreate404Response,\n\tcreateDataStoreFactory,\n\tcreateResponseError,\n\texceptionToResponse,\n\tFactory,\n\tresponseToException,\n} from \"./dataStoreHelpers.js\";\nexport { ISerializedHandle, isSerializedHandle } from \"./handles.js\";\nexport { ObjectStoragePartition } from \"./objectstoragepartition.js\";\nexport { getNormalizedObjectStoragePathParts, listBlobsAtTreePath } from \"./objectstorageutils.js\";\nexport { RequestParser } from \"./requestParser.js\";\nexport { RuntimeFactoryHelper } from \"./runtimeFactoryHelper.js\";\nexport {\n\taddBlobToSummary,\n\taddSummarizeResultToSummary,\n\tcalculateStats,\n\tconvertSnapshotTreeToSummaryTree,\n\tconvertSummaryTreeToITree,\n\tconvertToSummaryTree,\n\tconvertToSummaryTreeWithStats,\n\tGCDataBuilder,\n\tgetBlobSize,\n\tmergeStats,\n\tprocessAttachMessageGCData,\n\tSummaryTreeBuilder,\n\tTelemetryContext,\n\tutf8ByteLength,\n} from \"./summaryUtils.js\";\nexport { unpackChildNodesUsedRoutes } from \"./unpackUsedRoutes.js\";\nexport { ReadAndParseBlob, seqFromTree, encodeCompactIdToString } from \"./utils.js\";\n"]}
|
|
@@ -22,14 +22,12 @@ import { ITelemetryContext } from '@fluidframework/runtime-definitions';
|
|
|
22
22
|
import { ITree } from '@fluidframework/protocol-definitions';
|
|
23
23
|
import { SummaryObject } from '@fluidframework/protocol-definitions';
|
|
24
24
|
import { SummaryType } from '@fluidframework/protocol-definitions';
|
|
25
|
-
import {
|
|
25
|
+
import type { TelemetryBaseEventPropertyType } from '@fluidframework/core-interfaces';
|
|
26
26
|
|
|
27
27
|
/* Excluded from this release type: addBlobToSummary */
|
|
28
28
|
|
|
29
29
|
/* Excluded from this release type: addSummarizeResultToSummary */
|
|
30
30
|
|
|
31
|
-
/* Excluded from this release type: addTreeToSummary */
|
|
32
|
-
|
|
33
31
|
/* Excluded from this release type: calculateStats */
|
|
34
32
|
|
|
35
33
|
/* Excluded from this release type: convertSnapshotTreeToSummaryTree */
|
|
@@ -52,6 +50,8 @@ export declare function convertToSummaryTreeWithStats(snapshot: ITree, fullTree?
|
|
|
52
50
|
|
|
53
51
|
/* Excluded from this release type: createResponseError */
|
|
54
52
|
|
|
53
|
+
/* Excluded from this release type: encodeCompactIdToString */
|
|
54
|
+
|
|
55
55
|
/* Excluded from this release type: exceptionToResponse */
|
|
56
56
|
|
|
57
57
|
/* Excluded from this release type: Factory */
|
|
@@ -22,14 +22,12 @@ import { ITelemetryContext } from '@fluidframework/runtime-definitions';
|
|
|
22
22
|
import { ITree } from '@fluidframework/protocol-definitions';
|
|
23
23
|
import { SummaryObject } from '@fluidframework/protocol-definitions';
|
|
24
24
|
import { SummaryType } from '@fluidframework/protocol-definitions';
|
|
25
|
-
import {
|
|
25
|
+
import type { TelemetryBaseEventPropertyType } from '@fluidframework/core-interfaces';
|
|
26
26
|
|
|
27
27
|
/* Excluded from this release type: addBlobToSummary */
|
|
28
28
|
|
|
29
29
|
/* Excluded from this release type: addSummarizeResultToSummary */
|
|
30
30
|
|
|
31
|
-
/* Excluded from this release type: addTreeToSummary */
|
|
32
|
-
|
|
33
31
|
/* Excluded from this release type: calculateStats */
|
|
34
32
|
|
|
35
33
|
/* Excluded from this release type: convertSnapshotTreeToSummaryTree */
|
|
@@ -46,6 +44,8 @@ import { TelemetryEventPropertyType } from '@fluidframework/core-interfaces';
|
|
|
46
44
|
|
|
47
45
|
/* Excluded from this release type: createResponseError */
|
|
48
46
|
|
|
47
|
+
/* Excluded from this release type: encodeCompactIdToString */
|
|
48
|
+
|
|
49
49
|
/* Excluded from this release type: exceptionToResponse */
|
|
50
50
|
|
|
51
51
|
/* Excluded from this release type: Factory */
|
|
@@ -22,14 +22,12 @@ import { ITelemetryContext } from '@fluidframework/runtime-definitions';
|
|
|
22
22
|
import { ITree } from '@fluidframework/protocol-definitions';
|
|
23
23
|
import { SummaryObject } from '@fluidframework/protocol-definitions';
|
|
24
24
|
import { SummaryType } from '@fluidframework/protocol-definitions';
|
|
25
|
-
import {
|
|
25
|
+
import type { TelemetryBaseEventPropertyType } from '@fluidframework/core-interfaces';
|
|
26
26
|
|
|
27
27
|
/* Excluded from this release type: addBlobToSummary */
|
|
28
28
|
|
|
29
29
|
/* Excluded from this release type: addSummarizeResultToSummary */
|
|
30
30
|
|
|
31
|
-
/* Excluded from this release type: addTreeToSummary */
|
|
32
|
-
|
|
33
31
|
/* Excluded from this release type: calculateStats */
|
|
34
32
|
|
|
35
33
|
/* Excluded from this release type: convertSnapshotTreeToSummaryTree */
|
|
@@ -46,6 +44,8 @@ import { TelemetryEventPropertyType } from '@fluidframework/core-interfaces';
|
|
|
46
44
|
|
|
47
45
|
/* Excluded from this release type: createResponseError */
|
|
48
46
|
|
|
47
|
+
/* Excluded from this release type: encodeCompactIdToString */
|
|
48
|
+
|
|
49
49
|
/* Excluded from this release type: exceptionToResponse */
|
|
50
50
|
|
|
51
51
|
/* Excluded from this release type: Factory */
|
|
@@ -22,7 +22,7 @@ import { ITelemetryContext } from '@fluidframework/runtime-definitions';
|
|
|
22
22
|
import { ITree } from '@fluidframework/protocol-definitions';
|
|
23
23
|
import { SummaryObject } from '@fluidframework/protocol-definitions';
|
|
24
24
|
import { SummaryType } from '@fluidframework/protocol-definitions';
|
|
25
|
-
import {
|
|
25
|
+
import type { TelemetryBaseEventPropertyType } from '@fluidframework/core-interfaces';
|
|
26
26
|
|
|
27
27
|
/**
|
|
28
28
|
* @internal
|
|
@@ -34,11 +34,6 @@ export declare function addBlobToSummary(summary: ISummaryTreeWithStats, key: st
|
|
|
34
34
|
*/
|
|
35
35
|
export declare function addSummarizeResultToSummary(summary: ISummaryTreeWithStats, key: string, summarizeResult: ISummarizeResult): void;
|
|
36
36
|
|
|
37
|
-
/**
|
|
38
|
-
* @internal
|
|
39
|
-
*/
|
|
40
|
-
export declare function addTreeToSummary(summary: ISummaryTreeWithStats, key: string, summarizeResult: ISummarizeResult): void;
|
|
41
|
-
|
|
42
37
|
/**
|
|
43
38
|
* @internal
|
|
44
39
|
*/
|
|
@@ -92,6 +87,21 @@ export declare function createResponseError(status: number, value: string, reque
|
|
|
92
87
|
[key: string]: any;
|
|
93
88
|
}): IResponse;
|
|
94
89
|
|
|
90
|
+
/**
|
|
91
|
+
* Encode compact ID (returned by IContainerRuntime.generateDocumentUniqueId()) to a compact string representation.
|
|
92
|
+
* While this is the main usage pattern, it works with any non-negative integer or a string.
|
|
93
|
+
* Strings are retured as is, and assumed to be UUIDs, i.e. unique enough to never overlap with
|
|
94
|
+
* numbers encoded as strings by this function. Any other strings are likely to run into collisions and should not be used!
|
|
95
|
+
* This function is useful in places where we serialize resulting ID as string and use them as strings, thus we are not
|
|
96
|
+
* gaining any efficiency from having a number type.
|
|
97
|
+
* We do not provide a decode function, so this API is only useful only result is stored and there is no need to go back to origianl form.
|
|
98
|
+
* @param idArg - input - either a non-negative integer or a string. Strings are returned as is, while numbers are encoded in compat form
|
|
99
|
+
* @param prefix - optinal string prefix
|
|
100
|
+
* @returns A string - representation of an input
|
|
101
|
+
* @internal
|
|
102
|
+
*/
|
|
103
|
+
export declare function encodeCompactIdToString(idArg: number | string, prefix?: string): string;
|
|
104
|
+
|
|
95
105
|
/**
|
|
96
106
|
* @internal
|
|
97
107
|
*/
|
|
@@ -305,15 +315,15 @@ export declare class TelemetryContext implements ITelemetryContext {
|
|
|
305
315
|
/**
|
|
306
316
|
* {@inheritDoc @fluidframework/runtime-definitions#ITelemetryContext.set}
|
|
307
317
|
*/
|
|
308
|
-
set(prefix: string, property: string, value:
|
|
318
|
+
set(prefix: string, property: string, value: TelemetryBaseEventPropertyType): void;
|
|
309
319
|
/**
|
|
310
320
|
* {@inheritDoc @fluidframework/runtime-definitions#ITelemetryContext.setMultiple}
|
|
311
321
|
*/
|
|
312
|
-
setMultiple(prefix: string, property: string, values: Record<string,
|
|
322
|
+
setMultiple(prefix: string, property: string, values: Record<string, TelemetryBaseEventPropertyType>): void;
|
|
313
323
|
/**
|
|
314
324
|
* {@inheritDoc @fluidframework/runtime-definitions#ITelemetryContext.get}
|
|
315
325
|
*/
|
|
316
|
-
get(prefix: string, property: string):
|
|
326
|
+
get(prefix: string, property: string): TelemetryBaseEventPropertyType;
|
|
317
327
|
/**
|
|
318
328
|
* {@inheritDoc @fluidframework/runtime-definitions#ITelemetryContext.serialize}
|
|
319
329
|
*/
|
package/dist/summaryUtils.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
import {
|
|
5
|
+
import type { TelemetryBaseEventPropertyType } from "@fluidframework/core-interfaces";
|
|
6
6
|
import { ITree, SummaryType, ISummaryTree, SummaryObject, ISummaryBlob } from "@fluidframework/protocol-definitions";
|
|
7
7
|
import { ISummaryStats, ISummarizeResult, ISummaryTreeWithStats, ITelemetryContext, IGarbageCollectionData } from "@fluidframework/runtime-definitions";
|
|
8
8
|
import { ISnapshotTreeWithBlobContents } from "@fluidframework/container-definitions";
|
|
@@ -29,10 +29,6 @@ export declare function calculateStats(summary: SummaryObject): ISummaryStats;
|
|
|
29
29
|
* @internal
|
|
30
30
|
*/
|
|
31
31
|
export declare function addBlobToSummary(summary: ISummaryTreeWithStats, key: string, content: string | Uint8Array): void;
|
|
32
|
-
/**
|
|
33
|
-
* @internal
|
|
34
|
-
*/
|
|
35
|
-
export declare function addTreeToSummary(summary: ISummaryTreeWithStats, key: string, summarizeResult: ISummarizeResult): void;
|
|
36
32
|
/**
|
|
37
33
|
* @internal
|
|
38
34
|
*/
|
|
@@ -102,15 +98,15 @@ export declare class TelemetryContext implements ITelemetryContext {
|
|
|
102
98
|
/**
|
|
103
99
|
* {@inheritDoc @fluidframework/runtime-definitions#ITelemetryContext.set}
|
|
104
100
|
*/
|
|
105
|
-
set(prefix: string, property: string, value:
|
|
101
|
+
set(prefix: string, property: string, value: TelemetryBaseEventPropertyType): void;
|
|
106
102
|
/**
|
|
107
103
|
* {@inheritDoc @fluidframework/runtime-definitions#ITelemetryContext.setMultiple}
|
|
108
104
|
*/
|
|
109
|
-
setMultiple(prefix: string, property: string, values: Record<string,
|
|
105
|
+
setMultiple(prefix: string, property: string, values: Record<string, TelemetryBaseEventPropertyType>): void;
|
|
110
106
|
/**
|
|
111
107
|
* {@inheritDoc @fluidframework/runtime-definitions#ITelemetryContext.get}
|
|
112
108
|
*/
|
|
113
|
-
get(prefix: string, property: string):
|
|
109
|
+
get(prefix: string, property: string): TelemetryBaseEventPropertyType;
|
|
114
110
|
/**
|
|
115
111
|
* {@inheritDoc @fluidframework/runtime-definitions#ITelemetryContext.serialize}
|
|
116
112
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"summaryUtils.d.ts","sourceRoot":"","sources":["../src/summaryUtils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"summaryUtils.d.ts","sourceRoot":"","sources":["../src/summaryUtils.ts"],"names":[],"mappings":"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"}
|
package/dist/summaryUtils.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Licensed under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.GCDataBuilder = exports.TelemetryContext = exports.processAttachMessageGCData = exports.convertSummaryTreeToITree = exports.convertSnapshotTreeToSummaryTree = exports.convertToSummaryTree = exports.convertToSummaryTreeWithStats = exports.SummaryTreeBuilder = exports.addSummarizeResultToSummary = exports.
|
|
7
|
+
exports.GCDataBuilder = exports.TelemetryContext = exports.processAttachMessageGCData = exports.convertSummaryTreeToITree = exports.convertSnapshotTreeToSummaryTree = exports.convertToSummaryTree = exports.convertToSummaryTreeWithStats = exports.SummaryTreeBuilder = exports.addSummarizeResultToSummary = exports.addBlobToSummary = exports.calculateStats = exports.getBlobSize = exports.utf8ByteLength = exports.mergeStats = void 0;
|
|
8
8
|
const client_utils_1 = require("@fluid-internal/client-utils");
|
|
9
9
|
const core_utils_1 = require("@fluidframework/core-utils");
|
|
10
10
|
const driver_utils_1 = require("@fluidframework/driver-utils");
|
|
@@ -105,14 +105,6 @@ function addBlobToSummary(summary, key, content) {
|
|
|
105
105
|
summary.stats.totalBlobSize += getBlobSize(content);
|
|
106
106
|
}
|
|
107
107
|
exports.addBlobToSummary = addBlobToSummary;
|
|
108
|
-
/**
|
|
109
|
-
* @internal
|
|
110
|
-
*/
|
|
111
|
-
function addTreeToSummary(summary, key, summarizeResult) {
|
|
112
|
-
summary.summary.tree[key] = summarizeResult.summary;
|
|
113
|
-
summary.stats = mergeStats(summary.stats, summarizeResult.stats);
|
|
114
|
-
}
|
|
115
|
-
exports.addTreeToSummary = addTreeToSummary;
|
|
116
108
|
/**
|
|
117
109
|
* @internal
|
|
118
110
|
*/
|
|
@@ -204,6 +196,7 @@ function convertToSummaryTreeWithStats(snapshot, fullTree = false) {
|
|
|
204
196
|
}
|
|
205
197
|
const summaryTree = builder.getSummaryTree();
|
|
206
198
|
summaryTree.summary.unreferenced = snapshot.unreferenced;
|
|
199
|
+
summaryTree.summary.groupId = snapshot.groupId;
|
|
207
200
|
return summaryTree;
|
|
208
201
|
}
|
|
209
202
|
exports.convertToSummaryTreeWithStats = convertToSummaryTreeWithStats;
|
|
@@ -263,6 +256,7 @@ function convertSnapshotTreeToSummaryTree(snapshot) {
|
|
|
263
256
|
}
|
|
264
257
|
const summaryTree = builder.getSummaryTree();
|
|
265
258
|
summaryTree.summary.unreferenced = snapshot.unreferenced;
|
|
259
|
+
summaryTree.summary.groupId = snapshot.groupId;
|
|
266
260
|
return summaryTree;
|
|
267
261
|
}
|
|
268
262
|
exports.convertSnapshotTreeToSummaryTree = convertSnapshotTreeToSummaryTree;
|
|
@@ -306,6 +300,7 @@ function convertSummaryTreeToITree(summaryTree) {
|
|
|
306
300
|
return {
|
|
307
301
|
entries,
|
|
308
302
|
unreferenced: summaryTree.unreferenced,
|
|
303
|
+
groupId: summaryTree.groupId,
|
|
309
304
|
};
|
|
310
305
|
}
|
|
311
306
|
exports.convertSummaryTreeToITree = convertSummaryTreeToITree;
|
|
@@ -329,7 +324,7 @@ function processAttachMessageGCData(snapshot, addedGCOutboundRoute) {
|
|
|
329
324
|
if (gcDataEntry === undefined) {
|
|
330
325
|
return false;
|
|
331
326
|
}
|
|
332
|
-
(0, core_utils_1.assert)(gcDataEntry.type === protocol_definitions_1.TreeEntry.Blob && gcDataEntry.value.encoding === "utf-8",
|
|
327
|
+
(0, core_utils_1.assert)(gcDataEntry.type === protocol_definitions_1.TreeEntry.Blob && gcDataEntry.value.encoding === "utf-8", 0x8ff /* GC data should be a utf-8-encoded blob */);
|
|
333
328
|
const gcData = JSON.parse(gcDataEntry.value.contents);
|
|
334
329
|
for (const [nodeId, outboundRoutes] of Object.entries(gcData.gcNodes)) {
|
|
335
330
|
outboundRoutes.forEach((toPath) => {
|