@fluidframework/datastore 2.0.0-dev.7.4.0.215930 → 2.0.0-dev.7.4.0.216897

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,342 +1,64 @@
1
- import { AttachState } from '@fluidframework/container-definitions';
2
- import { FluidObject } from '@fluidframework/core-interfaces';
3
- import { IAudience } from '@fluidframework/container-definitions';
4
- import { IChannel } from '@fluidframework/datastore-definitions';
5
- import { IChannelFactory } from '@fluidframework/datastore-definitions';
6
1
  import { IClientDetails } from '@fluidframework/protocol-definitions';
7
- import { IDeltaManager } from '@fluidframework/container-definitions';
8
2
  import { IDocumentMessage } from '@fluidframework/protocol-definitions';
9
- import { IFluidDataStoreChannel } from '@fluidframework/runtime-definitions';
10
- import { IFluidDataStoreContext } from '@fluidframework/runtime-definitions';
11
- import { IFluidDataStoreRuntime } from '@fluidframework/datastore-definitions';
12
- import { IFluidDataStoreRuntimeEvents } from '@fluidframework/datastore-definitions';
13
- import { IFluidHandle } from '@fluidframework/core-interfaces';
14
- import { IFluidHandleContext } from '@fluidframework/core-interfaces';
15
- import { IGarbageCollectionData } from '@fluidframework/runtime-definitions';
16
- import { IIdCompressor } from '@fluidframework/runtime-definitions';
17
- import { IInboundSignalMessage } from '@fluidframework/runtime-definitions';
18
- import { ILoaderOptions } from '@fluidframework/container-definitions';
19
3
  import { IQuorumClients } from '@fluidframework/protocol-definitions';
20
- import { IRequest } from '@fluidframework/core-interfaces';
21
- import { IResponse } from '@fluidframework/core-interfaces';
22
4
  import { ISequencedDocumentMessage } from '@fluidframework/protocol-definitions';
23
- import { ISummaryTreeWithStats } from '@fluidframework/runtime-definitions';
24
- import { ITelemetryContext } from '@fluidframework/runtime-definitions';
25
- import { ITelemetryLoggerExt } from '@fluidframework/telemetry-utils';
26
- import { VisibilityState } from '@fluidframework/runtime-definitions';
27
5
 
28
- /**
29
- * @public
30
- */
31
- export declare enum DataStoreMessageType {
32
- Attach = "attach",
33
- ChannelOp = "op"
34
- }
6
+ /* Excluded from this release type: AttachState */
35
7
 
