@fluidframework/runtime-utils 2.0.0-internal.7.3.0 → 2.0.0-internal.7.4.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.
Files changed (94) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/api-extractor-lint.json +13 -0
  3. package/api-extractor.json +3 -3
  4. package/api-report/runtime-utils.api.md +30 -30
  5. package/dist/dataStoreHandleContextUtils.d.ts +1 -0
  6. package/dist/dataStoreHandleContextUtils.d.ts.map +1 -1
  7. package/dist/dataStoreHandleContextUtils.js +1 -0
  8. package/dist/dataStoreHandleContextUtils.js.map +1 -1
  9. package/dist/dataStoreHelpers.d.ts +19 -0
  10. package/dist/dataStoreHelpers.d.ts.map +1 -1
  11. package/dist/dataStoreHelpers.js +16 -0
  12. package/dist/dataStoreHelpers.js.map +1 -1
  13. package/dist/objectstoragepartition.d.ts +1 -0
  14. package/dist/objectstoragepartition.d.ts.map +1 -1
  15. package/dist/objectstoragepartition.js +1 -0
  16. package/dist/objectstoragepartition.js.map +1 -1
  17. package/dist/objectstorageutils.d.ts +6 -0
  18. package/dist/objectstorageutils.d.ts.map +1 -1
  19. package/dist/objectstorageutils.js +6 -0
  20. package/dist/objectstorageutils.js.map +1 -1
  21. package/dist/requestParser.d.ts +1 -0
  22. package/dist/requestParser.d.ts.map +1 -1
  23. package/dist/requestParser.js +1 -0
  24. package/dist/requestParser.js.map +1 -1
  25. package/dist/runtime-utils-alpha.d.ts +137 -0
  26. package/dist/runtime-utils-beta.d.ts +126 -0
  27. package/dist/runtime-utils-public.d.ts +126 -0
  28. package/dist/runtime-utils-untrimmed.d.ts +313 -0
  29. package/dist/runtimeFactoryHelper.d.ts +3 -0
  30. package/dist/runtimeFactoryHelper.d.ts.map +1 -1
  31. package/dist/runtimeFactoryHelper.js +3 -0
  32. package/dist/runtimeFactoryHelper.js.map +1 -1
  33. package/dist/summaryUtils.d.ts +29 -0
  34. package/dist/summaryUtils.d.ts.map +1 -1
  35. package/dist/summaryUtils.js +29 -0
  36. package/dist/summaryUtils.js.map +1 -1
  37. package/dist/unpackUsedRoutes.d.ts +2 -1
  38. package/dist/unpackUsedRoutes.d.ts.map +1 -1
  39. package/dist/unpackUsedRoutes.js +1 -0
  40. package/dist/unpackUsedRoutes.js.map +1 -1
  41. package/dist/utils.d.ts +6 -1
  42. package/dist/utils.d.ts.map +1 -1
  43. package/dist/utils.js +1 -0
  44. package/dist/utils.js.map +1 -1
  45. package/lib/dataStoreHandleContextUtils.d.ts +1 -0
  46. package/lib/dataStoreHandleContextUtils.d.ts.map +1 -1
  47. package/lib/dataStoreHandleContextUtils.js +1 -0
  48. package/lib/dataStoreHandleContextUtils.js.map +1 -1
  49. package/lib/dataStoreHelpers.d.ts +19 -0
  50. package/lib/dataStoreHelpers.d.ts.map +1 -1
  51. package/lib/dataStoreHelpers.js +16 -0
  52. package/lib/dataStoreHelpers.js.map +1 -1
  53. package/lib/objectstoragepartition.d.ts +1 -0
  54. package/lib/objectstoragepartition.d.ts.map +1 -1
  55. package/lib/objectstoragepartition.js +1 -0
  56. package/lib/objectstoragepartition.js.map +1 -1
  57. package/lib/objectstorageutils.d.ts +6 -0
  58. package/lib/objectstorageutils.d.ts.map +1 -1
  59. package/lib/objectstorageutils.js +6 -0
  60. package/lib/objectstorageutils.js.map +1 -1
  61. package/lib/requestParser.d.ts +1 -0
  62. package/lib/requestParser.d.ts.map +1 -1
  63. package/lib/requestParser.js +1 -0
  64. package/lib/requestParser.js.map +1 -1
  65. package/lib/runtime-utils-alpha.d.ts +137 -0
  66. package/lib/runtime-utils-beta.d.ts +126 -0
  67. package/lib/runtime-utils-public.d.ts +126 -0
  68. package/lib/runtime-utils-untrimmed.d.ts +313 -0
  69. package/lib/runtimeFactoryHelper.d.ts +3 -0
  70. package/lib/runtimeFactoryHelper.d.ts.map +1 -1
  71. package/lib/runtimeFactoryHelper.js +3 -0
  72. package/lib/runtimeFactoryHelper.js.map +1 -1
  73. package/lib/summaryUtils.d.ts +29 -0
  74. package/lib/summaryUtils.d.ts.map +1 -1
  75. package/lib/summaryUtils.js +29 -0
  76. package/lib/summaryUtils.js.map +1 -1
  77. package/lib/unpackUsedRoutes.d.ts +2 -1
  78. package/lib/unpackUsedRoutes.d.ts.map +1 -1
  79. package/lib/unpackUsedRoutes.js +1 -0
  80. package/lib/unpackUsedRoutes.js.map +1 -1
  81. package/lib/utils.d.ts +6 -1
  82. package/lib/utils.d.ts.map +1 -1
  83. package/lib/utils.js +1 -0
  84. package/lib/utils.js.map +1 -1
  85. package/package.json +35 -16
  86. package/src/dataStoreHandleContextUtils.ts +1 -0
  87. package/src/dataStoreHelpers.ts +19 -0
  88. package/src/objectstoragepartition.ts +1 -0
  89. package/src/objectstorageutils.ts +6 -0
  90. package/src/requestParser.ts +1 -0
  91. package/src/runtimeFactoryHelper.ts +3 -0
  92. package/src/summaryUtils.ts +29 -0
  93. package/src/unpackUsedRoutes.ts +2 -1
  94. package/src/utils.ts +6 -1
