@fluidframework/aqueduct 2.0.0-rc.1.0.3 → 2.0.0-rc.2.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.
- package/dist/aqueduct-alpha.d.ts +116 -48
- package/dist/aqueduct-beta.d.ts +10 -0
- package/dist/aqueduct-public.d.ts +10 -0
- package/dist/aqueduct-untrimmed.d.ts +116 -48
- 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 +37 -25
- package/dist/container-runtime-factories/containerRuntimeFactoryWithDefaultDataStore.d.ts.map +1 -1
- package/dist/container-runtime-factories/containerRuntimeFactoryWithDefaultDataStore.js +4 -13
- 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 +4 -4
- package/dist/container-runtime-factories/index.js.map +1 -1
- package/dist/data-object-factories/dataObjectFactory.d.ts +6 -6
- package/dist/data-object-factories/dataObjectFactory.d.ts.map +1 -1
- package/dist/data-object-factories/dataObjectFactory.js +4 -4
- package/dist/data-object-factories/dataObjectFactory.js.map +1 -1
- package/dist/data-object-factories/index.d.ts +2 -2
- package/dist/data-object-factories/index.d.ts.map +1 -1
- package/dist/data-object-factories/index.js +4 -4
- package/dist/data-object-factories/index.js.map +1 -1
- package/dist/data-object-factories/pureDataObjectFactory.d.ts +44 -14
- package/dist/data-object-factories/pureDataObjectFactory.d.ts.map +1 -1
- package/dist/data-object-factories/pureDataObjectFactory.js +56 -14
- package/dist/data-object-factories/pureDataObjectFactory.js.map +1 -1
- package/dist/data-objects/dataObject.d.ts +3 -3
- package/dist/data-objects/dataObject.d.ts.map +1 -1
- package/dist/data-objects/dataObject.js +8 -8
- package/dist/data-objects/dataObject.js.map +1 -1
- package/dist/data-objects/index.d.ts +3 -3
- package/dist/data-objects/index.d.ts.map +1 -1
- package/dist/data-objects/index.js +4 -4
- 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 +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -9
- package/dist/index.js.map +1 -1
- package/dist/package.json +3 -0
- package/dist/tsdoc-metadata.json +1 -1
- package/lib/{aqueduct-alpha.d.mts → aqueduct-alpha.d.ts} +131 -48
- package/lib/{aqueduct-beta.d.mts → aqueduct-beta.d.ts} +25 -0
- package/lib/{aqueduct-public.d.mts → aqueduct-public.d.ts} +25 -0
- package/lib/{aqueduct-untrimmed.d.mts → aqueduct-untrimmed.d.ts} +131 -48
- package/lib/container-runtime-factories/{baseContainerRuntimeFactory.d.mts → baseContainerRuntimeFactory.d.ts} +40 -24
- package/lib/container-runtime-factories/baseContainerRuntimeFactory.d.ts.map +1 -0
- package/lib/container-runtime-factories/{baseContainerRuntimeFactory.mjs → baseContainerRuntimeFactory.js} +6 -10
- package/lib/container-runtime-factories/baseContainerRuntimeFactory.js.map +1 -0
- package/lib/container-runtime-factories/containerRuntimeFactoryWithDefaultDataStore.d.ts +57 -0
- package/lib/container-runtime-factories/containerRuntimeFactoryWithDefaultDataStore.d.ts.map +1 -0
- package/lib/container-runtime-factories/{containerRuntimeFactoryWithDefaultDataStore.mjs → containerRuntimeFactoryWithDefaultDataStore.js} +4 -13
- package/lib/container-runtime-factories/containerRuntimeFactoryWithDefaultDataStore.js.map +1 -0
- package/lib/container-runtime-factories/index.d.ts +7 -0
- package/lib/container-runtime-factories/index.d.ts.map +1 -0
- package/lib/container-runtime-factories/index.js +7 -0
- package/lib/container-runtime-factories/index.js.map +1 -0
- package/lib/data-object-factories/dataObjectFactory.d.ts +23 -0
- package/lib/data-object-factories/dataObjectFactory.d.ts.map +1 -0
- package/lib/data-object-factories/{dataObjectFactory.mjs → dataObjectFactory.js} +4 -4
- package/lib/data-object-factories/dataObjectFactory.js.map +1 -0
- package/lib/data-object-factories/index.d.ts +7 -0
- package/lib/data-object-factories/index.d.ts.map +1 -0
- package/lib/data-object-factories/index.js +7 -0
- package/lib/data-object-factories/index.js.map +1 -0
- package/lib/data-object-factories/{pureDataObjectFactory.d.mts → pureDataObjectFactory.d.ts} +45 -15
- package/lib/data-object-factories/pureDataObjectFactory.d.ts.map +1 -0
- package/lib/data-object-factories/{pureDataObjectFactory.mjs → pureDataObjectFactory.js} +57 -15
- package/lib/data-object-factories/pureDataObjectFactory.js.map +1 -0
- package/lib/data-objects/{dataObject.d.mts → dataObject.d.ts} +4 -4
- package/lib/data-objects/dataObject.d.ts.map +1 -0
- package/lib/data-objects/{dataObject.mjs → dataObject.js} +8 -8
- package/lib/data-objects/dataObject.js.map +1 -0
- package/lib/data-objects/index.d.ts +8 -0
- package/lib/data-objects/index.d.ts.map +1 -0
- package/lib/data-objects/index.js +7 -0
- package/lib/data-objects/index.js.map +1 -0
- package/lib/data-objects/{pureDataObject.d.mts → pureDataObject.d.ts} +13 -7
- package/lib/data-objects/pureDataObject.d.ts.map +1 -0
- package/lib/data-objects/{pureDataObject.mjs → pureDataObject.js} +11 -1
- package/lib/data-objects/pureDataObject.js.map +1 -0
- package/lib/data-objects/{types.d.mts → types.d.ts} +8 -8
- package/lib/data-objects/types.d.ts.map +1 -0
- package/lib/data-objects/{types.mjs → types.js} +1 -1
- package/lib/data-objects/types.js.map +1 -0
- package/lib/index.d.ts +22 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +22 -0
- package/lib/index.js.map +1 -0
- package/lib/test/aqueduct.spec.js +8 -0
- package/lib/test/aqueduct.spec.js.map +1 -0
- package/lib/test/tsconfig.tsbuildinfo +1 -0
- package/lib/test/types/validateAqueductPrevious.generated.js +24 -0
- package/lib/test/types/validateAqueductPrevious.generated.js.map +1 -0
- package/package.json +54 -54
- package/lib/container-runtime-factories/baseContainerRuntimeFactory.d.mts.map +0 -1
- package/lib/container-runtime-factories/baseContainerRuntimeFactory.mjs.map +0 -1
- package/lib/container-runtime-factories/containerRuntimeFactoryWithDefaultDataStore.d.mts +0 -45
- package/lib/container-runtime-factories/containerRuntimeFactoryWithDefaultDataStore.d.mts.map +0 -1
- package/lib/container-runtime-factories/containerRuntimeFactoryWithDefaultDataStore.mjs.map +0 -1
- package/lib/container-runtime-factories/index.d.mts +0 -7
- package/lib/container-runtime-factories/index.d.mts.map +0 -1
- package/lib/container-runtime-factories/index.mjs +0 -7
- package/lib/container-runtime-factories/index.mjs.map +0 -1
- package/lib/data-object-factories/dataObjectFactory.d.mts +0 -23
- package/lib/data-object-factories/dataObjectFactory.d.mts.map +0 -1
- package/lib/data-object-factories/dataObjectFactory.mjs.map +0 -1
- package/lib/data-object-factories/index.d.mts +0 -7
- package/lib/data-object-factories/index.d.mts.map +0 -1
- package/lib/data-object-factories/index.mjs +0 -7
- package/lib/data-object-factories/index.mjs.map +0 -1
- package/lib/data-object-factories/pureDataObjectFactory.d.mts.map +0 -1
- package/lib/data-object-factories/pureDataObjectFactory.mjs.map +0 -1
- package/lib/data-objects/dataObject.d.mts.map +0 -1
- package/lib/data-objects/dataObject.mjs.map +0 -1
- package/lib/data-objects/index.d.mts +0 -8
- package/lib/data-objects/index.d.mts.map +0 -1
- package/lib/data-objects/index.mjs +0 -7
- package/lib/data-objects/index.mjs.map +0 -1
- package/lib/data-objects/pureDataObject.d.mts.map +0 -1
- package/lib/data-objects/pureDataObject.mjs.map +0 -1
- package/lib/data-objects/types.d.mts.map +0 -1
- package/lib/data-objects/types.mjs.map +0 -1
- package/lib/index.d.mts +0 -8
- package/lib/index.d.mts.map +0 -1
- package/lib/index.mjs +0 -8
- package/lib/index.mjs.map +0 -1
|
@@ -1,3 +1,18 @@
|
|
|
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
|
+
|
|
1
16
|
import { AsyncFluidObjectProvider } from '@fluidframework/synthesize';
|
|
2
17
|
import { ContainerRuntime } from '@fluidframework/container-runtime';
|
|
3
18
|
import { FluidDataStoreRuntime } from '@fluidframework/datastore';
|
|
@@ -8,7 +23,9 @@ import { IContainerContext } from '@fluidframework/container-definitions';
|
|
|
8
23
|
import { IContainerRuntime } from '@fluidframework/container-runtime-definitions';
|
|
9
24
|
import { IContainerRuntimeBase } from '@fluidframework/runtime-definitions';
|
|
10
25
|
import { IContainerRuntimeOptions } from '@fluidframework/container-runtime';
|
|
26
|
+
import { IDataStore } from '@fluidframework/runtime-definitions';
|
|
11
27
|
import { IEvent } from '@fluidframework/core-interfaces';
|
|
28
|
+
import { IFluidDataStoreChannel } from '@fluidframework/runtime-definitions';
|
|
12
29
|
import { IFluidDataStoreContext } from '@fluidframework/runtime-definitions';
|
|
13
30
|
import { IFluidDataStoreContextDetached } from '@fluidframework/runtime-definitions';
|
|
14
31
|
import { IFluidDataStoreFactory } from '@fluidframework/runtime-definitions';
|
|
@@ -32,10 +49,14 @@ import { TypedEventEmitter } from '@fluid-internal/client-utils';
|
|
|
32
49
|
|
|
33
50
|
/* Excluded from this release type: BaseContainerRuntimeFactory */
|
|
34
51
|
|
|
52
|
+
/* Excluded from this release type: BaseContainerRuntimeFactoryProps */
|
|
53
|
+
|
|
35
54
|
/* Excluded from this release type: ContainerRuntime */
|
|
36
55
|
|
|
37
56
|
/* Excluded from this release type: ContainerRuntimeFactoryWithDefaultDataStore */
|
|
38
57
|
|
|
58
|
+
/* Excluded from this release type: ContainerRuntimeFactoryWithDefaultDataStoreProps */
|
|
59
|
+
|
|
39
60
|
/* Excluded from this release type: DataObject */
|
|
40
61
|
|
|
41
62
|
/* Excluded from this release type: DataObjectFactory */
|
|
@@ -56,6 +77,10 @@ import { TypedEventEmitter } from '@fluid-internal/client-utils';
|
|
|
56
77
|
|
|
57
78
|
/* Excluded from this release type: IDataObjectProps */
|
|
58
79
|
|
|
80
|
+
/* Excluded from this release type: IDataStore */
|
|
81
|
+
|
|
82
|
+
/* Excluded from this release type: IFluidDataStoreChannel */
|
|
83
|
+
|
|
59
84
|
/* Excluded from this release type: IFluidDataStoreContext */
|
|
60
85
|
|
|
61
86
|
/* Excluded from this release type: IFluidDataStoreContextDetached */
|
|
@@ -1,3 +1,18 @@
|
|
|
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
|
+
|
|
1
16
|
import { AsyncFluidObjectProvider } from '@fluidframework/synthesize';
|
|
2
17
|
import { ContainerRuntime } from '@fluidframework/container-runtime';
|
|
3
18
|
import { FluidDataStoreRuntime } from '@fluidframework/datastore';
|
|
@@ -8,7 +23,9 @@ import { IContainerContext } from '@fluidframework/container-definitions';
|
|
|
8
23
|
import { IContainerRuntime } from '@fluidframework/container-runtime-definitions';
|
|
9
24
|
import { IContainerRuntimeBase } from '@fluidframework/runtime-definitions';
|
|
10
25
|
import { IContainerRuntimeOptions } from '@fluidframework/container-runtime';
|
|
26
|
+
import { IDataStore } from '@fluidframework/runtime-definitions';
|
|
11
27
|
import { IEvent } from '@fluidframework/core-interfaces';
|
|
28
|
+
import { IFluidDataStoreChannel } from '@fluidframework/runtime-definitions';
|
|
12
29
|
import { IFluidDataStoreContext } from '@fluidframework/runtime-definitions';
|
|
13
30
|
import { IFluidDataStoreContextDetached } from '@fluidframework/runtime-definitions';
|
|
14
31
|
import { IFluidDataStoreFactory } from '@fluidframework/runtime-definitions';
|
|
@@ -32,10 +49,14 @@ import { TypedEventEmitter } from '@fluid-internal/client-utils';
|
|
|
32
49
|
|
|
33
50
|
/* Excluded from this release type: BaseContainerRuntimeFactory */
|
|
34
51
|
|
|
52
|
+
/* Excluded from this release type: BaseContainerRuntimeFactoryProps */
|
|
53
|
+
|
|
35
54
|
/* Excluded from this release type: ContainerRuntime */
|
|
36
55
|
|
|
37
56
|
/* Excluded from this release type: ContainerRuntimeFactoryWithDefaultDataStore */
|
|
38
57
|
|
|
58
|
+
/* Excluded from this release type: ContainerRuntimeFactoryWithDefaultDataStoreProps */
|
|
59
|
+
|
|
39
60
|
/* Excluded from this release type: DataObject */
|
|
40
61
|
|
|
41
62
|
/* Excluded from this release type: DataObjectFactory */
|
|
@@ -56,6 +77,10 @@ import { TypedEventEmitter } from '@fluid-internal/client-utils';
|
|
|
56
77
|
|
|
57
78
|
/* Excluded from this release type: IDataObjectProps */
|
|
58
79
|
|
|
80
|
+
/* Excluded from this release type: IDataStore */
|
|
81
|
+
|
|
82
|
+
/* Excluded from this release type: IFluidDataStoreChannel */
|
|
83
|
+
|
|
59
84
|
/* Excluded from this release type: IFluidDataStoreContext */
|
|
60
85
|
|
|
61
86
|
/* Excluded from this release type: IFluidDataStoreContextDetached */
|
|
@@ -1,3 +1,18 @@
|
|
|
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
|
+
|
|
1
16
|
import { AsyncFluidObjectProvider } from '@fluidframework/synthesize';
|
|
2
17
|
import { ContainerRuntime } from '@fluidframework/container-runtime';
|
|
3
18
|
import { FluidDataStoreRuntime } from '@fluidframework/datastore';
|
|
@@ -8,7 +23,9 @@ import { IContainerContext } from '@fluidframework/container-definitions';
|
|
|
8
23
|
import { IContainerRuntime } from '@fluidframework/container-runtime-definitions';
|
|
9
24
|
import { IContainerRuntimeBase } from '@fluidframework/runtime-definitions';
|
|
10
25
|
import { IContainerRuntimeOptions } from '@fluidframework/container-runtime';
|
|
26
|
+
import { IDataStore } from '@fluidframework/runtime-definitions';
|
|
11
27
|
import { IEvent } from '@fluidframework/core-interfaces';
|
|
28
|
+
import { IFluidDataStoreChannel } from '@fluidframework/runtime-definitions';
|
|
12
29
|
import { IFluidDataStoreContext } from '@fluidframework/runtime-definitions';
|
|
13
30
|
import { IFluidDataStoreContextDetached } from '@fluidframework/runtime-definitions';
|
|
14
31
|
import { IFluidDataStoreFactory } from '@fluidframework/runtime-definitions';
|
|
@@ -35,6 +52,9 @@ import { TypedEventEmitter } from '@fluid-internal/client-utils';
|
|
|
35
52
|
* @alpha
|
|
36
53
|
*/
|
|
37
54
|
export declare class BaseContainerRuntimeFactory extends RuntimeFactoryHelper implements IProvideFluidDataStoreRegistry {
|
|
55
|
+
/**
|
|
56
|
+
* {@inheritDoc @fluidframework/runtime-definitions#IProvideFluidDataStoreRegistry.IFluidDataStoreRegistry}
|
|
57
|
+
*/
|
|
38
58
|
get IFluidDataStoreRegistry(): IFluidDataStoreRegistry;
|
|
39
59
|
private readonly registry;
|
|
40
60
|
private readonly registryEntries;
|
|
@@ -42,22 +62,7 @@ export declare class BaseContainerRuntimeFactory extends RuntimeFactoryHelper im
|
|
|
42
62
|
private readonly runtimeOptions?;
|
|
43
63
|
private readonly requestHandlers;
|
|
44
64
|
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
|
-
});
|
|
65
|
+
constructor(props: BaseContainerRuntimeFactoryProps);
|
|
61
66
|
instantiateFirstTime(runtime: ContainerRuntime): Promise<void>;
|
|
62
67
|
instantiateFromExisting(runtime: ContainerRuntime): Promise<void>;
|
|
63
68
|
preInitialize(context: IContainerContext, existing: boolean): Promise<ContainerRuntime>;
|
|
@@ -75,6 +80,35 @@ export declare class BaseContainerRuntimeFactory extends RuntimeFactoryHelper im
|
|
|
75
80
|
protected containerHasInitialized(runtime: IContainerRuntime): Promise<void>;
|
|
76
81
|
}
|
|
77
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
|
+
|
|
78
112
|
/**
|
|
79
113
|
* A ContainerRuntimeFactory that initializes Containers with a single default data store, which can be requested from
|
|
80
114
|
* the container with an empty URL.
|
|
@@ -85,30 +119,43 @@ export declare class BaseContainerRuntimeFactory extends RuntimeFactoryHelper im
|
|
|
85
119
|
export declare class ContainerRuntimeFactoryWithDefaultDataStore extends BaseContainerRuntimeFactory {
|
|
86
120
|
static readonly defaultDataStoreId = "default";
|
|
87
121
|
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
|
-
});
|
|
122
|
+
constructor(props: ContainerRuntimeFactoryWithDefaultDataStoreProps);
|
|
106
123
|
/**
|
|
107
124
|
* {@inheritDoc BaseContainerRuntimeFactory.containerInitializingFirstTime}
|
|
108
125
|
*/
|
|
109
126
|
protected containerInitializingFirstTime(runtime: IContainerRuntime): Promise<void>;
|
|
110
127
|
}
|
|
111
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
|
+
|
|
112
159
|
/**
|
|
113
160
|
* DataObject is a base data store that is primed with a root directory. It
|
|
114
161
|
* ensures that it is created and ready before you can access it.
|
|
@@ -150,7 +197,7 @@ export declare abstract class DataObject<I extends DataObjectTypes = DataObjectT
|
|
|
150
197
|
* @alpha
|
|
151
198
|
*/
|
|
152
199
|
export declare class DataObjectFactory<TObj extends DataObject<I>, I extends DataObjectTypes = DataObjectTypes> extends PureDataObjectFactory<TObj, I> {
|
|
153
|
-
constructor(type: string, ctor: new (props: IDataObjectProps<I>) => TObj, sharedObjects: readonly IChannelFactory[] | undefined, optionalProviders: FluidObjectSymbolProvider<I["OptionalProviders"]>, registryEntries?: NamedFluidDataStoreRegistryEntries, runtimeFactory?: typeof FluidDataStoreRuntime);
|
|
200
|
+
constructor(type: string, ctor: new (props: IDataObjectProps<I>) => TObj, sharedObjects: readonly IChannelFactory<IFluidLoadable>[] | undefined, optionalProviders: FluidObjectSymbolProvider<I["OptionalProviders"]>, registryEntries?: NamedFluidDataStoreRegistryEntries, runtimeFactory?: typeof FluidDataStoreRuntime);
|
|
154
201
|
}
|
|
155
202
|
|
|
156
203
|
/**
|
|
@@ -159,15 +206,15 @@ export declare class DataObjectFactory<TObj extends DataObject<I>, I extends Dat
|
|
|
159
206
|
*/
|
|
160
207
|
export declare interface DataObjectTypes {
|
|
161
208
|
/**
|
|
162
|
-
*
|
|
209
|
+
* Represents a type that will define optional providers that will be injected.
|
|
163
210
|
*/
|
|
164
211
|
OptionalProviders?: FluidObject;
|
|
165
212
|
/**
|
|
166
|
-
*
|
|
213
|
+
* The initial state type that the produced data object may take during creation.
|
|
167
214
|
*/
|
|
168
215
|
InitialState?: any;
|
|
169
216
|
/**
|
|
170
|
-
*
|
|
217
|
+
* Represents events that will be available in the EventForwarder.
|
|
171
218
|
*/
|
|
172
219
|
Events?: IEvent;
|
|
173
220
|
}
|
|
@@ -210,13 +257,19 @@ export declare abstract class PureDataObject<I extends DataObjectTypes = DataObj
|
|
|
210
257
|
protected initProps?: I["InitialState"];
|
|
211
258
|
protected initializeP: Promise<void> | undefined;
|
|
212
259
|
get id(): string;
|
|
260
|
+
/**
|
|
261
|
+
* {@inheritDoc @fluidframework/core-interfaces#IProvideFluidLoadable.IFluidLoadable}
|
|
262
|
+
*/
|
|
213
263
|
get IFluidLoadable(): this;
|
|
264
|
+
/**
|
|
265
|
+
* {@inheritDoc @fluidframework/core-interfaces#IProvideFluidHandle.IFluidHandle}
|
|
266
|
+
*/
|
|
214
267
|
get IFluidHandle(): IFluidHandle<this>;
|
|
215
268
|
/**
|
|
216
269
|
* Handle to a data store
|
|
217
270
|
*/
|
|
218
271
|
get handle(): IFluidHandle<this>;
|
|
219
|
-
static getDataObject(runtime: IFluidDataStoreRuntime): Promise<PureDataObject
|
|
272
|
+
static getDataObject(runtime: IFluidDataStoreRuntime): Promise<PureDataObject>;
|
|
220
273
|
constructor(props: IDataObjectProps<I>);
|
|
221
274
|
/**
|
|
222
275
|
* Return this object if someone requests it directly
|
|
@@ -276,14 +329,27 @@ export declare abstract class PureDataObject<I extends DataObjectTypes = DataObj
|
|
|
276
329
|
* @alpha
|
|
277
330
|
*/
|
|
278
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
|
+
*/
|
|
279
335
|
readonly type: string;
|
|
280
336
|
private readonly ctor;
|
|
281
337
|
private readonly optionalProviders;
|
|
282
338
|
private readonly runtimeClass;
|
|
283
339
|
private readonly sharedObjectRegistry;
|
|
284
340
|
private readonly registry;
|
|
285
|
-
constructor(
|
|
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
|
+
*/
|
|
286
349
|
get IFluidDataStoreFactory(): this;
|
|
350
|
+
/**
|
|
351
|
+
* {@inheritDoc @fluidframework/runtime-definitions#IProvideFluidDataStoreRegistry.IFluidDataStoreRegistry}
|
|
352
|
+
*/
|
|
287
353
|
get IFluidDataStoreRegistry(): IFluidDataStoreRegistry | undefined;
|
|
288
354
|
/**
|
|
289
355
|
* Convenience helper to get the data store's/factory's data store registry entry.
|
|
@@ -293,11 +359,9 @@ export declare class PureDataObjectFactory<TObj extends PureDataObject<I>, I ext
|
|
|
293
359
|
*/
|
|
294
360
|
get registryEntry(): NamedFluidDataStoreRegistryEntry;
|
|
295
361
|
/**
|
|
296
|
-
*
|
|
297
|
-
*
|
|
298
|
-
* @param context - data store context used to load a data store runtime
|
|
362
|
+
* {@inheritDoc @fluidframework/runtime-definitions#IFluidDataStoreFactory.instantiateDataStore}
|
|
299
363
|
*/
|
|
300
|
-
instantiateDataStore(context: IFluidDataStoreContext, existing: boolean): Promise<
|
|
364
|
+
instantiateDataStore(context: IFluidDataStoreContext, existing: boolean): Promise<IFluidDataStoreChannel>;
|
|
301
365
|
/**
|
|
302
366
|
* Creates a new instance of the object. Uses parent context's registry to build package path to this factory.
|
|
303
367
|
* In other words, registry of context passed in has to contain this factory, with the name that matches
|
|
@@ -306,10 +370,11 @@ export declare class PureDataObjectFactory<TObj extends PureDataObject<I>, I ext
|
|
|
306
370
|
* @param context - The context being used to create the runtime
|
|
307
371
|
* (the created object will have its own new context created as well)
|
|
308
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
|
|
309
374
|
* @returns an object created by this factory. Data store and objects created are not attached to container.
|
|
310
375
|
* They get attached only when a handle to one of them is attached to already attached objects.
|
|
311
376
|
*/
|
|
312
|
-
createChildInstance(parentContext: IFluidDataStoreContext, initialState?: I["InitialState"]): Promise<TObj>;
|
|
377
|
+
createChildInstance(parentContext: IFluidDataStoreContext, initialState?: I["InitialState"], loadingGroupId?: string): Promise<TObj>;
|
|
313
378
|
/**
|
|
314
379
|
* Creates a new instance of the object. Uses peer context's registry and its package path to identify this factory.
|
|
315
380
|
* In other words, registry of context passed in has to have this factory.
|
|
@@ -317,10 +382,11 @@ export declare class PureDataObjectFactory<TObj extends PureDataObject<I>, I ext
|
|
|
317
382
|
* @param context - The component context being used to create the object
|
|
318
383
|
* (the created object will have its own new context created as well)
|
|
319
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
|
|
320
386
|
* @returns an object created by this factory. Data store and objects created are not attached to container.
|
|
321
387
|
* They get attached only when a handle to one of them is attached to already attached objects.
|
|
322
388
|
*/
|
|
323
|
-
createPeerInstance(peerContext: IFluidDataStoreContext, initialState?: I["InitialState"]): Promise<TObj>;
|
|
389
|
+
createPeerInstance(peerContext: IFluidDataStoreContext, initialState?: I["InitialState"], loadingGroupId?: string): Promise<TObj>;
|
|
324
390
|
/**
|
|
325
391
|
* Creates a new instance of the object. Uses container's registry to find this factory.
|
|
326
392
|
* It's expected that only container owners would use this functionality, as only such developers
|
|
@@ -328,10 +394,24 @@ export declare class PureDataObjectFactory<TObj extends PureDataObject<I>, I ext
|
|
|
328
394
|
* The name in this registry for such record should match type of this factory.
|
|
329
395
|
* @param runtime - container runtime. It's registry is used to create an object.
|
|
330
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
|
|
331
398
|
* @returns an object created by this factory. Data store and objects created are not attached to container.
|
|
332
399
|
* They get attached only when a handle to one of them is attached to already attached objects.
|
|
333
400
|
*/
|
|
334
|
-
createInstance(runtime: IContainerRuntimeBase, initialState?: I["InitialState"]): Promise<TObj>;
|
|
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]>;
|
|
335
415
|
/**
|
|
336
416
|
* Creates a new root instance of the object. Uses container's registry to find this factory.
|
|
337
417
|
* It's expected that only container owners would use this functionality, as only such developers
|
|
@@ -341,9 +421,12 @@ export declare class PureDataObjectFactory<TObj extends PureDataObject<I>, I ext
|
|
|
341
421
|
* @param initialState - The initial state to provide to the created component.
|
|
342
422
|
* @returns an object created by this factory. Data store and objects created are not attached to container.
|
|
343
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.
|
|
344
427
|
*/
|
|
345
428
|
createRootInstance(rootDataStoreId: string, runtime: IContainerRuntime, initialState?: I["InitialState"]): Promise<TObj>;
|
|
346
|
-
protected createNonRootInstanceCore(containerRuntime: IContainerRuntimeBase, packagePath: Readonly<string[]>, initialState?: I["InitialState"]): Promise<TObj>;
|
|
429
|
+
protected createNonRootInstanceCore(containerRuntime: IContainerRuntimeBase, packagePath: Readonly<string[]>, initialState?: I["InitialState"], loadingGroupId?: string): Promise<TObj>;
|
|
347
430
|
protected createInstanceCore(context: IFluidDataStoreContextDetached, initialState?: I["InitialState"]): Promise<TObj>;
|
|
348
431
|
}
|
|
349
432
|
|
|
@@ -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>;
|
|
@@ -56,4 +72,4 @@ export declare class BaseContainerRuntimeFactory extends RuntimeFactoryHelper im
|
|
|
56
72
|
*/
|
|
57
73
|
protected containerHasInitialized(runtime: IContainerRuntime): Promise<void>;
|
|
58
74
|
}
|
|
59
|
-
//# sourceMappingURL=baseContainerRuntimeFactory.d.
|
|
75
|
+
//# sourceMappingURL=baseContainerRuntimeFactory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"baseContainerRuntimeFactory.d.ts","sourceRoot":"","sources":["../../src/container-runtime-factories/baseContainerRuntimeFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,uCAAuC,CAAC;AAC/E,OAAO,EACN,KAAK,wBAAwB,EAE7B,gBAAgB,EAChB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;AAEvF,OAAO,EACN,KAAK,qBAAqB,EAE1B,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACN,KAAK,uBAAuB,EAC5B,KAAK,8BAA8B,EACnC,KAAK,kCAAkC,EACvC,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAEN,KAAK,2BAA2B,EAEhC,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAEnE;;;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,8 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
import { FluidDataStoreRegistry, ContainerRuntime, } from "@fluidframework/container-runtime";
|
|
6
|
-
|
|
6
|
+
// eslint-disable-next-line import/no-deprecated
|
|
7
|
+
import { buildRuntimeRequestHandler, } from "@fluidframework/request-handler";
|
|
7
8
|
import { DependencyContainer, } from "@fluidframework/synthesize";
|
|
8
9
|
import { RuntimeFactoryHelper } from "@fluidframework/runtime-utils";
|
|
9
10
|
/**
|
|
@@ -13,17 +14,12 @@ import { RuntimeFactoryHelper } from "@fluidframework/runtime-utils";
|
|
|
13
14
|
* @alpha
|
|
14
15
|
*/
|
|
15
16
|
export class BaseContainerRuntimeFactory extends RuntimeFactoryHelper {
|
|
17
|
+
/**
|
|
18
|
+
* {@inheritDoc @fluidframework/runtime-definitions#IProvideFluidDataStoreRegistry.IFluidDataStoreRegistry}
|
|
19
|
+
*/
|
|
16
20
|
get IFluidDataStoreRegistry() {
|
|
17
21
|
return this.registry;
|
|
18
22
|
}
|
|
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
23
|
constructor(props) {
|
|
28
24
|
super();
|
|
29
25
|
this.registryEntries = props.registryEntries;
|
|
@@ -70,4 +66,4 @@ export class BaseContainerRuntimeFactory extends RuntimeFactoryHelper {
|
|
|
70
66
|
*/
|
|
71
67
|
async containerHasInitialized(runtime) { }
|
|
72
68
|
}
|
|
73
|
-
//# sourceMappingURL=baseContainerRuntimeFactory.
|
|
69
|
+
//# sourceMappingURL=baseContainerRuntimeFactory.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"baseContainerRuntimeFactory.js","sourceRoot":"","sources":["../../src/container-runtime-factories/baseContainerRuntimeFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAEN,sBAAsB,EACtB,gBAAgB,GAChB,MAAM,mCAAmC,CAAC;AAE3C,gDAAgD;AAChD,OAAO,EAEN,0BAA0B,GAC1B,MAAM,iCAAiC,CAAC;AAMzC,OAAO,EACN,mBAAmB,GAGnB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAgCrE;;;;;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"]}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
import { type IContainerRuntimeOptions } from "@fluidframework/container-runtime";
|
|
6
|
+
import { type NamedFluidDataStoreRegistryEntries, type IFluidDataStoreFactory } from "@fluidframework/runtime-definitions";
|
|
7
|
+
import { type IContainerRuntime } from "@fluidframework/container-runtime-definitions";
|
|
8
|
+
import { type FluidObject } from "@fluidframework/core-interfaces";
|
|
9
|
+
import { type IFluidDependencySynthesizer } from "@fluidframework/synthesize";
|
|
10
|
+
import { type RuntimeRequestHandler } from "@fluidframework/request-handler";
|
|
11
|
+
import { BaseContainerRuntimeFactory } from "./baseContainerRuntimeFactory.js";
|
|
12
|
+
/**
|
|
13
|
+
* {@link ContainerRuntimeFactoryWithDefaultDataStore} construction properties.
|
|
14
|
+
* @alpha
|
|
15
|
+
*/
|
|
16
|
+
export interface ContainerRuntimeFactoryWithDefaultDataStoreProps {
|
|
17
|
+
defaultFactory: IFluidDataStoreFactory;
|
|
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
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* A ContainerRuntimeFactory that initializes Containers with a single default data store, which can be requested from
|
|
43
|
+
* the container with an empty URL.
|
|
44
|
+
*
|
|
45
|
+
* This factory should be exposed as fluidExport off the entry point to your module.
|
|
46
|
+
* @alpha
|
|
47
|
+
*/
|
|
48
|
+
export declare class ContainerRuntimeFactoryWithDefaultDataStore extends BaseContainerRuntimeFactory {
|
|
49
|
+
static readonly defaultDataStoreId = "default";
|
|
50
|
+
protected readonly defaultFactory: IFluidDataStoreFactory;
|
|
51
|
+
constructor(props: ContainerRuntimeFactoryWithDefaultDataStoreProps);
|
|
52
|
+
/**
|
|
53
|
+
* {@inheritDoc BaseContainerRuntimeFactory.containerInitializingFirstTime}
|
|
54
|
+
*/
|
|
55
|
+
protected containerInitializingFirstTime(runtime: IContainerRuntime): Promise<void>;
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=containerRuntimeFactoryWithDefaultDataStore.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"containerRuntimeFactoryWithDefaultDataStore.d.ts","sourceRoot":"","sources":["../../src/container-runtime-factories/containerRuntimeFactoryWithDefaultDataStore.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,KAAK,wBAAwB,EAE7B,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EACN,KAAK,kCAAkC,EACvC,KAAK,sBAAsB,EAC3B,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;AACvF,OAAO,EAAE,KAAK,WAAW,EAAiC,MAAM,iCAAiC,CAAC;AAElG,OAAO,EAAE,KAAK,2BAA2B,EAAE,MAAM,4BAA4B,CAAC;AAC9E,OAAO,EAAE,KAAK,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AAC7E,OAAO,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAC;AAY/E;;;GAGG;AACH,MAAM,WAAW,gDAAgD;IAChE,cAAc,EAAE,sBAAsB,CAAC;IACvC;;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,CAAC,EAAE,CAAC,OAAO,EAAE,iBAAiB,KAAK,OAAO,CAAC,WAAW,CAAC,CAAC;CACzE;AAED;;;;;;GAMG;AACH,qBAAa,2CAA4C,SAAQ,2BAA2B;IAC3F,gBAAuB,kBAAkB,aAAsB;IAE/D,SAAS,CAAC,QAAQ,CAAC,cAAc,EAAE,sBAAsB,CAAC;gBAEvC,KAAK,EAAE,gDAAgD;IA6B1E;;OAEG;cACa,8BAA8B,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC;CAIzF"}
|