@fluidframework/runtime-definitions 2.0.0-rc.1.0.3 → 2.0.0-rc.2.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.
Files changed (84) hide show
  1. package/.eslintrc.cjs +1 -1
  2. package/CHANGELOG.md +75 -0
  3. package/api-extractor-cjs.json +8 -0
  4. package/api-extractor-lint.json +1 -1
  5. package/api-extractor.json +1 -1
  6. package/api-report/runtime-definitions.api.md +103 -112
  7. package/dist/dataStoreContext.d.ts +124 -62
  8. package/dist/dataStoreContext.d.ts.map +1 -1
  9. package/dist/dataStoreContext.js +3 -0
  10. package/dist/dataStoreContext.js.map +1 -1
  11. package/dist/dataStoreFactory.d.ts +1 -1
  12. package/dist/dataStoreFactory.d.ts.map +1 -1
  13. package/dist/dataStoreFactory.js.map +1 -1
  14. package/dist/dataStoreRegistry.d.ts +1 -1
  15. package/dist/dataStoreRegistry.d.ts.map +1 -1
  16. package/dist/dataStoreRegistry.js.map +1 -1
  17. package/dist/{garbageCollection.d.ts → garbageCollectionDefinitions.d.ts} +8 -2
  18. package/dist/garbageCollectionDefinitions.d.ts.map +1 -0
  19. package/dist/{garbageCollection.js → garbageCollectionDefinitions.js} +9 -3
  20. package/dist/garbageCollectionDefinitions.js.map +1 -0
  21. package/dist/index.d.ts +12 -52
  22. package/dist/index.d.ts.map +1 -1
  23. package/dist/index.js +20 -26
  24. package/dist/index.js.map +1 -1
  25. package/dist/package.json +3 -0
  26. package/dist/protocol.d.ts +2 -1
  27. package/dist/protocol.d.ts.map +1 -1
  28. package/dist/protocol.js.map +1 -1
  29. package/dist/runtime-definitions-alpha.d.ts +193 -166
  30. package/dist/runtime-definitions-beta.d.ts +37 -57
  31. package/dist/runtime-definitions-public.d.ts +37 -57
  32. package/dist/runtime-definitions-untrimmed.d.ts +200 -167
  33. package/dist/summary.d.ts +15 -20
  34. package/dist/summary.d.ts.map +1 -1
  35. package/dist/summary.js.map +1 -1
  36. package/dist/tsdoc-metadata.json +1 -1
  37. package/lib/attribution.d.ts +71 -0
  38. package/lib/attribution.d.ts.map +1 -0
  39. package/lib/attribution.js +6 -0
  40. package/lib/attribution.js.map +1 -0
  41. package/lib/dataStoreContext.d.ts +469 -0
  42. package/lib/dataStoreContext.d.ts.map +1 -0
  43. package/lib/dataStoreContext.js +67 -0
  44. package/lib/dataStoreContext.js.map +1 -0
  45. package/lib/dataStoreFactory.d.ts +33 -0
  46. package/lib/dataStoreFactory.d.ts.map +1 -0
  47. package/lib/dataStoreFactory.js +9 -0
  48. package/lib/dataStoreFactory.js.map +1 -0
  49. package/lib/dataStoreRegistry.d.ts +41 -0
  50. package/lib/dataStoreRegistry.d.ts.map +1 -0
  51. package/lib/dataStoreRegistry.js +9 -0
  52. package/lib/dataStoreRegistry.js.map +1 -0
  53. package/lib/garbageCollectionDefinitions.d.ts +62 -0
  54. package/lib/garbageCollectionDefinitions.d.ts.map +1 -0
  55. package/lib/garbageCollectionDefinitions.js +35 -0
  56. package/lib/garbageCollectionDefinitions.js.map +1 -0
  57. package/lib/index.d.ts +17 -0
  58. package/lib/index.d.ts.map +1 -0
  59. package/lib/index.js +10 -0
  60. package/lib/index.js.map +1 -0
  61. package/lib/protocol.d.ts +77 -0
  62. package/lib/protocol.d.ts.map +1 -0
  63. package/lib/protocol.js +6 -0
  64. package/lib/protocol.js.map +1 -0
  65. package/lib/runtime-definitions-alpha.d.ts +1025 -0
  66. package/lib/runtime-definitions-beta.d.ts +244 -0
  67. package/lib/runtime-definitions-public.d.ts +244 -0
  68. package/lib/runtime-definitions-untrimmed.d.ts +1106 -0
  69. package/lib/summary.d.ts +322 -0
  70. package/lib/summary.d.ts.map +1 -0
  71. package/lib/summary.js +26 -0
  72. package/lib/summary.js.map +1 -0
  73. package/package.json +111 -34
  74. package/src/dataStoreContext.ts +148 -77
  75. package/src/dataStoreFactory.ts +1 -1
  76. package/src/dataStoreRegistry.ts +1 -1
  77. package/src/{garbageCollection.ts → garbageCollectionDefinitions.ts} +7 -1
  78. package/src/index.ts +26 -70
  79. package/src/protocol.ts +2 -1
  80. package/src/summary.ts +18 -20
  81. package/tsconfig.cjs.json +7 -0
  82. package/tsconfig.json +2 -5
  83. package/dist/garbageCollection.d.ts.map +0 -1
  84. package/dist/garbageCollection.js.map +0 -1