@@ -0,0 +1,313 @@
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
+ 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
+ import { ISnapshotTree } from '@fluidframework/protocol-definitions';
17
+ import { ISummarizeResult } from '@fluidframework/runtime-definitions';
18
+ import { ISummaryBlob } from '@fluidframework/protocol-definitions';
19
+ import { ISummaryStats } from '@fluidframework/runtime-definitions';
20
+ import { ISummaryTree } from '@fluidframework/protocol-definitions';
21
+ import { ISummaryTreeWithStats } from '@fluidframework/runtime-definitions';
22
+ import { ITelemetryContext } from '@fluidframework/runtime-definitions';
23
+ import { ITree } from '@fluidframework/protocol-definitions';
24
+ import { SummaryObject } from '@fluidframework/protocol-definitions';
25
+ import { SummaryType } from '@fluidframework/protocol-definitions';
26
+ import { TelemetryEventPropertyType } from '@fluidframework/core-interfaces';
27
+
28
+ /**
29
+ * @internal
30
+ */
31
+ export declare function addBlobToSummary(summary: ISummaryTreeWithStats, key: string, content: string | Uint8Array): void;
32
+
33
+ /**
34
+ * @internal
35
+ */
36
+ export declare function addSummarizeResultToSummary(summary: ISummaryTreeWithStats, key: string, summarizeResult: ISummarizeResult): void;
37
+
38
+ /**
39
+ * @internal
40
+ */
41
+ export declare function addTreeToSummary(summary: ISummaryTreeWithStats, key: string, summarizeResult: ISummarizeResult): void;
42
+
43
+ /**
44
+ * @internal
45
+ */
46
+ export declare function calculateStats(summary: SummaryObject): ISummaryStats;
47
+
48
+ /**
49
+ * Converts ISnapshotTree to ISummaryTree format and tracks stats. This snapshot tree was
50
+ * was taken by serialize api in detached container.
51
+ * @param snapshot - snapshot in ISnapshotTree format
52
+ * @internal
53
+ */
54
+ export declare function convertSnapshotTreeToSummaryTree(snapshot: ISnapshotTree): ISummaryTreeWithStats;
55
+
56
+ /**
57
+ * Converts ISummaryTree to ITree format. This is needed for back-compat while we get rid of snapshot.
58
+ * @param summaryTree - summary tree in ISummaryTree format
59
+ * @internal
60
+ */
61
+ export declare function convertSummaryTreeToITree(summaryTree: ISummaryTree): ITree;
62
+
63
+ /**
64
+ * Converts snapshot ITree to ISummaryTree format and tracks stats.
65
+ * @param snapshot - snapshot in ITree format
66
+ * @param fullTree - true to never use handles, even if id is specified
67
+ * @internal
68
+ */
69
+ export declare function convertToSummaryTree(snapshot: ITree, fullTree?: boolean): ISummarizeResult;
70
+
71
+ /**
72
+ * Converts snapshot ITree to ISummaryTree format and tracks stats.
73
+ * @param snapshot - snapshot in ITree format
74
+ * @param fullTree - true to never use handles, even if id is specified
75
+ * @internal
76
+ */
77
+ export declare function convertToSummaryTreeWithStats(snapshot: ITree, fullTree?: boolean): ISummaryTreeWithStats;
78
+
79
+ /**
80
+ * @internal
81
+ */
82
+ export declare const create404Response: (request: IRequest) => IResponse;
83
+
84
+ /**
85
+ * @internal
86
+ */
87
+ export declare function createDataStoreFactory(type: string, factory: Factory | Promise<Factory>): IFluidDataStoreFactory & IFluidDataStoreRegistry;
88
+
89
+ /**
90
+ * @internal
91
+ */
92
+ export declare function createResponseError(status: number, value: string, request: IRequest, headers?: {
93
+ [key: string]: any;
94
+ }): IResponse;
95
+
96
+ /**
97
+ * @internal
98
+ */
99
+ export declare function exceptionToResponse(err: any): IResponse;
100
+
101
+ /**
102
+ * @internal
103
+ */
104
+ export declare type Factory = IFluidDataStoreFactory & Partial<IProvideFluidDataStoreRegistry>;
105
+
106
+ /**
107
+ * Helper class to build the garbage collection data of a node by combining the data from multiple nodes.
108
+ * @internal
109
+ */
110
+ export declare class GCDataBuilder implements IGarbageCollectionData {
111
+ private readonly gcNodesSet;
112
+ get gcNodes(): {
113
+ [id: string]: string[];
114
+ };
115
+ addNode(id: string, outboundRoutes: string[]): void;
116
+ /**
117
+ * Adds the given GC nodes. It does the following:
118
+ * - Normalizes the ids of the given nodes.
119
+ * - Prefixes the given `prefixId` to the given nodes' ids.
120
+ * - Adds the outbound routes of the nodes against the normalized and prefixed id.
121
+ */
122
+ prefixAndAddNodes(prefixId: string, gcNodes: {
123
+ [id: string]: string[];
124
+ }): void;
125
+ addNodes(gcNodes: {
126
+ [id: string]: string[];
127
+ }): void;
128
+ /**
129
+ * Adds the given outbound route to the outbound routes of all GC nodes.
130
+ */
131
+ addRouteToAllNodes(outboundRoute: string): void;
132
+ getGCData(): IGarbageCollectionData;
133
+ }
134
+
135
+ /**
136
+ * Generates the absolute path for a Fluid object given its path and its parent routeContext.
137
+ * @param path - The path to the Fluid object relative to the route context.
138
+ * @param routeContext - The route context that contains the Fluid object.
139
+ * @returns The absolute path to the Fluid object from the root of the Container.
140
+ * @internal
141
+ */
142
+ export declare function generateHandleContextPath(path: string, routeContext?: IFluidHandleContext): string;
143
+
144
+ /**
145
+ * @internal
146
+ */
147
+ export declare function getBlobSize(content: ISummaryBlob["content"]): number;
148
+
149
+ /**
150
+ * @internal
151
+ */
152
+ export declare function getNormalizedObjectStoragePathParts(path: string): string[];
153
+
154
+ /**
155
+ * @internal
156
+ */
157
+ export declare function listBlobsAtTreePath(inputTree: ITree | undefined, path: string): Promise<string[]>;
158
+
159
+ /**
160
+ * Combines summary stats by adding their totals together.
161
+ * Returns empty stats if called without args.
162
+ * @param stats - stats to merge
163
+ * @internal
164
+ */
165
+ export declare function mergeStats(...stats: ISummaryStats[]): ISummaryStats;
166
+
167
+ /**
168
+ * Returns a new IChannelStorageService that resolves the given `path` as root.
169
+ * @internal
170
+ */
171
+ export declare class ObjectStoragePartition implements IChannelStorageService {
172
+ private readonly storage;
173
+ private readonly path;
174
+ constructor(storage: IChannelStorageService, path: string);
175
+ readBlob(path: string): Promise<ArrayBufferLike>;
176
+ contains(path: string): Promise<boolean>;
177
+ list(path: string): Promise<string[]>;
178
+ }
179
+
180
+ /**
181
+ * Reads a blob from storage and parses it from JSON.
182
+ *
183
+ * @internal
184
+ */
185
+ export declare type ReadAndParseBlob = <T>(id: string) => Promise<T>;
186
+
187
+ /**
188
+ * @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
189
+ * @internal
190
+ */
191
+ export declare function requestFluidObject<T = FluidObject>(router: IFluidRouter, url: string | IRequest): Promise<T>;
192
+
193
+ /**
194
+ * The Request Parser takes an IRequest provides parsing and sub request creation
195
+ * @alpha
196
+ */
197
+ export declare class RequestParser implements IRequest {
198
+ private readonly request;
199
+ /**
200
+ * Splits the path of the url and decodes each path part
201
+ * @param url - the url to get path parts of
202
+ */
203
+ static getPathParts(url: string): readonly string[];
204
+ private requestPathParts;
205
+ readonly query: string;
206
+ static create(request: Readonly<IRequest>): RequestParser;
207
+ protected constructor(request: Readonly<IRequest>);
208
+ get url(): string;
209
+ get headers(): IRequestHeader | undefined;
210
+ /**
211
+ * Returns the decoded path parts of the request's url
212
+ */
213
+ get pathParts(): readonly string[];
214
+ /**
215
+ * Returns true if it's a terminating path, i.e. no more elements after `elements` entries and empty query.
216
+ * @param elements - number of elements in path
217
+ */
218
+ isLeaf(elements: number): boolean;
219
+ /**
220
+ * Creates a sub request starting at a specific path part of this request's url
221
+ * The sub request url always has a leading slash, and always include query params if original url has any
222
+ * e.g. original url is /a/b/?queryParams, createSubRequest(0) is /a/b/?queryParams
223
+ * createSubRequest(1) is /b/?queryParams
224
+ * createSubRequest(2) is /?queryParams
225
+ * createSubRequest(n) where n is bigger than parts length, e.g. 2, or n is less than 0 will throw an exception
226
+ *
227
+ * note: query params are not counted towards path parts.
228
+ *
229
+ * @param startingPathIndex - The index of the first path part of the sub request
230
+ */
231
+ createSubRequest(startingPathIndex: number): IRequest;
232
+ }
233
+
234
+ /**
235
+ * @internal
236
+ */
237
+ export declare function responseToException(response: IResponse, request: IRequest): Error;
238
+
239
+ /**
240
+ * @alpha
241
+ */
242
+ export declare abstract class RuntimeFactoryHelper<T = IContainerRuntime> implements IRuntimeFactory {
243
+ get IRuntimeFactory(): this;
244
+ instantiateRuntime(context: IContainerContext, existing: boolean): Promise<IRuntime>;
245
+ abstract preInitialize(context: IContainerContext, existing: boolean): Promise<IRuntime & T>;
246
+ instantiateFirstTime(_runtime: T): Promise<void>;
247
+ instantiateFromExisting(_runtime: T): Promise<void>;
248
+ hasInitialized(_runtime: T): Promise<void>;
249
+ }
250
+
251
+ /**
252
+ * Fetches the sequence number of the snapshot tree by examining the protocol.
253
+ * @param tree - snapshot tree to examine
254
+ * @param readAndParseBlob - function to read blob contents from storage
255
+ * and parse the result from JSON.
256
+ * @internal
257
+ */
258
+ export declare function seqFromTree(tree: ISnapshotTree, readAndParseBlob: ReadAndParseBlob): Promise<number>;
259
+
260
+ /**
261
+ * @internal
262
+ */
263
+ export declare class SummaryTreeBuilder implements ISummaryTreeWithStats {
264
+ private attachmentCounter;
265
+ get summary(): ISummaryTree;
266
+ get stats(): Readonly<ISummaryStats>;
267
+ constructor();
268
+ private readonly summaryTree;
269
+ private summaryStats;
270
+ addBlob(key: string, content: string | Uint8Array): void;
271
+ addHandle(key: string, handleType: SummaryType.Tree | SummaryType.Blob | SummaryType.Attachment, handle: string): void;
272
+ addWithStats(key: string, summarizeResult: ISummarizeResult): void;
273
+ addAttachment(id: string): void;
274
+ getSummaryTree(): ISummaryTreeWithStats;
275
+ }
276
+
277
+ /**
278
+ * @internal
279
+ */
280
+ export declare class TelemetryContext implements ITelemetryContext {
281
+ private readonly telemetry;
282
+ /**
283
+ * {@inheritDoc @fluidframework/runtime-definitions#ITelemetryContext.set}
284
+ */
285
+ set(prefix: string, property: string, value: TelemetryEventPropertyType): void;
286
+ /**
287
+ * {@inheritDoc @fluidframework/runtime-definitions#ITelemetryContext.setMultiple}
288
+ */
289
+ setMultiple(prefix: string, property: string, values: Record<string, TelemetryEventPropertyType>): void;
290
+ /**
291
+ * {@inheritDoc @fluidframework/runtime-definitions#ITelemetryContext.get}
292
+ */
293
+ get(prefix: string, property: string): TelemetryEventPropertyType;
294
+ /**
295
+ * {@inheritDoc @fluidframework/runtime-definitions#ITelemetryContext.serialize}
296
+ */
297
+ serialize(): string;
298
+ }
299
+
300
+ /**
301
+ * Helper function that unpacks the used routes of children from a given node's used routes.
302
+ * @param usedRoutes - The used routes of a node.
303
+ * @returns A map of used routes of each children of the the given node.
304
+ * @internal
305
+ */
306
+ export declare function unpackChildNodesUsedRoutes(usedRoutes: readonly string[]): Map<string, string[]>;
307
+
308
+ /**
309
+ * @internal
310
+ */
311
+ export declare function utf8ByteLength(str: string): number;
312
+
313
+ export { }
@@ -4,6 +4,9 @@
4
4
  */
