@fluidframework/runtime-utils 2.0.0-internal.7.3.0 → 2.0.0-internal.8.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +20 -0
- package/api-extractor-lint.json +13 -0
- package/api-extractor.json +3 -3
- package/api-report/runtime-utils.api.md +31 -35
- package/dist/dataStoreHandleContextUtils.d.ts +1 -0
- package/dist/dataStoreHandleContextUtils.d.ts.map +1 -1
- package/dist/dataStoreHandleContextUtils.js +1 -0
- package/dist/dataStoreHandleContextUtils.js.map +1 -1
- package/dist/dataStoreHelpers.d.ts +17 -3
- package/dist/dataStoreHelpers.d.ts.map +1 -1
- package/dist/dataStoreHelpers.js +14 -14
- package/dist/dataStoreHelpers.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -2
- package/dist/index.js.map +1 -1
- package/dist/objectstoragepartition.d.ts +1 -0
- package/dist/objectstoragepartition.d.ts.map +1 -1
- package/dist/objectstoragepartition.js +1 -0
- package/dist/objectstoragepartition.js.map +1 -1
- package/dist/objectstorageutils.d.ts +6 -0
- package/dist/objectstorageutils.d.ts.map +1 -1
- package/dist/objectstorageutils.js +6 -0
- package/dist/objectstorageutils.js.map +1 -1
- package/dist/requestParser.d.ts +1 -0
- package/dist/requestParser.d.ts.map +1 -1
- package/dist/requestParser.js +1 -0
- package/dist/requestParser.js.map +1 -1
- package/dist/runtime-utils-alpha.d.ts +134 -0
- package/dist/runtime-utils-beta.d.ts +121 -0
- package/dist/runtime-utils-public.d.ts +121 -0
- package/dist/runtime-utils-untrimmed.d.ts +306 -0
- package/dist/runtimeFactoryHelper.d.ts +3 -0
- package/dist/runtimeFactoryHelper.d.ts.map +1 -1
- package/dist/runtimeFactoryHelper.js +3 -0
- package/dist/runtimeFactoryHelper.js.map +1 -1
- package/dist/summaryUtils.d.ts +32 -2
- package/dist/summaryUtils.d.ts.map +1 -1
- package/dist/summaryUtils.js +29 -0
- package/dist/summaryUtils.js.map +1 -1
- package/dist/unpackUsedRoutes.d.ts +2 -1
- package/dist/unpackUsedRoutes.d.ts.map +1 -1
- package/dist/unpackUsedRoutes.js +1 -0
- package/dist/unpackUsedRoutes.js.map +1 -1
- package/dist/utils.d.ts +6 -1
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +1 -0
- package/dist/utils.js.map +1 -1
- package/lib/dataStoreHandleContextUtils.d.ts +1 -0
- package/lib/dataStoreHandleContextUtils.d.ts.map +1 -1
- package/lib/dataStoreHandleContextUtils.js +1 -0
- package/lib/dataStoreHandleContextUtils.js.map +1 -1
- package/lib/dataStoreHelpers.d.ts +17 -3
- package/lib/dataStoreHelpers.d.ts.map +1 -1
- package/lib/dataStoreHelpers.js +13 -12
- package/lib/dataStoreHelpers.js.map +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib/objectstoragepartition.d.ts +1 -0
- package/lib/objectstoragepartition.d.ts.map +1 -1
- package/lib/objectstoragepartition.js +1 -0
- package/lib/objectstoragepartition.js.map +1 -1
- package/lib/objectstorageutils.d.ts +6 -0
- package/lib/objectstorageutils.d.ts.map +1 -1
- package/lib/objectstorageutils.js +6 -0
- package/lib/objectstorageutils.js.map +1 -1
- package/lib/requestParser.d.ts +1 -0
- package/lib/requestParser.d.ts.map +1 -1
- package/lib/requestParser.js +1 -0
- package/lib/requestParser.js.map +1 -1
- package/lib/runtime-utils-alpha.d.ts +134 -0
- package/lib/runtime-utils-beta.d.ts +121 -0
- package/lib/runtime-utils-public.d.ts +121 -0
- package/lib/runtime-utils-untrimmed.d.ts +306 -0
- package/lib/runtimeFactoryHelper.d.ts +3 -0
- package/lib/runtimeFactoryHelper.d.ts.map +1 -1
- package/lib/runtimeFactoryHelper.js +3 -0
- package/lib/runtimeFactoryHelper.js.map +1 -1
- package/lib/summaryUtils.d.ts +32 -2
- package/lib/summaryUtils.d.ts.map +1 -1
- package/lib/summaryUtils.js +29 -0
- package/lib/summaryUtils.js.map +1 -1
- package/lib/unpackUsedRoutes.d.ts +2 -1
- package/lib/unpackUsedRoutes.d.ts.map +1 -1
- package/lib/unpackUsedRoutes.js +1 -0
- package/lib/unpackUsedRoutes.js.map +1 -1
- package/lib/utils.d.ts +6 -1
- package/lib/utils.d.ts.map +1 -1
- package/lib/utils.js +1 -0
- package/lib/utils.js.map +1 -1
- package/package.json +41 -17
- package/src/dataStoreHandleContextUtils.ts +1 -0
- package/src/dataStoreHelpers.ts +17 -19
- package/src/index.ts +0 -1
- package/src/objectstoragepartition.ts +1 -0
- package/src/objectstorageutils.ts +6 -0
- package/src/requestParser.ts +1 -0
- package/src/runtimeFactoryHelper.ts +3 -0
- package/src/summaryUtils.ts +35 -4
- package/src/unpackUsedRoutes.ts +2 -1
- package/src/utils.ts +6 -1
package/lib/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
export { generateHandleContextPath } from "./dataStoreHandleContextUtils";
|
|
6
|
-
export { create404Response, createDataStoreFactory, createResponseError, exceptionToResponse, Factory,
|
|
6
|
+
export { create404Response, createDataStoreFactory, createResponseError, exceptionToResponse, Factory, responseToException, } from "./dataStoreHelpers";
|
|
7
7
|
export { ObjectStoragePartition } from "./objectstoragepartition";
|
|
8
8
|
export { getNormalizedObjectStoragePathParts, listBlobsAtTreePath } from "./objectstorageutils";
|
|
9
9
|
export { RequestParser } from "./requestParser";
|
package/lib/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,+BAA+B,CAAC;AAC1E,OAAO,EACN,iBAAiB,EACjB,sBAAsB,EACtB,mBAAmB,EACnB,mBAAmB,EACnB,OAAO,EACP,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,yBAAyB,EAAE,MAAM,+BAA+B,CAAC;AAC1E,OAAO,EACN,iBAAiB,EACjB,sBAAsB,EACtB,mBAAmB,EACnB,mBAAmB,EACnB,OAAO,EACP,mBAAmB,GACnB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,mCAAmC,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAChG,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EACN,gBAAgB,EAChB,2BAA2B,EAC3B,gBAAgB,EAChB,cAAc,EACd,gCAAgC,EAChC,yBAAyB,EACzB,oBAAoB,EACpB,6BAA6B,EAC7B,aAAa,EACb,WAAW,EACX,UAAU,EACV,kBAAkB,EAClB,gBAAgB,EAChB,cAAc,GACd,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC"}
|
package/lib/index.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
export { generateHandleContextPath } from "./dataStoreHandleContextUtils";
|
|
6
|
-
export { create404Response, createDataStoreFactory, createResponseError, exceptionToResponse,
|
|
6
|
+
export { create404Response, createDataStoreFactory, createResponseError, exceptionToResponse, responseToException, } from "./dataStoreHelpers";
|
|
7
7
|
export { ObjectStoragePartition } from "./objectstoragepartition";
|
|
8
8
|
export { getNormalizedObjectStoragePathParts, listBlobsAtTreePath } from "./objectstorageutils";
|
|
9
9
|
export { RequestParser } from "./requestParser";
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,yBAAyB,EAAE,MAAM,+BAA+B,CAAC;AAC1E,OAAO,EACN,iBAAiB,EACjB,sBAAsB,EACtB,mBAAmB,EACnB,mBAAmB,EAEnB,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,yBAAyB,EAAE,MAAM,+BAA+B,CAAC;AAC1E,OAAO,EACN,iBAAiB,EACjB,sBAAsB,EACtB,mBAAmB,EACnB,mBAAmB,EAEnB,mBAAmB,GACnB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,mCAAmC,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAChG,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EACN,gBAAgB,EAChB,2BAA2B,EAC3B,gBAAgB,EAChB,cAAc,EACd,gCAAgC,EAChC,yBAAyB,EACzB,oBAAoB,EACpB,6BAA6B,EAC7B,aAAa,EACb,WAAW,EACX,UAAU,EACV,kBAAkB,EAClB,gBAAgB,EAChB,cAAc,GACd,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AAChE,OAAO,EAAoB,WAAW,EAAE,MAAM,SAAS,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport { generateHandleContextPath } from \"./dataStoreHandleContextUtils\";\nexport {\n\tcreate404Response,\n\tcreateDataStoreFactory,\n\tcreateResponseError,\n\texceptionToResponse,\n\tFactory,\n\tresponseToException,\n} from \"./dataStoreHelpers\";\nexport { ObjectStoragePartition } from \"./objectstoragepartition\";\nexport { getNormalizedObjectStoragePathParts, listBlobsAtTreePath } from \"./objectstorageutils\";\nexport { RequestParser } from \"./requestParser\";\nexport { RuntimeFactoryHelper } from \"./runtimeFactoryHelper\";\nexport {\n\taddBlobToSummary,\n\taddSummarizeResultToSummary,\n\taddTreeToSummary,\n\tcalculateStats,\n\tconvertSnapshotTreeToSummaryTree,\n\tconvertSummaryTreeToITree,\n\tconvertToSummaryTree,\n\tconvertToSummaryTreeWithStats,\n\tGCDataBuilder,\n\tgetBlobSize,\n\tmergeStats,\n\tSummaryTreeBuilder,\n\tTelemetryContext,\n\tutf8ByteLength,\n} from \"./summaryUtils\";\nexport { unpackChildNodesUsedRoutes } from \"./unpackUsedRoutes\";\nexport { ReadAndParseBlob, seqFromTree } from \"./utils\";\n"]}
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
import { IChannelStorageService } from "@fluidframework/datastore-definitions";
|
|
6
6
|
/**
|
|
7
7
|
* Returns a new IChannelStorageService that resolves the given `path` as root.
|
|
8
|
+
* @internal
|
|
8
9
|
*/
|
|
9
10
|
export declare class ObjectStoragePartition implements IChannelStorageService {
|
|
10
11
|
private readonly storage;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"objectstoragepartition.d.ts","sourceRoot":"","sources":["../src/objectstoragepartition.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,sBAAsB,EAAE,MAAM,uCAAuC,CAAC;AAE/E
|
|
1
|
+
{"version":3,"file":"objectstoragepartition.d.ts","sourceRoot":"","sources":["../src/objectstoragepartition.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,sBAAsB,EAAE,MAAM,uCAAuC,CAAC;AAE/E;;;GAGG;AACH,qBAAa,sBAAuB,YAAW,sBAAsB;IAEnE,OAAO,CAAC,QAAQ,CAAC,OAAO;IACxB,OAAO,CAAC,QAAQ,CAAC,IAAI;gBADJ,OAAO,EAAE,sBAAsB,EAC/B,IAAI,EAAE,MAAM;IAMjB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC;IAIhD,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAIxC,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;CAGlD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"objectstoragepartition.js","sourceRoot":"","sources":["../src/objectstoragepartition.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAGpD
|
|
1
|
+
{"version":3,"file":"objectstoragepartition.js","sourceRoot":"","sources":["../src/objectstoragepartition.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAGpD;;;GAGG;AACH,MAAM,OAAO,sBAAsB;IAClC,YACkB,OAA+B,EAC/B,IAAY;QADZ,YAAO,GAAP,OAAO,CAAwB;QAC/B,SAAI,GAAJ,IAAI,CAAQ;QAE7B,kDAAkD;QAClD,MAAM,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,KAAK,CAAC,mDAAmD,CAAC,CAAC;IACxF,CAAC;IAEM,KAAK,CAAC,QAAQ,CAAC,IAAY;QACjC,OAAO,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC,IAAI,IAAI,IAAI,EAAE,CAAC,CAAC;IACtD,CAAC;IAEM,KAAK,CAAC,QAAQ,CAAC,IAAY;QACjC,OAAO,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC,IAAI,IAAI,IAAI,EAAE,CAAC,CAAC;IACtD,CAAC;IAEM,KAAK,CAAC,IAAI,CAAC,IAAY;QAC7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,IAAI,IAAI,IAAI,EAAE,CAAC,CAAC;IAClD,CAAC;CACD","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert } from \"@fluidframework/core-utils\";\nimport { IChannelStorageService } from \"@fluidframework/datastore-definitions\";\n\n/**\n * Returns a new IChannelStorageService that resolves the given `path` as root.\n * @internal\n */\nexport class ObjectStoragePartition implements IChannelStorageService {\n\tconstructor(\n\t\tprivate readonly storage: IChannelStorageService,\n\t\tprivate readonly path: string,\n\t) {\n\t\t// `path` must not include the trailing separator.\n\t\tassert(!path.endsWith(\"/\"), 0x19c /* \"storage service path has trailing separator\" */);\n\t}\n\n\tpublic async readBlob(path: string): Promise<ArrayBufferLike> {\n\t\treturn this.storage.readBlob(`${this.path}/${path}`);\n\t}\n\n\tpublic async contains(path: string): Promise<boolean> {\n\t\treturn this.storage.contains(`${this.path}/${path}`);\n\t}\n\n\tpublic async list(path: string): Promise<string[]> {\n\t\treturn this.storage.list(`${this.path}/${path}`);\n\t}\n}\n"]}
|
|
@@ -3,6 +3,12 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
import { ITree } from "@fluidframework/protocol-definitions";
|
|
6
|
+
/**
|
|
7
|
+
* @internal
|
|
8
|
+
*/
|
|
6
9
|
export declare function getNormalizedObjectStoragePathParts(path: string): string[];
|
|
10
|
+
/**
|
|
11
|
+
* @internal
|
|
12
|
+
*/
|
|
7
13
|
export declare function listBlobsAtTreePath(inputTree: ITree | undefined, path: string): Promise<string[]>;
|
|
8
14
|
//# sourceMappingURL=objectstorageutils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"objectstorageutils.d.ts","sourceRoot":"","sources":["../src/objectstorageutils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,KAAK,EAAE,MAAM,sCAAsC,CAAC;AAE7D,wBAAgB,mCAAmC,CAAC,IAAI,EAAE,MAAM,YAY/D;AAED,wBAAsB,mBAAmB,CACxC,SAAS,EAAE,KAAK,GAAG,SAAS,EAC5B,IAAI,EAAE,MAAM,GACV,OAAO,CAAC,MAAM,EAAE,CAAC,CAkBnB"}
|
|
1
|
+
{"version":3,"file":"objectstorageutils.d.ts","sourceRoot":"","sources":["../src/objectstorageutils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,KAAK,EAAE,MAAM,sCAAsC,CAAC;AAE7D;;GAEG;AACH,wBAAgB,mCAAmC,CAAC,IAAI,EAAE,MAAM,YAY/D;AAED;;GAEG;AACH,wBAAsB,mBAAmB,CACxC,SAAS,EAAE,KAAK,GAAG,SAAS,EAC5B,IAAI,EAAE,MAAM,GACV,OAAO,CAAC,MAAM,EAAE,CAAC,CAkBnB"}
|
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
+
/**
|
|
6
|
+
* @internal
|
|
7
|
+
*/
|
|
5
8
|
export function getNormalizedObjectStoragePathParts(path) {
|
|
6
9
|
let normalizePath = path;
|
|
7
10
|
if (normalizePath.startsWith("/")) {
|
|
@@ -15,6 +18,9 @@ export function getNormalizedObjectStoragePathParts(path) {
|
|
|
15
18
|
}
|
|
16
19
|
return [];
|
|
17
20
|
}
|
|
21
|
+
/**
|
|
22
|
+
* @internal
|
|
23
|
+
*/
|
|
18
24
|
export async function listBlobsAtTreePath(inputTree, path) {
|
|
19
25
|
const pathParts = getNormalizedObjectStoragePathParts(path);
|
|
20
26
|
let tree = inputTree;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"objectstorageutils.js","sourceRoot":"","sources":["../src/objectstorageutils.ts"],"names":[],"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IAAI,EAAE,OAAO,KAAK,SAAS,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC,EAAE;QAC1D,MAAM,IAAI,KAAK,CAAC,qBAAqB,CAAC,CAAC;KACvC;IACD,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;AACzE,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { ITree } from \"@fluidframework/protocol-definitions\";\n\nexport function getNormalizedObjectStoragePathParts(path: string) {\n\tlet normalizePath = path;\n\tif (normalizePath.startsWith(\"/\")) {\n\t\tnormalizePath = normalizePath.substr(1);\n\t}\n\tif (normalizePath.endsWith(\"/\")) {\n\t\tnormalizePath = normalizePath.substr(0, normalizePath.length - 1);\n\t}\n\tif (normalizePath.length > 0) {\n\t\treturn normalizePath.split(\"/\");\n\t}\n\treturn [];\n}\n\nexport async function listBlobsAtTreePath(\n\tinputTree: ITree | undefined,\n\tpath: string,\n): Promise<string[]> {\n\tconst pathParts = getNormalizedObjectStoragePathParts(path);\n\tlet tree: ITree | undefined = inputTree;\n\twhile (tree?.entries !== undefined && pathParts.length > 0) {\n\t\tconst part = pathParts.shift();\n\t\tconst treeEntry = tree.entries.find((value) => {\n\t\t\treturn value.type === \"Tree\" && value.path === part ? true : false;\n\t\t});\n\n\t\t// this check is largely superfluous due to the same check being done\n\t\t// immediately above. the type system, however, is not aware of this.\n\t\t// so we must redundantly determine that the entry's type is \"Tree\"\n\t\ttree = treeEntry?.type === \"Tree\" ? treeEntry.value : undefined;\n\t}\n\tif (tree?.entries === undefined || pathParts.length !== 0) {\n\t\tthrow new Error(\"path does not exist\");\n\t}\n\treturn tree.entries.filter((e) => e.type === \"Blob\").map((e) => e.path);\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AS,EAAE,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;KAChE;IACD,IAAI,IAAI,EAAE,OAAO,KAAK,SAAS,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC,EAAE;QAC1D,MAAM,IAAI,KAAK,CAAC,qBAAqB,CAAC,CAAC;KACvC;IACD,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;AACzE,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { ITree } from \"@fluidframework/protocol-definitions\";\n\n/**\n * @internal\n */\nexport function getNormalizedObjectStoragePathParts(path: string) {\n\tlet normalizePath = path;\n\tif (normalizePath.startsWith(\"/\")) {\n\t\tnormalizePath = normalizePath.substr(1);\n\t}\n\tif (normalizePath.endsWith(\"/\")) {\n\t\tnormalizePath = normalizePath.substr(0, normalizePath.length - 1);\n\t}\n\tif (normalizePath.length > 0) {\n\t\treturn normalizePath.split(\"/\");\n\t}\n\treturn [];\n}\n\n/**\n * @internal\n */\nexport async function listBlobsAtTreePath(\n\tinputTree: ITree | undefined,\n\tpath: string,\n): Promise<string[]> {\n\tconst pathParts = getNormalizedObjectStoragePathParts(path);\n\tlet tree: ITree | undefined = inputTree;\n\twhile (tree?.entries !== undefined && pathParts.length > 0) {\n\t\tconst part = pathParts.shift();\n\t\tconst treeEntry = tree.entries.find((value) => {\n\t\t\treturn value.type === \"Tree\" && value.path === part ? true : false;\n\t\t});\n\n\t\t// this check is largely superfluous due to the same check being done\n\t\t// immediately above. the type system, however, is not aware of this.\n\t\t// so we must redundantly determine that the entry's type is \"Tree\"\n\t\ttree = treeEntry?.type === \"Tree\" ? treeEntry.value : undefined;\n\t}\n\tif (tree?.entries === undefined || pathParts.length !== 0) {\n\t\tthrow new Error(\"path does not exist\");\n\t}\n\treturn tree.entries.filter((e) => e.type === \"Blob\").map((e) => e.path);\n}\n"]}
|
package/lib/requestParser.d.ts
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
import { IRequest, IRequestHeader } from "@fluidframework/core-interfaces";
|
|
6
6
|
/**
|
|
7
7
|
* The Request Parser takes an IRequest provides parsing and sub request creation
|
|
8
|
+
* @alpha
|
|
8
9
|
*/
|
|
9
10
|
export declare class RequestParser implements IRequest {
|
|
10
11
|
private readonly request;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"requestParser.d.ts","sourceRoot":"","sources":["../src/requestParser.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAE3E
|
|
1
|
+
{"version":3,"file":"requestParser.d.ts","sourceRoot":"","sources":["../src/requestParser.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAE3E;;;GAGG;AACH,qBAAa,aAAc,YAAW,QAAQ;IA6BvB,OAAO,CAAC,QAAQ,CAAC,OAAO;IA5B9C;;;OAGG;WACW,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,MAAM,EAAE;IAa1D,OAAO,CAAC,gBAAgB,CAAgC;IACxD,SAAgB,KAAK,EAAE,MAAM,CAAC;WAEhB,MAAM,CAAC,OAAO,EAAE,QAAQ,CAAC,QAAQ,CAAC;IAQhD,SAAS,aAA8B,OAAO,EAAE,QAAQ,CAAC,QAAQ,CAAC;IAKlE,IAAW,GAAG,IAAI,MAAM,CAEvB;IAED,IAAW,OAAO,IAAI,cAAc,GAAG,SAAS,CAE/C;IAED;;OAEG;IACH,IAAW,SAAS,IAAI,SAAS,MAAM,EAAE,CAKxC;IAED;;;OAGG;IACI,MAAM,CAAC,QAAQ,EAAE,MAAM;IAI9B;;;;;;;;;;;OAWG;IACI,gBAAgB,CAAC,iBAAiB,EAAE,MAAM,GAAG,QAAQ;CAiB5D"}
|
package/lib/requestParser.js
CHANGED
package/lib/requestParser.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"requestParser.js","sourceRoot":"","sources":["../src/requestParser.ts"],"names":[],"mappings":"AAMA
|
|
1
|
+
{"version":3,"file":"requestParser.js","sourceRoot":"","sources":["../src/requestParser.ts"],"names":[],"mappings":"AAMA;;;GAGG;AACH,MAAM,OAAO,aAAa;IACzB;;;OAGG;IACI,MAAM,CAAC,YAAY,CAAC,GAAW;QACrC,MAAM,eAAe,GAAG,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QACzC,OAAO,GAAG;aACR,SAAS,CAAC,CAAC,EAAE,eAAe,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,eAAe,CAAC;aAChE,KAAK,CAAC,GAAG,CAAC;aACV,MAAM,CAAW,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE;YAC5B,IAAI,EAAE,KAAK,SAAS,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC,EAAE;gBACtC,EAAE,CAAC,IAAI,CAAC,kBAAkB,CAAC,EAAE,CAAC,CAAC,CAAC;aAChC;YACD,OAAO,EAAE,CAAC;QACX,CAAC,EAAE,EAAE,CAAC,CAAC;IACT,CAAC;IAKM,MAAM,CAAC,MAAM,CAAC,OAA2B;QAC/C,sBAAsB;QACtB,IAAI,OAAO,YAAY,aAAa,EAAE;YACrC,OAAO,OAAO,CAAC;SACf;QACD,OAAO,IAAI,aAAa,CAAC,OAAO,CAAC,CAAC;IACnC,CAAC;IAED,YAAuC,OAA2B;QAA3B,YAAO,GAAP,OAAO,CAAoB;QACjE,MAAM,eAAe,GAAG,IAAI,CAAC,OAAO,CAAC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AAK,CAAC,iBAAiB,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;QACrE,OAAO;YACN,GAAG,EAAE,IAAI,CAAC,KAAK,KAAK,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,IAAI,IAAI,CAAC,KAAK,EAAE;YACvD,OAAO,EAAE,IAAI,CAAC,OAAO;SACrB,CAAC;IACH,CAAC;CACD","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\nimport { IRequest, IRequestHeader } from \"@fluidframework/core-interfaces\";\n\n/**\n * The Request Parser takes an IRequest provides parsing and sub request creation\n * @alpha\n */\nexport class RequestParser implements IRequest {\n\t/**\n\t * Splits the path of the url and decodes each path part\n\t * @param url - the url to get path parts of\n\t */\n\tpublic static getPathParts(url: string): readonly string[] {\n\t\tconst queryStartIndex = url.indexOf(\"?\");\n\t\treturn url\n\t\t\t.substring(0, queryStartIndex < 0 ? url.length : queryStartIndex)\n\t\t\t.split(\"/\")\n\t\t\t.reduce<string[]>((pv, cv) => {\n\t\t\t\tif (cv !== undefined && cv.length > 0) {\n\t\t\t\t\tpv.push(decodeURIComponent(cv));\n\t\t\t\t}\n\t\t\t\treturn pv;\n\t\t\t}, []);\n\t}\n\n\tprivate requestPathParts: readonly string[] | undefined;\n\tpublic readonly query: string;\n\n\tpublic static create(request: Readonly<IRequest>) {\n\t\t// Perf optimizations.\n\t\tif (request instanceof RequestParser) {\n\t\t\treturn request;\n\t\t}\n\t\treturn new RequestParser(request);\n\t}\n\n\tprotected constructor(private readonly request: Readonly<IRequest>) {\n\t\tconst queryStartIndex = this.request.url.indexOf(\"?\");\n\t\tthis.query = queryStartIndex >= 0 ? this.request.url.substring(queryStartIndex) : \"\";\n\t}\n\n\tpublic get url(): string {\n\t\treturn this.request.url;\n\t}\n\n\tpublic get headers(): IRequestHeader | undefined {\n\t\treturn this.request.headers;\n\t}\n\n\t/**\n\t * Returns the decoded path parts of the request's url\n\t */\n\tpublic get pathParts(): readonly string[] {\n\t\tif (this.requestPathParts === undefined) {\n\t\t\tthis.requestPathParts = RequestParser.getPathParts(this.url);\n\t\t}\n\t\treturn this.requestPathParts;\n\t}\n\n\t/**\n\t * Returns true if it's a terminating path, i.e. no more elements after `elements` entries and empty query.\n\t * @param elements - number of elements in path\n\t */\n\tpublic isLeaf(elements: number) {\n\t\treturn this.query === \"\" && this.pathParts.length === elements;\n\t}\n\n\t/**\n\t * Creates a sub request starting at a specific path part of this request's url\n\t * The sub request url always has a leading slash, and always include query params if original url has any\n\t * e.g. original url is /a/b/?queryParams, createSubRequest(0) is /a/b/?queryParams\n\t * createSubRequest(1) is /b/?queryParams\n\t * createSubRequest(2) is /?queryParams\n\t * createSubRequest(n) where n is bigger than parts length, e.g. 2, or n is less than 0 will throw an exception\n\t *\n\t * note: query params are not counted towards path parts.\n\t *\n\t * @param startingPathIndex - The index of the first path part of the sub request\n\t */\n\tpublic createSubRequest(startingPathIndex: number): IRequest {\n\t\tconst pathLen = this.pathParts.length;\n\t\tif (startingPathIndex < 0 || startingPathIndex > pathLen) {\n\t\t\tthrow new Error(\"incorrect sub-request\");\n\t\t}\n\t\tif (startingPathIndex === pathLen && this.url.includes(\"?\")) {\n\t\t\treturn {\n\t\t\t\turl: `/${this.query}`,\n\t\t\t\theaders: this.headers,\n\t\t\t};\n\t\t}\n\t\tconst path = `/${this.pathParts.slice(startingPathIndex).join(\"/\")}`;\n\t\treturn {\n\t\t\turl: this.query === \"\" ? path : `${path}/${this.query}`,\n\t\t\theaders: this.headers,\n\t\t};\n\t}\n}\n"]}
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import { IChannelStorageService } from '@fluidframework/datastore-definitions';
|
|
2
|
+
import { IContainerContext } from '@fluidframework/container-definitions';
|
|
3
|
+
import { IContainerRuntime } from '@fluidframework/container-runtime-definitions';
|
|
4
|
+
import { IFluidDataStoreFactory } from '@fluidframework/runtime-definitions';
|
|
5
|
+
import { IFluidDataStoreRegistry } from '@fluidframework/runtime-definitions';
|
|
6
|
+
import { IFluidHandleContext } from '@fluidframework/core-interfaces';
|
|
7
|
+
import { IGarbageCollectionData } from '@fluidframework/runtime-definitions';
|
|
8
|
+
import { IProvideFluidDataStoreRegistry } from '@fluidframework/runtime-definitions';
|
|
9
|
+
import { IRequest } from '@fluidframework/core-interfaces';
|
|
10
|
+
import { IRequestHeader } from '@fluidframework/core-interfaces';
|
|
11
|
+
import { IResponse } from '@fluidframework/core-interfaces';
|
|
12
|
+
import { IRuntime } from '@fluidframework/container-definitions';
|
|
13
|
+
import { IRuntimeFactory } from '@fluidframework/container-definitions';
|
|
14
|
+
import { ISnapshotTree } from '@fluidframework/protocol-definitions';
|
|
15
|
+
import { ISnapshotTreeWithBlobContents } from '@fluidframework/container-definitions';
|
|
16
|
+
import { ISummarizeResult } from '@fluidframework/runtime-definitions';
|
|
17
|
+
import { ISummaryBlob } from '@fluidframework/protocol-definitions';
|
|
18
|
+
import { ISummaryStats } from '@fluidframework/runtime-definitions';
|
|
19
|
+
import { ISummaryTree } from '@fluidframework/protocol-definitions';
|
|
20
|
+
import { ISummaryTreeWithStats } from '@fluidframework/runtime-definitions';
|
|
21
|
+
import { ITelemetryContext } from '@fluidframework/runtime-definitions';
|
|
22
|
+
import { ITree } from '@fluidframework/protocol-definitions';
|
|
23
|
+
import { SummaryObject } from '@fluidframework/protocol-definitions';
|
|
24
|
+
import { SummaryType } from '@fluidframework/protocol-definitions';
|
|
25
|
+
import { TelemetryEventPropertyType } from '@fluidframework/core-interfaces';
|
|
26
|
+
|
|
27
|
+
/* Excluded from this release type: addBlobToSummary */
|
|
28
|
+
|
|
29
|
+
/* Excluded from this release type: addSummarizeResultToSummary */
|
|
30
|
+
|
|
31
|
+
/* Excluded from this release type: addTreeToSummary */
|
|
32
|
+
|
|
33
|
+
/* Excluded from this release type: calculateStats */
|
|
34
|
+
|
|
35
|
+
/* Excluded from this release type: convertSnapshotTreeToSummaryTree */
|
|
36
|
+
|
|
37
|
+
/* Excluded from this release type: convertSummaryTreeToITree */
|
|
38
|
+
|
|
39
|
+
/* Excluded from this release type: convertToSummaryTree */
|
|
40
|
+
|
|
41
|
+
/* Excluded from this release type: convertToSummaryTreeWithStats */
|
|
42
|
+
|
|
43
|
+
/* Excluded from this release type: create404Response */
|
|
44
|
+
|
|
45
|
+
/* Excluded from this release type: createDataStoreFactory */
|
|
46
|
+
|
|
47
|
+
/* Excluded from this release type: createResponseError */
|
|
48
|
+
|
|
49
|
+
/* Excluded from this release type: exceptionToResponse */
|
|
50
|
+
|
|
51
|
+
/* Excluded from this release type: Factory */
|
|
52
|
+
|
|
53
|
+
/* Excluded from this release type: GCDataBuilder */
|
|
54
|
+
|
|
55
|
+
/* Excluded from this release type: generateHandleContextPath */
|
|
56
|
+
|
|
57
|
+
/* Excluded from this release type: getBlobSize */
|
|
58
|
+
|
|
59
|
+
/* Excluded from this release type: getNormalizedObjectStoragePathParts */
|
|
60
|
+
|
|
61
|
+
/* Excluded from this release type: listBlobsAtTreePath */
|
|
62
|
+
|
|
63
|
+
/* Excluded from this release type: mergeStats */
|
|
64
|
+
|
|
65
|
+
/* Excluded from this release type: ObjectStoragePartition */
|
|
66
|
+
|
|
67
|
+
/* Excluded from this release type: ReadAndParseBlob */
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* The Request Parser takes an IRequest provides parsing and sub request creation
|
|
71
|
+
* @alpha
|
|
72
|
+
*/
|
|
73
|
+
export declare class RequestParser implements IRequest {
|
|
74
|
+
private readonly request;
|
|
75
|
+
/**
|
|
76
|
+
* Splits the path of the url and decodes each path part
|
|
77
|
+
* @param url - the url to get path parts of
|
|
78
|
+
*/
|
|
79
|
+
static getPathParts(url: string): readonly string[];
|
|
80
|
+
private requestPathParts;
|
|
81
|
+
readonly query: string;
|
|
82
|
+
static create(request: Readonly<IRequest>): RequestParser;
|
|
83
|
+
protected constructor(request: Readonly<IRequest>);
|
|
84
|
+
get url(): string;
|
|
85
|
+
get headers(): IRequestHeader | undefined;
|
|
86
|
+
/**
|
|
87
|
+
* Returns the decoded path parts of the request's url
|
|
88
|
+
*/
|
|
89
|
+
get pathParts(): readonly string[];
|
|
90
|
+
/**
|
|
91
|
+
* Returns true if it's a terminating path, i.e. no more elements after `elements` entries and empty query.
|
|
92
|
+
* @param elements - number of elements in path
|
|
93
|
+
*/
|
|
94
|
+
isLeaf(elements: number): boolean;
|
|
95
|
+
/**
|
|
96
|
+
* Creates a sub request starting at a specific path part of this request's url
|
|
97
|
+
* The sub request url always has a leading slash, and always include query params if original url has any
|
|
98
|
+
* e.g. original url is /a/b/?queryParams, createSubRequest(0) is /a/b/?queryParams
|
|
99
|
+
* createSubRequest(1) is /b/?queryParams
|
|
100
|
+
* createSubRequest(2) is /?queryParams
|
|
101
|
+
* createSubRequest(n) where n is bigger than parts length, e.g. 2, or n is less than 0 will throw an exception
|
|
102
|
+
*
|
|
103
|
+
* note: query params are not counted towards path parts.
|
|
104
|
+
*
|
|
105
|
+
* @param startingPathIndex - The index of the first path part of the sub request
|
|
106
|
+
*/
|
|
107
|
+
createSubRequest(startingPathIndex: number): IRequest;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/* Excluded from this release type: responseToException */
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* @alpha
|
|
114
|
+
*/
|
|
115
|
+
export declare abstract class RuntimeFactoryHelper<T = IContainerRuntime> implements IRuntimeFactory {
|
|
116
|
+
get IRuntimeFactory(): this;
|
|
117
|
+
instantiateRuntime(context: IContainerContext, existing: boolean): Promise<IRuntime>;
|
|
118
|
+
abstract preInitialize(context: IContainerContext, existing: boolean): Promise<IRuntime & T>;
|
|
119
|
+
instantiateFirstTime(_runtime: T): Promise<void>;
|
|
120
|
+
instantiateFromExisting(_runtime: T): Promise<void>;
|
|
121
|
+
hasInitialized(_runtime: T): Promise<void>;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/* Excluded from this release type: seqFromTree */
|
|
125
|
+
|
|
126
|
+
/* Excluded from this release type: SummaryTreeBuilder */
|
|
127
|
+
|
|
128
|
+
/* Excluded from this release type: TelemetryContext */
|
|
129
|
+
|
|
130
|
+
/* Excluded from this release type: unpackChildNodesUsedRoutes */
|
|
131
|
+
|
|
132
|
+
/* Excluded from this release type: utf8ByteLength */
|
|
133
|
+
|
|
134
|
+
export { }
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { IChannelStorageService } from '@fluidframework/datastore-definitions';
|
|
2
|
+
import { IContainerContext } from '@fluidframework/container-definitions';
|
|
3
|
+
import { IContainerRuntime } from '@fluidframework/container-runtime-definitions';
|
|
4
|
+
import { IFluidDataStoreFactory } from '@fluidframework/runtime-definitions';
|
|
5
|
+
import { IFluidDataStoreRegistry } from '@fluidframework/runtime-definitions';
|
|
6
|
+
import { IFluidHandleContext } from '@fluidframework/core-interfaces';
|
|
7
|
+
import { IGarbageCollectionData } from '@fluidframework/runtime-definitions';
|
|
8
|
+
import { IProvideFluidDataStoreRegistry } from '@fluidframework/runtime-definitions';
|
|
9
|
+
import { IRequest } from '@fluidframework/core-interfaces';
|
|
10
|
+
import { IRequestHeader } from '@fluidframework/core-interfaces';
|
|
11
|
+
import { IResponse } from '@fluidframework/core-interfaces';
|
|
12
|
+
import { IRuntime } from '@fluidframework/container-definitions';
|
|
13
|
+
import { IRuntimeFactory } from '@fluidframework/container-definitions';
|
|
14
|
+
import { ISnapshotTree } from '@fluidframework/protocol-definitions';
|
|
15
|
+
import { ISnapshotTreeWithBlobContents } from '@fluidframework/container-definitions';
|
|
16
|
+
import { ISummarizeResult } from '@fluidframework/runtime-definitions';
|
|
17
|
+
import { ISummaryBlob } from '@fluidframework/protocol-definitions';
|
|
18
|
+
import { ISummaryStats } from '@fluidframework/runtime-definitions';
|
|
19
|
+
import { ISummaryTree } from '@fluidframework/protocol-definitions';
|
|
20
|
+
import { ISummaryTreeWithStats } from '@fluidframework/runtime-definitions';
|
|
21
|
+
import { ITelemetryContext } from '@fluidframework/runtime-definitions';
|
|
22
|
+
import { ITree } from '@fluidframework/protocol-definitions';
|
|
23
|
+
import { SummaryObject } from '@fluidframework/protocol-definitions';
|
|
24
|
+
import { SummaryType } from '@fluidframework/protocol-definitions';
|
|
25
|
+
import { TelemetryEventPropertyType } from '@fluidframework/core-interfaces';
|
|
26
|
+
|
|
27
|
+
/* Excluded from this release type: addBlobToSummary */
|
|
28
|
+
|
|
29
|
+
/* Excluded from this release type: addSummarizeResultToSummary */
|
|
30
|
+
|
|
31
|
+
/* Excluded from this release type: addTreeToSummary */
|
|
32
|
+
|
|
33
|
+
/* Excluded from this release type: calculateStats */
|
|
34
|
+
|
|
35
|
+
/* Excluded from this release type: convertSnapshotTreeToSummaryTree */
|
|
36
|
+
|
|
37
|
+
/* Excluded from this release type: convertSummaryTreeToITree */
|
|
38
|
+
|
|
39
|
+
/* Excluded from this release type: convertToSummaryTree */
|
|
40
|
+
|
|
41
|
+
/* Excluded from this release type: convertToSummaryTreeWithStats */
|
|
42
|
+
|
|
43
|
+
/* Excluded from this release type: create404Response */
|
|
44
|
+
|
|
45
|
+
/* Excluded from this release type: createDataStoreFactory */
|
|
46
|
+
|
|
47
|
+
/* Excluded from this release type: createResponseError */
|
|
48
|
+
|
|
49
|
+
/* Excluded from this release type: exceptionToResponse */
|
|
50
|
+
|
|
51
|
+
/* Excluded from this release type: Factory */
|
|
52
|
+
|
|
53
|
+
/* Excluded from this release type: GCDataBuilder */
|
|
54
|
+
|
|
55
|
+
/* Excluded from this release type: generateHandleContextPath */
|
|
56
|
+
|
|
57
|
+
/* Excluded from this release type: getBlobSize */
|
|
58
|
+
|
|
59
|
+
/* Excluded from this release type: getNormalizedObjectStoragePathParts */
|
|
60
|
+
|
|
61
|
+
/* Excluded from this release type: IChannelStorageService */
|
|
62
|
+
|
|
63
|
+
/* Excluded from this release type: IContainerContext */
|
|
64
|
+
|
|
65
|
+
/* Excluded from this release type: IContainerRuntime */
|
|
66
|
+
|
|
67
|
+
/* Excluded from this release type: IFluidDataStoreFactory */
|
|
68
|
+
|
|
69
|
+
/* Excluded from this release type: IFluidDataStoreRegistry */
|
|
70
|
+
|
|
71
|
+
/* Excluded from this release type: IFluidHandleContext */
|
|
72
|
+
|
|
73
|
+
/* Excluded from this release type: IGarbageCollectionData */
|
|
74
|
+
|
|
75
|
+
/* Excluded from this release type: IProvideFluidDataStoreRegistry */
|
|
76
|
+
|
|
77
|
+
/* Excluded from this release type: IRequest */
|
|
78
|
+
|
|
79
|
+
/* Excluded from this release type: IResponse */
|
|
80
|
+
|
|
81
|
+
/* Excluded from this release type: IRuntime */
|
|
82
|
+
|
|
83
|
+
/* Excluded from this release type: IRuntimeFactory */
|
|
84
|
+
|
|
85
|
+
/* Excluded from this release type: ISnapshotTreeWithBlobContents */
|
|
86
|
+
|
|
87
|
+
/* Excluded from this release type: ISummarizeResult */
|
|
88
|
+
|
|
89
|
+
/* Excluded from this release type: ISummaryStats */
|
|
90
|
+
|
|
91
|
+
/* Excluded from this release type: ISummaryTreeWithStats */
|
|
92
|
+
|
|
93
|
+
/* Excluded from this release type: ITelemetryContext */
|
|
94
|
+
|
|
95
|
+
/* Excluded from this release type: listBlobsAtTreePath */
|
|
96
|
+
|
|
97
|
+
/* Excluded from this release type: mergeStats */
|
|
98
|
+
|
|
99
|
+
/* Excluded from this release type: ObjectStoragePartition */
|
|
100
|
+
|
|
101
|
+
/* Excluded from this release type: ReadAndParseBlob */
|
|
102
|
+
|
|
103
|
+
/* Excluded from this release type: RequestParser */
|
|
104
|
+
|
|
105
|
+
/* Excluded from this release type: responseToException */
|
|
106
|
+
|
|
107
|
+
/* Excluded from this release type: RuntimeFactoryHelper */
|
|
108
|
+
|
|
109
|
+
/* Excluded from this release type: seqFromTree */
|
|
110
|
+
|
|
111
|
+
/* Excluded from this release type: SummaryTreeBuilder */
|
|
112
|
+
|
|
113
|
+
/* Excluded from this release type: TelemetryContext */
|
|
114
|
+
|
|
115
|
+
/* Excluded from this release type: TelemetryEventPropertyType */
|
|
116
|
+
|
|
117
|
+
/* Excluded from this release type: unpackChildNodesUsedRoutes */
|
|
118
|
+
|
|
119
|
+
/* Excluded from this release type: utf8ByteLength */
|
|
120
|
+
|
|
121
|
+
export { }
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { IChannelStorageService } from '@fluidframework/datastore-definitions';
|
|
2
|
+
import { IContainerContext } from '@fluidframework/container-definitions';
|
|
3
|
+
import { IContainerRuntime } from '@fluidframework/container-runtime-definitions';
|
|
4
|
+
import { IFluidDataStoreFactory } from '@fluidframework/runtime-definitions';
|
|
5
|
+
import { IFluidDataStoreRegistry } from '@fluidframework/runtime-definitions';
|
|
6
|
+
import { IFluidHandleContext } from '@fluidframework/core-interfaces';
|
|
7
|
+
import { IGarbageCollectionData } from '@fluidframework/runtime-definitions';
|
|
8
|
+
import { IProvideFluidDataStoreRegistry } from '@fluidframework/runtime-definitions';
|
|
9
|
+
import { IRequest } from '@fluidframework/core-interfaces';
|
|
10
|
+
import { IRequestHeader } from '@fluidframework/core-interfaces';
|
|
11
|
+
import { IResponse } from '@fluidframework/core-interfaces';
|
|
12
|
+
import { IRuntime } from '@fluidframework/container-definitions';
|
|
13
|
+
import { IRuntimeFactory } from '@fluidframework/container-definitions';
|
|
14
|
+
import { ISnapshotTree } from '@fluidframework/protocol-definitions';
|
|
15
|
+
import { ISnapshotTreeWithBlobContents } from '@fluidframework/container-definitions';
|
|
16
|
+
import { ISummarizeResult } from '@fluidframework/runtime-definitions';
|
|
17
|
+
import { ISummaryBlob } from '@fluidframework/protocol-definitions';
|
|
18
|
+
import { ISummaryStats } from '@fluidframework/runtime-definitions';
|
|
19
|
+
import { ISummaryTree } from '@fluidframework/protocol-definitions';
|
|
20
|
+
import { ISummaryTreeWithStats } from '@fluidframework/runtime-definitions';
|
|
21
|
+
import { ITelemetryContext } from '@fluidframework/runtime-definitions';
|
|
22
|
+
import { ITree } from '@fluidframework/protocol-definitions';
|
|
23
|
+
import { SummaryObject } from '@fluidframework/protocol-definitions';
|
|
24
|
+
import { SummaryType } from '@fluidframework/protocol-definitions';
|
|
25
|
+
import { TelemetryEventPropertyType } from '@fluidframework/core-interfaces';
|
|
26
|
+
|
|
27
|
+
/* Excluded from this release type: addBlobToSummary */
|
|
28
|
+
|
|
29
|
+
/* Excluded from this release type: addSummarizeResultToSummary */
|
|
30
|
+
|
|
31
|
+
/* Excluded from this release type: addTreeToSummary */
|
|
32
|
+
|
|
33
|
+
/* Excluded from this release type: calculateStats */
|
|
34
|
+
|
|
35
|
+
/* Excluded from this release type: convertSnapshotTreeToSummaryTree */
|
|
36
|
+
|
|
37
|
+
/* Excluded from this release type: convertSummaryTreeToITree */
|
|
38
|
+
|
|
39
|
+
/* Excluded from this release type: convertToSummaryTree */
|
|
40
|
+
|
|
41
|
+
/* Excluded from this release type: convertToSummaryTreeWithStats */
|
|
42
|
+
|
|
43
|
+
/* Excluded from this release type: create404Response */
|
|
44
|
+
|
|
45
|
+
/* Excluded from this release type: createDataStoreFactory */
|
|
46
|
+
|
|
47
|
+
/* Excluded from this release type: createResponseError */
|
|
48
|
+
|
|
49
|
+
/* Excluded from this release type: exceptionToResponse */
|
|
50
|
+
|
|
51
|
+
/* Excluded from this release type: Factory */
|
|
52
|
+
|
|
53
|
+
/* Excluded from this release type: GCDataBuilder */
|
|
54
|
+
|
|
55
|
+
/* Excluded from this release type: generateHandleContextPath */
|
|
56
|
+
|
|
57
|
+
/* Excluded from this release type: getBlobSize */
|
|
58
|
+
|
|
59
|
+
/* Excluded from this release type: getNormalizedObjectStoragePathParts */
|
|
60
|
+
|
|
61
|
+
/* Excluded from this release type: IChannelStorageService */
|
|
62
|
+
|
|
63
|
+
/* Excluded from this release type: IContainerContext */
|
|
64
|
+
|
|
65
|
+
/* Excluded from this release type: IContainerRuntime */
|
|
66
|
+
|
|
67
|
+
/* Excluded from this release type: IFluidDataStoreFactory */
|
|
68
|
+
|
|
69
|
+
/* Excluded from this release type: IFluidDataStoreRegistry */
|
|
70
|
+
|
|
71
|
+
/* Excluded from this release type: IFluidHandleContext */
|
|
72
|
+
|
|
73
|
+
/* Excluded from this release type: IGarbageCollectionData */
|
|
74
|
+
|
|
75
|
+
/* Excluded from this release type: IProvideFluidDataStoreRegistry */
|
|
76
|
+
|
|
77
|
+
/* Excluded from this release type: IRequest */
|
|
78
|
+
|
|
79
|
+
/* Excluded from this release type: IResponse */
|
|
80
|
+
|
|
81
|
+
/* Excluded from this release type: IRuntime */
|
|
82
|
+
|
|
83
|
+
/* Excluded from this release type: IRuntimeFactory */
|
|
84
|
+
|
|
85
|
+
/* Excluded from this release type: ISnapshotTreeWithBlobContents */
|
|
86
|
+
|
|
87
|
+
/* Excluded from this release type: ISummarizeResult */
|
|
88
|
+
|
|
89
|
+
/* Excluded from this release type: ISummaryStats */
|
|
90
|
+
|
|
91
|
+
/* Excluded from this release type: ISummaryTreeWithStats */
|
|
92
|
+
|
|
93
|
+
/* Excluded from this release type: ITelemetryContext */
|
|
94
|
+
|
|
95
|
+
/* Excluded from this release type: listBlobsAtTreePath */
|
|
96
|
+
|
|
97
|
+
/* Excluded from this release type: mergeStats */
|
|
98
|
+
|
|
99
|
+
/* Excluded from this release type: ObjectStoragePartition */
|
|
100
|
+
|
|
101
|
+
/* Excluded from this release type: ReadAndParseBlob */
|
|
102
|
+
|
|
103
|
+
/* Excluded from this release type: RequestParser */
|
|
104
|
+
|
|
105
|
+
/* Excluded from this release type: responseToException */
|
|
106
|
+
|
|
107
|
+
/* Excluded from this release type: RuntimeFactoryHelper */
|
|
108
|
+
|
|
109
|
+
/* Excluded from this release type: seqFromTree */
|
|
110
|
+
|
|
111
|
+
/* Excluded from this release type: SummaryTreeBuilder */
|
|
112
|
+
|
|
113
|
+
/* Excluded from this release type: TelemetryContext */
|
|
114
|
+
|
|
115
|
+
/* Excluded from this release type: TelemetryEventPropertyType */
|
|
116
|
+
|
|
117
|
+
/* Excluded from this release type: unpackChildNodesUsedRoutes */
|
|
118
|
+
|
|
119
|
+
/* Excluded from this release type: utf8ByteLength */
|
|
120
|
+
|
|
121
|
+
export { }
|