@fluidframework/aqueduct 2.0.0-dev-rc.1.0.0.228517 → 2.0.0-dev-rc.1.0.0.232845
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 +80 -38
- package/dist/aqueduct-beta.d.ts +4 -0
- package/dist/aqueduct-public.d.ts +4 -0
- package/dist/aqueduct-untrimmed.d.ts +80 -38
- package/dist/container-runtime-factories/baseContainerRuntimeFactory.d.ts +39 -23
- package/dist/container-runtime-factories/baseContainerRuntimeFactory.d.ts.map +1 -1
- package/dist/container-runtime-factories/baseContainerRuntimeFactory.js +3 -8
- package/dist/container-runtime-factories/baseContainerRuntimeFactory.js.map +1 -1
- package/dist/container-runtime-factories/containerRuntimeFactoryWithDefaultDataStore.d.ts +36 -24
- package/dist/container-runtime-factories/containerRuntimeFactoryWithDefaultDataStore.d.ts.map +1 -1
- package/dist/container-runtime-factories/containerRuntimeFactoryWithDefaultDataStore.js +2 -11
- package/dist/container-runtime-factories/containerRuntimeFactoryWithDefaultDataStore.js.map +1 -1
- package/dist/container-runtime-factories/index.d.ts +2 -2
- package/dist/container-runtime-factories/index.d.ts.map +1 -1
- package/dist/container-runtime-factories/index.js.map +1 -1
- package/dist/data-object-factories/dataObjectFactory.d.ts +4 -4
- package/dist/data-object-factories/dataObjectFactory.d.ts.map +1 -1
- package/dist/data-object-factories/dataObjectFactory.js +2 -2
- package/dist/data-object-factories/dataObjectFactory.js.map +1 -1
- package/dist/data-object-factories/pureDataObjectFactory.d.ts +11 -5
- package/dist/data-object-factories/pureDataObjectFactory.d.ts.map +1 -1
- package/dist/data-object-factories/pureDataObjectFactory.js +6 -0
- package/dist/data-object-factories/pureDataObjectFactory.js.map +1 -1
- package/dist/data-objects/dataObject.d.ts +2 -2
- package/dist/data-objects/dataObject.d.ts.map +1 -1
- package/dist/data-objects/dataObject.js +6 -6
- package/dist/data-objects/dataObject.js.map +1 -1
- package/dist/data-objects/index.d.ts +1 -1
- package/dist/data-objects/index.d.ts.map +1 -1
- package/dist/data-objects/index.js.map +1 -1
- package/dist/data-objects/pureDataObject.d.ts +12 -6
- package/dist/data-objects/pureDataObject.d.ts.map +1 -1
- package/dist/data-objects/pureDataObject.js +10 -0
- package/dist/data-objects/pureDataObject.js.map +1 -1
- package/dist/data-objects/types.d.ts +7 -7
- package/dist/data-objects/types.d.ts.map +1 -1
- package/dist/data-objects/types.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/tsdoc-metadata.json +1 -1
- package/lib/aqueduct-alpha.d.mts +80 -38
- package/lib/aqueduct-beta.d.mts +4 -0
- package/lib/aqueduct-public.d.mts +4 -0
- package/lib/aqueduct-untrimmed.d.mts +80 -38
- package/lib/container-runtime-factories/baseContainerRuntimeFactory.d.mts +39 -23
- package/lib/container-runtime-factories/baseContainerRuntimeFactory.d.mts.map +1 -1
- package/lib/container-runtime-factories/baseContainerRuntimeFactory.mjs +4 -9
- package/lib/container-runtime-factories/baseContainerRuntimeFactory.mjs.map +1 -1
- package/lib/container-runtime-factories/containerRuntimeFactoryWithDefaultDataStore.d.mts +36 -24
- package/lib/container-runtime-factories/containerRuntimeFactoryWithDefaultDataStore.d.mts.map +1 -1
- package/lib/container-runtime-factories/containerRuntimeFactoryWithDefaultDataStore.mjs +2 -11
- package/lib/container-runtime-factories/containerRuntimeFactoryWithDefaultDataStore.mjs.map +1 -1
- package/lib/container-runtime-factories/index.d.mts +2 -2
- package/lib/container-runtime-factories/index.d.mts.map +1 -1
- package/lib/container-runtime-factories/index.mjs +2 -2
- package/lib/container-runtime-factories/index.mjs.map +1 -1
- package/lib/data-object-factories/dataObjectFactory.d.mts +4 -4
- package/lib/data-object-factories/dataObjectFactory.d.mts.map +1 -1
- package/lib/data-object-factories/dataObjectFactory.mjs +2 -2
- package/lib/data-object-factories/dataObjectFactory.mjs.map +1 -1
- package/lib/data-object-factories/pureDataObjectFactory.d.mts +11 -5
- package/lib/data-object-factories/pureDataObjectFactory.d.mts.map +1 -1
- package/lib/data-object-factories/pureDataObjectFactory.mjs +6 -0
- package/lib/data-object-factories/pureDataObjectFactory.mjs.map +1 -1
- package/lib/data-objects/dataObject.d.mts +2 -2
- package/lib/data-objects/dataObject.d.mts.map +1 -1
- package/lib/data-objects/dataObject.mjs +6 -6
- package/lib/data-objects/dataObject.mjs.map +1 -1
- package/lib/data-objects/index.d.mts +1 -1
- package/lib/data-objects/index.d.mts.map +1 -1
- package/lib/data-objects/index.mjs.map +1 -1
- package/lib/data-objects/pureDataObject.d.mts +12 -6
- package/lib/data-objects/pureDataObject.d.mts.map +1 -1
- package/lib/data-objects/pureDataObject.mjs +10 -0
- package/lib/data-objects/pureDataObject.mjs.map +1 -1
- package/lib/data-objects/types.d.mts +7 -7
- package/lib/data-objects/types.d.mts.map +1 -1
- package/lib/data-objects/types.mjs.map +1 -1
- package/lib/index.d.mts +2 -2
- package/lib/index.d.mts.map +1 -1
- package/lib/index.mjs +1 -1
- package/lib/index.mjs.map +1 -1
- package/package.json +18 -18
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH;;;;;;;;;;;;;GAaG;AAEH,iEAAmF;AAA1E,0HAAA,iBAAiB,OAAA;AAAE,8HAAA,qBAAqB,OAAA;AACjD,+
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH;;;;;;;;;;;;;GAaG;AAEH,iEAAmF;AAA1E,0HAAA,iBAAiB,OAAA;AAAE,8HAAA,qBAAqB,OAAA;AACjD,+CAKwB;AAJvB,0GAAA,UAAU,OAAA;AAGV,8GAAA,cAAc,OAAA;AAEf,6EAKuC;AAJtC,0IAAA,2BAA2B,OAAA;AAE3B,0JAAA,2CAA2C,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * The `aqueduct` package is a library for building Fluid objects and Fluid\n * containers within the Fluid Framework. Its goal is to provide a thin base\n * layer over the existing Fluid Framework interfaces that allows developers to\n * get started quickly.\n *\n * @remarks\n * About the library name: An \"aqueduct\" is a way to transport water from a source\n * to another location. The library name was chosen because its purpose is to\n * facilitate using lower level constructs and therefore handle 'fluid' items\n * same as an aqueduct.\n *\n * @packageDocumentation\n */\n\nexport { DataObjectFactory, PureDataObjectFactory } from \"./data-object-factories\";\nexport {\n\tDataObject,\n\ttype DataObjectTypes,\n\ttype IDataObjectProps,\n\tPureDataObject,\n} from \"./data-objects\";\nexport {\n\tBaseContainerRuntimeFactory,\n\ttype BaseContainerRuntimeFactoryProps,\n\tContainerRuntimeFactoryWithDefaultDataStore,\n\ttype ContainerRuntimeFactoryWithDefaultDataStoreProps,\n} from \"./container-runtime-factories\";\n"]}
|
package/dist/tsdoc-metadata.json
CHANGED
package/lib/aqueduct-alpha.d.mts
CHANGED
|
@@ -35,6 +35,9 @@ import { TypedEventEmitter } from '@fluid-internal/client-utils';
|
|
|
35
35
|
* @alpha
|
|
36
36
|
*/
|
|
37
37
|
export declare class BaseContainerRuntimeFactory extends RuntimeFactoryHelper implements IProvideFluidDataStoreRegistry {
|
|
38
|
+
/**
|
|
39
|
+
* {@inheritDoc @fluidframework/runtime-definitions#IProvideFluidDataStoreRegistry.IFluidDataStoreRegistry}
|
|
40
|
+
*/
|
|
38
41
|
get IFluidDataStoreRegistry(): IFluidDataStoreRegistry;
|
|
39
42
|
private readonly registry;
|
|
40
43
|
private readonly registryEntries;
|
|
@@ -42,22 +45,7 @@ export declare class BaseContainerRuntimeFactory extends RuntimeFactoryHelper im
|
|
|
42
45
|
private readonly runtimeOptions?;
|
|
43
46
|
private readonly requestHandlers;
|
|
44
47
|
private readonly provideEntryPoint;
|
|
45
|
-
|
|
46
|
-
* @param registryEntries - The data store registry for containers produced
|
|
47
|
-
* @param dependencyContainer - deprecated, will be removed in a future release
|
|
48
|
-
* @param requestHandlers - Request handlers for containers produced
|
|
49
|
-
* @param runtimeOptions - The runtime options passed to the ContainerRuntime when instantiating it
|
|
50
|
-
* @param provideEntryPoint - Function that will initialize the entryPoint of the ContainerRuntime instances
|
|
51
|
-
* created with this factory
|
|
52
|
-
*/
|
|
53
|
-
constructor(props: {
|
|
54
|
-
registryEntries: NamedFluidDataStoreRegistryEntries;
|
|
55
|
-
dependencyContainer?: IFluidDependencySynthesizer;
|
|
56
|
-
/** @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 */
|
|
57
|
-
requestHandlers?: RuntimeRequestHandler[];
|
|
58
|
-
runtimeOptions?: IContainerRuntimeOptions;
|
|
59
|
-
provideEntryPoint: (runtime: IContainerRuntime) => Promise<FluidObject>;
|
|
60
|
-
});
|
|
48
|
+
constructor(props: BaseContainerRuntimeFactoryProps);
|
|
61
49
|
instantiateFirstTime(runtime: ContainerRuntime): Promise<void>;
|
|
62
50
|
instantiateFromExisting(runtime: ContainerRuntime): Promise<void>;
|
|
63
51
|
preInitialize(context: IContainerContext, existing: boolean): Promise<ContainerRuntime>;
|
|
@@ -75,6 +63,35 @@ export declare class BaseContainerRuntimeFactory extends RuntimeFactoryHelper im
|
|
|
75
63
|
protected containerHasInitialized(runtime: IContainerRuntime): Promise<void>;
|
|
76
64
|
}
|
|
77
65
|
|
|
66
|
+
/**
|
|
67
|
+
* {@link BaseContainerRuntimeFactory} construction properties.
|
|
68
|
+
* @alpha
|
|
69
|
+
*/
|
|
70
|
+
export declare interface BaseContainerRuntimeFactoryProps {
|
|
71
|
+
/**
|
|
72
|
+
* The data store registry for containers produced.
|
|
73
|
+
*/
|
|
74
|
+
registryEntries: NamedFluidDataStoreRegistryEntries;
|
|
75
|
+
/**
|
|
76
|
+
* @deprecated Will be removed in a future release.
|
|
77
|
+
*/
|
|
78
|
+
dependencyContainer?: IFluidDependencySynthesizer;
|
|
79
|
+
/**
|
|
80
|
+
* Request handlers for containers produced.
|
|
81
|
+
* @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
|
|
82
|
+
*/
|
|
83
|
+
requestHandlers?: RuntimeRequestHandler[];
|
|
84
|
+
/**
|
|
85
|
+
* The runtime options passed to the ContainerRuntime when instantiating it
|
|
86
|
+
*/
|
|
87
|
+
runtimeOptions?: IContainerRuntimeOptions;
|
|
88
|
+
/**
|
|
89
|
+
* Function that will initialize the entryPoint of the ContainerRuntime instances
|
|
90
|
+
* created with this factory
|
|
91
|
+
*/
|
|
92
|
+
provideEntryPoint: (runtime: IContainerRuntime) => Promise<FluidObject>;
|
|
93
|
+
}
|
|
94
|
+
|
|
78
95
|
/**
|
|
79
96
|
* A ContainerRuntimeFactory that initializes Containers with a single default data store, which can be requested from
|
|
80
97
|
* the container with an empty URL.
|
|
@@ -85,30 +102,43 @@ export declare class BaseContainerRuntimeFactory extends RuntimeFactoryHelper im
|
|
|
85
102
|
export declare class ContainerRuntimeFactoryWithDefaultDataStore extends BaseContainerRuntimeFactory {
|
|
86
103
|
static readonly defaultDataStoreId = "default";
|
|
87
104
|
protected readonly defaultFactory: IFluidDataStoreFactory;
|
|
88
|
-
|
|
89
|
-
* Constructor
|
|
90
|
-
* @param defaultFactory -
|
|
91
|
-
* @param registryEntries -
|
|
92
|
-
* @param dependencyContainer - deprecated, will be removed in a future release
|
|
93
|
-
* @param requestHandlers -
|
|
94
|
-
* @param runtimeOptions -
|
|
95
|
-
* @param provideEntryPoint -
|
|
96
|
-
*/
|
|
97
|
-
constructor(props: {
|
|
98
|
-
defaultFactory: IFluidDataStoreFactory;
|
|
99
|
-
registryEntries: NamedFluidDataStoreRegistryEntries;
|
|
100
|
-
dependencyContainer?: IFluidDependencySynthesizer;
|
|
101
|
-
/** @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 */
|
|
102
|
-
requestHandlers?: RuntimeRequestHandler[];
|
|
103
|
-
runtimeOptions?: IContainerRuntimeOptions;
|
|
104
|
-
provideEntryPoint?: (runtime: IContainerRuntime) => Promise<FluidObject>;
|
|
105
|
-
});
|
|
105
|
+
constructor(props: ContainerRuntimeFactoryWithDefaultDataStoreProps);
|
|
106
106
|
/**
|
|
107
107
|
* {@inheritDoc BaseContainerRuntimeFactory.containerInitializingFirstTime}
|
|
108
108
|
*/
|
|
109
109
|
protected containerInitializingFirstTime(runtime: IContainerRuntime): Promise<void>;
|
|
110
110
|
}
|
|
111
111
|
|
|
112
|
+
/**
|
|
113
|
+
* {@link ContainerRuntimeFactoryWithDefaultDataStore} construction properties.
|
|
114
|
+
* @alpha
|
|
115
|
+
*/
|
|
116
|
+
export declare interface ContainerRuntimeFactoryWithDefaultDataStoreProps {
|
|
117
|
+
defaultFactory: IFluidDataStoreFactory;
|
|
118
|
+
/**
|
|
119
|
+
* The data store registry for containers produced.
|
|
120
|
+
*/
|
|
121
|
+
registryEntries: NamedFluidDataStoreRegistryEntries;
|
|
122
|
+
/**
|
|
123
|
+
* @deprecated Will be removed in a future release.
|
|
124
|
+
*/
|
|
125
|
+
dependencyContainer?: IFluidDependencySynthesizer;
|
|
126
|
+
/**
|
|
127
|
+
* Request handlers for containers produced.
|
|
128
|
+
* @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
|
|
129
|
+
*/
|
|
130
|
+
requestHandlers?: RuntimeRequestHandler[];
|
|
131
|
+
/**
|
|
132
|
+
* The runtime options passed to the ContainerRuntime when instantiating it
|
|
133
|
+
*/
|
|
134
|
+
runtimeOptions?: IContainerRuntimeOptions;
|
|
135
|
+
/**
|
|
136
|
+
* Function that will initialize the entryPoint of the ContainerRuntime instances
|
|
137
|
+
* created with this factory
|
|
138
|
+
*/
|
|
139
|
+
provideEntryPoint?: (runtime: IContainerRuntime) => Promise<FluidObject>;
|
|
140
|
+
}
|
|
141
|
+
|
|
112
142
|
/**
|
|
113
143
|
* DataObject is a base data store that is primed with a root directory. It
|
|
114
144
|
* ensures that it is created and ready before you can access it.
|
|
@@ -159,15 +189,15 @@ export declare class DataObjectFactory<TObj extends DataObject<I>, I extends Dat
|
|
|
159
189
|
*/
|
|
160
190
|
export declare interface DataObjectTypes {
|
|
161
191
|
/**
|
|
162
|
-
*
|
|
192
|
+
* Represents a type that will define optional providers that will be injected.
|
|
163
193
|
*/
|
|
164
194
|
OptionalProviders?: FluidObject;
|
|
165
195
|
/**
|
|
166
|
-
*
|
|
196
|
+
* The initial state type that the produced data object may take during creation.
|
|
167
197
|
*/
|
|
168
198
|
InitialState?: any;
|
|
169
199
|
/**
|
|
170
|
-
*
|
|
200
|
+
* Represents events that will be available in the EventForwarder.
|
|
171
201
|
*/
|
|
172
202
|
Events?: IEvent;
|
|
173
203
|
}
|
|
@@ -210,13 +240,19 @@ export declare abstract class PureDataObject<I extends DataObjectTypes = DataObj
|
|
|
210
240
|
protected initProps?: I["InitialState"];
|
|
211
241
|
protected initializeP: Promise<void> | undefined;
|
|
212
242
|
get id(): string;
|
|
243
|
+
/**
|
|
244
|
+
* {@inheritDoc @fluidframework/core-interfaces#IProvideFluidLoadable.IFluidLoadable}
|
|
245
|
+
*/
|
|
213
246
|
get IFluidLoadable(): this;
|
|
247
|
+
/**
|
|
248
|
+
* {@inheritDoc @fluidframework/core-interfaces#IProvideFluidHandle.IFluidHandle}
|
|
249
|
+
*/
|
|
214
250
|
get IFluidHandle(): IFluidHandle<this>;
|
|
215
251
|
/**
|
|
216
252
|
* Handle to a data store
|
|
217
253
|
*/
|
|
218
254
|
get handle(): IFluidHandle<this>;
|
|
219
|
-
static getDataObject(runtime: IFluidDataStoreRuntime): Promise<PureDataObject
|
|
255
|
+
static getDataObject(runtime: IFluidDataStoreRuntime): Promise<PureDataObject>;
|
|
220
256
|
constructor(props: IDataObjectProps<I>);
|
|
221
257
|
/**
|
|
222
258
|
* Return this object if someone requests it directly
|
|
@@ -283,7 +319,13 @@ export declare class PureDataObjectFactory<TObj extends PureDataObject<I>, I ext
|
|
|
283
319
|
private readonly sharedObjectRegistry;
|
|
284
320
|
private readonly registry;
|
|
285
321
|
constructor(type: string, ctor: new (props: IDataObjectProps<I>) => TObj, sharedObjects: readonly IChannelFactory[], optionalProviders: FluidObjectSymbolProvider<I["OptionalProviders"]>, registryEntries?: NamedFluidDataStoreRegistryEntries, runtimeClass?: typeof FluidDataStoreRuntime);
|
|
322
|
+
/**
|
|
323
|
+
* {@inheritDoc @fluidframework/runtime-definitions#IProvideFluidDataStoreFactory.IFluidDataStoreFactory}
|
|
324
|
+
*/
|
|
286
325
|
get IFluidDataStoreFactory(): this;
|
|
326
|
+
/**
|
|
327
|
+
* {@inheritDoc @fluidframework/runtime-definitions#IProvideFluidDataStoreRegistry.IFluidDataStoreRegistry}
|
|
328
|
+
*/
|
|
287
329
|
get IFluidDataStoreRegistry(): IFluidDataStoreRegistry | undefined;
|
|
288
330
|
/**
|
|
289
331
|
* Convenience helper to get the data store's/factory's data store registry entry.
|
package/lib/aqueduct-beta.d.mts
CHANGED
|
@@ -32,10 +32,14 @@ import { TypedEventEmitter } from '@fluid-internal/client-utils';
|
|
|
32
32
|
|
|
33
33
|
/* Excluded from this release type: BaseContainerRuntimeFactory */
|
|
34
34
|
|
|
35
|
+
/* Excluded from this release type: BaseContainerRuntimeFactoryProps */
|
|
36
|
+
|
|
35
37
|
/* Excluded from this release type: ContainerRuntime */
|
|
36
38
|
|
|
37
39
|
/* Excluded from this release type: ContainerRuntimeFactoryWithDefaultDataStore */
|
|
38
40
|
|
|
41
|
+
/* Excluded from this release type: ContainerRuntimeFactoryWithDefaultDataStoreProps */
|
|
42
|
+
|
|
39
43
|
/* Excluded from this release type: DataObject */
|
|
40
44
|
|
|
41
45
|
/* Excluded from this release type: DataObjectFactory */
|
|
@@ -32,10 +32,14 @@ import { TypedEventEmitter } from '@fluid-internal/client-utils';
|
|
|
32
32
|
|
|
33
33
|
/* Excluded from this release type: BaseContainerRuntimeFactory */
|
|
34
34
|
|
|
35
|
+
/* Excluded from this release type: BaseContainerRuntimeFactoryProps */
|
|
36
|
+
|
|
35
37
|
/* Excluded from this release type: ContainerRuntime */
|
|
36
38
|
|
|
37
39
|
/* Excluded from this release type: ContainerRuntimeFactoryWithDefaultDataStore */
|
|
38
40
|
|
|
41
|
+
/* Excluded from this release type: ContainerRuntimeFactoryWithDefaultDataStoreProps */
|
|
42
|
+
|
|
39
43
|
/* Excluded from this release type: DataObject */
|
|
40
44
|
|
|
41
45
|
/* Excluded from this release type: DataObjectFactory */
|
|
@@ -35,6 +35,9 @@ import { TypedEventEmitter } from '@fluid-internal/client-utils';
|
|
|
35
35
|
* @alpha
|
|
36
36
|
*/
|
|
37
37
|
export declare class BaseContainerRuntimeFactory extends RuntimeFactoryHelper implements IProvideFluidDataStoreRegistry {
|
|
38
|
+
/**
|
|
39
|
+
* {@inheritDoc @fluidframework/runtime-definitions#IProvideFluidDataStoreRegistry.IFluidDataStoreRegistry}
|
|
40
|
+
*/
|
|
38
41
|
get IFluidDataStoreRegistry(): IFluidDataStoreRegistry;
|
|
39
42
|
private readonly registry;
|
|
40
43
|
private readonly registryEntries;
|
|
@@ -42,22 +45,7 @@ export declare class BaseContainerRuntimeFactory extends RuntimeFactoryHelper im
|
|
|
42
45
|
private readonly runtimeOptions?;
|
|
43
46
|
private readonly requestHandlers;
|
|
44
47
|
private readonly provideEntryPoint;
|
|
45
|
-
|
|
46
|
-
* @param registryEntries - The data store registry for containers produced
|
|
47
|
-
* @param dependencyContainer - deprecated, will be removed in a future release
|
|
48
|
-
* @param requestHandlers - Request handlers for containers produced
|
|
49
|
-
* @param runtimeOptions - The runtime options passed to the ContainerRuntime when instantiating it
|
|
50
|
-
* @param provideEntryPoint - Function that will initialize the entryPoint of the ContainerRuntime instances
|
|
51
|
-
* created with this factory
|
|
52
|
-
*/
|
|
53
|
-
constructor(props: {
|
|
54
|
-
registryEntries: NamedFluidDataStoreRegistryEntries;
|
|
55
|
-
dependencyContainer?: IFluidDependencySynthesizer;
|
|
56
|
-
/** @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 */
|
|
57
|
-
requestHandlers?: RuntimeRequestHandler[];
|
|
58
|
-
runtimeOptions?: IContainerRuntimeOptions;
|
|
59
|
-
provideEntryPoint: (runtime: IContainerRuntime) => Promise<FluidObject>;
|
|
60
|
-
});
|
|
48
|
+
constructor(props: BaseContainerRuntimeFactoryProps);
|
|
61
49
|
instantiateFirstTime(runtime: ContainerRuntime): Promise<void>;
|
|
62
50
|
instantiateFromExisting(runtime: ContainerRuntime): Promise<void>;
|
|
63
51
|
preInitialize(context: IContainerContext, existing: boolean): Promise<ContainerRuntime>;
|
|
@@ -75,6 +63,35 @@ export declare class BaseContainerRuntimeFactory extends RuntimeFactoryHelper im
|
|
|
75
63
|
protected containerHasInitialized(runtime: IContainerRuntime): Promise<void>;
|
|
76
64
|
}
|
|
77
65
|
|
|
66
|
+
/**
|
|
67
|
+
* {@link BaseContainerRuntimeFactory} construction properties.
|
|
68
|
+
* @alpha
|
|
69
|
+
*/
|
|
70
|
+
export declare interface BaseContainerRuntimeFactoryProps {
|
|
71
|
+
/**
|
|
72
|
+
* The data store registry for containers produced.
|
|
73
|
+
*/
|
|
74
|
+
registryEntries: NamedFluidDataStoreRegistryEntries;
|
|
75
|
+
/**
|
|
76
|
+
* @deprecated Will be removed in a future release.
|
|
77
|
+
*/
|
|
78
|
+
dependencyContainer?: IFluidDependencySynthesizer;
|
|
79
|
+
/**
|
|
80
|
+
* Request handlers for containers produced.
|
|
81
|
+
* @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
|
|
82
|
+
*/
|
|
83
|
+
requestHandlers?: RuntimeRequestHandler[];
|
|
84
|
+
/**
|
|
85
|
+
* The runtime options passed to the ContainerRuntime when instantiating it
|
|
86
|
+
*/
|
|
87
|
+
runtimeOptions?: IContainerRuntimeOptions;
|
|
88
|
+
/**
|
|
89
|
+
* Function that will initialize the entryPoint of the ContainerRuntime instances
|
|
90
|
+
* created with this factory
|
|
91
|
+
*/
|
|
92
|
+
provideEntryPoint: (runtime: IContainerRuntime) => Promise<FluidObject>;
|
|
93
|
+
}
|
|
94
|
+
|
|
78
95
|
/**
|
|
79
96
|
* A ContainerRuntimeFactory that initializes Containers with a single default data store, which can be requested from
|
|
80
97
|
* the container with an empty URL.
|
|
@@ -85,30 +102,43 @@ export declare class BaseContainerRuntimeFactory extends RuntimeFactoryHelper im
|
|
|
85
102
|
export declare class ContainerRuntimeFactoryWithDefaultDataStore extends BaseContainerRuntimeFactory {
|
|
86
103
|
static readonly defaultDataStoreId = "default";
|
|
87
104
|
protected readonly defaultFactory: IFluidDataStoreFactory;
|
|
88
|
-
|
|
89
|
-
* Constructor
|
|
90
|
-
* @param defaultFactory -
|
|
91
|
-
* @param registryEntries -
|
|
92
|
-
* @param dependencyContainer - deprecated, will be removed in a future release
|
|
93
|
-
* @param requestHandlers -
|
|
94
|
-
* @param runtimeOptions -
|
|
95
|
-
* @param provideEntryPoint -
|
|
96
|
-
*/
|
|
97
|
-
constructor(props: {
|
|
98
|
-
defaultFactory: IFluidDataStoreFactory;
|
|
99
|
-
registryEntries: NamedFluidDataStoreRegistryEntries;
|
|
100
|
-
dependencyContainer?: IFluidDependencySynthesizer;
|
|
101
|
-
/** @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 */
|
|
102
|
-
requestHandlers?: RuntimeRequestHandler[];
|
|
103
|
-
runtimeOptions?: IContainerRuntimeOptions;
|
|
104
|
-
provideEntryPoint?: (runtime: IContainerRuntime) => Promise<FluidObject>;
|
|
105
|
-
});
|
|
105
|
+
constructor(props: ContainerRuntimeFactoryWithDefaultDataStoreProps);
|
|
106
106
|
/**
|
|
107
107
|
* {@inheritDoc BaseContainerRuntimeFactory.containerInitializingFirstTime}
|
|
108
108
|
*/
|
|
109
109
|
protected containerInitializingFirstTime(runtime: IContainerRuntime): Promise<void>;
|
|
110
110
|
}
|
|
111
111
|
|
|
112
|
+
/**
|
|
113
|
+
* {@link ContainerRuntimeFactoryWithDefaultDataStore} construction properties.
|
|
114
|
+
* @alpha
|
|
115
|
+
*/
|
|
116
|
+
export declare interface ContainerRuntimeFactoryWithDefaultDataStoreProps {
|
|
117
|
+
defaultFactory: IFluidDataStoreFactory;
|
|
118
|
+
/**
|
|
119
|
+
* The data store registry for containers produced.
|
|
120
|
+
*/
|
|
121
|
+
registryEntries: NamedFluidDataStoreRegistryEntries;
|
|
122
|
+
/**
|
|
123
|
+
* @deprecated Will be removed in a future release.
|
|
124
|
+
*/
|
|
125
|
+
dependencyContainer?: IFluidDependencySynthesizer;
|
|
126
|
+
/**
|
|
127
|
+
* Request handlers for containers produced.
|
|
128
|
+
* @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
|
|
129
|
+
*/
|
|
130
|
+
requestHandlers?: RuntimeRequestHandler[];
|
|
131
|
+
/**
|
|
132
|
+
* The runtime options passed to the ContainerRuntime when instantiating it
|
|
133
|
+
*/
|
|
134
|
+
runtimeOptions?: IContainerRuntimeOptions;
|
|
135
|
+
/**
|
|
136
|
+
* Function that will initialize the entryPoint of the ContainerRuntime instances
|
|
137
|
+
* created with this factory
|
|
138
|
+
*/
|
|
139
|
+
provideEntryPoint?: (runtime: IContainerRuntime) => Promise<FluidObject>;
|
|
140
|
+
}
|
|
141
|
+
|
|
112
142
|
/**
|
|
113
143
|
* DataObject is a base data store that is primed with a root directory. It
|
|
114
144
|
* ensures that it is created and ready before you can access it.
|
|
@@ -159,15 +189,15 @@ export declare class DataObjectFactory<TObj extends DataObject<I>, I extends Dat
|
|
|
159
189
|
*/
|
|
160
190
|
export declare interface DataObjectTypes {
|
|
161
191
|
/**
|
|
162
|
-
*
|
|
192
|
+
* Represents a type that will define optional providers that will be injected.
|
|
163
193
|
*/
|
|
164
194
|
OptionalProviders?: FluidObject;
|
|
165
195
|
/**
|
|
166
|
-
*
|
|
196
|
+
* The initial state type that the produced data object may take during creation.
|
|
167
197
|
*/
|
|
168
198
|
InitialState?: any;
|
|
169
199
|
/**
|
|
170
|
-
*
|
|
200
|
+
* Represents events that will be available in the EventForwarder.
|
|
171
201
|
*/
|
|
172
202
|
Events?: IEvent;
|
|
173
203
|
}
|
|
@@ -210,13 +240,19 @@ export declare abstract class PureDataObject<I extends DataObjectTypes = DataObj
|
|
|
210
240
|
protected initProps?: I["InitialState"];
|
|
211
241
|
protected initializeP: Promise<void> | undefined;
|
|
212
242
|
get id(): string;
|
|
243
|
+
/**
|
|
244
|
+
* {@inheritDoc @fluidframework/core-interfaces#IProvideFluidLoadable.IFluidLoadable}
|
|
245
|
+
*/
|
|
213
246
|
get IFluidLoadable(): this;
|
|
247
|
+
/**
|
|
248
|
+
* {@inheritDoc @fluidframework/core-interfaces#IProvideFluidHandle.IFluidHandle}
|
|
249
|
+
*/
|
|
214
250
|
get IFluidHandle(): IFluidHandle<this>;
|
|
215
251
|
/**
|
|
216
252
|
* Handle to a data store
|
|
217
253
|
*/
|
|
218
254
|
get handle(): IFluidHandle<this>;
|
|
219
|
-
static getDataObject(runtime: IFluidDataStoreRuntime): Promise<PureDataObject
|
|
255
|
+
static getDataObject(runtime: IFluidDataStoreRuntime): Promise<PureDataObject>;
|
|
220
256
|
constructor(props: IDataObjectProps<I>);
|
|
221
257
|
/**
|
|
222
258
|
* Return this object if someone requests it directly
|
|
@@ -283,7 +319,13 @@ export declare class PureDataObjectFactory<TObj extends PureDataObject<I>, I ext
|
|
|
283
319
|
private readonly sharedObjectRegistry;
|
|
284
320
|
private readonly registry;
|
|
285
321
|
constructor(type: string, ctor: new (props: IDataObjectProps<I>) => TObj, sharedObjects: readonly IChannelFactory[], optionalProviders: FluidObjectSymbolProvider<I["OptionalProviders"]>, registryEntries?: NamedFluidDataStoreRegistryEntries, runtimeClass?: typeof FluidDataStoreRuntime);
|
|
322
|
+
/**
|
|
323
|
+
* {@inheritDoc @fluidframework/runtime-definitions#IProvideFluidDataStoreFactory.IFluidDataStoreFactory}
|
|
324
|
+
*/
|
|
286
325
|
get IFluidDataStoreFactory(): this;
|
|
326
|
+
/**
|
|
327
|
+
* {@inheritDoc @fluidframework/runtime-definitions#IProvideFluidDataStoreRegistry.IFluidDataStoreRegistry}
|
|
328
|
+
*/
|
|
287
329
|
get IFluidDataStoreRegistry(): IFluidDataStoreRegistry | undefined;
|
|
288
330
|
/**
|
|
289
331
|
* Convenience helper to get the data store's/factory's data store registry entry.
|
|
@@ -2,14 +2,42 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
import { IContainerContext } from "@fluidframework/container-definitions";
|
|
6
|
-
import { IContainerRuntimeOptions, ContainerRuntime } from "@fluidframework/container-runtime";
|
|
7
|
-
import { IContainerRuntime } from "@fluidframework/container-runtime-definitions";
|
|
8
|
-
import { RuntimeRequestHandler } from "@fluidframework/request-handler";
|
|
9
|
-
import { IFluidDataStoreRegistry, IProvideFluidDataStoreRegistry, NamedFluidDataStoreRegistryEntries } from "@fluidframework/runtime-definitions";
|
|
10
|
-
import { IFluidDependencySynthesizer } from "@fluidframework/synthesize";
|
|
5
|
+
import { type IContainerContext } from "@fluidframework/container-definitions";
|
|
6
|
+
import { type IContainerRuntimeOptions, ContainerRuntime } from "@fluidframework/container-runtime";
|
|
7
|
+
import { type IContainerRuntime } from "@fluidframework/container-runtime-definitions";
|
|
8
|
+
import { type RuntimeRequestHandler } from "@fluidframework/request-handler";
|
|
9
|
+
import { type IFluidDataStoreRegistry, type IProvideFluidDataStoreRegistry, type NamedFluidDataStoreRegistryEntries } from "@fluidframework/runtime-definitions";
|
|
10
|
+
import { type IFluidDependencySynthesizer } from "@fluidframework/synthesize";
|
|
11
11
|
import { RuntimeFactoryHelper } from "@fluidframework/runtime-utils";
|
|
12
|
-
import { FluidObject } from "@fluidframework/core-interfaces";
|
|
12
|
+
import { type FluidObject } from "@fluidframework/core-interfaces";
|
|
13
|
+
/**
|
|
14
|
+
* {@link BaseContainerRuntimeFactory} construction properties.
|
|
15
|
+
* @alpha
|
|
16
|
+
*/
|
|
17
|
+
export interface BaseContainerRuntimeFactoryProps {
|
|
18
|
+
/**
|
|
19
|
+
* The data store registry for containers produced.
|
|
20
|
+
*/
|
|
21
|
+
registryEntries: NamedFluidDataStoreRegistryEntries;
|
|
22
|
+
/**
|
|
23
|
+
* @deprecated Will be removed in a future release.
|
|
24
|
+
*/
|
|
25
|
+
dependencyContainer?: IFluidDependencySynthesizer;
|
|
26
|
+
/**
|
|
27
|
+
* Request handlers for containers produced.
|
|
28
|
+
* @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
|
|
29
|
+
*/
|
|
30
|
+
requestHandlers?: RuntimeRequestHandler[];
|
|
31
|
+
/**
|
|
32
|
+
* The runtime options passed to the ContainerRuntime when instantiating it
|
|
33
|
+
*/
|
|
34
|
+
runtimeOptions?: IContainerRuntimeOptions;
|
|
35
|
+
/**
|
|
36
|
+
* Function that will initialize the entryPoint of the ContainerRuntime instances
|
|
37
|
+
* created with this factory
|
|
38
|
+
*/
|
|
39
|
+
provideEntryPoint: (runtime: IContainerRuntime) => Promise<FluidObject>;
|
|
40
|
+
}
|
|
13
41
|
/**
|
|
14
42
|
* BaseContainerRuntimeFactory produces container runtimes with the specified data store and service registries,
|
|
15
43
|
* request handlers, runtimeOptions, and entryPoint initialization function.
|
|
@@ -17,6 +45,9 @@ import { FluidObject } from "@fluidframework/core-interfaces";
|
|
|
17
45
|
* @alpha
|
|
18
46
|
*/
|
|
19
47
|
export declare class BaseContainerRuntimeFactory extends RuntimeFactoryHelper implements IProvideFluidDataStoreRegistry {
|
|
48
|
+
/**
|
|
49
|
+
* {@inheritDoc @fluidframework/runtime-definitions#IProvideFluidDataStoreRegistry.IFluidDataStoreRegistry}
|
|
50
|
+
*/
|
|
20
51
|
get IFluidDataStoreRegistry(): IFluidDataStoreRegistry;
|
|
21
52
|
private readonly registry;
|
|
22
53
|
private readonly registryEntries;
|
|
@@ -24,22 +55,7 @@ export declare class BaseContainerRuntimeFactory extends RuntimeFactoryHelper im
|
|
|
24
55
|
private readonly runtimeOptions?;
|
|
25
56
|
private readonly requestHandlers;
|
|
26
57
|
private readonly provideEntryPoint;
|
|
27
|
-
|
|
28
|
-
* @param registryEntries - The data store registry for containers produced
|
|
29
|
-
* @param dependencyContainer - deprecated, will be removed in a future release
|
|
30
|
-
* @param requestHandlers - Request handlers for containers produced
|
|
31
|
-
* @param runtimeOptions - The runtime options passed to the ContainerRuntime when instantiating it
|
|
32
|
-
* @param provideEntryPoint - Function that will initialize the entryPoint of the ContainerRuntime instances
|
|
33
|
-
* created with this factory
|
|
34
|
-
*/
|
|
35
|
-
constructor(props: {
|
|
36
|
-
registryEntries: NamedFluidDataStoreRegistryEntries;
|
|
37
|
-
dependencyContainer?: IFluidDependencySynthesizer;
|
|
38
|
-
/** @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 */
|
|
39
|
-
requestHandlers?: RuntimeRequestHandler[];
|
|
40
|
-
runtimeOptions?: IContainerRuntimeOptions;
|
|
41
|
-
provideEntryPoint: (runtime: IContainerRuntime) => Promise<FluidObject>;
|
|
42
|
-
});
|
|
58
|
+
constructor(props: BaseContainerRuntimeFactoryProps);
|
|
43
59
|
instantiateFirstTime(runtime: ContainerRuntime): Promise<void>;
|
|
44
60
|
instantiateFromExisting(runtime: ContainerRuntime): Promise<void>;
|
|
45
61
|
preInitialize(context: IContainerContext, existing: boolean): Promise<ContainerRuntime>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"baseContainerRuntimeFactory.d.mts","sourceRoot":"","sources":["../../src/container-runtime-factories/baseContainerRuntimeFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;OAEI,EAAE,iBAAiB,EAAE,MAAM,uCAAuC;
|
|
1
|
+
{"version":3,"file":"baseContainerRuntimeFactory.d.mts","sourceRoot":"","sources":["../../src/container-runtime-factories/baseContainerRuntimeFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;OAEI,EAAE,KAAK,iBAAiB,EAAE,MAAM,uCAAuC;OACvE,EACN,KAAK,wBAAwB,EAE7B,gBAAgB,EAChB,MAAM,mCAAmC;OACnC,EAAE,KAAK,iBAAiB,EAAE,MAAM,+CAA+C;OAE/E,EACN,KAAK,qBAAqB,EAE1B,MAAM,iCAAiC;OACjC,EACN,KAAK,uBAAuB,EAC5B,KAAK,8BAA8B,EACnC,KAAK,kCAAkC,EACvC,MAAM,qCAAqC;OACrC,EAEN,KAAK,2BAA2B,EAEhC,MAAM,4BAA4B;OAC5B,EAAE,oBAAoB,EAAE,MAAM,+BAA+B;OAC7D,EAAE,KAAK,WAAW,EAAE,MAAM,iCAAiC;AAElE;;;GAGG;AACH,MAAM,WAAW,gCAAgC;IAChD;;OAEG;IACH,eAAe,EAAE,kCAAkC,CAAC;IACpD;;OAEG;IACH,mBAAmB,CAAC,EAAE,2BAA2B,CAAC;IAClD;;;OAGG;IACH,eAAe,CAAC,EAAE,qBAAqB,EAAE,CAAC;IAC1C;;OAEG;IACH,cAAc,CAAC,EAAE,wBAAwB,CAAC;IAC1C;;;OAGG;IACH,iBAAiB,EAAE,CAAC,OAAO,EAAE,iBAAiB,KAAK,OAAO,CAAC,WAAW,CAAC,CAAC;CACxE;AAED;;;;;GAKG;AACH,qBAAa,2BACZ,SAAQ,oBACR,YAAW,8BAA8B;IAEzC;;OAEG;IACH,IAAW,uBAAuB,IAAI,uBAAuB,CAE5D;IACD,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAA0B;IAEnD,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAqC;IACrE,OAAO,CAAC,QAAQ,CAAC,mBAAmB,CAAC,CAA8B;IACnE,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAC,CAA2B;IAC3D,OAAO,CAAC,QAAQ,CAAC,eAAe,CAA0B;IAC1D,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAuD;gBAEtE,KAAK,EAAE,gCAAgC;IAW7C,oBAAoB,CAAC,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC;IAK9D,uBAAuB,CAAC,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC;IAIjE,aAAa,CACzB,OAAO,EAAE,iBAAiB,EAC1B,QAAQ,EAAE,OAAO,GACf,OAAO,CAAC,gBAAgB,CAAC;IAsB5B;;;;OAIG;cACa,8BAA8B,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC;IAEzF;;;;OAIG;cACa,uBAAuB,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC;CAClF"}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
import { FluidDataStoreRegistry, ContainerRuntime, } from "@fluidframework/container-runtime";
|
|
6
|
-
import { buildRuntimeRequestHandler } from "@fluidframework/request-handler";
|
|
6
|
+
import { buildRuntimeRequestHandler, } from "@fluidframework/request-handler";
|
|
7
7
|
import { DependencyContainer, } from "@fluidframework/synthesize";
|
|
8
8
|
import { RuntimeFactoryHelper } from "@fluidframework/runtime-utils";
|
|
9
9
|
/**
|
|
@@ -13,17 +13,12 @@ import { RuntimeFactoryHelper } from "@fluidframework/runtime-utils";
|
|
|
13
13
|
* @alpha
|
|
14
14
|
*/
|
|
15
15
|
export class BaseContainerRuntimeFactory extends RuntimeFactoryHelper {
|
|
16
|
+
/**
|
|
17
|
+
* {@inheritDoc @fluidframework/runtime-definitions#IProvideFluidDataStoreRegistry.IFluidDataStoreRegistry}
|
|
18
|
+
*/
|
|
16
19
|
get IFluidDataStoreRegistry() {
|
|
17
20
|
return this.registry;
|
|
18
21
|
}
|
|
19
|
-
/**
|
|
20
|
-
* @param registryEntries - The data store registry for containers produced
|
|
21
|
-
* @param dependencyContainer - deprecated, will be removed in a future release
|
|
22
|
-
* @param requestHandlers - Request handlers for containers produced
|
|
23
|
-
* @param runtimeOptions - The runtime options passed to the ContainerRuntime when instantiating it
|
|
24
|
-
* @param provideEntryPoint - Function that will initialize the entryPoint of the ContainerRuntime instances
|
|
25
|
-
* created with this factory
|
|
26
|
-
*/
|
|
27
22
|
constructor(props) {
|
|
28
23
|
super();
|
|
29
24
|
this.registryEntries = props.registryEntries;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"baseContainerRuntimeFactory.mjs","sourceRoot":"","sources":["../../src/container-runtime-factories/baseContainerRuntimeFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;OAGI,EAEN,sBAAsB,EACtB,gBAAgB,GAChB,MAAM,mCAAmC;OAGnC,
|
|
1
|
+
{"version":3,"file":"baseContainerRuntimeFactory.mjs","sourceRoot":"","sources":["../../src/container-runtime-factories/baseContainerRuntimeFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;OAGI,EAEN,sBAAsB,EACtB,gBAAgB,GAChB,MAAM,mCAAmC;OAGnC,EAEN,0BAA0B,GAC1B,MAAM,iCAAiC;OAMjC,EACN,mBAAmB,GAGnB,MAAM,4BAA4B;OAC5B,EAAE,oBAAoB,EAAE,MAAM,+BAA+B;AAgCpE;;;;;GAKG;AACH,MAAM,OAAO,2BACZ,SAAQ,oBAAoB;IAG5B;;OAEG;IACH,IAAW,uBAAuB;QACjC,OAAO,IAAI,CAAC,QAAQ,CAAC;IACtB,CAAC;IASD,YAAmB,KAAuC;QACzD,KAAK,EAAE,CAAC;QAER,IAAI,CAAC,eAAe,GAAG,KAAK,CAAC,eAAe,CAAC;QAC7C,IAAI,CAAC,mBAAmB,GAAG,KAAK,CAAC,mBAAmB,CAAC;QACrD,IAAI,CAAC,cAAc,GAAG,KAAK,CAAC,cAAc,CAAC;QAC3C,IAAI,CAAC,iBAAiB,GAAG,KAAK,CAAC,iBAAiB,CAAC;QACjD,IAAI,CAAC,eAAe,GAAG,KAAK,CAAC,eAAe,IAAI,EAAE,CAAC;QACnD,IAAI,CAAC,QAAQ,GAAG,IAAI,sBAAsB,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;IAClE,CAAC;IAEM,KAAK,CAAC,oBAAoB,CAAC,OAAyB;QAC1D,MAAM,IAAI,CAAC,8BAA8B,CAAC,OAAO,CAAC,CAAC;QACnD,MAAM,IAAI,CAAC,uBAAuB,CAAC,OAAO,CAAC,CAAC;IAC7C,CAAC;IAEM,KAAK,CAAC,uBAAuB,CAAC,OAAyB;QAC7D,MAAM,IAAI,CAAC,uBAAuB,CAAC,OAAO,CAAC,CAAC;IAC7C,CAAC;IAEM,KAAK,CAAC,aAAa,CACzB,OAA0B,EAC1B,QAAiB;QAEjB,MAAM,KAAK,GAAgD,OAAO,CAAC,KAAK,CAAC;QACzE,IAAI,IAAI,CAAC,mBAAmB,EAAE;YAC7B,MAAM,EAAE,GAAG,IAAI,mBAAmB,CACjC,IAAI,CAAC,mBAAmB,EACxB,KAAK,CAAC,2BAA2B,CACjC,CAAC;YACF,KAAK,CAAC,2BAA2B,GAAG,EAAE,CAAC;SACvC;QAED,OAAO,gBAAgB,CAAC,WAAW,CAAC;YACnC,OAAO;YACP,QAAQ;YACR,cAAc,EAAE,IAAI,CAAC,cAAc;YACnC,eAAe,EAAE,IAAI,CAAC,eAAe;YACrC,cAAc,EAAE,KAAK;YACrB,gDAAgD;YAChD,cAAc,EAAE,0BAA0B,CAAC,GAAG,IAAI,CAAC,eAAe,CAAC;YACnE,iBAAiB,EAAE,IAAI,CAAC,iBAAiB;SACzC,CAAC,CAAC;IACJ,CAAC;IAED;;;;OAIG;IACO,KAAK,CAAC,8BAA8B,CAAC,OAA0B,IAAkB,CAAC;IAE5F;;;;OAIG;IACO,KAAK,CAAC,uBAAuB,CAAC,OAA0B,IAAkB,CAAC;CACrF","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { type IContainerContext } from \"@fluidframework/container-definitions\";\nimport {\n\ttype IContainerRuntimeOptions,\n\tFluidDataStoreRegistry,\n\tContainerRuntime,\n} from \"@fluidframework/container-runtime\";\nimport { type IContainerRuntime } from \"@fluidframework/container-runtime-definitions\";\n// eslint-disable-next-line import/no-deprecated\nimport {\n\ttype RuntimeRequestHandler,\n\tbuildRuntimeRequestHandler,\n} from \"@fluidframework/request-handler\";\nimport {\n\ttype IFluidDataStoreRegistry,\n\ttype IProvideFluidDataStoreRegistry,\n\ttype NamedFluidDataStoreRegistryEntries,\n} from \"@fluidframework/runtime-definitions\";\nimport {\n\tDependencyContainer,\n\ttype IFluidDependencySynthesizer,\n\ttype IProvideFluidDependencySynthesizer,\n} from \"@fluidframework/synthesize\";\nimport { RuntimeFactoryHelper } from \"@fluidframework/runtime-utils\";\nimport { type FluidObject } from \"@fluidframework/core-interfaces\";\n\n/**\n * {@link BaseContainerRuntimeFactory} construction properties.\n * @alpha\n */\nexport interface BaseContainerRuntimeFactoryProps {\n\t/**\n\t * The data store registry for containers produced.\n\t */\n\tregistryEntries: NamedFluidDataStoreRegistryEntries;\n\t/**\n\t * @deprecated Will be removed in a future release.\n\t */\n\tdependencyContainer?: IFluidDependencySynthesizer;\n\t/**\n\t * Request handlers for containers produced.\n\t * @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\n\t */\n\trequestHandlers?: RuntimeRequestHandler[];\n\t/**\n\t * The runtime options passed to the ContainerRuntime when instantiating it\n\t */\n\truntimeOptions?: IContainerRuntimeOptions;\n\t/**\n\t * Function that will initialize the entryPoint of the ContainerRuntime instances\n\t * created with this factory\n\t */\n\tprovideEntryPoint: (runtime: IContainerRuntime) => Promise<FluidObject>;\n}\n\n/**\n * BaseContainerRuntimeFactory produces container runtimes with the specified data store and service registries,\n * request handlers, runtimeOptions, and entryPoint initialization function.\n * It can be subclassed to implement a first-time initialization procedure for the containers it creates.\n * @alpha\n */\nexport class BaseContainerRuntimeFactory\n\textends RuntimeFactoryHelper\n\timplements IProvideFluidDataStoreRegistry\n{\n\t/**\n\t * {@inheritDoc @fluidframework/runtime-definitions#IProvideFluidDataStoreRegistry.IFluidDataStoreRegistry}\n\t */\n\tpublic get IFluidDataStoreRegistry(): IFluidDataStoreRegistry {\n\t\treturn this.registry;\n\t}\n\tprivate readonly registry: IFluidDataStoreRegistry;\n\n\tprivate readonly registryEntries: NamedFluidDataStoreRegistryEntries;\n\tprivate readonly dependencyContainer?: IFluidDependencySynthesizer;\n\tprivate readonly runtimeOptions?: IContainerRuntimeOptions;\n\tprivate readonly requestHandlers: RuntimeRequestHandler[];\n\tprivate readonly provideEntryPoint: (runtime: IContainerRuntime) => Promise<FluidObject>;\n\n\tpublic constructor(props: BaseContainerRuntimeFactoryProps) {\n\t\tsuper();\n\n\t\tthis.registryEntries = props.registryEntries;\n\t\tthis.dependencyContainer = props.dependencyContainer;\n\t\tthis.runtimeOptions = props.runtimeOptions;\n\t\tthis.provideEntryPoint = props.provideEntryPoint;\n\t\tthis.requestHandlers = props.requestHandlers ?? [];\n\t\tthis.registry = new FluidDataStoreRegistry(this.registryEntries);\n\t}\n\n\tpublic async instantiateFirstTime(runtime: ContainerRuntime): Promise<void> {\n\t\tawait this.containerInitializingFirstTime(runtime);\n\t\tawait this.containerHasInitialized(runtime);\n\t}\n\n\tpublic async instantiateFromExisting(runtime: ContainerRuntime): Promise<void> {\n\t\tawait this.containerHasInitialized(runtime);\n\t}\n\n\tpublic async preInitialize(\n\t\tcontext: IContainerContext,\n\t\texisting: boolean,\n\t): Promise<ContainerRuntime> {\n\t\tconst scope: Partial<IProvideFluidDependencySynthesizer> = context.scope;\n\t\tif (this.dependencyContainer) {\n\t\t\tconst dc = new DependencyContainer<FluidObject>(\n\t\t\t\tthis.dependencyContainer,\n\t\t\t\tscope.IFluidDependencySynthesizer,\n\t\t\t);\n\t\t\tscope.IFluidDependencySynthesizer = dc;\n\t\t}\n\n\t\treturn ContainerRuntime.loadRuntime({\n\t\t\tcontext,\n\t\t\texisting,\n\t\t\truntimeOptions: this.runtimeOptions,\n\t\t\tregistryEntries: this.registryEntries,\n\t\t\tcontainerScope: scope,\n\t\t\t// eslint-disable-next-line import/no-deprecated\n\t\t\trequestHandler: buildRuntimeRequestHandler(...this.requestHandlers),\n\t\t\tprovideEntryPoint: this.provideEntryPoint,\n\t\t});\n\t}\n\n\t/**\n\t * Subclasses may override containerInitializingFirstTime to perform any setup steps at the time the container\n\t * is created. This likely includes creating any initial data stores that are expected to be there at the outset.\n\t * @param runtime - The container runtime for the container being initialized\n\t */\n\tprotected async containerInitializingFirstTime(runtime: IContainerRuntime): Promise<void> {}\n\n\t/**\n\t * Subclasses may override containerHasInitialized to perform any steps after the container has initialized.\n\t * This likely includes loading any data stores that are expected to be there at the outset.\n\t * @param runtime - The container runtime for the container being initialized\n\t */\n\tprotected async containerHasInitialized(runtime: IContainerRuntime): Promise<void> {}\n}\n"]}
|