@@ -0,0 +1,322 @@
1
+ /*!
2
+ * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
+ * Licensed under the MIT License.
4
+ */
5
+ import type { TelemetryBaseEventPropertyType } from "@fluidframework/core-interfaces";
6
+ import type { SummaryTree, ISummaryTree, ISequencedDocumentMessage, ISnapshotTree, ITree } from "@fluidframework/protocol-definitions";
7
+ import type { IGarbageCollectionData, IGarbageCollectionDetailsBase } from "./garbageCollectionDefinitions.js";
8
+ /**
9
+ * Contains the aggregation data from a Tree/Subtree.
10
+ * @public
11
+ */
12
+ export interface ISummaryStats {
13
+ treeNodeCount: number;
14
+ blobNodeCount: number;
15
+ handleNodeCount: number;
16
+ totalBlobSize: number;
17
+ unreferencedBlobSize: number;
18
+ }
19
+ /**
20
+ * Represents the summary tree for a node along with the statistics for that tree.
21
+ * For example, for a given data store, it contains the data for data store along with a subtree for
22
+ * each of its DDS.
23
+ * Any component that implements IChannelContext, IFluidDataStoreChannel or extends SharedObject
24
+ * will be taking part of the summarization process.
25
+ * @public
26
+ */
27
+ export interface ISummaryTreeWithStats {
28
+ /**
29
+ * Represents an aggregation of node counts and blob sizes associated to the current summary information
30
+ */
31
+ stats: ISummaryStats;
32
+ /**
33
+ * A recursive data structure that will be converted to a snapshot tree and uploaded
34
+ * to the backend.
35
+ */
36
+ summary: ISummaryTree;
37
+ }
38
+ /**
39
+ * Represents a summary at a current sequence number.
40
+ * @alpha
41
+ */
42
+ export interface ISummarizeResult {
43
+ stats: ISummaryStats;
44
+ summary: SummaryTree;
45
+ }
46
+ /**
47
+ * Contains the same data as ISummaryResult but in order to avoid naming collisions,
48
+ * the data store summaries are wrapped around an array of labels identified by pathPartsForChildren.
49
+ *
50
+ * @example
51
+ *
52
+ * ```typescript
53
+ * id:""
54
+ * pathPartsForChildren: ["path1"]
55
+ * stats: ...
56
+ * summary:
57
+ * ...
58
+ * "path1":
59
+ * ```
60
+ * @alpha
61
+ */
62
+ export interface ISummarizeInternalResult extends ISummarizeResult {
63
+ id: string;
64
+ /**
65
+ * Additional path parts between this node's ID and its children's IDs.
66
+ */
67
+ pathPartsForChildren?: string[];
68
+ }
69
+ /**
70
+ * @experimental - Can be deleted/changed at any time
71
+ * Contains the necessary information to allow DDSes to do incremental summaries
72
+ * @public
73
+ */
74
+ export interface IExperimentalIncrementalSummaryContext {
75
+ /**
76
+ * The sequence number of the summary generated that will be sent to the server.
77
+ */
78
+ summarySequenceNumber: number;
79
+ /**
80
+ * The sequence number of the most recent summary that was acknowledged by the server.
81
+ */
82
+ latestSummarySequenceNumber: number;
83
+ /**
84
+ * The path to the runtime/datastore/dds that is used to generate summary handles
85
+ * Note: Summary handles are nodes of the summary tree that point to previous parts of the last successful summary
86
+ * instead of being a blob or tree node
87
+ *
88
+ * This path contains the id of the data store and dds which should not be leaked to layers below them. Ideally,
89
+ * a layer should not know its own id. This is important for channel unification work and there has been a lot of
90
+ * work to remove these kinds of leakages. Some still exist, which have to be fixed but we should not be adding
91
+ * more dependencies.
92
+ */
93
+ summaryPath: string;
94
+ }
95
+ /**
96
+ * @alpha
97
+ */
98
+ export type SummarizeInternalFn = (fullTree: boolean, trackState: boolean, telemetryContext?: ITelemetryContext, incrementalSummaryContext?: IExperimentalIncrementalSummaryContext) => Promise<ISummarizeInternalResult>;
99
+ /**
100
+ * @alpha
101
+ */
102
+ export interface ISummarizerNodeConfig {
103
+ /**
104
+ * True to reuse previous handle when unchanged since last acked summary.
105
+ * Defaults to true.
106
+ */
107
+ readonly canReuseHandle?: boolean;
108
+ }
109
+ /**
110
+ * @alpha
111
+ */
112
+ export interface ISummarizerNodeConfigWithGC extends ISummarizerNodeConfig {
113
+ /**
114
+ * True if GC is disabled. If so, don't track GC related state for a summary.
115
+ * This is propagated to all child nodes.
116
+ */
117
+ readonly gcDisabled?: boolean;
118
+ }
119
+ /**
120
+ * @alpha
121
+ */
122
+ export declare enum CreateSummarizerNodeSource {
123
+ FromSummary = 0,
124
+ FromAttach = 1,
125
+ Local = 2
126
+ }
127
+ /**
128
+ * @alpha
129
+ */
130
+ export type CreateChildSummarizerNodeParam = {
131
+ type: CreateSummarizerNodeSource.FromSummary;
132
+ } | {
133
+ type: CreateSummarizerNodeSource.FromAttach;
134
+ sequenceNumber: number;
135
+ snapshot: ITree;
136
+ } | {
137
+ type: CreateSummarizerNodeSource.Local;
138
+ };
139
+ /**
140
+ * @alpha
141
+ */
142
+ export interface ISummarizerNode {
143
+ /**
144
+ * Latest successfully acked summary reference sequence number
145
+ */
146
+ readonly referenceSequenceNumber: number;
147
+ /**
148
+ * Marks the node as having a change with the given sequence number.
149
+ * @param sequenceNumber - sequence number of change
150
+ */
151
+ invalidate(sequenceNumber: number): void;
152
+ /**
153
+ * Calls the internal summarize function and handles internal state tracking.
154
+ * @param fullTree - true to skip optimizations and always generate the full tree
155
+ * @param trackState - indicates whether the summarizer node should track the state of the summary or not
156
+ * @param telemetryContext - summary data passed through the layers for telemetry purposes
157
+ */
158
+ summarize(fullTree: boolean, trackState?: boolean, telemetryContext?: ITelemetryContext): Promise<ISummarizeResult>;
159
+ /**
160
+ * Checks if there are any additional path parts for children that need to
161
+ * be loaded from the base summary. Additional path parts represent parts
162
+ * of the path between this SummarizerNode and any child SummarizerNodes
163
+ * that it might have. For example: if datastore "a" contains dds "b", but the
164
+ * path is "/a/.channels/b", then the additional path part is ".channels".
165
+ * @param snapshot - the base summary to parse
166
+ */
167
+ updateBaseSummaryState(snapshot: ISnapshotTree): void;
168
+ /**
169
+ * Records an op representing a change to this node/subtree.
170
+ * @param op - op of change to record
171
+ */
172
+ recordChange(op: ISequencedDocumentMessage): void;
173
+ createChild(
174
+ /**
175
+ * Summarize function
176
+ */
177
+ summarizeInternalFn: SummarizeInternalFn,
178
+ /**
179
+ * Initial id or path part of this node
180
+ */
181
+ id: string,
182
+ /**
183
+ * Information needed to create the node.
184
+ * If it is from a base summary, it will assert that a summary has been seen.
185
+ * Attach information if it is created from an attach op.
186
+ * If it is local, it will throw unsupported errors on calls to summarize.
187
+ */
188
+ createParam: CreateChildSummarizerNodeParam,
189
+ /**
190
+ * Optional configuration affecting summarize behavior
191
+ */
192
+ config?: ISummarizerNodeConfig): ISummarizerNode;
193
+ getChild(id: string): ISummarizerNode | undefined;
194
+ /**
195
+ * True if a summary is currently in progress
196
+ */
197
+ isSummaryInProgress?(): boolean;
198
+ }
199
+ /**
200
+ * Extends the functionality of ISummarizerNode to support garbage collection. It adds / updates the following APIs:
201
+ *
202
+ * `usedRoutes`: The routes in this node that are currently in use.
203
+ *
204
+ * `getGCData`: A new API that can be used to get the garbage collection data for this node.
205
+ *
206
+ * `summarize`: Added a trackState flag which indicates whether the summarizer node should track the state of the
207
+ * summary or not.
208
+ *
209
+ * `createChild`: Added the following params:
210
+ *
211
+ * - `getGCDataFn`: This gets the GC data from the caller. This must be provided in order for getGCData to work.
212
+ *
213
+ * - `getInitialGCDetailsFn`: This gets the initial GC details from the caller.
214
+ *
215
+ * `deleteChild`: Deletes a child node.
216
+ *
217
+ * `isReferenced`: This tells whether this node is referenced in the document or not.
218
+ *
219
+ * `updateUsedRoutes`: Used to notify this node of routes that are currently in use in it.
220
+ * @alpha
221
+ */
222
+ export interface ISummarizerNodeWithGC extends ISummarizerNode {
223
+ createChild(
224
+ /**
225
+ * Summarize function
226
+ */
227
+ summarizeInternalFn: SummarizeInternalFn,
228
+ /**
229
+ * Initial id or path part of this node
230
+ */
231
+ id: string,
232
+ /**
233
+ * Information needed to create the node.
234
+ * If it is from a base summary, it will assert that a summary has been seen.
235
+ * Attach information if it is created from an attach op.
236
+ * If it is local, it will throw unsupported errors on calls to summarize.
237
+ */
238
+ createParam: CreateChildSummarizerNodeParam,
239
+ /**
240
+ * Optional configuration affecting summarize behavior
241
+ */
242
+ config?: ISummarizerNodeConfigWithGC, getGCDataFn?: (fullGC?: boolean) => Promise<IGarbageCollectionData>,
243
+ /**
244
+ * @deprecated The functionality to update child's base GC details is incorporated in the summarizer node.
245
+ */
246
+ getBaseGCDetailsFn?: () => Promise<IGarbageCollectionDetailsBase>): ISummarizerNodeWithGC;
247
+ /**
248
+ * Delete the child with the given id..
249
+ */
250
+ deleteChild(id: string): void;
251
+ getChild(id: string): ISummarizerNodeWithGC | undefined;
252
+ /**
253
+ * Returns this node's data that is used for garbage collection. This includes a list of GC nodes that represent
254
+ * this node. Each node has a set of outbound routes to other GC nodes in the document.
255
+ * @param fullGC - true to bypass optimizations and force full generation of GC data.
256
+ */
257
+ getGCData(fullGC?: boolean): Promise<IGarbageCollectionData>;
258
+ /**
259
+ * Tells whether this node is being referenced in this document or not. Unreferenced node will get GC'd
260
+ */
261
+ isReferenced(): boolean;
262
+ /**
263
+ * After GC has run, called to notify this node of routes that are used in it. These are used for the following:
264
+ * 1. To identify if this node is being referenced in the document or not.
265
+ * 2. To identify if this node or any of its children's used routes changed since last summary.
266
+ *
267
+ * @param usedRoutes - The routes that are used in this node.
268
+ */
269
+ updateUsedRoutes(usedRoutes: string[]): void;
270
+ }
271
+ /**
272
+ * @internal
273
+ */
274
+ export declare const channelsTreeName = ".channels";
275
+ /**
276
+ * Contains telemetry data relevant to summarization workflows.
277
+ * This object is expected to be modified directly by various summarize methods.
278
+ * @public
279
+ */
280
+ export interface ITelemetryContext {
281
+ /**
282
+ * Sets value for telemetry data being tracked.
283
+ * @param prefix - unique prefix to tag this data with (ex: "fluid:map:")
284
+ * @param property - property name of the telemetry data being tracked (ex: "DirectoryCount")
285
+ * @param value - value to attribute to this summary telemetry data
286
+ */
287
+ set(prefix: string, property: string, value: TelemetryBaseEventPropertyType): void;
288
+ /**
289
+ * Sets multiple values for telemetry data being tracked.
290
+ * @param prefix - unique prefix to tag this data with (ex: "fluid:summarize:")
291
+ * @param property - property name of the telemetry data being tracked (ex: "Options")
292
+ * @param values - A set of values to attribute to this summary telemetry data.
293
+ */
294
+ setMultiple(prefix: string, property: string, values: Record<string, TelemetryBaseEventPropertyType>): void;
295
+ /**
296
+ * Get the telemetry data being tracked
297
+ *
298
+ * @deprecated This interface should only be used for instrumenting, not for attempting to read already-set telemetry data.
299
+ *
300
+ * @param prefix - unique prefix for this data (ex: "fluid:map:")
301
+ * @param property - property name of the telemetry data being tracked (ex: "DirectoryCount")
302
+ * @returns undefined if item not found
303
+ */
304
+ get(prefix: string, property: string): TelemetryBaseEventPropertyType;
305
+ /**
306
+ * Returns a serialized version of all the telemetry data.
307
+ * Should be used when logging in telemetry events.
308
+ *
309
+ * @deprecated This interface should only be used for instrumenting. A concrete implementation will likely have a serialize function
310
+ * but this functionality should not be used by other code being given an ITelemetryContext.
311
+ */
312
+ serialize(): string;
313
+ }
314
+ /**
315
+ * @internal
316
+ */
317
+ export declare const blobCountPropertyName = "BlobCount";
318
+ /**
319
+ * @internal
320
+ */
321
+ export declare const totalBlobSizePropertyName = "TotalBlobSize";
322
+ //# sourceMappingURL=summary.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"summary.d.ts","sourceRoot":"","sources":["../src/summary.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,iCAAiC,CAAC;AACtF,OAAO,KAAK,EACX,WAAW,EACX,YAAY,EACZ,yBAAyB,EACzB,aAAa,EACb,KAAK,EACL,MAAM,sCAAsC,CAAC;AAC9C,OAAO,KAAK,EACX,sBAAsB,EACtB,6BAA6B,EAC7B,MAAM,mCAAmC,CAAC;AAE3C;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC7B,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;IACtB,eAAe,EAAE,MAAM,CAAC;IACxB,aAAa,EAAE,MAAM,CAAC;IACtB,oBAAoB,EAAE,MAAM,CAAC;CAC7B;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,qBAAqB;IACrC;;OAEG;IACH,KAAK,EAAE,aAAa,CAAC;IACrB;;;OAGG;IACH,OAAO,EAAE,YAAY,CAAC;CACtB;AAED;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAChC,KAAK,EAAE,aAAa,CAAC;IACrB,OAAO,EAAE,WAAW,CAAC;CACrB;AAED;;;;;;;;;;;;;;;GAeG;AACH,MAAM,WAAW,wBAAyB,SAAQ,gBAAgB;IACjE,EAAE,EAAE,MAAM,CAAC;IACX;;OAEG;IACH,oBAAoB,CAAC,EAAE,MAAM,EAAE,CAAC;CAChC;AAED;;;;GAIG;AACH,MAAM,WAAW,sCAAsC;IACtD;;OAEG;IACH,qBAAqB,EAAE,MAAM,CAAC;IAC9B;;OAEG;IACH,2BAA2B,EAAE,MAAM,CAAC;IACpC;;;;;;;;;OASG;IAEH,WAAW,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG,CACjC,QAAQ,EAAE,OAAO,EACjB,UAAU,EAAE,OAAO,EACnB,gBAAgB,CAAC,EAAE,iBAAiB,EACpC,yBAAyB,CAAC,EAAE,sCAAsC,KAC9D,OAAO,CAAC,wBAAwB,CAAC,CAAC;AAEvC;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACrC;;;OAGG;IACH,QAAQ,CAAC,cAAc,CAAC,EAAE,OAAO,CAAC;CAClC;AAED;;GAEG;AACH,MAAM,WAAW,2BAA4B,SAAQ,qBAAqB;IACzE;;;OAGG;IACH,QAAQ,CAAC,UAAU,CAAC,EAAE,OAAO,CAAC;CAC9B;AAED;;GAEG;AACH,oBAAY,0BAA0B;IACrC,WAAW,IAAA;IACX,UAAU,IAAA;IACV,KAAK,IAAA;CACL;AACD;;GAEG;AACH,MAAM,MAAM,8BAA8B,GACvC;IACA,IAAI,EAAE,0BAA0B,CAAC,WAAW,CAAC;CAC5C,GACD;IACA,IAAI,EAAE,0BAA0B,CAAC,UAAU,CAAC;IAC5C,cAAc,EAAE,MAAM,CAAC;IACvB,QAAQ,EAAE,KAAK,CAAC;CACf,GACD;IACA,IAAI,EAAE,0BAA0B,CAAC,KAAK,CAAC;CACtC,CAAC;AAEL;;GAEG;AACH,MAAM,WAAW,eAAe;IAC/B;;OAEG;IACH,QAAQ,CAAC,uBAAuB,EAAE,MAAM,CAAC;IACzC;;;OAGG;IACH,UAAU,CAAC,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IACzC;;;;;OAKG;IACH,SAAS,CACR,QAAQ,EAAE,OAAO,EACjB,UAAU,CAAC,EAAE,OAAO,EACpB,gBAAgB,CAAC,EAAE,iBAAiB,GAClC,OAAO,CAAC,gBAAgB,CAAC,CAAC;IAC7B;;;;;;;OAOG;IACH,sBAAsB,CAAC,QAAQ,EAAE,aAAa,GAAG,IAAI,CAAC;IACtD;;;OAGG;IACH,YAAY,CAAC,EAAE,EAAE,yBAAyB,GAAG,IAAI,CAAC;IAElD,WAAW;IACV;;OAEG;IACH,mBAAmB,EAAE,mBAAmB;IACxC;;OAEG;IACH,EAAE,EAAE,MAAM;IACV;;;;;OAKG;IACH,WAAW,EAAE,8BAA8B;IAC3C;;OAEG;IACH,MAAM,CAAC,EAAE,qBAAqB,GAC5B,eAAe,CAAC;IAEnB,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,eAAe,GAAG,SAAS,CAAC;IAElD;;OAEG;IACH,mBAAmB,CAAC,IAAI,OAAO,CAAC;CAChC;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,WAAW,qBAAsB,SAAQ,eAAe;IAC7D,WAAW;IACV;;OAEG;IACH,mBAAmB,EAAE,mBAAmB;IACxC;;OAEG;IACH,EAAE,EAAE,MAAM;IACV;;;;;OAKG;IACH,WAAW,EAAE,8BAA8B;IAC3C;;OAEG;IACH,MAAM,CAAC,EAAE,2BAA2B,EACpC,WAAW,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,OAAO,KAAK,OAAO,CAAC,sBAAsB,CAAC;IACnE;;OAEG;IACH,kBAAkB,CAAC,EAAE,MAAM,OAAO,CAAC,6BAA6B,CAAC,GAC/D,qBAAqB,CAAC;IAEzB;;OAEG;IACH,WAAW,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAAC;IAE9B,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,qBAAqB,GAAG,SAAS,CAAC;IAExD;;;;OAIG;IACH,SAAS,CAAC,MAAM,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,sBAAsB,CAAC,CAAC;IAE7D;;OAEG;IACH,YAAY,IAAI,OAAO,CAAC;IAExB;;;;;;OAMG;IACH,gBAAgB,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;CAC7C;AAED;;GAEG;AACH,eAAO,MAAM,gBAAgB,cAAc,CAAC;AAE5C;;;;GAIG;AACH,MAAM,WAAW,iBAAiB;IACjC;;;;;OAKG;IACH,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,8BAA8B,GAAG,IAAI,CAAC;IAEnF;;;;;OAKG;IACH,WAAW,CACV,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,8BAA8B,CAAC,GACpD,IAAI,CAAC;IAER;;;;;;;;OAQG;IACH,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,8BAA8B,CAAC;IAEtE;;;;;;OAMG;IACH,SAAS,IAAI,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,eAAO,MAAM,qBAAqB,cAAc,CAAC;AAEjD;;GAEG;AACH,eAAO,MAAM,yBAAyB,kBAAkB,CAAC"}
package/lib/summary.js ADDED
@@ -0,0 +1,26 @@
1
+ /*!
2
+ * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
+ * Licensed under the MIT License.
4
+ */
5
+ /**
6
+ * @alpha
7
+ */
8
+ export var CreateSummarizerNodeSource;
9
+ (function (CreateSummarizerNodeSource) {
10
+ CreateSummarizerNodeSource[CreateSummarizerNodeSource["FromSummary"] = 0] = "FromSummary";
11
+ CreateSummarizerNodeSource[CreateSummarizerNodeSource["FromAttach"] = 1] = "FromAttach";
12
+ CreateSummarizerNodeSource[CreateSummarizerNodeSource["Local"] = 2] = "Local";
13
+ })(CreateSummarizerNodeSource || (CreateSummarizerNodeSource = {}));
14
+ /**
15
+ * @internal
16
+ */
17
+ export const channelsTreeName = ".channels";
18
+ /**
19
+ * @internal
20
+ */
21
+ export const blobCountPropertyName = "BlobCount";
22
+ /**
23
+ * @internal
24
+ */
25
+ export const totalBlobSizePropertyName = "TotalBlobSize";
26
+ //# sourceMappingURL=summary.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"summary.js","sourceRoot":"","sources":["../src/summary.ts"],"names":[],"mappings":"AAAA;;;GAGG;AA4IH;;GAEG;AACH,MAAM,CAAN,IAAY,0BAIX;AAJD,WAAY,0BAA0B;IACrC,yFAAW,CAAA;IACX,uFAAU,CAAA;IACV,6EAAK,CAAA;AACN,CAAC,EAJW,0BAA0B,KAA1B,0BAA0B,QAIrC;AAsKD;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,WAAW,CAAC;AAiD5C;;GAEG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,WAAW,CAAC;AAEjD;;GAEG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,eAAe,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { TelemetryBaseEventPropertyType } from \"@fluidframework/core-interfaces\";\nimport type {\n\tSummaryTree,\n\tISummaryTree,\n\tISequencedDocumentMessage,\n\tISnapshotTree,\n\tITree,\n} from \"@fluidframework/protocol-definitions\";\nimport type {\n\tIGarbageCollectionData,\n\tIGarbageCollectionDetailsBase,\n} from \"./garbageCollectionDefinitions.js\";\n\n/**\n * Contains the aggregation data from a Tree/Subtree.\n * @public\n */\nexport interface ISummaryStats {\n\ttreeNodeCount: number;\n\tblobNodeCount: number;\n\thandleNodeCount: number;\n\ttotalBlobSize: number;\n\tunreferencedBlobSize: number;\n}\n\n/**\n * Represents the summary tree for a node along with the statistics for that tree.\n * For example, for a given data store, it contains the data for data store along with a subtree for\n * each of its DDS.\n * Any component that implements IChannelContext, IFluidDataStoreChannel or extends SharedObject\n * will be taking part of the summarization process.\n * @public\n */\nexport interface ISummaryTreeWithStats {\n\t/**\n\t * Represents an aggregation of node counts and blob sizes associated to the current summary information\n\t */\n\tstats: ISummaryStats;\n\t/**\n\t * A recursive data structure that will be converted to a snapshot tree and uploaded\n\t * to the backend.\n\t */\n\tsummary: ISummaryTree;\n}\n\n/**\n * Represents a summary at a current sequence number.\n * @alpha\n */\nexport interface ISummarizeResult {\n\tstats: ISummaryStats;\n\tsummary: SummaryTree;\n}\n\n/**\n * Contains the same data as ISummaryResult but in order to avoid naming collisions,\n * the data store summaries are wrapped around an array of labels identified by pathPartsForChildren.\n *\n * @example\n *\n * ```typescript\n * id:\"\"\n * pathPartsForChildren: [\"path1\"]\n * stats: ...\n * summary:\n * ...\n * \"path1\":\n * ```\n * @alpha\n */\nexport interface ISummarizeInternalResult extends ISummarizeResult {\n\tid: string;\n\t/**\n\t * Additional path parts between this node's ID and its children's IDs.\n\t */\n\tpathPartsForChildren?: string[];\n}\n\n/**\n * @experimental - Can be deleted/changed at any time\n * Contains the necessary information to allow DDSes to do incremental summaries\n * @public\n */\nexport interface IExperimentalIncrementalSummaryContext {\n\t/**\n\t * The sequence number of the summary generated that will be sent to the server.\n\t */\n\tsummarySequenceNumber: number;\n\t/**\n\t * The sequence number of the most recent summary that was acknowledged by the server.\n\t */\n\tlatestSummarySequenceNumber: number;\n\t/**\n\t * The path to the runtime/datastore/dds that is used to generate summary handles\n\t * Note: Summary handles are nodes of the summary tree that point to previous parts of the last successful summary\n\t * instead of being a blob or tree node\n\t *\n\t * This path contains the id of the data store and dds which should not be leaked to layers below them. Ideally,\n\t * a layer should not know its own id. This is important for channel unification work and there has been a lot of\n\t * work to remove these kinds of leakages. Some still exist, which have to be fixed but we should not be adding\n\t * more dependencies.\n\t */\n\t// TODO: remove summaryPath\n\tsummaryPath: string;\n}\n\n/**\n * @alpha\n */\nexport type SummarizeInternalFn = (\n\tfullTree: boolean,\n\ttrackState: boolean,\n\ttelemetryContext?: ITelemetryContext,\n\tincrementalSummaryContext?: IExperimentalIncrementalSummaryContext,\n) => Promise<ISummarizeInternalResult>;\n\n/**\n * @alpha\n */\nexport interface ISummarizerNodeConfig {\n\t/**\n\t * True to reuse previous handle when unchanged since last acked summary.\n\t * Defaults to true.\n\t */\n\treadonly canReuseHandle?: boolean;\n}\n\n/**\n * @alpha\n */\nexport interface ISummarizerNodeConfigWithGC extends ISummarizerNodeConfig {\n\t/**\n\t * True if GC is disabled. If so, don't track GC related state for a summary.\n\t * This is propagated to all child nodes.\n\t */\n\treadonly gcDisabled?: boolean;\n}\n\n/**\n * @alpha\n */\nexport enum CreateSummarizerNodeSource {\n\tFromSummary,\n\tFromAttach,\n\tLocal,\n}\n/**\n * @alpha\n */\nexport type CreateChildSummarizerNodeParam =\n\t| {\n\t\t\ttype: CreateSummarizerNodeSource.FromSummary;\n\t }\n\t| {\n\t\t\ttype: CreateSummarizerNodeSource.FromAttach;\n\t\t\tsequenceNumber: number;\n\t\t\tsnapshot: ITree;\n\t }\n\t| {\n\t\t\ttype: CreateSummarizerNodeSource.Local;\n\t };\n\n/**\n * @alpha\n */\nexport interface ISummarizerNode {\n\t/**\n\t * Latest successfully acked summary reference sequence number\n\t */\n\treadonly referenceSequenceNumber: number;\n\t/**\n\t * Marks the node as having a change with the given sequence number.\n\t * @param sequenceNumber - sequence number of change\n\t */\n\tinvalidate(sequenceNumber: number): void;\n\t/**\n\t * Calls the internal summarize function and handles internal state tracking.\n\t * @param fullTree - true to skip optimizations and always generate the full tree\n\t * @param trackState - indicates whether the summarizer node should track the state of the summary or not\n\t * @param telemetryContext - summary data passed through the layers for telemetry purposes\n\t */\n\tsummarize(\n\t\tfullTree: boolean,\n\t\ttrackState?: boolean,\n\t\ttelemetryContext?: ITelemetryContext,\n\t): Promise<ISummarizeResult>;\n\t/**\n\t * Checks if there are any additional path parts for children that need to\n\t * be loaded from the base summary. Additional path parts represent parts\n\t * of the path between this SummarizerNode and any child SummarizerNodes\n\t * that it might have. For example: if datastore \"a\" contains dds \"b\", but the\n\t * path is \"/a/.channels/b\", then the additional path part is \".channels\".\n\t * @param snapshot - the base summary to parse\n\t */\n\tupdateBaseSummaryState(snapshot: ISnapshotTree): void;\n\t/**\n\t * Records an op representing a change to this node/subtree.\n\t * @param op - op of change to record\n\t */\n\trecordChange(op: ISequencedDocumentMessage): void;\n\n\tcreateChild(\n\t\t/**\n\t\t * Summarize function\n\t\t */\n\t\tsummarizeInternalFn: SummarizeInternalFn,\n\t\t/**\n\t\t * Initial id or path part of this node\n\t\t */\n\t\tid: string,\n\t\t/**\n\t\t * Information needed to create the node.\n\t\t * If it is from a base summary, it will assert that a summary has been seen.\n\t\t * Attach information if it is created from an attach op.\n\t\t * If it is local, it will throw unsupported errors on calls to summarize.\n\t\t */\n\t\tcreateParam: CreateChildSummarizerNodeParam,\n\t\t/**\n\t\t * Optional configuration affecting summarize behavior\n\t\t */\n\t\tconfig?: ISummarizerNodeConfig,\n\t): ISummarizerNode;\n\n\tgetChild(id: string): ISummarizerNode | undefined;\n\n\t/**\n\t * True if a summary is currently in progress\n\t */\n\tisSummaryInProgress?(): boolean;\n}\n\n/**\n * Extends the functionality of ISummarizerNode to support garbage collection. It adds / updates the following APIs:\n *\n * `usedRoutes`: The routes in this node that are currently in use.\n *\n * `getGCData`: A new API that can be used to get the garbage collection data for this node.\n *\n * `summarize`: Added a trackState flag which indicates whether the summarizer node should track the state of the\n * summary or not.\n *\n * `createChild`: Added the following params:\n *\n * - `getGCDataFn`: This gets the GC data from the caller. This must be provided in order for getGCData to work.\n *\n * - `getInitialGCDetailsFn`: This gets the initial GC details from the caller.\n *\n * `deleteChild`: Deletes a child node.\n *\n * `isReferenced`: This tells whether this node is referenced in the document or not.\n *\n * `updateUsedRoutes`: Used to notify this node of routes that are currently in use in it.\n * @alpha\n */\nexport interface ISummarizerNodeWithGC extends ISummarizerNode {\n\tcreateChild(\n\t\t/**\n\t\t * Summarize function\n\t\t */\n\t\tsummarizeInternalFn: SummarizeInternalFn,\n\t\t/**\n\t\t * Initial id or path part of this node\n\t\t */\n\t\tid: string,\n\t\t/**\n\t\t * Information needed to create the node.\n\t\t * If it is from a base summary, it will assert that a summary has been seen.\n\t\t * Attach information if it is created from an attach op.\n\t\t * If it is local, it will throw unsupported errors on calls to summarize.\n\t\t */\n\t\tcreateParam: CreateChildSummarizerNodeParam,\n\t\t/**\n\t\t * Optional configuration affecting summarize behavior\n\t\t */\n\t\tconfig?: ISummarizerNodeConfigWithGC,\n\t\tgetGCDataFn?: (fullGC?: boolean) => Promise<IGarbageCollectionData>,\n\t\t/**\n\t\t * @deprecated The functionality to update child's base GC details is incorporated in the summarizer node.\n\t\t */\n\t\tgetBaseGCDetailsFn?: () => Promise<IGarbageCollectionDetailsBase>,\n\t): ISummarizerNodeWithGC;\n\n\t/**\n\t * Delete the child with the given id..\n\t */\n\tdeleteChild(id: string): void;\n\n\tgetChild(id: string): ISummarizerNodeWithGC | undefined;\n\n\t/**\n\t * Returns this node's data that is used for garbage collection. This includes a list of GC nodes that represent\n\t * this node. Each node has a set of outbound routes to other GC nodes in the document.\n\t * @param fullGC - true to bypass optimizations and force full generation of GC data.\n\t */\n\tgetGCData(fullGC?: boolean): Promise<IGarbageCollectionData>;\n\n\t/**\n\t * Tells whether this node is being referenced in this document or not. Unreferenced node will get GC'd\n\t */\n\tisReferenced(): boolean;\n\n\t/**\n\t * After GC has run, called to notify this node of routes that are used in it. These are used for the following:\n\t * 1. To identify if this node is being referenced in the document or not.\n\t * 2. To identify if this node or any of its children's used routes changed since last summary.\n\t *\n\t * @param usedRoutes - The routes that are used in this node.\n\t */\n\tupdateUsedRoutes(usedRoutes: string[]): void;\n}\n\n/**\n * @internal\n */\nexport const channelsTreeName = \".channels\";\n\n/**\n * Contains telemetry data relevant to summarization workflows.\n * This object is expected to be modified directly by various summarize methods.\n * @public\n */\nexport interface ITelemetryContext {\n\t/**\n\t * Sets value for telemetry data being tracked.\n\t * @param prefix - unique prefix to tag this data with (ex: \"fluid:map:\")\n\t * @param property - property name of the telemetry data being tracked (ex: \"DirectoryCount\")\n\t * @param value - value to attribute to this summary telemetry data\n\t */\n\tset(prefix: string, property: string, value: TelemetryBaseEventPropertyType): void;\n\n\t/**\n\t * Sets multiple values for telemetry data being tracked.\n\t * @param prefix - unique prefix to tag this data with (ex: \"fluid:summarize:\")\n\t * @param property - property name of the telemetry data being tracked (ex: \"Options\")\n\t * @param values - A set of values to attribute to this summary telemetry data.\n\t */\n\tsetMultiple(\n\t\tprefix: string,\n\t\tproperty: string,\n\t\tvalues: Record<string, TelemetryBaseEventPropertyType>,\n\t): void;\n\n\t/**\n\t * Get the telemetry data being tracked\n\t *\n\t * @deprecated This interface should only be used for instrumenting, not for attempting to read already-set telemetry data.\n\t *\n\t * @param prefix - unique prefix for this data (ex: \"fluid:map:\")\n\t * @param property - property name of the telemetry data being tracked (ex: \"DirectoryCount\")\n\t * @returns undefined if item not found\n\t */\n\tget(prefix: string, property: string): TelemetryBaseEventPropertyType;\n\n\t/**\n\t * Returns a serialized version of all the telemetry data.\n\t * Should be used when logging in telemetry events.\n\t *\n\t * @deprecated This interface should only be used for instrumenting. A concrete implementation will likely have a serialize function\n\t * but this functionality should not be used by other code being given an ITelemetryContext.\n\t */\n\tserialize(): string;\n}\n\n/**\n * @internal\n */\nexport const blobCountPropertyName = \"BlobCount\";\n\n/**\n * @internal\n */\nexport const totalBlobSizePropertyName = \"TotalBlobSize\";\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluidframework/runtime-definitions",
3
- "version": "2.0.0-rc.1.0.3",
3
+ "version": "2.0.0-rc.2.0.0",
4
4
  "description": "Fluid Runtime definitions",
