@fluidframework/test-utils 2.0.0-dev-rc.3.0.0.254513 → 2.0.0-dev-rc.3.0.0.254866

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/api-report/test-utils.api.md +1 -1
  2. package/dist/alpha.d.ts +17 -0
  3. package/dist/beta.d.ts +9 -0
  4. package/dist/interfaces.d.ts +1 -1
  5. package/dist/interfaces.d.ts.map +1 -1
  6. package/dist/interfaces.js.map +1 -1
  7. package/dist/packageVersion.d.ts +1 -1
  8. package/dist/packageVersion.js +1 -1
  9. package/dist/packageVersion.js.map +1 -1
  10. package/dist/public.d.ts +9 -0
  11. package/dist/testFluidObject.d.ts +1 -1
  12. package/dist/testFluidObject.d.ts.map +1 -1
  13. package/dist/testFluidObject.js +5 -5
  14. package/dist/testFluidObject.js.map +1 -1
  15. package/lib/alpha.d.ts +17 -0
  16. package/lib/beta.d.ts +9 -0
  17. package/lib/interfaces.d.ts +1 -1
  18. package/lib/interfaces.d.ts.map +1 -1
  19. package/lib/interfaces.js.map +1 -1
  20. package/lib/packageVersion.d.ts +1 -1
  21. package/lib/packageVersion.js +1 -1
  22. package/lib/packageVersion.js.map +1 -1
  23. package/lib/public.d.ts +9 -0
  24. package/lib/testFluidObject.d.ts +1 -1
  25. package/lib/testFluidObject.d.ts.map +1 -1
  26. package/lib/testFluidObject.js +1 -1
  27. package/lib/testFluidObject.js.map +1 -1
  28. package/package.json +29 -41
  29. package/src/interfaces.ts +1 -1
  30. package/src/packageVersion.ts +1 -1
  31. package/src/testFluidObject.ts +1 -1
  32. package/api-extractor-cjs.json +0 -8
  33. package/dist/test-utils-alpha.d.ts +0 -310
  34. package/dist/test-utils-beta.d.ts +0 -211
  35. package/dist/test-utils-public.d.ts +0 -211
  36. package/dist/test-utils-untrimmed.d.ts +0 -1071
  37. package/dist/tsdoc-metadata.json +0 -11
  38. package/lib/test-utils-alpha.d.ts +0 -310
  39. package/lib/test-utils-beta.d.ts +0 -211
  40. package/lib/test-utils-public.d.ts +0 -211
  41. package/lib/test-utils-untrimmed.d.ts +0 -1071
