@fluidframework/runtime-definitions 2.0.0-dev-rc.1.0.0.228517 → 2.0.0-dev-rc.2.0.0.245554
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.cjs +1 -1
- package/CHANGELOG.md +75 -0
- package/api-extractor-cjs.json +8 -0
- package/api-extractor-lint.json +1 -1
- package/api-extractor.json +1 -1
- package/api-report/runtime-definitions.api.md +103 -116
- package/dist/dataStoreContext.d.ts +128 -69
- package/dist/dataStoreContext.d.ts.map +1 -1
- package/dist/dataStoreContext.js +3 -0
- package/dist/dataStoreContext.js.map +1 -1
- package/dist/dataStoreFactory.d.ts +1 -1
- package/dist/dataStoreFactory.d.ts.map +1 -1
- package/dist/dataStoreFactory.js.map +1 -1
- package/dist/dataStoreRegistry.d.ts +1 -1
- package/dist/dataStoreRegistry.d.ts.map +1 -1
- package/dist/dataStoreRegistry.js.map +1 -1
- package/dist/{garbageCollection.d.ts → garbageCollectionDefinitions.d.ts} +8 -2
- package/dist/garbageCollectionDefinitions.d.ts.map +1 -0
- package/dist/{garbageCollection.js → garbageCollectionDefinitions.js} +9 -3
- package/dist/garbageCollectionDefinitions.js.map +1 -0
- package/dist/index.d.ts +12 -52
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +20 -26
- package/dist/index.js.map +1 -1
- package/dist/package.json +3 -0
- package/dist/protocol.d.ts +2 -1
- package/dist/protocol.d.ts.map +1 -1
- package/dist/protocol.js.map +1 -1
- package/dist/runtime-definitions-alpha.d.ts +188 -165
- package/dist/runtime-definitions-beta.d.ts +37 -59
- package/dist/runtime-definitions-public.d.ts +37 -59
- package/dist/runtime-definitions-untrimmed.d.ts +195 -166
- package/dist/summary.d.ts +15 -20
- package/dist/summary.d.ts.map +1 -1
- package/dist/summary.js.map +1 -1
- package/dist/tsdoc-metadata.json +1 -1
- package/lib/attribution.d.ts +71 -0
- package/lib/attribution.d.ts.map +1 -0
- package/lib/attribution.js +6 -0
- package/lib/attribution.js.map +1 -0
- package/lib/dataStoreContext.d.ts +464 -0
- package/lib/dataStoreContext.d.ts.map +1 -0
- package/lib/dataStoreContext.js +67 -0
- package/lib/dataStoreContext.js.map +1 -0
- package/lib/dataStoreFactory.d.ts +33 -0
- package/lib/dataStoreFactory.d.ts.map +1 -0
- package/lib/dataStoreFactory.js +9 -0
- package/lib/dataStoreFactory.js.map +1 -0
- package/lib/dataStoreRegistry.d.ts +41 -0
- package/lib/dataStoreRegistry.d.ts.map +1 -0
- package/lib/dataStoreRegistry.js +9 -0
- package/lib/dataStoreRegistry.js.map +1 -0
- package/lib/garbageCollectionDefinitions.d.ts +62 -0
- package/lib/garbageCollectionDefinitions.d.ts.map +1 -0
- package/lib/garbageCollectionDefinitions.js +35 -0
- package/lib/garbageCollectionDefinitions.js.map +1 -0
- package/lib/index.d.ts +17 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +10 -0
- package/lib/index.js.map +1 -0
- package/lib/protocol.d.ts +77 -0
- package/lib/protocol.d.ts.map +1 -0
- package/lib/protocol.js +6 -0
- package/lib/protocol.js.map +1 -0
- package/lib/runtime-definitions-alpha.d.ts +1019 -0
- package/lib/runtime-definitions-beta.d.ts +242 -0
- package/lib/runtime-definitions-public.d.ts +242 -0
- package/lib/runtime-definitions-untrimmed.d.ts +1100 -0
- package/lib/summary.d.ts +322 -0
- package/lib/summary.d.ts.map +1 -0
- package/lib/summary.js +26 -0
- package/lib/summary.js.map +1 -0
- package/package.json +115 -33
- package/src/dataStoreContext.ts +151 -85
- package/src/dataStoreFactory.ts +1 -1
- package/src/dataStoreRegistry.ts +1 -1
- package/src/{garbageCollection.ts → garbageCollectionDefinitions.ts} +7 -1
- package/src/index.ts +26 -71
- package/src/protocol.ts +2 -1
- package/src/summary.ts +18 -20
- package/tsconfig.cjs.json +7 -0
- package/tsconfig.json +2 -5
- package/dist/garbageCollection.d.ts.map +0 -1
- package/dist/garbageCollection.js.map +0 -1
package/src/summary.ts
CHANGED
|
@@ -3,15 +3,18 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
6
|
+
import type { TelemetryBaseEventPropertyType } from "@fluidframework/core-interfaces";
|
|
7
|
+
import type {
|
|
8
8
|
SummaryTree,
|
|
9
9
|
ISummaryTree,
|
|
10
10
|
ISequencedDocumentMessage,
|
|
11
11
|
ISnapshotTree,
|
|
12
12
|
ITree,
|
|
13
13
|
} from "@fluidframework/protocol-definitions";
|
|
14
|
-
import {
|
|
14
|
+
import type {
|
|
15
|
+
IGarbageCollectionData,
|
|
16
|
+
IGarbageCollectionDetailsBase,
|
|
17
|
+
} from "./garbageCollectionDefinitions.js";
|
|
15
18
|
|
|
16
19
|
/**
|
|
17
20
|
* Contains the aggregation data from a Tree/Subtree.
|
|
@@ -125,16 +128,6 @@ export interface ISummarizerNodeConfig {
|
|
|
125
128
|
* Defaults to true.
|
|
126
129
|
*/
|
|
127
130
|
readonly canReuseHandle?: boolean;
|
|
128
|
-
/**
|
|
129
|
-
* True to always stop execution on error during summarize, or false to
|
|
130
|
-
* attempt creating a summary that is a pointer ot the last acked summary
|
|
131
|
-
* plus outstanding ops in case of internal summarize failure.
|
|
132
|
-
* Defaults to false.
|
|
133
|
-
*
|
|
134
|
-
* BUG BUG: Default to true while we investigate problem
|
|
135
|
-
* with differential summaries
|
|
136
|
-
*/
|
|
137
|
-
readonly throwOnFailure?: true;
|
|
138
131
|
}
|
|
139
132
|
|
|
140
133
|
/**
|
|
@@ -187,9 +180,6 @@ export interface ISummarizerNode {
|
|
|
187
180
|
invalidate(sequenceNumber: number): void;
|
|
188
181
|
/**
|
|
189
182
|
* Calls the internal summarize function and handles internal state tracking.
|
|
190
|
-
* If unchanged and fullTree is false, it will reuse previous summary subtree.
|
|
191
|
-
* If an error is encountered and throwOnFailure is false, it will try to make
|
|
192
|
-
* a summary with a pointer to the previous summary + a blob of outstanding ops.
|
|
193
183
|
* @param fullTree - true to skip optimizations and always generate the full tree
|
|
194
184
|
* @param trackState - indicates whether the summarizer node should track the state of the summary or not
|
|
195
185
|
* @param telemetryContext - summary data passed through the layers for telemetry purposes
|
|
@@ -238,7 +228,9 @@ export interface ISummarizerNode {
|
|
|
238
228
|
|
|
239
229
|
getChild(id: string): ISummarizerNode | undefined;
|
|
240
230
|
|
|
241
|
-
/**
|
|
231
|
+
/**
|
|
232
|
+
* True if a summary is currently in progress
|
|
233
|
+
*/
|
|
242
234
|
isSummaryInProgress?(): boolean;
|
|
243
235
|
}
|
|
244
236
|
|
|
@@ -339,7 +331,7 @@ export interface ITelemetryContext {
|
|
|
339
331
|
* @param property - property name of the telemetry data being tracked (ex: "DirectoryCount")
|
|
340
332
|
* @param value - value to attribute to this summary telemetry data
|
|
341
333
|
*/
|
|
342
|
-
set(prefix: string, property: string, value:
|
|
334
|
+
set(prefix: string, property: string, value: TelemetryBaseEventPropertyType): void;
|
|
343
335
|
|
|
344
336
|
/**
|
|
345
337
|
* Sets multiple values for telemetry data being tracked.
|
|
@@ -350,20 +342,26 @@ export interface ITelemetryContext {
|
|
|
350
342
|
setMultiple(
|
|
351
343
|
prefix: string,
|
|
352
344
|
property: string,
|
|
353
|
-
values: Record<string,
|
|
345
|
+
values: Record<string, TelemetryBaseEventPropertyType>,
|
|
354
346
|
): void;
|
|
355
347
|
|
|
356
348
|
/**
|
|
357
349
|
* Get the telemetry data being tracked
|
|
350
|
+
*
|
|
351
|
+
* @deprecated This interface should only be used for instrumenting, not for attempting to read already-set telemetry data.
|
|
352
|
+
*
|
|
358
353
|
* @param prefix - unique prefix for this data (ex: "fluid:map:")
|
|
359
354
|
* @param property - property name of the telemetry data being tracked (ex: "DirectoryCount")
|
|
360
355
|
* @returns undefined if item not found
|
|
361
356
|
*/
|
|
362
|
-
get(prefix: string, property: string):
|
|
357
|
+
get(prefix: string, property: string): TelemetryBaseEventPropertyType;
|
|
363
358
|
|
|
364
359
|
/**
|
|
365
360
|
* Returns a serialized version of all the telemetry data.
|
|
366
361
|
* Should be used when logging in telemetry events.
|
|
362
|
+
*
|
|
363
|
+
* @deprecated This interface should only be used for instrumenting. A concrete implementation will likely have a serialize function
|
|
364
|
+
* but this functionality should not be used by other code being given an ITelemetryContext.
|
|
367
365
|
*/
|
|
368
366
|
serialize(): string;
|
|
369
367
|
}
|
package/tsconfig.json
CHANGED
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
{
|
|
2
|
-
"extends":
|
|
3
|
-
"../../../common/build/build-common/tsconfig.base.json",
|
|
4
|
-
"../../../common/build/build-common/tsconfig.esm-only.json",
|
|
5
|
-
],
|
|
2
|
+
"extends": "../../../common/build/build-common/tsconfig.node16.json",
|
|
6
3
|
"include": ["src/**/*"],
|
|
7
4
|
"exclude": ["src/test/**/*"],
|
|
8
5
|
"compilerOptions": {
|
|
9
6
|
"rootDir": "./src",
|
|
10
|
-
"outDir": "./
|
|
7
|
+
"outDir": "./lib",
|
|
11
8
|
},
|
|
12
9
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"garbageCollection.d.ts","sourceRoot":"","sources":["../src/garbageCollection.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;GAIG;AACH,eAAO,MAAM,SAAS,OAAO,CAAC;AAC9B;;;;GAIG;AACH,eAAO,MAAM,YAAY,SAAS,CAAC;AACnC;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,iBAAiB,CAAC;AACjD;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,mBAAmB,CAAC;AAEjD;;;;GAIG;AACH,MAAM,WAAW,sBAAsB;IACtC;;OAEG;IACH,OAAO,EAAE;QAAE,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;KAAE,CAAC;CACpC;AAED;;;GAGG;AACH,MAAM,WAAW,6BAA6B;IAC7C;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB;;OAEG;IACH,MAAM,CAAC,EAAE,sBAAsB,CAAC;CAChC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"garbageCollection.js","sourceRoot":"","sources":["../src/garbageCollection.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH;;;;GAIG;AACU,QAAA,SAAS,GAAG,IAAI,CAAC;AAC9B;;;;GAIG;AACU,QAAA,YAAY,GAAG,MAAM,CAAC;AACnC;;;;GAIG;AACU,QAAA,kBAAkB,GAAG,cAAc,CAAC;AACjD;;;;GAIG;AACU,QAAA,gBAAgB,GAAG,gBAAgB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * The key for the GC tree in summary.\n *\n * @internal\n */\nexport const gcTreeKey = \"gc\";\n/**\n * They prefix for GC blobs in the GC tree in summary.\n *\n * @internal\n */\nexport const gcBlobPrefix = \"__gc\";\n/**\n * The key for tombstone blob in the GC tree in summary.\n *\n * @internal\n */\nexport const gcTombstoneBlobKey = \"__tombstones\";\n/**\n * The key for deleted nodes blob in the GC tree in summary.\n *\n * @internal\n */\nexport const gcDeletedBlobKey = \"__deletedNodes\";\n\n/**\n * Garbage collection data returned by nodes in a Container.\n * Used for running GC in the Container.\n * @public\n */\nexport interface IGarbageCollectionData {\n\t/**\n\t * The GC nodes of a Fluid object in the Container. Each node has an id and a set of routes to other GC nodes.\n\t */\n\tgcNodes: { [id: string]: string[] };\n}\n\n/**\n * GC details provided to each node during creation.\n * @alpha\n */\nexport interface IGarbageCollectionDetailsBase {\n\t/**\n\t * A list of routes to Fluid objects that are used in this node.\n\t */\n\tusedRoutes?: string[];\n\t/**\n\t * The GC data of this node.\n\t */\n\tgcData?: IGarbageCollectionData;\n}\n"]}
|