@fluidframework/aqueduct 2.0.0-dev.7.4.0.215747 → 2.0.0-dev.7.4.0.216897
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/aqueduct-alpha.d.ts +78 -425
- package/dist/aqueduct-beta.d.ts +78 -425
- package/dist/aqueduct-public.d.ts +78 -425
- package/dist/aqueduct-untrimmed.d.ts +16 -15
- package/dist/container-runtime-factories/baseContainerRuntimeFactory.cjs +1 -1
- package/dist/container-runtime-factories/baseContainerRuntimeFactory.cjs.map +1 -1
- package/dist/container-runtime-factories/baseContainerRuntimeFactory.d.ts +1 -1
- package/dist/container-runtime-factories/containerRuntimeFactoryWithDefaultDataStore.cjs +1 -1
- package/dist/container-runtime-factories/containerRuntimeFactoryWithDefaultDataStore.cjs.map +1 -1
- package/dist/container-runtime-factories/containerRuntimeFactoryWithDefaultDataStore.d.ts +1 -1
- package/dist/data-object-factories/dataObjectFactory.cjs +1 -1
- package/dist/data-object-factories/dataObjectFactory.cjs.map +1 -1
- package/dist/data-object-factories/dataObjectFactory.d.ts +1 -1
- package/dist/data-object-factories/pureDataObjectFactory.cjs +1 -1
- package/dist/data-object-factories/pureDataObjectFactory.cjs.map +1 -1
- package/dist/data-object-factories/pureDataObjectFactory.d.ts +3 -2
- package/dist/data-object-factories/pureDataObjectFactory.d.ts.map +1 -1
- package/dist/data-objects/dataObject.cjs +1 -1
- package/dist/data-objects/dataObject.cjs.map +1 -1
- package/dist/data-objects/dataObject.d.ts +1 -1
- package/dist/data-objects/pureDataObject.cjs +1 -1
- package/dist/data-objects/pureDataObject.cjs.map +1 -1
- package/dist/data-objects/pureDataObject.d.ts +1 -1
- package/dist/data-objects/types.cjs.map +1 -1
- package/dist/data-objects/types.d.ts +2 -2
- package/dist/request-handlers/requestHandlers.cjs +3 -3
- package/dist/request-handlers/requestHandlers.cjs.map +1 -1
- package/dist/request-handlers/requestHandlers.d.ts +3 -3
- package/dist/utils/containerInteractions.cjs +3 -3
- package/dist/utils/containerInteractions.cjs.map +1 -1
- package/dist/utils/containerInteractions.d.ts +3 -3
- package/lib/aqueduct-alpha.d.ts +78 -425
- package/lib/aqueduct-beta.d.ts +78 -425
- package/lib/aqueduct-public.d.ts +78 -425
- package/lib/aqueduct-untrimmed.d.ts +16 -15
- package/lib/container-runtime-factories/baseContainerRuntimeFactory.mjs +1 -1
- package/lib/container-runtime-factories/baseContainerRuntimeFactory.mjs.map +1 -1
- package/lib/container-runtime-factories/containerRuntimeFactoryWithDefaultDataStore.mjs +1 -1
- package/lib/container-runtime-factories/containerRuntimeFactoryWithDefaultDataStore.mjs.map +1 -1
- package/lib/data-object-factories/dataObjectFactory.mjs +1 -1
- package/lib/data-object-factories/dataObjectFactory.mjs.map +1 -1
- package/lib/data-object-factories/pureDataObjectFactory.mjs +1 -1
- package/lib/data-object-factories/pureDataObjectFactory.mjs.map +1 -1
- package/lib/data-objects/dataObject.mjs +1 -1
- package/lib/data-objects/dataObject.mjs.map +1 -1
- package/lib/data-objects/pureDataObject.mjs +1 -1
- package/lib/data-objects/pureDataObject.mjs.map +1 -1
- package/lib/data-objects/types.mjs.map +1 -1
- package/lib/request-handlers/requestHandlers.mjs +3 -3
- package/lib/request-handlers/requestHandlers.mjs.map +1 -1
- package/lib/utils/containerInteractions.mjs +3 -3
- package/lib/utils/containerInteractions.mjs.map +1 -1
- package/package.json +18 -17
package/lib/aqueduct-public.d.ts
CHANGED
|
@@ -13,446 +13,99 @@
|
|
|
13
13
|
* @packageDocumentation
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
import { ContainerRuntime } from '@fluidframework/container-runtime';
|
|
18
|
-
import { FluidDataStoreRuntime } from '@fluidframework/datastore';
|
|
19
|
-
import { FluidObject } from '@fluidframework/core-interfaces';
|
|
20
|
-
import { FluidObjectSymbolProvider } from '@fluidframework/synthesize';
|
|
21
|
-
import { IChannelFactory } from '@fluidframework/datastore-definitions';
|
|
22
|
-
import { IContainer } from '@fluidframework/container-definitions';
|
|
23
|
-
import { IContainerContext } from '@fluidframework/container-definitions';
|
|
24
|
-
import { IContainerRuntime } from '@fluidframework/container-runtime-definitions';
|
|
25
|
-
import { IContainerRuntimeBase } from '@fluidframework/runtime-definitions';
|
|
26
|
-
import { IContainerRuntimeOptions } from '@fluidframework/container-runtime';
|
|
27
|
-
import { IEvent } from '@fluidframework/core-interfaces';
|
|
28
|
-
import { IFluidDataStoreContext } from '@fluidframework/runtime-definitions';
|
|
29
|
-
import { IFluidDataStoreContextDetached } from '@fluidframework/runtime-definitions';
|
|
30
|
-
import { IFluidDataStoreFactory } from '@fluidframework/runtime-definitions';
|
|
31
|
-
import { IFluidDataStoreRegistry } from '@fluidframework/runtime-definitions';
|
|
32
|
-
import { IFluidDataStoreRuntime } from '@fluidframework/datastore-definitions';
|
|
33
|
-
import { IFluidDependencySynthesizer } from '@fluidframework/synthesize';
|
|
34
|
-
import { IFluidHandle } from '@fluidframework/core-interfaces';
|
|
35
|
-
import { IFluidLoadable } from '@fluidframework/core-interfaces';
|
|
36
|
-
import type { IFluidMountableViewClass } from '@fluidframework/view-interfaces';
|
|
37
|
-
import { IFluidRouter } from '@fluidframework/core-interfaces';
|
|
38
|
-
import { IProvideFluidDataStoreRegistry } from '@fluidframework/runtime-definitions';
|
|
39
|
-
import { IProvideFluidHandle } from '@fluidframework/core-interfaces';
|
|
40
|
-
import { IRequest } from '@fluidframework/core-interfaces';
|
|
41
|
-
import { IResponse } from '@fluidframework/core-interfaces';
|
|
42
|
-
import { ISharedDirectory } from '@fluidframework/map';
|
|
43
|
-
import { NamedFluidDataStoreRegistryEntries } from '@fluidframework/runtime-definitions';
|
|
44
|
-
import { NamedFluidDataStoreRegistryEntry } from '@fluidframework/runtime-definitions';
|
|
45
|
-
import { RequestParser } from '@fluidframework/runtime-utils';
|
|
46
|
-
import { RuntimeFactoryHelper } from '@fluidframework/runtime-utils';
|
|
47
|
-
import { RuntimeRequestHandler } from '@fluidframework/request-handler';
|
|
16
|
+
/* Excluded from this release type: AsyncFluidObjectProvider */
|
|
48
17
|
|
|
49
|
-
|
|
50
|
-
* BaseContainerRuntimeFactory produces container runtimes with the specified data store and service registries,
|
|
51
|
-
* request handlers, runtimeOptions, and entryPoint initialization function.
|
|
52
|
-
* It can be subclassed to implement a first-time initialization procedure for the containers it creates.
|
|
53
|
-
* @public
|
|
54
|
-
*/
|
|
55
|
-
export declare class BaseContainerRuntimeFactory extends RuntimeFactoryHelper implements IProvideFluidDataStoreRegistry {
|
|
56
|
-
get IFluidDataStoreRegistry(): IFluidDataStoreRegistry;
|
|
57
|
-
private readonly registry;
|
|
58
|
-
private readonly registryEntries;
|
|
59
|
-
private readonly dependencyContainer?;
|
|
60
|
-
private readonly runtimeOptions?;
|
|
61
|
-
private readonly requestHandlers;
|
|
62
|
-
private readonly provideEntryPoint;
|
|
63
|
-
/**
|
|
64
|
-
* @param registryEntries - The data store registry for containers produced
|
|
65
|
-
* @param dependencyContainer - deprecated, will be removed in a future release
|
|
66
|
-
* @param requestHandlers - Request handlers for containers produced
|
|
67
|
-
* @param runtimeOptions - The runtime options passed to the ContainerRuntime when instantiating it
|
|
68
|
-
* @param provideEntryPoint - Function that will initialize the entryPoint of the ContainerRuntime instances
|
|
69
|
-
* created with this factory
|
|
70
|
-
*/
|
|
71
|
-
constructor(props: {
|
|
72
|
-
registryEntries: NamedFluidDataStoreRegistryEntries;
|
|
73
|
-
dependencyContainer?: IFluidDependencySynthesizer;
|
|
74
|
-
/** @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md */
|
|
75
|
-
requestHandlers?: RuntimeRequestHandler[];
|
|
76
|
-
runtimeOptions?: IContainerRuntimeOptions;
|
|
77
|
-
provideEntryPoint: (runtime: IContainerRuntime) => Promise<FluidObject>;
|
|
78
|
-
});
|
|
79
|
-
instantiateFirstTime(runtime: ContainerRuntime): Promise<void>;
|
|
80
|
-
instantiateFromExisting(runtime: ContainerRuntime): Promise<void>;
|
|
81
|
-
preInitialize(context: IContainerContext, existing: boolean): Promise<ContainerRuntime>;
|
|
82
|
-
/**
|
|
83
|
-
* Subclasses may override containerInitializingFirstTime to perform any setup steps at the time the container
|
|
84
|
-
* is created. This likely includes creating any initial data stores that are expected to be there at the outset.
|
|
85
|
-
* @param runtime - The container runtime for the container being initialized
|
|
86
|
-
*/
|
|
87
|
-
protected containerInitializingFirstTime(runtime: IContainerRuntime): Promise<void>;
|
|
88
|
-
/**
|
|
89
|
-
* Subclasses may override containerHasInitialized to perform any steps after the container has initialized.
|
|
90
|
-
* This likely includes loading any data stores that are expected to be there at the outset.
|
|
91
|
-
* @param runtime - The container runtime for the container being initialized
|
|
92
|
-
*/
|
|
93
|
-
protected containerHasInitialized(runtime: IContainerRuntime): Promise<void>;
|
|
94
|
-
}
|
|
18
|
+
/* Excluded from this release type: BaseContainerRuntimeFactory */
|
|
95
19
|
|
|
96
|
-
|
|
97
|
-
* A ContainerRuntimeFactory that initializes Containers with a single default data store, which can be requested from
|
|
98
|
-
* the container with an empty URL.
|
|
99
|
-
*
|
|
100
|
-
* This factory should be exposed as fluidExport off the entry point to your module.
|
|
101
|
-
* @public
|
|
102
|
-
*/
|
|
103
|
-
export declare class ContainerRuntimeFactoryWithDefaultDataStore extends BaseContainerRuntimeFactory {
|
|
104
|
-
static readonly defaultDataStoreId = "default";
|
|
105
|
-
protected readonly defaultFactory: IFluidDataStoreFactory;
|
|
106
|
-
/**
|
|
107
|
-
* Constructor
|
|
108
|
-
* @param defaultFactory -
|
|
109
|
-
* @param registryEntries -
|
|
110
|
-
* @param dependencyContainer - deprecated, will be removed in a future release
|
|
111
|
-
* @param requestHandlers -
|
|
112
|
-
* @param runtimeOptions -
|
|
113
|
-
* @param provideEntryPoint -
|
|
114
|
-
*/
|
|
115
|
-
constructor(props: {
|
|
116
|
-
defaultFactory: IFluidDataStoreFactory;
|
|
117
|
-
registryEntries: NamedFluidDataStoreRegistryEntries;
|
|
118
|
-
dependencyContainer?: IFluidDependencySynthesizer;
|
|
119
|
-
/** @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md */
|
|
120
|
-
requestHandlers?: RuntimeRequestHandler[];
|
|
121
|
-
runtimeOptions?: IContainerRuntimeOptions;
|
|
122
|
-
provideEntryPoint?: (runtime: IContainerRuntime) => Promise<FluidObject>;
|
|
123
|
-
});
|
|
124
|
-
/**
|
|
125
|
-
* {@inheritDoc BaseContainerRuntimeFactory.containerInitializingFirstTime}
|
|
126
|
-
*/
|
|
127
|
-
protected containerInitializingFirstTime(runtime: IContainerRuntime): Promise<void>;
|
|
128
|
-
}
|
|
20
|
+
/* Excluded from this release type: ContainerRuntime */
|
|
129
21
|
|
|
130
|
-
|
|
131
|
-
* DataObject is a base data store that is primed with a root directory. It
|
|
132
|
-
* ensures that it is created and ready before you can access it.
|
|
133
|
-
*
|
|
134
|
-
* Having a single root directory allows for easier development. Instead of creating
|
|
135
|
-
* and registering channels with the runtime any new DDS that is set on the root
|
|
136
|
-
* will automatically be registered.
|
|
137
|
-
*
|
|
138
|
-
* @typeParam I - The optional input types used to strongly type the data object
|
|
139
|
-
* @public
|
|
140
|
-
*/
|
|
141
|
-
export declare abstract class DataObject<I extends DataObjectTypes = DataObjectTypes> extends PureDataObject<I> {
|
|
142
|
-
private internalRoot;
|
|
143
|
-
private readonly rootDirectoryId;
|
|
144
|
-
/**
|
|
145
|
-
* The root directory will either be ready or will return an error. If an error is thrown
|
|
146
|
-
* the root has not been correctly created/set.
|
|
147
|
-
*/
|
|
148
|
-
protected get root(): ISharedDirectory;
|
|
149
|
-
/**
|
|
150
|
-
* Initializes internal objects and calls initialization overrides.
|
|
151
|
-
* Caller is responsible for ensuring this is only invoked once.
|
|
152
|
-
*/
|
|
153
|
-
initializeInternal(existing: boolean): Promise<void>;
|
|
154
|
-
/**
|
|
155
|
-
* Generates an error string indicating an item is uninitialized.
|
|
156
|
-
* @param item - The name of the item that was uninitialized.
|
|
157
|
-
*/
|
|
158
|
-
protected getUninitializedErrorString(item: string): string;
|
|
159
|
-
}
|
|
22
|
+
/* Excluded from this release type: ContainerRuntimeFactoryWithDefaultDataStore */
|
|
160
23
|
|
|
161
|
-
|
|
162
|
-
* DataObjectFactory is the IFluidDataStoreFactory for use with DataObjects.
|
|
163
|
-
* It facilitates DataObject's features (such as its shared directory) by
|
|
164
|
-
* ensuring relevant shared objects etc are available to the factory.
|
|
165
|
-
*
|
|
166
|
-
* @typeParam TObj - DataObject (concrete type)
|
|
167
|
-
* @typeParam I - The input types for the DataObject
|
|
168
|
-
* @public
|
|
169
|
-
*/
|
|
170
|
-
export declare class DataObjectFactory<TObj extends DataObject<I>, I extends DataObjectTypes = DataObjectTypes> extends PureDataObjectFactory<TObj, I> {
|
|
171
|
-
constructor(type: string, ctor: new (props: IDataObjectProps<I>) => TObj, sharedObjects: readonly IChannelFactory[] | undefined, optionalProviders: FluidObjectSymbolProvider<I["OptionalProviders"]>, registryEntries?: NamedFluidDataStoreRegistryEntries, runtimeFactory?: typeof FluidDataStoreRuntime);
|
|
172
|
-
}
|
|
24
|
+
/* Excluded from this release type: DataObject */
|
|
173
25
|
|
|
174
|
-
|
|
175
|
-
* This type is used as the base generic input to DataObject and PureDataObject.
|
|
176
|
-
* @public
|
|
177
|
-
*/
|
|
178
|
-
export declare interface DataObjectTypes {
|
|
179
|
-
/**
|
|
180
|
-
* represents a type that will define optional providers that will be injected
|
|
181
|
-
*/
|
|
182
|
-
OptionalProviders?: FluidObject;
|
|
183
|
-
/**
|
|
184
|
-
* the initial state type that the produced data object may take during creation
|
|
185
|
-
*/
|
|
186
|
-
InitialState?: any;
|
|
187
|
-
/**
|
|
188
|
-
* represents events that will be available in the EventForwarder
|
|
189
|
-
*/
|
|
190
|
-
Events?: IEvent;
|
|
191
|
-
}
|
|
26
|
+
/* Excluded from this release type: DataObjectFactory */
|
|
192
27
|
|
|
193
|
-
|
|
194
|
-
* Default request handler for a Fluid object that returns the object itself if:
|
|
195
|
-
*
|
|
196
|
-
* 1. the request url is empty
|
|
197
|
-
*
|
|
198
|
-
* 2. the request url is "/"
|
|
199
|
-
*
|
|
200
|
-
* 3. the request url starts with "/" and is followed by a query param, such as /?key=value
|
|
201
|
-
*
|
|
202
|
-
* Returns a 404 error for any other url.
|
|
203
|
-
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
|
|
204
|
-
* @public
|
|
205
|
-
*/
|
|
206
|
-
export declare function defaultFluidObjectRequestHandler(fluidObject: FluidObject, request: IRequest): IResponse;
|
|
28
|
+
/* Excluded from this release type: DataObjectTypes */
|
|
207
29
|
|
|
208
|
-
|
|
209
|
-
* Pipe through container request into internal request.
|
|
210
|
-
* If request is empty and default url is provided, redirect request to such default url.
|
|
211
|
-
* @param defaultRootId - optional default root data store ID to pass request in case request is empty.
|
|
212
|
-
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
|
|
213
|
-
* @public
|
|
214
|
-
*/
|
|
215
|
-
export declare const defaultRouteRequestHandler: (defaultRootId: string) => (request: IRequest, runtime: IContainerRuntime) => Promise<IResponse | undefined>;
|
|
30
|
+
/* Excluded from this release type: defaultFluidObjectRequestHandler */
|
|
216
31
|
|
|
217
|
-
|
|
218
|
-
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
|
|
219
|
-
* Helper function for getting the default Fluid Object from a Container. This function only works for
|
|
220
|
-
* Containers that support "/" request.
|
|
221
|
-
*
|
|
222
|
-
* @typeParam T - Defines the type you expect to be returned.
|
|
223
|
-
*
|
|
224
|
-
* @param container - Container you're attempting to get the object from
|
|
225
|
-
* @public
|
|
226
|
-
*/
|
|
227
|
-
export declare function getDefaultObjectFromContainer<T = FluidObject>(container: IContainer): Promise<T>;
|
|
32
|
+
/* Excluded from this release type: defaultRouteRequestHandler */
|
|
228
33
|
|
|
229
|
-
|
|
230
|
-
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
|
|
231
|
-
* Helper function for getting a Fluid Object from a Container given a path/url. This function only works for
|
|
232
|
-
* Containers that support getting FluidObjects via request.
|
|
233
|
-
*
|
|
234
|
-
* @typeParam T - Defines the type you expect to be returned.
|
|
235
|
-
*
|
|
236
|
-
* @param path - Unique path/url of the FluidObject
|
|
237
|
-
* @param container - Container you're attempting to get the object from
|
|
238
|
-
* @public
|
|
239
|
-
*/
|
|
240
|
-
export declare function getObjectFromContainer<T = FluidObject>(path: string, container: IContainer): Promise<T>;
|
|
34
|
+
/* Excluded from this release type: FluidDataStoreRuntime */
|
|
241
35
|
|
|
242
|
-
|
|
243
|
-
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
|
|
244
|
-
* Helper function for getting as Fluid Object from a Container given a Unique Id. This function only works for
|
|
245
|
-
* Containers that support getting FluidObjects via request.
|
|
246
|
-
*
|
|
247
|
-
* @typeParam T - Defines the type you expect to be returned.
|
|
248
|
-
*
|
|
249
|
-
* @param id - Unique id of the FluidObject
|
|
250
|
-
* @param container - Container you're attempting to get the object from
|
|
251
|
-
* @public
|
|
252
|
-
*/
|
|
253
|
-
export declare function getObjectWithIdFromContainer<T = FluidObject>(id: string, container: IContainer): Promise<T>;
|
|
36
|
+
/* Excluded from this release type: FluidObject */
|
|
254
37
|
|
|
255
|
-
|
|
256
|
-
* @public
|
|
257
|
-
*/
|
|
258
|
-
export declare interface IDataObjectProps<I extends DataObjectTypes = DataObjectTypes> {
|
|
259
|
-
readonly runtime: IFluidDataStoreRuntime;
|
|
260
|
-
readonly context: IFluidDataStoreContext;
|
|
261
|
-
readonly providers: AsyncFluidObjectProvider<I["OptionalProviders"]>;
|
|
262
|
-
readonly initProps?: I["InitialState"];
|
|
263
|
-
}
|
|
38
|
+
/* Excluded from this release type: FluidObjectSymbolProvider */
|
|
264
39
|
|
|
265
|
-
|
|
266
|
-
* Useful interface in places where it's useful to do type erasure for PureDataObject generic
|
|
267
|
-
* @public
|
|
268
|
-
*/
|
|
269
|
-
export declare interface IRootDataObjectFactory extends IFluidDataStoreFactory {
|
|
270
|
-
createRootInstance(rootDataStoreId: string, runtime: IContainerRuntime): Promise<IFluidRouter>;
|
|
271
|
-
}
|
|
40
|
+
/* Excluded from this release type: getDefaultObjectFromContainer */
|
|
272
41
|
|
|
273
|
-
|
|
274
|
-
* A mountable view is only required if the view needs to be mounted across a bundle boundary. Mounting across
|
|
275
|
-
* bundle boundaries breaks some frameworks, so the mountable view is used to ensure the mounting is done within
|
|
276
|
-
* the same bundle as the view. For example, React hooks don't work if mounted across bundles since there will
|
|
277
|
-
* be two React instances, breaking the Rules of Hooks. When cross-bundle mounting isn't required, the mountable
|
|
278
|
-
* view isn't necessary.
|
|
279
|
-
*
|
|
280
|
-
* When a request is received with a mountableView: true header, this request handler will reissue the request
|
|
281
|
-
* without the header, and respond with a mountable view of the given class using the response.
|
|
282
|
-
* @param MountableViewClass - The type of mountable view to use when responding
|
|
283
|
-
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
|
|
284
|
-
* @public
|
|
285
|
-
*/
|
|
286
|
-
export declare const mountableViewRequestHandler: (MountableViewClass: IFluidMountableViewClass, handlers: RuntimeRequestHandler[]) => (request: RequestParser, runtime: IContainerRuntime) => Promise<IResponse>;
|
|
42
|
+
/* Excluded from this release type: getObjectFromContainer */
|
|
287
43
|
|
|
288
|
-
|
|
289
|
-
* This is a bare-bones base class that does basic setup and enables for factory on an initialize call.
|
|
290
|
-
* You probably don't want to inherit from this data store directly unless
|
|
291
|
-
* you are creating another base data store class
|
|
292
|
-
*
|
|
293
|
-
* @typeParam I - The optional input types used to strongly type the data object
|
|
294
|
-
* @public
|
|
295
|
-
*/
|
|
296
|
-
export declare abstract class PureDataObject<I extends DataObjectTypes = DataObjectTypes> extends TypedEventEmitter<I["Events"] & IEvent> implements IFluidLoadable, IFluidRouter, IProvideFluidHandle {
|
|
297
|
-
/**
|
|
298
|
-
* This is your FluidDataStoreRuntime object
|
|
299
|
-
*/
|
|
300
|
-
protected readonly runtime: IFluidDataStoreRuntime;
|
|
301
|
-
/**
|
|
302
|
-
* This context is used to talk up to the ContainerRuntime
|
|
303
|
-
*/
|
|
304
|
-
protected readonly context: IFluidDataStoreContext;
|
|
305
|
-
/**
|
|
306
|
-
* Providers are FluidObject keyed objects that provide back
|
|
307
|
-
* a promise to the corresponding FluidObject or undefined.
|
|
308
|
-
* Providers injected/provided by the Container and/or HostingApplication
|
|
309
|
-
*
|
|
310
|
-
* To define providers set FluidObject interfaces in the OptionalProviders generic type for your data store
|
|
311
|
-
*/
|
|
312
|
-
protected readonly providers: AsyncFluidObjectProvider<I["OptionalProviders"]>;
|
|
313
|
-
protected initProps?: I["InitialState"];
|
|
314
|
-
protected initializeP: Promise<void> | undefined;
|
|
315
|
-
get id(): string;
|
|
316
|
-
/**
|
|
317
|
-
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
|
|
318
|
-
*/
|
|
319
|
-
get IFluidRouter(): this;
|
|
320
|
-
get IFluidLoadable(): this;
|
|
321
|
-
get IFluidHandle(): IFluidHandle<this>;
|
|
322
|
-
/**
|
|
323
|
-
* Handle to a data store
|
|
324
|
-
*/
|
|
325
|
-
get handle(): IFluidHandle<this>;
|
|
326
|
-
static getDataObject(runtime: IFluidDataStoreRuntime): Promise<PureDataObject<DataObjectTypes>>;
|
|
327
|
-
constructor(props: IDataObjectProps<I>);
|
|
328
|
-
/**
|
|
329
|
-
* Return this object if someone requests it directly
|
|
330
|
-
* We will return this object in two scenarios:
|
|
331
|
-
*
|
|
332
|
-
* 1. the request url is a "/"
|
|
333
|
-
*
|
|
334
|
-
* 2. the request url is empty
|
|
335
|
-
*/
|
|
336
|
-
request(req: IRequest): Promise<IResponse>;
|
|
337
|
-
/**
|
|
338
|
-
* Call this API to ensure PureDataObject is fully initialized.
|
|
339
|
-
* Initialization happens on demand, only on as-needed bases.
|
|
340
|
-
* In most cases you should allow factory/object to decide when to finish initialization.
|
|
341
|
-
* But if you are supplying your own implementation of DataStoreRuntime factory and overriding some methods
|
|
342
|
-
* and need a fully initialized object, then you can call this API to ensure object is fully initialized.
|
|
343
|
-
*/
|
|
344
|
-
finishInitialization(existing: boolean): Promise<void>;
|
|
345
|
-
/**
|
|
346
|
-
* Internal initialize implementation. Overwriting this will change the flow of the PureDataObject and should
|
|
347
|
-
* generally not be done.
|
|
348
|
-
*
|
|
349
|
-
* Calls initializingFirstTime, initializingFromExisting, and hasInitialized. Caller is
|
|
350
|
-
* responsible for ensuring this is only invoked once.
|
|
351
|
-
*/
|
|
352
|
-
initializeInternal(existing: boolean): Promise<void>;
|
|
353
|
-
/**
|
|
354
|
-
* Called every time the data store is initialized, before initializingFirstTime or
|
|
355
|
-
* initializingFromExisting is called.
|
|
356
|
-
*/
|
|
357
|
-
protected preInitialize(): Promise<void>;
|
|
358
|
-
/**
|
|
359
|
-
* Called the first time the data store is initialized (new creations with a new
|
|
360
|
-
* data store runtime)
|
|
361
|
-
*
|
|
362
|
-
* @param props - Optional props to be passed in on create
|
|
363
|
-
*/
|
|
364
|
-
protected initializingFirstTime(props?: I["InitialState"]): Promise<void>;
|
|
365
|
-
/**
|
|
366
|
-
* Called every time but the first time the data store is initialized (creations
|
|
367
|
-
* with an existing data store runtime)
|
|
368
|
-
*/
|
|
369
|
-
protected initializingFromExisting(): Promise<void>;
|
|
370
|
-
/**
|
|
371
|
-
* Called every time the data store is initialized after create or existing.
|
|
372
|
-
*/
|
|
373
|
-
protected hasInitialized(): Promise<void>;
|
|
374
|
-
}
|
|
44
|
+
/* Excluded from this release type: getObjectWithIdFromContainer */
|
|
375
45
|
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
*/
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
* They get attached only when a handle to one of them is attached to already attached objects.
|
|
440
|
-
*/
|
|
441
|
-
createInstance(runtime: IContainerRuntimeBase, initialState?: I["InitialState"]): Promise<TObj>;
|
|
442
|
-
/**
|
|
443
|
-
* Creates a new root instance of the object. Uses container's registry to find this factory.
|
|
444
|
-
* It's expected that only container owners would use this functionality, as only such developers
|
|
445
|
-
* have knowledge of entries in container registry.
|
|
446
|
-
* The name in this registry for such record should match type of this factory.
|
|
447
|
-
* @param runtime - container runtime. It's registry is used to create an object.
|
|
448
|
-
* @param initialState - The initial state to provide to the created component.
|
|
449
|
-
* @returns an object created by this factory. Data store and objects created are not attached to container.
|
|
450
|
-
* They get attached only when a handle to one of them is attached to already attached objects.
|
|
451
|
-
*/
|
|
452
|
-
createRootInstance(rootDataStoreId: string, runtime: IContainerRuntime, initialState?: I["InitialState"]): Promise<TObj>;
|
|
453
|
-
protected createNonRootInstanceCore(containerRuntime: IContainerRuntimeBase, packagePath: Readonly<string[]>, initialState?: I["InitialState"]): Promise<TObj>;
|
|
454
|
-
protected createInstanceCore(context: IFluidDataStoreContextDetached, initialState?: I["InitialState"]): Promise<TObj>;
|
|
455
|
-
}
|
|
46
|
+
/* Excluded from this release type: IChannelFactory */
|
|
47
|
+
|
|
48
|
+
/* Excluded from this release type: IContainer */
|
|
49
|
+
|
|
50
|
+
/* Excluded from this release type: IContainerContext */
|
|
51
|
+
|
|
52
|
+
/* Excluded from this release type: IContainerRuntime */
|
|
53
|
+
|
|
54
|
+
/* Excluded from this release type: IContainerRuntimeBase */
|
|
55
|
+
|
|
56
|
+
/* Excluded from this release type: IContainerRuntimeOptions */
|
|
57
|
+
|
|
58
|
+
/* Excluded from this release type: IDataObjectProps */
|
|
59
|
+
|
|
60
|
+
/* Excluded from this release type: IEvent */
|
|
61
|
+
|
|
62
|
+
/* Excluded from this release type: IFluidDataStoreContext */
|
|
63
|
+
|
|
64
|
+
/* Excluded from this release type: IFluidDataStoreContextDetached */
|
|
65
|
+
|
|
66
|
+
/* Excluded from this release type: IFluidDataStoreFactory */
|
|
67
|
+
|
|
68
|
+
/* Excluded from this release type: IFluidDataStoreRegistry */
|
|
69
|
+
|
|
70
|
+
/* Excluded from this release type: IFluidDataStoreRuntime */
|
|
71
|
+
|
|
72
|
+
/* Excluded from this release type: IFluidDependencySynthesizer */
|
|
73
|
+
|
|
74
|
+
/* Excluded from this release type: IFluidHandle */
|
|
75
|
+
|
|
76
|
+
/* Excluded from this release type: IFluidLoadable */
|
|
77
|
+
|
|
78
|
+
/* Excluded from this release type: IFluidMountableViewClass */
|
|
79
|
+
|
|
80
|
+
/* Excluded from this release type: IFluidRouter */
|
|
81
|
+
|
|
82
|
+
/* Excluded from this release type: IProvideFluidDataStoreRegistry */
|
|
83
|
+
|
|
84
|
+
/* Excluded from this release type: IProvideFluidHandle */
|
|
85
|
+
|
|
86
|
+
/* Excluded from this release type: IRequest */
|
|
87
|
+
|
|
88
|
+
/* Excluded from this release type: IResponse */
|
|
89
|
+
|
|
90
|
+
/* Excluded from this release type: IRootDataObjectFactory */
|
|
91
|
+
|
|
92
|
+
/* Excluded from this release type: ISharedDirectory */
|
|
93
|
+
|
|
94
|
+
/* Excluded from this release type: mountableViewRequestHandler */
|
|
95
|
+
|
|
96
|
+
/* Excluded from this release type: NamedFluidDataStoreRegistryEntries */
|
|
97
|
+
|
|
98
|
+
/* Excluded from this release type: NamedFluidDataStoreRegistryEntry */
|
|
99
|
+
|
|
100
|
+
/* Excluded from this release type: PureDataObject */
|
|
101
|
+
|
|
102
|
+
/* Excluded from this release type: PureDataObjectFactory */
|
|
103
|
+
|
|
104
|
+
/* Excluded from this release type: RequestParser */
|
|
105
|
+
|
|
106
|
+
/* Excluded from this release type: RuntimeFactoryHelper */
|
|
107
|
+
|
|
108
|
+
/* Excluded from this release type: RuntimeRequestHandler */
|
|
456
109
|
|
|
457
110
|
/* Excluded from this release type: TypedEventEmitter */
|
|
458
111
|
|
|
@@ -51,7 +51,7 @@ import { TypedEventEmitter } from '@fluid-internal/client-utils';
|
|
|
51
51
|
* BaseContainerRuntimeFactory produces container runtimes with the specified data store and service registries,
|
|
52
52
|
* request handlers, runtimeOptions, and entryPoint initialization function.
|
|
53
53
|
* It can be subclassed to implement a first-time initialization procedure for the containers it creates.
|
|
54
|
-
* @
|
|
54
|
+
* @internal
|
|
55
55
|
*/
|
|
56
56
|
export declare class BaseContainerRuntimeFactory extends RuntimeFactoryHelper implements IProvideFluidDataStoreRegistry {
|
|
57
57
|
get IFluidDataStoreRegistry(): IFluidDataStoreRegistry;
|
|
@@ -99,7 +99,7 @@ export declare class BaseContainerRuntimeFactory extends RuntimeFactoryHelper im
|
|
|
99
99
|
* the container with an empty URL.
|
|
100
100
|
*
|
|
101
101
|
* This factory should be exposed as fluidExport off the entry point to your module.
|
|
102
|
-
* @
|
|
102
|
+
* @internal
|
|
103
103
|
*/
|
|
104
104
|
export declare class ContainerRuntimeFactoryWithDefaultDataStore extends BaseContainerRuntimeFactory {
|
|
105
105
|
static readonly defaultDataStoreId = "default";
|
|
@@ -137,7 +137,7 @@ export declare class ContainerRuntimeFactoryWithDefaultDataStore extends BaseCon
|
|
|
137
137
|
* will automatically be registered.
|
|
138
138
|
*
|
|
139
139
|
* @typeParam I - The optional input types used to strongly type the data object
|
|
140
|
-
* @
|
|
140
|
+
* @internal
|
|
141
141
|
*/
|
|
142
142
|
export declare abstract class DataObject<I extends DataObjectTypes = DataObjectTypes> extends PureDataObject<I> {
|
|
143
143
|
private internalRoot;
|
|
@@ -166,7 +166,7 @@ export declare abstract class DataObject<I extends DataObjectTypes = DataObjectT
|
|
|
166
166
|
*
|
|
167
167
|
* @typeParam TObj - DataObject (concrete type)
|
|
168
168
|
* @typeParam I - The input types for the DataObject
|
|
169
|
-
* @
|
|
169
|
+
* @internal
|
|
170
170
|
*/
|
|
171
171
|
export declare class DataObjectFactory<TObj extends DataObject<I>, I extends DataObjectTypes = DataObjectTypes> extends PureDataObjectFactory<TObj, I> {
|
|
172
172
|
constructor(type: string, ctor: new (props: IDataObjectProps<I>) => TObj, sharedObjects: readonly IChannelFactory[] | undefined, optionalProviders: FluidObjectSymbolProvider<I["OptionalProviders"]>, registryEntries?: NamedFluidDataStoreRegistryEntries, runtimeFactory?: typeof FluidDataStoreRuntime);
|
|
@@ -174,7 +174,7 @@ export declare class DataObjectFactory<TObj extends DataObject<I>, I extends Dat
|
|
|
174
174
|
|
|
175
175
|
/**
|
|
176
176
|
* This type is used as the base generic input to DataObject and PureDataObject.
|
|
177
|
-
* @
|
|
177
|
+
* @internal
|
|
178
178
|
*/
|
|
179
179
|
export declare interface DataObjectTypes {
|
|
180
180
|
/**
|
|
@@ -202,7 +202,7 @@ export declare interface DataObjectTypes {
|
|
|
202
202
|
*
|
|
203
203
|
* Returns a 404 error for any other url.
|
|
204
204
|
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
|
|
205
|
-
* @
|
|
205
|
+
* @internal
|
|
206
206
|
*/
|
|
207
207
|
export declare function defaultFluidObjectRequestHandler(fluidObject: FluidObject, request: IRequest): IResponse;
|
|
208
208
|
|
|
@@ -211,7 +211,7 @@ export declare function defaultFluidObjectRequestHandler(fluidObject: FluidObjec
|
|
|
211
211
|
* If request is empty and default url is provided, redirect request to such default url.
|
|
212
212
|
* @param defaultRootId - optional default root data store ID to pass request in case request is empty.
|
|
213
213
|
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
|
|
214
|
-
* @
|
|
214
|
+
* @internal
|
|
215
215
|
*/
|
|
216
216
|
export declare const defaultRouteRequestHandler: (defaultRootId: string) => (request: IRequest, runtime: IContainerRuntime) => Promise<IResponse | undefined>;
|
|
217
217
|
|
|
@@ -223,7 +223,7 @@ export declare const defaultRouteRequestHandler: (defaultRootId: string) => (req
|
|
|
223
223
|
* @typeParam T - Defines the type you expect to be returned.
|
|
224
224
|
*
|
|
225
225
|
* @param container - Container you're attempting to get the object from
|
|
226
|
-
* @
|
|
226
|
+
* @internal
|
|
227
227
|
*/
|
|
228
228
|
export declare function getDefaultObjectFromContainer<T = FluidObject>(container: IContainer): Promise<T>;
|
|
229
229
|
|
|
@@ -236,7 +236,7 @@ export declare function getDefaultObjectFromContainer<T = FluidObject>(container
|
|
|
236
236
|
*
|
|
237
237
|
* @param path - Unique path/url of the FluidObject
|
|
238
238
|
* @param container - Container you're attempting to get the object from
|
|
239
|
-
* @
|
|
239
|
+
* @internal
|
|
240
240
|
*/
|
|
241
241
|
export declare function getObjectFromContainer<T = FluidObject>(path: string, container: IContainer): Promise<T>;
|
|
242
242
|
|
|
@@ -249,12 +249,12 @@ export declare function getObjectFromContainer<T = FluidObject>(path: string, co
|
|
|
249
249
|
*
|
|
250
250
|
* @param id - Unique id of the FluidObject
|
|
251
251
|
* @param container - Container you're attempting to get the object from
|
|
252
|
-
* @
|
|
252
|
+
* @internal
|
|
253
253
|
*/
|
|
254
254
|
export declare function getObjectWithIdFromContainer<T = FluidObject>(id: string, container: IContainer): Promise<T>;
|
|
255
255
|
|
|
256
256
|
/**
|
|
257
|
-
* @
|
|
257
|
+
* @internal
|
|
258
258
|
*/
|
|
259
259
|
export declare interface IDataObjectProps<I extends DataObjectTypes = DataObjectTypes> {
|
|
260
260
|
readonly runtime: IFluidDataStoreRuntime;
|
|
@@ -265,7 +265,8 @@ export declare interface IDataObjectProps<I extends DataObjectTypes = DataObject
|
|
|
265
265
|
|
|
266
266
|
/**
|
|
267
267
|
* Useful interface in places where it's useful to do type erasure for PureDataObject generic
|
|
268
|
-
* @
|
|
268
|
+
* @internal
|
|
269
|
+
* @deprecated Will be removed in future major release. Please remove all usage of it.
|
|
269
270
|
*/
|
|
270
271
|
export declare interface IRootDataObjectFactory extends IFluidDataStoreFactory {
|
|
271
272
|
createRootInstance(rootDataStoreId: string, runtime: IContainerRuntime): Promise<IFluidRouter>;
|
|
@@ -282,7 +283,7 @@ export declare interface IRootDataObjectFactory extends IFluidDataStoreFactory {
|
|
|
282
283
|
* without the header, and respond with a mountable view of the given class using the response.
|
|
283
284
|
* @param MountableViewClass - The type of mountable view to use when responding
|
|
284
285
|
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
|
|
285
|
-
* @
|
|
286
|
+
* @internal
|
|
286
287
|
*/
|
|
287
288
|
export declare const mountableViewRequestHandler: (MountableViewClass: IFluidMountableViewClass, handlers: RuntimeRequestHandler[]) => (request: RequestParser, runtime: IContainerRuntime) => Promise<IResponse>;
|
|
288
289
|
|
|
@@ -292,7 +293,7 @@ export declare const mountableViewRequestHandler: (MountableViewClass: IFluidMou
|
|
|
292
293
|
* you are creating another base data store class
|
|
293
294
|
*
|
|
294
295
|
* @typeParam I - The optional input types used to strongly type the data object
|
|
295
|
-
* @
|
|
296
|
+
* @internal
|
|
296
297
|
*/
|
|
297
298
|
export declare abstract class PureDataObject<I extends DataObjectTypes = DataObjectTypes> extends TypedEventEmitter<I["Events"] & IEvent> implements IFluidLoadable, IFluidRouter, IProvideFluidHandle {
|
|
298
299
|
/**
|
|
@@ -381,7 +382,7 @@ export declare abstract class PureDataObject<I extends DataObjectTypes = DataObj
|
|
|
381
382
|
*
|
|
382
383
|
* @typeParam TObj - DataObject (concrete type)
|
|
383
384
|
* @typeParam I - The input types for the DataObject
|
|
384
|
-
* @
|
|
385
|
+
* @internal
|
|
385
386
|
*/
|
|
386
387
|
export declare class PureDataObjectFactory<TObj extends PureDataObject<I>, I extends DataObjectTypes = DataObjectTypes> implements IFluidDataStoreFactory, Partial<IProvideFluidDataStoreRegistry>, IRootDataObjectFactory {
|
|
387
388
|
readonly type: string;
|