@@ -1,1071 +0,0 @@
1
- import { ConfigTypes } from '@fluidframework/core-interfaces';
2
- import { ContainerRuntime } from '@fluidframework/container-runtime/internal';
3
- import { ContainerRuntimeFactoryWithDefaultDataStore } from '@fluidframework/aqueduct/internal';
4
- import { FluidDataStoreRuntime } from '@fluidframework/datastore/internal';
5
- import { FluidObject } from '@fluidframework/core-interfaces';
6
- import { IChannelFactory } from '@fluidframework/datastore-definitions';
7
- import { ICodeDetailsLoader } from '@fluidframework/container-definitions/internal';
8
- import { IConfigProviderBase } from '@fluidframework/core-interfaces';
9
- import { IContainer } from '@fluidframework/container-definitions/internal';
10
- import { IContainerContext } from '@fluidframework/container-definitions/internal';
11
- import { IContainerRuntime } from '@fluidframework/container-runtime-definitions/internal';
12
- import { IContainerRuntimeOptions } from '@fluidframework/container-runtime/internal';
13
- import { IDataStore } from '@fluidframework/runtime-definitions/internal';
14
- import { IDocumentService } from '@fluidframework/driver-definitions/internal';
15
- import { IDocumentServiceFactory } from '@fluidframework/driver-definitions/internal';
16
- import { IDocumentStorageService } from '@fluidframework/driver-definitions/internal';
17
- import { IFluidCodeDetails } from '@fluidframework/container-definitions/internal';
18
- import { IFluidDataStoreChannel } from '@fluidframework/runtime-definitions/internal';
19
- import { IFluidDataStoreContext } from '@fluidframework/runtime-definitions/internal';
20
- import { IFluidDataStoreFactory } from '@fluidframework/runtime-definitions/internal';
21
- import { IFluidDataStoreRuntime } from '@fluidframework/datastore-definitions';
22
- import { IFluidHandle } from '@fluidframework/core-interfaces';
23
- import { IFluidLoadable } from '@fluidframework/core-interfaces';
24
- import { IFluidModule } from '@fluidframework/container-definitions/internal';
25
- import { IFluidModuleWithDetails } from '@fluidframework/container-definitions/internal';
26
- import { IHostLoader } from '@fluidframework/container-definitions/internal';
27
- import { ILoaderOptions } from '@fluidframework/container-definitions/internal';
28
- import { ILoaderProps } from '@fluidframework/container-loader/internal';
29
- import { IOnDemandSummarizeOptions } from '@fluidframework/container-runtime/internal';
30
- import { IProvideFluidCodeDetailsComparer } from '@fluidframework/container-definitions/internal';
31
- import { IProvideFluidDataStoreFactory } from '@fluidframework/runtime-definitions/internal';
32
- import { IProvideFluidDataStoreRegistry } from '@fluidframework/runtime-definitions/internal';
33
- import { IProvideRuntimeFactory } from '@fluidframework/container-definitions/internal';
34
- import { IRequest } from '@fluidframework/core-interfaces';
35
- import { IRequestHeader } from '@fluidframework/core-interfaces';
36
- import { IResolvedUrl } from '@fluidframework/driver-definitions/internal';
37
- import { IResponse } from '@fluidframework/core-interfaces';
38
- import { IRuntime } from '@fluidframework/container-definitions/internal';
39
- import { ISharedMap } from '@fluidframework/map';
40
- import { ISummarizer } from '@fluidframework/container-runtime/internal';
41
- import { ISummaryContext } from '@fluidframework/driver-definitions/internal';
42
- import { ISummaryTree } from '@fluidframework/protocol-definitions';
43
- import { ITelemetryBaseEvent } from '@fluidframework/core-interfaces';
44
- import { ITelemetryBaseLogger } from '@fluidframework/core-interfaces';
45
- import { ITelemetryGenericEventExt } from '@fluidframework/telemetry-utils';
46
- import { ITelemetryLoggerPropertyBags } from '@fluidframework/telemetry-utils/internal';
47
- import { ITestDriver } from '@fluid-internal/test-driver-definitions';
48
- import { IUrlResolver } from '@fluidframework/driver-definitions/internal';
49
- import { Loader } from '@fluidframework/container-loader/internal';
50
- import { NamedFluidDataStoreRegistryEntries } from '@fluidframework/runtime-definitions/internal';
51
- import { RuntimeRequestHandler } from '@fluidframework/request-handler/internal';
52
-
53
- /**
54
- * @internal
55
- */
56
- export declare type ChannelFactoryRegistry = Iterable<[string | undefined, IChannelFactory]>;
57
-
58
- /**
59
- * Creates a detached Container and attaches it.
60
- * @param source - The code details used to create the Container.
61
- * @param loader - The loader to use to initialize the container.
62
- * @param attachRequest - The request to create new from.
63
- * @alpha
64
- */
65
- export declare function createAndAttachContainer(source: IFluidCodeDetails, loader: IHostLoader, attachRequest: IRequest): Promise<IContainer>;
66
-
67
- /**
68
- * ! Note: This function is purely needed for back-compat as the constructor argument structure was changed
69
- * @internal
70
- */
71
- export declare const createContainerRuntimeFactoryWithDefaultDataStore: (Base: typeof ContainerRuntimeFactoryWithDefaultDataStore | undefined, ctorArgs: {
72
- defaultFactory: IFluidDataStoreFactory;
73
- registryEntries: NamedFluidDataStoreRegistryEntries;
74
- dependencyContainer?: any;
75
- requestHandlers?: RuntimeRequestHandler[] | undefined;
76
- runtimeOptions?: IContainerRuntimeOptions | undefined;
77
- provideEntryPoint?: ((runtime: IContainerRuntime) => Promise<FluidObject>) | undefined;
78
- }) => ContainerRuntimeFactoryWithDefaultDataStore;
79
-
80
- /**
81
- * @internal
82
- */
83
- export declare const createDocumentId: () => string;
84
-
85
- /**
86
- * Creates a loader with the given package entries and driver.
87
- * @param packageEntries - A list of code details to Fluid entry points.
88
- * @param documentServiceFactory - the driver factory to use
89
- * @param urlResolver - the url resolver to use
90
- * @param options - loader options
91
- * @internal
92
- */
93
- export declare function createLoader(packageEntries: Iterable<[IFluidCodeDetails, fluidEntryPoint]>, documentServiceFactory: IDocumentServiceFactory, urlResolver: IUrlResolver, logger?: ITelemetryBaseLogger, options?: ILoaderOptions): IHostLoader;
94
-
95
- /**
96
- * Creates a summarizer client from the given container and returns the summarizer client's IContainer and ISummarizer.
97
- * The ISummarizer can be used to generate on-demand summaries. The IContainer can be used to fetch data stores, etc.
98
- *
99
- * Can pass in a test config provider to enable/disable features.
100
- * @internal
101
- */
102
- export declare function createSummarizer(provider: ITestObjectProvider, container: IContainer, config?: ITestContainerConfig, summaryVersion?: string, logger?: ITelemetryBaseLogger): Promise<{
103
- container: IContainer;
104
- summarizer: ISummarizer;
105
- }>;
106
-
107
- /** @internal */
108
- export declare function createSummarizerCore(container: IContainer, loader: IHostLoader, summaryVersion?: string): Promise<{
109
- container: IContainer;
110
- summarizer: ISummarizer;
111
- }>;
112
-
113
- /**
114
- * Creates a summarizer client from the given container and data store factory, and returns the summarizer client's
115
- * IContainer and ISummarizer.
116
- * The ISummarizer can be used to generate on-demand summaries. The IContainer can be used to fetch data stores, etc.
117
- * @internal
118
- */
119
- export declare function createSummarizerFromFactory(provider: ITestObjectProvider, container: IContainer, dataStoreFactory: IFluidDataStoreFactory, summaryVersion?: string, containerRuntimeFactoryType?: typeof ContainerRuntimeFactoryWithDefaultDataStore, registryEntries?: NamedFluidDataStoreRegistryEntries, logger?: ITelemetryBaseLogger, configProvider?: IConfigProviderBase): Promise<{
120
- container: IContainer;
121
- summarizer: ISummarizer;
122
- }>;
123
-
124
- /**
125
- * Creates a test config provider with the ability to set configs values and clear all config values.
126
- * @internal
127
- */
128
- export declare const createTestConfigProvider: () => ITestConfigProvider;
129
-
130
- /**
131
- * Create a container runtime factory class that allows you to set runtime options
132
- * @internal
133
- */
134
- export declare const createTestContainerRuntimeFactory: (containerRuntimeCtor: typeof ContainerRuntime) => {
135
- new (type: string, dataStoreFactory: IFluidDataStoreFactory, runtimeOptions?: IContainerRuntimeOptions, requestHandlers?: RuntimeRequestHandler[]): {
136
- type: string;
137
- dataStoreFactory: IFluidDataStoreFactory;
138
- runtimeOptions: IContainerRuntimeOptions;
139
- requestHandlers: RuntimeRequestHandler[];
140
- instantiateFirstTime(runtime: ContainerRuntime): Promise<void>;
141
- instantiateFromExisting(runtime: ContainerRuntime): Promise<void>;
142
- preInitialize(context: IContainerContext, existing: boolean): Promise<IRuntime & IContainerRuntime>;
143
- readonly IRuntimeFactory: any;
144
- instantiateRuntime(context: IContainerContext, existing: boolean): Promise<IRuntime>;
145
- hasInitialized(_runtime: IContainerRuntime): Promise<void>;
146
- };
147
- };
148
-
149
- /**
150
- * @internal
151
- */
152
- export declare enum DataObjectFactoryType {
153
- Primed = 0,
154
- Test = 1
155
- }
156
-
157
- /**
158
- * @internal
159
- */
160
- export declare const defaultTimeoutDurationMs = 250;
161
-
162
- /**
163
- * This class tracks events. It allows specifying expected events, which will be looked for in order.
164
- * It also tracks all unexpected errors.
165
- * At any point you call reportAndClearTrackedEvents which will provide all unexpected errors, and
166
- * any expected events that have not occurred.
167
- * @internal
168
- */
169
- export declare class EventAndErrorTrackingLogger implements ITelemetryBaseLogger, IEventAndErrorTrackingLogger {
170
- private readonly baseLogger?;
171
- /**
172
- * Even if these error events are logged, tests should still be allowed to pass
173
- * Additionally, if downgrade is true, then log as generic (e.g. to avoid polluting the e2e test logs)
174
- */
175
- private readonly allowedErrors;
176
- constructor(baseLogger?: ITelemetryBaseLogger | undefined);
177
- private readonly expectedEvents;
178
- private readonly unexpectedErrors;
179
- registerExpectedEvent(...orderedExpectedEvents: ITelemetryGenericEventExt[]): void;
180
- send(event: ITelemetryBaseEvent): void;
181
- reportAndClearTrackedEvents(): {
182
- expectedNotFound: {
183
- index: number;
184
- event: ITelemetryGenericEventExt;
185
- }[];
186
- unexpectedErrors: ITelemetryBaseEvent[];
187
- };
188
- }
189
-
190
- /**
191
- * @internal
192
- */
193
- export declare type fluidEntryPoint = SupportedExportInterfaces | IFluidModule;
194
-
195
- /**
196
- * This function should ONLY be used for back compat purposes
197
- * LTS versions of the Loader/Container will not have the "getEntryPoint" method, so we need to fallback to "request"
198
- * This function can be removed once LTS version of Loader moves to 2.0.0-internal.7.0.0
199
- * @internal
200
- */
201
- export declare function getContainerEntryPointBackCompat<T>(container: IContainer): Promise<T>;
202
-
203
- /**
204
- * This function should ONLY be used for back compat purposes
205
- * Older supported versions of IDataStore do not have the "entryPoint" property, so we need to fallback to "request"
206
- * This function can be removed once back-compat support for IDataStore moves to 2.0.0-internal.7.0.0
207
- *
208
- * @internal
209
- */
210
- export declare function getDataStoreEntryPointBackCompat<T>(dataStore: IDataStore): Promise<T>;
211
-
212
- /**
213
- * @internal
214
- */
215
- export declare function getUnexpectedLogErrorException(logger: IEventAndErrorTrackingLogger | undefined, prefix?: string): Error | undefined;
216
-
217
- /**
218
- * Used to retrieve, update, and reset document id based on the type of driver being used.
219
- *
220
- * @internal
221
- */
222
- export declare interface IDocumentIdStrategy {
223
- /**
224
- * Get document id
225
- */
226
- get(): string;
227
- /**
228
- * Update the document ID from the resolved container's URL and reset the ID property
229
- */
230
- update(resolvedUrl?: IResolvedUrl): void;
231
- /**
232
- * Reset document id to a new document id
233
- */
234
- reset(): void;
235
- }
236
-
237
- /** @internal */
238
- export declare interface IEventAndErrorTrackingLogger {
239
- registerExpectedEvent: (...orderedExpectedEvents: ITelemetryGenericEventExt[]) => void;
240
- reportAndClearTrackedEvents: () => {
241
- expectedNotFound: {
242
- index: number;
243
- event: ITelemetryGenericEventExt;
244
- }[];
245
- unexpectedErrors: ITelemetryBaseEvent[];
246
- };
247
- }
248
-
249
- /**
250
- * @alpha
251
- */
252
- export declare interface IOpProcessingController {
253
- processIncoming(...containers: IContainer[]): Promise<void>;
254
- processOutgoing(...containers: IContainer[]): Promise<void>;
255
- pauseProcessing(...containers: IContainer[]): Promise<void>;
256
- resumeProcessing(...containers: IContainer[]): void;
257
- }
258
-
259
- /**
260
- * @alpha
261
- */
262
- export declare interface IProvideTestFluidObject {
263
- readonly ITestFluidObject: ITestFluidObject;
264
- }
265
-
266
- /**
267
- * Extension of IConfigProviderBase that supports setting a config value and clearing all
268
- * config values for testing.
269
- *
270
- * @internal
271
- */
272
- export declare interface ITestConfigProvider extends IConfigProviderBase {
273
- /** Set a config value */
274
- set: (key: string, value: ConfigTypes) => void;
275
- /** Clear all config values */
276
- clear: () => void;
277
- }
278
-
279
- /**
280
- * @internal
281
- */
282
- export declare interface ITestContainerConfig {
283
- /** TestFluidDataObject instead of PrimedDataStore */
284
- fluidDataObjectType?: DataObjectFactoryType;
285
- /** An array of channel name and DDS factory pair to create on container creation time */
286
- registry?: ChannelFactoryRegistry;
287
- /** Container runtime options for the container instance */
288
- runtimeOptions?: IContainerRuntimeOptions;
289
- /** Whether this runtime should be instantiated using a mixed-in attributor class */
290
- enableAttribution?: boolean;
291
- /** For Cross-Version compat testing, load using the create version (e.g. use this to get a Summarizer on the create version) */
292
- forceUseCreateVersion?: true;
293
- /** Loader options for the loader used to create containers */
294
- loaderProps?: Partial<ILoaderProps>;
295
- }
296
-
297
- /**
298
- * @alpha
299
- */
300
- export declare interface ITestFluidObject extends IProvideTestFluidObject, IFluidLoadable {
301
- root: ISharedMap;
302
- readonly runtime: IFluidDataStoreRuntime;
303
- readonly channel: IFluidDataStoreChannel;
304
- readonly context: IFluidDataStoreContext;
305
- getSharedObject<T = any>(id: string): Promise<T>;
306
- }
307
-
308
- /**
309
- * @internal
310
- */
311
- export declare interface ITestObjectProvider {
312
- /**
313
- * Indicates which type of test object provider is being used.
314
- */
315
- type: "TestObjectProvider" | "TestObjectProviderWithVersionedLoad";
316
- /**
317
- * The document id to retrieve or create containers
318
- */
319
- documentId: string;
320
- /**
321
- * Creates the document service after extracting different endpoints URLs from a resolved URL.
322
- */
323
- documentServiceFactory: IDocumentServiceFactory;
324
- /**
325
- * Test driver used to create the IDocumentServiceFactory. Varies depending on the test type.
326
- */
327
- driver: ITestDriver;
328
- /**
329
- * Logger used to track expected and unexpected events.
330
- */
331
- logger: ITelemetryBaseLogger;
332
- /**
333
- * Logger used to track expected and unexpected events.
334
- */
335
- tracker: IEventAndErrorTrackingLogger;
336
- /**
337
- * Used to create a url for the created container with any data store path given in the relative url.
338
- */
339
- urlResolver: IUrlResolver;
340
- /**
341
- * Default IFluidCodeDetails used to create containers.
342
- */
343
- defaultCodeDetails: IFluidCodeDetails;
344
- /**
345
- * Contains functions to pause/resume op processing.
346
- */
347
- opProcessingController: IOpProcessingController;
348
- /**
349
- * Represents the entry point for a Fluid container.
350
- */
351
- createFluidEntryPoint: (testContainerConfig?: ITestContainerConfig) => fluidEntryPoint;
352
- /**
353
- * Create a loader. Containers created/loaded through this loader will be added to the OpProcessingController.
354
- *
355
- * Only the version of the loader will vary based on compat config. The version of
356
- * containerRuntime/dataRuntime used in fluidEntryPoint will be used as is from what is passed in.
357
- *
358
- * @param packageEntries - list of code details and fluidEntryPoint pairs.
359
- * @param loaderProps - Optional loader properties
360
- * @param forceUseCreateVersion - For Cross-Version compat testing, create a loader based on the create version
361
- */
362
- createLoader(packageEntries: Iterable<[IFluidCodeDetails, fluidEntryPoint]>, loaderProps?: Partial<ILoaderProps>, forceUseCreateVersion?: boolean): IHostLoader;
363
- /**
364
- * Create a container using a default document id and code details.
365
- * Container created is automatically added to the OpProcessingController to manage op flow
366
- *
367
- * Only the version of the loader will vary based on compat config. The version of
368
- * containerRuntime/dataRuntime used in fluidEntryPoint will be used as is from what is passed in.
369
- *
370
- * @param packageEntries - list of code details and fluidEntryPoint pairs.
371
- */
372
- createContainer(entryPoint: fluidEntryPoint, loaderProps?: Partial<ILoaderProps>): Promise<IContainer>;
373
- /**
374
- * Create a detached container much like createContainer, but without attaching it to the document service.
375
- */
376
- createDetachedContainer(entryPoint: fluidEntryPoint, loaderProps?: Partial<ILoaderProps>): Promise<IContainer>;
377
- /**
378
- * Attaches a detached container to the document service.
379
- */
380
- attachDetachedContainer(container: IContainer): Promise<void>;
381
- /**
382
- * Loads a container using the default document id
383
- */
384
- loadContainer(entryPoint: fluidEntryPoint, loaderProps?: Partial<ILoaderProps>, requestHeader?: IRequestHeader): Promise<IContainer>;
385
- /**
386
- * Make a test loader. Containers created/loaded through this loader will be added to the OpProcessingController.
387
- * The version of the loader/containerRuntime/dataRuntime may vary based on compat config of the current run
388
- * @param testContainerConfig - optional configuring the test Container
389
- */
390
- makeTestLoader(testContainerConfig?: ITestContainerConfig): IHostLoader;
391
- /**
392
- * Make a container using a default document id and code details
393
- * Container loaded is automatically added to the OpProcessingController to manage op flow
394
- * @param testContainerConfig - optional configuring the test Container
395
- */
396
- makeTestContainer(testContainerConfig?: ITestContainerConfig): Promise<IContainer>;
397
- /**
398
- * Load a container using a default document id and code details.
399
- * IContainer loaded is automatically added to the OpProcessingController to manage op flow
400
- * @param testContainerConfig - optional configuring the test Container
401
- * @param requestHeader - optional headers to be supplied to the loader
402
- */
403
- loadTestContainer(testContainerConfig?: ITestContainerConfig, requestHeader?: IRequestHeader, pendingLocalState?: string): Promise<IContainer>;
404
- /**
405
- * Update the document ID from the resolved container's URL and reset the ID property
406
- */
407
- updateDocumentId(url: IResolvedUrl | undefined): void;
408
- /**
409
- * Make sure all the tracked containers are synchronized.
410
- */
411
- ensureSynchronized(timeoutDuration?: number): Promise<void>;
412
- /**
413
- * Reset the tracker, closing all containers and stop tracking them.
414
- */
415
- resetLoaderContainerTracker(syncSummarizerClients?: boolean): any;
416
- /**
417
- * Resets and closes all tracked containers and class states.
418
- */
419
- reset(): void;
420
- }
421
-
422
- /**
423
- * @alpha
424
- */
425
- export declare class LoaderContainerTracker implements IOpProcessingController {
426
- private readonly syncSummarizerClients;
427
- private readonly containers;
428
- private lastProposalSeqNum;
429
- constructor(syncSummarizerClients?: boolean);
430
- /**
431
- * Add a loader to start to track any container created from them
432
- * @param loader - loader to start tracking any container created.
433
- */
434
- add<LoaderType extends IHostLoader>(loader: LoaderType): void;
435
- /**
436
- * Utility function to add container to be tracked.
437
- *
438
- * @param container - container to add
439
- */
440
- private addContainer;
441
- /**
442
- * Keep track of the trailing NoOp that was sent so we can discount them in the clientSequenceNumber tracking.
443
- * The server might coalesce them with other ops, or a single NoOp, or delay it if it don't think it is necessary.
444
- *
445
- * @param container - the container to track
446
- * @param record - the record to update the trailing op information
447
- */
448
- private trackTrailingNoOps;
449
- private trackLastProposal;
450
- /**
451
- * Reset the tracker, closing all containers and stop tracking them.
452
- */
453
- reset(): void;
454
- /**
455
- * Make sure all the tracked containers are synchronized.
456
- *
457
- * No isDirty (non-readonly) containers
458
- * No extra clientId in quorum of any container that is not tracked and still opened.
459
- * - i.e. no pending Join/Leave message.
460
- * No unresolved proposal (minSeqNum \>= lastProposalSeqNum)
461
- * lastSequenceNumber of all container is the same
462
- * clientSequenceNumberObserved is the same as clientSequenceNumber sent
463
- * - this overlaps with !isDirty, but include task scheduler ops.
464
- * - Trailing NoOp is tracked and don't count as pending ops.
465
- *
466
- * Containers that are already pause will resume process and paused again once
467
- * everything is synchronized. Containers that aren't paused will remain unpaused when this
468
- * function returns.
469
- */
470
- ensureSynchronized(...containers: IContainer[]): Promise<void>;
471
- /**
472
- * Utility to calculate the set of clientId per container in quorum that is NOT associated with
473
- * any container we tracked, indicating there is a pending join or leave op that we need to wait.
474
- *
475
- * @param containersToApply - the set of containers to check
476
- */
477
- private getPendingClients;
478
- /**
479
- * Utility to check synchronization based on sequence number
480
- * See ensureSynchronized for more detail
481
- *
482
- * @param containersToApply - the set of containers to check
483
- */
484
- private needSequenceNumberSynchronize;
485
- private containerIndexStrings;
486
- /**
487
- * Utility to wait for any clientId in quorum that is NOT associated with any container we
488
- * tracked, indicating there is a pending join or leave op that we need to wait.
489
- *
490
- * Note that this function doesn't account for container that got added after we started waiting
491
- *
492
- * @param containersToApply - the set of containers to wait for any inbound ops for
493
- */
494
- private waitForPendingClients;
495
- /**
496
- * Utility to wait for any inbound ops from a set of containers
497
- * @param containersToApply - the set of containers to wait for any inbound ops for
498
- */
499
- private waitForAnyInboundOps;
500
- /**
501
- * Resume all queue activities on all paused tracked containers and return them
502
- */
503
- resumeProcessing(...containers: IContainer[]): IContainer[];
504
- /**
505
- * Pause all queue activities on the containers given, or all tracked containers
506
- * Any containers given that is not tracked will be ignored.
507
- *
508
- * When a container is paused, it is assumed that we want fine grain control over op
509
- * sequencing. This function will prepare the container and force it into write mode to
510
- * avoid missing join messages or change the sequence of event when switching from read to
511
- * write mode.
512
- */
513
- pauseProcessing(...containers: IContainer[]): Promise<void>;
514
- /**
515
- * When a container is paused, it is assumed that we want fine grain control over op
516
- * sequencing. This function will prepare the container and force it into write mode to
517
- * avoid missing join messages or change the sequence of event when switching from read to
518
- * write mode.
519
- *
520
- * @param container - the container to pause
521
- * @param record - the record for the container
522
- */
523
- private pauseContainer;
524
- /**
525
- * Pause all queue activities on all tracked containers, and resume only
526
- * inbound to process ops until it is idle. All queues are left in the paused state
527
- * after the function.
528
- *
529
- * Pausing will switch the container to write mode. See `pauseProcessing`
530
- */
531
- processIncoming(...containers: IContainer[]): Promise<void>;
532
- /**
533
- * Pause all queue activities on all tracked containers, and resume only
534
- * outbound to process ops until it is idle. All queues are left in the paused state
535
- * after the function.
536
- *
537
- * Pausing will switch the container to write mode. See `pauseProcessing`
538
- */
539
- processOutgoing(...containers: IContainer[]): Promise<void>;
540
- /**
541
- * Implementation of processIncoming and processOutgoing
542
- */
543
- private processQueue;
544
- /**
545
- * Utility to set up listener to track the outbound ops until it round trip back
546
- * Returns a function to remove the handler after it is done.
547
- *
548
- * @param container - the container to setup
549
- * @param inflightTracker - a map to track the clientSequenceNumber per container it expect to get ops back
550
- */
551
- private setupInOutTracker;
552
- /**
553
- * Setup debug traces for connection and ops
554
- */
555
- private setupTrace;
556
- /**
557
- * Filter out the opened containers based on param.
558
- * @param containers - The container to filter to. If the array is empty, it means don't filter and return
559
- * all open containers.
560
- */
561
- private getContainers;
562
- }
563
-
564
- /**
565
- * A simple code loader that caches a mapping of package name to a Fluid entry point.
566
- * On load, it retrieves the entry point matching the package name in the given code details.
567
- * @internal
568
- */
569
- export declare class LocalCodeLoader implements ICodeDetailsLoader {
570
- private readonly fluidPackageCache;
571
- constructor(packageEntries: Iterable<[IFluidCodeDetails, fluidEntryPoint]>, runtimeOptions?: IContainerRuntimeOptions);
572
- /**
573
- * It finds the entry point for the package name in the given source and return it
574
- * as a Fluid module.
575
- * @param source - Details of where to find chaincode
576
- */
577
- load(source: IFluidCodeDetails): Promise<IFluidModuleWithDetails>;
578
- }
579
-
580
- /**
581
- * Simple retry mechanism with linear back off to call
582
- * a function which may eventually return an accepted value.
583
- *
584
- * @param callback - the function to execute
585
- * @param check - the function to check if the value is acceptable
586
- * @param defaultValue - the default value
587
- * @param maxTries - maximum number of attempts
588
- * @param backOffMs - back off between attempts in milliseconds
589
- * @returns the actual value from the callback when successful or the default value otherwise
590
- * @internal
591
- */
592
- export declare const retryWithEventualValue: <T>(callback: () => Promise<T>, check: (value: T) => boolean, defaultValue: T, maxTries?: number, backOffMs?: number) => Promise<T>;
593
-
594
- /**
595
- * Summarizes on demand and returns the summary tree, the version number and the reference sequence number of the
596
- * submitted summary.
597
- *
598
- * @param summarizer - The ISummarizer to use to summarize on demand
599
- * @param inputs - Either the reason string or the full IOnDemandSummarizeOptions.
600
- * Defaults to the reason "end-to-end test".
601
- * @internal
602
- */
603
- export declare function summarizeNow(summarizer: ISummarizer, inputs?: string | IOnDemandSummarizeOptions): Promise<SummaryInfo>;
604
-
605
- /**
606
- * Summary information containing the summary tree, summary version, and summary sequence number.
607
- * @internal
608
- */
609
- export declare interface SummaryInfo {
610
- /**
611
- * The summary tree generated
612
- */
613
- summaryTree: ISummaryTree;
614
- /**
615
- * Handle of the completed summary
616
- */
617
- summaryVersion: string;
618
- /**
619
- * Reference sequence number of the current summary generation
620
- */
621
- summaryRefSeq: number;
622
- }
623
-
624
- /**
625
- * @internal
626
- */
627
- export declare type SupportedExportInterfaces = Partial<IProvideRuntimeFactory & IProvideFluidDataStoreFactory & IProvideFluidDataStoreRegistry & IProvideFluidCodeDetailsComparer>;
628
-
629
- /**
630
- * A container runtime factory that allows you to set runtime options
631
- * @internal
632
- */
633
- export declare const TestContainerRuntimeFactory: {
634
- new (type: string, dataStoreFactory: IFluidDataStoreFactory, runtimeOptions?: IContainerRuntimeOptions, requestHandlers?: RuntimeRequestHandler[]): {
635
- type: string;
636
- dataStoreFactory: IFluidDataStoreFactory;
637
- runtimeOptions: IContainerRuntimeOptions;
638
- requestHandlers: RuntimeRequestHandler[];
639
- instantiateFirstTime(runtime: ContainerRuntime): Promise<void>;
640
- instantiateFromExisting(runtime: ContainerRuntime): Promise<void>;
641
- preInitialize(context: IContainerContext, existing: boolean): Promise<IRuntime & IContainerRuntime>;
642
- readonly IRuntimeFactory: any;
643
- instantiateRuntime(context: IContainerContext, existing: boolean): Promise<IRuntime>;
644
- hasInitialized(_runtime: IContainerRuntime): Promise<void>;
645
- };
646
- };
647
-
648
- /**
649
- * A test Fluid object that will create a shared object for each key-value pair in the factoryEntries passed to load.
650
- * The shared objects can be retrieved by passing the key of the entry to getSharedObject.
651
- * It exposes the IFluidDataStoreContext and IFluidDataStoreRuntime.
652
- * @internal
653
- */
654
- export declare class TestFluidObject implements ITestFluidObject {
655
- readonly runtime: IFluidDataStoreRuntime;
656
- readonly channel: IFluidDataStoreChannel;
657
- readonly context: IFluidDataStoreContext;
658
- private readonly factoryEntriesMap;
659
- get ITestFluidObject(): this;
660
- get IFluidLoadable(): this;
661
- get handle(): IFluidHandle<this>;
662
- root: ISharedMap;
663
- private readonly innerHandle;
664
- private initializeP;
665
- /**
666
- * Creates a new TestFluidObject.
667
- * @param runtime - The data store runtime.
668
- * @param context - The data store context.
669
- * @param factoryEntries - A list of id to IChannelFactory mapping. For each item in the list,
670
- * a shared object is created which can be retrieved by calling getSharedObject() with the id;
671
- */
672
- constructor(runtime: IFluidDataStoreRuntime, channel: IFluidDataStoreChannel, context: IFluidDataStoreContext, factoryEntriesMap: Map<string, IChannelFactory>);
673
- /**
674
- * Retrieves a shared object with the given id.
675
- * @param id - The id of the shared object to retrieve.
676
- */
677
- getSharedObject<T = any>(id: string): Promise<T>;
678
- request(request: IRequest): Promise<IResponse>;
679
- initialize(existing: boolean): Promise<void>;
680
- }
681
-
682
- /**
683
- * Creates a factory for a TestFluidObject with the given object factory entries. It creates a data store runtime
684
- * with the object factories in the entry list. All the entries with an id other than undefined are passed to the
685
- * Fluid object so that it can create a shared object for each.
686
- *
687
- * @example
688
- *
689
- * The following will create a Fluid object that creates and loads a SharedString and SharedDirectory.
690
- * It will add SparseMatrix to the data store's factory so that it can be created later.
691
- *
692
- * ```typescript
693
- * new TestFluidObjectFactory([
694
- * [ "sharedString", SharedString.getFactory() ],
695
- * [ "sharedDirectory", SharedDirectory.getFactory() ],
696
- * [ undefined, SparseMatrix.getFactory() ],
697
- * ]);
698
- * ```
699
- *
700
- * The SharedString and SharedDirectory can be retrieved via getSharedObject() on the TestFluidObject as follows:
701
- *
702
- * ```typescript
703
- * sharedString = testFluidObject.getSharedObject<SharedString>("sharedString");
704
- * sharedDir = testFluidObject.getSharedObject<SharedDirectory>("sharedDirectory");
705
- * ```
706
- *
707
- * @privateRemarks Beware that using this class generally forfeits some compatibility coverage
708
- * `describeCompat` aims to provide:
709
- * `SharedMap`s always reference the current version of SharedMap.
710
- * AB#4670 tracks improving this situation.
711
- * @internal
712
- */
713
- export declare class TestFluidObjectFactory implements IFluidDataStoreFactory {
714
- private readonly factoryEntries;
715
- readonly type: string;
716
- get IFluidDataStoreFactory(): this;
717
- /**
718
- * Creates a new TestFluidObjectFactory.
719
- * @param factoryEntries - A list of id to IChannelFactory mapping. It creates a data store runtime with each
720
- * IChannelFactory. Entries with string ids are passed to the Fluid object so that it can create a shared object
721
- * for it.
722
- */
723
- constructor(factoryEntries: ChannelFactoryRegistry, type?: string);
724
- instantiateDataStore(context: IFluidDataStoreContext, existing: boolean): Promise<FluidDataStoreRuntime>;
725
- }
726
-
727
- /**
728
- * Shared base class for test object provider. Contain code for loader and container creation and loading
729
- * @internal
730
- */
731
- export declare class TestObjectProvider implements ITestObjectProvider {
732
- private readonly LoaderConstructor;
733
- /**
734
- * {@inheritDoc ITestObjectProvider.driver}
735
- */
736
- readonly driver: ITestDriver;
737
- /**
738
- * {@inheritDoc ITestObjectProvider.createFluidEntryPoint}
739
- */
740
- readonly createFluidEntryPoint: (testContainerConfig?: ITestContainerConfig) => fluidEntryPoint;
741
- /**
742
- * {@inheritDoc ITestObjectProvider."type"}
743
- */
744
- readonly type = "TestObjectProvider";
745
- private _loaderContainerTracker;
746
- private _documentServiceFactory;
747
- private _urlResolver;
748
- private _logger;
749
- private _tracker;
750
- private readonly _documentIdStrategy;
751
- private _documentCreated;
752
- /**
753
- * Manage objects for loading and creating container, including the driver, loader, and OpProcessingController
754
- * @param createFluidEntryPoint - callback to create a fluidEntryPoint, with an optional set of channel name
755
- * and factory for TestFluidObject
756
- */
757
- constructor(LoaderConstructor: typeof Loader,
758
- /**
759
- * {@inheritDoc ITestObjectProvider.driver}
760
- */
761
- driver: ITestDriver,
762
- /**
763
- * {@inheritDoc ITestObjectProvider.createFluidEntryPoint}
764
- */
765
- createFluidEntryPoint: (testContainerConfig?: ITestContainerConfig) => fluidEntryPoint);
766
- /**
767
- * {@inheritDoc ITestObjectProvider.logger}
768
- */
769
- get logger(): ITelemetryBaseLogger;
770
- get tracker(): EventAndErrorTrackingLogger;
771
- /**
772
- * {@inheritDoc ITestObjectProvider.documentServiceFactory}
773
- */
774
- get documentServiceFactory(): IDocumentServiceFactory;
775
- /**
776
- * {@inheritDoc ITestObjectProvider.urlResolver}
777
- */
778
- get urlResolver(): IUrlResolver;
779
- /**
780
- * {@inheritDoc ITestObjectProvider.documentId}
781
- */
782
- get documentId(): string;
783
- /**
784
- * {@inheritDoc ITestObjectProvider.defaultCodeDetails}
785
- */
786
- get defaultCodeDetails(): IFluidCodeDetails;
787
- /**
788
- * {@inheritDoc ITestObjectProvider.opProcessingController}
789
- */
790
- get opProcessingController(): IOpProcessingController;
791
- /**
792
- * {@inheritDoc ITestObjectProvider.createLoader}
793
- */
794
- createLoader(packageEntries: Iterable<[IFluidCodeDetails, fluidEntryPoint]>, loaderProps?: Partial<ILoaderProps>): Loader;
795
- /**
796
- * {@inheritDoc ITestObjectProvider.createContainer}
797
- */
798
- createContainer(entryPoint: fluidEntryPoint, loaderProps?: Partial<ILoaderProps>): Promise<IContainer>;
799
- /**
800
- * {@inheritdoc ITestObjectProvider.createDetachedContainer}
801
- */
802
- createDetachedContainer(entryPoint: fluidEntryPoint, loaderProps?: Partial<ILoaderProps> | undefined): Promise<IContainer>;
803
- /**
804
- * {@inheritdoc ITestObjectProvider.attachDetachedContainer}
805
- */
806
- attachDetachedContainer(container: IContainer): Promise<void>;
807
- /**
808
- * {@inheritDoc ITestObjectProvider.loadContainer}
809
- */
810
- loadContainer(entryPoint: fluidEntryPoint, loaderProps?: Partial<ILoaderProps>, requestHeader?: IRequestHeader): Promise<IContainer>;
811
- private resolveContainer;
812
- /**
813
- * {@inheritDoc ITestObjectProvider.makeTestLoader}
814
- */
815
- makeTestLoader(testContainerConfig?: ITestContainerConfig): Loader;
816
- /**
817
- * {@inheritDoc ITestObjectProvider.makeTestContainer}
818
- */
819
- makeTestContainer(testContainerConfig?: ITestContainerConfig): Promise<IContainer>;
820
- /**
821
- * {@inheritDoc ITestObjectProvider.loadTestContainer}
822
- */
823
- loadTestContainer(testContainerConfig?: ITestContainerConfig, requestHeader?: IRequestHeader, pendingLocalState?: string): Promise<IContainer>;
824
- /**
825
- * {@inheritDoc ITestObjectProvider.reset}
826
- */
827
- reset(): void;
828
- /**
829
- * {@inheritDoc ITestObjectProvider.ensureSynchronized}
830
- */
831
- ensureSynchronized(): Promise<void>;
832
- private waitContainerToCatchUp;
833
- /**
834
- * {@inheritDoc ITestObjectProvider.updateDocumentId}
835
- */
836
- updateDocumentId(resolvedUrl: IResolvedUrl | undefined): void;
837
- /**
838
- * {@inheritDoc ITestObjectProvider.resetLoaderContainerTracker}
839
- */
840
- resetLoaderContainerTracker(syncSummarizerClients?: boolean): void;
841
- }
842
-
843
- /**
844
- * Implements {@link ITestObjectProvider}, but uses different versions to create and load containers.
845
- *
846
- * @internal
847
- */
848
- export declare class TestObjectProviderWithVersionedLoad implements ITestObjectProvider {
849
- private readonly LoaderConstructorForCreating;
850
- private readonly LoaderConstructorForLoading;
851
- private readonly driverForCreating;
852
- private readonly driverForLoading;
853
- private readonly createFluidEntryPointForCreating;
854
- private readonly createFluidEntryPointForLoading;
855
- private readonly telemetryProps?;
856
- /**
857
- * {@inheritDoc ITestObjectProvider."type"}
858
- */
859
- readonly type = "TestObjectProviderWithVersionedLoad";
860
- private _loaderContainerTracker;
861
- private _logger;
862
- private _tracker;
863
- private readonly _documentIdStrategy;
864
- private _documentServiceFactory;
865
- private _urlResolver;
866
- private _documentCreated;
867
- /**
868
- * Used to determine which APIs to use when creating a loader.
869
- *
870
- * The first load will always use the create APIs, and then useCreateApi will be set to false to ensure all
871
- * subsequent loads use the load APIs.
872
- */
873
- private useCreateApi;
874
- constructor(LoaderConstructorForCreating: typeof Loader, LoaderConstructorForLoading: typeof Loader, driverForCreating: ITestDriver, driverForLoading: ITestDriver, createFluidEntryPointForCreating: (testContainerConfig?: ITestContainerConfig) => fluidEntryPoint, createFluidEntryPointForLoading: (testContainerConfig?: ITestContainerConfig) => fluidEntryPoint, telemetryProps?: ITelemetryLoggerPropertyBags | undefined);
875
- /**
876
- * {@inheritDoc ITestObjectProvider.logger}
877
- */
878
- get logger(): ITelemetryBaseLogger;
879
- get tracker(): EventAndErrorTrackingLogger;
880
- /**
881
- * {@inheritDoc ITestObjectProvider.documentServiceFactory}
882
- */
883
- get documentServiceFactory(): IDocumentServiceFactory;
884
- /**
885
- * {@inheritDoc ITestObjectProvider.urlResolver}
886
- */
887
- get urlResolver(): IUrlResolver;
888
- /**
889
- * {@inheritDoc ITestObjectProvider.documentId}
890
- */
891
- get documentId(): string;
892
- /**
893
- * {@inheritDoc ITestObjectProvider.defaultCodeDetails}
894
- */
895
- get defaultCodeDetails(): IFluidCodeDetails;
896
- /**
897
- * {@inheritDoc ITestObjectProvider.opProcessingController}
898
- */
899
- get opProcessingController(): IOpProcessingController;
900
- /**
901
- * {@inheritDoc ITestObjectProvider.driver}
902
- */
903
- get driver(): ITestDriver;
904
- /**
905
- * {@inheritDoc ITestObjectProvider.createFluidEntryPoint}
906
- */
907
- get createFluidEntryPoint(): (testContainerConfig?: ITestContainerConfig) => fluidEntryPoint;
908
- private createLoaderForCreating;
909
- private createLoaderForLoading;
910
- /**
911
- * {@inheritDoc ITestObjectProvider.createLoader}
912
- */
913
- createLoader(packageEntries: Iterable<[IFluidCodeDetails, fluidEntryPoint]>, loaderProps?: Partial<ILoaderProps>, forceUseCreateVersion?: boolean): Loader;
914
- /**
915
- * {@inheritDoc ITestObjectProvider.createContainer}
916
- */
917
- createContainer(entryPoint: fluidEntryPoint, loaderProps?: Partial<ILoaderProps>): Promise<IContainer>;
918
- /**
919
- * {@inheritdoc ITestObjectProvider.createDetachedContainer}
920
- */
921
- createDetachedContainer(entryPoint: fluidEntryPoint, loaderProps?: Partial<ILoaderProps> | undefined): Promise<IContainer>;
922
- /**
923
- * {@inheritdoc ITestObjectProvider.attachDetachedContainer}
924
- */
925
- attachDetachedContainer(container: IContainer): Promise<void>;
926
- /**
927
- * {@inheritDoc ITestObjectProvider.loadContainer}
928
- */
929
- loadContainer(entryPoint: fluidEntryPoint, loaderProps?: Partial<ILoaderProps>, requestHeader?: IRequestHeader): Promise<IContainer>;
930
- private resolveContainer;
931
- /**
932
- * {@inheritDoc ITestObjectProvider.makeTestLoader}
933
- */
934
- makeTestLoader(testContainerConfig?: ITestContainerConfig): Loader;
935
- /**
936
- * {@inheritDoc ITestObjectProvider.makeTestContainer}
937
- */
938
- makeTestContainer(testContainerConfig?: ITestContainerConfig): Promise<IContainer>;
939
- /**
940
- * {@inheritDoc ITestObjectProvider.loadTestContainer}
941
- */
942
- loadTestContainer(testContainerConfig?: ITestContainerConfig, requestHeader?: IRequestHeader, pendingLocalState?: string): Promise<IContainer>;
943
- /**
944
- * {@inheritDoc ITestObjectProvider.reset}
945
- */
946
- reset(): void;
947
- /**
948
- * {@inheritDoc ITestObjectProvider.ensureSynchronized}
949
- */
950
- ensureSynchronized(): Promise<void>;
951
- private waitContainerToCatchUp;
952
- /**
953
- * {@inheritDoc ITestObjectProvider.updateDocumentId}
954
- */
955
- updateDocumentId(resolvedUrl: IResolvedUrl | undefined): void;
956
- /**
957
- * {@inheritDoc ITestObjectProvider.resetLoaderContainerTracker}
958
- */
959
- resetLoaderContainerTracker(syncSummarizerClients?: boolean): void;
960
- }
961
-
962
- /**
963
- * Wraps the given promise around with promise that will complete after a specific timeout if the original promise does
964
- * not resolve by then. By default, it uses the mocha test timeout and complete the promise just before that so that
965
- * tests don't time out because of unpredictable awaits.
966
- * The timeout can be overridden via timeoutOptions but it's recommended to use the default value.
967
- * @param promise - The promise to be awaited.
968
- * @param timeoutOptions - Options that can be used to override the timeout and / or define the behavior
969
- * when the promise is not fulfilled. For example, instead of rejecting the promise, resolve with a
970
- * specific value.
971
- * @returns A new promise that will complete when the given promise resolves or the timeout expires.
972
- * @internal
973
- */
974
- export declare function timeoutAwait<T = void>(promise: PromiseLike<T>, timeoutOptions?: TimeoutWithError | TimeoutWithValue<T>): Promise<T>;
975
-
976
- /**
977
- * Creates a promise from the given executor that will complete after a specific timeout. By default, it uses the mocha
978
- * test timeout and complete the promise just before that so that tests don't time out because of unpredictable awaits.
979
- * The timeout can be overridden via timeoutOptions but it's recommended to use the default value.
980
- * @param executor - The executor for the promise.
981
- * @param timeoutOptions - Options that can be used to override the timeout and / or define the behavior when
982
- * the promise is not fulfilled. For example, instead of rejecting the promise, resolve with a specific value.
983
- * @returns A new promise that will complete when the given executor resolves or the timeout expires.
984
- * @internal
985
- */
986
- export declare function timeoutPromise<T = void>(executor: (resolve: (value: T | PromiseLike<T>) => void, reject: (reason?: any) => void) => void, timeoutOptions?: TimeoutWithError | TimeoutWithValue<T>): Promise<T>;
987
-
988
- /**
989
- * @internal
990
- */
991
- export declare interface TimeoutWithError {
992
- /**
993
- * Timeout duration in milliseconds, if it is great than 0 and not Infinity
994
- * If it is undefined, then it will use test timeout if we are in side the test function
995
- * Otherwise, there is no timeout
996
- */
997
- durationMs?: number;
998
- reject?: true;
999
- errorMsg?: string;
1000
- }
1001
-
1002
- /**
1003
- * @internal
1004
- */
1005
- export declare interface TimeoutWithValue<T = void> {
1006
- /**
1007
- * Timeout duration in milliseconds, if it is great than 0 and not Infinity
1008
- * If it is undefined, then it will use test timeout if we are in side the test function
1009
- * Otherwise, there is no timeout
1010
- */
1011
- durationMs?: number;
1012
- reject: false;
1013
- value: T;
1014
- }
1015
-
1016
- /**
1017
- * Utility function to wait for the specified Container to be in Connected state.
1018
- * If the Container is already connected, the Promise returns immediately; otherwise it resolves when the Container emits
1019
- * its 'connected' event.
1020
- * If failOnContainerClose === true, the returned Promise will be rejected if the container emits a 'closed' event
1021
- * before a 'connected' event.
1022
- * @param container - The container to wait for.
1023
- * @param failOnContainerClose - If true, the returned Promise will be rejected if the container emits a 'closed' event
1024
- * before a 'connected' event.
1025
- * Defaults to true.
1026
- * @param timeoutOptions - Options related to the behavior of the timeout.
1027
- * If provided, the returned Promise will reject if the container hasn't emitted relevant events in timeoutOptions.durationMs.
1028
- * If not provided, the Promise will wait indefinitely for the Container to emit its 'connected' (or 'closed', if
1029
- * failOnContainerClose === true) event.
1030
- *
1031
- * @returns A Promise that either:
1032
- * - Resolves when the specified container emits a 'connected' event (or immediately if the Container is already connected).
1033
- * - Rejects if failOnContainerClose === true and the container emits a 'closed' event before a 'connected' event.
1034
- * - Rejects after timeoutOptions.durationMs if timeoutOptions !== undefined and the container does not emit relevant
1035
- * events, within that timeframe.
1036
- * @internal
1037
- */
1038
- export declare function waitForContainerConnection(container: IContainer, failOnContainerClose?: boolean, timeoutOptions?: TimeoutWithError): Promise<void>;
1039
-
1040
- /**
1041
- * @deprecated - unused
1042
- * Wraps the given IDocumentService to override the `connectToStorage` method. The intent is to plumb the
1043
- * `uploadSummaryCb` to the IDocumentStorageService so that it is called whenever a summary is uploaded by
1044
- * the client.
1045
- * The document storage service that is created in `connectToStorage` is wrapped by calling `wrapDocumentStorageService`
1046
- * to pass in the `uploadSummaryCb`.
1047
- * @internal
1048
- */
1049
- export declare function wrapDocumentService(innerDocService: IDocumentService, uploadSummaryCb: (summaryTree: ISummaryTree, context: ISummaryContext) => ISummaryContext): IDocumentService;
1050
-
1051
- /**
1052
- * @deprecated - unused
1053
- * Wraps the given IDocumentServiceFactory to override the `createDocumentService` method. The intent is to plumb
1054
- * the `uploadSummaryCb` all the way to the IDocumentStorageService so that it is called whenever a summary is
1055
- * uploaded by the client.
1056
- * The document service that is created in `createDocumentService` is wrapped by calling `wrapDocumentService` to
1057
- * pass in the `uploadSummaryCb`.
1058
- * @internal
1059
- */
1060
- export declare function wrapDocumentServiceFactory(innerDocServiceFactory: IDocumentServiceFactory, uploadSummaryCb: (summaryTree: ISummaryTree, context: ISummaryContext) => ISummaryContext): IDocumentServiceFactory;
1061
-
1062
- /**
1063
- * @deprecated - unused
1064
- * Wraps the given IDocumentStorageService to override the `uploadSummaryWithContext` method. It calls the
1065
- * `uploadSummaryCb` whenever a summary is uploaded by the client. The summary context can be updated in the
1066
- * callback before it is uploaded to the server.
1067
- * @internal
1068
- */
1069
- export declare function wrapDocumentStorageService(innerDocStorageService: IDocumentStorageService, uploadSummaryCb: (summaryTree: ISummaryTree, context: ISummaryContext) => ISummaryContext): IDocumentStorageService;
1070
-
1071
- export { }