@fluidframework/test-utils 2.13.0 → 2.20.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 CHANGED
@@ -1,5 +1,18 @@
1
1
  # @fluidframework/test-utils
2
2
 
3
+ ## 2.20.0
4
+
5
+ ### Minor Changes
6
+
7
+ - The ContainerRuntime class has been removed ([#23341](https://github.com/microsoft/FluidFramework/pull/23341)) [61ba06aa98](https://github.com/microsoft/FluidFramework/commit/61ba06aa9881c30ffeeedcaaede9c5a1a0c81abd)
8
+
9
+ The `ContainerRuntime` class was [deprecated in version 2.12.0](https://github.com/microsoft/FluidFramework/releases/tag/client_v2.12.0#user-content-the-containerruntime-class-is-now-deprecated-23331) and has been removed.
10
+ Use `IContainerRuntime` to replace type usages and use the free function `loadContainerRuntime` to replace usages of the static method `ContainerRuntime.loadRuntime`.
11
+
12
+ See the [deprecation
13
+ announcement](https://github.com/microsoft/FluidFramework/releases/tag/client_v2.12.0#user-content-the-containerruntime-class-is-now-deprecated-23331)
14
+ for more details about how to update existing code.
15
+
3
16
  ## 2.13.0
4
17
 
5
18
  Dependency updates only.
package/dist/package.json CHANGED
@@ -1,3 +1,4 @@
1
1
  {
2
- "type": "commonjs"
2
+ "type": "commonjs",
3
+ "sideEffects": false
3
4
  }
@@ -5,5 +5,5 @@
5
5
  * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY
6
6
  */
7
7
  export declare const pkgName = "@fluidframework/test-utils";
8
- export declare const pkgVersion = "2.13.0";
8
+ export declare const pkgVersion = "2.20.0";
9
9
  //# sourceMappingURL=packageVersion.d.ts.map
@@ -8,5 +8,5 @@
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
9
  exports.pkgVersion = exports.pkgName = void 0;
10
10
  exports.pkgName = "@fluidframework/test-utils";
11
- exports.pkgVersion = "2.13.0";
11
+ exports.pkgVersion = "2.20.0";
12
12
  //# sourceMappingURL=packageVersion.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEU,QAAA,OAAO,GAAG,4BAA4B,CAAC;AACvC,QAAA,UAAU,GAAG,QAAQ,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n *\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY\n */\n\nexport const pkgName = \"@fluidframework/test-utils\";\nexport const pkgVersion = \"2.13.0\";\n"]}
1
+ {"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEU,QAAA,OAAO,GAAG,4BAA4B,CAAC;AACvC,QAAA,UAAU,GAAG,QAAQ,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n *\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY\n */\n\nexport const pkgName = \"@fluidframework/test-utils\";\nexport const pkgVersion = \"2.20.0\";\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"testContainerRuntimeFactory.d.ts","sourceRoot":"","sources":["../src/testContainerRuntimeFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,iBAAiB,EAAE,QAAQ,EAAE,MAAM,gDAAgD,CAAC;AAC7F,OAAO,EAEN,gBAAgB,EAEhB,KAAK,gCAAgC,EACrC,MAAM,4CAA4C,CAAC;AACpD,OAAO,EACN,iBAAiB,EAGjB,MAAM,wDAAwD,CAAC;AAIhE,OAAO,EAEN,qBAAqB,EAGrB,MAAM,0CAA0C,CAAC;AAClD,OAAO,EACN,sBAAsB,EAEtB,MAAM,8CAA8C,CAAC;AAqCtD;;;GAGG;AACH,eAAO,MAAM,iCAAiC,yBAEvB,uBAAuB;eAI9B,MAA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;sCAKL,gBAAgB,GAAG,QAAQ,IAAI,CAAC;yCAkB7B,gBAAgB,GAAG,QAAQ,IAAI,CAAC;+BAcpE,iBAAiB,YAChB,OAAO,GACf,QAAQ,QAAQ,GAAG,iBAAiB,CAAC;;;;;CAwDzC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,2BAA2B;eAlHxB,MAAM,oBACM,sBAAsB,mBACxB,gCAAgC,oBAW/B,qBAAqB,EAAE;cAblC,MAAM;0BACM,sBAAsB;wBACxB,gCAAgC;yBAW/B,qBAAqB,EAAE;sCAKL,gBAAgB,GAAG,QAAQ,IAAI,CAAC;yCAkB7B,gBAAgB,GAAG,QAAQ,IAAI,CAAC;+BAcpE,iBAAiB,YAChB,OAAO,GACf,QAAQ,QAAQ,GAAG,iBAAiB,CAAC;;;;;CA8DoD,CAAC"}
@@ -25,9 +25,7 @@ const backCompat_DefaultRouteRequestHandler = (defaultRootId) => {
25
25
  * Create a container runtime factory class that allows you to set runtime options
26
26
  * @internal
27
27
  */
28
- const createTestContainerRuntimeFactory = (
29
- // eslint-disable-next-line import/no-deprecated -- ContainerRuntime class to be moved to internal scope
30
- containerRuntimeCtor) => {
28
+ const createTestContainerRuntimeFactory = (containerRuntimeCtor) => {
31
29
  return class extends internal_4.RuntimeFactoryHelper {
32
30
  constructor(type, dataStoreFactory, runtimeOptions = {
33
31
  summaryOptions: {
@@ -47,7 +45,6 @@ containerRuntimeCtor) => {
47
45
  this.runtimeOptions = runtimeOptions;
48
46
  this.requestHandlers = requestHandlers;
49
47
  }
50
- // eslint-disable-next-line import/no-deprecated -- ContainerRuntime class to be moved to internal scope
51
48
  async instantiateFirstTime(runtime) {
52
49
  // Back-compat - old code does not return IDataStore for rootContext.attachRuntime() call!
53
50
  // Thus need to leverage old API createDetachedRootDataStore() that is gone in latest releases.
@@ -60,7 +57,6 @@ containerRuntimeCtor) => {
60
57
  const result = await dataStore?.trySetAlias("default");
61
58
  (0, internal_2.assert)(result === "Success" || result === undefined, "success");
62
59
  }
63
- // eslint-disable-next-line import/no-deprecated -- ContainerRuntime class to be moved to internal scope
64
60
  async instantiateFromExisting(runtime) {
65
61
  // Validate we can load root data stores.
66
62
  // We should be able to load any data store that was created in initializeFirstTime!
@@ -122,6 +118,5 @@ exports.createTestContainerRuntimeFactory = createTestContainerRuntimeFactory;
122
118
  * A container runtime factory that allows you to set runtime options
123
119
  * @internal
124
120
  */
125
- // eslint-disable-next-line import/no-deprecated -- ContainerRuntime class to be moved to internal scope
126
121
  exports.TestContainerRuntimeFactory = (0, exports.createTestContainerRuntimeFactory)(internal_1.ContainerRuntime);
127
122
  //# sourceMappingURL=testContainerRuntimeFactory.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"testContainerRuntimeFactory.js","sourceRoot":"","sources":["../src/testContainerRuntimeFactory.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAGH,yEAKoD;AAQpD,kEAA6D;AAC7D,uEAKkD;AAKlD,qEAA6F;AAO7F,MAAM,qCAAqC,GAAG,CAAC,aAAqB,EAAE,EAAE;IACvE,OAAO,KAAK,EAAE,OAAiB,EAAE,OAA0B,EAAE,EAAE;QAC9D,MAAM,MAAM,GAAG,wBAAa,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QAC7C,IAAI,MAAM,CAAC,SAAS,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACnC,OACC,OACA,CAAC,mBAAmB,CAAC,aAAa,CAAC;gBACnC,GAAG,EAAE,IAAI,aAAa,GAAG,MAAM,CAAC,KAAK,EAAE;gBACvC,OAAO,EAAE,OAAO,CAAC,OAAO;aACxB,CAAC,CAAC;QACJ,CAAC;QACD,OAAO,SAAS,CAAC,CAAC,kBAAkB;IACrC,CAAC,CAAC;AACH,CAAC,CAAC;AAgBF;;;GAGG;AACI,MAAM,iCAAiC,GAAG;AAChD,wGAAwG;AACxG,oBAA6C,EAC5C,EAAE;IACH,OAAO,KAAM,SAAQ,+BAAoB;QACxC,YACQ,IAAY,EACZ,gB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,MAAM,CAAC,KAAK,EAAE;wBAC9B,OAAO,EAAE,OAAO,CAAC,OAAO;qBACxB,CAAC,CAAC;gBACJ,CAAC;gBACD,OAAO,SAAS,CAAC,CAAC,kBAAkB;YACrC,CAAC,CAAC;YACF,OAAO,oBAAoB,CAAC,WAAW,CAAC;gBACvC,OAAO;gBACP,eAAe,EAAE;oBAChB,CAAC,SAAS,EAAE,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;oBACnD,CAAC,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;iBACnD;gBACD,gDAAgD;gBAChD,cAAc,EAAE,IAAA,qCAA0B,EAAC,gBAAgB,EAAE,GAAG,IAAI,CAAC,eAAe,CAAC;gBACrF,iBAAiB;gBACjB,gFAAgF;gBAChF,oBAAoB,EAAE,iBAAiB;gBACvC,cAAc,EAAE,IAAI,CAAC,cAAc;gBACnC,cAAc,EAAE,OAAO,CAAC,KAAK;gBAC7B,QAAQ;aACD,CAAC,CAAC;QACX,CAAC;KACD,CAAC;AACH,CAAC,CAAC;AApHW,QAAA,iCAAiC,qCAoH5C;AAEF;;;GAGG;AACH,wGAAwG;AAC3F,QAAA,2BAA2B,GAAG,IAAA,yCAAiC,EAAC,2BAAgB,CAAC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IContainerContext, IRuntime } from \"@fluidframework/container-definitions/internal\";\nimport {\n\t// eslint-disable-next-line import/no-deprecated -- ContainerRuntime class to be moved to internal scope\n\tContainerRuntime,\n\tDefaultSummaryConfiguration,\n\ttype IContainerRuntimeOptionsInternal,\n} from \"@fluidframework/container-runtime/internal\";\nimport {\n\tIContainerRuntime,\n\t// eslint-disable-next-line import/no-deprecated\n\tIContainerRuntimeWithResolveHandle_Deprecated,\n} from \"@fluidframework/container-runtime-definitions/internal\";\nimport { FluidObject, IRequest, IResponse } from \"@fluidframework/core-interfaces\";\nimport { IFluidHandleContext } from \"@fluidframework/core-interfaces/internal\";\nimport { assert } from \"@fluidframework/core-utils/internal\";\nimport {\n\t// eslint-disable-next-line import/no-deprecated\n\tRuntimeRequestHandler,\n\t// eslint-disable-next-line import/no-deprecated\n\tbuildRuntimeRequestHandler,\n} from \"@fluidframework/request-handler/internal\";\nimport {\n\tIFluidDataStoreFactory,\n\tNamedFluidDataStoreRegistryEntries,\n} from \"@fluidframework/runtime-definitions/internal\";\nimport { RequestParser, RuntimeFactoryHelper } from \"@fluidframework/runtime-utils/internal\";\n\ninterface backCompat_IFluidRouter {\n\tIFluidRouter?: backCompat_IFluidRouter;\n\trequest(request: IRequest): Promise<IResponse>;\n}\n\nconst backCompat_DefaultRouteRequestHandler = (defaultRootId: string) => {\n\treturn async (request: IRequest, runtime: IContainerRuntime) => {\n\t\tconst parser = RequestParser.create(request);\n\t\tif (parser.pathParts.length === 0) {\n\t\t\treturn (\n\t\t\t\truntime as any as Required<FluidObject<IFluidHandleContext>>\n\t\t\t).IFluidHandleContext.resolveHandle({\n\t\t\t\turl: `/${defaultRootId}${parser.query}`,\n\t\t\t\theaders: request.headers,\n\t\t\t});\n\t\t}\n\t\treturn undefined; // continue search\n\t};\n};\n\ninterface backCompat_ContainerRuntime {\n\tload(\n\t\tcontext: IContainerContext,\n\t\tregistryEntries: NamedFluidDataStoreRegistryEntries,\n\t\trequestHandler?: (request: IRequest, runtime: IContainerRuntime) => Promise<IResponse>,\n\t\truntimeOptions?: IContainerRuntimeOptionsInternal,\n\t\tcontainerScope?: FluidObject,\n\t\texisting?: boolean,\n\t\t// eslint-disable-next-line import/no-deprecated -- ContainerRuntime class to be moved to internal scope\n\t\tcontainerRuntimeCtor?: typeof ContainerRuntime,\n\t\t// eslint-disable-next-line import/no-deprecated -- ContainerRuntime class to be moved to internal scope\n\t): Promise<ContainerRuntime>;\n}\n\n/**\n * Create a container runtime factory class that allows you to set runtime options\n * @internal\n */\nexport const createTestContainerRuntimeFactory = (\n\t// eslint-disable-next-line import/no-deprecated -- ContainerRuntime class to be moved to internal scope\n\tcontainerRuntimeCtor: typeof ContainerRuntime,\n) => {\n\treturn class extends RuntimeFactoryHelper {\n\t\tconstructor(\n\t\t\tpublic type: string,\n\t\t\tpublic dataStoreFactory: IFluidDataStoreFactory,\n\t\t\tpublic runtimeOptions: IContainerRuntimeOptionsInternal = {\n\t\t\t\tsummaryOptions: {\n\t\t\t\t\tsummaryConfigOverrides: {\n\t\t\t\t\t\t...DefaultSummaryConfiguration,\n\t\t\t\t\t\t...{\n\t\t\t\t\t\t\tinitialSummarizerDelayMs: 0,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\t// eslint-disable-next-line import/no-deprecated\n\t\t\tpublic requestHandlers: RuntimeRequestHandler[] = [],\n\t\t) {\n\t\t\tsuper();\n\t\t}\n\n\t\t// eslint-disable-next-line import/no-deprecated -- ContainerRuntime class to be moved to internal scope\n\t\tpublic async instantiateFirstTime(runtime: ContainerRuntime): Promise<void> {\n\t\t\t// Back-compat - old code does not return IDataStore for rootContext.attachRuntime() call!\n\t\t\t// Thus need to leverage old API createDetachedRootDataStore() that is gone in latest releases.\n\t\t\tconst rootContext =\n\t\t\t\t\"createDetachedRootDataStore\" in runtime\n\t\t\t\t\t? (runtime as any).createDetachedRootDataStore([this.type], \"default\")\n\t\t\t\t\t: runtime.createDetachedDataStore([this.type]);\n\n\t\t\tconst rootRuntime = await this.dataStoreFactory.instantiateDataStore(\n\t\t\t\trootContext,\n\t\t\t\t/* existing */ false,\n\t\t\t);\n\t\t\tconst dataStore = await rootContext.attachRuntime(this.dataStoreFactory, rootRuntime);\n\n\t\t\tconst result = await dataStore?.trySetAlias(\"default\");\n\t\t\tassert(result === \"Success\" || result === undefined, \"success\");\n\t\t}\n\n\t\t// eslint-disable-next-line import/no-deprecated -- ContainerRuntime class to be moved to internal scope\n\t\tpublic async instantiateFromExisting(runtime: ContainerRuntime): Promise<void> {\n\t\t\t// Validate we can load root data stores.\n\t\t\t// We should be able to load any data store that was created in initializeFirstTime!\n\t\t\t// Note: We use the deprecated `getRootDataStore` from v1.X here to allow for cross-major version compat\n\t\t\t// testing. Can be removed when we no longer support v1.X.\n\t\t\tawait (runtime.getAliasedDataStoreEntryPoint?.(\"default\") ??\n\t\t\t\t(\n\t\t\t\t\truntime as any as {\n\t\t\t\t\t\tgetRootDataStore(id: string, wait?: boolean): Promise<backCompat_IFluidRouter>;\n\t\t\t\t\t}\n\t\t\t\t).getRootDataStore(\"default\"));\n\t\t}\n\n\t\tasync preInitialize(\n\t\t\tcontext: IContainerContext,\n\t\t\texisting: boolean,\n\t\t): Promise<IRuntime & IContainerRuntime> {\n\t\t\tif (containerRuntimeCtor.loadRuntime === undefined) {\n\t\t\t\t// Note: We use the deprecated `load` from v1.X here to allow for cross-major version compat testing.\n\t\t\t\t// Can be removed when we no longer support v1.X.\n\t\t\t\treturn (containerRuntimeCtor as any as backCompat_ContainerRuntime).load(\n\t\t\t\t\tcontext,\n\t\t\t\t\t[\n\t\t\t\t\t\t[\"default\", Promise.resolve(this.dataStoreFactory)],\n\t\t\t\t\t\t[this.type, Promise.resolve(this.dataStoreFactory)],\n\t\t\t\t\t],\n\t\t\t\t\t// eslint-disable-next-line import/no-deprecated\n\t\t\t\t\tbuildRuntimeRequestHandler(\n\t\t\t\t\t\tbackCompat_DefaultRouteRequestHandler(\"default\"),\n\t\t\t\t\t\t...this.requestHandlers,\n\t\t\t\t\t),\n\t\t\t\t\tthis.runtimeOptions,\n\t\t\t\t\tcontext.scope,\n\t\t\t\t\texisting,\n\t\t\t\t);\n\t\t\t}\n\t\t\tconst provideEntryPoint = async (runtime: IContainerRuntime) => {\n\t\t\t\tconst entryPoint = await runtime.getAliasedDataStoreEntryPoint(\"default\");\n\t\t\t\tif (entryPoint === undefined) {\n\t\t\t\t\tthrow new Error(\"default dataStore must exist\");\n\t\t\t\t}\n\t\t\t\treturn entryPoint.get();\n\t\t\t};\n\t\t\tconst getDefaultObject = async (request: IRequest, runtime: IContainerRuntime) => {\n\t\t\t\tconst parser = RequestParser.create(request);\n\t\t\t\tif (parser.pathParts.length === 0) {\n\t\t\t\t\t// This cast is safe as loadContainerRuntime is called below\n\t\t\t\t\t// eslint-disable-next-line import/no-deprecated\n\t\t\t\t\treturn (runtime as IContainerRuntimeWithResolveHandle_Deprecated).resolveHandle({\n\t\t\t\t\t\turl: `/default${parser.query}`,\n\t\t\t\t\t\theaders: request.headers,\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\treturn undefined; // continue search\n\t\t\t};\n\t\t\treturn containerRuntimeCtor.loadRuntime({\n\t\t\t\tcontext,\n\t\t\t\tregistryEntries: [\n\t\t\t\t\t[\"default\", Promise.resolve(this.dataStoreFactory)],\n\t\t\t\t\t[this.type, Promise.resolve(this.dataStoreFactory)],\n\t\t\t\t],\n\t\t\t\t// eslint-disable-next-line import/no-deprecated\n\t\t\t\trequestHandler: buildRuntimeRequestHandler(getDefaultObject, ...this.requestHandlers),\n\t\t\t\tprovideEntryPoint,\n\t\t\t\t// ! This prop is needed for back-compat. Can be removed in 2.0.0-internal.8.0.0\n\t\t\t\tinitializeEntryPoint: provideEntryPoint,\n\t\t\t\truntimeOptions: this.runtimeOptions,\n\t\t\t\tcontainerScope: context.scope,\n\t\t\t\texisting,\n\t\t\t} as any);\n\t\t}\n\t};\n};\n\n/**\n * A container runtime factory that allows you to set runtime options\n * @internal\n */\n// eslint-disable-next-line import/no-deprecated -- ContainerRuntime class to be moved to internal scope\nexport const TestContainerRuntimeFactory = createTestContainerRuntimeFactory(ContainerRuntime);\n"]}
1
+ {"version":3,"file":"testContainerRuntimeFactory.js","sourceRoot":"","sources":["../src/testContainerRuntimeFactory.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAGH,yEAIoD;AAQpD,kEAA6D;AAC7D,uEAKkD;AAKlD,qEAA6F;AAO7F,MAAM,qCAAqC,GAAG,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CAAC;QACX,CAAC;KACD,CAAC;AACH,CAAC,CAAC;AAjHW,QAAA,iCAAiC,qCAiH5C;AAEF;;;GAGG;AACU,QAAA,2BAA2B,GAAG,IAAA,yCAAiC,EAAC,2BAAgB,CAAC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IContainerContext, IRuntime } from \"@fluidframework/container-definitions/internal\";\nimport {\n\tContainerRuntime,\n\tDefaultSummaryConfiguration,\n\ttype IContainerRuntimeOptionsInternal,\n} from \"@fluidframework/container-runtime/internal\";\nimport {\n\tIContainerRuntime,\n\t// eslint-disable-next-line import/no-deprecated\n\tIContainerRuntimeWithResolveHandle_Deprecated,\n} from \"@fluidframework/container-runtime-definitions/internal\";\nimport { FluidObject, IRequest, IResponse } from \"@fluidframework/core-interfaces\";\nimport { IFluidHandleContext } from \"@fluidframework/core-interfaces/internal\";\nimport { assert } from \"@fluidframework/core-utils/internal\";\nimport {\n\t// eslint-disable-next-line import/no-deprecated\n\tRuntimeRequestHandler,\n\t// eslint-disable-next-line import/no-deprecated\n\tbuildRuntimeRequestHandler,\n} from \"@fluidframework/request-handler/internal\";\nimport {\n\tIFluidDataStoreFactory,\n\tNamedFluidDataStoreRegistryEntries,\n} from \"@fluidframework/runtime-definitions/internal\";\nimport { RequestParser, RuntimeFactoryHelper } from \"@fluidframework/runtime-utils/internal\";\n\ninterface backCompat_IFluidRouter {\n\tIFluidRouter?: backCompat_IFluidRouter;\n\trequest(request: IRequest): Promise<IResponse>;\n}\n\nconst backCompat_DefaultRouteRequestHandler = (defaultRootId: string) => {\n\treturn async (request: IRequest, runtime: IContainerRuntime) => {\n\t\tconst parser = RequestParser.create(request);\n\t\tif (parser.pathParts.length === 0) {\n\t\t\treturn (\n\t\t\t\truntime as any as Required<FluidObject<IFluidHandleContext>>\n\t\t\t).IFluidHandleContext.resolveHandle({\n\t\t\t\turl: `/${defaultRootId}${parser.query}`,\n\t\t\t\theaders: request.headers,\n\t\t\t});\n\t\t}\n\t\treturn undefined; // continue search\n\t};\n};\n\ninterface backCompat_ContainerRuntime {\n\tload(\n\t\tcontext: IContainerContext,\n\t\tregistryEntries: NamedFluidDataStoreRegistryEntries,\n\t\trequestHandler?: (request: IRequest, runtime: IContainerRuntime) => Promise<IResponse>,\n\t\truntimeOptions?: IContainerRuntimeOptionsInternal,\n\t\tcontainerScope?: FluidObject,\n\t\texisting?: boolean,\n\t\tcontainerRuntimeCtor?: typeof ContainerRuntime,\n\t): Promise<ContainerRuntime>;\n}\n\n/**\n * Create a container runtime factory class that allows you to set runtime options\n * @internal\n */\nexport const createTestContainerRuntimeFactory = (\n\tcontainerRuntimeCtor: typeof ContainerRuntime,\n) => {\n\treturn class extends RuntimeFactoryHelper {\n\t\tconstructor(\n\t\t\tpublic type: string,\n\t\t\tpublic dataStoreFactory: IFluidDataStoreFactory,\n\t\t\tpublic runtimeOptions: IContainerRuntimeOptionsInternal = {\n\t\t\t\tsummaryOptions: {\n\t\t\t\t\tsummaryConfigOverrides: {\n\t\t\t\t\t\t...DefaultSummaryConfiguration,\n\t\t\t\t\t\t...{\n\t\t\t\t\t\t\tinitialSummarizerDelayMs: 0,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\t// eslint-disable-next-line import/no-deprecated\n\t\t\tpublic requestHandlers: RuntimeRequestHandler[] = [],\n\t\t) {\n\t\t\tsuper();\n\t\t}\n\n\t\tpublic async instantiateFirstTime(runtime: ContainerRuntime): Promise<void> {\n\t\t\t// Back-compat - old code does not return IDataStore for rootContext.attachRuntime() call!\n\t\t\t// Thus need to leverage old API createDetachedRootDataStore() that is gone in latest releases.\n\t\t\tconst rootContext =\n\t\t\t\t\"createDetachedRootDataStore\" in runtime\n\t\t\t\t\t? (runtime as any).createDetachedRootDataStore([this.type], \"default\")\n\t\t\t\t\t: runtime.createDetachedDataStore([this.type]);\n\n\t\t\tconst rootRuntime = await this.dataStoreFactory.instantiateDataStore(\n\t\t\t\trootContext,\n\t\t\t\t/* existing */ false,\n\t\t\t);\n\t\t\tconst dataStore = await rootContext.attachRuntime(this.dataStoreFactory, rootRuntime);\n\n\t\t\tconst result = await dataStore?.trySetAlias(\"default\");\n\t\t\tassert(result === \"Success\" || result === undefined, \"success\");\n\t\t}\n\n\t\tpublic async instantiateFromExisting(runtime: ContainerRuntime): Promise<void> {\n\t\t\t// Validate we can load root data stores.\n\t\t\t// We should be able to load any data store that was created in initializeFirstTime!\n\t\t\t// Note: We use the deprecated `getRootDataStore` from v1.X here to allow for cross-major version compat\n\t\t\t// testing. Can be removed when we no longer support v1.X.\n\t\t\tawait (runtime.getAliasedDataStoreEntryPoint?.(\"default\") ??\n\t\t\t\t(\n\t\t\t\t\truntime as any as {\n\t\t\t\t\t\tgetRootDataStore(id: string, wait?: boolean): Promise<backCompat_IFluidRouter>;\n\t\t\t\t\t}\n\t\t\t\t).getRootDataStore(\"default\"));\n\t\t}\n\n\t\tasync preInitialize(\n\t\t\tcontext: IContainerContext,\n\t\t\texisting: boolean,\n\t\t): Promise<IRuntime & IContainerRuntime> {\n\t\t\tif (containerRuntimeCtor.loadRuntime === undefined) {\n\t\t\t\t// Note: We use the deprecated `load` from v1.X here to allow for cross-major version compat testing.\n\t\t\t\t// Can be removed when we no longer support v1.X.\n\t\t\t\treturn (containerRuntimeCtor as any as backCompat_ContainerRuntime).load(\n\t\t\t\t\tcontext,\n\t\t\t\t\t[\n\t\t\t\t\t\t[\"default\", Promise.resolve(this.dataStoreFactory)],\n\t\t\t\t\t\t[this.type, Promise.resolve(this.dataStoreFactory)],\n\t\t\t\t\t],\n\t\t\t\t\t// eslint-disable-next-line import/no-deprecated\n\t\t\t\t\tbuildRuntimeRequestHandler(\n\t\t\t\t\t\tbackCompat_DefaultRouteRequestHandler(\"default\"),\n\t\t\t\t\t\t...this.requestHandlers,\n\t\t\t\t\t),\n\t\t\t\t\tthis.runtimeOptions,\n\t\t\t\t\tcontext.scope,\n\t\t\t\t\texisting,\n\t\t\t\t);\n\t\t\t}\n\t\t\tconst provideEntryPoint = async (runtime: IContainerRuntime) => {\n\t\t\t\tconst entryPoint = await runtime.getAliasedDataStoreEntryPoint(\"default\");\n\t\t\t\tif (entryPoint === undefined) {\n\t\t\t\t\tthrow new Error(\"default dataStore must exist\");\n\t\t\t\t}\n\t\t\t\treturn entryPoint.get();\n\t\t\t};\n\t\t\tconst getDefaultObject = async (request: IRequest, runtime: IContainerRuntime) => {\n\t\t\t\tconst parser = RequestParser.create(request);\n\t\t\t\tif (parser.pathParts.length === 0) {\n\t\t\t\t\t// This cast is safe as loadContainerRuntime is called below\n\t\t\t\t\t// eslint-disable-next-line import/no-deprecated\n\t\t\t\t\treturn (runtime as IContainerRuntimeWithResolveHandle_Deprecated).resolveHandle({\n\t\t\t\t\t\turl: `/default${parser.query}`,\n\t\t\t\t\t\theaders: request.headers,\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\treturn undefined; // continue search\n\t\t\t};\n\t\t\treturn containerRuntimeCtor.loadRuntime({\n\t\t\t\tcontext,\n\t\t\t\tregistryEntries: [\n\t\t\t\t\t[\"default\", Promise.resolve(this.dataStoreFactory)],\n\t\t\t\t\t[this.type, Promise.resolve(this.dataStoreFactory)],\n\t\t\t\t],\n\t\t\t\t// eslint-disable-next-line import/no-deprecated\n\t\t\t\trequestHandler: buildRuntimeRequestHandler(getDefaultObject, ...this.requestHandlers),\n\t\t\t\tprovideEntryPoint,\n\t\t\t\t// ! This prop is needed for back-compat. Can be removed in 2.0.0-internal.8.0.0\n\t\t\t\tinitializeEntryPoint: provideEntryPoint,\n\t\t\t\truntimeOptions: this.runtimeOptions,\n\t\t\t\tcontainerScope: context.scope,\n\t\t\t\texisting,\n\t\t\t} as any);\n\t\t}\n\t};\n};\n\n/**\n * A container runtime factory that allows you to set runtime options\n * @internal\n */\nexport const TestContainerRuntimeFactory = createTestContainerRuntimeFactory(ContainerRuntime);\n"]}
@@ -5,5 +5,5 @@
5
5
  * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY
6
6
  */
7
7
  export declare const pkgName = "@fluidframework/test-utils";
8
- export declare const pkgVersion = "2.13.0";
8
+ export declare const pkgVersion = "2.20.0";
9
9
  //# sourceMappingURL=packageVersion.d.ts.map
@@ -5,5 +5,5 @@
5
5
  * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY
6
6
  */
7
7
  export const pkgName = "@fluidframework/test-utils";
8
- export const pkgVersion = "2.13.0";
8
+ export const pkgVersion = "2.20.0";
9
9
  //# sourceMappingURL=packageVersion.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,CAAC,MAAM,OAAO,GAAG,4BAA4B,CAAC;AACpD,MAAM,CAAC,MAAM,UAAU,GAAG,QAAQ,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n *\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY\n */\n\nexport const pkgName = \"@fluidframework/test-utils\";\nexport const pkgVersion = \"2.13.0\";\n"]}
1
+ {"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,CAAC,MAAM,OAAO,GAAG,4BAA4B,CAAC;AACpD,MAAM,CAAC,MAAM,UAAU,GAAG,QAAQ,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n *\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY\n */\n\nexport const pkgName = \"@fluidframework/test-utils\";\nexport const pkgVersion = \"2.20.0\";\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"testContainerRuntimeFactory.d.ts","sourceRoot":"","sources":["../src/testContainerRuntimeFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,iBAAiB,EAAE,QAAQ,EAAE,MAAM,gDAAgD,CAAC;AAC7F,OAAO,EAEN,gBAAgB,EAEhB,KAAK,gCAAgC,EACrC,MAAM,4CAA4C,CAAC;AACpD,OAAO,EACN,iBAAiB,EAGjB,MAAM,wDAAwD,CAAC;AAIhE,OAAO,EAEN,qBAAqB,EAGrB,MAAM,0CAA0C,CAAC;AAClD,OAAO,EACN,sBAAsB,EAEtB,MAAM,8CAA8C,CAAC;AAqCtD;;;GAGG;AACH,eAAO,MAAM,iCAAiC,yBAEvB,uBAAuB;eAI9B,MAAM,oBACM,sBAAsB,mBACxB,gCAAgC,oBAW/B,qBAAqB,EAAE;cAblC,MAAM;0BACM,sBAAsB;wBACxB,gCAAgC;yBAW/B,qBAAqB,EAAE;sCAML,gBAAgB,GAAG,QAAQ,IAAI,CAAC;yCAmB7B,gBAAgB,GAAG,QAAQ,IAAI,CAAC;+BAcpE,iBAAiB,YAChB,OAAO,GACf,QAAQ,QAAQ,GAAG,iBAAiB,CAAC;;;;;CAwDzC,CAAC;AAEF;;;GAGG;AAEH,eAAO,MAAM,2BAA2B;eArHxB,MAAM,oBACM,sBAAsB,mBACxB,gCAAgC,oBAW/B,qBAAqB,EAAE;cAblC,MAAM;0BACM,sBAAsB;wBACxB,gCAAgC;yBAW/B,qBAAqB,EAAE;sCAML,gBAAgB,GAAG,QAAQ,IAAI,CAAC;yCAmB7B,gBAAgB,GAAG,QAAQ,IAAI,CAAC;+BAcpE,iBAAiB,YAChB,OAAO,GACf,QAAQ,QAAQ,GAAG,iBAAiB,CAAC;;;;;CA+DoD,CAAC"}
1
+ {"version":3,"file":"testContainerRuntimeFactory.d.ts","sourceRoot":"","sources":["../src/testContainerRuntimeFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,iBAAiB,EAAE,QAAQ,EAAE,MAAM,gDAAgD,CAAC;AAC7F,OAAO,EACN,gBAAgB,EAEhB,KAAK,gCAAgC,EACrC,MAAM,4CAA4C,CAAC;AACpD,OAAO,EACN,iBAAiB,EAGjB,MAAM,wDAAwD,CAAC;AAIhE,OAAO,EAEN,qBAAqB,EAGrB,MAAM,0CAA0C,CAAC;AAClD,OAAO,EACN,sBAAsB,EAEtB,MAAM,8CAA8C,CAAC;AAmCtD;;;GAGG;AACH,eAAO,MAAM,iCAAiC,yBACvB,uBAAuB;eAI9B,MAAM,oBACM,sBAAsB,mBACxB,gCAAgC,oBAW/B,qBAAqB,EAAE;cAblC,MAAM;0BACM,sBAAsB;wBACxB,gCAAgC;yBAW/B,qBAAqB,EAAE;sCAKL,gBAAgB,GAAG,QAAQ,IAAI,CAAC;yCAkB7B,gBAAgB,GAAG,QAAQ,IAAI,CAAC;+BAcpE,iBAAiB,YAChB,OAAO,GACf,QAAQ,QAAQ,GAAG,iBAAiB,CAAC;;;;;CAwDzC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,2BAA2B;eAlHxB,MAAM,oBACM,sBAAsB,mBACxB,gCAAgC,oBAW/B,qBAAqB,EAAE;cAblC,MAAM;0BACM,sBAAsB;wBACxB,gCAAgC;yBAW/B,qBAAqB,EAAE;sCAKL,gBAAgB,GAAG,QAAQ,IAAI,CAAC;yCAkB7B,gBAAgB,GAAG,QAAQ,IAAI,CAAC;+BAcpE,iBAAiB,YAChB,OAAO,GACf,QAAQ,QAAQ,GAAG,iBAAiB,CAAC;;;;;CA8DoD,CAAC"}
@@ -2,9 +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
- // eslint-disable-next-line import/no-deprecated -- ContainerRuntime class to be moved to internal scope
7
- ContainerRuntime, DefaultSummaryConfiguration, } from "@fluidframework/container-runtime/internal";
5
+ import { ContainerRuntime, DefaultSummaryConfiguration, } from "@fluidframework/container-runtime/internal";
8
6
  import { assert } from "@fluidframework/core-utils/internal";
9
7
  import {
10
8
  // eslint-disable-next-line import/no-deprecated
@@ -26,9 +24,7 @@ const backCompat_DefaultRouteRequestHandler = (defaultRootId) => {
26
24
  * Create a container runtime factory class that allows you to set runtime options
27
25
  * @internal
28
26
  */
29
- export const createTestContainerRuntimeFactory = (
30
- // eslint-disable-next-line import/no-deprecated -- ContainerRuntime class to be moved to internal scope
31
- containerRuntimeCtor) => {
27
+ export const createTestContainerRuntimeFactory = (containerRuntimeCtor) => {
32
28
  return class extends RuntimeFactoryHelper {
33
29
  constructor(type, dataStoreFactory, runtimeOptions = {
34
30
  summaryOptions: {
@@ -48,7 +44,6 @@ containerRuntimeCtor) => {
48
44
  this.runtimeOptions = runtimeOptions;
49
45
  this.requestHandlers = requestHandlers;
50
46
  }
51
- // eslint-disable-next-line import/no-deprecated -- ContainerRuntime class to be moved to internal scope
52
47
  async instantiateFirstTime(runtime) {
53
48
  // Back-compat - old code does not return IDataStore for rootContext.attachRuntime() call!
54
49
  // Thus need to leverage old API createDetachedRootDataStore() that is gone in latest releases.
@@ -61,7 +56,6 @@ containerRuntimeCtor) => {
61
56
  const result = await dataStore?.trySetAlias("default");
62
57
  assert(result === "Success" || result === undefined, "success");
63
58
  }
64
- // eslint-disable-next-line import/no-deprecated -- ContainerRuntime class to be moved to internal scope
65
59
  async instantiateFromExisting(runtime) {
66
60
  // Validate we can load root data stores.
67
61
  // We should be able to load any data store that was created in initializeFirstTime!
@@ -122,6 +116,5 @@ containerRuntimeCtor) => {
122
116
  * A container runtime factory that allows you to set runtime options
123
117
  * @internal
124
118
  */
125
- // eslint-disable-next-line import/no-deprecated -- ContainerRuntime class to be moved to internal scope
126
119
  export const TestContainerRuntimeFactory = createTestContainerRuntimeFactory(ContainerRuntime);
127
120
  //# sourceMappingURL=testContainerRuntimeFactory.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"testContainerRuntimeFactory.js","sourceRoot":"","sources":["../src/testContainerRuntimeFactory.ts"],"names":[],"mappings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AC,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;iBACnD;gBACD,gDAAgD;gBAChD,cAAc,EAAE,0BAA0B,CAAC,gBAAgB,EAAE,GAAG,IAAI,CAAC,eAAe,CAAC;gBACrF,iBAAiB;gBACjB,gFAAgF;gBAChF,oBAAoB,EAAE,iBAAiB;gBACvC,cAAc,EAAE,IAAI,CAAC,cAAc;gBACnC,cAAc,EAAE,OAAO,CAAC,KAAK;gBAC7B,QAAQ;aACD,CAAC,CAAC;QACX,CAAC;KACD,CAAC;AACH,CAAC,CAAC;AAEF;;;GAGG;AACH,wGAAwG;AACxG,MAAM,CAAC,MAAM,2BAA2B,GAAG,iCAAiC,CAAC,gBAAgB,CAAC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IContainerContext, IRuntime } from \"@fluidframework/container-definitions/internal\";\nimport {\n\t// eslint-disable-next-line import/no-deprecated -- ContainerRuntime class to be moved to internal scope\n\tContainerRuntime,\n\tDefaultSummaryConfiguration,\n\ttype IContainerRuntimeOptionsInternal,\n} from \"@fluidframework/container-runtime/internal\";\nimport {\n\tIContainerRuntime,\n\t// eslint-disable-next-line import/no-deprecated\n\tIContainerRuntimeWithResolveHandle_Deprecated,\n} from \"@fluidframework/container-runtime-definitions/internal\";\nimport { FluidObject, IRequest, IResponse } from \"@fluidframework/core-interfaces\";\nimport { IFluidHandleContext } from \"@fluidframework/core-interfaces/internal\";\nimport { assert } from \"@fluidframework/core-utils/internal\";\nimport {\n\t// eslint-disable-next-line import/no-deprecated\n\tRuntimeRequestHandler,\n\t// eslint-disable-next-line import/no-deprecated\n\tbuildRuntimeRequestHandler,\n} from \"@fluidframework/request-handler/internal\";\nimport {\n\tIFluidDataStoreFactory,\n\tNamedFluidDataStoreRegistryEntries,\n} from \"@fluidframework/runtime-definitions/internal\";\nimport { RequestParser, RuntimeFactoryHelper } from \"@fluidframework/runtime-utils/internal\";\n\ninterface backCompat_IFluidRouter {\n\tIFluidRouter?: backCompat_IFluidRouter;\n\trequest(request: IRequest): Promise<IResponse>;\n}\n\nconst backCompat_DefaultRouteRequestHandler = (defaultRootId: string) => {\n\treturn async (request: IRequest, runtime: IContainerRuntime) => {\n\t\tconst parser = RequestParser.create(request);\n\t\tif (parser.pathParts.length === 0) {\n\t\t\treturn (\n\t\t\t\truntime as any as Required<FluidObject<IFluidHandleContext>>\n\t\t\t).IFluidHandleContext.resolveHandle({\n\t\t\t\turl: `/${defaultRootId}${parser.query}`,\n\t\t\t\theaders: request.headers,\n\t\t\t});\n\t\t}\n\t\treturn undefined; // continue search\n\t};\n};\n\ninterface backCompat_ContainerRuntime {\n\tload(\n\t\tcontext: IContainerContext,\n\t\tregistryEntries: NamedFluidDataStoreRegistryEntries,\n\t\trequestHandler?: (request: IRequest, runtime: IContainerRuntime) => Promise<IResponse>,\n\t\truntimeOptions?: IContainerRuntimeOptionsInternal,\n\t\tcontainerScope?: FluidObject,\n\t\texisting?: boolean,\n\t\t// eslint-disable-next-line import/no-deprecated -- ContainerRuntime class to be moved to internal scope\n\t\tcontainerRuntimeCtor?: typeof ContainerRuntime,\n\t\t// eslint-disable-next-line import/no-deprecated -- ContainerRuntime class to be moved to internal scope\n\t): Promise<ContainerRuntime>;\n}\n\n/**\n * Create a container runtime factory class that allows you to set runtime options\n * @internal\n */\nexport const createTestContainerRuntimeFactory = (\n\t// eslint-disable-next-line import/no-deprecated -- ContainerRuntime class to be moved to internal scope\n\tcontainerRuntimeCtor: typeof ContainerRuntime,\n) => {\n\treturn class extends RuntimeFactoryHelper {\n\t\tconstructor(\n\t\t\tpublic type: string,\n\t\t\tpublic dataStoreFactory: IFluidDataStoreFactory,\n\t\t\tpublic runtimeOptions: IContainerRuntimeOptionsInternal = {\n\t\t\t\tsummaryOptions: {\n\t\t\t\t\tsummaryConfigOverrides: {\n\t\t\t\t\t\t...DefaultSummaryConfiguration,\n\t\t\t\t\t\t...{\n\t\t\t\t\t\t\tinitialSummarizerDelayMs: 0,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\t// eslint-disable-next-line import/no-deprecated\n\t\t\tpublic requestHandlers: RuntimeRequestHandler[] = [],\n\t\t) {\n\t\t\tsuper();\n\t\t}\n\n\t\t// eslint-disable-next-line import/no-deprecated -- ContainerRuntime class to be moved to internal scope\n\t\tpublic async instantiateFirstTime(runtime: ContainerRuntime): Promise<void> {\n\t\t\t// Back-compat - old code does not return IDataStore for rootContext.attachRuntime() call!\n\t\t\t// Thus need to leverage old API createDetachedRootDataStore() that is gone in latest releases.\n\t\t\tconst rootContext =\n\t\t\t\t\"createDetachedRootDataStore\" in runtime\n\t\t\t\t\t? (runtime as any).createDetachedRootDataStore([this.type], \"default\")\n\t\t\t\t\t: runtime.createDetachedDataStore([this.type]);\n\n\t\t\tconst rootRuntime = await this.dataStoreFactory.instantiateDataStore(\n\t\t\t\trootContext,\n\t\t\t\t/* existing */ false,\n\t\t\t);\n\t\t\tconst dataStore = await rootContext.attachRuntime(this.dataStoreFactory, rootRuntime);\n\n\t\t\tconst result = await dataStore?.trySetAlias(\"default\");\n\t\t\tassert(result === \"Success\" || result === undefined, \"success\");\n\t\t}\n\n\t\t// eslint-disable-next-line import/no-deprecated -- ContainerRuntime class to be moved to internal scope\n\t\tpublic async instantiateFromExisting(runtime: ContainerRuntime): Promise<void> {\n\t\t\t// Validate we can load root data stores.\n\t\t\t// We should be able to load any data store that was created in initializeFirstTime!\n\t\t\t// Note: We use the deprecated `getRootDataStore` from v1.X here to allow for cross-major version compat\n\t\t\t// testing. Can be removed when we no longer support v1.X.\n\t\t\tawait (runtime.getAliasedDataStoreEntryPoint?.(\"default\") ??\n\t\t\t\t(\n\t\t\t\t\truntime as any as {\n\t\t\t\t\t\tgetRootDataStore(id: string, wait?: boolean): Promise<backCompat_IFluidRouter>;\n\t\t\t\t\t}\n\t\t\t\t).getRootDataStore(\"default\"));\n\t\t}\n\n\t\tasync preInitialize(\n\t\t\tcontext: IContainerContext,\n\t\t\texisting: boolean,\n\t\t): Promise<IRuntime & IContainerRuntime> {\n\t\t\tif (containerRuntimeCtor.loadRuntime === undefined) {\n\t\t\t\t// Note: We use the deprecated `load` from v1.X here to allow for cross-major version compat testing.\n\t\t\t\t// Can be removed when we no longer support v1.X.\n\t\t\t\treturn (containerRuntimeCtor as any as backCompat_ContainerRuntime).load(\n\t\t\t\t\tcontext,\n\t\t\t\t\t[\n\t\t\t\t\t\t[\"default\", Promise.resolve(this.dataStoreFactory)],\n\t\t\t\t\t\t[this.type, Promise.resolve(this.dataStoreFactory)],\n\t\t\t\t\t],\n\t\t\t\t\t// eslint-disable-next-line import/no-deprecated\n\t\t\t\t\tbuildRuntimeRequestHandler(\n\t\t\t\t\t\tbackCompat_DefaultRouteRequestHandler(\"default\"),\n\t\t\t\t\t\t...this.requestHandlers,\n\t\t\t\t\t),\n\t\t\t\t\tthis.runtimeOptions,\n\t\t\t\t\tcontext.scope,\n\t\t\t\t\texisting,\n\t\t\t\t);\n\t\t\t}\n\t\t\tconst provideEntryPoint = async (runtime: IContainerRuntime) => {\n\t\t\t\tconst entryPoint = await runtime.getAliasedDataStoreEntryPoint(\"default\");\n\t\t\t\tif (entryPoint === undefined) {\n\t\t\t\t\tthrow new Error(\"default dataStore must exist\");\n\t\t\t\t}\n\t\t\t\treturn entryPoint.get();\n\t\t\t};\n\t\t\tconst getDefaultObject = async (request: IRequest, runtime: IContainerRuntime) => {\n\t\t\t\tconst parser = RequestParser.create(request);\n\t\t\t\tif (parser.pathParts.length === 0) {\n\t\t\t\t\t// This cast is safe as loadContainerRuntime is called below\n\t\t\t\t\t// eslint-disable-next-line import/no-deprecated\n\t\t\t\t\treturn (runtime as IContainerRuntimeWithResolveHandle_Deprecated).resolveHandle({\n\t\t\t\t\t\turl: `/default${parser.query}`,\n\t\t\t\t\t\theaders: request.headers,\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\treturn undefined; // continue search\n\t\t\t};\n\t\t\treturn containerRuntimeCtor.loadRuntime({\n\t\t\t\tcontext,\n\t\t\t\tregistryEntries: [\n\t\t\t\t\t[\"default\", Promise.resolve(this.dataStoreFactory)],\n\t\t\t\t\t[this.type, Promise.resolve(this.dataStoreFactory)],\n\t\t\t\t],\n\t\t\t\t// eslint-disable-next-line import/no-deprecated\n\t\t\t\trequestHandler: buildRuntimeRequestHandler(getDefaultObject, ...this.requestHandlers),\n\t\t\t\tprovideEntryPoint,\n\t\t\t\t// ! This prop is needed for back-compat. Can be removed in 2.0.0-internal.8.0.0\n\t\t\t\tinitializeEntryPoint: provideEntryPoint,\n\t\t\t\truntimeOptions: this.runtimeOptions,\n\t\t\t\tcontainerScope: context.scope,\n\t\t\t\texisting,\n\t\t\t} as any);\n\t\t}\n\t};\n};\n\n/**\n * A container runtime factory that allows you to set runtime options\n * @internal\n */\n// eslint-disable-next-line import/no-deprecated -- ContainerRuntime class to be moved to internal scope\nexport const TestContainerRuntimeFactory = createTestContainerRuntimeFactory(ContainerRuntime);\n"]}
1
+ {"version":3,"file":"testContainerRuntimeFactory.js","sourceRoot":"","sources":["../src/testContainerRuntimeFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EACN,gBAAgB,EAChB,2BAA2B,GAE3B,MAAM,4CAA4C,CAAC;AAQpD,OAAO,EAAE,MAAM,EAAE,MAAM,qCAAqC,CAAC;AAC7D,OAAO;AAGN,gDAAgD;AAChD,0BAA0B,GAC1B,MAAM,0CAA0C,CAAC;AAKlD,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,wCAAwC,CAAC;AAO7F,MAAM,qCAAqC,GAAG,CAAC,aAAqB,EAAE,EAAE;IACvE,OAAO,KAAK,EAAE,OAAiB,EAAE,OAA0B,EAAE,EAAE;QAC9D,MAAM,MAAM,GAAG,aAAa,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QAC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Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IContainerContext, IRuntime } from \"@fluidframework/container-definitions/internal\";\nimport {\n\tContainerRuntime,\n\tDefaultSummaryConfiguration,\n\ttype IContainerRuntimeOptionsInternal,\n} from \"@fluidframework/container-runtime/internal\";\nimport {\n\tIContainerRuntime,\n\t// eslint-disable-next-line import/no-deprecated\n\tIContainerRuntimeWithResolveHandle_Deprecated,\n} from \"@fluidframework/container-runtime-definitions/internal\";\nimport { FluidObject, IRequest, IResponse } from \"@fluidframework/core-interfaces\";\nimport { IFluidHandleContext } from \"@fluidframework/core-interfaces/internal\";\nimport { assert } from \"@fluidframework/core-utils/internal\";\nimport {\n\t// eslint-disable-next-line import/no-deprecated\n\tRuntimeRequestHandler,\n\t// eslint-disable-next-line import/no-deprecated\n\tbuildRuntimeRequestHandler,\n} from \"@fluidframework/request-handler/internal\";\nimport {\n\tIFluidDataStoreFactory,\n\tNamedFluidDataStoreRegistryEntries,\n} from \"@fluidframework/runtime-definitions/internal\";\nimport { RequestParser, RuntimeFactoryHelper } from \"@fluidframework/runtime-utils/internal\";\n\ninterface backCompat_IFluidRouter {\n\tIFluidRouter?: backCompat_IFluidRouter;\n\trequest(request: IRequest): Promise<IResponse>;\n}\n\nconst backCompat_DefaultRouteRequestHandler = (defaultRootId: string) => {\n\treturn async (request: IRequest, runtime: IContainerRuntime) => {\n\t\tconst parser = RequestParser.create(request);\n\t\tif (parser.pathParts.length === 0) {\n\t\t\treturn (\n\t\t\t\truntime as any as Required<FluidObject<IFluidHandleContext>>\n\t\t\t).IFluidHandleContext.resolveHandle({\n\t\t\t\turl: `/${defaultRootId}${parser.query}`,\n\t\t\t\theaders: request.headers,\n\t\t\t});\n\t\t}\n\t\treturn undefined; // continue search\n\t};\n};\n\ninterface backCompat_ContainerRuntime {\n\tload(\n\t\tcontext: IContainerContext,\n\t\tregistryEntries: NamedFluidDataStoreRegistryEntries,\n\t\trequestHandler?: (request: IRequest, runtime: IContainerRuntime) => Promise<IResponse>,\n\t\truntimeOptions?: IContainerRuntimeOptionsInternal,\n\t\tcontainerScope?: FluidObject,\n\t\texisting?: boolean,\n\t\tcontainerRuntimeCtor?: typeof ContainerRuntime,\n\t): Promise<ContainerRuntime>;\n}\n\n/**\n * Create a container runtime factory class that allows you to set runtime options\n * @internal\n */\nexport const createTestContainerRuntimeFactory = (\n\tcontainerRuntimeCtor: typeof ContainerRuntime,\n) => {\n\treturn class extends RuntimeFactoryHelper {\n\t\tconstructor(\n\t\t\tpublic type: string,\n\t\t\tpublic dataStoreFactory: IFluidDataStoreFactory,\n\t\t\tpublic runtimeOptions: IContainerRuntimeOptionsInternal = {\n\t\t\t\tsummaryOptions: {\n\t\t\t\t\tsummaryConfigOverrides: {\n\t\t\t\t\t\t...DefaultSummaryConfiguration,\n\t\t\t\t\t\t...{\n\t\t\t\t\t\t\tinitialSummarizerDelayMs: 0,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\t// eslint-disable-next-line import/no-deprecated\n\t\t\tpublic requestHandlers: RuntimeRequestHandler[] = [],\n\t\t) {\n\t\t\tsuper();\n\t\t}\n\n\t\tpublic async instantiateFirstTime(runtime: ContainerRuntime): Promise<void> {\n\t\t\t// Back-compat - old code does not return IDataStore for rootContext.attachRuntime() call!\n\t\t\t// Thus need to leverage old API createDetachedRootDataStore() that is gone in latest releases.\n\t\t\tconst rootContext =\n\t\t\t\t\"createDetachedRootDataStore\" in runtime\n\t\t\t\t\t? (runtime as any).createDetachedRootDataStore([this.type], \"default\")\n\t\t\t\t\t: runtime.createDetachedDataStore([this.type]);\n\n\t\t\tconst rootRuntime = await this.dataStoreFactory.instantiateDataStore(\n\t\t\t\trootContext,\n\t\t\t\t/* existing */ false,\n\t\t\t);\n\t\t\tconst dataStore = await rootContext.attachRuntime(this.dataStoreFactory, rootRuntime);\n\n\t\t\tconst result = await dataStore?.trySetAlias(\"default\");\n\t\t\tassert(result === \"Success\" || result === undefined, \"success\");\n\t\t}\n\n\t\tpublic async instantiateFromExisting(runtime: ContainerRuntime): Promise<void> {\n\t\t\t// Validate we can load root data stores.\n\t\t\t// We should be able to load any data store that was created in initializeFirstTime!\n\t\t\t// Note: We use the deprecated `getRootDataStore` from v1.X here to allow for cross-major version compat\n\t\t\t// testing. Can be removed when we no longer support v1.X.\n\t\t\tawait (runtime.getAliasedDataStoreEntryPoint?.(\"default\") ??\n\t\t\t\t(\n\t\t\t\t\truntime as any as {\n\t\t\t\t\t\tgetRootDataStore(id: string, wait?: boolean): Promise<backCompat_IFluidRouter>;\n\t\t\t\t\t}\n\t\t\t\t).getRootDataStore(\"default\"));\n\t\t}\n\n\t\tasync preInitialize(\n\t\t\tcontext: IContainerContext,\n\t\t\texisting: boolean,\n\t\t): Promise<IRuntime & IContainerRuntime> {\n\t\t\tif (containerRuntimeCtor.loadRuntime === undefined) {\n\t\t\t\t// Note: We use the deprecated `load` from v1.X here to allow for cross-major version compat testing.\n\t\t\t\t// Can be removed when we no longer support v1.X.\n\t\t\t\treturn (containerRuntimeCtor as any as backCompat_ContainerRuntime).load(\n\t\t\t\t\tcontext,\n\t\t\t\t\t[\n\t\t\t\t\t\t[\"default\", Promise.resolve(this.dataStoreFactory)],\n\t\t\t\t\t\t[this.type, Promise.resolve(this.dataStoreFactory)],\n\t\t\t\t\t],\n\t\t\t\t\t// eslint-disable-next-line import/no-deprecated\n\t\t\t\t\tbuildRuntimeRequestHandler(\n\t\t\t\t\t\tbackCompat_DefaultRouteRequestHandler(\"default\"),\n\t\t\t\t\t\t...this.requestHandlers,\n\t\t\t\t\t),\n\t\t\t\t\tthis.runtimeOptions,\n\t\t\t\t\tcontext.scope,\n\t\t\t\t\texisting,\n\t\t\t\t);\n\t\t\t}\n\t\t\tconst provideEntryPoint = async (runtime: IContainerRuntime) => {\n\t\t\t\tconst entryPoint = await runtime.getAliasedDataStoreEntryPoint(\"default\");\n\t\t\t\tif (entryPoint === undefined) {\n\t\t\t\t\tthrow new Error(\"default dataStore must exist\");\n\t\t\t\t}\n\t\t\t\treturn entryPoint.get();\n\t\t\t};\n\t\t\tconst getDefaultObject = async (request: IRequest, runtime: IContainerRuntime) => {\n\t\t\t\tconst parser = RequestParser.create(request);\n\t\t\t\tif (parser.pathParts.length === 0) {\n\t\t\t\t\t// This cast is safe as loadContainerRuntime is called below\n\t\t\t\t\t// eslint-disable-next-line import/no-deprecated\n\t\t\t\t\treturn (runtime as IContainerRuntimeWithResolveHandle_Deprecated).resolveHandle({\n\t\t\t\t\t\turl: `/default${parser.query}`,\n\t\t\t\t\t\theaders: request.headers,\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\treturn undefined; // continue search\n\t\t\t};\n\t\t\treturn containerRuntimeCtor.loadRuntime({\n\t\t\t\tcontext,\n\t\t\t\tregistryEntries: [\n\t\t\t\t\t[\"default\", Promise.resolve(this.dataStoreFactory)],\n\t\t\t\t\t[this.type, Promise.resolve(this.dataStoreFactory)],\n\t\t\t\t],\n\t\t\t\t// eslint-disable-next-line import/no-deprecated\n\t\t\t\trequestHandler: buildRuntimeRequestHandler(getDefaultObject, ...this.requestHandlers),\n\t\t\t\tprovideEntryPoint,\n\t\t\t\t// ! This prop is needed for back-compat. Can be removed in 2.0.0-internal.8.0.0\n\t\t\t\tinitializeEntryPoint: provideEntryPoint,\n\t\t\t\truntimeOptions: this.runtimeOptions,\n\t\t\t\tcontainerScope: context.scope,\n\t\t\t\texisting,\n\t\t\t} as any);\n\t\t}\n\t};\n};\n\n/**\n * A container runtime factory that allows you to set runtime options\n * @internal\n */\nexport const TestContainerRuntimeFactory = createTestContainerRuntimeFactory(ContainerRuntime);\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluidframework/test-utils",
3
- "version": "2.13.0",
3
+ "version": "2.20.0",
4
4
  "description": "Utilities for Fluid tests",
5
5
  "homepage": "https://fluidframework.com",
6
6
  "repository": {
@@ -67,26 +67,26 @@
67
67
  "temp-directory": "nyc/.nyc_output"
68
68
  },
69
69
  "dependencies": {
70
- "@fluid-internal/test-driver-definitions": "~2.13.0",
71
- "@fluidframework/aqueduct": "~2.13.0",
72
- "@fluidframework/container-definitions": "~2.13.0",
73
- "@fluidframework/container-loader": "~2.13.0",
74
- "@fluidframework/container-runtime": "~2.13.0",
75
- "@fluidframework/container-runtime-definitions": "~2.13.0",
76
- "@fluidframework/core-interfaces": "~2.13.0",
77
- "@fluidframework/core-utils": "~2.13.0",
78
- "@fluidframework/datastore": "~2.13.0",
79
- "@fluidframework/datastore-definitions": "~2.13.0",
80
- "@fluidframework/driver-definitions": "~2.13.0",
81
- "@fluidframework/driver-utils": "~2.13.0",
82
- "@fluidframework/local-driver": "~2.13.0",
83
- "@fluidframework/map": "~2.13.0",
84
- "@fluidframework/odsp-driver": "~2.13.0",
85
- "@fluidframework/request-handler": "~2.13.0",
86
- "@fluidframework/routerlicious-driver": "~2.13.0",
87
- "@fluidframework/runtime-definitions": "~2.13.0",
88
- "@fluidframework/runtime-utils": "~2.13.0",
89
- "@fluidframework/telemetry-utils": "~2.13.0",
70
+ "@fluid-internal/test-driver-definitions": "~2.20.0",
71
+ "@fluidframework/aqueduct": "~2.20.0",
72
+ "@fluidframework/container-definitions": "~2.20.0",
73
+ "@fluidframework/container-loader": "~2.20.0",
74
+ "@fluidframework/container-runtime": "~2.20.0",
75
+ "@fluidframework/container-runtime-definitions": "~2.20.0",
76
+ "@fluidframework/core-interfaces": "~2.20.0",
77
+ "@fluidframework/core-utils": "~2.20.0",
78
+ "@fluidframework/datastore": "~2.20.0",
79
+ "@fluidframework/datastore-definitions": "~2.20.0",
80
+ "@fluidframework/driver-definitions": "~2.20.0",
81
+ "@fluidframework/driver-utils": "~2.20.0",
82
+ "@fluidframework/local-driver": "~2.20.0",
83
+ "@fluidframework/map": "~2.20.0",
84
+ "@fluidframework/odsp-driver": "~2.20.0",
85
+ "@fluidframework/request-handler": "~2.20.0",
86
+ "@fluidframework/routerlicious-driver": "~2.20.0",
87
+ "@fluidframework/runtime-definitions": "~2.20.0",
88
+ "@fluidframework/runtime-utils": "~2.20.0",
89
+ "@fluidframework/telemetry-utils": "~2.20.0",
90
90
  "best-random": "^1.0.0",
91
91
  "debug": "^4.3.4",
92
92
  "mocha": "^10.2.0",
@@ -95,12 +95,12 @@
95
95
  "devDependencies": {
96
96
  "@arethetypeswrong/cli": "^0.17.1",
97
97
  "@biomejs/biome": "~1.9.3",
98
- "@fluid-internal/mocha-test-setup": "~2.13.0",
98
+ "@fluid-internal/mocha-test-setup": "~2.20.0",
99
99
  "@fluid-tools/build-cli": "^0.51.0",
100
100
  "@fluidframework/build-common": "^2.0.3",
101
101
  "@fluidframework/build-tools": "^0.51.0",
102
102
  "@fluidframework/eslint-config-fluid": "^5.6.0",
103
- "@fluidframework/test-utils-previous": "npm:@fluidframework/test-utils@2.12.0",
103
+ "@fluidframework/test-utils-previous": "npm:@fluidframework/test-utils@2.13.0",
104
104
  "@microsoft/api-extractor": "7.47.8",
105
105
  "@types/debug": "^4.1.5",
106
106
  "@types/diff": "^3.5.1",
@@ -120,7 +120,14 @@
120
120
  "typescript": "~5.4.5"
121
121
  },
122
122
  "typeValidation": {
123
- "broken": {},
123
+ "broken": {
124
+ "Interface_IProvideTestFluidObject": {
125
+ "backCompat": false
126
+ },
127
+ "Interface_ITestFluidObject": {
128
+ "backCompat": false
129
+ }
130
+ },
124
131
  "entrypoint": "legacy"
125
132
  },
126
133
  "scripts": {
@@ -6,4 +6,4 @@
6
6
  */
7
7
 
8
8
  export const pkgName = "@fluidframework/test-utils";
9
- export const pkgVersion = "2.13.0";
9
+ export const pkgVersion = "2.20.0";
@@ -5,7 +5,6 @@
5
5
 
6
6
  import { IContainerContext, IRuntime } from "@fluidframework/container-definitions/internal";
7
7
  import {
8
- // eslint-disable-next-line import/no-deprecated -- ContainerRuntime class to be moved to internal scope
9
8
  ContainerRuntime,
10
9
  DefaultSummaryConfiguration,
11
10
  type IContainerRuntimeOptionsInternal,
@@ -58,9 +57,7 @@ interface backCompat_ContainerRuntime {
58
57
  runtimeOptions?: IContainerRuntimeOptionsInternal,
59
58
  containerScope?: FluidObject,
60
59
  existing?: boolean,
61
- // eslint-disable-next-line import/no-deprecated -- ContainerRuntime class to be moved to internal scope
62
60
  containerRuntimeCtor?: typeof ContainerRuntime,
63
- // eslint-disable-next-line import/no-deprecated -- ContainerRuntime class to be moved to internal scope
64
61
  ): Promise<ContainerRuntime>;
65
62
  }
66
63
 
@@ -69,7 +66,6 @@ interface backCompat_ContainerRuntime {
69
66
  * @internal
70
67
  */
71
68
  export const createTestContainerRuntimeFactory = (
72
- // eslint-disable-next-line import/no-deprecated -- ContainerRuntime class to be moved to internal scope
73
69
  containerRuntimeCtor: typeof ContainerRuntime,
74
70
  ) => {
75
71
  return class extends RuntimeFactoryHelper {
@@ -92,7 +88,6 @@ export const createTestContainerRuntimeFactory = (
92
88
  super();
93
89
  }
94
90
 
95
- // eslint-disable-next-line import/no-deprecated -- ContainerRuntime class to be moved to internal scope
96
91
  public async instantiateFirstTime(runtime: ContainerRuntime): Promise<void> {
97
92
  // Back-compat - old code does not return IDataStore for rootContext.attachRuntime() call!
98
93
  // Thus need to leverage old API createDetachedRootDataStore() that is gone in latest releases.
@@ -111,7 +106,6 @@ export const createTestContainerRuntimeFactory = (
111
106
  assert(result === "Success" || result === undefined, "success");
112
107
  }
113
108
 
114
- // eslint-disable-next-line import/no-deprecated -- ContainerRuntime class to be moved to internal scope
115
109
  public async instantiateFromExisting(runtime: ContainerRuntime): Promise<void> {
116
110
  // Validate we can load root data stores.
117
111
  // We should be able to load any data store that was created in initializeFirstTime!
@@ -190,5 +184,4 @@ export const createTestContainerRuntimeFactory = (
190
184
  * A container runtime factory that allows you to set runtime options
191
185
  * @internal
192
186
  */
193
- // eslint-disable-next-line import/no-deprecated -- ContainerRuntime class to be moved to internal scope
194
187
  export const TestContainerRuntimeFactory = createTestContainerRuntimeFactory(ContainerRuntime);