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