5
5
  "homepage": "https://fluidframework.com",
6
6
  "repository": {
@@ -11,48 +11,68 @@
11
11
  "license": "MIT",
12
12
  "author": "Microsoft and contributors",
13
13
  "sideEffects": false,
14
- "type": "commonjs",
14
+ "type": "module",
15
15
  "exports": {
16
16
  ".": {
17
- "types": "./dist/index.d.ts",
18
- "default": "./dist/index.js"
17
+ "import": {
18
+ "types": "./lib/index.d.ts",
19
+ "default": "./lib/index.js"
20
+ },
21
+ "require": {
22
+ "types": "./dist/index.d.ts",
23
+ "default": "./dist/index.js"
24
+ }
19
25
  },
20
- "./alpha": {
21
- "types": "./dist/runtime-definitions-alpha.d.ts",
22
- "default": "./dist/index.js"
26
+ "./public": {
27
+ "import": {
28
+ "types": "./lib/runtime-definitions-public.d.ts",
29
+ "default": "./lib/index.js"
30
+ },
31
+ "require": {
32
+ "types": "./dist/runtime-definitions-public.d.ts",
33
+ "default": "./dist/index.js"
34
+ }
23
35
  },
24
- "./beta": {
25
- "types": "./dist/runtime-definitions-beta.d.ts",
26
- "default": "./dist/index.js"
36
+ "./alpha": {
37
+ "import": {
38
+ "types": "./lib/runtime-definitions-alpha.d.ts",
39
+ "default": "./lib/index.js"
40
+ },
41
+ "require": {
42
+ "types": "./dist/runtime-definitions-alpha.d.ts",
43
+ "default": "./dist/index.js"
44
+ }
27
45
  },
28
46
  "./internal": {
29
- "types": "./dist/index.d.ts",
30
- "default": "./dist/index.js"
31
- },
32
- "./public": {
33
- "types": "./dist/runtime-definitions-public.d.ts",
34
- "default": "./dist/index.js"
47
+ "import": {
48
+ "types": "./lib/index.d.ts",
49
+ "default": "./lib/index.js"
50
+ },
51
+ "require": {
52
+ "types": "./dist/index.d.ts",
53
+ "default": "./dist/index.js"
54
+ }
35
55
  }
36
56
  },
37
57
  "main": "dist/index.js",
38
58
  "types": "dist/index.d.ts",
39
59
  "dependencies": {
40
- "@fluidframework/container-definitions": ">=2.0.0-rc.1.0.3 <2.0.0-rc.1.1.0",
41
- "@fluidframework/core-interfaces": ">=2.0.0-rc.1.0.3 <2.0.0-rc.1.1.0",
42
- "@fluidframework/driver-definitions": ">=2.0.0-rc.1.0.3 <2.0.0-rc.1.1.0",
43
- "@fluidframework/id-compressor": ">=2.0.0-rc.1.0.3 <2.0.0-rc.1.1.0",
44
- "@fluidframework/protocol-definitions": "^3.1.0"
60
+ "@fluidframework/container-definitions": ">=2.0.0-rc.2.0.0 <2.0.0-rc.2.1.0",
61
+ "@fluidframework/core-interfaces": ">=2.0.0-rc.2.0.0 <2.0.0-rc.2.1.0",
62
+ "@fluidframework/driver-definitions": ">=2.0.0-rc.2.0.0 <2.0.0-rc.2.1.0",
63
+ "@fluidframework/id-compressor": ">=2.0.0-rc.2.0.0 <2.0.0-rc.2.1.0",
64
+ "@fluidframework/protocol-definitions": "^3.2.0"
45
65
  },
46
66
  "devDependencies": {
47
67
  "@arethetypeswrong/cli": "^0.13.3",
48
- "@fluid-tools/build-cli": "^0.29.0",
68
+ "@fluid-tools/build-cli": "^0.34.0",
49
69
  "@fluidframework/build-common": "^2.0.3",
50
- "@fluidframework/build-tools": "^0.29.0",
51
- "@fluidframework/eslint-config-fluid": "^3.2.0",
70
+ "@fluidframework/build-tools": "^0.34.0",
71
+ "@fluidframework/eslint-config-fluid": "^4.0.0",
52
72
  "@fluidframework/runtime-definitions-previous": "npm:@fluidframework/runtime-definitions@2.0.0-internal.8.0.0",
53
- "@microsoft/api-extractor": "^7.38.3",
73
+ "@microsoft/api-extractor": "^7.42.3",
54
74
  "copyfiles": "^2.4.1",
55
- "eslint": "~8.50.0",
75
+ "eslint": "~8.55.0",
56
76
  "eslint-plugin-deprecation": "~2.0.0",
57
77
  "prettier": "~3.0.3",
58
78
  "rimraf": "^4.4.0",
@@ -63,7 +83,8 @@
63
83
  "build:docs": {
64
84
  "dependsOn": [
65
85
  "...",
66
- "api-extractor:commonjs"
86
+ "api-extractor:commonjs",
87
+ "api-extractor:esnext"
67
88
  ],
68
89
  "script": false
69
90
  }
@@ -71,25 +92,81 @@
71
92
  },
72
93
  "typeValidation": {
73
94
  "broken": {
74
- "InterfaceDeclaration_IIdCompressorCore": {
75
- "forwardCompat": false
95
+ "InterfaceDeclaration_IFluidDataStoreContext": {
96
+ "forwardCompat": false,
97
+ "backCompat": false
98
+ },
99
+ "InterfaceDeclaration_IFluidDataStoreContextDetached": {
100
+ "forwardCompat": false,
101
+ "backCompat": false
102
+ },
103
+ "RemovedInterfaceDeclaration_IIdCompressorCore": {
104
+ "forwardCompat": false,
105
+ "backCompat": false
106
+ },
107
+ "RemovedClassDeclaration_IdCompressor": {
108
+ "forwardCompat": false,
109
+ "backCompat": false
110
+ },
111
+ "RemovedInterfaceDeclaration_IIdCompressor": {
112
+ "forwardCompat": false,
113
+ "backCompat": false
114
+ },
115
+ "RemovedInterfaceDeclaration_IdCreationRange": {
116
+ "forwardCompat": false,
117
+ "backCompat": false
118
+ },
119
+ "RemovedTypeAliasDeclaration_OpSpaceCompressedId": {
120
+ "forwardCompat": false,
121
+ "backCompat": false
122
+ },
123
+ "RemovedTypeAliasDeclaration_SerializedIdCompressor": {
124
+ "forwardCompat": false,
125
+ "backCompat": false
126
+ },
127
+ "RemovedTypeAliasDeclaration_SerializedIdCompressorWithNoSession": {
128
+ "forwardCompat": false,
129
+ "backCompat": false
130
+ },
131
+ "RemovedTypeAliasDeclaration_SerializedIdCompressorWithOngoingSession": {
132
+ "forwardCompat": false,
133
+ "backCompat": false
134
+ },
135
+ "RemovedTypeAliasDeclaration_SessionId": {
136
+ "forwardCompat": false,
137
+ "backCompat": false
138
+ },
139
+ "RemovedTypeAliasDeclaration_SessionSpaceCompressedId": {
140
+ "forwardCompat": false,
141
+ "backCompat": false
142
+ },
143
+ "RemovedTypeAliasDeclaration_StableId": {
144
+ "forwardCompat": false,
145
+ "backCompat": false
146
+ },
147
+ "InterfaceDeclaration_IFluidDataStoreChannel": {
148
+ "backCompat": false
76
149
  },
77
- "ClassDeclaration_IdCompressor": {
150
+ "InterfaceDeclaration_IContainerRuntimeBase": {
78
151
  "forwardCompat": false
79
152
  }
80
153
  }
81
154
  },
82
155
  "scripts": {
83
156
  "api": "fluid-build . --task api",
84
- "api-extractor:commonjs": "api-extractor run --local",
157
+ "api-extractor:commonjs": "api-extractor run --config ./api-extractor-cjs.json",
158
+ "api-extractor:esnext": "api-extractor run --local",
85
159
  "build": "fluid-build . --task build",
86
160
  "build:compile": "fluid-build . --task compile",
87
161
  "build:docs": "fluid-build . --task api",
88
- "build:test": "tsc --project ./src/test/tsconfig.json",
162
+ "build:esnext": "tsc --project ./tsconfig.json",
163
+ "build:test": "npm run build:test:esm && npm run build:test:cjs",
164
+ "build:test:cjs": "fluid-tsc commonjs --project ./src/test/tsconfig.cjs.json",
165
+ "build:test:esm": "tsc --project ./src/test/tsconfig.json",
89
166
  "check:are-the-types-wrong": "attw --pack . --entrypoints .",
90
167
  "check:release-tags": "api-extractor run --local --config ./api-extractor-lint.json",
91
168
  "ci:build:docs": "api-extractor run",
92
- "clean": "rimraf --glob dist \"**/*.tsbuildinfo\" \"**/*.build.log\" _api-extractor-temp",
169
+ "clean": "rimraf --glob dist lib \"**/*.tsbuildinfo\" \"**/*.build.log\" _api-extractor-temp",
93
170
  "eslint": "eslint --format stylish src",
94
171
  "eslint:fix": "eslint --format stylish src --fix --fix-type problem,suggestion,layout",
95
172
  "format": "npm run prettier:fix",
@@ -97,7 +174,7 @@
97
174
  "lint:fix": "npm run prettier:fix && npm run eslint:fix",
98
175
  "prettier": "prettier --check . --cache --ignore-path ../../../.prettierignore",
99
176
  "prettier:fix": "prettier --write . --cache --ignore-path ../../../.prettierignore",
100
- "tsc": "tsc",
177
+ "tsc": "fluid-tsc commonjs --project ./tsconfig.cjs.json && copyfiles -f ../../../common/build/build-common/src/cjs/package.json ./dist",
101
178
  "typetests:gen": "fluid-type-test-generator",
102
179
  "typetests:prepare": "flub typetests --dir . --reset --previous --normalize"
103
180
  }