36
- /**
37
- * Base data store class
38
- *
39
- * @public
40
- */
41
- export declare class FluidDataStoreRuntime extends TypedEventEmitter<IFluidDataStoreRuntimeEvents> implements IFluidDataStoreChannel, IFluidDataStoreRuntime, IFluidHandleContext {
42
- private readonly dataStoreContext;
43
- private readonly sharedObjectRegistry;
44
- /**
45
- * @deprecated Instantiate the class using its constructor instead.
46
- *
47
- * Loads the data store runtime
48
- * @param context - The data store context
49
- * @param sharedObjectRegistry - The registry of shared objects used by this data store
50
- * @param existing - If loading from an existing file.
51
- */
52
- static load(context: IFluidDataStoreContext, sharedObjectRegistry: ISharedObjectRegistry, existing: boolean): FluidDataStoreRuntime;
53
- /**
54
- * {@inheritDoc @fluidframework/datastore-definitions#IFluidDataStoreRuntime.entryPoint}
55
- */
56
- readonly entryPoint: IFluidHandle<FluidObject>;
57
- /**
58
- * @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
59
- */
60
- get IFluidRouter(): this;
61
- get connected(): boolean;
62
- get clientId(): string | undefined;
63
- get clientDetails(): IClientDetails;
64
- get isAttached(): boolean;
65
- get attachState(): AttachState;
66
- get absolutePath(): string;
67
- get routeContext(): IFluidHandleContext;
68
- get idCompressor(): IIdCompressor | undefined;
69
- get IFluidHandleContext(): this;
70
- get rootRoutingContext(): this;
71
- get channelsRoutingContext(): this;
72
- get objectsRoutingContext(): this;
73
- private _disposed;
74
- get disposed(): boolean;
75
- private readonly contexts;
76
- private readonly pendingAttach;
77
- private readonly deferredAttached;
78
- private readonly localChannelContextQueue;
79
- private readonly notBoundedChannelContextSet;
80
- private _attachState;
81
- visibilityState: VisibilityState;
82
- private readonly pendingHandlesToMakeVisible;
83
- readonly id: string;
84
- readonly options: ILoaderOptions;
85
- readonly deltaManager: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>;
86
- private readonly quorum;
87
- private readonly audience;
88
- private readonly mc;
89
- get logger(): ITelemetryLoggerExt;
90
- /**
91
- * If the summarizer makes local changes, a telemetry event is logged. This has the potential to be very noisy.
92
- * So, adding a count of how many telemetry events are logged per data store context. This can be
93
- * controlled via feature flags.
94
- */
95
- private localChangesTelemetryCount;
96
- /**
97
- * Invokes the given callback and expects that no ops are submitted
98
- * until execution finishes. If an op is submitted, an error will be raised.
99
- *
100
- * Can be disabled by feature gate `Fluid.ContainerRuntime.DisableOpReentryCheck`
101
- *
102
- * @param callback - the callback to be invoked
103
- */
104
- ensureNoDataModelChanges<T>(callback: () => T): T;
105
- /**
106
- * Create an instance of a DataStore runtime.
107
- *
108
- * @param dataStoreContext - Context object for the runtime.
109
- * @param sharedObjectRegistry - The registry of shared objects that this data store will be able to instantiate.
110
- * @param existing - Pass 'true' if loading this datastore from an existing file; pass 'false' otherwise.
111
- * @param provideEntryPoint - Function to initialize the entryPoint object for the data store runtime. The
112
- * handle to this data store runtime will point to the object returned by this function. If this function is not
113
- * provided, the handle will be left undefined. This is here so we can start making handles a first-class citizen
114
- * and the primary way of interacting with some Fluid objects, and should be used if possible.
115
- */
116
- constructor(dataStoreContext: IFluidDataStoreContext, sharedObjectRegistry: ISharedObjectRegistry, existing: boolean, provideEntryPoint: (runtime: IFluidDataStoreRuntime) => Promise<FluidObject>);
117
- dispose(): void;
118
- resolveHandle(request: IRequest): Promise<IResponse>;
119
- request(request: IRequest): Promise<IResponse>;
120
- getChannel(id: string): Promise<IChannel>;
121
- /**
122
- * Api which allows caller to create the channel first and then add it to the runtime.
123
- * The channel type should be present in the registry, otherwise the runtime would reject
124
- * the channel. Also the runtime used to create the channel object should be same to which
125
- * it is added.
126
- * @param channel - channel which needs to be added to the runtime.
127
- */
128
- addChannel(channel: IChannel): void;
129
- createChannel(id: string | undefined, type: string): IChannel;
130
- private createChannelContext;
131
- /**
132
- * Binds a channel with the runtime. If the runtime is attached we will attach the channel right away.
133
- * If the runtime is not attached we will defer the attach until the runtime attaches.
134
- * @param channel - channel to be registered.
135
- */
136
- bindChannel(channel: IChannel): void;
137
- /**
138
- * This function is called when a data store becomes root. It does the following:
139
- *
140
- * 1. Marks the data store locally visible in the container.
141
- *
142
- * 2. Attaches the graph of all the handles bound to it.
143
- *
144
- * 3. Calls into the data store context to mark it visible in the container too. If the container is globally
145
- * visible, it will mark us globally visible. Otherwise, it will mark us globally visible when it becomes
146
- * globally visible.
147
- */
148
- makeVisibleAndAttachGraph(): void;
149
- /**
150
- * This function is called when a handle to this data store is added to a visible DDS.
151
- */
152
- attachGraph(): void;
153
- bind(handle: IFluidHandle): void;
154
- setConnectionState(connected: boolean, clientId?: string): void;
155
- getQuorum(): IQuorumClients;
156
- getAudience(): IAudience;
157
- uploadBlob(blob: ArrayBufferLike, signal?: AbortSignal): Promise<IFluidHandle<ArrayBufferLike>>;
158
- private createRemoteChannelContext;
159
- process(message: ISequencedDocumentMessage, local: boolean, localOpMetadata: unknown): void;
160
- processSignal(message: IInboundSignalMessage, local: boolean): void;
161
- private isChannelAttached;
162
- /**
163
- * Returns the outbound routes of this channel. Currently, all contexts in this channel are considered
164
- * referenced and are hence outbound. This will change when we have root and non-root channel contexts.
165
- * The only root contexts will be considered as referenced.
166
- */
167
- private getOutboundRoutes;
168
- /**
169
- * Updates the GC nodes of this channel. It does the following:
170
- * - Adds a back route to self to all its child GC nodes.
171
- * - Adds a node for this channel.
172
- * @param builder - The builder that contains the GC nodes for this channel's children.
173
- */
174
- private updateGCNodes;
175
- /**
176
- * Generates data used for garbage collection. This includes a list of GC nodes that represent this channel
177
- * including any of its child channel contexts. Each node has a set of outbound routes to other GC nodes in the
178
- * document. It does the following:
179
- *
180
- * 1. Calls into each child context to get its GC data.
181
- *
182
- * 2. Prefixes the child context's id to the GC nodes in the child's GC data. This makes sure that the node can be
183
- * identified as belonging to the child.
184
- *
185
- * 3. Adds a GC node for this channel to the nodes received from the children. All these nodes together represent
186
- * the GC data of this channel.
187
- *
188
- * @param fullGC - true to bypass optimizations and force full generation of GC data.
189
- */
190
- getGCData(fullGC?: boolean): Promise<IGarbageCollectionData>;
191
- /**
192
- * After GC has run, called to notify this channel of routes that are used in it. It calls the child contexts to
193
- * update their used routes.
194
- * @param usedRoutes - The routes that are used in all contexts in this channel.
195
- */
196
- updateUsedRoutes(usedRoutes: string[]): void;
197
- /**
198
- * Called when a new outbound reference is added to another node. This is used by garbage collection to identify
199
- * all references added in the system.
200
- * @param srcHandle - The handle of the node that added the reference.
201
- * @param outboundHandle - The handle of the outbound node that is referenced.
202
- */
203
- private addedGCOutboundReference;
204
- /**
205
- * Returns a summary at the current sequence number.
206
- * @param fullTree - true to bypass optimizations and force a full summary tree
207
- * @param trackState - This tells whether we should track state from this summary.
208
- * @param telemetryContext - summary data passed through the layers for telemetry purposes
209
- */
210
- summarize(fullTree?: boolean, trackState?: boolean, telemetryContext?: ITelemetryContext): Promise<ISummaryTreeWithStats>;
211
- getAttachSummary(telemetryContext?: ITelemetryContext): ISummaryTreeWithStats;
212
- submitMessage(type: DataStoreMessageType, content: any, localOpMetadata: unknown): void;
213
- /**
214
- * Submits the signal to be sent to other clients.
215
- * @param type - Type of the signal.
216
- * @param content - Content of the signal.
217
- * @param targetClientId - When specified, the signal is only sent to the provided client id.
218
- */
219
- submitSignal(type: string, content: any, targetClientId?: string): void;
220
- /**
221
- * Will return when the data store is attached.
222
- */
223
- waitAttached(): Promise<void>;
224
- /**
225
- * Attach channel should only be called after the data store has been attached
226
- */
227
- private attachChannel;
228
- private submitChannelOp;
229
- private submit;
230
- /**
231
- * For messages of type MessageType.Operation, finds the right channel and asks it to resubmit the message.
232
- * For all other messages, just submit it again.
233
- * This typically happens when we reconnect and there are unacked messages.
234
- * @param content - The content of the original message.
235
- * @param localOpMetadata - The local metadata associated with the original message.
236
- */
237
- reSubmit(type: DataStoreMessageType, content: any, localOpMetadata: unknown): void;
238
- /**
239
- * Revert a local op.
240
- * @param content - The content of the original message.
241
- * @param localOpMetadata - The local metadata associated with the original message.
242
- */
243
- rollback?(type: DataStoreMessageType, content: any, localOpMetadata: unknown): void;
244
- applyStashedOp(content: any): Promise<unknown>;
245
- private setChannelDirty;
246
- private processChannelOp;
247
- private attachListener;
248
- private verifyNotClosed;
249
- /**
250
- * Summarizer client should not have local changes. These changes can become part of the summary and can break
251
- * eventual consistency. For example, the next summary (say at ref seq# 100) may contain these changes whereas
252
- * other clients that are up-to-date till seq# 100 may not have them yet.
253
- */
254
- private identifyLocalChangeInSummarizer;
255
- }
8
+ /* Excluded from this release type: DataStoreMessageType */
256
9
 
