@fluid-experimental/data-object-base 2.3.0-288113 → 2.3.1
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/runtimeFactory.d.ts +3 -10
- package/dist/runtimeFactory.d.ts.map +1 -1
- package/dist/runtimeFactory.js +3 -7
- package/dist/runtimeFactory.js.map +1 -1
- package/lib/runtimeFactory.d.ts +3 -10
- package/lib/runtimeFactory.d.ts.map +1 -1
- package/lib/runtimeFactory.js +2 -8
- package/lib/runtimeFactory.js.map +1 -1
- package/lib/tsdoc-metadata.json +1 -1
- package/package.json +19 -18
package/dist/runtimeFactory.d.ts
CHANGED
|
@@ -2,11 +2,9 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
import type { IContainerContext } from "@fluidframework/container-definitions/internal";
|
|
6
|
-
import { ContainerRuntime } from "@fluidframework/container-runtime/internal";
|
|
5
|
+
import type { IContainerContext, IRuntime } from "@fluidframework/container-definitions/internal";
|
|
7
6
|
import type { IContainerRuntime } from "@fluidframework/container-runtime-definitions/internal";
|
|
8
7
|
import type { FluidObject } from "@fluidframework/core-interfaces";
|
|
9
|
-
import { type RuntimeRequestHandler } from "@fluidframework/request-handler/internal";
|
|
10
8
|
import type { IFluidDataStoreFactory } from "@fluidframework/runtime-definitions/internal";
|
|
11
9
|
import { RuntimeFactoryHelper } from "@fluidframework/runtime-utils/internal";
|
|
12
10
|
/**
|
|
@@ -16,10 +14,6 @@ import { RuntimeFactoryHelper } from "@fluidframework/runtime-utils/internal";
|
|
|
16
14
|
export interface RuntimeFactoryProps {
|
|
17
15
|
defaultStoreFactory: IFluidDataStoreFactory;
|
|
18
16
|
storeFactories: IFluidDataStoreFactory[];
|
|
19
|
-
/**
|
|
20
|
-
* @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
|
|
21
|
-
*/
|
|
22
|
-
requestHandlers?: RuntimeRequestHandler[];
|
|
23
17
|
provideEntryPoint: (runtime: IContainerRuntime) => Promise<FluidObject>;
|
|
24
18
|
}
|
|
25
19
|
/**
|
|
@@ -28,10 +22,9 @@ export interface RuntimeFactoryProps {
|
|
|
28
22
|
export declare class RuntimeFactory extends RuntimeFactoryHelper {
|
|
29
23
|
private readonly registry;
|
|
30
24
|
private readonly defaultStoreFactory;
|
|
31
|
-
private readonly requestHandlers;
|
|
32
25
|
private readonly provideEntryPoint;
|
|
33
26
|
constructor(props: RuntimeFactoryProps);
|
|
34
|
-
instantiateFirstTime(runtime:
|
|
35
|
-
preInitialize(context: IContainerContext, existing: boolean): Promise<
|
|
27
|
+
instantiateFirstTime(runtime: IContainerRuntime): Promise<void>;
|
|
28
|
+
preInitialize(context: IContainerContext, existing: boolean): Promise<IContainerRuntime & IRuntime>;
|
|
36
29
|
}
|
|
37
30
|
//# sourceMappingURL=runtimeFactory.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtimeFactory.d.ts","sourceRoot":"","sources":["../src/runtimeFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"runtimeFactory.d.ts","sourceRoot":"","sources":["../src/runtimeFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EACX,iBAAiB,EACjB,QAAQ,EACR,MAAM,gDAAgD,CAAC;AAExD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wDAAwD,CAAC;AAChG,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,KAAK,EACX,sBAAsB,EAEtB,MAAM,8CAA8C,CAAC;AACtD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wCAAwC,CAAC;AAI9E;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IACnC,mBAAmB,EAAE,sBAAsB,CAAC;IAC5C,cAAc,EAAE,sBAAsB,EAAE,CAAC;IACzC,iBAAiB,EAAE,CAAC,OAAO,EAAE,iBAAiB,KAAK,OAAO,CAAC,WAAW,CAAC,CAAC;CACxE;AAED;;GAEG;AACH,qBAAa,cAAe,SAAQ,oBAAoB;IACvD,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAqC;IAE9D,OAAO,CAAC,QAAQ,CAAC,mBAAmB,CAAyB;IAC7D,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAuD;gBAEtE,KAAK,EAAE,mBAAmB;IAchC,oBAAoB,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC;IAK/D,aAAa,CACzB,OAAO,EAAE,iBAAiB,EAC1B,QAAQ,EAAE,OAAO,GACf,OAAO,CAAC,iBAAiB,GAAG,QAAQ,CAAC;CAUxC"}
|
package/dist/runtimeFactory.js
CHANGED
|
@@ -6,18 +6,16 @@
|
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
7
|
exports.RuntimeFactory = void 0;
|
|
8
8
|
const internal_1 = require("@fluidframework/container-runtime/internal");
|
|
9
|
-
const internal_2 = require("@fluidframework/
|
|
10
|
-
const internal_3 = require("@fluidframework/runtime-utils/internal");
|
|
9
|
+
const internal_2 = require("@fluidframework/runtime-utils/internal");
|
|
11
10
|
const defaultStoreId = "";
|
|
12
11
|
/**
|
|
13
12
|
* @internal
|
|
14
13
|
*/
|
|
15
|
-
class RuntimeFactory extends
|
|
14
|
+
class RuntimeFactory extends internal_2.RuntimeFactoryHelper {
|
|
16
15
|
constructor(props) {
|
|
17
16
|
super();
|
|
18
17
|
this.defaultStoreFactory = props.defaultStoreFactory;
|
|
19
18
|
this.provideEntryPoint = props.provideEntryPoint;
|
|
20
|
-
this.requestHandlers = props.requestHandlers ?? [];
|
|
21
19
|
const storeFactories = props.storeFactories ?? [this.defaultStoreFactory];
|
|
22
20
|
this.registry = (storeFactories.includes(this.defaultStoreFactory)
|
|
23
21
|
? storeFactories
|
|
@@ -28,12 +26,10 @@ class RuntimeFactory extends internal_3.RuntimeFactoryHelper {
|
|
|
28
26
|
await dataStore.trySetAlias(defaultStoreId);
|
|
29
27
|
}
|
|
30
28
|
async preInitialize(context, existing) {
|
|
31
|
-
const runtime = await internal_1.
|
|
29
|
+
const runtime = await (0, internal_1.loadContainerRuntime)({
|
|
32
30
|
context,
|
|
33
31
|
registryEntries: this.registry,
|
|
34
32
|
existing,
|
|
35
|
-
// eslint-disable-next-line import/no-deprecated
|
|
36
|
-
requestHandler: (0, internal_2.buildRuntimeRequestHandler)(...this.requestHandlers),
|
|
37
33
|
provideEntryPoint: this.provideEntryPoint,
|
|
38
34
|
});
|
|
39
35
|
return runtime;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtimeFactory.js","sourceRoot":"","sources":["../src/runtimeFactory.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;
|
|
1
|
+
{"version":3,"file":"runtimeFactory.js","sourceRoot":"","sources":["../src/runtimeFactory.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAMH,yEAAkF;AAOlF,qEAA8E;AAE9E,MAAM,cAAc,GAAG,EAAW,CAAC;AAYnC;;GAEG;AACH,MAAa,cAAe,SAAQ,+BAAoB;IAMvD,YAAmB,KAA0B;QAC5C,KAAK,EAAE,CAAC;QAER,IAAI,CAAC,mBAAmB,GAAG,KAAK,CAAC,mBAAmB,CAAC;QACrD,IAAI,CAAC,iBAAiB,GAAG,KAAK,CAAC,iBAAiB,CAAC;QACjD,MAAM,cAAc,GAAG,KAAK,CAAC,cAAc,IAAI,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC;QAE1E,IAAI,CAAC,QAAQ,GAAG,CACf,cAAc,CAAC,QAAQ,CAAC,IAAI,CAAC,mBAAmB,CAAC;YAChD,CAAC,CAAC,cAAc;YAChB,CAAC,CAAC,CAAC,GAAG,cAAc,EAAE,IAAI,CAAC,mBAAmB,CAAC,CAChD,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,CAAuC,CAAC;IACnF,CAAC;IAEM,KAAK,CAAC,oBAAoB,CAAC,OAA0B;QAC3D,MAAM,SAAS,GAAG,MAAM,OAAO,CAAC,eAAe,CAAC,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,CAAC;QAC/E,MAAM,SAAS,CAAC,WAAW,CAAC,cAAc,CAAC,CAAC;IAC7C,CAAC;IAEM,KAAK,CAAC,aAAa,CACzB,OAA0B,EAC1B,QAAiB;QAEjB,MAAM,OAAO,GAAG,MAAM,IAAA,+BAAoB,EAAC;YAC1C,OAAO;YACP,eAAe,EAAE,IAAI,CAAC,QAAQ;YAC9B,QAAQ;YACR,iBAAiB,EAAE,IAAI,CAAC,iBAAiB;SACzC,CAAC,CAAC;QAEH,OAAO,OAAO,CAAC;IAChB,CAAC;CACD;AAtCD,wCAsCC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type {\n\tIContainerContext,\n\tIRuntime,\n} from \"@fluidframework/container-definitions/internal\";\nimport { loadContainerRuntime } from \"@fluidframework/container-runtime/internal\";\nimport type { IContainerRuntime } from \"@fluidframework/container-runtime-definitions/internal\";\nimport type { FluidObject } from \"@fluidframework/core-interfaces\";\nimport type {\n\tIFluidDataStoreFactory,\n\tNamedFluidDataStoreRegistryEntries,\n} from \"@fluidframework/runtime-definitions/internal\";\nimport { RuntimeFactoryHelper } from \"@fluidframework/runtime-utils/internal\";\n\nconst defaultStoreId = \"\" as const;\n\n/**\n * {@link RuntimeFactory} construction properties.\n * @internal\n */\nexport interface RuntimeFactoryProps {\n\tdefaultStoreFactory: IFluidDataStoreFactory;\n\tstoreFactories: IFluidDataStoreFactory[];\n\tprovideEntryPoint: (runtime: IContainerRuntime) => Promise<FluidObject>;\n}\n\n/**\n * @internal\n */\nexport class RuntimeFactory extends RuntimeFactoryHelper {\n\tprivate readonly registry: NamedFluidDataStoreRegistryEntries;\n\n\tprivate readonly defaultStoreFactory: IFluidDataStoreFactory;\n\tprivate readonly provideEntryPoint: (runtime: IContainerRuntime) => Promise<FluidObject>;\n\n\tpublic constructor(props: RuntimeFactoryProps) {\n\t\tsuper();\n\n\t\tthis.defaultStoreFactory = props.defaultStoreFactory;\n\t\tthis.provideEntryPoint = props.provideEntryPoint;\n\t\tconst storeFactories = props.storeFactories ?? [this.defaultStoreFactory];\n\n\t\tthis.registry = (\n\t\t\tstoreFactories.includes(this.defaultStoreFactory)\n\t\t\t\t? storeFactories\n\t\t\t\t: [...storeFactories, this.defaultStoreFactory]\n\t\t).map((factory) => [factory.type, factory]) as NamedFluidDataStoreRegistryEntries;\n\t}\n\n\tpublic async instantiateFirstTime(runtime: IContainerRuntime): Promise<void> {\n\t\tconst dataStore = await runtime.createDataStore(this.defaultStoreFactory.type);\n\t\tawait dataStore.trySetAlias(defaultStoreId);\n\t}\n\n\tpublic async preInitialize(\n\t\tcontext: IContainerContext,\n\t\texisting: boolean,\n\t): Promise<IContainerRuntime & IRuntime> {\n\t\tconst runtime = await loadContainerRuntime({\n\t\t\tcontext,\n\t\t\tregistryEntries: this.registry,\n\t\t\texisting,\n\t\t\tprovideEntryPoint: this.provideEntryPoint,\n\t\t});\n\n\t\treturn runtime;\n\t}\n}\n"]}
|
package/lib/runtimeFactory.d.ts
CHANGED
|
@@ -2,11 +2,9 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
import type { IContainerContext } from "@fluidframework/container-definitions/internal";
|
|
6
|
-
import { ContainerRuntime } from "@fluidframework/container-runtime/internal";
|
|
5
|
+
import type { IContainerContext, IRuntime } from "@fluidframework/container-definitions/internal";
|
|
7
6
|
import type { IContainerRuntime } from "@fluidframework/container-runtime-definitions/internal";
|
|
8
7
|
import type { FluidObject } from "@fluidframework/core-interfaces";
|
|
9
|
-
import { type RuntimeRequestHandler } from "@fluidframework/request-handler/internal";
|
|
10
8
|
import type { IFluidDataStoreFactory } from "@fluidframework/runtime-definitions/internal";
|
|
11
9
|
import { RuntimeFactoryHelper } from "@fluidframework/runtime-utils/internal";
|
|
12
10
|
/**
|
|
@@ -16,10 +14,6 @@ import { RuntimeFactoryHelper } from "@fluidframework/runtime-utils/internal";
|
|
|
16
14
|
export interface RuntimeFactoryProps {
|
|
17
15
|
defaultStoreFactory: IFluidDataStoreFactory;
|
|
18
16
|
storeFactories: IFluidDataStoreFactory[];
|
|
19
|
-
/**
|
|
20
|
-
* @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
|
|
21
|
-
*/
|
|
22
|
-
requestHandlers?: RuntimeRequestHandler[];
|
|
23
17
|
provideEntryPoint: (runtime: IContainerRuntime) => Promise<FluidObject>;
|
|
24
18
|
}
|
|
25
19
|
/**
|
|
@@ -28,10 +22,9 @@ export interface RuntimeFactoryProps {
|
|
|
28
22
|
export declare class RuntimeFactory extends RuntimeFactoryHelper {
|
|
29
23
|
private readonly registry;
|
|
30
24
|
private readonly defaultStoreFactory;
|
|
31
|
-
private readonly requestHandlers;
|
|
32
25
|
private readonly provideEntryPoint;
|
|
33
26
|
constructor(props: RuntimeFactoryProps);
|
|
34
|
-
instantiateFirstTime(runtime:
|
|
35
|
-
preInitialize(context: IContainerContext, existing: boolean): Promise<
|
|
27
|
+
instantiateFirstTime(runtime: IContainerRuntime): Promise<void>;
|
|
28
|
+
preInitialize(context: IContainerContext, existing: boolean): Promise<IContainerRuntime & IRuntime>;
|
|
36
29
|
}
|
|
37
30
|
//# sourceMappingURL=runtimeFactory.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtimeFactory.d.ts","sourceRoot":"","sources":["../src/runtimeFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"runtimeFactory.d.ts","sourceRoot":"","sources":["../src/runtimeFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EACX,iBAAiB,EACjB,QAAQ,EACR,MAAM,gDAAgD,CAAC;AAExD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wDAAwD,CAAC;AAChG,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,KAAK,EACX,sBAAsB,EAEtB,MAAM,8CAA8C,CAAC;AACtD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wCAAwC,CAAC;AAI9E;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IACnC,mBAAmB,EAAE,sBAAsB,CAAC;IAC5C,cAAc,EAAE,sBAAsB,EAAE,CAAC;IACzC,iBAAiB,EAAE,CAAC,OAAO,EAAE,iBAAiB,KAAK,OAAO,CAAC,WAAW,CAAC,CAAC;CACxE;AAED;;GAEG;AACH,qBAAa,cAAe,SAAQ,oBAAoB;IACvD,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAqC;IAE9D,OAAO,CAAC,QAAQ,CAAC,mBAAmB,CAAyB;IAC7D,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAuD;gBAEtE,KAAK,EAAE,mBAAmB;IAchC,oBAAoB,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC;IAK/D,aAAa,CACzB,OAAO,EAAE,iBAAiB,EAC1B,QAAQ,EAAE,OAAO,GACf,OAAO,CAAC,iBAAiB,GAAG,QAAQ,CAAC;CAUxC"}
|
package/lib/runtimeFactory.js
CHANGED
|
@@ -2,10 +2,7 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
// eslint-disable-next-line import/no-deprecated
|
|
8
|
-
buildRuntimeRequestHandler, } from "@fluidframework/request-handler/internal";
|
|
5
|
+
import { loadContainerRuntime } from "@fluidframework/container-runtime/internal";
|
|
9
6
|
import { RuntimeFactoryHelper } from "@fluidframework/runtime-utils/internal";
|
|
10
7
|
const defaultStoreId = "";
|
|
11
8
|
/**
|
|
@@ -16,7 +13,6 @@ export class RuntimeFactory extends RuntimeFactoryHelper {
|
|
|
16
13
|
super();
|
|
17
14
|
this.defaultStoreFactory = props.defaultStoreFactory;
|
|
18
15
|
this.provideEntryPoint = props.provideEntryPoint;
|
|
19
|
-
this.requestHandlers = props.requestHandlers ?? [];
|
|
20
16
|
const storeFactories = props.storeFactories ?? [this.defaultStoreFactory];
|
|
21
17
|
this.registry = (storeFactories.includes(this.defaultStoreFactory)
|
|
22
18
|
? storeFactories
|
|
@@ -27,12 +23,10 @@ export class RuntimeFactory extends RuntimeFactoryHelper {
|
|
|
27
23
|
await dataStore.trySetAlias(defaultStoreId);
|
|
28
24
|
}
|
|
29
25
|
async preInitialize(context, existing) {
|
|
30
|
-
const runtime = await
|
|
26
|
+
const runtime = await loadContainerRuntime({
|
|
31
27
|
context,
|
|
32
28
|
registryEntries: this.registry,
|
|
33
29
|
existing,
|
|
34
|
-
// eslint-disable-next-line import/no-deprecated
|
|
35
|
-
requestHandler: buildRuntimeRequestHandler(...this.requestHandlers),
|
|
36
30
|
provideEntryPoint: this.provideEntryPoint,
|
|
37
31
|
});
|
|
38
32
|
return runtime;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtimeFactory.js","sourceRoot":"","sources":["../src/runtimeFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"runtimeFactory.js","sourceRoot":"","sources":["../src/runtimeFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH,OAAO,EAAE,oBAAoB,EAAE,MAAM,4CAA4C,CAAC;AAOlF,OAAO,EAAE,oBAAoB,EAAE,MAAM,wCAAwC,CAAC;AAE9E,MAAM,cAAc,GAAG,EAAW,CAAC;AAYnC;;GAEG;AACH,MAAM,OAAO,cAAe,SAAQ,oBAAoB;IAMvD,YAAmB,KAA0B;QAC5C,KAAK,EAAE,CAAC;QAER,IAAI,CAAC,mBAAmB,GAAG,KAAK,CAAC,mBAAmB,CAAC;QACrD,IAAI,CAAC,iBAAiB,GAAG,KAAK,CAAC,iBAAiB,CAAC;QACjD,MAAM,cAAc,GAAG,KAAK,CAAC,cAAc,IAAI,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC;QAE1E,IAAI,CAAC,QAAQ,GAAG,CACf,cAAc,CAAC,QAAQ,CAAC,IAAI,CAAC,mBAAmB,CAAC;YAChD,CAAC,CAAC,cAAc;YAChB,CAAC,CAAC,CAAC,GAAG,cAAc,EAAE,IAAI,CAAC,mBAAmB,CAAC,CAChD,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,CAAuC,CAAC;IACnF,CAAC;IAEM,KAAK,CAAC,oBAAoB,CAAC,OAA0B;QAC3D,MAAM,SAAS,GAAG,MAAM,OAAO,CAAC,eAAe,CAAC,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,CAAC;QAC/E,MAAM,SAAS,CAAC,WAAW,CAAC,cAAc,CAAC,CAAC;IAC7C,CAAC;IAEM,KAAK,CAAC,aAAa,CACzB,OAA0B,EAC1B,QAAiB;QAEjB,MAAM,OAAO,GAAG,MAAM,oBAAoB,CAAC;YAC1C,OAAO;YACP,eAAe,EAAE,IAAI,CAAC,QAAQ;YAC9B,QAAQ;YACR,iBAAiB,EAAE,IAAI,CAAC,iBAAiB;SACzC,CAAC,CAAC;QAEH,OAAO,OAAO,CAAC;IAChB,CAAC;CACD","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type {\n\tIContainerContext,\n\tIRuntime,\n} from \"@fluidframework/container-definitions/internal\";\nimport { loadContainerRuntime } from \"@fluidframework/container-runtime/internal\";\nimport type { IContainerRuntime } from \"@fluidframework/container-runtime-definitions/internal\";\nimport type { FluidObject } from \"@fluidframework/core-interfaces\";\nimport type {\n\tIFluidDataStoreFactory,\n\tNamedFluidDataStoreRegistryEntries,\n} from \"@fluidframework/runtime-definitions/internal\";\nimport { RuntimeFactoryHelper } from \"@fluidframework/runtime-utils/internal\";\n\nconst defaultStoreId = \"\" as const;\n\n/**\n * {@link RuntimeFactory} construction properties.\n * @internal\n */\nexport interface RuntimeFactoryProps {\n\tdefaultStoreFactory: IFluidDataStoreFactory;\n\tstoreFactories: IFluidDataStoreFactory[];\n\tprovideEntryPoint: (runtime: IContainerRuntime) => Promise<FluidObject>;\n}\n\n/**\n * @internal\n */\nexport class RuntimeFactory extends RuntimeFactoryHelper {\n\tprivate readonly registry: NamedFluidDataStoreRegistryEntries;\n\n\tprivate readonly defaultStoreFactory: IFluidDataStoreFactory;\n\tprivate readonly provideEntryPoint: (runtime: IContainerRuntime) => Promise<FluidObject>;\n\n\tpublic constructor(props: RuntimeFactoryProps) {\n\t\tsuper();\n\n\t\tthis.defaultStoreFactory = props.defaultStoreFactory;\n\t\tthis.provideEntryPoint = props.provideEntryPoint;\n\t\tconst storeFactories = props.storeFactories ?? [this.defaultStoreFactory];\n\n\t\tthis.registry = (\n\t\t\tstoreFactories.includes(this.defaultStoreFactory)\n\t\t\t\t? storeFactories\n\t\t\t\t: [...storeFactories, this.defaultStoreFactory]\n\t\t).map((factory) => [factory.type, factory]) as NamedFluidDataStoreRegistryEntries;\n\t}\n\n\tpublic async instantiateFirstTime(runtime: IContainerRuntime): Promise<void> {\n\t\tconst dataStore = await runtime.createDataStore(this.defaultStoreFactory.type);\n\t\tawait dataStore.trySetAlias(defaultStoreId);\n\t}\n\n\tpublic async preInitialize(\n\t\tcontext: IContainerContext,\n\t\texisting: boolean,\n\t): Promise<IContainerRuntime & IRuntime> {\n\t\tconst runtime = await loadContainerRuntime({\n\t\t\tcontext,\n\t\t\tregistryEntries: this.registry,\n\t\t\texisting,\n\t\t\tprovideEntryPoint: this.provideEntryPoint,\n\t\t});\n\n\t\treturn runtime;\n\t}\n}\n"]}
|
package/lib/tsdoc-metadata.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-experimental/data-object-base",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.1",
|
|
4
4
|
"description": "Data object base for synchronously and lazily loaded object scenarios",
|
|
5
5
|
"homepage": "https://fluidframework.com",
|
|
6
6
|
"repository": {
|
|
@@ -33,27 +33,27 @@
|
|
|
33
33
|
"es5/**/*"
|
|
34
34
|
],
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@fluid-internal/client-utils": "2.3.
|
|
37
|
-
"@fluidframework/container-definitions": "2.3.
|
|
38
|
-
"@fluidframework/container-runtime": "2.3.
|
|
39
|
-
"@fluidframework/container-runtime-definitions": "2.3.
|
|
40
|
-
"@fluidframework/core-interfaces": "2.3.
|
|
41
|
-
"@fluidframework/core-utils": "2.3.
|
|
42
|
-
"@fluidframework/datastore": "2.3.
|
|
43
|
-
"@fluidframework/datastore-definitions": "2.3.
|
|
44
|
-
"@fluidframework/request-handler": "2.3.
|
|
45
|
-
"@fluidframework/runtime-definitions": "2.3.
|
|
46
|
-
"@fluidframework/runtime-utils": "2.3.
|
|
47
|
-
"@fluidframework/shared-object-base": "2.3.
|
|
36
|
+
"@fluid-internal/client-utils": "~2.3.1",
|
|
37
|
+
"@fluidframework/container-definitions": "~2.3.1",
|
|
38
|
+
"@fluidframework/container-runtime": "~2.3.1",
|
|
39
|
+
"@fluidframework/container-runtime-definitions": "~2.3.1",
|
|
40
|
+
"@fluidframework/core-interfaces": "~2.3.1",
|
|
41
|
+
"@fluidframework/core-utils": "~2.3.1",
|
|
42
|
+
"@fluidframework/datastore": "~2.3.1",
|
|
43
|
+
"@fluidframework/datastore-definitions": "~2.3.1",
|
|
44
|
+
"@fluidframework/request-handler": "~2.3.1",
|
|
45
|
+
"@fluidframework/runtime-definitions": "~2.3.1",
|
|
46
|
+
"@fluidframework/runtime-utils": "~2.3.1",
|
|
47
|
+
"@fluidframework/shared-object-base": "~2.3.1"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"@arethetypeswrong/cli": "^0.15.2",
|
|
51
51
|
"@biomejs/biome": "~1.8.3",
|
|
52
|
-
"@fluid-tools/build-cli": "^0.
|
|
52
|
+
"@fluid-tools/build-cli": "^0.46.0",
|
|
53
53
|
"@fluidframework/build-common": "^2.0.3",
|
|
54
|
-
"@fluidframework/build-tools": "^0.
|
|
55
|
-
"@fluidframework/eslint-config-fluid": "^5.
|
|
56
|
-
"@microsoft/api-extractor": "
|
|
54
|
+
"@fluidframework/build-tools": "^0.46.0",
|
|
55
|
+
"@fluidframework/eslint-config-fluid": "^5.4.0",
|
|
56
|
+
"@microsoft/api-extractor": "7.47.8",
|
|
57
57
|
"@types/node": "^18.19.0",
|
|
58
58
|
"concurrently": "^8.2.1",
|
|
59
59
|
"copyfiles": "^2.4.1",
|
|
@@ -64,7 +64,8 @@
|
|
|
64
64
|
},
|
|
65
65
|
"typeValidation": {
|
|
66
66
|
"disabled": true,
|
|
67
|
-
"broken": {}
|
|
67
|
+
"broken": {},
|
|
68
|
+
"entrypoint": "internal"
|
|
68
69
|
},
|
|
69
70
|
"scripts": {
|
|
70
71
|
"build": "fluid-build . --task build",
|