@fluidframework/runtime-utils 2.10.0 → 2.12.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/CHANGELOG.md +8 -0
- package/api-report/runtime-utils.legacy.alpha.api.md +0 -4
- package/dist/runtimeFactoryHelper.d.ts +19 -0
- package/dist/runtimeFactoryHelper.d.ts.map +1 -1
- package/dist/runtimeFactoryHelper.js +14 -0
- package/dist/runtimeFactoryHelper.js.map +1 -1
- package/lib/runtimeFactoryHelper.d.ts +19 -0
- package/lib/runtimeFactoryHelper.d.ts.map +1 -1
- package/lib/runtimeFactoryHelper.js +14 -0
- package/lib/runtimeFactoryHelper.js.map +1 -1
- package/package.json +15 -15
- package/src/runtimeFactoryHelper.ts +19 -0
package/CHANGELOG.md
CHANGED
|
@@ -52,17 +52,13 @@ export class RequestParser implements IRequest {
|
|
|
52
52
|
|
|
53
53
|
// @alpha (undocumented)
|
|
54
54
|
export abstract class RuntimeFactoryHelper<T = IContainerRuntime> implements IRuntimeFactory {
|
|
55
|
-
// (undocumented)
|
|
56
55
|
hasInitialized(_runtime: T): Promise<void>;
|
|
57
|
-
// (undocumented)
|
|
58
56
|
instantiateFirstTime(_runtime: T): Promise<void>;
|
|
59
|
-
// (undocumented)
|
|
60
57
|
instantiateFromExisting(_runtime: T): Promise<void>;
|
|
61
58
|
// (undocumented)
|
|
62
59
|
instantiateRuntime(context: IContainerContext, existing: boolean): Promise<IRuntime>;
|
|
63
60
|
// (undocumented)
|
|
64
61
|
get IRuntimeFactory(): this;
|
|
65
|
-
// (undocumented)
|
|
66
62
|
abstract preInitialize(context: IContainerContext, existing: boolean): Promise<IRuntime & T>;
|
|
67
63
|
}
|
|
68
64
|
|
|
@@ -11,9 +11,28 @@ import { IContainerRuntime } from "@fluidframework/container-runtime-definitions
|
|
|
11
11
|
export declare abstract class RuntimeFactoryHelper<T = IContainerRuntime> implements IRuntimeFactory {
|
|
12
12
|
get IRuntimeFactory(): this;
|
|
13
13
|
instantiateRuntime(context: IContainerContext, existing: boolean): Promise<IRuntime>;
|
|
14
|
+
/**
|
|
15
|
+
* Called at the start of initializing a container, to create the container runtime instance.
|
|
16
|
+
* @param context - The context for the container being initialized
|
|
17
|
+
* @param existing - Whether the container already exists and is being loaded (else it's being created new just now)
|
|
18
|
+
*/
|
|
14
19
|
abstract preInitialize(context: IContainerContext, existing: boolean): Promise<IRuntime & T>;
|
|
20
|
+
/**
|
|
21
|
+
* Called the one time the container is created, and not on any subsequent load.
|
|
22
|
+
* i.e. only when it's initialized on the client that first created it
|
|
23
|
+
* @param runtime - The runtime for the container being initialized
|
|
24
|
+
*/
|
|
15
25
|
instantiateFirstTime(_runtime: T): Promise<void>;
|
|
26
|
+
/**
|
|
27
|
+
* Called every time the container runtime is loaded for an existing container.
|
|
28
|
+
* i.e. every time it's initialized _except_ for when it is first created
|
|
29
|
+
* @param runtime - The runtime for the container being initialized
|
|
30
|
+
*/
|
|
16
31
|
instantiateFromExisting(_runtime: T): Promise<void>;
|
|
32
|
+
/**
|
|
33
|
+
* Called at the end of initializing a container, after the runtime has been created or loaded.
|
|
34
|
+
* @param runtime - The runtime for the container being initialized
|
|
35
|
+
*/
|
|
17
36
|
hasInitialized(_runtime: T): Promise<void>;
|
|
18
37
|
}
|
|
19
38
|
//# sourceMappingURL=runtimeFactoryHelper.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtimeFactoryHelper.d.ts","sourceRoot":"","sources":["../src/runtimeFactoryHelper.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,iBAAiB,EACjB,QAAQ,EACR,eAAe,EACf,MAAM,gDAAgD,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wDAAwD,CAAC;AAE3F;;;GAGG;AACH,8BAAsB,oBAAoB,CAAC,CAAC,GAAG,iBAAiB,CAAE,YAAW,eAAe;IAC3F,IAAW,eAAe,SAEzB;IAEY,kBAAkB,CAC9B,OAAO,EAAE,iBAAiB,EAC1B,QAAQ,EAAE,OAAO,GACf,OAAO,CAAC,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"runtimeFactoryHelper.d.ts","sourceRoot":"","sources":["../src/runtimeFactoryHelper.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,iBAAiB,EACjB,QAAQ,EACR,eAAe,EACf,MAAM,gDAAgD,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wDAAwD,CAAC;AAE3F;;;GAGG;AACH,8BAAsB,oBAAoB,CAAC,CAAC,GAAG,iBAAiB,CAAE,YAAW,eAAe;IAC3F,IAAW,eAAe,SAEzB;IAEY,kBAAkB,CAC9B,OAAO,EAAE,iBAAiB,EAC1B,QAAQ,EAAE,OAAO,GACf,OAAO,CAAC,QAAQ,CAAC;IASpB;;;;OAIG;aACa,aAAa,CAC5B,OAAO,EAAE,iBAAiB,EAC1B,QAAQ,EAAE,OAAO,GACf,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;IACxB;;;;OAIG;IACU,oBAAoB,CAAC,QAAQ,EAAE,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAC7D;;;;OAIG;IACU,uBAAuB,CAAC,QAAQ,EAAE,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAChE;;;OAGG;IACU,cAAc,CAAC,QAAQ,EAAE,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;CACvD"}
|
|
@@ -21,8 +21,22 @@ class RuntimeFactoryHelper {
|
|
|
21
21
|
await this.hasInitialized(runtime);
|
|
22
22
|
return runtime;
|
|
23
23
|
}
|
|
24
|
+
/**
|
|
25
|
+
* Called the one time the container is created, and not on any subsequent load.
|
|
26
|
+
* i.e. only when it's initialized on the client that first created it
|
|
27
|
+
* @param runtime - The runtime for the container being initialized
|
|
28
|
+
*/
|
|
24
29
|
async instantiateFirstTime(_runtime) { }
|
|
30
|
+
/**
|
|
31
|
+
* Called every time the container runtime is loaded for an existing container.
|
|
32
|
+
* i.e. every time it's initialized _except_ for when it is first created
|
|
33
|
+
* @param runtime - The runtime for the container being initialized
|
|
34
|
+
*/
|
|
25
35
|
async instantiateFromExisting(_runtime) { }
|
|
36
|
+
/**
|
|
37
|
+
* Called at the end of initializing a container, after the runtime has been created or loaded.
|
|
38
|
+
* @param runtime - The runtime for the container being initialized
|
|
39
|
+
*/
|
|
26
40
|
async hasInitialized(_runtime) { }
|
|
27
41
|
}
|
|
28
42
|
exports.RuntimeFactoryHelper = RuntimeFactoryHelper;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtimeFactoryHelper.js","sourceRoot":"","sources":["../src/runtimeFactoryHelper.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AASH;;;GAGG;AACH,MAAsB,oBAAoB;IACzC,IAAW,eAAe;QACzB,OAAO,IAAI,CAAC;IACb,CAAC;IAEM,KAAK,CAAC,kBAAkB,CAC9B,OAA0B,EAC1B,QAAiB;QAEjB,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;QAC5D,MAAM,CAAC,QAAQ;YACd,CAAC,CAAC,IAAI,CAAC,uBAAuB,CAAC,OAAO,CAAC;YACvC,CAAC,CAAC,IAAI,CAAC,oBAAoB,CAAC,OAAO,CAAC,CAAC,CAAC;QACvC,MAAM,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;QACnC,OAAO,OAAO,CAAC;IAChB,CAAC;
|
|
1
|
+
{"version":3,"file":"runtimeFactoryHelper.js","sourceRoot":"","sources":["../src/runtimeFactoryHelper.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AASH;;;GAGG;AACH,MAAsB,oBAAoB;IACzC,IAAW,eAAe;QACzB,OAAO,IAAI,CAAC;IACb,CAAC;IAEM,KAAK,CAAC,kBAAkB,CAC9B,OAA0B,EAC1B,QAAiB;QAEjB,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;QAC5D,MAAM,CAAC,QAAQ;YACd,CAAC,CAAC,IAAI,CAAC,uBAAuB,CAAC,OAAO,CAAC;YACvC,CAAC,CAAC,IAAI,CAAC,oBAAoB,CAAC,OAAO,CAAC,CAAC,CAAC;QACvC,MAAM,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;QACnC,OAAO,OAAO,CAAC;IAChB,CAAC;IAWD;;;;OAIG;IACI,KAAK,CAAC,oBAAoB,CAAC,QAAW,IAAkB,CAAC;IAChE;;;;OAIG;IACI,KAAK,CAAC,uBAAuB,CAAC,QAAW,IAAkB,CAAC;IACnE;;;OAGG;IACI,KAAK,CAAC,cAAc,CAAC,QAAW,IAAkB,CAAC;CAC1D;AA3CD,oDA2CC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport {\n\tIContainerContext,\n\tIRuntime,\n\tIRuntimeFactory,\n} from \"@fluidframework/container-definitions/internal\";\nimport { IContainerRuntime } from \"@fluidframework/container-runtime-definitions/internal\";\n\n/**\n * @legacy\n * @alpha\n */\nexport abstract class RuntimeFactoryHelper<T = IContainerRuntime> implements IRuntimeFactory {\n\tpublic get IRuntimeFactory() {\n\t\treturn this;\n\t}\n\n\tpublic async instantiateRuntime(\n\t\tcontext: IContainerContext,\n\t\texisting: boolean,\n\t): Promise<IRuntime> {\n\t\tconst runtime = await this.preInitialize(context, existing);\n\t\tawait (existing\n\t\t\t? this.instantiateFromExisting(runtime)\n\t\t\t: this.instantiateFirstTime(runtime));\n\t\tawait this.hasInitialized(runtime);\n\t\treturn runtime;\n\t}\n\n\t/**\n\t * Called at the start of initializing a container, to create the container runtime instance.\n\t * @param context - The context for the container being initialized\n\t * @param existing - Whether the container already exists and is being loaded (else it's being created new just now)\n\t */\n\tpublic abstract preInitialize(\n\t\tcontext: IContainerContext,\n\t\texisting: boolean,\n\t): Promise<IRuntime & T>;\n\t/**\n\t * Called the one time the container is created, and not on any subsequent load.\n\t * i.e. only when it's initialized on the client that first created it\n\t * @param runtime - The runtime for the container being initialized\n\t */\n\tpublic async instantiateFirstTime(_runtime: T): Promise<void> {}\n\t/**\n\t * Called every time the container runtime is loaded for an existing container.\n\t * i.e. every time it's initialized _except_ for when it is first created\n\t * @param runtime - The runtime for the container being initialized\n\t */\n\tpublic async instantiateFromExisting(_runtime: T): Promise<void> {}\n\t/**\n\t * Called at the end of initializing a container, after the runtime has been created or loaded.\n\t * @param runtime - The runtime for the container being initialized\n\t */\n\tpublic async hasInitialized(_runtime: T): Promise<void> {}\n}\n"]}
|
|
@@ -11,9 +11,28 @@ import { IContainerRuntime } from "@fluidframework/container-runtime-definitions
|
|
|
11
11
|
export declare abstract class RuntimeFactoryHelper<T = IContainerRuntime> implements IRuntimeFactory {
|
|
12
12
|
get IRuntimeFactory(): this;
|
|
13
13
|
instantiateRuntime(context: IContainerContext, existing: boolean): Promise<IRuntime>;
|
|
14
|
+
/**
|
|
15
|
+
* Called at the start of initializing a container, to create the container runtime instance.
|
|
16
|
+
* @param context - The context for the container being initialized
|
|
17
|
+
* @param existing - Whether the container already exists and is being loaded (else it's being created new just now)
|
|
18
|
+
*/
|
|
14
19
|
abstract preInitialize(context: IContainerContext, existing: boolean): Promise<IRuntime & T>;
|
|
20
|
+
/**
|
|
21
|
+
* Called the one time the container is created, and not on any subsequent load.
|
|
22
|
+
* i.e. only when it's initialized on the client that first created it
|
|
23
|
+
* @param runtime - The runtime for the container being initialized
|
|
24
|
+
*/
|
|
15
25
|
instantiateFirstTime(_runtime: T): Promise<void>;
|
|
26
|
+
/**
|
|
27
|
+
* Called every time the container runtime is loaded for an existing container.
|
|
28
|
+
* i.e. every time it's initialized _except_ for when it is first created
|
|
29
|
+
* @param runtime - The runtime for the container being initialized
|
|
30
|
+
*/
|
|
16
31
|
instantiateFromExisting(_runtime: T): Promise<void>;
|
|
32
|
+
/**
|
|
33
|
+
* Called at the end of initializing a container, after the runtime has been created or loaded.
|
|
34
|
+
* @param runtime - The runtime for the container being initialized
|
|
35
|
+
*/
|
|
17
36
|
hasInitialized(_runtime: T): Promise<void>;
|
|
18
37
|
}
|
|
19
38
|
//# sourceMappingURL=runtimeFactoryHelper.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtimeFactoryHelper.d.ts","sourceRoot":"","sources":["../src/runtimeFactoryHelper.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,iBAAiB,EACjB,QAAQ,EACR,eAAe,EACf,MAAM,gDAAgD,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wDAAwD,CAAC;AAE3F;;;GAGG;AACH,8BAAsB,oBAAoB,CAAC,CAAC,GAAG,iBAAiB,CAAE,YAAW,eAAe;IAC3F,IAAW,eAAe,SAEzB;IAEY,kBAAkB,CAC9B,OAAO,EAAE,iBAAiB,EAC1B,QAAQ,EAAE,OAAO,GACf,OAAO,CAAC,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"runtimeFactoryHelper.d.ts","sourceRoot":"","sources":["../src/runtimeFactoryHelper.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,iBAAiB,EACjB,QAAQ,EACR,eAAe,EACf,MAAM,gDAAgD,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wDAAwD,CAAC;AAE3F;;;GAGG;AACH,8BAAsB,oBAAoB,CAAC,CAAC,GAAG,iBAAiB,CAAE,YAAW,eAAe;IAC3F,IAAW,eAAe,SAEzB;IAEY,kBAAkB,CAC9B,OAAO,EAAE,iBAAiB,EAC1B,QAAQ,EAAE,OAAO,GACf,OAAO,CAAC,QAAQ,CAAC;IASpB;;;;OAIG;aACa,aAAa,CAC5B,OAAO,EAAE,iBAAiB,EAC1B,QAAQ,EAAE,OAAO,GACf,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;IACxB;;;;OAIG;IACU,oBAAoB,CAAC,QAAQ,EAAE,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAC7D;;;;OAIG;IACU,uBAAuB,CAAC,QAAQ,EAAE,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAChE;;;OAGG;IACU,cAAc,CAAC,QAAQ,EAAE,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;CACvD"}
|
|
@@ -18,8 +18,22 @@ export class RuntimeFactoryHelper {
|
|
|
18
18
|
await this.hasInitialized(runtime);
|
|
19
19
|
return runtime;
|
|
20
20
|
}
|
|
21
|
+
/**
|
|
22
|
+
* Called the one time the container is created, and not on any subsequent load.
|
|
23
|
+
* i.e. only when it's initialized on the client that first created it
|
|
24
|
+
* @param runtime - The runtime for the container being initialized
|
|
25
|
+
*/
|
|
21
26
|
async instantiateFirstTime(_runtime) { }
|
|
27
|
+
/**
|
|
28
|
+
* Called every time the container runtime is loaded for an existing container.
|
|
29
|
+
* i.e. every time it's initialized _except_ for when it is first created
|
|
30
|
+
* @param runtime - The runtime for the container being initialized
|
|
31
|
+
*/
|
|
22
32
|
async instantiateFromExisting(_runtime) { }
|
|
33
|
+
/**
|
|
34
|
+
* Called at the end of initializing a container, after the runtime has been created or loaded.
|
|
35
|
+
* @param runtime - The runtime for the container being initialized
|
|
36
|
+
*/
|
|
23
37
|
async hasInitialized(_runtime) { }
|
|
24
38
|
}
|
|
25
39
|
//# sourceMappingURL=runtimeFactoryHelper.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtimeFactoryHelper.js","sourceRoot":"","sources":["../src/runtimeFactoryHelper.ts"],"names":[],"mappings":"AAAA;;;GAGG;AASH;;;GAGG;AACH,MAAM,OAAgB,oBAAoB;IACzC,IAAW,eAAe;QACzB,OAAO,IAAI,CAAC;IACb,CAAC;IAEM,KAAK,CAAC,kBAAkB,CAC9B,OAA0B,EAC1B,QAAiB;QAEjB,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;QAC5D,MAAM,CAAC,QAAQ;YACd,CAAC,CAAC,IAAI,CAAC,uBAAuB,CAAC,OAAO,CAAC;YACvC,CAAC,CAAC,IAAI,CAAC,oBAAoB,CAAC,OAAO,CAAC,CAAC,CAAC;QACvC,MAAM,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;QACnC,OAAO,OAAO,CAAC;IAChB,CAAC;
|
|
1
|
+
{"version":3,"file":"runtimeFactoryHelper.js","sourceRoot":"","sources":["../src/runtimeFactoryHelper.ts"],"names":[],"mappings":"AAAA;;;GAGG;AASH;;;GAGG;AACH,MAAM,OAAgB,oBAAoB;IACzC,IAAW,eAAe;QACzB,OAAO,IAAI,CAAC;IACb,CAAC;IAEM,KAAK,CAAC,kBAAkB,CAC9B,OAA0B,EAC1B,QAAiB;QAEjB,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;QAC5D,MAAM,CAAC,QAAQ;YACd,CAAC,CAAC,IAAI,CAAC,uBAAuB,CAAC,OAAO,CAAC;YACvC,CAAC,CAAC,IAAI,CAAC,oBAAoB,CAAC,OAAO,CAAC,CAAC,CAAC;QACvC,MAAM,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;QACnC,OAAO,OAAO,CAAC;IAChB,CAAC;IAWD;;;;OAIG;IACI,KAAK,CAAC,oBAAoB,CAAC,QAAW,IAAkB,CAAC;IAChE;;;;OAIG;IACI,KAAK,CAAC,uBAAuB,CAAC,QAAW,IAAkB,CAAC;IACnE;;;OAGG;IACI,KAAK,CAAC,cAAc,CAAC,QAAW,IAAkB,CAAC;CAC1D","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport {\n\tIContainerContext,\n\tIRuntime,\n\tIRuntimeFactory,\n} from \"@fluidframework/container-definitions/internal\";\nimport { IContainerRuntime } from \"@fluidframework/container-runtime-definitions/internal\";\n\n/**\n * @legacy\n * @alpha\n */\nexport abstract class RuntimeFactoryHelper<T = IContainerRuntime> implements IRuntimeFactory {\n\tpublic get IRuntimeFactory() {\n\t\treturn this;\n\t}\n\n\tpublic async instantiateRuntime(\n\t\tcontext: IContainerContext,\n\t\texisting: boolean,\n\t): Promise<IRuntime> {\n\t\tconst runtime = await this.preInitialize(context, existing);\n\t\tawait (existing\n\t\t\t? this.instantiateFromExisting(runtime)\n\t\t\t: this.instantiateFirstTime(runtime));\n\t\tawait this.hasInitialized(runtime);\n\t\treturn runtime;\n\t}\n\n\t/**\n\t * Called at the start of initializing a container, to create the container runtime instance.\n\t * @param context - The context for the container being initialized\n\t * @param existing - Whether the container already exists and is being loaded (else it's being created new just now)\n\t */\n\tpublic abstract preInitialize(\n\t\tcontext: IContainerContext,\n\t\texisting: boolean,\n\t): Promise<IRuntime & T>;\n\t/**\n\t * Called the one time the container is created, and not on any subsequent load.\n\t * i.e. only when it's initialized on the client that first created it\n\t * @param runtime - The runtime for the container being initialized\n\t */\n\tpublic async instantiateFirstTime(_runtime: T): Promise<void> {}\n\t/**\n\t * Called every time the container runtime is loaded for an existing container.\n\t * i.e. every time it's initialized _except_ for when it is first created\n\t * @param runtime - The runtime for the container being initialized\n\t */\n\tpublic async instantiateFromExisting(_runtime: T): Promise<void> {}\n\t/**\n\t * Called at the end of initializing a container, after the runtime has been created or loaded.\n\t * @param runtime - The runtime for the container being initialized\n\t */\n\tpublic async hasInitialized(_runtime: T): Promise<void> {}\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluidframework/runtime-utils",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.12.0",
|
|
4
4
|
"description": "Collection of utility functions for Fluid Runtime",
|
|
5
5
|
"homepage": "https://fluidframework.com",
|
|
6
6
|
"repository": {
|
|
@@ -69,26 +69,26 @@
|
|
|
69
69
|
"temp-directory": "nyc/.nyc_output"
|
|
70
70
|
},
|
|
71
71
|
"dependencies": {
|
|
72
|
-
"@fluid-internal/client-utils": "~2.
|
|
73
|
-
"@fluidframework/container-definitions": "~2.
|
|
74
|
-
"@fluidframework/container-runtime-definitions": "~2.
|
|
75
|
-
"@fluidframework/core-interfaces": "~2.
|
|
76
|
-
"@fluidframework/core-utils": "~2.
|
|
77
|
-
"@fluidframework/datastore-definitions": "~2.
|
|
78
|
-
"@fluidframework/driver-definitions": "~2.
|
|
79
|
-
"@fluidframework/driver-utils": "~2.
|
|
80
|
-
"@fluidframework/runtime-definitions": "~2.
|
|
81
|
-
"@fluidframework/telemetry-utils": "~2.
|
|
72
|
+
"@fluid-internal/client-utils": "~2.12.0",
|
|
73
|
+
"@fluidframework/container-definitions": "~2.12.0",
|
|
74
|
+
"@fluidframework/container-runtime-definitions": "~2.12.0",
|
|
75
|
+
"@fluidframework/core-interfaces": "~2.12.0",
|
|
76
|
+
"@fluidframework/core-utils": "~2.12.0",
|
|
77
|
+
"@fluidframework/datastore-definitions": "~2.12.0",
|
|
78
|
+
"@fluidframework/driver-definitions": "~2.12.0",
|
|
79
|
+
"@fluidframework/driver-utils": "~2.12.0",
|
|
80
|
+
"@fluidframework/runtime-definitions": "~2.12.0",
|
|
81
|
+
"@fluidframework/telemetry-utils": "~2.12.0"
|
|
82
82
|
},
|
|
83
83
|
"devDependencies": {
|
|
84
|
-
"@arethetypeswrong/cli": "^0.
|
|
84
|
+
"@arethetypeswrong/cli": "^0.17.1",
|
|
85
85
|
"@biomejs/biome": "~1.9.3",
|
|
86
|
-
"@fluid-internal/mocha-test-setup": "~2.
|
|
86
|
+
"@fluid-internal/mocha-test-setup": "~2.12.0",
|
|
87
87
|
"@fluid-tools/build-cli": "^0.51.0",
|
|
88
88
|
"@fluidframework/build-common": "^2.0.3",
|
|
89
89
|
"@fluidframework/build-tools": "^0.51.0",
|
|
90
|
-
"@fluidframework/eslint-config-fluid": "^5.
|
|
91
|
-
"@fluidframework/runtime-utils-previous": "npm:@fluidframework/runtime-utils@2.
|
|
90
|
+
"@fluidframework/eslint-config-fluid": "^5.6.0",
|
|
91
|
+
"@fluidframework/runtime-utils-previous": "npm:@fluidframework/runtime-utils@2.11.0",
|
|
92
92
|
"@microsoft/api-extractor": "7.47.8",
|
|
93
93
|
"@types/mocha": "^9.1.1",
|
|
94
94
|
"@types/node": "^18.19.0",
|
|
@@ -31,11 +31,30 @@ export abstract class RuntimeFactoryHelper<T = IContainerRuntime> implements IRu
|
|
|
31
31
|
return runtime;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
+
/**
|
|
35
|
+
* Called at the start of initializing a container, to create the container runtime instance.
|
|
36
|
+
* @param context - The context for the container being initialized
|
|
37
|
+
* @param existing - Whether the container already exists and is being loaded (else it's being created new just now)
|
|
38
|
+
*/
|
|
34
39
|
public abstract preInitialize(
|
|
35
40
|
context: IContainerContext,
|
|
36
41
|
existing: boolean,
|
|
37
42
|
): Promise<IRuntime & T>;
|
|
43
|
+
/**
|
|
44
|
+
* Called the one time the container is created, and not on any subsequent load.
|
|
45
|
+
* i.e. only when it's initialized on the client that first created it
|
|
46
|
+
* @param runtime - The runtime for the container being initialized
|
|
47
|
+
*/
|
|
38
48
|
public async instantiateFirstTime(_runtime: T): Promise<void> {}
|
|
49
|
+
/**
|
|
50
|
+
* Called every time the container runtime is loaded for an existing container.
|
|
51
|
+
* i.e. every time it's initialized _except_ for when it is first created
|
|
52
|
+
* @param runtime - The runtime for the container being initialized
|
|
53
|
+
*/
|
|
39
54
|
public async instantiateFromExisting(_runtime: T): Promise<void> {}
|
|
55
|
+
/**
|
|
56
|
+
* Called at the end of initializing a container, after the runtime has been created or loaded.
|
|
57
|
+
* @param runtime - The runtime for the container being initialized
|
|
58
|
+
*/
|
|
40
59
|
public async hasInitialized(_runtime: T): Promise<void> {}
|
|
41
60
|
}
|