257
- /**
258
- * Handle for a shared {@link @fluidframework/core-interfaces#FluidObject}.
259
- *
260
- * @public
261
- */
262
- export declare class FluidObjectHandle<T extends FluidObject = FluidObject> implements IFluidHandle {
263
- protected readonly value: T | Promise<T>;
264
- readonly path: string;
265
- readonly routeContext: IFluidHandleContext;
266
- private readonly pendingHandlesToMakeVisible;
267
- /**
268
- * {@inheritDoc @fluidframework/core-interfaces#IFluidHandle.absolutePath}
269
- */
270
- readonly absolutePath: string;
271
- /**
272
- * {@inheritDoc @fluidframework/core-interfaces#IProvideFluidHandle.IFluidHandle}
273
- */
274
- get IFluidHandle(): IFluidHandle;
275
- /**
276
- * {@inheritDoc @fluidframework/core-interfaces#IFluidHandle.isAttached}
277
- */
278
- get isAttached(): boolean;
279
- /**
280
- * Tells whether the object of this handle is visible in the container locally or globally.
281
- */
282
- private get visible();
283
- /**
284
- * Tracks whether this handle is locally visible in the container.
285
- */
286
- private locallyVisible;
287
- /**
288
- * Creates a new `FluidObjectHandle`.
289
- *
290
- * @param value - The {@link @fluidframework/core-interfaces#FluidObject} object this handle is for.
291
- * @param path - The path to this handle relative to the `routeContext`.
292
- * @param routeContext - The parent {@link @fluidframework/core-interfaces#IFluidHandleContext} that has a route
293
- * to this handle.
294
- */
295
- constructor(value: T | Promise<T>, path: string, routeContext: IFluidHandleContext);
296
- /**
297
- * {@inheritDoc @fluidframework/core-interfaces#IFluidHandle.get}
298
- */
299
- get(): Promise<any>;
300
- /**
301
- * {@inheritDoc @fluidframework/core-interfaces#IFluidHandle.attachGraph }
302
- */
303
- attachGraph(): void;
304
- /**
305
- * {@inheritDoc @fluidframework/core-interfaces#IFluidHandle.bind}
306
- */
307
- bind(handle: IFluidHandle): void;
308
- }
10
+ /* Excluded from this release type: FluidDataStoreRuntime */
309
11
 
310
- /**
311
- * @public
312
- */
313
- export declare interface ISharedObjectRegistry {
314
- get(name: string): IChannelFactory | undefined;
315
- }
12
+ /* Excluded from this release type: FluidObject */
316
13
 
317
- /**
318
- * Mixin class that adds request handler to FluidDataStoreRuntime
319
- * Request handler is only called when data store can't resolve request, i.e. for custom requests.
320
- * @param Base - base class, inherits from FluidDataStoreRuntime
321
- * @param requestHandler - request handler to mix in
322
- *
323
- * @public
324
- */
325
- export declare const mixinRequestHandler: (requestHandler: (request: IRequest, runtime: FluidDataStoreRuntime) => Promise<IResponse>, Base?: typeof FluidDataStoreRuntime) => typeof FluidDataStoreRuntime;
14
+ /* Excluded from this release type: FluidObjectHandle */
326
15
 