5
5
  import { IContainerContext, IRuntime, IRuntimeFactory } from "@fluidframework/container-definitions";
6
6
  import { IContainerRuntime } from "@fluidframework/container-runtime-definitions";
7
+ /**
8
+ * @alpha
9
+ */
7
10
  export declare abstract class RuntimeFactoryHelper<T = IContainerRuntime> implements IRuntimeFactory {
8
11
  get IRuntimeFactory(): this;
9
12
  instantiateRuntime(context: IContainerContext, existing: boolean): Promise<IRuntime>;
@@ -1 +1 @@
1
- {"version":3,"file":"runtimeFactoryHelper.d.ts","sourceRoot":"","sources":["../src/runtimeFactoryHelper.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,iBAAiB,EACjB,QAAQ,EACR,eAAe,EACf,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;AAElF,8BAAsB,oBAAoB,CAAC,CAAC,GAAG,iBAAiB,CAAE,YAAW,eAAe;IAC3F,IAAW,eAAe,SAEzB;IAEY,kBAAkB,CAC9B,OAAO,EAAE,iBAAiB,EAC1B,QAAQ,EAAE,OAAO,GACf,OAAO,CAAC,QAAQ,CAAC;aASJ,aAAa,CAC5B,OAAO,EAAE,iBAAiB,EAC1B,QAAQ,EAAE,OAAO,GACf,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;IACX,oBAAoB,CAAC,QAAQ,EAAE,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAChD,uBAAuB,CAAC,QAAQ,EAAE,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IACnD,cAAc,CAAC,QAAQ,EAAE,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;CACvD"}
1
+ {"version":3,"file":"runtimeFactoryHelper.d.ts","sourceRoot":"","sources":["../src/runtimeFactoryHelper.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,iBAAiB,EACjB,QAAQ,EACR,eAAe,EACf,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;AAElF;;GAEG;AACH,8BAAsB,oBAAoB,CAAC,CAAC,GAAG,iBAAiB,CAAE,YAAW,eAAe;IAC3F,IAAW,eAAe,SAEzB;IAEY,kBAAkB,CAC9B,OAAO,EAAE,iBAAiB,EAC1B,QAAQ,EAAE,OAAO,GACf,OAAO,CAAC,QAAQ,CAAC;aASJ,aAAa,CAC5B,OAAO,EAAE,iBAAiB,EAC1B,QAAQ,EAAE,OAAO,GACf,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;IACX,oBAAoB,CAAC,QAAQ,EAAE,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAChD,uBAAuB,CAAC,QAAQ,EAAE,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IACnD,cAAc,CAAC,QAAQ,EAAE,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;CACvD"}
@@ -5,6 +5,9 @@
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
7
  exports.RuntimeFactoryHelper = void 0;
8
+ /**
9
+ * @alpha
10
+ */
8
11
  class RuntimeFactoryHelper {
9
12
  get IRuntimeFactory() {
10
13
  return this;
@@ -1 +1 @@
1
- {"version":3,"file":"runtimeFactoryHelper.js","sourceRoot":"","sources":["../src/runtimeFactoryHelper.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AASH,MAAsB,oBAAoB;IACzC,IAAW,eAAe;QACzB,OAAO,IAAI,CAAC;IACb,CAAC;IAEM,KAAK,CAAC,kBAAkB,CAC9B,OAA0B,EAC1B,QAAiB;QAEjB,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;QAC5D,MAAM,CAAC,QAAQ;YACd,CAAC,CAAC,IAAI,CAAC,uBAAuB,CAAC,OAAO,CAAC;YACvC,CAAC,CAAC,IAAI,CAAC,oBAAoB,CAAC,OAAO,CAAC,CAAC,CAAC;QACvC,MAAM,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;QACnC,OAAO,OAAO,CAAC;IAChB,CAAC;IAMM,KAAK,CAAC,oBAAoB,CAAC,QAAW,IAAkB,CAAC;IACzD,KAAK,CAAC,uBAAuB,CAAC,QAAW,IAAkB,CAAC;IAC5D,KAAK,CAAC,cAAc,CAAC,QAAW,IAAkB,CAAC;CAC1D;AAxBD,oDAwBC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport {\n\tIContainerContext,\n\tIRuntime,\n\tIRuntimeFactory,\n} from \"@fluidframework/container-definitions\";\nimport { IContainerRuntime } from \"@fluidframework/container-runtime-definitions\";\n\nexport abstract class RuntimeFactoryHelper<T = IContainerRuntime> implements IRuntimeFactory {\n\tpublic get IRuntimeFactory() {\n\t\treturn this;\n\t}\n\n\tpublic async instantiateRuntime(\n\t\tcontext: IContainerContext,\n\t\texisting: boolean,\n\t): Promise<IRuntime> {\n\t\tconst runtime = await this.preInitialize(context, existing);\n\t\tawait (existing\n\t\t\t? this.instantiateFromExisting(runtime)\n\t\t\t: this.instantiateFirstTime(runtime));\n\t\tawait this.hasInitialized(runtime);\n\t\treturn runtime;\n\t}\n\n\tpublic abstract preInitialize(\n\t\tcontext: IContainerContext,\n\t\texisting: boolean,\n\t): Promise<IRuntime & T>;\n\tpublic async instantiateFirstTime(_runtime: T): Promise<void> {}\n\tpublic async instantiateFromExisting(_runtime: T): Promise<void> {}\n\tpublic async hasInitialized(_runtime: T): Promise<void> {}\n}\n"]}
1
+ {"version":3,"file":"runtimeFactoryHelper.js","sourceRoot":"","sources":["../src/runtimeFactoryHelper.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AASH;;GAEG;AACH,MAAsB,oBAAoB;IACzC,IAAW,eAAe;QACzB,OAAO,IAAI,CAAC;IACb,CAAC;IAEM,KAAK,CAAC,kBAAkB,CAC9B,OAA0B,EAC1B,QAAiB;QAEjB,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;QAC5D,MAAM,CAAC,QAAQ;YACd,CAAC,CAAC,IAAI,CAAC,uBAAuB,CAAC,OAAO,CAAC;YACvC,CAAC,CAAC,IAAI,CAAC,oBAAoB,CAAC,OAAO,CAAC,CAAC,CAAC;QACvC,MAAM,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;QACnC,OAAO,OAAO,CAAC;IAChB,CAAC;IAMM,KAAK,CAAC,oBAAoB,CAAC,QAAW,IAAkB,CAAC;IACzD,KAAK,CAAC,uBAAuB,CAAC,QAAW,IAAkB,CAAC;IAC5D,KAAK,CAAC,cAAc,CAAC,QAAW,IAAkB,CAAC;CAC1D;AAxBD,oDAwBC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport {\n\tIContainerContext,\n\tIRuntime,\n\tIRuntimeFactory,\n} from \"@fluidframework/container-definitions\";\nimport { IContainerRuntime } from \"@fluidframework/container-runtime-definitions\";\n\n/**\n * @alpha\n */\nexport abstract class RuntimeFactoryHelper<T = IContainerRuntime> implements IRuntimeFactory {\n\tpublic get IRuntimeFactory() {\n\t\treturn this;\n\t}\n\n\tpublic async instantiateRuntime(\n\t\tcontext: IContainerContext,\n\t\texisting: boolean,\n\t): Promise<IRuntime> {\n\t\tconst runtime = await this.preInitialize(context, existing);\n\t\tawait (existing\n\t\t\t? this.instantiateFromExisting(runtime)\n\t\t\t: this.instantiateFirstTime(runtime));\n\t\tawait this.hasInitialized(runtime);\n\t\treturn runtime;\n\t}\n\n\tpublic abstract preInitialize(\n\t\tcontext: IContainerContext,\n\t\texisting: boolean,\n\t): Promise<IRuntime & T>;\n\tpublic async instantiateFirstTime(_runtime: T): Promise<void> {}\n\tpublic async instantiateFromExisting(_runtime: T): Promise<void> {}\n\tpublic async hasInitialized(_runtime: T): Promise<void> {}\n}\n"]}
@@ -9,14 +9,36 @@ import { ISummaryStats, ISummarizeResult, ISummaryTreeWithStats, ITelemetryConte
9
9
  * Combines summary stats by adding their totals together.
10
10
  * Returns empty stats if called without args.
11
11
  * @param stats - stats to merge
12
+ * @internal
12
13
  */
13
14
  export declare function mergeStats(...stats: ISummaryStats[]): ISummaryStats;
15
+ /**
16
+ * @internal
17
+ */
14
18
  export declare function utf8ByteLength(str: string): number;
19
+ /**
20
+ * @internal
21
+ */
15
22
  export declare function getBlobSize(content: ISummaryBlob["content"]): number;
23
+ /**
24
+ * @internal
25
+ */
16
26
  export declare function calculateStats(summary: SummaryObject): ISummaryStats;
27
+ /**
28
+ * @internal
29
+ */
17
30
  export declare function addBlobToSummary(summary: ISummaryTreeWithStats, key: string, content: string | Uint8Array): void;
31
+ /**
32
+ * @internal
33
+ */
18
34
  export declare function addTreeToSummary(summary: ISummaryTreeWithStats, key: string, summarizeResult: ISummarizeResult): void;
35
+ /**
36
+ * @internal
37
+ */
19
38
  export declare function addSummarizeResultToSummary(summary: ISummaryTreeWithStats, key: string, summarizeResult: ISummarizeResult): void;
39
+ /**
40
+ * @internal
41
+ */
20
42
  export declare class SummaryTreeBuilder implements ISummaryTreeWithStats {
21
43
  private attachmentCounter;
22
44
  get summary(): ISummaryTree;
@@ -34,25 +56,32 @@ export declare class SummaryTreeBuilder implements ISummaryTreeWithStats {
34
56
  * Converts snapshot ITree to ISummaryTree format and tracks stats.
35
57
  * @param snapshot - snapshot in ITree format
36
58
  * @param fullTree - true to never use handles, even if id is specified
59
+ * @internal
37
60
  */
38
61
  export declare function convertToSummaryTreeWithStats(snapshot: ITree, fullTree?: boolean): ISummaryTreeWithStats;
39
62
  /**
40
63
  * Converts snapshot ITree to ISummaryTree format and tracks stats.
41
64
  * @param snapshot - snapshot in ITree format
42
65
  * @param fullTree - true to never use handles, even if id is specified
66
+ * @internal
43
67
  */
44
68
  export declare function convertToSummaryTree(snapshot: ITree, fullTree?: boolean): ISummarizeResult;
45
69
  /**
46
70
  * Converts ISnapshotTree to ISummaryTree format and tracks stats. This snapshot tree was
47
71
  * was taken by serialize api in detached container.
48
72
  * @param snapshot - snapshot in ISnapshotTree format
73
+ * @internal
49
74
  */
50
75
  export declare function convertSnapshotTreeToSummaryTree(snapshot: ISnapshotTree): ISummaryTreeWithStats;
51
76
  /**
52
77
  * Converts ISummaryTree to ITree format. This is needed for back-compat while we get rid of snapshot.
53
78
  * @param summaryTree - summary tree in ISummaryTree format
79
+ * @internal
54
80
  */
55
81
  export declare function convertSummaryTreeToITree(summaryTree: ISummaryTree): ITree;
82
+ /**
83
+ * @internal
84
+ */
56
85
  export declare class TelemetryContext implements ITelemetryContext {
57
86
  private readonly telemetry;
58
87
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"summaryUtils.d.ts","sourceRoot":"","sources":["../src/summaryUtils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAS7E,OAAO,EACN,KAAK,EACL,WAAW,EACX,YAAY,EACZ,aAAa,EACb,YAAY,EAGZ,aAAa,EACb,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EACN,aAAa,EACb,gBAAgB,EAChB,qBAAqB,EACrB,iBAAiB,EACjB,sBAAsB,EACtB,MAAM,qCAAqC,CAAC;AAE7C;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,GAAG,KAAK,EAAE,aAAa,EAAE,GAAG,aAAa,CAgBnE;AAED,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAelD;AAED,wBAAgB,WAAW,CAAC,OAAO,EAAE,YAAY,CAAC,SAAS,CAAC,GAAG,MAAM,CAEpE;AAyBD,wBAAgB,cAAc,CAAC,OAAO,EAAE,aAAa,GAAG,aAAa,CAIpE;AAED,wBAAgB,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AAM,GAAG,0BAA0B;IAIjE;;OAEG;IACH,SAAS,IAAI,MAAM;CAOnB;AAoBD;;;GAGG;AACH,qBAAa,aAAc,YAAW,sBAAsB;IAC3D,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAqC;IAChE,IAAW,OAAO,IAAI;QAAE,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;KAAE,CAM/C;IAEM,OAAO,CAAC,EAAE,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE;IAInD;;;;;OAKG;IACI,iBAAiB,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE;QAAE,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;KAAE;IAevE,QAAQ,CAAC,OAAO,EAAE;QAAE,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;KAAE;IAMnD;;OAEG;IACI,kBAAkB,CAAC,aAAa,EAAE,MAAM;IAMxC,SAAS,IAAI,sBAAsB;CAK1C"}
@@ -13,6 +13,7 @@ const protocol_definitions_1 = require("@fluidframework/protocol-definitions");
13
13
  * Combines summary stats by adding their totals together.
14
14
  * Returns empty stats if called without args.
15
15
  * @param stats - stats to merge
16
+ * @internal
16
17
  */
17
18
  function mergeStats(...stats) {
18
19
  const results = {
@@ -32,6 +33,9 @@ function mergeStats(...stats) {
32
33
  return results;
33
34
  }
34
35
  exports.mergeStats = mergeStats;
36
+ /**
37
+ * @internal
38
+ */
35
39
  function utf8ByteLength(str) {
36
40
  // returns the byte length of an utf8 string
37
41
  let s = str.length;
@@ -50,6 +54,9 @@ function utf8ByteLength(str) {
50
54
  return s;
51
55
  }
52
56
  exports.utf8ByteLength = utf8ByteLength;
57
+ /**
58
+ * @internal
59
+ */
53
60
  function getBlobSize(content) {
54
61
  return typeof content === "string" ? utf8ByteLength(content) : content.byteLength;
55
62
  }
@@ -76,12 +83,18 @@ function calculateStatsCore(summaryObject, stats) {
76
83
  return;
77
84
  }
78
85
  }
86
+ /**
87
+ * @internal
88
+ */
79
89
  function calculateStats(summary) {
80
90
  const stats = mergeStats();
81
91
  calculateStatsCore(summary, stats);
82
92
  return stats;
83
93
  }
84
94
  exports.calculateStats = calculateStats;
95
+ /**
96
+ * @internal
97
+ */
85
98
  function addBlobToSummary(summary, key, content) {
86
99
  const blob = {
87
100
  type: protocol_definitions_1.SummaryType.Blob,
@@ -92,16 +105,25 @@ function addBlobToSummary(summary, key, content) {
92
105
  summary.stats.totalBlobSize += getBlobSize(content);
93
106
  }
94
107
  exports.addBlobToSummary = addBlobToSummary;
108
+ /**
109
+ * @internal
110
+ */
95
111
  function addTreeToSummary(summary, key, summarizeResult) {
96
112
  summary.summary.tree[key] = summarizeResult.summary;
97
113
  summary.stats = mergeStats(summary.stats, summarizeResult.stats);
98
114
  }
99
115
  exports.addTreeToSummary = addTreeToSummary;
116
+ /**
117
+ * @internal
118
+ */
100
119
  function addSummarizeResultToSummary(summary, key, summarizeResult) {
101
120
  summary.summary.tree[key] = summarizeResult.summary;
102
121
  summary.stats = mergeStats(summary.stats, summarizeResult.stats);
103
122
  }
104
123
  exports.addSummarizeResultToSummary = addSummarizeResultToSummary;
124
+ /**
125
+ * @internal
126
+ */
105
127
  class SummaryTreeBuilder {
106
128
  get summary() {
107
129
  return {
@@ -152,6 +174,7 @@ exports.SummaryTreeBuilder = SummaryTreeBuilder;
152
174
  * Converts snapshot ITree to ISummaryTree format and tracks stats.
153
175
  * @param snapshot - snapshot in ITree format
154
176
  * @param fullTree - true to never use handles, even if id is specified
177
+ * @internal
155
178
  */
156
179
  function convertToSummaryTreeWithStats(snapshot, fullTree = false) {
157
180
  const builder = new SummaryTreeBuilder();
@@ -188,6 +211,7 @@ exports.convertToSummaryTreeWithStats = convertToSummaryTreeWithStats;
188
211
  * Converts snapshot ITree to ISummaryTree format and tracks stats.
189
212
  * @param snapshot - snapshot in ITree format
190
213
  * @param fullTree - true to never use handles, even if id is specified
214
+ * @internal
191
215
  */
192
216
  function convertToSummaryTree(snapshot, fullTree = false) {
193
217
  // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions
@@ -212,6 +236,7 @@ exports.convertToSummaryTree = convertToSummaryTree;
212
236
  * Converts ISnapshotTree to ISummaryTree format and tracks stats. This snapshot tree was
213
237
  * was taken by serialize api in detached container.
214
238
  * @param snapshot - snapshot in ISnapshotTree format
239
+ * @internal
215
240
  */
216
241
  function convertSnapshotTreeToSummaryTree(snapshot) {
217
242
  const builder = new SummaryTreeBuilder();
@@ -244,6 +269,7 @@ exports.convertSnapshotTreeToSummaryTree = convertSnapshotTreeToSummaryTree;
244
269
  /**
245
270
  * Converts ISummaryTree to ITree format. This is needed for back-compat while we get rid of snapshot.
246
271
  * @param summaryTree - summary tree in ISummaryTree format
272
+ * @internal
247
273
  */
248
274
  function convertSummaryTreeToITree(summaryTree) {
249
275
  const entries = [];
@@ -283,6 +309,9 @@ function convertSummaryTreeToITree(summaryTree) {
283
309
  };
284
310
  }
285
311
  exports.convertSummaryTreeToITree = convertSummaryTreeToITree;
312
+ /**
313
+ * @internal
314
+ */
286
315
  class TelemetryContext {
287
316
  constructor() {
288
317
  this.telemetry = new Map();