@fluidframework/aqueduct 2.115.0 → 2.116.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,66 @@
1
1
  # @fluidframework/aqueduct
2
2
 
3
+ ## 2.116.0
4
+
5
+ ### Minor Changes
6
+
7
+ - Rename minVersionForCollab to oldestSupportedClient ([#27806](https://github.com/microsoft/FluidFramework/pull/27806)) [86b912170c](https://github.com/microsoft/FluidFramework/commit/86b912170c0e12ebeb481c5201f923c72bf94498)
8
+
9
+ The cross-client compatibility parameter has new names:
10
+ - The
11
+ [`MinimumVersionForCollab`](https://fluidframework.com/docs/api/runtime-definitions/minimumversionforcollab-typealias)
12
+ type is now
13
+ [`OldestSupportedClientVersion`](https://fluidframework.com/docs/api/runtime-definitions/oldestsupportedclientversion-typealias).
14
+ - [`LoadContainerRuntimeParams.minVersionForCollab`](https://fluidframework.com/docs/api/container-runtime/loadcontainerruntimeparams-interface#minversionforcollab-propertysignature)
15
+ is now
16
+ [`LoadContainerRuntimeParams.oldestSupportedClient`](https://fluidframework.com/docs/api/container-runtime/loadcontainerruntimeparams-interface#oldestsupportedclient-propertysignature).
17
+ - [`BaseContainerRuntimeFactoryProps.minVersionForCollab`](https://fluidframework.com/docs/api/aqueduct/basecontainerruntimefactoryprops-interface#minversionforcollab-propertysignature)
18
+ is now
19
+ [`BaseContainerRuntimeFactoryProps.oldestSupportedClient`](https://fluidframework.com/docs/api/aqueduct/basecontainerruntimefactoryprops-interface#oldestsupportedclient-propertysignature).
20
+ - [`createTreeContainerRuntimeFactory`](https://fluidframework.com/docs/api/fluid-static/#createtreecontainerruntimefactory-function)
21
+ now accepts `oldestSupportedClient`.
22
+ `minVersionForCollaboration` remains available as a deprecated overload.
23
+ - `@fluidframework/driver-definitions` now exports its minor-only version type as
24
+ [`OldestSupportedServiceClientVersion`](https://fluidframework.com/docs/api/driver-definitions/oldestsupportedserviceclientversion-typealias),
25
+ and
26
+ [`ServiceOptions.oldestSupportedClient`](https://fluidframework.com/docs/api/driver-definitions/serviceoptions-interface#oldestsupportedclient-propertysignature)
27
+ is available.
28
+ - [`AzureClient`](https://fluidframework.com/docs/api/azure-client/azureclient-class),
29
+ [`OdspClient`](https://fluidframework.com/docs/api/odsp-client/odspclient-class),
30
+ and
31
+ [`TinyliciousClient`](https://fluidframework.com/docs/api/tinylicious-client/tinyliciousclient-class)
32
+ methods now use `oldestSupportedClient` and
33
+ [`OldestSupportedClientVersion`](https://fluidframework.com/docs/api/runtime-definitions/oldestsupportedclientversion-typealias)
34
+ in their signatures.
35
+
36
+ The previous property and type names in `@fluidframework/runtime-definitions`,
37
+ `@fluidframework/container-runtime`, `@fluidframework/aqueduct`, and
38
+ `@fluidframework/fluid-static` are deprecated and will be removed in future
39
+ releases. Where both old and new property names remain available, specifying both
40
+ is an error. The alpha `MinimumVersionForCollaboration` type and
41
+ `ServiceOptions.minVersionForCollaboration` property are replaced directly rather
42
+ than retained as aliases.
43
+
44
+ ```typescript
45
+ // Before
46
+ const runtime = await loadContainerRuntime({
47
+ context,
48
+ registryEntries,
49
+ provideEntryPoint,
50
+ minVersionForCollab: "2.40.0",
51
+ });
52
+
53
+ // After
54
+ const runtime = await loadContainerRuntime({
55
+ context,
56
+ registryEntries,
57
+ provideEntryPoint,
58
+ oldestSupportedClient: "2.40.0",
59
+ });
60
+ ```
61
+
62
+ Telemetry property names are unchanged.
63
+
3
64
  ## 2.115.0
4
65
 
5
66
  Dependency updates only.
package/README.md CHANGED
@@ -291,7 +291,7 @@ There are many ways to [contribute](https://github.com/microsoft/FluidFramework/
291
291
  - Review the [source code changes](https://github.com/microsoft/FluidFramework/pulls).
292
292
  - [Contribute bug fixes](https://github.com/microsoft/FluidFramework/blob/main/CONTRIBUTING.md).
293
293
 
294
- Detailed instructions for working in the repo can be found in the [Wiki](https://github.com/microsoft/FluidFramework/wiki).
294
+ Detailed instructions for working in the repo can be found in the [Wiki](https://github.com/microsoft/FluidFramework/blob/main/docs/content/Home.md).
295
295
 
296
296
  This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
297
297
  For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
@@ -302,9 +302,11 @@ Use of Microsoft trademarks or logos in modified versions of this project must n
302
302
 
303
303
  ## Help
304
304
 
305
- Not finding what you're looking for in this README? Check out [fluidframework.com](https://fluidframework.com/docs/).
305
+ Not finding what you're looking for in this README?
306
+ Check out [fluidframework.com](https://fluidframework.com/docs/).
306
307
 
307
- Still not finding what you're looking for? Please [file an issue](https://github.com/microsoft/FluidFramework/wiki/Submitting-Bugs-and-Feature-Requests).
308
+ Still not finding what you're looking for?
309
+ Please [file an issue](https://github.com/microsoft/FluidFramework/blob/main/docs/content/Contributing/Submitting-Bugs-and-Feature-Requests.md).
308
310
 
309
311
  Thank you!
310
312
 
@@ -19,7 +19,9 @@ export class BaseContainerRuntimeFactory extends RuntimeFactoryHelper implements
19
19
  export interface BaseContainerRuntimeFactoryProps {
20
20
  // @deprecated (undocumented)
21
21
  dependencyContainer?: IFluidDependencySynthesizer;
22
- minVersionForCollab?: MinimumVersionForCollab | undefined;
22
+ // @deprecated
23
+ minVersionForCollab?: OldestSupportedClientVersion | undefined;
24
+ oldestSupportedClient?: OldestSupportedClientVersion | undefined;
23
25
  provideEntryPoint: (runtime: IContainerRuntime) => Promise<FluidObject>;
24
26
  registryEntries: NamedFluidDataStoreRegistryEntries;
25
27
  // @deprecated
@@ -7,7 +7,7 @@ import { type IContainerRuntimeOptions } from "@fluidframework/container-runtime
7
7
  import type { IContainerRuntime } from "@fluidframework/container-runtime-definitions/internal";
8
8
  import type { FluidObject } from "@fluidframework/core-interfaces";
9
9
  import { type RuntimeRequestHandler } from "@fluidframework/request-handler/internal";
10
- import type { IFluidDataStoreRegistry, IProvideFluidDataStoreRegistry, MinimumVersionForCollab, NamedFluidDataStoreRegistryEntries } from "@fluidframework/runtime-definitions/internal";
10
+ import type { IFluidDataStoreRegistry, IProvideFluidDataStoreRegistry, NamedFluidDataStoreRegistryEntries, OldestSupportedClientVersion } from "@fluidframework/runtime-definitions/internal";
11
11
  import { RuntimeFactoryHelper } from "@fluidframework/runtime-utils/internal";
12
12
  import { type IFluidDependencySynthesizer } from "@fluidframework/synthesize/internal";
13
13
  /**
@@ -40,10 +40,29 @@ export interface BaseContainerRuntimeFactoryProps {
40
40
  */
41
41
  provideEntryPoint: (runtime: IContainerRuntime) => Promise<FluidObject>;
42
42
  /**
43
- * Minimum version of the FF runtime that is required to collaborate on new documents.
44
- * See {@link @fluidframework/container-runtime#LoadContainerRuntimeParams.minVersionForCollab} for more details on this property.
43
+ * Oldest version of Fluid Framework client that must be able to open and process documents
44
+ * written by this container runtime.
45
+ * @remarks
46
+ * Choosing an older version may limit the features and write formats the application can use to
47
+ * those supported by that version.
48
+ *
49
+ * See {@link @fluidframework/container-runtime#LoadContainerRuntimeParams.oldestSupportedClient} for more details on this property.
45
50
  */
46
- minVersionForCollab?: MinimumVersionForCollab | undefined;
51
+ oldestSupportedClient?: OldestSupportedClientVersion | undefined;
52
+ /**
53
+ * Oldest version of Fluid Framework client that must be able to open and process documents
54
+ * written by this container runtime.
55
+ *
56
+ * @remarks
57
+ * See {@link BaseContainerRuntimeFactoryProps.oldestSupportedClient} for compatibility implications.
58
+ *
59
+ * Specifying both `oldestSupportedClient` and `minVersionForCollab` is an error.
60
+ *
61
+ * @deprecated 2.116.0. To be removed in 3.10.0. Use
62
+ * {@link BaseContainerRuntimeFactoryProps.oldestSupportedClient} instead.
63
+ * See {@link https://github.com/microsoft/FluidFramework/issues/27851} for context.
64
+ */
65
+ minVersionForCollab?: OldestSupportedClientVersion | undefined;
47
66
  }
48
67
  /**
49
68
  * BaseContainerRuntimeFactory produces container runtimes with the specified data store and service registries,
@@ -63,7 +82,7 @@ export declare class BaseContainerRuntimeFactory extends RuntimeFactoryHelper im
63
82
  private readonly runtimeOptions?;
64
83
  private readonly requestHandlers;
65
84
  private readonly provideEntryPoint;
66
- private readonly minVersionForCollab;
85
+ private readonly oldestSupportedClient;
67
86
  constructor(props: BaseContainerRuntimeFactoryProps);
68
87
  /**
69
88
  * Called the one time the container is created, and not on any subsequent load.
@@ -1 +1 @@
1
- {"version":3,"file":"baseContainerRuntimeFactory.d.ts","sourceRoot":"","sources":["../../src/container-runtime-factories/baseContainerRuntimeFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EACX,iBAAiB,EACjB,QAAQ,EACR,MAAM,gDAAgD,CAAC;AACxD,OAAO,EAGN,KAAK,wBAAwB,EAC7B,MAAM,4CAA4C,CAAC;AACpD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wDAAwD,CAAC;AAChG,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,EAEN,KAAK,qBAAqB,EAG1B,MAAM,0CAA0C,CAAC;AAClD,OAAO,KAAK,EACX,uBAAuB,EACvB,8BAA8B,EAC9B,uBAAuB,EACvB,kCAAkC,EAClC,MAAM,8CAA8C,CAAC;AACtD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wCAAwC,CAAC;AAC9E,OAAO,EAEN,KAAK,2BAA2B,EAEhC,MAAM,qCAAqC,CAAC;AAE7C;;;;;GAKG;AACH,MAAM,WAAW,gCAAgC;IAChD;;OAEG;IACH,eAAe,EAAE,kCAAkC,CAAC;IACpD;;OAEG;IACH,mBAAmB,CAAC,EAAE,2BAA2B,CAAC;IAClD;;;OAGG;IAEH,eAAe,CAAC,EAAE,qBAAqB,EAAE,CAAC;IAC1C;;OAEG;IACH,cAAc,CAAC,EAAE,wBAAwB,CAAC;IAC1C;;;OAGG;IACH,iBAAiB,EAAE,CAAC,OAAO,EAAE,iBAAiB,KAAK,OAAO,CAAC,WAAW,CAAC,CAAC;IACxE;;;OAGG;IACH,m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Ac,CAAC,CAA2B;IAE3D,OAAO,CAAC,QAAQ,CAAC,eAAe,CAA0B;IAC1D,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAuD;IACzF,OAAO,CAAC,QAAQ,CAAC,qBAAqB,CAA2C;gBAE9D,KAAK,EAAE,gCAAgC;IAsB1D;;;;OAIG;IACU,oBAAoB,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC;IAK5E;;;;OAIG;IACU,uBAAuB,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC;IAI/E;;;;OAIG;IACU,aAAa,CACzB,OAAO,EAAE,iBAAiB,EAC1B,QAAQ,EAAE,OAAO,GACf,OAAO,CAAC,iBAAiB,GAAG,QAAQ,CAAC;IAuBxC;;;;OAIG;cACa,8BAA8B,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC;IAEzF;;;;OAIG;cACa,uBAAuB,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC;CAClF"}
@@ -6,9 +6,10 @@
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
7
  exports.BaseContainerRuntimeFactory = void 0;
8
8
  const internal_1 = require("@fluidframework/container-runtime/internal");
9
- const internal_2 = require("@fluidframework/request-handler/internal");
10
- const internal_3 = require("@fluidframework/runtime-utils/internal");
11
- const internal_4 = require("@fluidframework/synthesize/internal");
9
+ const internal_2 = require("@fluidframework/telemetry-utils/internal");
10
+ const internal_3 = require("@fluidframework/request-handler/internal");
11
+ const internal_4 = require("@fluidframework/runtime-utils/internal");
12
+ const internal_5 = require("@fluidframework/synthesize/internal");
12
13
  /**
13
14
  * BaseContainerRuntimeFactory produces container runtimes with the specified data store and service registries,
14
15
  * request handlers, runtimeOptions, and entryPoint initialization function.
@@ -16,7 +17,7 @@ const internal_4 = require("@fluidframework/synthesize/internal");
16
17
  * @legacy
17
18
  * @beta
18
19
  */
19
- class BaseContainerRuntimeFactory extends internal_3.RuntimeFactoryHelper {
20
+ class BaseContainerRuntimeFactory extends internal_4.RuntimeFactoryHelper {
20
21
  /**
21
22
  * {@inheritDoc @fluidframework/runtime-definitions#IProvideFluidDataStoreRegistry.IFluidDataStoreRegistry}
22
23
  */
@@ -31,7 +32,13 @@ class BaseContainerRuntimeFactory extends internal_3.RuntimeFactoryHelper {
31
32
  this.provideEntryPoint = props.provideEntryPoint;
32
33
  this.requestHandlers = props.requestHandlers ?? [];
33
34
  this.registry = new internal_1.FluidDataStoreRegistry(this.registryEntries);
34
- this.minVersionForCollab = props.minVersionForCollab;
35
+ // eslint-disable-next-line import-x/no-deprecated -- accepted for compatibility. See #27851
36
+ const deprecatedMinVersionForCollab = props.minVersionForCollab;
37
+ if (props.oldestSupportedClient !== undefined &&
38
+ deprecatedMinVersionForCollab !== undefined) {
39
+ throw new internal_2.UsageError("Specify only one of oldestSupportedClient or minVersionForCollab (deprecated), not both.");
40
+ }
41
+ this.oldestSupportedClient = props.oldestSupportedClient ?? deprecatedMinVersionForCollab;
35
42
  }
36
43
  /**
37
44
  * Called the one time the container is created, and not on any subsequent load.
@@ -58,7 +65,7 @@ class BaseContainerRuntimeFactory extends internal_3.RuntimeFactoryHelper {
58
65
  async preInitialize(context, existing) {
59
66
  const scope = context.scope;
60
67
  if (this.dependencyContainer) {
61
- const dc = new internal_4.DependencyContainer(this.dependencyContainer, scope.IFluidDependencySynthesizer);
68
+ const dc = new internal_5.DependencyContainer(this.dependencyContainer, scope.IFluidDependencySynthesizer);
62
69
  scope.IFluidDependencySynthesizer = dc;
63
70
  }
64
71
  return (0, internal_1.loadContainerRuntime)({
@@ -68,9 +75,9 @@ class BaseContainerRuntimeFactory extends internal_3.RuntimeFactoryHelper {
68
75
  registryEntries: this.registryEntries,
69
76
  containerScope: scope,
70
77
  // eslint-disable-next-line import-x/no-deprecated
71
- requestHandler: (0, internal_2.buildRuntimeRequestHandler)(...this.requestHandlers),
78
+ requestHandler: (0, internal_3.buildRuntimeRequestHandler)(...this.requestHandlers),
72
79
  provideEntryPoint: this.provideEntryPoint,
73
- minVersionForCollab: this.minVersionForCollab,
80
+ oldestSupportedClient: this.oldestSupportedClient,
74
81
  });
75
82
  }
76
83
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"baseContainerRuntimeFactory.js","sourceRoot":"","sources":["../../src/container-runtime-factories/baseContainerRuntimeFactory.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAMH,yEAIoD;AAGpD,uEAKkD;AAOlD,qEAA8E;AAC9E,kEAI6C;AAuC7C;;;;;;GAMG;AACH,MAAa,2BACZ,SAAQ,+BAAoB;IAG5B;;OAEG;IACH,IAAW,uBAAuB;QACjC,OAAO,IAAI,CAAC,QAAQ,CAAC;IACtB,CAAC;IAWD,YAAmB,KAAuC;QACzD,KAAK,EAAE,CAAC;QAER,IAAI,CAAC,eAAe,GAAG,KAAK,CAAC,eAAe,CAAC;QAC7C,IAAI,CAAC,mBAAmB,GAAG,KAAK,CAAC,mBAAmB,CAAC;QACrD,IAAI,CAAC,cAAc,GAAG,KAAK,CAAC,cAAc,CAAC;QAC3C,IAAI,CAAC,iBAAiB,GAAG,KAAK,CAAC,iBAAiB,CAAC;QACjD,IAAI,CAAC,eAAe,GAAG,KAAK,CAAC,eAAe,IAAI,EAAE,CAAC;QACnD,IAAI,CAAC,QAAQ,GAAG,IAAI,iCAAsB,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;QACjE,IAAI,CAAC,mBAAmB,GAAG,KAAK,CAAC,mBAAmB,CAAC;IACtD,CAAC;IAED;;;;OAIG;IACI,KAAK,CAAC,oBAAoB,CAAC,OAA0B;QAC3D,MAAM,IAAI,CAAC,8BAA8B,CAAC,OAAO,CAAC,CAAC;QACnD,MAAM,IAAI,CAAC,uBAAuB,CAAC,OAAO,CAAC,CAAC;IAC7C,CAAC;IAED;;;;OAIG;IACI,KAAK,CAAC,uBAAuB,CAAC,OAA0B;QAC9D,MAAM,IAAI,CAAC,uBAAuB,CAAC,OAAO,CAAC,CAAC;IAC7C,CAAC;IAED;;;;OAIG;IACI,KAAK,CAAC,aAAa,CACzB,OAA0B,EAC1B,QAAiB;QAEjB,MAAM,KAAK,GAAgD,OAAO,CAAC,KAAK,CAAC;QACzE,IAAI,IAAI,CAAC,mBAAmB,EAAE,CAAC;YAC9B,MAAM,EAAE,GAAG,IAAI,8BAAmB,CACjC,IAAI,CAAC,mBAAmB,EACxB,KAAK,CAAC,2BAA2B,CACjC,CAAC;YACF,KAAK,CAAC,2BAA2B,GAAG,EAAE,CAAC;QACxC,CAAC;QAED,OAAO,IAAA,+BAAoB,EAAC;YAC3B,OAAO;YACP,QAAQ;YACR,cAAc,EAAE,IAAI,CAAC,cAAc;YACnC,eAAe,EAAE,IAAI,CAAC,eAAe;YACrC,cAAc,EAAE,KAAK;YACrB,kDAAkD;YAClD,cAAc,EAAE,IAAA,qCAA0B,EAAC,GAAG,IAAI,CAAC,eAAe,CAAC;YACnE,iBAAiB,EAAE,IAAI,CAAC,iBAAiB;YACzC,mBAAmB,EAAE,IAAI,CAAC,mBAAmB;SAC7C,CAAC,CAAC;IACJ,CAAC;IAED;;;;OAIG;IACO,KAAK,CAAC,8BAA8B,CAAC,OAA0B,IAAkB,CAAC;IAE5F;;;;OAIG;IACO,KAAK,CAAC,uBAAuB,CAAC,OAA0B,IAAkB,CAAC;CACrF;AA/FD,kEA+FC","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 {\n\tFluidDataStoreRegistry,\n\tloadContainerRuntime,\n\ttype IContainerRuntimeOptions,\n} from \"@fluidframework/container-runtime/internal\";\nimport type { IContainerRuntime } from \"@fluidframework/container-runtime-definitions/internal\";\nimport type { FluidObject } from \"@fluidframework/core-interfaces\";\nimport {\n\t// eslint-disable-next-line import-x/no-deprecated\n\ttype RuntimeRequestHandler,\n\t// eslint-disable-next-line import-x/no-deprecated\n\tbuildRuntimeRequestHandler,\n} from \"@fluidframework/request-handler/internal\";\nimport type {\n\tIFluidDataStoreRegistry,\n\tIProvideFluidDataStoreRegistry,\n\tMinimumVersionForCollab,\n\tNamedFluidDataStoreRegistryEntries,\n} from \"@fluidframework/runtime-definitions/internal\";\nimport { RuntimeFactoryHelper } from \"@fluidframework/runtime-utils/internal\";\nimport {\n\tDependencyContainer,\n\ttype IFluidDependencySynthesizer,\n\ttype IProvideFluidDependencySynthesizer,\n} from \"@fluidframework/synthesize/internal\";\n\n/**\n * {@link BaseContainerRuntimeFactory} construction properties.\n * @input\n * @legacy\n * @beta\n */\nexport interface BaseContainerRuntimeFactoryProps {\n\t/**\n\t * The data store registry for containers produced.\n\t */\n\tregistryEntries: NamedFluidDataStoreRegistryEntries;\n\t/**\n\t * @deprecated Will be removed in a future release.\n\t */\n\tdependencyContainer?: IFluidDependencySynthesizer;\n\t/**\n\t * Request handlers for containers produced.\n\t * @deprecated Will be removed once Loader LTS version is \"2.0.0-internal.7.0.0\". Migrate all usage of IFluidRouter to the \"entryPoint\" pattern. Refer to Removing-IFluidRouter.md\n\t */\n\t// eslint-disable-next-line import-x/no-deprecated\n\trequestHandlers?: RuntimeRequestHandler[];\n\t/**\n\t * The runtime options passed to the ContainerRuntime when instantiating it\n\t */\n\truntimeOptions?: IContainerRuntimeOptions;\n\t/**\n\t * Function that will initialize the entryPoint of the ContainerRuntime instances\n\t * created with this factory\n\t */\n\tprovideEntryPoint: (runtime: IContainerRuntime) => Promise<FluidObject>;\n\t/**\n\t * Minimum version of the FF runtime that is required to collaborate on new documents.\n\t * See {@link @fluidframework/container-runtime#LoadContainerRuntimeParams.minVersionForCollab} for more details on this property.\n\t */\n\tminVersionForCollab?: MinimumVersionForCollab | undefined;\n}\n\n/**\n * BaseContainerRuntimeFactory produces container runtimes with the specified data store and service registries,\n * request handlers, runtimeOptions, and entryPoint initialization function.\n * It can be subclassed to implement a first-time initialization procedure for the containers it creates.\n * @legacy\n * @beta\n */\nexport class BaseContainerRuntimeFactory\n\textends RuntimeFactoryHelper\n\timplements IProvideFluidDataStoreRegistry\n{\n\t/**\n\t * {@inheritDoc @fluidframework/runtime-definitions#IProvideFluidDataStoreRegistry.IFluidDataStoreRegistry}\n\t */\n\tpublic get IFluidDataStoreRegistry(): IFluidDataStoreRegistry {\n\t\treturn this.registry;\n\t}\n\tprivate readonly registry: IFluidDataStoreRegistry;\n\n\tprivate readonly registryEntries: NamedFluidDataStoreRegistryEntries;\n\tprivate readonly dependencyContainer?: IFluidDependencySynthesizer;\n\tprivate readonly runtimeOptions?: IContainerRuntimeOptions;\n\t// eslint-disable-next-line import-x/no-deprecated\n\tprivate readonly requestHandlers: RuntimeRequestHandler[];\n\tprivate readonly provideEntryPoint: (runtime: IContainerRuntime) => Promise<FluidObject>;\n\tprivate readonly minVersionForCollab: MinimumVersionForCollab | undefined;\n\n\tpublic constructor(props: BaseContainerRuntimeFactoryProps) {\n\t\tsuper();\n\n\t\tthis.registryEntries = props.registryEntries;\n\t\tthis.dependencyContainer = props.dependencyContainer;\n\t\tthis.runtimeOptions = props.runtimeOptions;\n\t\tthis.provideEntryPoint = props.provideEntryPoint;\n\t\tthis.requestHandlers = props.requestHandlers ?? [];\n\t\tthis.registry = new FluidDataStoreRegistry(this.registryEntries);\n\t\tthis.minVersionForCollab = props.minVersionForCollab;\n\t}\n\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: IContainerRuntime): Promise<void> {\n\t\tawait this.containerInitializingFirstTime(runtime);\n\t\tawait this.containerHasInitialized(runtime);\n\t}\n\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: IContainerRuntime): Promise<void> {\n\t\tawait this.containerHasInitialized(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 async preInitialize(\n\t\tcontext: IContainerContext,\n\t\texisting: boolean,\n\t): Promise<IContainerRuntime & IRuntime> {\n\t\tconst scope: Partial<IProvideFluidDependencySynthesizer> = context.scope;\n\t\tif (this.dependencyContainer) {\n\t\t\tconst dc = new DependencyContainer<FluidObject>(\n\t\t\t\tthis.dependencyContainer,\n\t\t\t\tscope.IFluidDependencySynthesizer,\n\t\t\t);\n\t\t\tscope.IFluidDependencySynthesizer = dc;\n\t\t}\n\n\t\treturn loadContainerRuntime({\n\t\t\tcontext,\n\t\t\texisting,\n\t\t\truntimeOptions: this.runtimeOptions,\n\t\t\tregistryEntries: this.registryEntries,\n\t\t\tcontainerScope: scope,\n\t\t\t// eslint-disable-next-line import-x/no-deprecated\n\t\t\trequestHandler: buildRuntimeRequestHandler(...this.requestHandlers),\n\t\t\tprovideEntryPoint: this.provideEntryPoint,\n\t\t\tminVersionForCollab: this.minVersionForCollab,\n\t\t});\n\t}\n\n\t/**\n\t * Subclasses may override containerInitializingFirstTime to perform any setup steps at the time the container\n\t * is created. This likely includes creating any initial data stores that are expected to be there at the outset.\n\t * @param runtime - The container runtime for the container being initialized\n\t */\n\tprotected async containerInitializingFirstTime(runtime: IContainerRuntime): Promise<void> {}\n\n\t/**\n\t * Subclasses may override containerHasInitialized to perform any steps after the container has initialized.\n\t * This likely includes loading any data stores that are expected to be there at the outset.\n\t * @param runtime - The container runtime for the container being initialized\n\t */\n\tprotected async containerHasInitialized(runtime: IContainerRuntime): Promise<void> {}\n}\n"]}
1
+ {"version":3,"file":"baseContainerRuntimeFactory.js","sourceRoot":"","sources":["../../src/container-runtime-factories/baseContainerRuntimeFactory.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAMH,yEAIoD;AAGpD,u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,KAAK,CAAC,aAAa,CACzB,OAA0B,EAC1B,QAAiB;QAEjB,MAAM,KAAK,GAAgD,OAAO,CAAC,KAAK,CAAC;QACzE,IAAI,IAAI,CAAC,mBAAmB,EAAE,CAAC;YAC9B,MAAM,EAAE,GAAG,IAAI,8BAAmB,CACjC,IAAI,CAAC,mBAAmB,EACxB,KAAK,CAAC,2BAA2B,CACjC,CAAC;YACF,KAAK,CAAC,2BAA2B,GAAG,EAAE,CAAC;QACxC,CAAC;QAED,OAAO,IAAA,+BAAoB,EAAC;YAC3B,OAAO;YACP,QAAQ;YACR,cAAc,EAAE,IAAI,CAAC,cAAc;YACnC,eAAe,EAAE,IAAI,CAAC,eAAe;YACrC,cAAc,EAAE,KAAK;YACrB,kDAAkD;YAClD,cAAc,EAAE,IAAA,qCAA0B,EAAC,GAAG,IAAI,CAAC,eAAe,CAAC;YACnE,iBAAiB,EAAE,IAAI,CAAC,iBAAiB;YACzC,qBAAqB,EAAE,IAAI,CAAC,qBAAqB;SACjD,CAAC,CAAC;IACJ,CAAC;IAED;;;;OAIG;IACO,KAAK,CAAC,8BAA8B,CAAC,OAA0B,IAAkB,CAAC;IAE5F;;;;OAIG;IACO,KAAK,CAAC,uBAAuB,CAAC,OAA0B,IAAkB,CAAC;CACrF;AAzGD,kEAyGC","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 {\n\tFluidDataStoreRegistry,\n\tloadContainerRuntime,\n\ttype IContainerRuntimeOptions,\n} from \"@fluidframework/container-runtime/internal\";\nimport type { IContainerRuntime } from \"@fluidframework/container-runtime-definitions/internal\";\nimport type { FluidObject } from \"@fluidframework/core-interfaces\";\nimport { UsageError } from \"@fluidframework/telemetry-utils/internal\";\nimport {\n\t// eslint-disable-next-line import-x/no-deprecated\n\ttype RuntimeRequestHandler,\n\t// eslint-disable-next-line import-x/no-deprecated\n\tbuildRuntimeRequestHandler,\n} from \"@fluidframework/request-handler/internal\";\nimport type {\n\tIFluidDataStoreRegistry,\n\tIProvideFluidDataStoreRegistry,\n\tNamedFluidDataStoreRegistryEntries,\n\tOldestSupportedClientVersion,\n} from \"@fluidframework/runtime-definitions/internal\";\nimport { RuntimeFactoryHelper } from \"@fluidframework/runtime-utils/internal\";\nimport {\n\tDependencyContainer,\n\ttype IFluidDependencySynthesizer,\n\ttype IProvideFluidDependencySynthesizer,\n} from \"@fluidframework/synthesize/internal\";\n\n/**\n * {@link BaseContainerRuntimeFactory} construction properties.\n * @input\n * @legacy\n * @beta\n */\nexport interface BaseContainerRuntimeFactoryProps {\n\t/**\n\t * The data store registry for containers produced.\n\t */\n\tregistryEntries: NamedFluidDataStoreRegistryEntries;\n\t/**\n\t * @deprecated Will be removed in a future release.\n\t */\n\tdependencyContainer?: IFluidDependencySynthesizer;\n\t/**\n\t * Request handlers for containers produced.\n\t * @deprecated Will be removed once Loader LTS version is \"2.0.0-internal.7.0.0\". Migrate all usage of IFluidRouter to the \"entryPoint\" pattern. Refer to Removing-IFluidRouter.md\n\t */\n\t// eslint-disable-next-line import-x/no-deprecated\n\trequestHandlers?: RuntimeRequestHandler[];\n\t/**\n\t * The runtime options passed to the ContainerRuntime when instantiating it\n\t */\n\truntimeOptions?: IContainerRuntimeOptions;\n\t/**\n\t * Function that will initialize the entryPoint of the ContainerRuntime instances\n\t * created with this factory\n\t */\n\tprovideEntryPoint: (runtime: IContainerRuntime) => Promise<FluidObject>;\n\t/**\n\t * Oldest version of Fluid Framework client that must be able to open and process documents\n\t * written by this container runtime.\n\t * @remarks\n\t * Choosing an older version may limit the features and write formats the application can use to\n\t * those supported by that version.\n\t *\n\t * See {@link @fluidframework/container-runtime#LoadContainerRuntimeParams.oldestSupportedClient} for more details on this property.\n\t */\n\toldestSupportedClient?: OldestSupportedClientVersion | undefined;\n\n\t/**\n\t * Oldest version of Fluid Framework client that must be able to open and process documents\n\t * written by this container runtime.\n\t *\n\t * @remarks\n\t * See {@link BaseContainerRuntimeFactoryProps.oldestSupportedClient} for compatibility implications.\n\t *\n\t * Specifying both `oldestSupportedClient` and `minVersionForCollab` is an error.\n\t *\n\t * @deprecated 2.116.0. To be removed in 3.10.0. Use\n\t * {@link BaseContainerRuntimeFactoryProps.oldestSupportedClient} instead.\n\t * See {@link https://github.com/microsoft/FluidFramework/issues/27851} for context.\n\t */\n\tminVersionForCollab?: OldestSupportedClientVersion | undefined;\n}\n\n/**\n * BaseContainerRuntimeFactory produces container runtimes with the specified data store and service registries,\n * request handlers, runtimeOptions, and entryPoint initialization function.\n * It can be subclassed to implement a first-time initialization procedure for the containers it creates.\n * @legacy\n * @beta\n */\nexport class BaseContainerRuntimeFactory\n\textends RuntimeFactoryHelper\n\timplements IProvideFluidDataStoreRegistry\n{\n\t/**\n\t * {@inheritDoc @fluidframework/runtime-definitions#IProvideFluidDataStoreRegistry.IFluidDataStoreRegistry}\n\t */\n\tpublic get IFluidDataStoreRegistry(): IFluidDataStoreRegistry {\n\t\treturn this.registry;\n\t}\n\tprivate readonly registry: IFluidDataStoreRegistry;\n\n\tprivate readonly registryEntries: NamedFluidDataStoreRegistryEntries;\n\tprivate readonly dependencyContainer?: IFluidDependencySynthesizer;\n\tprivate readonly runtimeOptions?: IContainerRuntimeOptions;\n\t// eslint-disable-next-line import-x/no-deprecated\n\tprivate readonly requestHandlers: RuntimeRequestHandler[];\n\tprivate readonly provideEntryPoint: (runtime: IContainerRuntime) => Promise<FluidObject>;\n\tprivate readonly oldestSupportedClient: OldestSupportedClientVersion | undefined;\n\n\tpublic constructor(props: BaseContainerRuntimeFactoryProps) {\n\t\tsuper();\n\n\t\tthis.registryEntries = props.registryEntries;\n\t\tthis.dependencyContainer = props.dependencyContainer;\n\t\tthis.runtimeOptions = props.runtimeOptions;\n\t\tthis.provideEntryPoint = props.provideEntryPoint;\n\t\tthis.requestHandlers = props.requestHandlers ?? [];\n\t\tthis.registry = new FluidDataStoreRegistry(this.registryEntries);\n\t\t// eslint-disable-next-line import-x/no-deprecated -- accepted for compatibility. See #27851\n\t\tconst deprecatedMinVersionForCollab = props.minVersionForCollab;\n\t\tif (\n\t\t\tprops.oldestSupportedClient !== undefined &&\n\t\t\tdeprecatedMinVersionForCollab !== undefined\n\t\t) {\n\t\t\tthrow new UsageError(\n\t\t\t\t\"Specify only one of oldestSupportedClient or minVersionForCollab (deprecated), not both.\",\n\t\t\t);\n\t\t}\n\t\tthis.oldestSupportedClient = props.oldestSupportedClient ?? deprecatedMinVersionForCollab;\n\t}\n\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: IContainerRuntime): Promise<void> {\n\t\tawait this.containerInitializingFirstTime(runtime);\n\t\tawait this.containerHasInitialized(runtime);\n\t}\n\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: IContainerRuntime): Promise<void> {\n\t\tawait this.containerHasInitialized(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 async preInitialize(\n\t\tcontext: IContainerContext,\n\t\texisting: boolean,\n\t): Promise<IContainerRuntime & IRuntime> {\n\t\tconst scope: Partial<IProvideFluidDependencySynthesizer> = context.scope;\n\t\tif (this.dependencyContainer) {\n\t\t\tconst dc = new DependencyContainer<FluidObject>(\n\t\t\t\tthis.dependencyContainer,\n\t\t\t\tscope.IFluidDependencySynthesizer,\n\t\t\t);\n\t\t\tscope.IFluidDependencySynthesizer = dc;\n\t\t}\n\n\t\treturn loadContainerRuntime({\n\t\t\tcontext,\n\t\t\texisting,\n\t\t\truntimeOptions: this.runtimeOptions,\n\t\t\tregistryEntries: this.registryEntries,\n\t\t\tcontainerScope: scope,\n\t\t\t// eslint-disable-next-line import-x/no-deprecated\n\t\t\trequestHandler: buildRuntimeRequestHandler(...this.requestHandlers),\n\t\t\tprovideEntryPoint: this.provideEntryPoint,\n\t\t\toldestSupportedClient: this.oldestSupportedClient,\n\t\t});\n\t}\n\n\t/**\n\t * Subclasses may override containerInitializingFirstTime to perform any setup steps at the time the container\n\t * is created. This likely includes creating any initial data stores that are expected to be there at the outset.\n\t * @param runtime - The container runtime for the container being initialized\n\t */\n\tprotected async containerInitializingFirstTime(runtime: IContainerRuntime): Promise<void> {}\n\n\t/**\n\t * Subclasses may override containerHasInitialized to perform any steps after the container has initialized.\n\t * This likely includes loading any data stores that are expected to be there at the outset.\n\t * @param runtime - The container runtime for the container being initialized\n\t */\n\tprotected async containerHasInitialized(runtime: IContainerRuntime): Promise<void> {}\n}\n"]}
@@ -7,7 +7,7 @@ import { type IContainerRuntimeOptions } from "@fluidframework/container-runtime
7
7
  import type { IContainerRuntime } from "@fluidframework/container-runtime-definitions/internal";
8
8
  import type { FluidObject } from "@fluidframework/core-interfaces";
9
9
  import { type RuntimeRequestHandler } from "@fluidframework/request-handler/internal";
10
- import type { IFluidDataStoreRegistry, IProvideFluidDataStoreRegistry, MinimumVersionForCollab, NamedFluidDataStoreRegistryEntries } from "@fluidframework/runtime-definitions/internal";
10
+ import type { IFluidDataStoreRegistry, IProvideFluidDataStoreRegistry, NamedFluidDataStoreRegistryEntries, OldestSupportedClientVersion } from "@fluidframework/runtime-definitions/internal";
11
11
  import { RuntimeFactoryHelper } from "@fluidframework/runtime-utils/internal";
12
12
  import { type IFluidDependencySynthesizer } from "@fluidframework/synthesize/internal";
13
13
  /**
@@ -40,10 +40,29 @@ export interface BaseContainerRuntimeFactoryProps {
40
40
  */
41
41
  provideEntryPoint: (runtime: IContainerRuntime) => Promise<FluidObject>;
42
42
  /**
43
- * Minimum version of the FF runtime that is required to collaborate on new documents.
44
- * See {@link @fluidframework/container-runtime#LoadContainerRuntimeParams.minVersionForCollab} for more details on this property.
43
+ * Oldest version of Fluid Framework client that must be able to open and process documents
44
+ * written by this container runtime.
45
+ * @remarks
46
+ * Choosing an older version may limit the features and write formats the application can use to
47
+ * those supported by that version.
48
+ *
49
+ * See {@link @fluidframework/container-runtime#LoadContainerRuntimeParams.oldestSupportedClient} for more details on this property.
45
50
  */
46
- minVersionForCollab?: MinimumVersionForCollab | undefined;
51
+ oldestSupportedClient?: OldestSupportedClientVersion | undefined;
52
+ /**
53
+ * Oldest version of Fluid Framework client that must be able to open and process documents
54
+ * written by this container runtime.
55
+ *
56
+ * @remarks
57
+ * See {@link BaseContainerRuntimeFactoryProps.oldestSupportedClient} for compatibility implications.
58
+ *
59
+ * Specifying both `oldestSupportedClient` and `minVersionForCollab` is an error.
60
+ *
61
+ * @deprecated 2.116.0. To be removed in 3.10.0. Use
62
+ * {@link BaseContainerRuntimeFactoryProps.oldestSupportedClient} instead.
63
+ * See {@link https://github.com/microsoft/FluidFramework/issues/27851} for context.
64
+ */
65
+ minVersionForCollab?: OldestSupportedClientVersion | undefined;
47
66
  }
48
67
  /**
49
68
  * BaseContainerRuntimeFactory produces container runtimes with the specified data store and service registries,
@@ -63,7 +82,7 @@ export declare class BaseContainerRuntimeFactory extends RuntimeFactoryHelper im
63
82
  private readonly runtimeOptions?;
64
83
  private readonly requestHandlers;
65
84
  private readonly provideEntryPoint;
66
- private readonly minVersionForCollab;
85
+ private readonly oldestSupportedClient;
67
86
  constructor(props: BaseContainerRuntimeFactoryProps);
68
87
  /**
69
88
  * Called the one time the container is created, and not on any subsequent load.
@@ -1 +1 @@
1
- {"version":3,"file":"baseContainerRuntimeFactory.d.ts","sourceRoot":"","sources":["../../src/container-runtime-factories/baseContainerRuntimeFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EACX,iBAAiB,EACjB,QAAQ,EACR,MAAM,gDAAgD,CAAC;AACxD,OAAO,EA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CAAC,QAAQ,CAAC,iBAAiB,CAAuD;IACzF,OAAO,CAAC,QAAQ,CAAC,mBAAmB,CAAsC;gBAEvD,KAAK,EAAE,gCAAgC;IAY1D;;;;OAIG;IACU,oBAAoB,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC;IAK5E;;;;OAIG;IACU,uBAAuB,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC;IAI/E;;;;OAIG;IACU,aAAa,CACzB,OAAO,EAAE,iBAAiB,EAC1B,QAAQ,EAAE,OAAO,GACf,OAAO,CAAC,iBAAiB,GAAG,QAAQ,CAAC;IAuBxC;;;;OAIG;cACa,8BAA8B,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC;IAEzF;;;;OAIG;cACa,uBAAuB,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC;CAClF"}
1
+ {"version":3,"file":"baseContainerRuntimeFactory.d.ts","sourceRoot":"","sources":["../../src/container-runtime-factories/baseContainerRuntimeFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EACX,iBAAiB,EACjB,QAAQ,EACR,MAAM,gDAAgD,CAAC;AACxD,OAAO,EAGN,KAAK,wBAAwB,EAC7B,MAAM,4CAA4C,CAAC;AACpD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wDAAwD,CAAC;AAChG,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAEnE,OAAO,EAEN,KAAK,qBAAqB,EAG1B,MAAM,0CAA0C,CAAC;AAClD,OAAO,KAAK,EACX,uBAAuB,EACvB,8BAA8B,EAC9B,kCAAkC,EAClC,4BAA4B,EAC5B,MAAM,8CAA8C,CAAC;AACtD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wCAAwC,CAAC;AAC9E,OAAO,EAEN,KAAK,2BAA2B,EAEhC,MAAM,qCAAqC,C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AQ,EAAE,OAAO,GACf,OAAO,CAAC,iBAAiB,GAAG,QAAQ,CAAC;IAuBxC;;;;OAIG;cACa,8BAA8B,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC;IAEzF;;;;OAIG;cACa,uBAAuB,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC;CAClF"}
@@ -3,6 +3,7 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
  import { FluidDataStoreRegistry, loadContainerRuntime, } from "@fluidframework/container-runtime/internal";
6
+ import { UsageError } from "@fluidframework/telemetry-utils/internal";
6
7
  import {
7
8
  // eslint-disable-next-line import-x/no-deprecated
8
9
  buildRuntimeRequestHandler, } from "@fluidframework/request-handler/internal";
@@ -30,7 +31,13 @@ export class BaseContainerRuntimeFactory extends RuntimeFactoryHelper {
30
31
  this.provideEntryPoint = props.provideEntryPoint;
31
32
  this.requestHandlers = props.requestHandlers ?? [];
32
33
  this.registry = new FluidDataStoreRegistry(this.registryEntries);
33
- this.minVersionForCollab = props.minVersionForCollab;
34
+ // eslint-disable-next-line import-x/no-deprecated -- accepted for compatibility. See #27851
35
+ const deprecatedMinVersionForCollab = props.minVersionForCollab;
36
+ if (props.oldestSupportedClient !== undefined &&
37
+ deprecatedMinVersionForCollab !== undefined) {
38
+ throw new UsageError("Specify only one of oldestSupportedClient or minVersionForCollab (deprecated), not both.");
39
+ }
40
+ this.oldestSupportedClient = props.oldestSupportedClient ?? deprecatedMinVersionForCollab;
34
41
  }
35
42
  /**
36
43
  * Called the one time the container is created, and not on any subsequent load.
@@ -69,7 +76,7 @@ export class BaseContainerRuntimeFactory extends RuntimeFactoryHelper {
69
76
  // eslint-disable-next-line import-x/no-deprecated
70
77
  requestHandler: buildRuntimeRequestHandler(...this.requestHandlers),
71
78
  provideEntryPoint: this.provideEntryPoint,
72
- minVersionForCollab: this.minVersionForCollab,
79
+ oldestSupportedClient: this.oldestSupportedClient,
73
80
  });
74
81
  }
75
82
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"baseContainerRuntimeFactory.js","sourceRoot":"","sources":["../../src/container-runtime-factories/baseContainerRuntimeFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH,OAAO,EACN,sBAAsB,EACtB,oBAAoB,GAEpB,MAAM,4CAA4C,CAAC;AAGpD,OAAO;AAGN,kDAAkD;AAClD,0BAA0B,GAC1B,MAAM,0CAA0C,CAAC;AAOlD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wCAAwC,CAAC;AAC9E,OAAO,EACN,mBAAmB,GAGnB,MAAM,qCAAqC,CAAC;AAuC7C;;;;;;GAMG;AACH,MAAM,OAAO,2BACZ,SAAQ,oBAAoB;IAG5B;;OAEG;IACH,IAAW,uBAAuB;QACjC,OAAO,IAAI,CAAC,QAAQ,CAAC;IACtB,CAAC;IAWD,YAAmB,KAAuC;QACzD,KAAK,EAAE,CAAC;QAER,IAAI,CAAC,eAAe,GAAG,KAAK,CAAC,eAAe,CAAC;QAC7C,IAAI,CAAC,mBAAmB,GAAG,KAAK,CAAC,mBAAmB,CAAC;QACrD,IAAI,CAAC,cAAc,GAAG,KAAK,CAAC,cAAc,CAAC;QAC3C,IAAI,CAAC,iBAAiB,GAAG,KAAK,CAAC,iBAAiB,CAAC;QACjD,IAAI,CAAC,eAAe,GAAG,KAAK,CAAC,eAAe,IAAI,EAAE,CAAC;QACnD,IAAI,CAAC,QAAQ,GAAG,IAAI,sBAAsB,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;QACjE,IAAI,CAAC,mBAAmB,GAAG,KAAK,CAAC,mBAAmB,CAAC;IACtD,CAAC;IAED;;;;OAIG;IACI,KAAK,CAAC,oBAAoB,CAAC,OAA0B;QAC3D,MAAM,IAAI,CAAC,8BAA8B,CAAC,OAAO,CAAC,CAAC;QACnD,MAAM,IAAI,CAAC,uBAAuB,CAAC,OAAO,CAAC,CAAC;IAC7C,CAAC;IAED;;;;OAIG;IACI,KAAK,CAAC,uBAAuB,CAAC,OAA0B;QAC9D,MAAM,IAAI,CAAC,uBAAuB,CAAC,OAAO,CAAC,CAAC;IAC7C,CAAC;IAED;;;;OAIG;IACI,KAAK,CAAC,aAAa,CACzB,OAA0B,EAC1B,QAAiB;QAEjB,MAAM,KAAK,GAAgD,OAAO,CAAC,KAAK,CAAC;QACzE,IAAI,IAAI,CAAC,mBAAmB,EAAE,CAAC;YAC9B,MAAM,EAAE,GAAG,IAAI,mBAAmB,CACjC,IAAI,CAAC,mBAAmB,EACxB,KAAK,CAAC,2BAA2B,CACjC,CAAC;YACF,KAAK,CAAC,2BAA2B,GAAG,EAAE,CAAC;QACxC,CAAC;QAED,OAAO,oBAAoB,CAAC;YAC3B,OAAO;YACP,QAAQ;YACR,cAAc,EAAE,IAAI,CAAC,cAAc;YACnC,eAAe,EAAE,IAAI,CAAC,eAAe;YACrC,cAAc,EAAE,KAAK;YACrB,kDAAkD;YAClD,cAAc,EAAE,0BAA0B,CAAC,GAAG,IAAI,CAAC,eAAe,CAAC;YACnE,iBAAiB,EAAE,IAAI,CAAC,iBAAiB;YACzC,mBAAmB,EAAE,IAAI,CAAC,mBAAmB;SAC7C,CAAC,CAAC;IACJ,CAAC;IAED;;;;OAIG;IACO,KAAK,CAAC,8BAA8B,CAAC,OAA0B,IAAkB,CAAC;IAE5F;;;;OAIG;IACO,KAAK,CAAC,uBAAuB,CAAC,OAA0B,IAAkB,CAAC;CACrF","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type {\n\tIContainerContext,\n\tIRuntime,\n} from \"@fluidframework/container-definitions/internal\";\nimport {\n\tFluidDataStoreRegistry,\n\tloadContainerRuntime,\n\ttype IContainerRuntimeOptions,\n} from \"@fluidframework/container-runtime/internal\";\nimport type { IContainerRuntime } from \"@fluidframework/container-runtime-definitions/internal\";\nimport type { FluidObject } from \"@fluidframework/core-interfaces\";\nimport {\n\t// eslint-disable-next-line import-x/no-deprecated\n\ttype RuntimeRequestHandler,\n\t// eslint-disable-next-line import-x/no-deprecated\n\tbuildRuntimeRequestHandler,\n} from \"@fluidframework/request-handler/internal\";\nimport type {\n\tIFluidDataStoreRegistry,\n\tIProvideFluidDataStoreRegistry,\n\tMinimumVersionForCollab,\n\tNamedFluidDataStoreRegistryEntries,\n} from \"@fluidframework/runtime-definitions/internal\";\nimport { RuntimeFactoryHelper } from \"@fluidframework/runtime-utils/internal\";\nimport {\n\tDependencyContainer,\n\ttype IFluidDependencySynthesizer,\n\ttype IProvideFluidDependencySynthesizer,\n} from \"@fluidframework/synthesize/internal\";\n\n/**\n * {@link BaseContainerRuntimeFactory} construction properties.\n * @input\n * @legacy\n * @beta\n */\nexport interface BaseContainerRuntimeFactoryProps {\n\t/**\n\t * The data store registry for containers produced.\n\t */\n\tregistryEntries: NamedFluidDataStoreRegistryEntries;\n\t/**\n\t * @deprecated Will be removed in a future release.\n\t */\n\tdependencyContainer?: IFluidDependencySynthesizer;\n\t/**\n\t * Request handlers for containers produced.\n\t * @deprecated Will be removed once Loader LTS version is \"2.0.0-internal.7.0.0\". Migrate all usage of IFluidRouter to the \"entryPoint\" pattern. Refer to Removing-IFluidRouter.md\n\t */\n\t// eslint-disable-next-line import-x/no-deprecated\n\trequestHandlers?: RuntimeRequestHandler[];\n\t/**\n\t * The runtime options passed to the ContainerRuntime when instantiating it\n\t */\n\truntimeOptions?: IContainerRuntimeOptions;\n\t/**\n\t * Function that will initialize the entryPoint of the ContainerRuntime instances\n\t * created with this factory\n\t */\n\tprovideEntryPoint: (runtime: IContainerRuntime) => Promise<FluidObject>;\n\t/**\n\t * Minimum version of the FF runtime that is required to collaborate on new documents.\n\t * See {@link @fluidframework/container-runtime#LoadContainerRuntimeParams.minVersionForCollab} for more details on this property.\n\t */\n\tminVersionForCollab?: MinimumVersionForCollab | undefined;\n}\n\n/**\n * BaseContainerRuntimeFactory produces container runtimes with the specified data store and service registries,\n * request handlers, runtimeOptions, and entryPoint initialization function.\n * It can be subclassed to implement a first-time initialization procedure for the containers it creates.\n * @legacy\n * @beta\n */\nexport class BaseContainerRuntimeFactory\n\textends RuntimeFactoryHelper\n\timplements IProvideFluidDataStoreRegistry\n{\n\t/**\n\t * {@inheritDoc @fluidframework/runtime-definitions#IProvideFluidDataStoreRegistry.IFluidDataStoreRegistry}\n\t */\n\tpublic get IFluidDataStoreRegistry(): IFluidDataStoreRegistry {\n\t\treturn this.registry;\n\t}\n\tprivate readonly registry: IFluidDataStoreRegistry;\n\n\tprivate readonly registryEntries: NamedFluidDataStoreRegistryEntries;\n\tprivate readonly dependencyContainer?: IFluidDependencySynthesizer;\n\tprivate readonly runtimeOptions?: IContainerRuntimeOptions;\n\t// eslint-disable-next-line import-x/no-deprecated\n\tprivate readonly requestHandlers: RuntimeRequestHandler[];\n\tprivate readonly provideEntryPoint: (runtime: IContainerRuntime) => Promise<FluidObject>;\n\tprivate readonly minVersionForCollab: MinimumVersionForCollab | undefined;\n\n\tpublic constructor(props: BaseContainerRuntimeFactoryProps) {\n\t\tsuper();\n\n\t\tthis.registryEntries = props.registryEntries;\n\t\tthis.dependencyContainer = props.dependencyContainer;\n\t\tthis.runtimeOptions = props.runtimeOptions;\n\t\tthis.provideEntryPoint = props.provideEntryPoint;\n\t\tthis.requestHandlers = props.requestHandlers ?? [];\n\t\tthis.registry = new FluidDataStoreRegistry(this.registryEntries);\n\t\tthis.minVersionForCollab = props.minVersionForCollab;\n\t}\n\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: IContainerRuntime): Promise<void> {\n\t\tawait this.containerInitializingFirstTime(runtime);\n\t\tawait this.containerHasInitialized(runtime);\n\t}\n\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: IContainerRuntime): Promise<void> {\n\t\tawait this.containerHasInitialized(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 async preInitialize(\n\t\tcontext: IContainerContext,\n\t\texisting: boolean,\n\t): Promise<IContainerRuntime & IRuntime> {\n\t\tconst scope: Partial<IProvideFluidDependencySynthesizer> = context.scope;\n\t\tif (this.dependencyContainer) {\n\t\t\tconst dc = new DependencyContainer<FluidObject>(\n\t\t\t\tthis.dependencyContainer,\n\t\t\t\tscope.IFluidDependencySynthesizer,\n\t\t\t);\n\t\t\tscope.IFluidDependencySynthesizer = dc;\n\t\t}\n\n\t\treturn loadContainerRuntime({\n\t\t\tcontext,\n\t\t\texisting,\n\t\t\truntimeOptions: this.runtimeOptions,\n\t\t\tregistryEntries: this.registryEntries,\n\t\t\tcontainerScope: scope,\n\t\t\t// eslint-disable-next-line import-x/no-deprecated\n\t\t\trequestHandler: buildRuntimeRequestHandler(...this.requestHandlers),\n\t\t\tprovideEntryPoint: this.provideEntryPoint,\n\t\t\tminVersionForCollab: this.minVersionForCollab,\n\t\t});\n\t}\n\n\t/**\n\t * Subclasses may override containerInitializingFirstTime to perform any setup steps at the time the container\n\t * is created. This likely includes creating any initial data stores that are expected to be there at the outset.\n\t * @param runtime - The container runtime for the container being initialized\n\t */\n\tprotected async containerInitializingFirstTime(runtime: IContainerRuntime): Promise<void> {}\n\n\t/**\n\t * Subclasses may override containerHasInitialized to perform any steps after the container has initialized.\n\t * This likely includes loading any data stores that are expected to be there at the outset.\n\t * @param runtime - The container runtime for the container being initialized\n\t */\n\tprotected async containerHasInitialized(runtime: IContainerRuntime): Promise<void> {}\n}\n"]}
1
+ {"version":3,"file":"baseContainerRuntimeFactory.js","sourceRoot":"","sources":["../../src/container-runtime-factories/baseContainerRuntimeFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;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AC,8BAA8B,CAAC,OAAO,CAAC,CAAC;QACnD,MAAM,IAAI,CAAC,uBAAuB,CAAC,OAAO,CAAC,CAAC;IAC7C,CAAC;IAED;;;;OAIG;IACI,KAAK,CAAC,uBAAuB,CAAC,OAA0B;QAC9D,MAAM,IAAI,CAAC,uBAAuB,CAAC,OAAO,CAAC,CAAC;IAC7C,CAAC;IAED;;;;OAIG;IACI,KAAK,CAAC,aAAa,CACzB,OAA0B,EAC1B,QAAiB;QAEjB,MAAM,KAAK,GAAgD,OAAO,CAAC,KAAK,CAAC;QACzE,IAAI,IAAI,CAAC,mBAAmB,EAAE,CAAC;YAC9B,MAAM,EAAE,GAAG,IAAI,mBAAmB,CACjC,IAAI,CAAC,mBAAmB,EACxB,KAAK,CAAC,2BAA2B,CACjC,CAAC;YACF,KAAK,CAAC,2BAA2B,GAAG,EAAE,CAAC;QACxC,CAAC;QAED,OAAO,oBAAoB,CAAC;YAC3B,OAAO;YACP,QAAQ;YACR,cAAc,EAAE,IAAI,CAAC,cAAc;YACnC,eAAe,EAAE,IAAI,CAAC,eAAe;YACrC,cAAc,EAAE,KAAK;YACrB,kDAAkD;YAClD,cAAc,EAAE,0BAA0B,CAAC,GAAG,IAAI,CAAC,eAAe,CAAC;YACnE,iBAAiB,EAAE,IAAI,CAAC,iBAAiB;YACzC,qBAAqB,EAAE,IAAI,CAAC,qBAAqB;SACjD,CAAC,CAAC;IACJ,CAAC;IAED;;;;OAIG;IACO,KAAK,CAAC,8BAA8B,CAAC,OAA0B,IAAkB,CAAC;IAE5F;;;;OAIG;IACO,KAAK,CAAC,uBAAuB,CAAC,OAA0B,IAAkB,CAAC;CACrF","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type {\n\tIContainerContext,\n\tIRuntime,\n} from \"@fluidframework/container-definitions/internal\";\nimport {\n\tFluidDataStoreRegistry,\n\tloadContainerRuntime,\n\ttype IContainerRuntimeOptions,\n} from \"@fluidframework/container-runtime/internal\";\nimport type { IContainerRuntime } from \"@fluidframework/container-runtime-definitions/internal\";\nimport type { FluidObject } from \"@fluidframework/core-interfaces\";\nimport { UsageError } from \"@fluidframework/telemetry-utils/internal\";\nimport {\n\t// eslint-disable-next-line import-x/no-deprecated\n\ttype RuntimeRequestHandler,\n\t// eslint-disable-next-line import-x/no-deprecated\n\tbuildRuntimeRequestHandler,\n} from \"@fluidframework/request-handler/internal\";\nimport type {\n\tIFluidDataStoreRegistry,\n\tIProvideFluidDataStoreRegistry,\n\tNamedFluidDataStoreRegistryEntries,\n\tOldestSupportedClientVersion,\n} from \"@fluidframework/runtime-definitions/internal\";\nimport { RuntimeFactoryHelper } from \"@fluidframework/runtime-utils/internal\";\nimport {\n\tDependencyContainer,\n\ttype IFluidDependencySynthesizer,\n\ttype IProvideFluidDependencySynthesizer,\n} from \"@fluidframework/synthesize/internal\";\n\n/**\n * {@link BaseContainerRuntimeFactory} construction properties.\n * @input\n * @legacy\n * @beta\n */\nexport interface BaseContainerRuntimeFactoryProps {\n\t/**\n\t * The data store registry for containers produced.\n\t */\n\tregistryEntries: NamedFluidDataStoreRegistryEntries;\n\t/**\n\t * @deprecated Will be removed in a future release.\n\t */\n\tdependencyContainer?: IFluidDependencySynthesizer;\n\t/**\n\t * Request handlers for containers produced.\n\t * @deprecated Will be removed once Loader LTS version is \"2.0.0-internal.7.0.0\". Migrate all usage of IFluidRouter to the \"entryPoint\" pattern. Refer to Removing-IFluidRouter.md\n\t */\n\t// eslint-disable-next-line import-x/no-deprecated\n\trequestHandlers?: RuntimeRequestHandler[];\n\t/**\n\t * The runtime options passed to the ContainerRuntime when instantiating it\n\t */\n\truntimeOptions?: IContainerRuntimeOptions;\n\t/**\n\t * Function that will initialize the entryPoint of the ContainerRuntime instances\n\t * created with this factory\n\t */\n\tprovideEntryPoint: (runtime: IContainerRuntime) => Promise<FluidObject>;\n\t/**\n\t * Oldest version of Fluid Framework client that must be able to open and process documents\n\t * written by this container runtime.\n\t * @remarks\n\t * Choosing an older version may limit the features and write formats the application can use to\n\t * those supported by that version.\n\t *\n\t * See {@link @fluidframework/container-runtime#LoadContainerRuntimeParams.oldestSupportedClient} for more details on this property.\n\t */\n\toldestSupportedClient?: OldestSupportedClientVersion | undefined;\n\n\t/**\n\t * Oldest version of Fluid Framework client that must be able to open and process documents\n\t * written by this container runtime.\n\t *\n\t * @remarks\n\t * See {@link BaseContainerRuntimeFactoryProps.oldestSupportedClient} for compatibility implications.\n\t *\n\t * Specifying both `oldestSupportedClient` and `minVersionForCollab` is an error.\n\t *\n\t * @deprecated 2.116.0. To be removed in 3.10.0. Use\n\t * {@link BaseContainerRuntimeFactoryProps.oldestSupportedClient} instead.\n\t * See {@link https://github.com/microsoft/FluidFramework/issues/27851} for context.\n\t */\n\tminVersionForCollab?: OldestSupportedClientVersion | undefined;\n}\n\n/**\n * BaseContainerRuntimeFactory produces container runtimes with the specified data store and service registries,\n * request handlers, runtimeOptions, and entryPoint initialization function.\n * It can be subclassed to implement a first-time initialization procedure for the containers it creates.\n * @legacy\n * @beta\n */\nexport class BaseContainerRuntimeFactory\n\textends RuntimeFactoryHelper\n\timplements IProvideFluidDataStoreRegistry\n{\n\t/**\n\t * {@inheritDoc @fluidframework/runtime-definitions#IProvideFluidDataStoreRegistry.IFluidDataStoreRegistry}\n\t */\n\tpublic get IFluidDataStoreRegistry(): IFluidDataStoreRegistry {\n\t\treturn this.registry;\n\t}\n\tprivate readonly registry: IFluidDataStoreRegistry;\n\n\tprivate readonly registryEntries: NamedFluidDataStoreRegistryEntries;\n\tprivate readonly dependencyContainer?: IFluidDependencySynthesizer;\n\tprivate readonly runtimeOptions?: IContainerRuntimeOptions;\n\t// eslint-disable-next-line import-x/no-deprecated\n\tprivate readonly requestHandlers: RuntimeRequestHandler[];\n\tprivate readonly provideEntryPoint: (runtime: IContainerRuntime) => Promise<FluidObject>;\n\tprivate readonly oldestSupportedClient: OldestSupportedClientVersion | undefined;\n\n\tpublic constructor(props: BaseContainerRuntimeFactoryProps) {\n\t\tsuper();\n\n\t\tthis.registryEntries = props.registryEntries;\n\t\tthis.dependencyContainer = props.dependencyContainer;\n\t\tthis.runtimeOptions = props.runtimeOptions;\n\t\tthis.provideEntryPoint = props.provideEntryPoint;\n\t\tthis.requestHandlers = props.requestHandlers ?? [];\n\t\tthis.registry = new FluidDataStoreRegistry(this.registryEntries);\n\t\t// eslint-disable-next-line import-x/no-deprecated -- accepted for compatibility. See #27851\n\t\tconst deprecatedMinVersionForCollab = props.minVersionForCollab;\n\t\tif (\n\t\t\tprops.oldestSupportedClient !== undefined &&\n\t\t\tdeprecatedMinVersionForCollab !== undefined\n\t\t) {\n\t\t\tthrow new UsageError(\n\t\t\t\t\"Specify only one of oldestSupportedClient or minVersionForCollab (deprecated), not both.\",\n\t\t\t);\n\t\t}\n\t\tthis.oldestSupportedClient = props.oldestSupportedClient ?? deprecatedMinVersionForCollab;\n\t}\n\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: IContainerRuntime): Promise<void> {\n\t\tawait this.containerInitializingFirstTime(runtime);\n\t\tawait this.containerHasInitialized(runtime);\n\t}\n\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: IContainerRuntime): Promise<void> {\n\t\tawait this.containerHasInitialized(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 async preInitialize(\n\t\tcontext: IContainerContext,\n\t\texisting: boolean,\n\t): Promise<IContainerRuntime & IRuntime> {\n\t\tconst scope: Partial<IProvideFluidDependencySynthesizer> = context.scope;\n\t\tif (this.dependencyContainer) {\n\t\t\tconst dc = new DependencyContainer<FluidObject>(\n\t\t\t\tthis.dependencyContainer,\n\t\t\t\tscope.IFluidDependencySynthesizer,\n\t\t\t);\n\t\t\tscope.IFluidDependencySynthesizer = dc;\n\t\t}\n\n\t\treturn loadContainerRuntime({\n\t\t\tcontext,\n\t\t\texisting,\n\t\t\truntimeOptions: this.runtimeOptions,\n\t\t\tregistryEntries: this.registryEntries,\n\t\t\tcontainerScope: scope,\n\t\t\t// eslint-disable-next-line import-x/no-deprecated\n\t\t\trequestHandler: buildRuntimeRequestHandler(...this.requestHandlers),\n\t\t\tprovideEntryPoint: this.provideEntryPoint,\n\t\t\toldestSupportedClient: this.oldestSupportedClient,\n\t\t});\n\t}\n\n\t/**\n\t * Subclasses may override containerInitializingFirstTime to perform any setup steps at the time the container\n\t * is created. This likely includes creating any initial data stores that are expected to be there at the outset.\n\t * @param runtime - The container runtime for the container being initialized\n\t */\n\tprotected async containerInitializingFirstTime(runtime: IContainerRuntime): Promise<void> {}\n\n\t/**\n\t * Subclasses may override containerHasInitialized to perform any steps after the container has initialized.\n\t * This likely includes loading any data stores that are expected to be there at the outset.\n\t * @param runtime - The container runtime for the container being initialized\n\t */\n\tprotected async containerHasInitialized(runtime: IContainerRuntime): Promise<void> {}\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluidframework/aqueduct",
3
- "version": "2.115.0",
3
+ "version": "2.116.0",
4
4
  "description": "A set of implementations for Fluid Framework interfaces.",
5
5
  "homepage": "https://fluidframework.com",
6
6
  "repository": {
@@ -69,32 +69,32 @@
69
69
  "temp-directory": "nyc/.nyc_output"
70
70
  },
71
71
  "dependencies": {
72
- "@fluid-internal/client-utils": "~2.115.0",
73
- "@fluidframework/container-definitions": "~2.115.0",
74
- "@fluidframework/container-runtime": "~2.115.0",
75
- "@fluidframework/container-runtime-definitions": "~2.115.0",
76
- "@fluidframework/core-interfaces": "~2.115.0",
77
- "@fluidframework/core-utils": "~2.115.0",
78
- "@fluidframework/datastore": "~2.115.0",
79
- "@fluidframework/datastore-definitions": "~2.115.0",
80
- "@fluidframework/map": "~2.115.0",
81
- "@fluidframework/request-handler": "~2.115.0",
82
- "@fluidframework/runtime-definitions": "~2.115.0",
83
- "@fluidframework/runtime-utils": "~2.115.0",
84
- "@fluidframework/shared-object-base": "~2.115.0",
85
- "@fluidframework/synthesize": "~2.115.0",
86
- "@fluidframework/telemetry-utils": "~2.115.0",
87
- "@fluidframework/tree": "~2.115.0"
72
+ "@fluid-internal/client-utils": "~2.116.0",
73
+ "@fluidframework/container-definitions": "~2.116.0",
74
+ "@fluidframework/container-runtime": "~2.116.0",
75
+ "@fluidframework/container-runtime-definitions": "~2.116.0",
76
+ "@fluidframework/core-interfaces": "~2.116.0",
77
+ "@fluidframework/core-utils": "~2.116.0",
78
+ "@fluidframework/datastore": "~2.116.0",
79
+ "@fluidframework/datastore-definitions": "~2.116.0",
80
+ "@fluidframework/map": "~2.116.0",
81
+ "@fluidframework/request-handler": "~2.116.0",
82
+ "@fluidframework/runtime-definitions": "~2.116.0",
83
+ "@fluidframework/runtime-utils": "~2.116.0",
84
+ "@fluidframework/shared-object-base": "~2.116.0",
85
+ "@fluidframework/synthesize": "~2.116.0",
86
+ "@fluidframework/telemetry-utils": "~2.116.0",
87
+ "@fluidframework/tree": "~2.116.0"
88
88
  },
89
89
  "devDependencies": {
90
- "@arethetypeswrong/cli": "^0.18.2",
90
+ "@arethetypeswrong/cli": "^0.18.5",
91
91
  "@biomejs/biome": "~2.4.5",
92
- "@fluid-internal/mocha-test-setup": "~2.115.0",
93
- "@fluid-tools/build-cli": "^0.65.0",
94
- "@fluidframework/aqueduct-previous": "npm:@fluidframework/aqueduct@2.112.0",
92
+ "@fluid-internal/mocha-test-setup": "~2.116.0",
93
+ "@fluid-tools/build-cli": "^0.67.0",
94
+ "@fluidframework/aqueduct-previous": "npm:@fluidframework/aqueduct@2.114.0",
95
95
  "@fluidframework/build-common": "^2.0.3",
96
- "@fluidframework/build-tools": "^0.65.0",
97
- "@fluidframework/eslint-config-fluid": "^13.0.0",
96
+ "@fluidframework/build-tools": "^0.67.0",
97
+ "@fluidframework/eslint-config-fluid": "^14.0.0",
98
98
  "@microsoft/api-extractor": "7.58.1",
99
99
  "@types/mocha": "^10.0.10",
100
100
  "@types/node": "~22.19.17",
@@ -14,6 +14,7 @@ import {
14
14
  } from "@fluidframework/container-runtime/internal";
15
15
  import type { IContainerRuntime } from "@fluidframework/container-runtime-definitions/internal";
16
16
  import type { FluidObject } from "@fluidframework/core-interfaces";
17
+ import { UsageError } from "@fluidframework/telemetry-utils/internal";
17
18
  import {
18
19
  // eslint-disable-next-line import-x/no-deprecated
19
20
  type RuntimeRequestHandler,
@@ -23,8 +24,8 @@ import {
23
24
  import type {
24
25
  IFluidDataStoreRegistry,
25
26
  IProvideFluidDataStoreRegistry,
26
- MinimumVersionForCollab,
27
27
  NamedFluidDataStoreRegistryEntries,
28
+ OldestSupportedClientVersion,
28
29
  } from "@fluidframework/runtime-definitions/internal";
29
30
  import { RuntimeFactoryHelper } from "@fluidframework/runtime-utils/internal";
30
31
  import {
@@ -64,10 +65,30 @@ export interface BaseContainerRuntimeFactoryProps {
64
65
  */
65
66
  provideEntryPoint: (runtime: IContainerRuntime) => Promise<FluidObject>;
66
67
  /**
67
- * Minimum version of the FF runtime that is required to collaborate on new documents.
68
- * See {@link @fluidframework/container-runtime#LoadContainerRuntimeParams.minVersionForCollab} for more details on this property.
68
+ * Oldest version of Fluid Framework client that must be able to open and process documents
69
+ * written by this container runtime.
70
+ * @remarks
71
+ * Choosing an older version may limit the features and write formats the application can use to
72
+ * those supported by that version.
73
+ *
74
+ * See {@link @fluidframework/container-runtime#LoadContainerRuntimeParams.oldestSupportedClient} for more details on this property.
69
75
  */
70
- minVersionForCollab?: MinimumVersionForCollab | undefined;
76
+ oldestSupportedClient?: OldestSupportedClientVersion | undefined;
77
+
78
+ /**
79
+ * Oldest version of Fluid Framework client that must be able to open and process documents
80
+ * written by this container runtime.
81
+ *
82
+ * @remarks
83
+ * See {@link BaseContainerRuntimeFactoryProps.oldestSupportedClient} for compatibility implications.
84
+ *
85
+ * Specifying both `oldestSupportedClient` and `minVersionForCollab` is an error.
86
+ *
87
+ * @deprecated 2.116.0. To be removed in 3.10.0. Use
88
+ * {@link BaseContainerRuntimeFactoryProps.oldestSupportedClient} instead.
89
+ * See {@link https://github.com/microsoft/FluidFramework/issues/27851} for context.
90
+ */
91
+ minVersionForCollab?: OldestSupportedClientVersion | undefined;
71
92
  }
72
93
 
73
94
  /**
@@ -95,7 +116,7 @@ export class BaseContainerRuntimeFactory
95
116
  // eslint-disable-next-line import-x/no-deprecated
96
117
  private readonly requestHandlers: RuntimeRequestHandler[];
97
118
  private readonly provideEntryPoint: (runtime: IContainerRuntime) => Promise<FluidObject>;
98
- private readonly minVersionForCollab: MinimumVersionForCollab | undefined;
119
+ private readonly oldestSupportedClient: OldestSupportedClientVersion | undefined;
99
120
 
100
121
  public constructor(props: BaseContainerRuntimeFactoryProps) {
101
122
  super();
@@ -106,7 +127,17 @@ export class BaseContainerRuntimeFactory
106
127
  this.provideEntryPoint = props.provideEntryPoint;
107
128
  this.requestHandlers = props.requestHandlers ?? [];
108
129
  this.registry = new FluidDataStoreRegistry(this.registryEntries);
109
- this.minVersionForCollab = props.minVersionForCollab;
130
+ // eslint-disable-next-line import-x/no-deprecated -- accepted for compatibility. See #27851
131
+ const deprecatedMinVersionForCollab = props.minVersionForCollab;
132
+ if (
133
+ props.oldestSupportedClient !== undefined &&
134
+ deprecatedMinVersionForCollab !== undefined
135
+ ) {
136
+ throw new UsageError(
137
+ "Specify only one of oldestSupportedClient or minVersionForCollab (deprecated), not both.",
138
+ );
139
+ }
140
+ this.oldestSupportedClient = props.oldestSupportedClient ?? deprecatedMinVersionForCollab;
110
141
  }
111
142
 
112
143
  /**
@@ -155,7 +186,7 @@ export class BaseContainerRuntimeFactory
155
186
  // eslint-disable-next-line import-x/no-deprecated
156
187
  requestHandler: buildRuntimeRequestHandler(...this.requestHandlers),
157
188
  provideEntryPoint: this.provideEntryPoint,
158
- minVersionForCollab: this.minVersionForCollab,
189
+ oldestSupportedClient: this.oldestSupportedClient,
159
190
  });
160
191
  }
161
192