327
- /**
328
- * Mixin class that adds await for DataObject to finish initialization before we proceed to summary.
329
- * @param handler - handler that returns info about blob to be added to summary.
330
- * Or undefined not to add anything to summary.
331
- * @param Base - base class, inherits from FluidDataStoreRuntime
332
- *
333
- * @public
334
- */
335
- export declare const mixinSummaryHandler: (handler: (runtime: FluidDataStoreRuntime) => Promise<{
336
- path: string[];
337
- content: string;
338
- } | undefined>, Base?: typeof FluidDataStoreRuntime) => typeof FluidDataStoreRuntime;
16
+ /* Excluded from this release type: IAudience */
17
+
18
+ /* Excluded from this release type: IChannel */
19
+
20
+ /* Excluded from this release type: IChannelFactory */
21
+
22
+ /* Excluded from this release type: IDeltaManager */
23
+
24
+ /* Excluded from this release type: IFluidDataStoreChannel */
25
+
26
+ /* Excluded from this release type: IFluidDataStoreContext */
27
+
28
+ /* Excluded from this release type: IFluidDataStoreRuntime */
29
+
30
+ /* Excluded from this release type: IFluidDataStoreRuntimeEvents */
31
+
32
+ /* Excluded from this release type: IFluidHandle */
33
+
34
+ /* Excluded from this release type: IFluidHandleContext */
35
+
36
+ /* Excluded from this release type: IGarbageCollectionData */
37
+
38
+ /* Excluded from this release type: IIdCompressor */
39
+
40
+ /* Excluded from this release type: IInboundSignalMessage */
41
+
42
+ /* Excluded from this release type: ILoaderOptions */
43
+
44
+ /* Excluded from this release type: IRequest */
45
+
46
+ /* Excluded from this release type: IResponse */
47
+
48
+ /* Excluded from this release type: ISharedObjectRegistry */
49
+
50
+ /* Excluded from this release type: ISummaryTreeWithStats */
51
+
52
+ /* Excluded from this release type: ITelemetryContext */
53
+
54
+ /* Excluded from this release type: ITelemetryLoggerExt */
55
+
56
+ /* Excluded from this release type: mixinRequestHandler */
57
+
58
+ /* Excluded from this release type: mixinSummaryHandler */
339
59
 
340
60
  /* Excluded from this release type: TypedEventEmitter */
341
61
 
62
+ /* Excluded from this release type: VisibilityState */
63
+
342
64
  export { }
@@ -27,7 +27,7 @@ import { TypedEventEmitter } from '@fluid-internal/client-utils';
27
27
  import { VisibilityState } from '@fluidframework/runtime-definitions';
28
28
 
29
29
  /**
30
- * @public
30
+ * @internal
31
31
  */
