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