@fluidframework/aqueduct 2.0.0-rc.2.0.1 → 2.0.0-rc.3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (95) hide show
  1. package/.eslintrc.cjs +14 -0
  2. package/.mocharc.cjs +12 -0
  3. package/CHANGELOG.md +342 -0
  4. package/api-extractor-lint.json +4 -0
  5. package/api-extractor.json +4 -0
  6. package/api-report/aqueduct.api.md +165 -0
  7. package/dist/container-runtime-factories/baseContainerRuntimeFactory.d.ts +7 -7
  8. package/dist/container-runtime-factories/baseContainerRuntimeFactory.d.ts.map +1 -1
  9. package/dist/container-runtime-factories/baseContainerRuntimeFactory.js +9 -10
  10. package/dist/container-runtime-factories/baseContainerRuntimeFactory.js.map +1 -1
  11. package/dist/container-runtime-factories/containerRuntimeFactoryWithDefaultDataStore.d.ts +5 -5
  12. package/dist/container-runtime-factories/containerRuntimeFactoryWithDefaultDataStore.d.ts.map +1 -1
  13. package/dist/container-runtime-factories/containerRuntimeFactoryWithDefaultDataStore.js +2 -2
  14. package/dist/container-runtime-factories/containerRuntimeFactoryWithDefaultDataStore.js.map +1 -1
  15. package/dist/data-object-factories/dataObjectFactory.d.ts +4 -4
  16. package/dist/data-object-factories/dataObjectFactory.d.ts.map +1 -1
  17. package/dist/data-object-factories/dataObjectFactory.js +7 -7
  18. package/dist/data-object-factories/dataObjectFactory.js.map +1 -1
  19. package/dist/data-object-factories/pureDataObjectFactory.d.ts +5 -5
  20. package/dist/data-object-factories/pureDataObjectFactory.d.ts.map +1 -1
  21. package/dist/data-object-factories/pureDataObjectFactory.js +9 -9
  22. package/dist/data-object-factories/pureDataObjectFactory.js.map +1 -1
  23. package/dist/data-objects/dataObject.d.ts +1 -1
  24. package/dist/data-objects/dataObject.d.ts.map +1 -1
  25. package/dist/data-objects/dataObject.js +3 -3
  26. package/dist/data-objects/dataObject.js.map +1 -1
  27. package/dist/data-objects/pureDataObject.d.ts +2 -2
  28. package/dist/data-objects/pureDataObject.d.ts.map +1 -1
  29. package/dist/data-objects/pureDataObject.js +6 -6
  30. package/dist/data-objects/pureDataObject.js.map +1 -1
  31. package/dist/data-objects/types.d.ts +3 -3
  32. package/dist/data-objects/types.d.ts.map +1 -1
  33. package/dist/data-objects/types.js.map +1 -1
  34. package/dist/legacy.d.ts +23 -0
  35. package/dist/public.d.ts +12 -0
  36. package/internal.d.ts +11 -0
  37. package/legacy.d.ts +11 -0
  38. package/lib/container-runtime-factories/baseContainerRuntimeFactory.d.ts +7 -7
  39. package/lib/container-runtime-factories/baseContainerRuntimeFactory.d.ts.map +1 -1
  40. package/lib/container-runtime-factories/baseContainerRuntimeFactory.js +5 -4
  41. package/lib/container-runtime-factories/baseContainerRuntimeFactory.js.map +1 -1
  42. package/lib/container-runtime-factories/containerRuntimeFactoryWithDefaultDataStore.d.ts +5 -5
  43. package/lib/container-runtime-factories/containerRuntimeFactoryWithDefaultDataStore.d.ts.map +1 -1
  44. package/lib/container-runtime-factories/containerRuntimeFactoryWithDefaultDataStore.js +1 -1
  45. package/lib/container-runtime-factories/containerRuntimeFactoryWithDefaultDataStore.js.map +1 -1
  46. package/lib/data-object-factories/dataObjectFactory.d.ts +4 -4
  47. package/lib/data-object-factories/dataObjectFactory.d.ts.map +1 -1
  48. package/lib/data-object-factories/dataObjectFactory.js +2 -2
  49. package/lib/data-object-factories/dataObjectFactory.js.map +1 -1
  50. package/lib/data-object-factories/pureDataObjectFactory.d.ts +5 -5
  51. package/lib/data-object-factories/pureDataObjectFactory.d.ts.map +1 -1
  52. package/lib/data-object-factories/pureDataObjectFactory.js +3 -3
  53. package/lib/data-object-factories/pureDataObjectFactory.js.map +1 -1
  54. package/lib/data-objects/dataObject.d.ts +1 -1
  55. package/lib/data-objects/dataObject.d.ts.map +1 -1
  56. package/lib/data-objects/dataObject.js +1 -1
  57. package/lib/data-objects/dataObject.js.map +1 -1
  58. package/lib/data-objects/pureDataObject.d.ts +2 -2
  59. package/lib/data-objects/pureDataObject.d.ts.map +1 -1
  60. package/lib/data-objects/pureDataObject.js +2 -2
  61. package/lib/data-objects/pureDataObject.js.map +1 -1
  62. package/lib/data-objects/types.d.ts +3 -3
  63. package/lib/data-objects/types.d.ts.map +1 -1
  64. package/lib/data-objects/types.js.map +1 -1
  65. package/lib/legacy.d.ts +23 -0
  66. package/lib/public.d.ts +12 -0
  67. package/package.json +39 -64
  68. package/prettier.config.cjs +8 -0
  69. package/src/container-runtime-factories/baseContainerRuntimeFactory.ts +142 -0
  70. package/src/container-runtime-factories/containerRuntimeFactoryWithDefaultDataStore.ts +110 -0
  71. package/src/container-runtime-factories/index.ts +13 -0
  72. package/src/data-object-factories/dataObjectFactory.ts +61 -0
  73. package/src/data-object-factories/index.ts +7 -0
  74. package/src/data-object-factories/pureDataObjectFactory.ts +379 -0
  75. package/src/data-objects/dataObject.ts +78 -0
  76. package/src/data-objects/index.ts +8 -0
  77. package/src/data-objects/pureDataObject.ts +186 -0
  78. package/src/data-objects/types.ts +40 -0
  79. package/src/index.ts +33 -0
  80. package/tsconfig.cjs.json +7 -0
  81. package/tsconfig.json +9 -0
  82. package/dist/aqueduct-alpha.d.ts +0 -433
  83. package/dist/aqueduct-beta.d.ts +0 -110
  84. package/dist/aqueduct-public.d.ts +0 -110
  85. package/dist/aqueduct-untrimmed.d.ts +0 -433
  86. package/lib/aqueduct-alpha.d.ts +0 -433
  87. package/lib/aqueduct-beta.d.ts +0 -110
  88. package/lib/aqueduct-public.d.ts +0 -110
  89. package/lib/aqueduct-untrimmed.d.ts +0 -433
  90. package/lib/test/aqueduct.spec.js +0 -8
  91. package/lib/test/aqueduct.spec.js.map +0 -1
  92. package/lib/test/tsconfig.tsbuildinfo +0 -1
  93. package/lib/test/types/validateAqueductPrevious.generated.js +0 -24
  94. package/lib/test/types/validateAqueductPrevious.generated.js.map +0 -1
  95. /package/{dist → lib}/tsdoc-metadata.json +0 -0