32
32
  export declare enum DataStoreMessageType {
33
33
  Attach = "attach",
@@ -36,8 +36,7 @@ export declare enum DataStoreMessageType {
36
36
 
37
37
  /**
38
38
  * Base data store class
39
- *
40
- * @public
39
+ * @internal
41
40
  */
42
41
  export declare class FluidDataStoreRuntime extends TypedEventEmitter<IFluidDataStoreRuntimeEvents> implements IFluidDataStoreChannel, IFluidDataStoreRuntime, IFluidHandleContext {
43
42
  private readonly dataStoreContext;
@@ -257,8 +256,7 @@ export declare class FluidDataStoreRuntime extends TypedEventEmitter<IFluidDataS
257
256
 
258
257
  /**
259
258
  * Handle for a shared {@link @fluidframework/core-interfaces#FluidObject}.
260
- *
261
- * @public
259
+ * @internal
262
260
  */
263
261
  export declare class FluidObjectHandle<T extends FluidObject = FluidObject> implements IFluidHandle {
264
262
  protected readonly value: T | Promise<T>;
@@ -309,7 +307,7 @@ export declare class FluidObjectHandle<T extends FluidObject = FluidObject> impl
309
307
  }
310
308
 
311
309
  /**
312
- * @public
310
+ * @internal
313
311
  */
314
312
  export declare interface ISharedObjectRegistry {
315
313
  get(name: string): IChannelFactory | undefined;
@@ -320,8 +318,7 @@ export declare interface ISharedObjectRegistry {
320
318
  * Request handler is only called when data store can't resolve request, i.e. for custom requests.
321
319
  * @param Base - base class, inherits from FluidDataStoreRuntime
322
320
  * @param requestHandler - request handler to mix in
323
- *
324
- * @public
321
+ * @internal
325
322
  */
326
323
  export declare const mixinRequestHandler: (requestHandler: (request: IRequest, runtime: FluidDataStoreRuntime) => Promise<IResponse>, Base?: typeof FluidDataStoreRuntime) => typeof FluidDataStoreRuntime;
327
324
 
@@ -330,8 +327,7 @@ export declare const mixinRequestHandler: (requestHandler: (request: IRequest, r
330
327
  * @param handler - handler that returns info about blob to be added to summary.
331
328
  * Or undefined not to add anything to summary.
332
329
  * @param Base - base class, inherits from FluidDataStoreRuntime
333
- *
334
- * @public
330
+ * @internal
335
331
  */
336
332
  export declare const mixinSummaryHandler: (handler: (runtime: FluidDataStoreRuntime) => Promise<{
337
333
  path: string[];
@@ -5,8 +5,7 @@
5
5
  import { IFluidHandle, IFluidHandleContext, FluidObject } from "@fluidframework/core-interfaces";
6
6
  /**
7
7
  * Handle for a shared {@link @fluidframework/core-interfaces#FluidObject}.
8
- *
9
- * @public
8
+ * @internal
10
9
  */
11
10
  export declare class FluidObjectHandle<T extends FluidObject = FluidObject> implements IFluidHandle {
12
11
  protected readonly value: T | Promise<T>;
@@ -1 +1 @@
1
- {"version":3,"file":"fluidHandle.d.ts","sourceRoot":"","sources":["../src/fluidHandle.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAGjG;;;;GAIG;AACH,qBAAa,iBAAiB,CAAC,CAAC,SAAS,WAAW,GAAG,WAAW,CAAE,YAAW,YAAY;IAuDzF,SAAS,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC;aACxB,IAAI,EAAE,MAAM;aACZ,YAAY,EAAE,mBAAmB;IAxDlD,OAAO,CAAC,QAAQ,CAAC,2BAA2B,CAAgC;IAE5E;;OAEG;IACH,SAAgB,YAAY,EAAE,MAAM,CAAC;IAErC;;OAEG;IACH,IAAW,YAAY,IAAI,YAAY,CAEtC;IAED;;OAEG;IACH,IAAW,UAAU,IAAI,OAAO,CAE/B;IAED;;OAEG;IACH,OAAO,KAAK,OAAO,GAclB;IAED;;OAEG;IACH,OAAO,CAAC,cAAc,CAAkB;IAExC;;;;;;;OAOG;gBAEiB,KAAK,EAAE,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,EACxB,IAAI,EAAE,MAAM,EACZ,YAAY,EAAE,mBAAmB;IAKlD;;OAEG;IACU,GAAG,IAAI,OAAO,CAAC,GAAG,CAAC;IAKhC;;OAEG;IACI,WAAW,IAAI,IAAI;IAa1B;;OAEG;IACI,IAAI,CAAC,MAAM,EAAE,YAAY;CAQhC"}
1
+ {"version":3,"file":"fluidHandle.d.ts","sourceRoot":"","sources":["../src/fluidHandle.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAGjG;;;GAGG;AACH,qBAAa,iBAAiB,CAAC,CAAC,SAAS,WAAW,GAAG,WAAW,CAAE,YAAW,YAAY;IAuDzF,SAAS,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC;aACxB,IAAI,EAAE,MAAM;aACZ,YAAY,EAAE,mBAAmB;IAxDlD,OAAO,CAAC,QAAQ,CAAC,2BAA2B,CAAgC;IAE5E;;OAEG;IACH,SAAgB,YAAY,EAAE,MAAM,CAAC;IAErC;;OAEG;IACH,IAAW,YAAY,IAAI,YAAY,CAEtC;IAED;;OAEG;IACH,IAAW,UAAU,IAAI,OAAO,CAE/B;IAED;;OAEG;IACH,OAAO,KAAK,OAAO,GAclB;IAED;;OAEG;IACH,OAAO,CAAC,cAAc,CAAkB;IAExC;;;;;;;OAOG;gBAEiB,KAAK,EAAE,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,EACxB,IAAI,EAAE,MAAM,EACZ,YAAY,EAAE,mBAAmB;IAKlD;;OAEG;IACU,GAAG,IAAI,OAAO,CAAC,GAAG,CAAC;IAKhC;;OAEG;IACI,WAAW,IAAI,IAAI;IAa1B;;OAEG;IACI,IAAI,CAAC,MAAM,EAAE,YAAY;CAQhC"}
@@ -5,8 +5,7 @@
5
5
  import { generateHandleContextPath } from "@fluidframework/runtime-utils";
6
6
  /**
7
7
  * Handle for a shared {@link @fluidframework/core-interfaces#FluidObject}.
8
- *
9
- * @public
8
+ * @internal
10
9
  */
11
10
  export class FluidObjectHandle {
12
11
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"fluidHandle.js","sourceRoot":"","sources":["../src/fluidHandle.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,yBAAyB,EAAE,MAAM,+BAA+B,CAAC;AAE1E;;;;GAIG;AACH,MAAM,OAAO,iBAAiB;IAQ7B;;OAEG;IACH,IAAW,YAAY;QACtB,OAAO,IAAI,CAAC;IACb,CAAC;IAED;;OAEG;IACH,IAAW,UAAU;QACpB,OAAO,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC;IACrC,CAAC;IAED;;OAEG;IACH,IAAY,OAAO;QAClB;;;;;;;;;;;WAWG;QACH,OAAO,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,cAAc,CAAC;IAC/C,CAAC;IAOD;;;;;;;OAOG;IACH,YACoB,KAAqB,EACxB,IAAY,EACZ,YAAiC;QAF9B,UAAK,GAAL,KAAK,CAAgB;QACxB,SAAI,GAAJ,IAAI,CAAQ;QACZ,iBAAY,GAAZ,YAAY,CAAqB;QAxDjC,gCAA2B,GAAsB,IAAI,GAAG,EAAE,CAAC;QAwC5E;;WAEG;QACK,mBAAc,GAAY,KAAK,CAAC;QAevC,IAAI,CAAC,YAAY,GAAG,yBAAyB,CAAC,IAAI,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC;IACxE,CAAC;IAED;;OAEG;IACI,KAAK,CAAC,GAAG;QACf,yGAAyG;QACzG,OAAO,IAAI,CAAC,KAAK,CAAC;IACnB,CAAC;IAED;;OAEG;IACI,WAAW;QACjB,IAAI,IAAI,CAAC,OAAO,EAAE;YACjB,OAAO;SACP;QAED,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC;QAC3B,IAAI,CAAC,2BAA2B,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE;YACnD,MAAM,CAAC,WAAW,EAAE,CAAC;QACtB,CAAC,CAAC,CAAC;QACH,IAAI,CAAC,2BAA2B,CAAC,KAAK,EAAE,CAAC;QACzC,IAAI,CAAC,YAAY,CAAC,WAAW,EAAE,CAAC;IACjC,CAAC;IAED;;OAEG;IACI,IAAI,CAAC,MAAoB;QAC/B,8EAA8E;QAC9E,IAAI,IAAI,CAAC,OAAO,EAAE;YACjB,MAAM,CAAC,WAAW,EAAE,CAAC;YACrB,OAAO;SACP;QACD,IAAI,CAAC,2BAA2B,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IAC9C,CAAC;CACD","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IFluidHandle, IFluidHandleContext, FluidObject } from \"@fluidframework/core-interfaces\";\nimport { generateHandleContextPath } from \"@fluidframework/runtime-utils\";\n\n/**\n * Handle for a shared {@link @fluidframework/core-interfaces#FluidObject}.\n *\n * @public\n */\nexport class FluidObjectHandle<T extends FluidObject = FluidObject> implements IFluidHandle {\n\tprivate readonly pendingHandlesToMakeVisible: Set<IFluidHandle> = new Set();\n\n\t/**\n\t * {@inheritDoc @fluidframework/core-interfaces#IFluidHandle.absolutePath}\n\t */\n\tpublic readonly absolutePath: string;\n\n\t/**\n\t * {@inheritDoc @fluidframework/core-interfaces#IProvideFluidHandle.IFluidHandle}\n\t */\n\tpublic get IFluidHandle(): IFluidHandle {\n\t\treturn this;\n\t}\n\n\t/**\n\t * {@inheritDoc @fluidframework/core-interfaces#IFluidHandle.isAttached}\n\t */\n\tpublic get isAttached(): boolean {\n\t\treturn this.routeContext.isAttached;\n\t}\n\n\t/**\n\t * Tells whether the object of this handle is visible in the container locally or globally.\n\t */\n\tprivate get visible(): boolean {\n\t\t/**\n\t\t * If the object of this handle is attached, it is visible in the container. Ideally, checking local visibility\n\t\t * should be enough for a handle. However, there are scenarios where the object becomes locally visible but the\n\t\t * handle does not know this - This will happen is attachGraph is never called on the handle. Couple of examples\n\t\t * where this can happen:\n\t\t *\n\t\t * 1. Handles to DDS other than the default handle won't know if the DDS becomes visible after the handle was\n\t\t * created.\n\t\t *\n\t\t * 2. Handles to root data stores will never know that it was visible because the handle will not be stores in\n\t\t * another DDS and so, attachGraph will never be called on it.\n\t\t */\n\t\treturn this.isAttached || this.locallyVisible;\n\t}\n\n\t/**\n\t * Tracks whether this handle is locally visible in the container.\n\t */\n\tprivate locallyVisible: boolean = false;\n\n\t/**\n\t * Creates a new `FluidObjectHandle`.\n\t *\n\t * @param value - The {@link @fluidframework/core-interfaces#FluidObject} object this handle is for.\n\t * @param path - The path to this handle relative to the `routeContext`.\n\t * @param routeContext - The parent {@link @fluidframework/core-interfaces#IFluidHandleContext} that has a route\n\t * to this handle.\n\t */\n\tconstructor(\n\t\tprotected readonly value: T | Promise<T>,\n\t\tpublic readonly path: string,\n\t\tpublic readonly routeContext: IFluidHandleContext,\n\t) {\n\t\tthis.absolutePath = generateHandleContextPath(path, this.routeContext);\n\t}\n\n\t/**\n\t * {@inheritDoc @fluidframework/core-interfaces#IFluidHandle.get}\n\t */\n\tpublic async get(): Promise<any> {\n\t\t// Note that this return works whether we received a T or a Promise<T> for this.value in the constructor.\n\t\treturn this.value;\n\t}\n\n\t/**\n\t * {@inheritDoc @fluidframework/core-interfaces#IFluidHandle.attachGraph }\n\t */\n\tpublic attachGraph(): void {\n\t\tif (this.visible) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.locallyVisible = true;\n\t\tthis.pendingHandlesToMakeVisible.forEach((handle) => {\n\t\t\thandle.attachGraph();\n\t\t});\n\t\tthis.pendingHandlesToMakeVisible.clear();\n\t\tthis.routeContext.attachGraph();\n\t}\n\n\t/**\n\t * {@inheritDoc @fluidframework/core-interfaces#IFluidHandle.bind}\n\t */\n\tpublic bind(handle: IFluidHandle) {\n\t\t// If this handle is visible, attach the graph of the incoming handle as well.\n\t\tif (this.visible) {\n\t\t\thandle.attachGraph();\n\t\t\treturn;\n\t\t}\n\t\tthis.pendingHandlesToMakeVisible.add(handle);\n\t}\n}\n"]}
1
+ {"version":3,"file":"fluidHandle.js","sourceRoot":"","sources":["../src/fluidHandle.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,yBAAyB,EAAE,MAAM,+BAA+B,CAAC;AAE1E;;;GAGG;AACH,MAAM,OAAO,iBAAiB;IAQ7B;;OAEG;IACH,IAAW,YAAY;QACtB,OAAO,IAAI,CAAC;IACb,CAAC;IAED;;OAEG;IACH,IAAW,UAAU;QACpB,OAAO,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC;IACrC,CAAC;IAED;;OAEG;IACH,IAAY,OAAO;QAClB;;;;;;;;;;;WAWG;QACH,OAAO,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,cAAc,CAAC;IAC/C,CAAC;IAOD;;;;;;;OAOG;IACH,YACoB,KAAqB,EACxB,IAAY,EACZ,YAAiC;QAF9B,UAAK,GAAL,KAAK,CAAgB;QACxB,SAAI,GAAJ,IAAI,CAAQ;QACZ,iBAAY,GAAZ,YAAY,CAAqB;QAxDjC,gCAA2B,GAAsB,IAAI,GAAG,EAAE,CAAC;QAwC5E;;WAEG;QACK,mBAAc,GAAY,KAAK,CAAC;QAevC,IAAI,CAAC,YAAY,GAAG,yBAAyB,CAAC,IAAI,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC;IACxE,CAAC;IAED;;OAEG;IACI,KAAK,CAAC,GAAG;QACf,yGAAyG;QACzG,OAAO,IAAI,CAAC,KAAK,CAAC;IACnB,CAAC;IAED;;OAEG;IACI,WAAW;QACjB,IAAI,IAAI,CAAC,OAAO,EAAE;YACjB,OAAO;SACP;QAED,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC;QAC3B,IAAI,CAAC,2BAA2B,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE;YACnD,MAAM,CAAC,WAAW,EAAE,CAAC;QACtB,CAAC,CAAC,CAAC;QACH,IAAI,CAAC,2BAA2B,CAAC,KAAK,EAAE,CAAC;QACzC,IAAI,CAAC,YAAY,CAAC,WAAW,EAAE,CAAC;IACjC,CAAC;IAED;;OAEG;IACI,IAAI,CAAC,MAAoB;QAC/B,8EAA8E;QAC9E,IAAI,IAAI,CAAC,OAAO,EAAE;YACjB,MAAM,CAAC,WAAW,EAAE,CAAC;YACrB,OAAO;SACP;QACD,IAAI,CAAC,2BAA2B,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IAC9C,CAAC;CACD","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IFluidHandle, IFluidHandleContext, FluidObject } from \"@fluidframework/core-interfaces\";\nimport { generateHandleContextPath } from \"@fluidframework/runtime-utils\";\n\n/**\n * Handle for a shared {@link @fluidframework/core-interfaces#FluidObject}.\n * @internal\n */\nexport class FluidObjectHandle<T extends FluidObject = FluidObject> implements IFluidHandle {\n\tprivate readonly pendingHandlesToMakeVisible: Set<IFluidHandle> = new Set();\n\n\t/**\n\t * {@inheritDoc @fluidframework/core-interfaces#IFluidHandle.absolutePath}\n\t */\n\tpublic readonly absolutePath: string;\n\n\t/**\n\t * {@inheritDoc @fluidframework/core-interfaces#IProvideFluidHandle.IFluidHandle}\n\t */\n\tpublic get IFluidHandle(): IFluidHandle {\n\t\treturn this;\n\t}\n\n\t/**\n\t * {@inheritDoc @fluidframework/core-interfaces#IFluidHandle.isAttached}\n\t */\n\tpublic get isAttached(): boolean {\n\t\treturn this.routeContext.isAttached;\n\t}\n\n\t/**\n\t * Tells whether the object of this handle is visible in the container locally or globally.\n\t */\n\tprivate get visible(): boolean {\n\t\t/**\n\t\t * If the object of this handle is attached, it is visible in the container. Ideally, checking local visibility\n\t\t * should be enough for a handle. However, there are scenarios where the object becomes locally visible but the\n\t\t * handle does not know this - This will happen is attachGraph is never called on the handle. Couple of examples\n\t\t * where this can happen:\n\t\t *\n\t\t * 1. Handles to DDS other than the default handle won't know if the DDS becomes visible after the handle was\n\t\t * created.\n\t\t *\n\t\t * 2. Handles to root data stores will never know that it was visible because the handle will not be stores in\n\t\t * another DDS and so, attachGraph will never be called on it.\n\t\t */\n\t\treturn this.isAttached || this.locallyVisible;\n\t}\n\n\t/**\n\t * Tracks whether this handle is locally visible in the container.\n\t */\n\tprivate locallyVisible: boolean = false;\n\n\t/**\n\t * Creates a new `FluidObjectHandle`.\n\t *\n\t * @param value - The {@link @fluidframework/core-interfaces#FluidObject} object this handle is for.\n\t * @param path - The path to this handle relative to the `routeContext`.\n\t * @param routeContext - The parent {@link @fluidframework/core-interfaces#IFluidHandleContext} that has a route\n\t * to this handle.\n\t */\n\tconstructor(\n\t\tprotected readonly value: T | Promise<T>,\n\t\tpublic readonly path: string,\n\t\tpublic readonly routeContext: IFluidHandleContext,\n\t) {\n\t\tthis.absolutePath = generateHandleContextPath(path, this.routeContext);\n\t}\n\n\t/**\n\t * {@inheritDoc @fluidframework/core-interfaces#IFluidHandle.get}\n\t */\n\tpublic async get(): Promise<any> {\n\t\t// Note that this return works whether we received a T or a Promise<T> for this.value in the constructor.\n\t\treturn this.value;\n\t}\n\n\t/**\n\t * {@inheritDoc @fluidframework/core-interfaces#IFluidHandle.attachGraph }\n\t */\n\tpublic attachGraph(): void {\n\t\tif (this.visible) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.locallyVisible = true;\n\t\tthis.pendingHandlesToMakeVisible.forEach((handle) => {\n\t\t\thandle.attachGraph();\n\t\t});\n\t\tthis.pendingHandlesToMakeVisible.clear();\n\t\tthis.routeContext.attachGraph();\n\t}\n\n\t/**\n\t * {@inheritDoc @fluidframework/core-interfaces#IFluidHandle.bind}\n\t */\n\tpublic bind(handle: IFluidHandle) {\n\t\t// If this handle is visible, attach the graph of the incoming handle as well.\n\t\tif (this.visible) {\n\t\t\thandle.attachGraph();\n\t\t\treturn;\n\t\t}\n\t\tthis.pendingHandlesToMakeVisible.add(handle);\n\t}\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluidframework/datastore",
3
- "version": "2.0.0-dev.7.4.0.215930",
3
+ "version": "2.0.0-dev.7.4.0.216897",
4
4
  "description": "Fluid data store implementation",
5
5
  "homepage": "https://fluidframework.com",
6
6
  "repository": {
@@ -35,17 +35,17 @@
35
35
  "temp-directory": "nyc/.nyc_output"
36
36
  },
37
37
  "dependencies": {
38
- "@fluid-internal/client-utils": "2.0.0-dev.7.4.0.215930",
39
- "@fluidframework/container-definitions": "2.0.0-dev.7.4.0.215930",
40
- "@fluidframework/core-interfaces": "2.0.0-dev.7.4.0.215930",
41
- "@fluidframework/core-utils": "2.0.0-dev.7.4.0.215930",
42
- "@fluidframework/datastore-definitions": "2.0.0-dev.7.4.0.215930",
43
- "@fluidframework/driver-definitions": "2.0.0-dev.7.4.0.215930",
44
- "@fluidframework/driver-utils": "2.0.0-dev.7.4.0.215930",
38
+ "@fluid-internal/client-utils": "2.0.0-dev.7.4.0.216897",
39
+ "@fluidframework/container-definitions": "2.0.0-dev.7.4.0.216897",
40
+ "@fluidframework/core-interfaces": "2.0.0-dev.7.4.0.216897",
41
+ "@fluidframework/core-utils": "2.0.0-dev.7.4.0.216897",
42
+ "@fluidframework/datastore-definitions": "2.0.0-dev.7.4.0.216897",
43
+ "@fluidframework/driver-definitions": "2.0.0-dev.7.4.0.216897",
44
+ "@fluidframework/driver-utils": "2.0.0-dev.7.4.0.216897",
45
45
  "@fluidframework/protocol-definitions": "^3.0.0",
46
- "@fluidframework/runtime-definitions": "2.0.0-dev.7.4.0.215930",
47
- "@fluidframework/runtime-utils": "2.0.0-dev.7.4.0.215930",
48
- "@fluidframework/telemetry-utils": "2.0.0-dev.7.4.0.215930",
46
+ "@fluidframework/runtime-definitions": "2.0.0-dev.7.4.0.216897",
47
+ "@fluidframework/runtime-utils": "2.0.0-dev.7.4.0.216897",
48
+ "@fluidframework/telemetry-utils": "2.0.0-dev.7.4.0.216897",
49
49
  "lodash": "^4.17.21",
50
50
  "uuid": "^9.0.0"
51
51
  },
@@ -55,8 +55,8 @@
55
55
  "@fluidframework/build-tools": "^0.28.0",
56
56
  "@fluidframework/datastore-previous": "npm:@fluidframework/datastore@2.0.0-internal.7.2.0",
57
57
  "@fluidframework/eslint-config-fluid": "^3.1.0",
58
- "@fluidframework/mocha-test-setup": "2.0.0-dev.7.4.0.215930",
59
- "@fluidframework/test-runtime-utils": "2.0.0-dev.7.4.0.215930",
58
+ "@fluidframework/mocha-test-setup": "2.0.0-dev.7.4.0.216897",
59
+ "@fluidframework/test-runtime-utils": "2.0.0-dev.7.4.0.216897",
60
60
  "@microsoft/api-extractor": "^7.38.3",
61
61
  "@types/mocha": "^9.1.1",
62
62
  "@types/node": "^16.18.38",
@@ -102,12 +102,13 @@
102
102
  "build:docs": "fluid-build . --task api",
103
103
  "build:esnext": "tsc --project ./tsconfig.esnext.json",
104
104
  "build:test": "tsc --project ./src/test/tsconfig.json",
105
+ "check:release-tags": "api-extractor run --local --config ./api-extractor-lint.json",
105
106
  "ci:build:docs": "api-extractor run",
106
107
  "clean": "rimraf --glob dist lib \"**/*.tsbuildinfo\" \"**/*.build.log\" _api-extractor-temp nyc",
107
108
  "eslint": "eslint --format stylish src",
108
109
  "eslint:fix": "eslint --format stylish src --fix --fix-type problem,suggestion,layout",
109
110
  "format": "npm run prettier:fix",
110
- "lint": "npm run prettier && npm run eslint",
111
+ "lint": "npm run prettier && npm run check:release-tags && npm run eslint",
111
112
  "lint:fix": "npm run prettier:fix && npm run eslint:fix",
112
113
  "prettier": "prettier --check . --cache --ignore-path ../../../.prettierignore",
113
114
  "prettier:fix": "prettier --write . --cache --ignore-path ../../../.prettierignore",
@@ -82,7 +82,7 @@ import { RemoteChannelContext } from "./remoteChannelContext";
82
82
  import { FluidObjectHandle } from "./fluidHandle";
83
83
 
84
84
  /**
85
- * @public
85
+ * @internal
86
86
  */
87
87
  export enum DataStoreMessageType {
88
88
  // Creates a new channel
@@ -91,7 +91,7 @@ export enum DataStoreMessageType {
91
91
  }
92
92
 
93
93
  /**
94
- * @public
94
+ * @internal
95
95
  */
96
96
  export interface ISharedObjectRegistry {
97
97
  // TODO consider making this async. A consequence is that either the creation of a distributed data type
@@ -101,8 +101,7 @@ export interface ISharedObjectRegistry {
101
101
 
102
102
  /**
103
103
  * Base data store class
104
- *
105
- * @public
104
+ * @internal
106
105
  */
107
106
  export class FluidDataStoreRuntime
108
107
  extends TypedEventEmitter<IFluidDataStoreRuntimeEvents>
@@ -1164,8 +1163,7 @@ export class FluidDataStoreRuntime
1164
1163
  * Request handler is only called when data store can't resolve request, i.e. for custom requests.
1165
1164
  * @param Base - base class, inherits from FluidDataStoreRuntime
1166
1165
  * @param requestHandler - request handler to mix in
1167
- *
1168
- * @public
1166
+ * @internal
1169
1167
  */
1170
1168
  export const mixinRequestHandler = (
1171
1169
  requestHandler: (request: IRequest, runtime: FluidDataStoreRuntime) => Promise<IResponse>,
@@ -1186,8 +1184,7 @@ export const mixinRequestHandler = (
1186
1184
  * @param handler - handler that returns info about blob to be added to summary.
1187
1185
  * Or undefined not to add anything to summary.
1188
1186
  * @param Base - base class, inherits from FluidDataStoreRuntime
1189
- *
1190
- * @public
1187
+ * @internal
1191
1188
  */
1192
1189
  export const mixinSummaryHandler = (
1193
1190
  handler: (
@@ -8,8 +8,7 @@ import { generateHandleContextPath } from "@fluidframework/runtime-utils";
8
8
 
9
9
  /**
10
10
  * Handle for a shared {@link @fluidframework/core-interfaces#FluidObject}.
11
- *
12
- * @public
11
+ * @internal
13
12
  */
14
13
  export class FluidObjectHandle<T extends FluidObject = FluidObject> implements IFluidHandle {
15
14
  private readonly pendingHandlesToMakeVisible: Set<IFluidHandle> = new Set();