@fluidframework/runtime-utils 2.0.0-dev.7.4.0.215930 → 2.0.0-dev.7.4.0.216897
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/api-extractor-lint.json +13 -0
- package/api-extractor.json +0 -4
- package/api-report/runtime-utils.api.md +29 -29
- 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 +19 -0
- package/dist/dataStoreHelpers.d.ts.map +1 -1
- package/dist/dataStoreHelpers.js +16 -0
- package/dist/dataStoreHelpers.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 +82 -195
- package/dist/runtime-utils-beta.d.ts +82 -195
- package/dist/runtime-utils-public.d.ts +82 -195
- package/dist/runtime-utils-untrimmed.d.ts +67 -1
- 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 +29 -0
- 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 +1 -0
- 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 +19 -0
- package/lib/dataStoreHelpers.d.ts.map +1 -1
- package/lib/dataStoreHelpers.js +16 -0
- package/lib/dataStoreHelpers.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 +82 -195
- package/lib/runtime-utils-beta.d.ts +82 -195
- package/lib/runtime-utils-public.d.ts +82 -195
- package/lib/runtime-utils-untrimmed.d.ts +67 -1
- 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 +29 -0
- 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 +1 -0
- 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 +13 -12
- package/src/dataStoreHandleContextUtils.ts +1 -0
- package/src/dataStoreHelpers.ts +19 -0
- 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 +29 -0
- package/src/unpackUsedRoutes.ts +1 -0
- package/src/utils.ts +6 -1
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":"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","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 * @internal\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"]}
|
|
@@ -1,220 +1,107 @@
|
|
|
1
|
-
import { FluidObject } from '@fluidframework/core-interfaces';
|
|
2
|
-
import { IChannelStorageService } from '@fluidframework/datastore-definitions';
|
|
3
|
-
import { IContainerContext } from '@fluidframework/container-definitions';
|
|
4
|
-
import { IContainerRuntime } from '@fluidframework/container-runtime-definitions';
|
|
5
|
-
import { IFluidDataStoreFactory } from '@fluidframework/runtime-definitions';
|
|
6
|
-
import { IFluidDataStoreRegistry } from '@fluidframework/runtime-definitions';
|
|
7
|
-
import { IFluidHandleContext } from '@fluidframework/core-interfaces';
|
|
8
|
-
import { IFluidRouter } from '@fluidframework/core-interfaces';
|
|
9
|
-
import { IGarbageCollectionData } from '@fluidframework/runtime-definitions';
|
|
10
|
-
import { IProvideFluidDataStoreRegistry } from '@fluidframework/runtime-definitions';
|
|
11
|
-
import { IRequest } from '@fluidframework/core-interfaces';
|
|
12
1
|
import { IRequestHeader } from '@fluidframework/core-interfaces';
|
|
13
|
-
import { IResponse } from '@fluidframework/core-interfaces';
|
|
14
|
-
import { IRuntime } from '@fluidframework/container-definitions';
|
|
15
|
-
import { IRuntimeFactory } from '@fluidframework/container-definitions';
|
|
16
2
|
import { ISnapshotTree } from '@fluidframework/protocol-definitions';
|
|
17
|
-
import { ISummarizeResult } from '@fluidframework/runtime-definitions';
|
|
18
3
|
import { ISummaryBlob } from '@fluidframework/protocol-definitions';
|
|
19
|
-
import { ISummaryStats } from '@fluidframework/runtime-definitions';
|
|
20
4
|
import { ISummaryTree } from '@fluidframework/protocol-definitions';
|
|
21
|
-
import { ISummaryTreeWithStats } from '@fluidframework/runtime-definitions';
|
|
22
|
-
import { ITelemetryContext } from '@fluidframework/runtime-definitions';
|
|
23
5
|
import { ITree } from '@fluidframework/protocol-definitions';
|
|
24
6
|
import { SummaryObject } from '@fluidframework/protocol-definitions';
|
|
25
7
|
import { SummaryType } from '@fluidframework/protocol-definitions';
|
|
26
|
-
import { TelemetryEventPropertyType } from '@fluidframework/core-interfaces';
|
|
27
8
|
|
|
28
|
-
|
|
9
|
+
/* Excluded from this release type: addBlobToSummary */
|
|
29
10
|
|
|
30
|
-
|
|
11
|
+
/* Excluded from this release type: addSummarizeResultToSummary */
|
|
31
12
|
|
|
32
|
-
|
|
13
|
+
/* Excluded from this release type: addTreeToSummary */
|
|
33
14
|
|
|
34
|
-
|
|
15
|
+
/* Excluded from this release type: calculateStats */
|
|
35
16
|
|
|
36
|
-
|
|
37
|
-
* Converts ISnapshotTree to ISummaryTree format and tracks stats. This snapshot tree was
|
|
38
|
-
* was taken by serialize api in detached container.
|
|
39
|
-
* @param snapshot - snapshot in ISnapshotTree format
|
|
40
|
-
*/
|
|
41
|
-
export declare function convertSnapshotTreeToSummaryTree(snapshot: ISnapshotTree): ISummaryTreeWithStats;
|
|
17
|
+
/* Excluded from this release type: convertSnapshotTreeToSummaryTree */
|
|
42
18
|
|
|
43
|
-
|
|
44
|
-
* Converts ISummaryTree to ITree format. This is needed for back-compat while we get rid of snapshot.
|
|
45
|
-
* @param summaryTree - summary tree in ISummaryTree format
|
|
46
|
-
*/
|
|
47
|
-
export declare function convertSummaryTreeToITree(summaryTree: ISummaryTree): ITree;
|
|
19
|
+
/* Excluded from this release type: convertSummaryTreeToITree */
|
|
48
20
|
|
|
49
|
-
|
|
50
|
-
* Converts snapshot ITree to ISummaryTree format and tracks stats.
|
|
51
|
-
* @param snapshot - snapshot in ITree format
|
|
52
|
-
* @param fullTree - true to never use handles, even if id is specified
|
|
53
|
-
*/
|
|
54
|
-
export declare function convertToSummaryTree(snapshot: ITree, fullTree?: boolean): ISummarizeResult;
|
|
21
|
+
/* Excluded from this release type: convertToSummaryTree */
|
|
55
22
|
|
|
56
|
-
|
|
57
|
-
* Converts snapshot ITree to ISummaryTree format and tracks stats.
|
|
58
|
-
* @param snapshot - snapshot in ITree format
|
|
59
|
-
* @param fullTree - true to never use handles, even if id is specified
|
|
60
|
-
*/
|
|
61
|
-
export declare function convertToSummaryTreeWithStats(snapshot: ITree, fullTree?: boolean): ISummaryTreeWithStats;
|
|
23
|
+
/* Excluded from this release type: convertToSummaryTreeWithStats */
|
|
62
24
|
|
|
63
|
-
|
|
25
|
+
/* Excluded from this release type: create404Response */
|
|
64
26
|
|
|
65
|
-
|
|
27
|
+
/* Excluded from this release type: createDataStoreFactory */
|
|
66
28
|
|
|
67
|
-
|
|
68
|
-
[key: string]: any;
|
|
69
|
-
}): IResponse;
|
|
29
|
+
/* Excluded from this release type: createResponseError */
|
|
70
30
|
|
|
71
|
-
|
|
31
|
+
/* Excluded from this release type: exceptionToResponse */
|
|
72
32
|
|
|
73
|
-
|
|
33
|
+
/* Excluded from this release type: Factory */
|
|
34
|
+
|
|
35
|
+
/* Excluded from this release type: FluidObject */
|
|
74
36
|
|
|
75
37
|
/* Excluded from this release type: GCDataBuilder */
|
|
76
38
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
*/
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
*/
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
* Creates a sub request starting at a specific path part of this request's url
|
|
145
|
-
* The sub request url always has a leading slash, and always include query params if original url has any
|
|
146
|
-
* e.g. original url is /a/b/?queryParams, createSubRequest(0) is /a/b/?queryParams
|
|
147
|
-
* createSubRequest(1) is /b/?queryParams
|
|
148
|
-
* createSubRequest(2) is /?queryParams
|
|
149
|
-
* createSubRequest(n) where n is bigger than parts length, e.g. 2, or n is less than 0 will throw an exception
|
|
150
|
-
*
|
|
151
|
-
* note: query params are not counted towards path parts.
|
|
152
|
-
*
|
|
153
|
-
* @param startingPathIndex - The index of the first path part of the sub request
|
|
154
|
-
*/
|
|
155
|
-
createSubRequest(startingPathIndex: number): IRequest;
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
export declare function responseToException(response: IResponse, request: IRequest): Error;
|
|
159
|
-
|
|
160
|
-
export declare abstract class RuntimeFactoryHelper<T = IContainerRuntime> implements IRuntimeFactory {
|
|
161
|
-
get IRuntimeFactory(): this;
|
|
162
|
-
instantiateRuntime(context: IContainerContext, existing: boolean): Promise<IRuntime>;
|
|
163
|
-
abstract preInitialize(context: IContainerContext, existing: boolean): Promise<IRuntime & T>;
|
|
164
|
-
instantiateFirstTime(_runtime: T): Promise<void>;
|
|
165
|
-
instantiateFromExisting(_runtime: T): Promise<void>;
|
|
166
|
-
hasInitialized(_runtime: T): Promise<void>;
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
/**
|
|
170
|
-
* Fetches the sequence number of the snapshot tree by examining the protocol.
|
|
171
|
-
* @param tree - snapshot tree to examine
|
|
172
|
-
* @param readAndParseBlob - function to read blob contents from storage
|
|
173
|
-
* and parse the result from JSON.
|
|
174
|
-
*/
|
|
175
|
-
export declare function seqFromTree(tree: ISnapshotTree, readAndParseBlob: ReadAndParseBlob): Promise<number>;
|
|
176
|
-
|
|
177
|
-
export declare class SummaryTreeBuilder implements ISummaryTreeWithStats {
|
|
178
|
-
private attachmentCounter;
|
|
179
|
-
get summary(): ISummaryTree;
|
|
180
|
-
get stats(): Readonly<ISummaryStats>;
|
|
181
|
-
constructor();
|
|
182
|
-
private readonly summaryTree;
|
|
183
|
-
private summaryStats;
|
|
184
|
-
addBlob(key: string, content: string | Uint8Array): void;
|
|
185
|
-
addHandle(key: string, handleType: SummaryType.Tree | SummaryType.Blob | SummaryType.Attachment, handle: string): void;
|
|
186
|
-
addWithStats(key: string, summarizeResult: ISummarizeResult): void;
|
|
187
|
-
addAttachment(id: string): void;
|
|
188
|
-
getSummaryTree(): ISummaryTreeWithStats;
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
export declare class TelemetryContext implements ITelemetryContext {
|
|
192
|
-
private readonly telemetry;
|
|
193
|
-
/**
|
|
194
|
-
* {@inheritDoc @fluidframework/runtime-definitions#ITelemetryContext.set}
|
|
195
|
-
*/
|
|
196
|
-
set(prefix: string, property: string, value: TelemetryEventPropertyType): void;
|
|
197
|
-
/**
|
|
198
|
-
* {@inheritDoc @fluidframework/runtime-definitions#ITelemetryContext.setMultiple}
|
|
199
|
-
*/
|
|
200
|
-
setMultiple(prefix: string, property: string, values: Record<string, TelemetryEventPropertyType>): void;
|
|
201
|
-
/**
|
|
202
|
-
* {@inheritDoc @fluidframework/runtime-definitions#ITelemetryContext.get}
|
|
203
|
-
*/
|
|
204
|
-
get(prefix: string, property: string): TelemetryEventPropertyType;
|
|
205
|
-
/**
|
|
206
|
-
* {@inheritDoc @fluidframework/runtime-definitions#ITelemetryContext.serialize}
|
|
207
|
-
*/
|
|
208
|
-
serialize(): string;
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
/**
|
|
212
|
-
* Helper function that unpacks the used routes of children from a given node's used routes.
|
|
213
|
-
* @param usedRoutes - The used routes of a node.
|
|
214
|
-
* @returns A map of used routes of each children of the the given node.
|
|
215
|
-
*/
|
|
216
|
-
export declare function unpackChildNodesUsedRoutes(usedRoutes: string[]): Map<string, string[]>;
|
|
217
|
-
|
|
218
|
-
export declare function utf8ByteLength(str: string): number;
|
|
39
|
+
/* Excluded from this release type: generateHandleContextPath */
|
|
40
|
+
|
|
41
|
+
/* Excluded from this release type: getBlobSize */
|
|
42
|
+
|
|
43
|
+
/* Excluded from this release type: getNormalizedObjectStoragePathParts */
|
|
44
|
+
|
|
45
|
+
/* Excluded from this release type: IChannelStorageService */
|
|
46
|
+
|
|
47
|
+
/* Excluded from this release type: IContainerContext */
|
|
48
|
+
|
|
49
|
+
/* Excluded from this release type: IContainerRuntime */
|
|
50
|
+
|
|
51
|
+
/* Excluded from this release type: IFluidDataStoreFactory */
|
|
52
|
+
|
|
53
|
+
/* Excluded from this release type: IFluidDataStoreRegistry */
|
|
54
|
+
|
|
55
|
+
/* Excluded from this release type: IFluidHandleContext */
|
|
56
|
+
|
|
57
|
+
/* Excluded from this release type: IFluidRouter */
|
|
58
|
+
|
|
59
|
+
/* Excluded from this release type: IGarbageCollectionData */
|
|
60
|
+
|
|
61
|
+
/* Excluded from this release type: IProvideFluidDataStoreRegistry */
|
|
62
|
+
|
|
63
|
+
/* Excluded from this release type: IRequest */
|
|
64
|
+
|
|
65
|
+
/* Excluded from this release type: IResponse */
|
|
66
|
+
|
|
67
|
+
/* Excluded from this release type: IRuntime */
|
|
68
|
+
|
|
69
|
+
/* Excluded from this release type: IRuntimeFactory */
|
|
70
|
+
|
|
71
|
+
/* Excluded from this release type: ISummarizeResult */
|
|
72
|
+
|
|
73
|
+
/* Excluded from this release type: ISummaryStats */
|
|
74
|
+
|
|
75
|
+
/* Excluded from this release type: ISummaryTreeWithStats */
|
|
76
|
+
|
|
77
|
+
/* Excluded from this release type: ITelemetryContext */
|
|
78
|
+
|
|
79
|
+
/* Excluded from this release type: listBlobsAtTreePath */
|
|
80
|
+
|
|
81
|
+
/* Excluded from this release type: mergeStats */
|
|
82
|
+
|
|
83
|
+
/* Excluded from this release type: ObjectStoragePartition */
|
|
84
|
+
|
|
85
|
+
/* Excluded from this release type: ReadAndParseBlob */
|
|
86
|
+
|
|
87
|
+
/* Excluded from this release type: requestFluidObject */
|
|
88
|
+
|
|
89
|
+
/* Excluded from this release type: RequestParser */
|
|
90
|
+
|
|
91
|
+
/* Excluded from this release type: responseToException */
|
|
92
|
+
|
|
93
|
+
/* Excluded from this release type: RuntimeFactoryHelper */
|
|
94
|
+
|
|
95
|
+
/* Excluded from this release type: seqFromTree */
|
|
96
|
+
|
|
97
|
+
/* Excluded from this release type: SummaryTreeBuilder */
|
|
98
|
+
|
|
99
|
+
/* Excluded from this release type: TelemetryContext */
|
|
100
|
+
|
|
101
|
+
/* Excluded from this release type: TelemetryEventPropertyType */
|
|
102
|
+
|
|
103
|
+
/* Excluded from this release type: unpackChildNodesUsedRoutes */
|
|
104
|
+
|
|
105
|
+
/* Excluded from this release type: utf8ByteLength */
|
|
219
106
|
|
|
220
107
|
export { }
|
|
@@ -1,220 +1,107 @@
|
|
|
1
|
-
import { FluidObject } from '@fluidframework/core-interfaces';
|
|
2
|
-
import { IChannelStorageService } from '@fluidframework/datastore-definitions';
|
|
3
|
-
import { IContainerContext } from '@fluidframework/container-definitions';
|
|
4
|
-
import { IContainerRuntime } from '@fluidframework/container-runtime-definitions';
|
|
5
|
-
import { IFluidDataStoreFactory } from '@fluidframework/runtime-definitions';
|
|
6
|
-
import { IFluidDataStoreRegistry } from '@fluidframework/runtime-definitions';
|
|
7
|
-
import { IFluidHandleContext } from '@fluidframework/core-interfaces';
|
|
8
|
-
import { IFluidRouter } from '@fluidframework/core-interfaces';
|
|
9
|
-
import { IGarbageCollectionData } from '@fluidframework/runtime-definitions';
|
|
10
|
-
import { IProvideFluidDataStoreRegistry } from '@fluidframework/runtime-definitions';
|
|
11
|
-
import { IRequest } from '@fluidframework/core-interfaces';
|
|
12
1
|
import { IRequestHeader } from '@fluidframework/core-interfaces';
|
|
13
|
-
import { IResponse } from '@fluidframework/core-interfaces';
|
|
14
|
-
import { IRuntime } from '@fluidframework/container-definitions';
|
|
15
|
-
import { IRuntimeFactory } from '@fluidframework/container-definitions';
|
|
16
2
|
import { ISnapshotTree } from '@fluidframework/protocol-definitions';
|
|
17
|
-
import { ISummarizeResult } from '@fluidframework/runtime-definitions';
|
|
18
3
|
import { ISummaryBlob } from '@fluidframework/protocol-definitions';
|
|
19
|
-
import { ISummaryStats } from '@fluidframework/runtime-definitions';
|
|
20
4
|
import { ISummaryTree } from '@fluidframework/protocol-definitions';
|
|
21
|
-
import { ISummaryTreeWithStats } from '@fluidframework/runtime-definitions';
|
|
22
|
-
import { ITelemetryContext } from '@fluidframework/runtime-definitions';
|
|
23
5
|
import { ITree } from '@fluidframework/protocol-definitions';
|
|
24
6
|
import { SummaryObject } from '@fluidframework/protocol-definitions';
|
|
25
7
|
import { SummaryType } from '@fluidframework/protocol-definitions';
|
|
26
|
-
import { TelemetryEventPropertyType } from '@fluidframework/core-interfaces';
|
|
27
8
|
|
|
28
|
-
|
|
9
|
+
/* Excluded from this release type: addBlobToSummary */
|
|
29
10
|
|
|
30
|
-
|
|
11
|
+
/* Excluded from this release type: addSummarizeResultToSummary */
|
|
31
12
|
|
|
32
|
-
|
|
13
|
+
/* Excluded from this release type: addTreeToSummary */
|
|
33
14
|
|
|
34
|
-
|
|
15
|
+
/* Excluded from this release type: calculateStats */
|
|
35
16
|
|
|
36
|
-
|
|
37
|
-
* Converts ISnapshotTree to ISummaryTree format and tracks stats. This snapshot tree was
|
|
38
|
-
* was taken by serialize api in detached container.
|
|
39
|
-
* @param snapshot - snapshot in ISnapshotTree format
|
|
40
|
-
*/
|
|
41
|
-
export declare function convertSnapshotTreeToSummaryTree(snapshot: ISnapshotTree): ISummaryTreeWithStats;
|
|
17
|
+
/* Excluded from this release type: convertSnapshotTreeToSummaryTree */
|
|
42
18
|
|
|
43
|
-
|
|
44
|
-
* Converts ISummaryTree to ITree format. This is needed for back-compat while we get rid of snapshot.
|
|
45
|
-
* @param summaryTree - summary tree in ISummaryTree format
|
|
46
|
-
*/
|
|
47
|
-
export declare function convertSummaryTreeToITree(summaryTree: ISummaryTree): ITree;
|
|
19
|
+
/* Excluded from this release type: convertSummaryTreeToITree */
|
|
48
20
|
|
|
49
|
-
|
|
50
|
-
* Converts snapshot ITree to ISummaryTree format and tracks stats.
|
|
51
|
-
* @param snapshot - snapshot in ITree format
|
|
52
|
-
* @param fullTree - true to never use handles, even if id is specified
|
|
53
|
-
*/
|
|
54
|
-
export declare function convertToSummaryTree(snapshot: ITree, fullTree?: boolean): ISummarizeResult;
|
|
21
|
+
/* Excluded from this release type: convertToSummaryTree */
|
|
55
22
|
|
|
56
|
-
|
|
57
|
-
* Converts snapshot ITree to ISummaryTree format and tracks stats.
|
|
58
|
-
* @param snapshot - snapshot in ITree format
|
|
59
|
-
* @param fullTree - true to never use handles, even if id is specified
|
|
60
|
-
*/
|
|
61
|
-
export declare function convertToSummaryTreeWithStats(snapshot: ITree, fullTree?: boolean): ISummaryTreeWithStats;
|
|
23
|
+
/* Excluded from this release type: convertToSummaryTreeWithStats */
|
|
62
24
|
|
|
63
|
-
|
|
25
|
+
/* Excluded from this release type: create404Response */
|
|
64
26
|
|
|
65
|
-
|
|
27
|
+
/* Excluded from this release type: createDataStoreFactory */
|
|
66
28
|
|
|
67
|
-
|
|
68
|
-
[key: string]: any;
|
|
69
|
-
}): IResponse;
|
|
29
|
+
/* Excluded from this release type: createResponseError */
|
|
70
30
|
|
|
71
|
-
|
|
31
|
+
/* Excluded from this release type: exceptionToResponse */
|
|
72
32
|
|
|
73
|
-
|
|
33
|
+
/* Excluded from this release type: Factory */
|
|
34
|
+
|
|
35
|
+
/* Excluded from this release type: FluidObject */
|
|
74
36
|
|
|
75
37
|
/* Excluded from this release type: GCDataBuilder */
|
|
76
38
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
*/
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
*/
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
* Creates a sub request starting at a specific path part of this request's url
|
|
145
|
-
* The sub request url always has a leading slash, and always include query params if original url has any
|
|
146
|
-
* e.g. original url is /a/b/?queryParams, createSubRequest(0) is /a/b/?queryParams
|
|
147
|
-
* createSubRequest(1) is /b/?queryParams
|
|
148
|
-
* createSubRequest(2) is /?queryParams
|
|
149
|
-
* createSubRequest(n) where n is bigger than parts length, e.g. 2, or n is less than 0 will throw an exception
|
|
150
|
-
*
|
|
151
|
-
* note: query params are not counted towards path parts.
|
|
152
|
-
*
|
|
153
|
-
* @param startingPathIndex - The index of the first path part of the sub request
|
|
154
|
-
*/
|
|
155
|
-
createSubRequest(startingPathIndex: number): IRequest;
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
export declare function responseToException(response: IResponse, request: IRequest): Error;
|
|
159
|
-
|
|
160
|
-
export declare abstract class RuntimeFactoryHelper<T = IContainerRuntime> implements IRuntimeFactory {
|
|
161
|
-
get IRuntimeFactory(): this;
|
|
162
|
-
instantiateRuntime(context: IContainerContext, existing: boolean): Promise<IRuntime>;
|
|
163
|
-
abstract preInitialize(context: IContainerContext, existing: boolean): Promise<IRuntime & T>;
|
|
164
|
-
instantiateFirstTime(_runtime: T): Promise<void>;
|
|
165
|
-
instantiateFromExisting(_runtime: T): Promise<void>;
|
|
166
|
-
hasInitialized(_runtime: T): Promise<void>;
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
/**
|
|
170
|
-
* Fetches the sequence number of the snapshot tree by examining the protocol.
|
|
171
|
-
* @param tree - snapshot tree to examine
|
|
172
|
-
* @param readAndParseBlob - function to read blob contents from storage
|
|
173
|
-
* and parse the result from JSON.
|
|
174
|
-
*/
|
|
175
|
-
export declare function seqFromTree(tree: ISnapshotTree, readAndParseBlob: ReadAndParseBlob): Promise<number>;
|
|
176
|
-
|
|
177
|
-
export declare class SummaryTreeBuilder implements ISummaryTreeWithStats {
|
|
178
|
-
private attachmentCounter;
|
|
179
|
-
get summary(): ISummaryTree;
|
|
180
|
-
get stats(): Readonly<ISummaryStats>;
|
|
181
|
-
constructor();
|
|
182
|
-
private readonly summaryTree;
|
|
183
|
-
private summaryStats;
|
|
184
|
-
addBlob(key: string, content: string | Uint8Array): void;
|
|
185
|
-
addHandle(key: string, handleType: SummaryType.Tree | SummaryType.Blob | SummaryType.Attachment, handle: string): void;
|
|
186
|
-
addWithStats(key: string, summarizeResult: ISummarizeResult): void;
|
|
187
|
-
addAttachment(id: string): void;
|
|
188
|
-
getSummaryTree(): ISummaryTreeWithStats;
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
export declare class TelemetryContext implements ITelemetryContext {
|
|
192
|
-
private readonly telemetry;
|
|
193
|
-
/**
|
|
194
|
-
* {@inheritDoc @fluidframework/runtime-definitions#ITelemetryContext.set}
|
|
195
|
-
*/
|
|
196
|
-
set(prefix: string, property: string, value: TelemetryEventPropertyType): void;
|
|
197
|
-
/**
|
|
198
|
-
* {@inheritDoc @fluidframework/runtime-definitions#ITelemetryContext.setMultiple}
|
|
199
|
-
*/
|
|
200
|
-
setMultiple(prefix: string, property: string, values: Record<string, TelemetryEventPropertyType>): void;
|
|
201
|
-
/**
|
|
202
|
-
* {@inheritDoc @fluidframework/runtime-definitions#ITelemetryContext.get}
|
|
203
|
-
*/
|
|
204
|
-
get(prefix: string, property: string): TelemetryEventPropertyType;
|
|
205
|
-
/**
|
|
206
|
-
* {@inheritDoc @fluidframework/runtime-definitions#ITelemetryContext.serialize}
|
|
207
|
-
*/
|
|
208
|
-
serialize(): string;
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
/**
|
|
212
|
-
* Helper function that unpacks the used routes of children from a given node's used routes.
|
|
213
|
-
* @param usedRoutes - The used routes of a node.
|
|
214
|
-
* @returns A map of used routes of each children of the the given node.
|
|
215
|
-
*/
|
|
216
|
-
export declare function unpackChildNodesUsedRoutes(usedRoutes: string[]): Map<string, string[]>;
|
|
217
|
-
|
|
218
|
-
export declare function utf8ByteLength(str: string): number;
|
|
39
|
+
/* Excluded from this release type: generateHandleContextPath */
|
|
40
|
+
|
|
41
|
+
/* Excluded from this release type: getBlobSize */
|
|
42
|
+
|
|
43
|
+
/* Excluded from this release type: getNormalizedObjectStoragePathParts */
|
|
44
|
+
|
|
45
|
+
/* Excluded from this release type: IChannelStorageService */
|
|
46
|
+
|
|
47
|
+
/* Excluded from this release type: IContainerContext */
|
|
48
|
+
|
|
49
|
+
/* Excluded from this release type: IContainerRuntime */
|
|
50
|
+
|
|
51
|
+
/* Excluded from this release type: IFluidDataStoreFactory */
|
|
52
|
+
|
|
53
|
+
/* Excluded from this release type: IFluidDataStoreRegistry */
|
|
54
|
+
|
|
55
|
+
/* Excluded from this release type: IFluidHandleContext */
|
|
56
|
+
|
|
57
|
+
/* Excluded from this release type: IFluidRouter */
|
|
58
|
+
|
|
59
|
+
/* Excluded from this release type: IGarbageCollectionData */
|
|
60
|
+
|
|
61
|
+
/* Excluded from this release type: IProvideFluidDataStoreRegistry */
|
|
62
|
+
|
|
63
|
+
/* Excluded from this release type: IRequest */
|
|
64
|
+
|
|
65
|
+
/* Excluded from this release type: IResponse */
|
|
66
|
+
|
|
67
|
+
/* Excluded from this release type: IRuntime */
|
|
68
|
+
|
|
69
|
+
/* Excluded from this release type: IRuntimeFactory */
|
|
70
|
+
|
|
71
|
+
/* Excluded from this release type: ISummarizeResult */
|
|
72
|
+
|
|
73
|
+
/* Excluded from this release type: ISummaryStats */
|
|
74
|
+
|
|
75
|
+
/* Excluded from this release type: ISummaryTreeWithStats */
|
|
76
|
+
|
|
77
|
+
/* Excluded from this release type: ITelemetryContext */
|
|
78
|
+
|
|
79
|
+
/* Excluded from this release type: listBlobsAtTreePath */
|
|
80
|
+
|
|
81
|
+
/* Excluded from this release type: mergeStats */
|
|
82
|
+
|
|
83
|
+
/* Excluded from this release type: ObjectStoragePartition */
|
|
84
|
+
|
|
85
|
+
/* Excluded from this release type: ReadAndParseBlob */
|
|
86
|
+
|
|
87
|
+
/* Excluded from this release type: requestFluidObject */
|
|
88
|
+
|
|
89
|
+
/* Excluded from this release type: RequestParser */
|
|
90
|
+
|
|
91
|
+
/* Excluded from this release type: responseToException */
|
|
92
|
+
|
|
93
|
+
/* Excluded from this release type: RuntimeFactoryHelper */
|
|
94
|
+
|
|
95
|
+
/* Excluded from this release type: seqFromTree */
|
|
96
|
+
|
|
97
|
+
/* Excluded from this release type: SummaryTreeBuilder */
|
|
98
|
+
|
|
99
|
+
/* Excluded from this release type: TelemetryContext */
|
|
100
|
+
|
|
101
|
+
/* Excluded from this release type: TelemetryEventPropertyType */
|
|
102
|
+
|
|
103
|
+
/* Excluded from this release type: unpackChildNodesUsedRoutes */
|
|
104
|
+
|
|
105
|
+
/* Excluded from this release type: utf8ByteLength */
|
|
219
106
|
|
|
220
107
|
export { }
|