@fluidframework/runtime-definitions 2.0.0-internal.7.0.0 → 2.0.0-internal.7.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/api-extractor.json +9 -1
- package/api-report/runtime-definitions.api.md +532 -0
- package/dist/dataStoreContext.d.ts +8 -7
- package/dist/dataStoreContext.d.ts.map +1 -1
- package/dist/dataStoreContext.js.map +1 -1
- package/dist/summary.d.ts +1 -1
- package/dist/summary.js.map +1 -1
- package/dist/tsdoc-metadata.json +1 -1
- package/package.json +16 -30
- package/src/dataStoreContext.ts +8 -7
- package/src/summary.ts +1 -1
package/CHANGELOG.md
CHANGED
package/api-extractor.json
CHANGED
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
|
|
3
|
-
"extends": "@fluidframework/build-common/api-extractor-
|
|
3
|
+
"extends": "@fluidframework/build-common/api-extractor-base.json",
|
|
4
|
+
"messages": {
|
|
5
|
+
"extractorMessageReporting": {
|
|
6
|
+
"ae-missing-release-tag": {
|
|
7
|
+
// TODO: Fix violations and remove this rule override
|
|
8
|
+
"logLevel": "none"
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
}
|
|
4
12
|
}
|
|
@@ -0,0 +1,532 @@
|
|
|
1
|
+
## API Report File for "@fluidframework/runtime-definitions"
|
|
2
|
+
|
|
3
|
+
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
|
|
7
|
+
import { AttachState } from '@fluidframework/container-definitions';
|
|
8
|
+
import { FluidObject } from '@fluidframework/core-interfaces';
|
|
9
|
+
import { IAudience } from '@fluidframework/container-definitions';
|
|
10
|
+
import { IClientDetails } from '@fluidframework/protocol-definitions';
|
|
11
|
+
import { IDeltaManager } from '@fluidframework/container-definitions';
|
|
12
|
+
import { IDisposable } from '@fluidframework/core-interfaces';
|
|
13
|
+
import { IDocumentMessage } from '@fluidframework/protocol-definitions';
|
|
14
|
+
import { IDocumentStorageService } from '@fluidframework/driver-definitions';
|
|
15
|
+
import { IEvent } from '@fluidframework/core-interfaces';
|
|
16
|
+
import { IEventProvider } from '@fluidframework/core-interfaces';
|
|
17
|
+
import { IFluidHandle } from '@fluidframework/core-interfaces';
|
|
18
|
+
import { IFluidHandleContext } from '@fluidframework/core-interfaces';
|
|
19
|
+
import { IFluidRouter } from '@fluidframework/core-interfaces';
|
|
20
|
+
import { ILoaderOptions } from '@fluidframework/container-definitions';
|
|
21
|
+
import { IProvideFluidHandleContext } from '@fluidframework/core-interfaces';
|
|
22
|
+
import { IQuorumClients } from '@fluidframework/protocol-definitions';
|
|
23
|
+
import { IRequest } from '@fluidframework/core-interfaces';
|
|
24
|
+
import { IResponse } from '@fluidframework/core-interfaces';
|
|
25
|
+
import { ISequencedDocumentMessage } from '@fluidframework/protocol-definitions';
|
|
26
|
+
import { ISignalMessage } from '@fluidframework/protocol-definitions';
|
|
27
|
+
import { ISnapshotTree } from '@fluidframework/protocol-definitions';
|
|
28
|
+
import { ISummaryTree } from '@fluidframework/protocol-definitions';
|
|
29
|
+
import { ITelemetryBaseLogger } from '@fluidframework/core-interfaces';
|
|
30
|
+
import { ITree } from '@fluidframework/protocol-definitions';
|
|
31
|
+
import type { IUser } from '@fluidframework/protocol-definitions';
|
|
32
|
+
import { SummaryTree } from '@fluidframework/protocol-definitions';
|
|
33
|
+
import { TelemetryEventPropertyType } from '@fluidframework/core-interfaces';
|
|
34
|
+
|
|
35
|
+
// @public
|
|
36
|
+
export type AliasResult = "Success" | "Conflict" | "AlreadyAliased";
|
|
37
|
+
|
|
38
|
+
// @alpha
|
|
39
|
+
export interface AttributionInfo {
|
|
40
|
+
timestamp: number;
|
|
41
|
+
user: IUser;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// @alpha
|
|
45
|
+
export type AttributionKey = OpAttributionKey | DetachedAttributionKey | LocalAttributionKey;
|
|
46
|
+
|
|
47
|
+
// @public (undocumented)
|
|
48
|
+
export const blobCountPropertyName = "BlobCount";
|
|
49
|
+
|
|
50
|
+
// @public (undocumented)
|
|
51
|
+
export const channelsTreeName = ".channels";
|
|
52
|
+
|
|
53
|
+
// @public (undocumented)
|
|
54
|
+
export type CreateChildSummarizerNodeFn = (summarizeInternal: SummarizeInternalFn, getGCDataFn: (fullGC?: boolean) => Promise<IGarbageCollectionData>,
|
|
55
|
+
getBaseGCDetailsFn?: () => Promise<IGarbageCollectionDetailsBase>) => ISummarizerNodeWithGC;
|
|
56
|
+
|
|
57
|
+
// @public (undocumented)
|
|
58
|
+
export type CreateChildSummarizerNodeParam = {
|
|
59
|
+
type: CreateSummarizerNodeSource.FromSummary;
|
|
60
|
+
} | {
|
|
61
|
+
type: CreateSummarizerNodeSource.FromAttach;
|
|
62
|
+
sequenceNumber: number;
|
|
63
|
+
snapshot: ITree;
|
|
64
|
+
} | {
|
|
65
|
+
type: CreateSummarizerNodeSource.Local;
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
// @public (undocumented)
|
|
69
|
+
export enum CreateSummarizerNodeSource {
|
|
70
|
+
// (undocumented)
|
|
71
|
+
FromAttach = 1,
|
|
72
|
+
// (undocumented)
|
|
73
|
+
FromSummary = 0,
|
|
74
|
+
// (undocumented)
|
|
75
|
+
Local = 2
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
// @alpha
|
|
79
|
+
export interface DetachedAttributionKey {
|
|
80
|
+
id: 0;
|
|
81
|
+
// (undocumented)
|
|
82
|
+
type: "detached";
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
// @public
|
|
86
|
+
export type FluidDataStoreRegistryEntry = Readonly<Partial<IProvideFluidDataStoreRegistry & IProvideFluidDataStoreFactory>>;
|
|
87
|
+
|
|
88
|
+
// @public
|
|
89
|
+
export enum FlushMode {
|
|
90
|
+
Immediate = 0,
|
|
91
|
+
TurnBased = 1
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
// @public (undocumented)
|
|
95
|
+
export enum FlushModeExperimental {
|
|
96
|
+
Async = 2
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
// @public
|
|
100
|
+
export const gcBlobPrefix = "__gc";
|
|
101
|
+
|
|
102
|
+
// @public
|
|
103
|
+
export const gcDeletedBlobKey = "__deletedNodes";
|
|
104
|
+
|
|
105
|
+
// @public
|
|
106
|
+
export const gcTombstoneBlobKey = "__tombstones";
|
|
107
|
+
|
|
108
|
+
// @public
|
|
109
|
+
export const gcTreeKey = "gc";
|
|
110
|
+
|
|
111
|
+
// @public
|
|
112
|
+
export interface IAttachMessage {
|
|
113
|
+
id: string;
|
|
114
|
+
snapshot: ITree;
|
|
115
|
+
type: string;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
// @public
|
|
119
|
+
export interface IContainerRuntimeBase extends IEventProvider<IContainerRuntimeBaseEvents> {
|
|
120
|
+
// (undocumented)
|
|
121
|
+
readonly clientDetails: IClientDetails;
|
|
122
|
+
createDataStore(pkg: string | string[]): Promise<IDataStore>;
|
|
123
|
+
// @internal @deprecated (undocumented)
|
|
124
|
+
_createDataStoreWithProps(pkg: string | string[], props?: any, id?: string): Promise<IDataStore>;
|
|
125
|
+
createDetachedDataStore(pkg: Readonly<string[]>): IFluidDataStoreContextDetached;
|
|
126
|
+
getAbsoluteUrl(relativeUrl: string): Promise<string | undefined>;
|
|
127
|
+
getAudience(): IAudience;
|
|
128
|
+
getQuorum(): IQuorumClients;
|
|
129
|
+
// @deprecated (undocumented)
|
|
130
|
+
readonly IFluidHandleContext: IFluidHandleContext;
|
|
131
|
+
// (undocumented)
|
|
132
|
+
readonly logger: ITelemetryBaseLogger;
|
|
133
|
+
orderSequentially(callback: () => void): void;
|
|
134
|
+
// @deprecated
|
|
135
|
+
request(request: IRequest): Promise<IResponse>;
|
|
136
|
+
submitSignal(type: string, content: any): void;
|
|
137
|
+
// (undocumented)
|
|
138
|
+
uploadBlob(blob: ArrayBufferLike, signal?: AbortSignal): Promise<IFluidHandle<ArrayBufferLike>>;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
// @public (undocumented)
|
|
142
|
+
export interface IContainerRuntimeBaseEvents extends IEvent {
|
|
143
|
+
// (undocumented)
|
|
144
|
+
(event: "batchBegin", listener: (op: ISequencedDocumentMessage) => void): any;
|
|
145
|
+
// (undocumented)
|
|
146
|
+
(event: "op", listener: (op: ISequencedDocumentMessage, runtimeMessage?: boolean) => void): any;
|
|
147
|
+
// (undocumented)
|
|
148
|
+
(event: "batchEnd", listener: (error: any, op: ISequencedDocumentMessage) => void): any;
|
|
149
|
+
// (undocumented)
|
|
150
|
+
(event: "signal", listener: (message: IInboundSignalMessage, local: boolean) => void): any;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
// @public
|
|
154
|
+
export interface IDataStore {
|
|
155
|
+
readonly entryPoint: IFluidHandle<FluidObject>;
|
|
156
|
+
// @deprecated (undocumented)
|
|
157
|
+
readonly IFluidRouter: IFluidRouter;
|
|
158
|
+
// @deprecated (undocumented)
|
|
159
|
+
request(request: {
|
|
160
|
+
url: "/";
|
|
161
|
+
headers?: undefined;
|
|
162
|
+
}): Promise<IResponse>;
|
|
163
|
+
// @deprecated
|
|
164
|
+
request(request: IRequest): Promise<IResponse>;
|
|
165
|
+
trySetAlias(alias: string): Promise<AliasResult>;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
// @public
|
|
169
|
+
export interface IdCreationRange {
|
|
170
|
+
// (undocumented)
|
|
171
|
+
readonly ids?: {
|
|
172
|
+
readonly firstGenCount: number;
|
|
173
|
+
readonly count: number;
|
|
174
|
+
};
|
|
175
|
+
// (undocumented)
|
|
176
|
+
readonly sessionId: SessionId;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
// @public (undocumented)
|
|
180
|
+
export type IdCreationRangeWithStashedState = IdCreationRange & {
|
|
181
|
+
stashedState: SerializedIdCompressorWithOngoingSession;
|
|
182
|
+
};
|
|
183
|
+
|
|
184
|
+
// @public
|
|
185
|
+
export interface IEnvelope {
|
|
186
|
+
address: string;
|
|
187
|
+
contents: any;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
// @public
|
|
191
|
+
export interface IExperimentalIncrementalSummaryContext {
|
|
192
|
+
latestSummarySequenceNumber: number;
|
|
193
|
+
summaryPath: string;
|
|
194
|
+
summarySequenceNumber: number;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
// @public
|
|
198
|
+
export interface IFluidDataStoreChannel extends IDisposable {
|
|
199
|
+
// (undocumented)
|
|
200
|
+
applyStashedOp(content: any): Promise<unknown>;
|
|
201
|
+
// @deprecated
|
|
202
|
+
attachGraph(): void;
|
|
203
|
+
readonly attachState: AttachState;
|
|
204
|
+
readonly entryPoint: IFluidHandle<FluidObject>;
|
|
205
|
+
getAttachSummary(telemetryContext?: ITelemetryContext): ISummaryTreeWithStats;
|
|
206
|
+
getGCData(fullGC?: boolean): Promise<IGarbageCollectionData>;
|
|
207
|
+
// (undocumented)
|
|
208
|
+
readonly id: string;
|
|
209
|
+
// @deprecated (undocumented)
|
|
210
|
+
readonly IFluidRouter: IFluidRouter;
|
|
211
|
+
makeVisibleAndAttachGraph(): void;
|
|
212
|
+
process(message: ISequencedDocumentMessage, local: boolean, localOpMetadata: unknown): void;
|
|
213
|
+
processSignal(message: any, local: boolean): void;
|
|
214
|
+
// (undocumented)
|
|
215
|
+
request(request: IRequest): Promise<IResponse>;
|
|
216
|
+
reSubmit(type: string, content: any, localOpMetadata: unknown): any;
|
|
217
|
+
rollback?(type: string, content: any, localOpMetadata: unknown): void;
|
|
218
|
+
setConnectionState(connected: boolean, clientId?: string): any;
|
|
219
|
+
summarize(fullTree?: boolean, trackState?: boolean, telemetryContext?: ITelemetryContext): Promise<ISummaryTreeWithStats>;
|
|
220
|
+
updateUsedRoutes(usedRoutes: string[]): void;
|
|
221
|
+
// (undocumented)
|
|
222
|
+
readonly visibilityState: VisibilityState;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
// @public
|
|
226
|
+
export interface IFluidDataStoreContext extends IEventProvider<IFluidDataStoreContextEvents>, Partial<IProvideFluidDataStoreRegistry>, IProvideFluidHandleContext {
|
|
227
|
+
addedGCOutboundReference?(srcHandle: IFluidHandle, outboundHandle: IFluidHandle): void;
|
|
228
|
+
readonly attachState: AttachState;
|
|
229
|
+
// (undocumented)
|
|
230
|
+
readonly baseSnapshot: ISnapshotTree | undefined;
|
|
231
|
+
// (undocumented)
|
|
232
|
+
readonly clientDetails: IClientDetails;
|
|
233
|
+
// (undocumented)
|
|
234
|
+
readonly clientId: string | undefined;
|
|
235
|
+
// (undocumented)
|
|
236
|
+
readonly connected: boolean;
|
|
237
|
+
// (undocumented)
|
|
238
|
+
readonly containerRuntime: IContainerRuntimeBase;
|
|
239
|
+
// @deprecated (undocumented)
|
|
240
|
+
readonly createProps?: any;
|
|
241
|
+
// (undocumented)
|
|
242
|
+
readonly deltaManager: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>;
|
|
243
|
+
ensureNoDataModelChanges<T>(callback: () => T): T;
|
|
244
|
+
getAbsoluteUrl(relativeUrl: string): Promise<string | undefined>;
|
|
245
|
+
getAudience(): IAudience;
|
|
246
|
+
// @deprecated (undocumented)
|
|
247
|
+
getBaseGCDetails(): Promise<IGarbageCollectionDetailsBase>;
|
|
248
|
+
// (undocumented)
|
|
249
|
+
getCreateChildSummarizerNodeFn(
|
|
250
|
+
id: string,
|
|
251
|
+
createParam: CreateChildSummarizerNodeParam): CreateChildSummarizerNodeFn;
|
|
252
|
+
getQuorum(): IQuorumClients;
|
|
253
|
+
// (undocumented)
|
|
254
|
+
readonly id: string;
|
|
255
|
+
// (undocumented)
|
|
256
|
+
readonly idCompressor?: IIdCompressor;
|
|
257
|
+
readonly isLocalDataStore: boolean;
|
|
258
|
+
// (undocumented)
|
|
259
|
+
readonly logger: ITelemetryBaseLogger;
|
|
260
|
+
makeLocallyVisible(): void;
|
|
261
|
+
// (undocumented)
|
|
262
|
+
readonly options: ILoaderOptions;
|
|
263
|
+
readonly packagePath: readonly string[];
|
|
264
|
+
readonly scope: FluidObject;
|
|
265
|
+
setChannelDirty(address: string): void;
|
|
266
|
+
// (undocumented)
|
|
267
|
+
readonly storage: IDocumentStorageService;
|
|
268
|
+
submitMessage(type: string, content: any, localOpMetadata: unknown): void;
|
|
269
|
+
submitSignal(type: string, content: any, targetClientId?: string): void;
|
|
270
|
+
// (undocumented)
|
|
271
|
+
uploadBlob(blob: ArrayBufferLike, signal?: AbortSignal): Promise<IFluidHandle<ArrayBufferLike>>;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
// @public (undocumented)
|
|
275
|
+
export interface IFluidDataStoreContextDetached extends IFluidDataStoreContext {
|
|
276
|
+
attachRuntime(factory: IProvideFluidDataStoreFactory, dataStoreRuntime: IFluidDataStoreChannel): Promise<void>;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
// @public (undocumented)
|
|
280
|
+
export interface IFluidDataStoreContextEvents extends IEvent {
|
|
281
|
+
// (undocumented)
|
|
282
|
+
(event: "attaching" | "attached", listener: () => void): any;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
// @public (undocumented)
|
|
286
|
+
export const IFluidDataStoreFactory: keyof IProvideFluidDataStoreFactory;
|
|
287
|
+
|
|
288
|
+
// @public
|
|
289
|
+
export interface IFluidDataStoreFactory extends IProvideFluidDataStoreFactory {
|
|
290
|
+
instantiateDataStore(context: IFluidDataStoreContext, existing: boolean): Promise<IFluidDataStoreChannel>;
|
|
291
|
+
type: string;
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
// @public (undocumented)
|
|
295
|
+
export const IFluidDataStoreRegistry: keyof IProvideFluidDataStoreRegistry;
|
|
296
|
+
|
|
297
|
+
// @public
|
|
298
|
+
export interface IFluidDataStoreRegistry extends IProvideFluidDataStoreRegistry {
|
|
299
|
+
// (undocumented)
|
|
300
|
+
get(name: string): Promise<FluidDataStoreRegistryEntry | undefined>;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
// @public
|
|
304
|
+
export interface IGarbageCollectionData {
|
|
305
|
+
gcNodes: {
|
|
306
|
+
[id: string]: string[];
|
|
307
|
+
};
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
// @public
|
|
311
|
+
export interface IGarbageCollectionDetailsBase {
|
|
312
|
+
gcData?: IGarbageCollectionData;
|
|
313
|
+
usedRoutes?: string[];
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
// @public
|
|
317
|
+
export interface IIdCompressor {
|
|
318
|
+
decompress(id: SessionSpaceCompressedId): StableId;
|
|
319
|
+
generateCompressedId(): SessionSpaceCompressedId;
|
|
320
|
+
// (undocumented)
|
|
321
|
+
localSessionId: SessionId;
|
|
322
|
+
normalizeToOpSpace(id: SessionSpaceCompressedId): OpSpaceCompressedId;
|
|
323
|
+
normalizeToSessionSpace(id: OpSpaceCompressedId, originSessionId: SessionId): SessionSpaceCompressedId;
|
|
324
|
+
recompress(uncompressed: StableId): SessionSpaceCompressedId;
|
|
325
|
+
tryRecompress(uncompressed: StableId): SessionSpaceCompressedId | undefined;
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
// @public (undocumented)
|
|
329
|
+
export interface IIdCompressorCore {
|
|
330
|
+
finalizeCreationRange(range: IdCreationRange): void;
|
|
331
|
+
serialize(withSession: true): SerializedIdCompressorWithOngoingSession;
|
|
332
|
+
serialize(withSession: false): SerializedIdCompressorWithNoSession;
|
|
333
|
+
takeNextCreationRange(): IdCreationRange;
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
// @public
|
|
337
|
+
export interface IInboundSignalMessage extends ISignalMessage {
|
|
338
|
+
// (undocumented)
|
|
339
|
+
type: string;
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
// @public
|
|
343
|
+
export type InboundAttachMessage = Omit<IAttachMessage, "snapshot"> & {
|
|
344
|
+
snapshot: IAttachMessage["snapshot"] | null;
|
|
345
|
+
};
|
|
346
|
+
|
|
347
|
+
// @public
|
|
348
|
+
export const initialClusterCapacity = 512;
|
|
349
|
+
|
|
350
|
+
// @public (undocumented)
|
|
351
|
+
export interface IProvideFluidDataStoreFactory {
|
|
352
|
+
// (undocumented)
|
|
353
|
+
readonly IFluidDataStoreFactory: IFluidDataStoreFactory;
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
// @public (undocumented)
|
|
357
|
+
export interface IProvideFluidDataStoreRegistry {
|
|
358
|
+
// (undocumented)
|
|
359
|
+
readonly IFluidDataStoreRegistry: IFluidDataStoreRegistry;
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
// @public (undocumented)
|
|
363
|
+
export interface ISignalEnvelope {
|
|
364
|
+
address?: string;
|
|
365
|
+
clientSignalSequenceNumber: number;
|
|
366
|
+
contents: {
|
|
367
|
+
type: string;
|
|
368
|
+
content: any;
|
|
369
|
+
};
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
// @public
|
|
373
|
+
export interface ISummarizeInternalResult extends ISummarizeResult {
|
|
374
|
+
// (undocumented)
|
|
375
|
+
id: string;
|
|
376
|
+
pathPartsForChildren?: string[];
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
// @public
|
|
380
|
+
export interface ISummarizeResult {
|
|
381
|
+
// (undocumented)
|
|
382
|
+
stats: ISummaryStats;
|
|
383
|
+
// (undocumented)
|
|
384
|
+
summary: SummaryTree;
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
// @public (undocumented)
|
|
388
|
+
export interface ISummarizerNode {
|
|
389
|
+
// (undocumented)
|
|
390
|
+
createChild(
|
|
391
|
+
summarizeInternalFn: SummarizeInternalFn,
|
|
392
|
+
id: string,
|
|
393
|
+
createParam: CreateChildSummarizerNodeParam,
|
|
394
|
+
config?: ISummarizerNodeConfig): ISummarizerNode;
|
|
395
|
+
// (undocumented)
|
|
396
|
+
getChild(id: string): ISummarizerNode | undefined;
|
|
397
|
+
invalidate(sequenceNumber: number): void;
|
|
398
|
+
isSummaryInProgress?(): boolean;
|
|
399
|
+
recordChange(op: ISequencedDocumentMessage): void;
|
|
400
|
+
readonly referenceSequenceNumber: number;
|
|
401
|
+
summarize(fullTree: boolean, trackState?: boolean, telemetryContext?: ITelemetryContext): Promise<ISummarizeResult>;
|
|
402
|
+
updateBaseSummaryState(snapshot: ISnapshotTree): void;
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
// @public (undocumented)
|
|
406
|
+
export interface ISummarizerNodeConfig {
|
|
407
|
+
readonly canReuseHandle?: boolean;
|
|
408
|
+
readonly throwOnFailure?: true;
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
// @public (undocumented)
|
|
412
|
+
export interface ISummarizerNodeConfigWithGC extends ISummarizerNodeConfig {
|
|
413
|
+
readonly gcDisabled?: boolean;
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
// @public
|
|
417
|
+
export interface ISummarizerNodeWithGC extends ISummarizerNode {
|
|
418
|
+
// (undocumented)
|
|
419
|
+
createChild(
|
|
420
|
+
summarizeInternalFn: SummarizeInternalFn,
|
|
421
|
+
id: string,
|
|
422
|
+
createParam: CreateChildSummarizerNodeParam,
|
|
423
|
+
config?: ISummarizerNodeConfigWithGC, getGCDataFn?: (fullGC?: boolean) => Promise<IGarbageCollectionData>,
|
|
424
|
+
getBaseGCDetailsFn?: () => Promise<IGarbageCollectionDetailsBase>): ISummarizerNodeWithGC;
|
|
425
|
+
deleteChild(id: string): void;
|
|
426
|
+
// (undocumented)
|
|
427
|
+
getChild(id: string): ISummarizerNodeWithGC | undefined;
|
|
428
|
+
getGCData(fullGC?: boolean): Promise<IGarbageCollectionData>;
|
|
429
|
+
isReferenced(): boolean;
|
|
430
|
+
updateUsedRoutes(usedRoutes: string[]): void;
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
// @public
|
|
434
|
+
export interface ISummaryStats {
|
|
435
|
+
// (undocumented)
|
|
436
|
+
blobNodeCount: number;
|
|
437
|
+
// (undocumented)
|
|
438
|
+
handleNodeCount: number;
|
|
439
|
+
// (undocumented)
|
|
440
|
+
totalBlobSize: number;
|
|
441
|
+
// (undocumented)
|
|
442
|
+
treeNodeCount: number;
|
|
443
|
+
// (undocumented)
|
|
444
|
+
unreferencedBlobSize: number;
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
// @public
|
|
448
|
+
export interface ISummaryTreeWithStats {
|
|
449
|
+
stats: ISummaryStats;
|
|
450
|
+
summary: ISummaryTree;
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
// @public
|
|
454
|
+
export interface ITelemetryContext {
|
|
455
|
+
get(prefix: string, property: string): TelemetryEventPropertyType;
|
|
456
|
+
serialize(): string;
|
|
457
|
+
set(prefix: string, property: string, value: TelemetryEventPropertyType): void;
|
|
458
|
+
setMultiple(prefix: string, property: string, values: Record<string, TelemetryEventPropertyType>): void;
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
// @alpha
|
|
462
|
+
export interface LocalAttributionKey {
|
|
463
|
+
// (undocumented)
|
|
464
|
+
type: "local";
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
// @public
|
|
468
|
+
export type NamedFluidDataStoreRegistryEntries = Iterable<NamedFluidDataStoreRegistryEntry>;
|
|
469
|
+
|
|
470
|
+
// @public
|
|
471
|
+
export type NamedFluidDataStoreRegistryEntry = [string, Promise<FluidDataStoreRegistryEntry>];
|
|
472
|
+
|
|
473
|
+
// @alpha
|
|
474
|
+
export interface OpAttributionKey {
|
|
475
|
+
seq: number;
|
|
476
|
+
type: "op";
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
// @public
|
|
480
|
+
export type OpSpaceCompressedId = number & {
|
|
481
|
+
readonly OpNormalized: "9209432d-a959-4df7-b2ad-767ead4dbcae";
|
|
482
|
+
};
|
|
483
|
+
|
|
484
|
+
// @public
|
|
485
|
+
export type SerializedIdCompressor = string & {
|
|
486
|
+
readonly _serializedIdCompressor: "8c73c57c-1cf4-4278-8915-6444cb4f6af5";
|
|
487
|
+
};
|
|
488
|
+
|
|
489
|
+
// @public
|
|
490
|
+
export type SerializedIdCompressorWithNoSession = SerializedIdCompressor & {
|
|
491
|
+
readonly _noLocalState: "3aa2e1e8-cc28-4ea7-bc1a-a11dc3f26dfb";
|
|
492
|
+
};
|
|
493
|
+
|
|
494
|
+
// @public
|
|
495
|
+
export type SerializedIdCompressorWithOngoingSession = SerializedIdCompressor & {
|
|
496
|
+
readonly _hasLocalState: "1281acae-6d14-47e7-bc92-71c8ee0819cb";
|
|
497
|
+
};
|
|
498
|
+
|
|
499
|
+
// @public
|
|
500
|
+
export type SessionId = StableId & {
|
|
501
|
+
readonly SessionId: "4498f850-e14e-4be9-8db0-89ec00997e58";
|
|
502
|
+
};
|
|
503
|
+
|
|
504
|
+
// @public
|
|
505
|
+
export type SessionSpaceCompressedId = number & {
|
|
506
|
+
readonly SessionUnique: "cea55054-6b82-4cbf-ad19-1fa645ea3b3e";
|
|
507
|
+
};
|
|
508
|
+
|
|
509
|
+
// @public
|
|
510
|
+
export type StableId = string & {
|
|
511
|
+
readonly StableId: "53172b0d-a3d5-41ea-bd75-b43839c97f5a";
|
|
512
|
+
};
|
|
513
|
+
|
|
514
|
+
// @public (undocumented)
|
|
515
|
+
export type SummarizeInternalFn = (fullTree: boolean, trackState: boolean, telemetryContext?: ITelemetryContext, incrementalSummaryContext?: IExperimentalIncrementalSummaryContext) => Promise<ISummarizeInternalResult>;
|
|
516
|
+
|
|
517
|
+
// @public (undocumented)
|
|
518
|
+
export const totalBlobSizePropertyName = "TotalBlobSize";
|
|
519
|
+
|
|
520
|
+
// @public
|
|
521
|
+
export const VisibilityState: {
|
|
522
|
+
NotVisible: string;
|
|
523
|
+
LocallyVisible: string;
|
|
524
|
+
GloballyVisible: string;
|
|
525
|
+
};
|
|
526
|
+
|
|
527
|
+
// @public (undocumented)
|
|
528
|
+
export type VisibilityState = (typeof VisibilityState)[keyof typeof VisibilityState];
|
|
529
|
+
|
|
530
|
+
// (No @packageDocumentation comment for this package)
|
|
531
|
+
|
|
532
|
+
```
|
|
@@ -64,7 +64,7 @@ export declare const VisibilityState: {
|
|
|
64
64
|
*/
|
|
65
65
|
GloballyVisible: string;
|
|
66
66
|
};
|
|
67
|
-
export type VisibilityState = typeof VisibilityState[keyof typeof VisibilityState];
|
|
67
|
+
export type VisibilityState = (typeof VisibilityState)[keyof typeof VisibilityState];
|
|
68
68
|
export interface IContainerRuntimeBaseEvents extends IEvent {
|
|
69
69
|
(event: "batchBegin", listener: (op: ISequencedDocumentMessage) => void): any;
|
|
70
70
|
/**
|
|
@@ -126,7 +126,7 @@ export interface IDataStore {
|
|
|
126
126
|
* Issue a request against the DataStore for a resource within it.
|
|
127
127
|
* @param request - The request to be issued against the DataStore
|
|
128
128
|
*
|
|
129
|
-
* @deprecated
|
|
129
|
+
* @deprecated Requesting an arbitrary URL with headers will not be supported in a future major release.
|
|
130
130
|
* Instead, access the objects within the DataStore using entryPoint, and then navigate from there using
|
|
131
131
|
* app-specific logic (e.g. retrieving a handle from a DDS, or the entryPoint object could implement a request paradigm itself)
|
|
132
132
|
*
|
|
@@ -134,7 +134,7 @@ export interface IDataStore {
|
|
|
134
134
|
*/
|
|
135
135
|
request(request: IRequest): Promise<IResponse>;
|
|
136
136
|
/**
|
|
137
|
-
* @deprecated
|
|
137
|
+
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
|
|
138
138
|
*/
|
|
139
139
|
readonly IFluidRouter: IFluidRouter;
|
|
140
140
|
}
|
|
@@ -283,13 +283,13 @@ export interface IFluidDataStoreChannel extends IDisposable {
|
|
|
283
283
|
readonly entryPoint: IFluidHandle<FluidObject>;
|
|
284
284
|
request(request: IRequest): Promise<IResponse>;
|
|
285
285
|
/**
|
|
286
|
-
* @deprecated
|
|
286
|
+
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
|
|
287
287
|
*/
|
|
288
288
|
readonly IFluidRouter: IFluidRouter;
|
|
289
289
|
}
|
|
290
290
|
export type CreateChildSummarizerNodeFn = (summarizeInternal: SummarizeInternalFn, getGCDataFn: (fullGC?: boolean) => Promise<IGarbageCollectionData>,
|
|
291
291
|
/**
|
|
292
|
-
* @deprecated
|
|
292
|
+
* @deprecated The functionality to get base GC details has been moved to summarizer node.
|
|
293
293
|
*/
|
|
294
294
|
getBaseGCDetailsFn?: () => Promise<IGarbageCollectionDetailsBase>) => ISummarizerNodeWithGC;
|
|
295
295
|
export interface IFluidDataStoreContextEvents extends IEvent {
|
|
@@ -366,8 +366,9 @@ export interface IFluidDataStoreContext extends IEventProvider<IFluidDataStoreCo
|
|
|
366
366
|
* Submits the signal to be sent to other clients.
|
|
367
367
|
* @param type - Type of the signal.
|
|
368
368
|
* @param content - Content of the signal.
|
|
369
|
+
* @param targetClientId - When specified, the signal is only sent to the provided client id.
|
|
369
370
|
*/
|
|
370
|
-
submitSignal(type: string, content: any): void;
|
|
371
|
+
submitSignal(type: string, content: any, targetClientId?: string): void;
|
|
371
372
|
/**
|
|
372
373
|
* Called to make the data store locally visible in the container. This happens automatically for root data stores
|
|
373
374
|
* when they are marked as root. For non-root data stores, this happens when their handle is added to a visible DDS.
|
|
@@ -398,7 +399,7 @@ export interface IFluidDataStoreContext extends IEventProvider<IFluidDataStoreCo
|
|
|
398
399
|
createParam: CreateChildSummarizerNodeParam): CreateChildSummarizerNodeFn;
|
|
399
400
|
uploadBlob(blob: ArrayBufferLike, signal?: AbortSignal): Promise<IFluidHandle<ArrayBufferLike>>;
|
|
400
401
|
/**
|
|
401
|
-
* @deprecated
|
|
402
|
+
* @deprecated The functionality to get base GC details has been moved to summarizer node.
|
|
402
403
|
*
|
|
403
404
|
* Returns the GC details in the initial summary of this data store. This is used to initialize the data store
|
|
404
405
|
* and its children with the GC details from the previous summary.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dataStoreContext.d.ts","sourceRoot":"","sources":["../src/dataStoreContext.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,MAAM,EACN,cAAc,EACd,oBAAoB,EACpB,WAAW,EAEX,YAAY,EACZ,0BAA0B,EAC1B,YAAY,EACZ,QAAQ,EACR,SAAS,EACT,WAAW,EACX,mBAAmB,EACnB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACN,SAAS,EACT,aAAa,EACb,WAAW,EACX,cAAc,EACd,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,uBAAuB,EAAE,MAAM,oCAAoC,CAAC;AAC7E,OAAO,EACN,cAAc,EACd,gBAAgB,EAChB,cAAc,EACd,yBAAyB,EACzB,aAAa,EACb,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,6BAA6B,EAAE,MAAM,oBAAoB,CAAC;AACnE,OAAO,EAAE,8BAA8B,EAAE,MAAM,qBAAqB,CAAC;AACrE,OAAO,EAAE,sBAAsB,EAAE,6BAA6B,EAAE,MAAM,qBAAqB,CAAC;AAC5F,OAAO,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AACnD,OAAO,EACN,8BAA8B,EAC9B,qBAAqB,EACrB,qBAAqB,EACrB,iBAAiB,EACjB,mBAAmB,EACnB,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD;;GAEG;AACH,oBAAY,SAAS;IACpB;;OAEG;IACH,SAAS,IAAA;IAET;;;OAGG;IACH,SAAS,IAAA;CACT;AAED,oBAAY,qBAAqB;IAChC;;;;;;;;OAQG;IACH,KAAK,IAAI;CACT;AAED;;;GAGG;AACH,eAAO,MAAM,eAAe;IAC3B;;OAEG;;IAGH;;;;OAIG;;IAGH;;;;;;;;OAQG;;CAEH,CAAC;AACF,MAAM,MAAM,eAAe,GAAG,OAAO,eAAe,CAAC,MAAM,OAAO,eAAe,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"dataStoreContext.d.ts","sourceRoot":"","sources":["../src/dataStoreContext.ts"],"names":[],"mappings":"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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dataStoreContext.js","sourceRoot":"","sources":["../src/dataStoreContext.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AA2CH;;GAEG;AACH,IAAY,SAWX;AAXD,WAAY,SAAS;IACpB;;OAEG;IACH,mDAAS,CAAA;IAET;;;OAGG;IACH,mDAAS,CAAA;AACV,CAAC,EAXW,SAAS,yBAAT,SAAS,QAWpB;AAED,IAAY,qBAWX;AAXD,WAAY,qBAAqB;IAChC;;;;;;;;OAQG;IACH,mEAAS,CAAA;AACV,CAAC,EAXW,qBAAqB,qCAArB,qBAAqB,QAWhC;AAED;;;GAGG;AACU,QAAA,eAAe,GAAG;IAC9B;;OAEG;IACH,UAAU,EAAE,YAAY;IAExB;;;;OAIG;IACH,cAAc,EAAE,gBAAgB;IAEhC;;;;;;;;OAQG;IACH,eAAe,EAAE,iBAAiB;CAClC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport {\n\tIEvent,\n\tIEventProvider,\n\tITelemetryBaseLogger,\n\tIDisposable,\n\t// eslint-disable-next-line import/no-deprecated\n\tIFluidRouter,\n\tIProvideFluidHandleContext,\n\tIFluidHandle,\n\tIRequest,\n\tIResponse,\n\tFluidObject,\n\tIFluidHandleContext,\n} from \"@fluidframework/core-interfaces\";\nimport {\n\tIAudience,\n\tIDeltaManager,\n\tAttachState,\n\tILoaderOptions,\n} from \"@fluidframework/container-definitions\";\nimport { IDocumentStorageService } from \"@fluidframework/driver-definitions\";\nimport {\n\tIClientDetails,\n\tIDocumentMessage,\n\tIQuorumClients,\n\tISequencedDocumentMessage,\n\tISnapshotTree,\n} from \"@fluidframework/protocol-definitions\";\nimport { IProvideFluidDataStoreFactory } from \"./dataStoreFactory\";\nimport { IProvideFluidDataStoreRegistry } from \"./dataStoreRegistry\";\nimport { IGarbageCollectionData, IGarbageCollectionDetailsBase } from \"./garbageCollection\";\nimport { IInboundSignalMessage } from \"./protocol\";\nimport {\n\tCreateChildSummarizerNodeParam,\n\tISummarizerNodeWithGC,\n\tISummaryTreeWithStats,\n\tITelemetryContext,\n\tSummarizeInternalFn,\n} from \"./summary\";\nimport { IIdCompressor } from \"./id-compressor\";\n\n/**\n * Runtime flush mode handling\n */\nexport enum FlushMode {\n\t/**\n\t * In Immediate flush mode the runtime will immediately send all operations to the driver layer.\n\t */\n\tImmediate,\n\n\t/**\n\t * When in TurnBased flush mode the runtime will buffer operations in the current turn and send them as a single\n\t * batch at the end of the turn. The flush call on the runtime can be used to force send the current batch.\n\t */\n\tTurnBased,\n}\n\nexport enum FlushModeExperimental {\n\t/**\n\t * When in Async flush mode, the runtime will accumulate all operations across JS turns and send them as a single\n\t * batch when all micro-tasks are complete.\n\t *\n\t * This feature requires a version of the loader which supports reference sequence numbers. If an older version of\n\t * the loader is used, the runtime will fall back on FlushMode.TurnBased.\n\t *\n\t * @experimental - Not ready for use\n\t */\n\tAsync = 2,\n}\n\n/**\n * This tells the visibility state of a Fluid object. It basically tracks whether the object is not visible, visible\n * locally within the container only or visible globally to all clients.\n */\nexport const VisibilityState = {\n\t/**\n\t * Indicates that the object is not visible. This is the state when an object is first created.\n\t */\n\tNotVisible: \"NotVisible\",\n\n\t/**\n\t * Indicates that the object is visible locally within the container. This is the state when an object is attached\n\t * to the container's graph but the container itself isn't globally visible. The object's state goes from not\n\t * visible to locally visible.\n\t */\n\tLocallyVisible: \"LocallyVisible\",\n\n\t/**\n\t * Indicates that the object is visible globally to all clients. This is the state of an object in 2 scenarios:\n\t *\n\t * 1. It is attached to the container's graph when the container is globally visible. The object's state goes from\n\t * not visible to globally visible.\n\t *\n\t * 2. When a container becomes globally visible, all locally visible objects go from locally visible to globally\n\t * visible.\n\t */\n\tGloballyVisible: \"GloballyVisible\",\n};\nexport type VisibilityState = typeof VisibilityState[keyof typeof VisibilityState];\n\nexport interface IContainerRuntimeBaseEvents extends IEvent {\n\t(event: \"batchBegin\", listener: (op: ISequencedDocumentMessage) => void);\n\t/**\n\t * @param runtimeMessage - tells if op is runtime op. If it is, it was unpacked, i.e. it's type and content\n\t * represent internal container runtime type / content.\n\t */\n\t(event: \"op\", listener: (op: ISequencedDocumentMessage, runtimeMessage?: boolean) => void);\n\t(event: \"batchEnd\", listener: (error: any, op: ISequencedDocumentMessage) => void);\n\t(event: \"signal\", listener: (message: IInboundSignalMessage, local: boolean) => void);\n}\n\n/**\n * Encapsulates the return codes of the aliasing API.\n *\n * 'Success' - the datastore has been successfully aliased. It can now be used.\n * 'Conflict' - there is already a datastore bound to the provided alias. To acquire it's entry point, use\n * the `IContainerRuntime.getAliasedDataStoreEntryPoint` function. The current datastore should be discarded\n * and will be garbage collected. The current datastore cannot be aliased to a different value.\n * 'AlreadyAliased' - the datastore has already been previously bound to another alias name.\n */\nexport type AliasResult = \"Success\" | \"Conflict\" | \"AlreadyAliased\";\n\n/**\n * Exposes some functionality/features of a data store:\n * - Handle to the data store's entryPoint\n * - Fluid router for the data store\n * - Can be assigned an alias\n */\nexport interface IDataStore {\n\t/**\n\t * Attempt to assign an alias to the datastore.\n\t * If the operation succeeds, the datastore can be referenced\n\t * by the supplied alias and will not be garbage collected.\n\t *\n\t * @param alias - Given alias for this datastore.\n\t * @returns A promise with the {@link AliasResult}\n\t */\n\ttrySetAlias(alias: string): Promise<AliasResult>;\n\n\t/**\n\t * Exposes a handle to the root object / entryPoint of the data store. Use this as the primary way of interacting\n\t * with it.\n\t */\n\treadonly entryPoint: IFluidHandle<FluidObject>;\n\n\t/**\n\t * @deprecated Requesting will not be supported in a future major release.\n\t * Instead, access the objects within the DataStore using entryPoint, and then navigate from there using\n\t * app-specific logic (e.g. retrieving a handle from a DDS, or the entryPoint object could implement a request paradigm itself)\n\t *\n\t * IMPORTANT: This overload is provided for back-compat where IDataStore.request(\\{ url: \"/\" \\}) is already implemented and used.\n\t * The functionality it can provide (if the DataStore implementation is built for it) is redundant with @see {@link IDataStore.entryPoint}.\n\t *\n\t * Refer to Removing-IFluidRouter.md for details on migrating from the request pattern to using entryPoint.\n\t *\n\t * @param request - Only requesting \\{ url: \"/\" \\} is supported, requesting arbitrary URLs is deprecated.\n\t */\n\trequest(request: { url: \"/\"; headers?: undefined }): Promise<IResponse>;\n\n\t/**\n\t * Issue a request against the DataStore for a resource within it.\n\t * @param request - The request to be issued against the DataStore\n\t *\n\t * @deprecated - Requesting an arbitrary URL with headers will not be supported in a future major release.\n\t * Instead, access the objects within the DataStore using entryPoint, and then navigate from there using\n\t * app-specific logic (e.g. retrieving a handle from a DDS, or the entryPoint object could implement a request paradigm itself)\n\t *\n\t * Refer to Removing-IFluidRouter.md for details on migrating from the request pattern to using entryPoint.\n\t */\n\trequest(request: IRequest): Promise<IResponse>;\n\n\t/**\n\t * @deprecated - Will be removed in future major release. Migrate all usage of IFluidRouter to the \"entryPoint\" pattern. Refer to Removing-IFluidRouter.md\n\t */\n\t// eslint-disable-next-line import/no-deprecated\n\treadonly IFluidRouter: IFluidRouter;\n}\n\n/**\n * A reduced set of functionality of IContainerRuntime that a data store context/data store runtime will need\n * TODO: this should be merged into IFluidDataStoreContext\n */\nexport interface IContainerRuntimeBase extends IEventProvider<IContainerRuntimeBaseEvents> {\n\treadonly logger: ITelemetryBaseLogger;\n\treadonly clientDetails: IClientDetails;\n\n\t/**\n\t * Invokes the given callback and guarantees that all operations generated within the callback will be ordered\n\t * sequentially. Total size of all messages must be less than maxOpSize.\n\t */\n\torderSequentially(callback: () => void): void;\n\n\t/**\n\t * Executes a request against the container runtime\n\t * @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the \"entryPoint\" pattern. Refer to Removing-IFluidRouter.md\n\t */\n\trequest(request: IRequest): Promise<IResponse>;\n\n\t/**\n\t * Submits a container runtime level signal to be sent to other clients.\n\t * @param type - Type of the signal.\n\t * @param content - Content of the signal.\n\t */\n\tsubmitSignal(type: string, content: any): void;\n\n\t/**\n\t * @deprecated 0.16 Issue #1537, #3631\n\t * @internal\n\t */\n\t_createDataStoreWithProps(\n\t\tpkg: string | string[],\n\t\tprops?: any,\n\t\tid?: string,\n\t): Promise<IDataStore>;\n\n\t/**\n\t * Creates a data store and returns an object that exposes a handle to the data store's entryPoint, and also serves\n\t * as the data store's router. The data store is not bound to a container, and in such state is not persisted to\n\t * storage (file). Storing the entryPoint handle (or any other handle inside the data store, e.g. for DDS) into an\n\t * already attached DDS (or non-attached DDS that will eventually get attached to storage) will result in this\n\t * store being attached to storage.\n\t * @param pkg - Package name of the data store factory\n\t */\n\tcreateDataStore(pkg: string | string[]): Promise<IDataStore>;\n\n\t/**\n\t * Creates detached data store context. Only after context.attachRuntime() is called,\n\t * data store initialization is considered complete.\n\t */\n\tcreateDetachedDataStore(pkg: Readonly<string[]>): IFluidDataStoreContextDetached;\n\n\t/**\n\t * Get an absolute url for a provided container-relative request.\n\t * Returns undefined if the container or data store isn't attached to storage.\n\t * @param relativeUrl - A relative request within the container\n\t */\n\tgetAbsoluteUrl(relativeUrl: string): Promise<string | undefined>;\n\n\tuploadBlob(blob: ArrayBufferLike, signal?: AbortSignal): Promise<IFluidHandle<ArrayBufferLike>>;\n\n\t/**\n\t * Returns the current quorum.\n\t */\n\tgetQuorum(): IQuorumClients;\n\n\t/**\n\t * Returns the current audience.\n\t */\n\tgetAudience(): IAudience;\n\n\t/**\n\t * @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the \"entryPoint\" pattern. Refer to Removing-IFluidRouter.md\n\t */\n\treadonly IFluidHandleContext: IFluidHandleContext;\n}\n\n/**\n * Minimal interface a data store runtime needs to provide for IFluidDataStoreContext to bind to control.\n *\n * Functionality include attach, snapshot, op/signal processing, request routes, expose an entryPoint,\n * and connection state notifications\n */\nexport interface IFluidDataStoreChannel extends IDisposable {\n\treadonly id: string;\n\n\t/**\n\t * Indicates the attachment state of the channel to a host service.\n\t */\n\treadonly attachState: AttachState;\n\n\treadonly visibilityState: VisibilityState;\n\n\t/**\n\t * Runs through the graph and attaches the bound handles. Then binds this runtime to the container.\n\t * @deprecated This will be removed in favor of {@link IFluidDataStoreChannel.makeVisibleAndAttachGraph}.\n\t */\n\tattachGraph(): void;\n\n\t/**\n\t * Makes the data store channel visible in the container. Also, runs through its graph and attaches all\n\t * bound handles that represent its dependencies in the container's graph.\n\t */\n\tmakeVisibleAndAttachGraph(): void;\n\n\t/**\n\t * Retrieves the summary used as part of the initial summary message\n\t */\n\tgetAttachSummary(telemetryContext?: ITelemetryContext): ISummaryTreeWithStats;\n\n\t/**\n\t * Processes the op.\n\t */\n\tprocess(message: ISequencedDocumentMessage, local: boolean, localOpMetadata: unknown): void;\n\n\t/**\n\t * Processes the signal.\n\t */\n\tprocessSignal(message: any, local: boolean): void;\n\n\t/**\n\t * Generates a summary for the channel.\n\t * Introduced with summarizerNode - will be required in a future release.\n\t * @param fullTree - true to bypass optimizations and force a full summary tree.\n\t * @param trackState - This tells whether we should track state from this summary.\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<ISummaryTreeWithStats>;\n\n\t/**\n\t * Returns the data used for garbage collection. This includes a list of GC nodes that represent this context\n\t * including any of its children. Each node has a list 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 * After GC has run, called to notify this channel of routes that are used in it.\n\t * @param usedRoutes - The routes that are used in this channel.\n\t */\n\tupdateUsedRoutes(usedRoutes: string[]): void;\n\n\t/**\n\t * Notifies this object about changes in the connection state.\n\t * @param value - New connection state.\n\t * @param clientId - ID of the client. It's old ID when in disconnected state and\n\t * it's new client ID when we are connecting or connected.\n\t */\n\tsetConnectionState(connected: boolean, clientId?: string);\n\n\t/**\n\t * Ask the DDS to resubmit a message. This could be because we reconnected and this message was not acked.\n\t * @param type - The type of the original message.\n\t * @param content - The content of the original message.\n\t * @param localOpMetadata - The local metadata associated with the original message.\n\t */\n\treSubmit(type: string, content: any, localOpMetadata: unknown);\n\n\tapplyStashedOp(content: any): Promise<unknown>;\n\n\t/**\n\t * Revert a local message.\n\t * @param type - The type of the original message.\n\t * @param content - The content of the original message.\n\t * @param localOpMetadata - The local metadata associated with the original message.\n\t */\n\trollback?(type: string, content: any, localOpMetadata: unknown): void;\n\n\t/**\n\t * Exposes a handle to the root object / entryPoint of the component. Use this as the primary way of interacting\n\t * with the component.\n\t */\n\treadonly entryPoint: IFluidHandle<FluidObject>;\n\n\trequest(request: IRequest): Promise<IResponse>;\n\n\t/**\n\t * @deprecated - Will be removed in future major release. Migrate all usage of IFluidRouter to the \"entryPoint\" pattern. Refer to Removing-IFluidRouter.md\n\t */\n\t// eslint-disable-next-line import/no-deprecated\n\treadonly IFluidRouter: IFluidRouter;\n}\n\nexport type CreateChildSummarizerNodeFn = (\n\tsummarizeInternal: SummarizeInternalFn,\n\tgetGCDataFn: (fullGC?: boolean) => Promise<IGarbageCollectionData>,\n\t/**\n\t * @deprecated - The functionality to get base GC details has been moved to summarizer node.\n\t */\n\tgetBaseGCDetailsFn?: () => Promise<IGarbageCollectionDetailsBase>,\n) => ISummarizerNodeWithGC;\n\nexport interface IFluidDataStoreContextEvents extends IEvent {\n\t(event: \"attaching\" | \"attached\", listener: () => void);\n}\n\n/**\n * Represents the context for the data store. It is used by the data store runtime to\n * get information and call functionality to the container.\n */\nexport interface IFluidDataStoreContext\n\textends IEventProvider<IFluidDataStoreContextEvents>,\n\t\tPartial<IProvideFluidDataStoreRegistry>,\n\t\tIProvideFluidHandleContext {\n\treadonly id: string;\n\t/**\n\t * A data store created by a client, is a local data store for that client. Also, when a detached container loads\n\t * from a snapshot, all the data stores are treated as local data stores because at that stage the container\n\t * still doesn't exists in storage and so the data store couldn't have been created by any other client.\n\t * Value of this never changes even after the data store is attached.\n\t * As implementer of data store runtime, you can use this property to check that this data store belongs to this\n\t * client and hence implement any scenario based on that.\n\t */\n\treadonly isLocalDataStore: boolean;\n\t/**\n\t * The package path of the data store as per the package factory.\n\t */\n\treadonly packagePath: readonly string[];\n\treadonly options: ILoaderOptions;\n\treadonly clientId: string | undefined;\n\treadonly connected: boolean;\n\treadonly deltaManager: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>;\n\treadonly storage: IDocumentStorageService;\n\treadonly baseSnapshot: ISnapshotTree | undefined;\n\treadonly logger: ITelemetryBaseLogger;\n\treadonly clientDetails: IClientDetails;\n\treadonly idCompressor?: IIdCompressor;\n\t/**\n\t * Indicates the attachment state of the data store to a host service.\n\t */\n\treadonly attachState: AttachState;\n\n\treadonly containerRuntime: IContainerRuntimeBase;\n\n\t/**\n\t * @deprecated 0.16 Issue #1635, #3631\n\t */\n\treadonly createProps?: any;\n\n\t/**\n\t * Ambient services provided with the context\n\t */\n\treadonly scope: FluidObject;\n\n\t/**\n\t * Returns the current quorum.\n\t */\n\tgetQuorum(): IQuorumClients;\n\n\t/**\n\t * Returns the current audience.\n\t */\n\tgetAudience(): IAudience;\n\n\t/**\n\t * Invokes the given callback and expects that no ops are submitted\n\t * until execution finishes. If an op is submitted, an error will be raised.\n\t *\n\t * Can be disabled by feature gate `Fluid.ContainerRuntime.DisableOpReentryCheck`\n\t *\n\t * @param callback - the callback to be invoked\n\t */\n\tensureNoDataModelChanges<T>(callback: () => T): T;\n\n\t/**\n\t * Submits the message to be sent to other clients.\n\t * @param type - Type of the message.\n\t * @param content - Content of the message.\n\t * @param localOpMetadata - The local metadata associated with the message. This is kept locally and not sent to\n\t * the server. This will be sent back when this message is received back from the server. This is also sent if\n\t * we are asked to resubmit the message.\n\t */\n\tsubmitMessage(type: string, content: any, localOpMetadata: unknown): void;\n\n\t/**\n\t * Submits the signal to be sent to other clients.\n\t * @param type - Type of the signal.\n\t * @param content - Content of the signal.\n\t */\n\tsubmitSignal(type: string, content: any): void;\n\n\t/**\n\t * Called to make the data store locally visible in the container. This happens automatically for root data stores\n\t * when they are marked as root. For non-root data stores, this happens when their handle is added to a visible DDS.\n\t */\n\tmakeLocallyVisible(): void;\n\n\t/**\n\t * Call by IFluidDataStoreChannel, indicates that a channel is dirty and needs to be part of the summary.\n\t * @param address - The address of the channel that is dirty.\n\t */\n\tsetChannelDirty(address: string): void;\n\n\t/**\n\t * Get an absolute url to the container based on the provided relativeUrl.\n\t * Returns undefined if the container or data store isn't attached to storage.\n\t * @param relativeUrl - A relative request within the container\n\t */\n\tgetAbsoluteUrl(relativeUrl: string): Promise<string | undefined>;\n\n\tgetCreateChildSummarizerNodeFn(\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): CreateChildSummarizerNodeFn;\n\n\tuploadBlob(blob: ArrayBufferLike, signal?: AbortSignal): Promise<IFluidHandle<ArrayBufferLike>>;\n\n\t/**\n\t * @deprecated - The functionality to get base GC details has been moved to summarizer node.\n\t *\n\t * Returns the GC details in the initial summary of this data store. This is used to initialize the data store\n\t * and its children with the GC details from the previous summary.\n\t */\n\tgetBaseGCDetails(): Promise<IGarbageCollectionDetailsBase>;\n\n\t/**\n\t * Called when a new outbound reference is added to another node. This is used by garbage collection to identify\n\t * all references added in the system.\n\t * @param srcHandle - The handle of the node that added the reference.\n\t * @param outboundHandle - The handle of the outbound node that is referenced.\n\t */\n\taddedGCOutboundReference?(srcHandle: IFluidHandle, outboundHandle: IFluidHandle): void;\n}\n\nexport interface IFluidDataStoreContextDetached extends IFluidDataStoreContext {\n\t/**\n\t * Binds a runtime to the context.\n\t */\n\tattachRuntime(\n\t\tfactory: IProvideFluidDataStoreFactory,\n\t\tdataStoreRuntime: IFluidDataStoreChannel,\n\t): Promise<void>;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"dataStoreContext.js","sourceRoot":"","sources":["../src/dataStoreContext.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AA2CH;;GAEG;AACH,IAAY,SAWX;AAXD,WAAY,SAAS;IACpB;;OAEG;IACH,mDAAS,CAAA;IAET;;;OAGG;IACH,mDAAS,CAAA;AACV,CAAC,EAXW,SAAS,yBAAT,SAAS,QAWpB;AAED,IAAY,qBAWX;AAXD,WAAY,qBAAqB;IAChC;;;;;;;;OAQG;IACH,mEAAS,CAAA;AACV,CAAC,EAXW,qBAAqB,qCAArB,qBAAqB,QAWhC;AAED;;;GAGG;AACU,QAAA,eAAe,GAAG;IAC9B;;OAEG;IACH,UAAU,EAAE,YAAY;IAExB;;;;OAIG;IACH,cAAc,EAAE,gBAAgB;IAEhC;;;;;;;;OAQG;IACH,eAAe,EAAE,iBAAiB;CAClC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport {\n\tIEvent,\n\tIEventProvider,\n\tITelemetryBaseLogger,\n\tIDisposable,\n\t// eslint-disable-next-line import/no-deprecated\n\tIFluidRouter,\n\tIProvideFluidHandleContext,\n\tIFluidHandle,\n\tIRequest,\n\tIResponse,\n\tFluidObject,\n\tIFluidHandleContext,\n} from \"@fluidframework/core-interfaces\";\nimport {\n\tIAudience,\n\tIDeltaManager,\n\tAttachState,\n\tILoaderOptions,\n} from \"@fluidframework/container-definitions\";\nimport { IDocumentStorageService } from \"@fluidframework/driver-definitions\";\nimport {\n\tIClientDetails,\n\tIDocumentMessage,\n\tIQuorumClients,\n\tISequencedDocumentMessage,\n\tISnapshotTree,\n} from \"@fluidframework/protocol-definitions\";\nimport { IProvideFluidDataStoreFactory } from \"./dataStoreFactory\";\nimport { IProvideFluidDataStoreRegistry } from \"./dataStoreRegistry\";\nimport { IGarbageCollectionData, IGarbageCollectionDetailsBase } from \"./garbageCollection\";\nimport { IInboundSignalMessage } from \"./protocol\";\nimport {\n\tCreateChildSummarizerNodeParam,\n\tISummarizerNodeWithGC,\n\tISummaryTreeWithStats,\n\tITelemetryContext,\n\tSummarizeInternalFn,\n} from \"./summary\";\nimport { IIdCompressor } from \"./id-compressor\";\n\n/**\n * Runtime flush mode handling\n */\nexport enum FlushMode {\n\t/**\n\t * In Immediate flush mode the runtime will immediately send all operations to the driver layer.\n\t */\n\tImmediate,\n\n\t/**\n\t * When in TurnBased flush mode the runtime will buffer operations in the current turn and send them as a single\n\t * batch at the end of the turn. The flush call on the runtime can be used to force send the current batch.\n\t */\n\tTurnBased,\n}\n\nexport enum FlushModeExperimental {\n\t/**\n\t * When in Async flush mode, the runtime will accumulate all operations across JS turns and send them as a single\n\t * batch when all micro-tasks are complete.\n\t *\n\t * This feature requires a version of the loader which supports reference sequence numbers. If an older version of\n\t * the loader is used, the runtime will fall back on FlushMode.TurnBased.\n\t *\n\t * @experimental - Not ready for use\n\t */\n\tAsync = 2,\n}\n\n/**\n * This tells the visibility state of a Fluid object. It basically tracks whether the object is not visible, visible\n * locally within the container only or visible globally to all clients.\n */\nexport const VisibilityState = {\n\t/**\n\t * Indicates that the object is not visible. This is the state when an object is first created.\n\t */\n\tNotVisible: \"NotVisible\",\n\n\t/**\n\t * Indicates that the object is visible locally within the container. This is the state when an object is attached\n\t * to the container's graph but the container itself isn't globally visible. The object's state goes from not\n\t * visible to locally visible.\n\t */\n\tLocallyVisible: \"LocallyVisible\",\n\n\t/**\n\t * Indicates that the object is visible globally to all clients. This is the state of an object in 2 scenarios:\n\t *\n\t * 1. It is attached to the container's graph when the container is globally visible. The object's state goes from\n\t * not visible to globally visible.\n\t *\n\t * 2. When a container becomes globally visible, all locally visible objects go from locally visible to globally\n\t * visible.\n\t */\n\tGloballyVisible: \"GloballyVisible\",\n};\nexport type VisibilityState = (typeof VisibilityState)[keyof typeof VisibilityState];\n\nexport interface IContainerRuntimeBaseEvents extends IEvent {\n\t(event: \"batchBegin\", listener: (op: ISequencedDocumentMessage) => void);\n\t/**\n\t * @param runtimeMessage - tells if op is runtime op. If it is, it was unpacked, i.e. it's type and content\n\t * represent internal container runtime type / content.\n\t */\n\t(event: \"op\", listener: (op: ISequencedDocumentMessage, runtimeMessage?: boolean) => void);\n\t(event: \"batchEnd\", listener: (error: any, op: ISequencedDocumentMessage) => void);\n\t(event: \"signal\", listener: (message: IInboundSignalMessage, local: boolean) => void);\n}\n\n/**\n * Encapsulates the return codes of the aliasing API.\n *\n * 'Success' - the datastore has been successfully aliased. It can now be used.\n * 'Conflict' - there is already a datastore bound to the provided alias. To acquire it's entry point, use\n * the `IContainerRuntime.getAliasedDataStoreEntryPoint` function. The current datastore should be discarded\n * and will be garbage collected. The current datastore cannot be aliased to a different value.\n * 'AlreadyAliased' - the datastore has already been previously bound to another alias name.\n */\nexport type AliasResult = \"Success\" | \"Conflict\" | \"AlreadyAliased\";\n\n/**\n * Exposes some functionality/features of a data store:\n * - Handle to the data store's entryPoint\n * - Fluid router for the data store\n * - Can be assigned an alias\n */\nexport interface IDataStore {\n\t/**\n\t * Attempt to assign an alias to the datastore.\n\t * If the operation succeeds, the datastore can be referenced\n\t * by the supplied alias and will not be garbage collected.\n\t *\n\t * @param alias - Given alias for this datastore.\n\t * @returns A promise with the {@link AliasResult}\n\t */\n\ttrySetAlias(alias: string): Promise<AliasResult>;\n\n\t/**\n\t * Exposes a handle to the root object / entryPoint of the data store. Use this as the primary way of interacting\n\t * with it.\n\t */\n\treadonly entryPoint: IFluidHandle<FluidObject>;\n\n\t/**\n\t * @deprecated Requesting will not be supported in a future major release.\n\t * Instead, access the objects within the DataStore using entryPoint, and then navigate from there using\n\t * app-specific logic (e.g. retrieving a handle from a DDS, or the entryPoint object could implement a request paradigm itself)\n\t *\n\t * IMPORTANT: This overload is provided for back-compat where IDataStore.request(\\{ url: \"/\" \\}) is already implemented and used.\n\t * The functionality it can provide (if the DataStore implementation is built for it) is redundant with @see {@link IDataStore.entryPoint}.\n\t *\n\t * Refer to Removing-IFluidRouter.md for details on migrating from the request pattern to using entryPoint.\n\t *\n\t * @param request - Only requesting \\{ url: \"/\" \\} is supported, requesting arbitrary URLs is deprecated.\n\t */\n\trequest(request: { url: \"/\"; headers?: undefined }): Promise<IResponse>;\n\n\t/**\n\t * Issue a request against the DataStore for a resource within it.\n\t * @param request - The request to be issued against the DataStore\n\t *\n\t * @deprecated Requesting an arbitrary URL with headers will not be supported in a future major release.\n\t * Instead, access the objects within the DataStore using entryPoint, and then navigate from there using\n\t * app-specific logic (e.g. retrieving a handle from a DDS, or the entryPoint object could implement a request paradigm itself)\n\t *\n\t * Refer to Removing-IFluidRouter.md for details on migrating from the request pattern to using entryPoint.\n\t */\n\trequest(request: IRequest): Promise<IResponse>;\n\n\t/**\n\t * @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the \"entryPoint\" pattern. Refer to Removing-IFluidRouter.md\n\t */\n\t// eslint-disable-next-line import/no-deprecated\n\treadonly IFluidRouter: IFluidRouter;\n}\n\n/**\n * A reduced set of functionality of IContainerRuntime that a data store context/data store runtime will need\n * TODO: this should be merged into IFluidDataStoreContext\n */\nexport interface IContainerRuntimeBase extends IEventProvider<IContainerRuntimeBaseEvents> {\n\treadonly logger: ITelemetryBaseLogger;\n\treadonly clientDetails: IClientDetails;\n\n\t/**\n\t * Invokes the given callback and guarantees that all operations generated within the callback will be ordered\n\t * sequentially. Total size of all messages must be less than maxOpSize.\n\t */\n\torderSequentially(callback: () => void): void;\n\n\t/**\n\t * Executes a request against the container runtime\n\t * @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the \"entryPoint\" pattern. Refer to Removing-IFluidRouter.md\n\t */\n\trequest(request: IRequest): Promise<IResponse>;\n\n\t/**\n\t * Submits a container runtime level signal to be sent to other clients.\n\t * @param type - Type of the signal.\n\t * @param content - Content of the signal.\n\t */\n\tsubmitSignal(type: string, content: any): void;\n\n\t/**\n\t * @deprecated 0.16 Issue #1537, #3631\n\t * @internal\n\t */\n\t_createDataStoreWithProps(\n\t\tpkg: string | string[],\n\t\tprops?: any,\n\t\tid?: string,\n\t): Promise<IDataStore>;\n\n\t/**\n\t * Creates a data store and returns an object that exposes a handle to the data store's entryPoint, and also serves\n\t * as the data store's router. The data store is not bound to a container, and in such state is not persisted to\n\t * storage (file). Storing the entryPoint handle (or any other handle inside the data store, e.g. for DDS) into an\n\t * already attached DDS (or non-attached DDS that will eventually get attached to storage) will result in this\n\t * store being attached to storage.\n\t * @param pkg - Package name of the data store factory\n\t */\n\tcreateDataStore(pkg: string | string[]): Promise<IDataStore>;\n\n\t/**\n\t * Creates detached data store context. Only after context.attachRuntime() is called,\n\t * data store initialization is considered complete.\n\t */\n\tcreateDetachedDataStore(pkg: Readonly<string[]>): IFluidDataStoreContextDetached;\n\n\t/**\n\t * Get an absolute url for a provided container-relative request.\n\t * Returns undefined if the container or data store isn't attached to storage.\n\t * @param relativeUrl - A relative request within the container\n\t */\n\tgetAbsoluteUrl(relativeUrl: string): Promise<string | undefined>;\n\n\tuploadBlob(blob: ArrayBufferLike, signal?: AbortSignal): Promise<IFluidHandle<ArrayBufferLike>>;\n\n\t/**\n\t * Returns the current quorum.\n\t */\n\tgetQuorum(): IQuorumClients;\n\n\t/**\n\t * Returns the current audience.\n\t */\n\tgetAudience(): IAudience;\n\n\t/**\n\t * @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the \"entryPoint\" pattern. Refer to Removing-IFluidRouter.md\n\t */\n\treadonly IFluidHandleContext: IFluidHandleContext;\n}\n\n/**\n * Minimal interface a data store runtime needs to provide for IFluidDataStoreContext to bind to control.\n *\n * Functionality include attach, snapshot, op/signal processing, request routes, expose an entryPoint,\n * and connection state notifications\n */\nexport interface IFluidDataStoreChannel extends IDisposable {\n\treadonly id: string;\n\n\t/**\n\t * Indicates the attachment state of the channel to a host service.\n\t */\n\treadonly attachState: AttachState;\n\n\treadonly visibilityState: VisibilityState;\n\n\t/**\n\t * Runs through the graph and attaches the bound handles. Then binds this runtime to the container.\n\t * @deprecated This will be removed in favor of {@link IFluidDataStoreChannel.makeVisibleAndAttachGraph}.\n\t */\n\tattachGraph(): void;\n\n\t/**\n\t * Makes the data store channel visible in the container. Also, runs through its graph and attaches all\n\t * bound handles that represent its dependencies in the container's graph.\n\t */\n\tmakeVisibleAndAttachGraph(): void;\n\n\t/**\n\t * Retrieves the summary used as part of the initial summary message\n\t */\n\tgetAttachSummary(telemetryContext?: ITelemetryContext): ISummaryTreeWithStats;\n\n\t/**\n\t * Processes the op.\n\t */\n\tprocess(message: ISequencedDocumentMessage, local: boolean, localOpMetadata: unknown): void;\n\n\t/**\n\t * Processes the signal.\n\t */\n\tprocessSignal(message: any, local: boolean): void;\n\n\t/**\n\t * Generates a summary for the channel.\n\t * Introduced with summarizerNode - will be required in a future release.\n\t * @param fullTree - true to bypass optimizations and force a full summary tree.\n\t * @param trackState - This tells whether we should track state from this summary.\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<ISummaryTreeWithStats>;\n\n\t/**\n\t * Returns the data used for garbage collection. This includes a list of GC nodes that represent this context\n\t * including any of its children. Each node has a list 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 * After GC has run, called to notify this channel of routes that are used in it.\n\t * @param usedRoutes - The routes that are used in this channel.\n\t */\n\tupdateUsedRoutes(usedRoutes: string[]): void;\n\n\t/**\n\t * Notifies this object about changes in the connection state.\n\t * @param value - New connection state.\n\t * @param clientId - ID of the client. It's old ID when in disconnected state and\n\t * it's new client ID when we are connecting or connected.\n\t */\n\tsetConnectionState(connected: boolean, clientId?: string);\n\n\t/**\n\t * Ask the DDS to resubmit a message. This could be because we reconnected and this message was not acked.\n\t * @param type - The type of the original message.\n\t * @param content - The content of the original message.\n\t * @param localOpMetadata - The local metadata associated with the original message.\n\t */\n\treSubmit(type: string, content: any, localOpMetadata: unknown);\n\n\tapplyStashedOp(content: any): Promise<unknown>;\n\n\t/**\n\t * Revert a local message.\n\t * @param type - The type of the original message.\n\t * @param content - The content of the original message.\n\t * @param localOpMetadata - The local metadata associated with the original message.\n\t */\n\trollback?(type: string, content: any, localOpMetadata: unknown): void;\n\n\t/**\n\t * Exposes a handle to the root object / entryPoint of the component. Use this as the primary way of interacting\n\t * with the component.\n\t */\n\treadonly entryPoint: IFluidHandle<FluidObject>;\n\n\trequest(request: IRequest): Promise<IResponse>;\n\n\t/**\n\t * @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the \"entryPoint\" pattern. Refer to Removing-IFluidRouter.md\n\t */\n\t// eslint-disable-next-line import/no-deprecated\n\treadonly IFluidRouter: IFluidRouter;\n}\n\nexport type CreateChildSummarizerNodeFn = (\n\tsummarizeInternal: SummarizeInternalFn,\n\tgetGCDataFn: (fullGC?: boolean) => Promise<IGarbageCollectionData>,\n\t/**\n\t * @deprecated The functionality to get base GC details has been moved to summarizer node.\n\t */\n\tgetBaseGCDetailsFn?: () => Promise<IGarbageCollectionDetailsBase>,\n) => ISummarizerNodeWithGC;\n\nexport interface IFluidDataStoreContextEvents extends IEvent {\n\t(event: \"attaching\" | \"attached\", listener: () => void);\n}\n\n/**\n * Represents the context for the data store. It is used by the data store runtime to\n * get information and call functionality to the container.\n */\nexport interface IFluidDataStoreContext\n\textends IEventProvider<IFluidDataStoreContextEvents>,\n\t\tPartial<IProvideFluidDataStoreRegistry>,\n\t\tIProvideFluidHandleContext {\n\treadonly id: string;\n\t/**\n\t * A data store created by a client, is a local data store for that client. Also, when a detached container loads\n\t * from a snapshot, all the data stores are treated as local data stores because at that stage the container\n\t * still doesn't exists in storage and so the data store couldn't have been created by any other client.\n\t * Value of this never changes even after the data store is attached.\n\t * As implementer of data store runtime, you can use this property to check that this data store belongs to this\n\t * client and hence implement any scenario based on that.\n\t */\n\treadonly isLocalDataStore: boolean;\n\t/**\n\t * The package path of the data store as per the package factory.\n\t */\n\treadonly packagePath: readonly string[];\n\treadonly options: ILoaderOptions;\n\treadonly clientId: string | undefined;\n\treadonly connected: boolean;\n\treadonly deltaManager: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>;\n\treadonly storage: IDocumentStorageService;\n\treadonly baseSnapshot: ISnapshotTree | undefined;\n\treadonly logger: ITelemetryBaseLogger;\n\treadonly clientDetails: IClientDetails;\n\treadonly idCompressor?: IIdCompressor;\n\t/**\n\t * Indicates the attachment state of the data store to a host service.\n\t */\n\treadonly attachState: AttachState;\n\n\treadonly containerRuntime: IContainerRuntimeBase;\n\n\t/**\n\t * @deprecated 0.16 Issue #1635, #3631\n\t */\n\treadonly createProps?: any;\n\n\t/**\n\t * Ambient services provided with the context\n\t */\n\treadonly scope: FluidObject;\n\n\t/**\n\t * Returns the current quorum.\n\t */\n\tgetQuorum(): IQuorumClients;\n\n\t/**\n\t * Returns the current audience.\n\t */\n\tgetAudience(): IAudience;\n\n\t/**\n\t * Invokes the given callback and expects that no ops are submitted\n\t * until execution finishes. If an op is submitted, an error will be raised.\n\t *\n\t * Can be disabled by feature gate `Fluid.ContainerRuntime.DisableOpReentryCheck`\n\t *\n\t * @param callback - the callback to be invoked\n\t */\n\tensureNoDataModelChanges<T>(callback: () => T): T;\n\n\t/**\n\t * Submits the message to be sent to other clients.\n\t * @param type - Type of the message.\n\t * @param content - Content of the message.\n\t * @param localOpMetadata - The local metadata associated with the message. This is kept locally and not sent to\n\t * the server. This will be sent back when this message is received back from the server. This is also sent if\n\t * we are asked to resubmit the message.\n\t */\n\tsubmitMessage(type: string, content: any, localOpMetadata: unknown): void;\n\n\t/**\n\t * Submits the signal to be sent to other clients.\n\t * @param type - Type of the signal.\n\t * @param content - Content of the signal.\n\t * @param targetClientId - When specified, the signal is only sent to the provided client id.\n\t */\n\tsubmitSignal(type: string, content: any, targetClientId?: string): void;\n\n\t/**\n\t * Called to make the data store locally visible in the container. This happens automatically for root data stores\n\t * when they are marked as root. For non-root data stores, this happens when their handle is added to a visible DDS.\n\t */\n\tmakeLocallyVisible(): void;\n\n\t/**\n\t * Call by IFluidDataStoreChannel, indicates that a channel is dirty and needs to be part of the summary.\n\t * @param address - The address of the channel that is dirty.\n\t */\n\tsetChannelDirty(address: string): void;\n\n\t/**\n\t * Get an absolute url to the container based on the provided relativeUrl.\n\t * Returns undefined if the container or data store isn't attached to storage.\n\t * @param relativeUrl - A relative request within the container\n\t */\n\tgetAbsoluteUrl(relativeUrl: string): Promise<string | undefined>;\n\n\tgetCreateChildSummarizerNodeFn(\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): CreateChildSummarizerNodeFn;\n\n\tuploadBlob(blob: ArrayBufferLike, signal?: AbortSignal): Promise<IFluidHandle<ArrayBufferLike>>;\n\n\t/**\n\t * @deprecated The functionality to get base GC details has been moved to summarizer node.\n\t *\n\t * Returns the GC details in the initial summary of this data store. This is used to initialize the data store\n\t * and its children with the GC details from the previous summary.\n\t */\n\tgetBaseGCDetails(): Promise<IGarbageCollectionDetailsBase>;\n\n\t/**\n\t * Called when a new outbound reference is added to another node. This is used by garbage collection to identify\n\t * all references added in the system.\n\t * @param srcHandle - The handle of the node that added the reference.\n\t * @param outboundHandle - The handle of the outbound node that is referenced.\n\t */\n\taddedGCOutboundReference?(srcHandle: IFluidHandle, outboundHandle: IFluidHandle): void;\n}\n\nexport interface IFluidDataStoreContextDetached extends IFluidDataStoreContext {\n\t/**\n\t * Binds a runtime to the context.\n\t */\n\tattachRuntime(\n\t\tfactory: IProvideFluidDataStoreFactory,\n\t\tdataStoreRuntime: IFluidDataStoreChannel,\n\t): Promise<void>;\n}\n"]}
|
package/dist/summary.d.ts
CHANGED
|
@@ -228,7 +228,7 @@ export interface ISummarizerNodeWithGC extends ISummarizerNode {
|
|
|
228
228
|
*/
|
|
229
229
|
config?: ISummarizerNodeConfigWithGC, getGCDataFn?: (fullGC?: boolean) => Promise<IGarbageCollectionData>,
|
|
230
230
|
/**
|
|
231
|
-
* @deprecated
|
|
231
|
+
* @deprecated The functionality to update child's base GC details is incorporated in the summarizer node.
|
|
232
232
|
*/
|
|
233
233
|
getBaseGCDetailsFn?: () => Promise<IGarbageCollectionDetailsBase>): ISummarizerNodeWithGC;
|
|
234
234
|
/**
|
package/dist/summary.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"summary.js","sourceRoot":"","sources":["../src/summary.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAqIH,IAAY,0BAIX;AAJD,WAAY,0BAA0B;IACrC,yFAAW,CAAA;IACX,uFAAU,CAAA;IACV,6EAAK,CAAA;AACN,CAAC,EAJW,0BAA0B,0CAA1B,0BAA0B,QAIrC;AAgKY,QAAA,gBAAgB,GAAG,WAAW,CAAC;AA0C/B,QAAA,qBAAqB,GAAG,WAAW,CAAC;AAEpC,QAAA,yBAAyB,GAAG,eAAe,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { TelemetryEventPropertyType } from \"@fluidframework/core-interfaces\";\nimport {\n\tSummaryTree,\n\tISummaryTree,\n\tISequencedDocumentMessage,\n\tISnapshotTree,\n\tITree,\n} from \"@fluidframework/protocol-definitions\";\nimport { IGarbageCollectionData, IGarbageCollectionDetailsBase } from \"./garbageCollection\";\n\n/**\n * Contains the aggregation data from a Tree/Subtree.\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 */\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 */\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 */\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 */\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\nexport type SummarizeInternalFn = (\n\tfullTree: boolean,\n\ttrackState: boolean,\n\ttelemetryContext?: ITelemetryContext,\n\tincrementalSummaryContext?: IExperimentalIncrementalSummaryContext,\n) => Promise<ISummarizeInternalResult>;\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\t/**\n\t * True to always stop execution on error during summarize, or false to\n\t * attempt creating a summary that is a pointer ot the last acked summary\n\t * plus outstanding ops in case of internal summarize failure.\n\t * Defaults to false.\n\t *\n\t * BUG BUG: Default to true while we investigate problem\n\t * with differential summaries\n\t */\n\treadonly throwOnFailure?: true;\n}\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\nexport enum CreateSummarizerNodeSource {\n\tFromSummary,\n\tFromAttach,\n\tLocal,\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\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 * If unchanged and fullTree is false, it will reuse previous summary subtree.\n\t * If an error is encountered and throwOnFailure is false, it will try to make\n\t * a summary with a pointer to the previous summary + a blob of outstanding ops.\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/** True if a summary is currently in progress */\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 */\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\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 */\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: TelemetryEventPropertyType): 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, TelemetryEventPropertyType>,\n\t): void;\n\n\t/**\n\t * Get the telemetry data being tracked\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): TelemetryEventPropertyType;\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\tserialize(): string;\n}\n\nexport const blobCountPropertyName = \"BlobCount\";\n\nexport const totalBlobSizePropertyName = \"TotalBlobSize\";\n"]}
|
|
1
|
+
{"version":3,"file":"summary.js","sourceRoot":"","sources":["../src/summary.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAqIH,IAAY,0BAIX;AAJD,WAAY,0BAA0B;IACrC,yFAAW,CAAA;IACX,uFAAU,CAAA;IACV,6EAAK,CAAA;AACN,CAAC,EAJW,0BAA0B,0CAA1B,0BAA0B,QAIrC;AAgKY,QAAA,gBAAgB,GAAG,WAAW,CAAC;AA0C/B,QAAA,qBAAqB,GAAG,WAAW,CAAC;AAEpC,QAAA,yBAAyB,GAAG,eAAe,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { TelemetryEventPropertyType } from \"@fluidframework/core-interfaces\";\nimport {\n\tSummaryTree,\n\tISummaryTree,\n\tISequencedDocumentMessage,\n\tISnapshotTree,\n\tITree,\n} from \"@fluidframework/protocol-definitions\";\nimport { IGarbageCollectionData, IGarbageCollectionDetailsBase } from \"./garbageCollection\";\n\n/**\n * Contains the aggregation data from a Tree/Subtree.\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 */\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 */\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 */\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 */\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\nexport type SummarizeInternalFn = (\n\tfullTree: boolean,\n\ttrackState: boolean,\n\ttelemetryContext?: ITelemetryContext,\n\tincrementalSummaryContext?: IExperimentalIncrementalSummaryContext,\n) => Promise<ISummarizeInternalResult>;\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\t/**\n\t * True to always stop execution on error during summarize, or false to\n\t * attempt creating a summary that is a pointer ot the last acked summary\n\t * plus outstanding ops in case of internal summarize failure.\n\t * Defaults to false.\n\t *\n\t * BUG BUG: Default to true while we investigate problem\n\t * with differential summaries\n\t */\n\treadonly throwOnFailure?: true;\n}\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\nexport enum CreateSummarizerNodeSource {\n\tFromSummary,\n\tFromAttach,\n\tLocal,\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\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 * If unchanged and fullTree is false, it will reuse previous summary subtree.\n\t * If an error is encountered and throwOnFailure is false, it will try to make\n\t * a summary with a pointer to the previous summary + a blob of outstanding ops.\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/** True if a summary is currently in progress */\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 */\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\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 */\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: TelemetryEventPropertyType): 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, TelemetryEventPropertyType>,\n\t): void;\n\n\t/**\n\t * Get the telemetry data being tracked\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): TelemetryEventPropertyType;\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\tserialize(): string;\n}\n\nexport const blobCountPropertyName = \"BlobCount\";\n\nexport const totalBlobSizePropertyName = \"TotalBlobSize\";\n"]}
|
package/dist/tsdoc-metadata.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluidframework/runtime-definitions",
|
|
3
|
-
"version": "2.0.0-internal.7.
|
|
3
|
+
"version": "2.0.0-internal.7.2.0",
|
|
4
4
|
"description": "Fluid Runtime definitions",
|
|
5
5
|
"homepage": "https://fluidframework.com",
|
|
6
6
|
"repository": {
|
|
@@ -14,48 +14,34 @@
|
|
|
14
14
|
"main": "dist/index.js",
|
|
15
15
|
"types": "dist/index.d.ts",
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@fluidframework/container-definitions": ">=2.0.0-internal.7.
|
|
18
|
-
"@fluidframework/core-interfaces": ">=2.0.0-internal.7.
|
|
19
|
-
"@fluidframework/driver-definitions": ">=2.0.0-internal.7.
|
|
17
|
+
"@fluidframework/container-definitions": ">=2.0.0-internal.7.2.0 <2.0.0-internal.7.3.0",
|
|
18
|
+
"@fluidframework/core-interfaces": ">=2.0.0-internal.7.2.0 <2.0.0-internal.7.3.0",
|
|
19
|
+
"@fluidframework/driver-definitions": ">=2.0.0-internal.7.2.0 <2.0.0-internal.7.3.0",
|
|
20
20
|
"@fluidframework/protocol-definitions": "^3.0.0"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
|
-
"@fluid-tools/build-cli": "^0.
|
|
24
|
-
"@fluidframework/build-common": "^2.0.
|
|
25
|
-
"@fluidframework/build-tools": "^0.
|
|
26
|
-
"@fluidframework/eslint-config-fluid": "^
|
|
27
|
-
"@fluidframework/runtime-definitions-previous": "npm:@fluidframework/runtime-definitions@2.0.0-internal.
|
|
23
|
+
"@fluid-tools/build-cli": "^0.26.1",
|
|
24
|
+
"@fluidframework/build-common": "^2.0.3",
|
|
25
|
+
"@fluidframework/build-tools": "^0.26.1",
|
|
26
|
+
"@fluidframework/eslint-config-fluid": "^3.0.0",
|
|
27
|
+
"@fluidframework/runtime-definitions-previous": "npm:@fluidframework/runtime-definitions@2.0.0-internal.7.1.0",
|
|
28
28
|
"@microsoft/api-extractor": "^7.37.0",
|
|
29
|
-
"
|
|
30
|
-
"eslint": "~
|
|
31
|
-
"
|
|
32
|
-
"prettier": "~2.6.2",
|
|
29
|
+
"eslint": "~8.50.0",
|
|
30
|
+
"eslint-plugin-deprecation": "~2.0.0",
|
|
31
|
+
"prettier": "~3.0.3",
|
|
33
32
|
"rimraf": "^4.4.0",
|
|
34
33
|
"typescript": "~5.1.6"
|
|
35
34
|
},
|
|
36
35
|
"typeValidation": {
|
|
37
|
-
"broken": {
|
|
38
|
-
"InterfaceDeclaration_IDataStore": {
|
|
39
|
-
"forwardCompat": false
|
|
40
|
-
},
|
|
41
|
-
"InterfaceDeclaration_IFluidDataStoreChannel": {
|
|
42
|
-
"forwardCompat": false
|
|
43
|
-
},
|
|
44
|
-
"InterfaceDeclaration_IFluidDataStoreContextDetached": {
|
|
45
|
-
"backCompat": false
|
|
46
|
-
},
|
|
47
|
-
"InterfaceDeclaration_IFluidDataStoreContext": {
|
|
48
|
-
"backCompat": false
|
|
49
|
-
}
|
|
50
|
-
}
|
|
36
|
+
"broken": {}
|
|
51
37
|
},
|
|
52
38
|
"scripts": {
|
|
53
39
|
"build": "fluid-build . --task build",
|
|
54
40
|
"build:compile": "fluid-build . --task compile",
|
|
55
|
-
"build:docs": "api-extractor run --local
|
|
41
|
+
"build:docs": "api-extractor run --local",
|
|
56
42
|
"build:test": "tsc --project ./src/test/tsconfig.json",
|
|
57
|
-
"ci:build:docs": "api-extractor run
|
|
58
|
-
"clean": "rimraf --glob
|
|
43
|
+
"ci:build:docs": "api-extractor run",
|
|
44
|
+
"clean": "rimraf --glob dist \"*.tsbuildinfo\" \"*.build.log\" _api-extractor-temp",
|
|
59
45
|
"eslint": "eslint --format stylish src",
|
|
60
46
|
"eslint:fix": "eslint --format stylish src --fix --fix-type problem,suggestion,layout",
|
|
61
47
|
"format": "npm run prettier:fix",
|
package/src/dataStoreContext.ts
CHANGED
|
@@ -101,7 +101,7 @@ export const VisibilityState = {
|
|
|
101
101
|
*/
|
|
102
102
|
GloballyVisible: "GloballyVisible",
|
|
103
103
|
};
|
|
104
|
-
export type VisibilityState = typeof VisibilityState[keyof typeof VisibilityState];
|
|
104
|
+
export type VisibilityState = (typeof VisibilityState)[keyof typeof VisibilityState];
|
|
105
105
|
|
|
106
106
|
export interface IContainerRuntimeBaseEvents extends IEvent {
|
|
107
107
|
(event: "batchBegin", listener: (op: ISequencedDocumentMessage) => void);
|
|
@@ -166,7 +166,7 @@ export interface IDataStore {
|
|
|
166
166
|
* Issue a request against the DataStore for a resource within it.
|
|
167
167
|
* @param request - The request to be issued against the DataStore
|
|
168
168
|
*
|
|
169
|
-
* @deprecated
|
|
169
|
+
* @deprecated Requesting an arbitrary URL with headers will not be supported in a future major release.
|
|
170
170
|
* Instead, access the objects within the DataStore using entryPoint, and then navigate from there using
|
|
171
171
|
* app-specific logic (e.g. retrieving a handle from a DDS, or the entryPoint object could implement a request paradigm itself)
|
|
172
172
|
*
|
|
@@ -175,7 +175,7 @@ export interface IDataStore {
|
|
|
175
175
|
request(request: IRequest): Promise<IResponse>;
|
|
176
176
|
|
|
177
177
|
/**
|
|
178
|
-
* @deprecated
|
|
178
|
+
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
|
|
179
179
|
*/
|
|
180
180
|
// eslint-disable-next-line import/no-deprecated
|
|
181
181
|
readonly IFluidRouter: IFluidRouter;
|
|
@@ -363,7 +363,7 @@ export interface IFluidDataStoreChannel extends IDisposable {
|
|
|
363
363
|
request(request: IRequest): Promise<IResponse>;
|
|
364
364
|
|
|
365
365
|
/**
|
|
366
|
-
* @deprecated
|
|
366
|
+
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
|
|
367
367
|
*/
|
|
368
368
|
// eslint-disable-next-line import/no-deprecated
|
|
369
369
|
readonly IFluidRouter: IFluidRouter;
|
|
@@ -373,7 +373,7 @@ export type CreateChildSummarizerNodeFn = (
|
|
|
373
373
|
summarizeInternal: SummarizeInternalFn,
|
|
374
374
|
getGCDataFn: (fullGC?: boolean) => Promise<IGarbageCollectionData>,
|
|
375
375
|
/**
|
|
376
|
-
* @deprecated
|
|
376
|
+
* @deprecated The functionality to get base GC details has been moved to summarizer node.
|
|
377
377
|
*/
|
|
378
378
|
getBaseGCDetailsFn?: () => Promise<IGarbageCollectionDetailsBase>,
|
|
379
379
|
) => ISummarizerNodeWithGC;
|
|
@@ -464,8 +464,9 @@ export interface IFluidDataStoreContext
|
|
|
464
464
|
* Submits the signal to be sent to other clients.
|
|
465
465
|
* @param type - Type of the signal.
|
|
466
466
|
* @param content - Content of the signal.
|
|
467
|
+
* @param targetClientId - When specified, the signal is only sent to the provided client id.
|
|
467
468
|
*/
|
|
468
|
-
submitSignal(type: string, content: any): void;
|
|
469
|
+
submitSignal(type: string, content: any, targetClientId?: string): void;
|
|
469
470
|
|
|
470
471
|
/**
|
|
471
472
|
* Called to make the data store locally visible in the container. This happens automatically for root data stores
|
|
@@ -503,7 +504,7 @@ export interface IFluidDataStoreContext
|
|
|
503
504
|
uploadBlob(blob: ArrayBufferLike, signal?: AbortSignal): Promise<IFluidHandle<ArrayBufferLike>>;
|
|
504
505
|
|
|
505
506
|
/**
|
|
506
|
-
* @deprecated
|
|
507
|
+
* @deprecated The functionality to get base GC details has been moved to summarizer node.
|
|
507
508
|
*
|
|
508
509
|
* Returns the GC details in the initial summary of this data store. This is used to initialize the data store
|
|
509
510
|
* and its children with the GC details from the previous summary.
|
package/src/summary.ts
CHANGED
|
@@ -264,7 +264,7 @@ export interface ISummarizerNodeWithGC extends ISummarizerNode {
|
|
|
264
264
|
config?: ISummarizerNodeConfigWithGC,
|
|
265
265
|
getGCDataFn?: (fullGC?: boolean) => Promise<IGarbageCollectionData>,
|
|
266
266
|
/**
|
|
267
|
-
* @deprecated
|
|
267
|
+
* @deprecated The functionality to update child's base GC details is incorporated in the summarizer node.
|
|
268
268
|
*/
|
|
269
269
|
getBaseGCDetailsFn?: () => Promise<IGarbageCollectionDetailsBase>,
|
|
270
270
|
): ISummarizerNodeWithGC;
|