@@ -1,433 +0,0 @@
1
- /**
2
- * The `aqueduct` package is a library for building Fluid objects and Fluid
3
- * containers within the Fluid Framework. Its goal is to provide a thin base
4
- * layer over the existing Fluid Framework interfaces that allows developers to
5
- * get started quickly.
6
- *
7
- * @remarks
8
- * About the library name: An "aqueduct" is a way to transport water from a source
9
- * to another location. The library name was chosen because its purpose is to
10
- * facilitate using lower level constructs and therefore handle 'fluid' items
11
- * same as an aqueduct.
12
- *
13
- * @packageDocumentation
14
- */
15
-
16
- import { AsyncFluidObjectProvider } from '@fluidframework/synthesize';
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 { IContainerContext } from '@fluidframework/container-definitions';
23
- import { IContainerRuntime } from '@fluidframework/container-runtime-definitions';
24
- import { IContainerRuntimeBase } from '@fluidframework/runtime-definitions';
25
- import { IContainerRuntimeOptions } from '@fluidframework/container-runtime';
26
- import { IDataStore } from '@fluidframework/runtime-definitions';
27
- import { IEvent } from '@fluidframework/core-interfaces';
28
- import { IFluidDataStoreChannel } from '@fluidframework/runtime-definitions';
29
- import { IFluidDataStoreContext } from '@fluidframework/runtime-definitions';
30
- import { IFluidDataStoreContextDetached } from '@fluidframework/runtime-definitions';
31
- import { IFluidDataStoreFactory } from '@fluidframework/runtime-definitions';
32
- import { IFluidDataStoreRegistry } from '@fluidframework/runtime-definitions';
33
- import { IFluidDataStoreRuntime } from '@fluidframework/datastore-definitions';
34
- import { IFluidDependencySynthesizer } from '@fluidframework/synthesize';
35
- import { IFluidHandle } from '@fluidframework/core-interfaces';
36
- import { IFluidLoadable } from '@fluidframework/core-interfaces';
37
- import { IProvideFluidDataStoreRegistry } from '@fluidframework/runtime-definitions';
38
- import { IProvideFluidHandle } from '@fluidframework/core-interfaces';
39
- import { IRequest } from '@fluidframework/core-interfaces';
40
- import { IResponse } from '@fluidframework/core-interfaces';
41
- import { ISharedDirectory } from '@fluidframework/map';
42
- import { NamedFluidDataStoreRegistryEntries } from '@fluidframework/runtime-definitions';
43
- import { NamedFluidDataStoreRegistryEntry } from '@fluidframework/runtime-definitions';
44
- import { RuntimeFactoryHelper } from '@fluidframework/runtime-utils';
45
- import { RuntimeRequestHandler } from '@fluidframework/request-handler';
46
- import { TypedEventEmitter } from '@fluid-internal/client-utils';
47
-
48
- /**
49
- * BaseContainerRuntimeFactory produces container runtimes with the specified data store and service registries,
50
- * request handlers, runtimeOptions, and entryPoint initialization function.
51
- * It can be subclassed to implement a first-time initialization procedure for the containers it creates.
52
- * @alpha
53
- */
54
- export declare class BaseContainerRuntimeFactory extends RuntimeFactoryHelper implements IProvideFluidDataStoreRegistry {
55
- /**
56
- * {@inheritDoc @fluidframework/runtime-definitions#IProvideFluidDataStoreRegistry.IFluidDataStoreRegistry}
57
- */
58
- get IFluidDataStoreRegistry(): IFluidDataStoreRegistry;
59
- private readonly registry;
60
- private readonly registryEntries;
61
- private readonly dependencyContainer?;
62
- private readonly runtimeOptions?;
63
- private readonly requestHandlers;
64
- private readonly provideEntryPoint;
65
- constructor(props: BaseContainerRuntimeFactoryProps);
66
- instantiateFirstTime(runtime: ContainerRuntime): Promise<void>;
67
- instantiateFromExisting(runtime: ContainerRuntime): Promise<void>;
68
- preInitialize(context: IContainerContext, existing: boolean): Promise<ContainerRuntime>;
69
- /**
70
- * Subclasses may override containerInitializingFirstTime to perform any setup steps at the time the container
71
- * is created. This likely includes creating any initial data stores that are expected to be there at the outset.
72
- * @param runtime - The container runtime for the container being initialized
73
- */
74
- protected containerInitializingFirstTime(runtime: IContainerRuntime): Promise<void>;
75
- /**
76
- * Subclasses may override containerHasInitialized to perform any steps after the container has initialized.
77
- * This likely includes loading any data stores that are expected to be there at the outset.
78
- * @param runtime - The container runtime for the container being initialized
79
- */
80
- protected containerHasInitialized(runtime: IContainerRuntime): Promise<void>;
81
- }
82
-
83
- /**
84
- * {@link BaseContainerRuntimeFactory} construction properties.
85
- * @alpha
86
- */
87
- export declare interface BaseContainerRuntimeFactoryProps {
88
- /**
89
- * The data store registry for containers produced.
90
- */
91
- registryEntries: NamedFluidDataStoreRegistryEntries;
92
- /**
93
- * @deprecated Will be removed in a future release.
94
- */
95
- dependencyContainer?: IFluidDependencySynthesizer;
96
- /**
97
- * Request handlers for containers produced.
98
- * @deprecated Will be removed once Loader LTS version is "2.0.0-internal.7.0.0". Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
99
- */
100
- requestHandlers?: RuntimeRequestHandler[];
101
- /**
102
- * The runtime options passed to the ContainerRuntime when instantiating it
103
- */
104
- runtimeOptions?: IContainerRuntimeOptions;
105
- /**
106
- * Function that will initialize the entryPoint of the ContainerRuntime instances
107
- * created with this factory
108
- */
109
- provideEntryPoint: (runtime: IContainerRuntime) => Promise<FluidObject>;
110
- }
111
-
112
- /**
113
- * A ContainerRuntimeFactory that initializes Containers with a single default data store, which can be requested from
114
- * the container with an empty URL.
115
- *
116
- * This factory should be exposed as fluidExport off the entry point to your module.
117
- * @alpha
118
- */
119
- export declare class ContainerRuntimeFactoryWithDefaultDataStore extends BaseContainerRuntimeFactory {
120
- static readonly defaultDataStoreId = "default";
121
- protected readonly defaultFactory: IFluidDataStoreFactory;
122
- constructor(props: ContainerRuntimeFactoryWithDefaultDataStoreProps);
123
- /**
124
- * {@inheritDoc BaseContainerRuntimeFactory.containerInitializingFirstTime}
125
- */
126
- protected containerInitializingFirstTime(runtime: IContainerRuntime): Promise<void>;
127
- }
128
-
129
- /**
130
- * {@link ContainerRuntimeFactoryWithDefaultDataStore} construction properties.
131
- * @alpha
132
- */
133
- export declare interface ContainerRuntimeFactoryWithDefaultDataStoreProps {
134
- defaultFactory: IFluidDataStoreFactory;
135
- /**
136
- * The data store registry for containers produced.
137
- */
138
- registryEntries: NamedFluidDataStoreRegistryEntries;
139
- /**
140
- * @deprecated Will be removed in a future release.
141
- */
142
- dependencyContainer?: IFluidDependencySynthesizer;
143
- /**
144
- * Request handlers for containers produced.
145
- * @deprecated Will be removed once Loader LTS version is "2.0.0-internal.7.0.0". Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
146
- */
147
- requestHandlers?: RuntimeRequestHandler[];
148
- /**
149
- * The runtime options passed to the ContainerRuntime when instantiating it
150
- */
151
- runtimeOptions?: IContainerRuntimeOptions;
152
- /**
153
- * Function that will initialize the entryPoint of the ContainerRuntime instances
154
- * created with this factory
155
- */
156
- provideEntryPoint?: (runtime: IContainerRuntime) => Promise<FluidObject>;
157
- }
158
-
159
- /**
160
- * DataObject is a base data store that is primed with a root directory. It
161
- * ensures that it is created and ready before you can access it.
162
- *
163
- * Having a single root directory allows for easier development. Instead of creating
164
- * and registering channels with the runtime any new DDS that is set on the root
165
- * will automatically be registered.
166
- *
167
- * @typeParam I - The optional input types used to strongly type the data object
168
- * @alpha
169
- */
170
- export declare abstract class DataObject<I extends DataObjectTypes = DataObjectTypes> extends PureDataObject<I> {
171
- private internalRoot;
172
- private readonly rootDirectoryId;
173
- /**
174
- * The root directory will either be ready or will return an error. If an error is thrown
175
- * the root has not been correctly created/set.
176
- */
177
- protected get root(): ISharedDirectory;
178
- /**
179
- * Initializes internal objects and calls initialization overrides.
180
- * Caller is responsible for ensuring this is only invoked once.
181
- */
182
- initializeInternal(existing: boolean): Promise<void>;
183
- /**
184
- * Generates an error string indicating an item is uninitialized.
185
- * @param item - The name of the item that was uninitialized.
186
- */
187
- protected getUninitializedErrorString(item: string): string;
188
- }
189
-
190
- /**
191
- * DataObjectFactory is the IFluidDataStoreFactory for use with DataObjects.
192
- * It facilitates DataObject's features (such as its shared directory) by
193
- * ensuring relevant shared objects etc are available to the factory.
194
- *
195
- * @typeParam TObj - DataObject (concrete type)
196
- * @typeParam I - The input types for the DataObject
197
- * @alpha
198
- */
199
- export declare class DataObjectFactory<TObj extends DataObject<I>, I extends DataObjectTypes = DataObjectTypes> extends PureDataObjectFactory<TObj, I> {
200
- constructor(type: string, ctor: new (props: IDataObjectProps<I>) => TObj, sharedObjects: readonly IChannelFactory<IFluidLoadable>[] | undefined, optionalProviders: FluidObjectSymbolProvider<I["OptionalProviders"]>, registryEntries?: NamedFluidDataStoreRegistryEntries, runtimeFactory?: typeof FluidDataStoreRuntime);
201
- }
202
-
203
- /**
204
- * This type is used as the base generic input to DataObject and PureDataObject.
205
- * @alpha
206
- */
207
- export declare interface DataObjectTypes {
208
- /**
209
- * Represents a type that will define optional providers that will be injected.
210
- */
211
- OptionalProviders?: FluidObject;
212
- /**
213
- * The initial state type that the produced data object may take during creation.
214
- */
215
- InitialState?: any;
216
- /**
217
- * Represents events that will be available in the EventForwarder.
218
- */
219
- Events?: IEvent;
220
- }
221
-
222
- /**
223
- * @alpha
224
- */
225
- export declare interface IDataObjectProps<I extends DataObjectTypes = DataObjectTypes> {
226
- readonly runtime: IFluidDataStoreRuntime;
227
- readonly context: IFluidDataStoreContext;
228
- readonly providers: AsyncFluidObjectProvider<I["OptionalProviders"]>;
229
- readonly initProps?: I["InitialState"];
230
- }
231
-
232
- /**
233
- * This is a bare-bones base class that does basic setup and enables for factory on an initialize call.
234
- * You probably don't want to inherit from this data store directly unless
235
- * you are creating another base data store class
236
- *
237
- * @typeParam I - The optional input types used to strongly type the data object
238
- * @alpha
239
- */
240
- export declare abstract class PureDataObject<I extends DataObjectTypes = DataObjectTypes> extends TypedEventEmitter<I["Events"] & IEvent> implements IFluidLoadable, IProvideFluidHandle {
241
- /**
242
- * This is your FluidDataStoreRuntime object
243
- */
244
- protected readonly runtime: IFluidDataStoreRuntime;
245
- /**
246
- * This context is used to talk up to the ContainerRuntime
247
- */
248
- protected readonly context: IFluidDataStoreContext;
249
- /**
250
- * Providers are FluidObject keyed objects that provide back
251
- * a promise to the corresponding FluidObject or undefined.
252
- * Providers injected/provided by the Container and/or HostingApplication
253
- *
254
- * To define providers set FluidObject interfaces in the OptionalProviders generic type for your data store
255
- */
256
- protected readonly providers: AsyncFluidObjectProvider<I["OptionalProviders"]>;
257
- protected initProps?: I["InitialState"];
258
- protected initializeP: Promise<void> | undefined;
259
- get id(): string;
260
- /**
261
- * {@inheritDoc @fluidframework/core-interfaces#IProvideFluidLoadable.IFluidLoadable}
262
- */
263
- get IFluidLoadable(): this;
264
- /**
265
- * {@inheritDoc @fluidframework/core-interfaces#IProvideFluidHandle.IFluidHandle}
266
- */
267
- get IFluidHandle(): IFluidHandle<this>;
268
- /**
269
- * Handle to a data store
270
- */
271
- get handle(): IFluidHandle<this>;
272
- static getDataObject(runtime: IFluidDataStoreRuntime): Promise<PureDataObject>;
273
- constructor(props: IDataObjectProps<I>);
274
- /**
275
- * Return this object if someone requests it directly
276
- * We will return this object in two scenarios:
277
- *
278
- * 1. the request url is a "/"
279
- *
280
- * 2. the request url is empty
281
- */
282
- request(req: IRequest): Promise<IResponse>;
283
- /**
284
- * Call this API to ensure PureDataObject is fully initialized.
285
- * Initialization happens on demand, only on as-needed bases.
286
- * In most cases you should allow factory/object to decide when to finish initialization.
287
- * But if you are supplying your own implementation of DataStoreRuntime factory and overriding some methods
288
- * and need a fully initialized object, then you can call this API to ensure object is fully initialized.
289
- */
290
- finishInitialization(existing: boolean): Promise<void>;
291
- /**
292
- * Internal initialize implementation. Overwriting this will change the flow of the PureDataObject and should
293
- * generally not be done.
294
- *
295
- * Calls initializingFirstTime, initializingFromExisting, and hasInitialized. Caller is
296
- * responsible for ensuring this is only invoked once.
297
- */
298
- initializeInternal(existing: boolean): Promise<void>;
299
- /**
300
- * Called every time the data store is initialized, before initializingFirstTime or
301
- * initializingFromExisting is called.
302
- */
303
- protected preInitialize(): Promise<void>;
304
- /**
305
- * Called the first time the data store is initialized (new creations with a new
306
- * data store runtime)
307
- *
308
- * @param props - Optional props to be passed in on create
309
- */
310
- protected initializingFirstTime(props?: I["InitialState"]): Promise<void>;
311
- /**
312
- * Called every time but the first time the data store is initialized (creations
313
- * with an existing data store runtime)
314
- */
315
- protected initializingFromExisting(): Promise<void>;
316
- /**
317
- * Called every time the data store is initialized after create or existing.
318
- */
319
- protected hasInitialized(): Promise<void>;
320
- }
321
-
322
- /**
323
- * PureDataObjectFactory is a barebones IFluidDataStoreFactory for use with PureDataObject.
324
- * Consumers should typically use DataObjectFactory instead unless creating
325
- * another base data store factory.
326
- *
327
- * @typeParam TObj - DataObject (concrete type)
328
- * @typeParam I - The input types for the DataObject
329
- * @alpha
330
- */
331
- export declare class PureDataObjectFactory<TObj extends PureDataObject<I>, I extends DataObjectTypes = DataObjectTypes> implements IFluidDataStoreFactory, Partial<IProvideFluidDataStoreRegistry> {
332
- /**
333
- * {@inheritDoc @fluidframework/runtime-definitions#IFluidDataStoreFactory."type"}
334
- */
335
- readonly type: string;
336
- private readonly ctor;
337
- private readonly optionalProviders;
338
- private readonly runtimeClass;
339
- private readonly sharedObjectRegistry;
340
- private readonly registry;
341
- constructor(
342
- /**
343
- * {@inheritDoc @fluidframework/runtime-definitions#IFluidDataStoreFactory."type"}
344
- */
345
- type: string, ctor: new (props: IDataObjectProps<I>) => TObj, sharedObjects: readonly IChannelFactory[], optionalProviders: FluidObjectSymbolProvider<I["OptionalProviders"]>, registryEntries?: NamedFluidDataStoreRegistryEntries, runtimeClass?: typeof FluidDataStoreRuntime);
346
- /**
347
- * {@inheritDoc @fluidframework/runtime-definitions#IProvideFluidDataStoreFactory.IFluidDataStoreFactory}
348
- */
349
- get IFluidDataStoreFactory(): this;
350
- /**
351
- * {@inheritDoc @fluidframework/runtime-definitions#IProvideFluidDataStoreRegistry.IFluidDataStoreRegistry}
352
- */
353
- get IFluidDataStoreRegistry(): IFluidDataStoreRegistry | undefined;
354
- /**
355
- * Convenience helper to get the data store's/factory's data store registry entry.
356
- * The return type hides the factory's generics, easing grouping of registry
357
- * entries that differ only in this way into the same array.
358
- * @returns The NamedFluidDataStoreRegistryEntry
359
- */
360
- get registryEntry(): NamedFluidDataStoreRegistryEntry;
361
- /**
362
- * {@inheritDoc @fluidframework/runtime-definitions#IFluidDataStoreFactory.instantiateDataStore}
363
- */
364
- instantiateDataStore(context: IFluidDataStoreContext, existing: boolean): Promise<IFluidDataStoreChannel>;
365
- /**
366
- * Creates a new instance of the object. Uses parent context's registry to build package path to this factory.
367
- * In other words, registry of context passed in has to contain this factory, with the name that matches
368
- * this factory's type.
369
- * It is intended to be used by data store objects that create sub-objects.
370
- * @param context - The context being used to create the runtime
371
- * (the created object will have its own new context created as well)
372
- * @param initialState - The initial state to provide to the created data store.
373
- * @param loadingGroupId - NOT production ready, EXPERIMENTAL, please read {@link https://github.com/microsoft/FluidFramework/blob/main/packages/runtime/container-runtime/README.md | README}. The service needs to support this feature, does not work for most services
374
- * @returns an object created by this factory. Data store and objects created are not attached to container.
375
- * They get attached only when a handle to one of them is attached to already attached objects.
376
- */
377
- createChildInstance(parentContext: IFluidDataStoreContext, initialState?: I["InitialState"], loadingGroupId?: string): Promise<TObj>;
378
- /**
379
- * Creates a new instance of the object. Uses peer context's registry and its package path to identify this factory.
380
- * In other words, registry of context passed in has to have this factory.
381
- * Intended to be used by data store objects that need to create peers (similar) instances of existing objects.
382
- * @param context - The component context being used to create the object
383
- * (the created object will have its own new context created as well)
384
- * @param initialState - The initial state to provide to the created component.
385
- * @param loadingGroupId - NOT production ready, EXPERIMENTAL, please read {@link https://github.com/microsoft/FluidFramework/blob/main/packages/runtime/container-runtime/README.md | README}. The service needs to support this feature, does not work for most services
386
- * @returns an object created by this factory. Data store and objects created are not attached to container.
387
- * They get attached only when a handle to one of them is attached to already attached objects.
388
- */
389
- createPeerInstance(peerContext: IFluidDataStoreContext, initialState?: I["InitialState"], loadingGroupId?: string): Promise<TObj>;
390
- /**
391
- * Creates a new instance of the object. Uses container's registry to find this factory.
392
- * It's expected that only container owners would use this functionality, as only such developers
393
- * have knowledge of entries in container registry.
394
- * The name in this registry for such record should match type of this factory.
395
- * @param runtime - container runtime. It's registry is used to create an object.
396
- * @param initialState - The initial state to provide to the created component.
397
- * @param loadingGroupId - NOT production ready, EXPERIMENTAL, please read {@link https://github.com/microsoft/FluidFramework/blob/main/packages/runtime/container-runtime/README.md | README}. The service needs to support this feature, does not work for most services
398
- * @returns an object created by this factory. Data store and objects created are not attached to container.
399
- * They get attached only when a handle to one of them is attached to already attached objects.
400
- */
401
- createInstance(runtime: IContainerRuntimeBase, initialState?: I["InitialState"], loadingGroupId?: string): Promise<TObj>;
402
- /**
403
- * Creates a new instance of the object with a datastore which exposes the aliasing api.
404
- * @param runtime - container runtime. It is the runtime that will be used to create the object. It will produce
405
- * the underlying infrastructure to get the data object to operate.
406
- * @param initialState - The initial state to provide to the created component.
407
- * @param packagePath - The path to the data store factory to use to create the data object.
408
- * @param loadingGroupId - NOT production ready, EXPERIMENTAL, please read {@link https://github.com/microsoft/FluidFramework/blob/main/packages/runtime/container-runtime/README.md | README}. The service needs to support this feature, does not work for most services
409
- * @returns an array containing the object created by this factory and an IDataStore object that enables users to
410
- * alias the data object.
411
- * The data object is attached only when it is attached to the handle graph that connects to an aliased object or
412
- * when the data object is aliased.
413
- */
414
- createInstanceWithDataStore(containerRuntime: IContainerRuntimeBase, initialState?: I["InitialState"], packagePath?: Readonly<string[]>, loadingGroupId?: string): Promise<[TObj, IDataStore]>;
415
- /**
416
- * Creates a new root instance of the object. Uses container's registry to find this factory.
417
- * It's expected that only container owners would use this functionality, as only such developers
418
- * have knowledge of entries in container registry.
419
- * The name in this registry for such record should match type of this factory.
420
- * @param runtime - container runtime. It's registry is used to create an object.
421
- * @param initialState - The initial state to provide to the created component.
422
- * @returns an object created by this factory. Data store and objects created are not attached to container.
423
- * They get attached only when a handle to one of them is attached to already attached objects.
424
- *
425
- * @deprecated - the issue is that it does not allow the customer to decide the conflict resolution policy when an
426
- * aliasing conflict occurs. Use {@link PureDataObjectFactory.createInstanceWithDataStore} instead.
427
- */
428
- createRootInstance(rootDataStoreId: string, runtime: IContainerRuntime, initialState?: I["InitialState"]): Promise<TObj>;
429
- protected createNonRootInstanceCore(containerRuntime: IContainerRuntimeBase, packagePath: Readonly<string[]>, initialState?: I["InitialState"], loadingGroupId?: string): Promise<TObj>;
430
- protected createInstanceCore(context: IFluidDataStoreContextDetached, initialState?: I["InitialState"]): Promise<TObj>;
431
- }
432
-
433
- export { }
@@ -1,110 +0,0 @@
1
- /**
2
- * The `aqueduct` package is a library for building Fluid objects and Fluid
3
- * containers within the Fluid Framework. Its goal is to provide a thin base
4
- * layer over the existing Fluid Framework interfaces that allows developers to
5
- * get started quickly.
6
- *
7
- * @remarks
8
- * About the library name: An "aqueduct" is a way to transport water from a source
9
- * to another location. The library name was chosen because its purpose is to
10
- * facilitate using lower level constructs and therefore handle 'fluid' items
11
- * same as an aqueduct.
12
- *
13
- * @packageDocumentation
14
- */
15
-
16
- import { AsyncFluidObjectProvider } from '@fluidframework/synthesize';
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 { IContainerContext } from '@fluidframework/container-definitions';
23
- import { IContainerRuntime } from '@fluidframework/container-runtime-definitions';
24
- import { IContainerRuntimeBase } from '@fluidframework/runtime-definitions';
25
- import { IContainerRuntimeOptions } from '@fluidframework/container-runtime';
26
- import { IDataStore } from '@fluidframework/runtime-definitions';
27
- import { IEvent } from '@fluidframework/core-interfaces';
28
- import { IFluidDataStoreChannel } from '@fluidframework/runtime-definitions';
29
- import { IFluidDataStoreContext } from '@fluidframework/runtime-definitions';
30
- import { IFluidDataStoreContextDetached } from '@fluidframework/runtime-definitions';
31
- import { IFluidDataStoreFactory } from '@fluidframework/runtime-definitions';
32
- import { IFluidDataStoreRegistry } from '@fluidframework/runtime-definitions';
33
- import { IFluidDataStoreRuntime } from '@fluidframework/datastore-definitions';
34
- import { IFluidDependencySynthesizer } from '@fluidframework/synthesize';
35
- import { IFluidHandle } from '@fluidframework/core-interfaces';
36
- import { IFluidLoadable } from '@fluidframework/core-interfaces';
37
- import { IProvideFluidDataStoreRegistry } from '@fluidframework/runtime-definitions';
38
- import { IProvideFluidHandle } from '@fluidframework/core-interfaces';
39
- import { IRequest } from '@fluidframework/core-interfaces';
40
- import { IResponse } from '@fluidframework/core-interfaces';
41
- import { ISharedDirectory } from '@fluidframework/map';
42
- import { NamedFluidDataStoreRegistryEntries } from '@fluidframework/runtime-definitions';
43
- import { NamedFluidDataStoreRegistryEntry } from '@fluidframework/runtime-definitions';
44
- import { RuntimeFactoryHelper } from '@fluidframework/runtime-utils';
45
- import { RuntimeRequestHandler } from '@fluidframework/request-handler';
46
- import { TypedEventEmitter } from '@fluid-internal/client-utils';
47
-
48
- /* Excluded from this release type: AsyncFluidObjectProvider */
49
-
50
- /* Excluded from this release type: BaseContainerRuntimeFactory */
51
-
52
- /* Excluded from this release type: BaseContainerRuntimeFactoryProps */
53
-
54
- /* Excluded from this release type: ContainerRuntime */
55
-
56
- /* Excluded from this release type: ContainerRuntimeFactoryWithDefaultDataStore */
57
-
58
- /* Excluded from this release type: ContainerRuntimeFactoryWithDefaultDataStoreProps */
59
-
60
- /* Excluded from this release type: DataObject */
61
-
62
- /* Excluded from this release type: DataObjectFactory */
63
-
64
- /* Excluded from this release type: DataObjectTypes */
65
-
66
- /* Excluded from this release type: FluidDataStoreRuntime */
67
-
68
- /* Excluded from this release type: FluidObjectSymbolProvider */
69
-
70
- /* Excluded from this release type: IContainerContext */
71
-
72
- /* Excluded from this release type: IContainerRuntime */
73
-
74
- /* Excluded from this release type: IContainerRuntimeBase */
75
-
76
- /* Excluded from this release type: IContainerRuntimeOptions */
77
-
78
- /* Excluded from this release type: IDataObjectProps */
79
-
80
- /* Excluded from this release type: IDataStore */
81
-
82
- /* Excluded from this release type: IFluidDataStoreChannel */
83
-
84
- /* Excluded from this release type: IFluidDataStoreContext */
85
-
86
- /* Excluded from this release type: IFluidDataStoreContextDetached */
87
-
88
- /* Excluded from this release type: IFluidDataStoreFactory */
89
-
90
- /* Excluded from this release type: IFluidDataStoreRegistry */
91
-
92
- /* Excluded from this release type: IFluidDependencySynthesizer */
93
-
94
- /* Excluded from this release type: IProvideFluidDataStoreRegistry */
95
-
96
- /* Excluded from this release type: ISharedDirectory */
97
-
98
- /* Excluded from this release type: NamedFluidDataStoreRegistryEntries */
99
-
100
- /* Excluded from this release type: NamedFluidDataStoreRegistryEntry */
101
-
102
- /* Excluded from this release type: PureDataObject */
103
-
104
- /* Excluded from this release type: PureDataObjectFactory */
105
-
106
- /* Excluded from this release type: RuntimeFactoryHelper */
107
-
108
- /* Excluded from this release type: RuntimeRequestHandler */
109
-
110
- export { }
@@ -1,110 +0,0 @@
1
- /**
2
- * The `aqueduct` package is a library for building Fluid objects and Fluid
3
- * containers within the Fluid Framework. Its goal is to provide a thin base
4
- * layer over the existing Fluid Framework interfaces that allows developers to
5
- * get started quickly.
6
- *
7
- * @remarks
8
- * About the library name: An "aqueduct" is a way to transport water from a source
9
- * to another location. The library name was chosen because its purpose is to
10
- * facilitate using lower level constructs and therefore handle 'fluid' items
11
- * same as an aqueduct.
12
- *
13
- * @packageDocumentation
14
- */
15
-
16
- import { AsyncFluidObjectProvider } from '@fluidframework/synthesize';
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 { IContainerContext } from '@fluidframework/container-definitions';
23
- import { IContainerRuntime } from '@fluidframework/container-runtime-definitions';
24
- import { IContainerRuntimeBase } from '@fluidframework/runtime-definitions';
25
- import { IContainerRuntimeOptions } from '@fluidframework/container-runtime';
26
- import { IDataStore } from '@fluidframework/runtime-definitions';
27
- import { IEvent } from '@fluidframework/core-interfaces';
28
- import { IFluidDataStoreChannel } from '@fluidframework/runtime-definitions';
29
- import { IFluidDataStoreContext } from '@fluidframework/runtime-definitions';
30
- import { IFluidDataStoreContextDetached } from '@fluidframework/runtime-definitions';
31
- import { IFluidDataStoreFactory } from '@fluidframework/runtime-definitions';
32
- import { IFluidDataStoreRegistry } from '@fluidframework/runtime-definitions';
33
- import { IFluidDataStoreRuntime } from '@fluidframework/datastore-definitions';
34
- import { IFluidDependencySynthesizer } from '@fluidframework/synthesize';
35
- import { IFluidHandle } from '@fluidframework/core-interfaces';
36
- import { IFluidLoadable } from '@fluidframework/core-interfaces';
37
- import { IProvideFluidDataStoreRegistry } from '@fluidframework/runtime-definitions';
38
- import { IProvideFluidHandle } from '@fluidframework/core-interfaces';
39
- import { IRequest } from '@fluidframework/core-interfaces';
40
- import { IResponse } from '@fluidframework/core-interfaces';
41
- import { ISharedDirectory } from '@fluidframework/map';
42
- import { NamedFluidDataStoreRegistryEntries } from '@fluidframework/runtime-definitions';
43
- import { NamedFluidDataStoreRegistryEntry } from '@fluidframework/runtime-definitions';
44
- import { RuntimeFactoryHelper } from '@fluidframework/runtime-utils';
45
- import { RuntimeRequestHandler } from '@fluidframework/request-handler';
46
- import { TypedEventEmitter } from '@fluid-internal/client-utils';
47
-
48
- /* Excluded from this release type: AsyncFluidObjectProvider */
49
-
50
- /* Excluded from this release type: BaseContainerRuntimeFactory */
51
-
52
- /* Excluded from this release type: BaseContainerRuntimeFactoryProps */
53
-
54
- /* Excluded from this release type: ContainerRuntime */
55
-
56
- /* Excluded from this release type: ContainerRuntimeFactoryWithDefaultDataStore */
57
-
58
- /* Excluded from this release type: ContainerRuntimeFactoryWithDefaultDataStoreProps */
59
-
60
- /* Excluded from this release type: DataObject */
61
-
62
- /* Excluded from this release type: DataObjectFactory */
63
-
64
- /* Excluded from this release type: DataObjectTypes */
65
-
66
- /* Excluded from this release type: FluidDataStoreRuntime */
67
-
68
- /* Excluded from this release type: FluidObjectSymbolProvider */
69
-
70
- /* Excluded from this release type: IContainerContext */
71
-
72
- /* Excluded from this release type: IContainerRuntime */
73
-
74
- /* Excluded from this release type: IContainerRuntimeBase */
75
-
76
- /* Excluded from this release type: IContainerRuntimeOptions */
77
-
78
- /* Excluded from this release type: IDataObjectProps */
79
-
80
- /* Excluded from this release type: IDataStore */
81
-
82
- /* Excluded from this release type: IFluidDataStoreChannel */
83
-
84
- /* Excluded from this release type: IFluidDataStoreContext */
85
-
86
- /* Excluded from this release type: IFluidDataStoreContextDetached */
87
-
88
- /* Excluded from this release type: IFluidDataStoreFactory */
89
-
90
- /* Excluded from this release type: IFluidDataStoreRegistry */
91
-
92
- /* Excluded from this release type: IFluidDependencySynthesizer */
93
-
94
- /* Excluded from this release type: IProvideFluidDataStoreRegistry */
95
-
96
- /* Excluded from this release type: ISharedDirectory */
97
-
98
- /* Excluded from this release type: NamedFluidDataStoreRegistryEntries */
99
-
100
- /* Excluded from this release type: NamedFluidDataStoreRegistryEntry */
101
-
102
- /* Excluded from this release type: PureDataObject */
103
-
104
- /* Excluded from this release type: PureDataObjectFactory */
105
-
106
- /* Excluded from this release type: RuntimeFactoryHelper */
107
-
108
- /* Excluded from this release type: RuntimeRequestHandler */
109
-
110
- export { }