@fluidframework/aqueduct 2.0.0-dev-rc.1.0.0.228517 → 2.0.0-dev-rc.1.0.0.232845

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.
Files changed (84) hide show
  1. package/dist/aqueduct-alpha.d.ts +80 -38
  2. package/dist/aqueduct-beta.d.ts +4 -0
  3. package/dist/aqueduct-public.d.ts +4 -0
  4. package/dist/aqueduct-untrimmed.d.ts +80 -38
  5. package/dist/container-runtime-factories/baseContainerRuntimeFactory.d.ts +39 -23
  6. package/dist/container-runtime-factories/baseContainerRuntimeFactory.d.ts.map +1 -1
  7. package/dist/container-runtime-factories/baseContainerRuntimeFactory.js +3 -8
  8. package/dist/container-runtime-factories/baseContainerRuntimeFactory.js.map +1 -1
  9. package/dist/container-runtime-factories/containerRuntimeFactoryWithDefaultDataStore.d.ts +36 -24
  10. package/dist/container-runtime-factories/containerRuntimeFactoryWithDefaultDataStore.d.ts.map +1 -1
  11. package/dist/container-runtime-factories/containerRuntimeFactoryWithDefaultDataStore.js +2 -11
  12. package/dist/container-runtime-factories/containerRuntimeFactoryWithDefaultDataStore.js.map +1 -1
  13. package/dist/container-runtime-factories/index.d.ts +2 -2
  14. package/dist/container-runtime-factories/index.d.ts.map +1 -1
  15. package/dist/container-runtime-factories/index.js.map +1 -1
  16. package/dist/data-object-factories/dataObjectFactory.d.ts +4 -4
  17. package/dist/data-object-factories/dataObjectFactory.d.ts.map +1 -1
  18. package/dist/data-object-factories/dataObjectFactory.js +2 -2
  19. package/dist/data-object-factories/dataObjectFactory.js.map +1 -1
  20. package/dist/data-object-factories/pureDataObjectFactory.d.ts +11 -5
  21. package/dist/data-object-factories/pureDataObjectFactory.d.ts.map +1 -1
  22. package/dist/data-object-factories/pureDataObjectFactory.js +6 -0
  23. package/dist/data-object-factories/pureDataObjectFactory.js.map +1 -1
  24. package/dist/data-objects/dataObject.d.ts +2 -2
  25. package/dist/data-objects/dataObject.d.ts.map +1 -1
  26. package/dist/data-objects/dataObject.js +6 -6
  27. package/dist/data-objects/dataObject.js.map +1 -1
  28. package/dist/data-objects/index.d.ts +1 -1
  29. package/dist/data-objects/index.d.ts.map +1 -1
  30. package/dist/data-objects/index.js.map +1 -1
  31. package/dist/data-objects/pureDataObject.d.ts +12 -6
  32. package/dist/data-objects/pureDataObject.d.ts.map +1 -1
  33. package/dist/data-objects/pureDataObject.js +10 -0
  34. package/dist/data-objects/pureDataObject.js.map +1 -1
  35. package/dist/data-objects/types.d.ts +7 -7
  36. package/dist/data-objects/types.d.ts.map +1 -1
  37. package/dist/data-objects/types.js.map +1 -1
  38. package/dist/index.d.ts +2 -2
  39. package/dist/index.d.ts.map +1 -1
  40. package/dist/index.js.map +1 -1
  41. package/dist/tsdoc-metadata.json +1 -1
  42. package/lib/aqueduct-alpha.d.mts +80 -38
  43. package/lib/aqueduct-beta.d.mts +4 -0
  44. package/lib/aqueduct-public.d.mts +4 -0
  45. package/lib/aqueduct-untrimmed.d.mts +80 -38
  46. package/lib/container-runtime-factories/baseContainerRuntimeFactory.d.mts +39 -23
  47. package/lib/container-runtime-factories/baseContainerRuntimeFactory.d.mts.map +1 -1
  48. package/lib/container-runtime-factories/baseContainerRuntimeFactory.mjs +4 -9
  49. package/lib/container-runtime-factories/baseContainerRuntimeFactory.mjs.map +1 -1
  50. package/lib/container-runtime-factories/containerRuntimeFactoryWithDefaultDataStore.d.mts +36 -24
  51. package/lib/container-runtime-factories/containerRuntimeFactoryWithDefaultDataStore.d.mts.map +1 -1
  52. package/lib/container-runtime-factories/containerRuntimeFactoryWithDefaultDataStore.mjs +2 -11
  53. package/lib/container-runtime-factories/containerRuntimeFactoryWithDefaultDataStore.mjs.map +1 -1
  54. package/lib/container-runtime-factories/index.d.mts +2 -2
  55. package/lib/container-runtime-factories/index.d.mts.map +1 -1
  56. package/lib/container-runtime-factories/index.mjs +2 -2
  57. package/lib/container-runtime-factories/index.mjs.map +1 -1
  58. package/lib/data-object-factories/dataObjectFactory.d.mts +4 -4
  59. package/lib/data-object-factories/dataObjectFactory.d.mts.map +1 -1
  60. package/lib/data-object-factories/dataObjectFactory.mjs +2 -2
  61. package/lib/data-object-factories/dataObjectFactory.mjs.map +1 -1
  62. package/lib/data-object-factories/pureDataObjectFactory.d.mts +11 -5
  63. package/lib/data-object-factories/pureDataObjectFactory.d.mts.map +1 -1
  64. package/lib/data-object-factories/pureDataObjectFactory.mjs +6 -0
  65. package/lib/data-object-factories/pureDataObjectFactory.mjs.map +1 -1
  66. package/lib/data-objects/dataObject.d.mts +2 -2
  67. package/lib/data-objects/dataObject.d.mts.map +1 -1
  68. package/lib/data-objects/dataObject.mjs +6 -6
  69. package/lib/data-objects/dataObject.mjs.map +1 -1
  70. package/lib/data-objects/index.d.mts +1 -1
  71. package/lib/data-objects/index.d.mts.map +1 -1
  72. package/lib/data-objects/index.mjs.map +1 -1
  73. package/lib/data-objects/pureDataObject.d.mts +12 -6
  74. package/lib/data-objects/pureDataObject.d.mts.map +1 -1
  75. package/lib/data-objects/pureDataObject.mjs +10 -0
  76. package/lib/data-objects/pureDataObject.mjs.map +1 -1
  77. package/lib/data-objects/types.d.mts +7 -7
  78. package/lib/data-objects/types.d.mts.map +1 -1
  79. package/lib/data-objects/types.mjs.map +1 -1
  80. package/lib/index.d.mts +2 -2
  81. package/lib/index.d.mts.map +1 -1
  82. package/lib/index.mjs +1 -1
  83. package/lib/index.mjs.map +1 -1
  84. package/package.json +18 -18
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH;;;;;;;;;;;;;GAaG;AAEH,iEAAmF;AAA1E,0HAAA,iBAAiB,OAAA;AAAE,8HAAA,qBAAqB,OAAA;AACjD,+CAA+F;AAAtF,0GAAA,UAAU,OAAA;AAAqC,8GAAA,cAAc,OAAA;AACtE,6EAGuC;AAFtC,0IAAA,2BAA2B,OAAA;AAC3B,0JAAA,2CAA2C,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * The `aqueduct` package is a library for building Fluid objects and Fluid\n * containers within the Fluid Framework. Its goal is to provide a thin base\n * layer over the existing Fluid Framework interfaces that allows developers to\n * get started quickly.\n *\n * @remarks\n * About the library name: An \"aqueduct\" is a way to transport water from a source\n * to another location. The library name was chosen because its purpose is to\n * facilitate using lower level constructs and therefore handle 'fluid' items\n * same as an aqueduct.\n *\n * @packageDocumentation\n */\n\nexport { DataObjectFactory, PureDataObjectFactory } from \"./data-object-factories\";\nexport { DataObject, DataObjectTypes, IDataObjectProps, PureDataObject } from \"./data-objects\";\nexport {\n\tBaseContainerRuntimeFactory,\n\tContainerRuntimeFactoryWithDefaultDataStore,\n} from \"./container-runtime-factories\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH;;;;;;;;;;;;;GAaG;AAEH,iEAAmF;AAA1E,0HAAA,iBAAiB,OAAA;AAAE,8HAAA,qBAAqB,OAAA;AACjD,+CAKwB;AAJvB,0GAAA,UAAU,OAAA;AAGV,8GAAA,cAAc,OAAA;AAEf,6EAKuC;AAJtC,0IAAA,2BAA2B,OAAA;AAE3B,0JAAA,2CAA2C,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * The `aqueduct` package is a library for building Fluid objects and Fluid\n * containers within the Fluid Framework. Its goal is to provide a thin base\n * layer over the existing Fluid Framework interfaces that allows developers to\n * get started quickly.\n *\n * @remarks\n * About the library name: An \"aqueduct\" is a way to transport water from a source\n * to another location. The library name was chosen because its purpose is to\n * facilitate using lower level constructs and therefore handle 'fluid' items\n * same as an aqueduct.\n *\n * @packageDocumentation\n */\n\nexport { DataObjectFactory, PureDataObjectFactory } from \"./data-object-factories\";\nexport {\n\tDataObject,\n\ttype DataObjectTypes,\n\ttype IDataObjectProps,\n\tPureDataObject,\n} from \"./data-objects\";\nexport {\n\tBaseContainerRuntimeFactory,\n\ttype BaseContainerRuntimeFactoryProps,\n\tContainerRuntimeFactoryWithDefaultDataStore,\n\ttype ContainerRuntimeFactoryWithDefaultDataStoreProps,\n} from \"./container-runtime-factories\";\n"]}
@@ -5,7 +5,7 @@
5
5
  "toolPackages": [
6
6
  {
7
7
  "packageName": "@microsoft/api-extractor",
8
- "packageVersion": "7.38.3"
8
+ "packageVersion": "7.39.1"
9
9
  }
10
10
  ]
11
11
  }
@@ -35,6 +35,9 @@ import { TypedEventEmitter } from '@fluid-internal/client-utils';
35
35
  * @alpha
36
36
  */
37
37
  export declare class BaseContainerRuntimeFactory extends RuntimeFactoryHelper implements IProvideFluidDataStoreRegistry {
38
+ /**
39
+ * {@inheritDoc @fluidframework/runtime-definitions#IProvideFluidDataStoreRegistry.IFluidDataStoreRegistry}
40
+ */
38
41
  get IFluidDataStoreRegistry(): IFluidDataStoreRegistry;
39
42
  private readonly registry;
40
43
  private readonly registryEntries;
@@ -42,22 +45,7 @@ export declare class BaseContainerRuntimeFactory extends RuntimeFactoryHelper im
42
45
  private readonly runtimeOptions?;
43
46
  private readonly requestHandlers;
44
47
  private readonly provideEntryPoint;
45
- /**
46
- * @param registryEntries - The data store registry for containers produced
47
- * @param dependencyContainer - deprecated, will be removed in a future release
48
- * @param requestHandlers - Request handlers for containers produced
49
- * @param runtimeOptions - The runtime options passed to the ContainerRuntime when instantiating it
50
- * @param provideEntryPoint - Function that will initialize the entryPoint of the ContainerRuntime instances
51
- * created with this factory
52
- */
53
- constructor(props: {
54
- registryEntries: NamedFluidDataStoreRegistryEntries;
55
- dependencyContainer?: IFluidDependencySynthesizer;
56
- /** @deprecated Will be removed once Loader LTS version is "2.0.0-internal.7.0.0". Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md */
57
- requestHandlers?: RuntimeRequestHandler[];
58
- runtimeOptions?: IContainerRuntimeOptions;
59
- provideEntryPoint: (runtime: IContainerRuntime) => Promise<FluidObject>;
60
- });
48
+ constructor(props: BaseContainerRuntimeFactoryProps);
61
49
  instantiateFirstTime(runtime: ContainerRuntime): Promise<void>;
62
50
  instantiateFromExisting(runtime: ContainerRuntime): Promise<void>;
63
51
  preInitialize(context: IContainerContext, existing: boolean): Promise<ContainerRuntime>;
@@ -75,6 +63,35 @@ export declare class BaseContainerRuntimeFactory extends RuntimeFactoryHelper im
75
63
  protected containerHasInitialized(runtime: IContainerRuntime): Promise<void>;
76
64
  }
77
65
 
66
+ /**
67
+ * {@link BaseContainerRuntimeFactory} construction properties.
68
+ * @alpha
69
+ */
70
+ export declare interface BaseContainerRuntimeFactoryProps {
71
+ /**
72
+ * The data store registry for containers produced.
73
+ */
74
+ registryEntries: NamedFluidDataStoreRegistryEntries;
75
+ /**
76
+ * @deprecated Will be removed in a future release.
77
+ */
78
+ dependencyContainer?: IFluidDependencySynthesizer;
79
+ /**
80
+ * Request handlers for containers produced.
81
+ * @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
82
+ */
83
+ requestHandlers?: RuntimeRequestHandler[];
84
+ /**
85
+ * The runtime options passed to the ContainerRuntime when instantiating it
86
+ */
87
+ runtimeOptions?: IContainerRuntimeOptions;
88
+ /**
89
+ * Function that will initialize the entryPoint of the ContainerRuntime instances
90
+ * created with this factory
91
+ */
92
+ provideEntryPoint: (runtime: IContainerRuntime) => Promise<FluidObject>;
93
+ }
94
+
78
95
  /**
79
96
  * A ContainerRuntimeFactory that initializes Containers with a single default data store, which can be requested from
80
97
  * the container with an empty URL.
@@ -85,30 +102,43 @@ export declare class BaseContainerRuntimeFactory extends RuntimeFactoryHelper im
85
102
  export declare class ContainerRuntimeFactoryWithDefaultDataStore extends BaseContainerRuntimeFactory {
86
103
  static readonly defaultDataStoreId = "default";
87
104
  protected readonly defaultFactory: IFluidDataStoreFactory;
88
- /**
89
- * Constructor
90
- * @param defaultFactory -
91
- * @param registryEntries -
92
- * @param dependencyContainer - deprecated, will be removed in a future release
93
- * @param requestHandlers -
94
- * @param runtimeOptions -
95
- * @param provideEntryPoint -
96
- */
97
- constructor(props: {
98
- defaultFactory: IFluidDataStoreFactory;
99
- registryEntries: NamedFluidDataStoreRegistryEntries;
100
- dependencyContainer?: IFluidDependencySynthesizer;
101
- /** @deprecated Will be removed once Loader LTS version is "2.0.0-internal.7.0.0". Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md */
102
- requestHandlers?: RuntimeRequestHandler[];
103
- runtimeOptions?: IContainerRuntimeOptions;
104
- provideEntryPoint?: (runtime: IContainerRuntime) => Promise<FluidObject>;
105
- });
105
+ constructor(props: ContainerRuntimeFactoryWithDefaultDataStoreProps);
106
106
  /**
107
107
  * {@inheritDoc BaseContainerRuntimeFactory.containerInitializingFirstTime}
108
108
  */
109
109
  protected containerInitializingFirstTime(runtime: IContainerRuntime): Promise<void>;
110
110
  }
111
111
 
112
+ /**
113
+ * {@link ContainerRuntimeFactoryWithDefaultDataStore} construction properties.
114
+ * @alpha
115
+ */
116
+ export declare interface ContainerRuntimeFactoryWithDefaultDataStoreProps {
117
+ defaultFactory: IFluidDataStoreFactory;
118
+ /**
119
+ * The data store registry for containers produced.
120
+ */
121
+ registryEntries: NamedFluidDataStoreRegistryEntries;
122
+ /**
123
+ * @deprecated Will be removed in a future release.
124
+ */
125
+ dependencyContainer?: IFluidDependencySynthesizer;
126
+ /**
127
+ * Request handlers for containers produced.
128
+ * @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
129
+ */
130
+ requestHandlers?: RuntimeRequestHandler[];
131
+ /**
132
+ * The runtime options passed to the ContainerRuntime when instantiating it
133
+ */
134
+ runtimeOptions?: IContainerRuntimeOptions;
135
+ /**
136
+ * Function that will initialize the entryPoint of the ContainerRuntime instances
137
+ * created with this factory
138
+ */
139
+ provideEntryPoint?: (runtime: IContainerRuntime) => Promise<FluidObject>;
140
+ }
141
+
112
142
  /**
113
143
  * DataObject is a base data store that is primed with a root directory. It
114
144
  * ensures that it is created and ready before you can access it.
@@ -159,15 +189,15 @@ export declare class DataObjectFactory<TObj extends DataObject<I>, I extends Dat
159
189
  */
160
190
  export declare interface DataObjectTypes {
161
191
  /**
162
- * represents a type that will define optional providers that will be injected
192
+ * Represents a type that will define optional providers that will be injected.
163
193
  */
164
194
  OptionalProviders?: FluidObject;
165
195
  /**
166
- * the initial state type that the produced data object may take during creation
196
+ * The initial state type that the produced data object may take during creation.
167
197
  */
168
198
  InitialState?: any;
169
199
  /**
170
- * represents events that will be available in the EventForwarder
200
+ * Represents events that will be available in the EventForwarder.
171
201
  */
172
202
  Events?: IEvent;
173
203
  }
@@ -210,13 +240,19 @@ export declare abstract class PureDataObject<I extends DataObjectTypes = DataObj
210
240
  protected initProps?: I["InitialState"];
211
241
  protected initializeP: Promise<void> | undefined;
212
242
  get id(): string;
243
+ /**
244
+ * {@inheritDoc @fluidframework/core-interfaces#IProvideFluidLoadable.IFluidLoadable}
245
+ */
213
246
  get IFluidLoadable(): this;
247
+ /**
248
+ * {@inheritDoc @fluidframework/core-interfaces#IProvideFluidHandle.IFluidHandle}
249
+ */
214
250
  get IFluidHandle(): IFluidHandle<this>;
215
251
  /**
216
252
  * Handle to a data store
217
253
  */
218
254
  get handle(): IFluidHandle<this>;
219
- static getDataObject(runtime: IFluidDataStoreRuntime): Promise<PureDataObject<DataObjectTypes>>;
255
+ static getDataObject(runtime: IFluidDataStoreRuntime): Promise<PureDataObject>;
220
256
  constructor(props: IDataObjectProps<I>);
221
257
  /**
222
258
  * Return this object if someone requests it directly
@@ -283,7 +319,13 @@ export declare class PureDataObjectFactory<TObj extends PureDataObject<I>, I ext
283
319
  private readonly sharedObjectRegistry;
284
320
  private readonly registry;
285
321
  constructor(type: string, ctor: new (props: IDataObjectProps<I>) => TObj, sharedObjects: readonly IChannelFactory[], optionalProviders: FluidObjectSymbolProvider<I["OptionalProviders"]>, registryEntries?: NamedFluidDataStoreRegistryEntries, runtimeClass?: typeof FluidDataStoreRuntime);
322
+ /**
323
+ * {@inheritDoc @fluidframework/runtime-definitions#IProvideFluidDataStoreFactory.IFluidDataStoreFactory}
324
+ */
286
325
  get IFluidDataStoreFactory(): this;
326
+ /**
327
+ * {@inheritDoc @fluidframework/runtime-definitions#IProvideFluidDataStoreRegistry.IFluidDataStoreRegistry}
328
+ */
287
329
  get IFluidDataStoreRegistry(): IFluidDataStoreRegistry | undefined;
288
330
  /**
289
331
  * Convenience helper to get the data store's/factory's data store registry entry.
@@ -32,10 +32,14 @@ import { TypedEventEmitter } from '@fluid-internal/client-utils';
32
32
 
33
33
  /* Excluded from this release type: BaseContainerRuntimeFactory */
34
34
 
35
+ /* Excluded from this release type: BaseContainerRuntimeFactoryProps */
36
+
35
37
  /* Excluded from this release type: ContainerRuntime */
36
38
 
37
39
  /* Excluded from this release type: ContainerRuntimeFactoryWithDefaultDataStore */
38
40
 
41
+ /* Excluded from this release type: ContainerRuntimeFactoryWithDefaultDataStoreProps */
42
+
39
43
  /* Excluded from this release type: DataObject */
40
44
 
41
45
  /* Excluded from this release type: DataObjectFactory */
@@ -32,10 +32,14 @@ import { TypedEventEmitter } from '@fluid-internal/client-utils';
32
32
 
33
33
  /* Excluded from this release type: BaseContainerRuntimeFactory */
34
34
 
35
+ /* Excluded from this release type: BaseContainerRuntimeFactoryProps */
36
+
35
37
  /* Excluded from this release type: ContainerRuntime */
36
38
 
37
39
  /* Excluded from this release type: ContainerRuntimeFactoryWithDefaultDataStore */
38
40
 
41
+ /* Excluded from this release type: ContainerRuntimeFactoryWithDefaultDataStoreProps */
42
+
39
43
  /* Excluded from this release type: DataObject */
40
44
 
41
45
  /* Excluded from this release type: DataObjectFactory */
@@ -35,6 +35,9 @@ import { TypedEventEmitter } from '@fluid-internal/client-utils';
35
35
  * @alpha
36
36
  */
37
37
  export declare class BaseContainerRuntimeFactory extends RuntimeFactoryHelper implements IProvideFluidDataStoreRegistry {
38
+ /**
39
+ * {@inheritDoc @fluidframework/runtime-definitions#IProvideFluidDataStoreRegistry.IFluidDataStoreRegistry}
40
+ */
38
41
  get IFluidDataStoreRegistry(): IFluidDataStoreRegistry;
39
42
  private readonly registry;
40
43
  private readonly registryEntries;
@@ -42,22 +45,7 @@ export declare class BaseContainerRuntimeFactory extends RuntimeFactoryHelper im
42
45
  private readonly runtimeOptions?;
43
46
  private readonly requestHandlers;
44
47
  private readonly provideEntryPoint;
45
- /**
46
- * @param registryEntries - The data store registry for containers produced
47
- * @param dependencyContainer - deprecated, will be removed in a future release
48
- * @param requestHandlers - Request handlers for containers produced
49
- * @param runtimeOptions - The runtime options passed to the ContainerRuntime when instantiating it
50
- * @param provideEntryPoint - Function that will initialize the entryPoint of the ContainerRuntime instances
51
- * created with this factory
52
- */
53
- constructor(props: {
54
- registryEntries: NamedFluidDataStoreRegistryEntries;
55
- dependencyContainer?: IFluidDependencySynthesizer;
56
- /** @deprecated Will be removed once Loader LTS version is "2.0.0-internal.7.0.0". Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md */
57
- requestHandlers?: RuntimeRequestHandler[];
58
- runtimeOptions?: IContainerRuntimeOptions;
59
- provideEntryPoint: (runtime: IContainerRuntime) => Promise<FluidObject>;
60
- });
48
+ constructor(props: BaseContainerRuntimeFactoryProps);
61
49
  instantiateFirstTime(runtime: ContainerRuntime): Promise<void>;
62
50
  instantiateFromExisting(runtime: ContainerRuntime): Promise<void>;
63
51
  preInitialize(context: IContainerContext, existing: boolean): Promise<ContainerRuntime>;
@@ -75,6 +63,35 @@ export declare class BaseContainerRuntimeFactory extends RuntimeFactoryHelper im
75
63
  protected containerHasInitialized(runtime: IContainerRuntime): Promise<void>;
76
64
  }
77
65
 
66
+ /**
67
+ * {@link BaseContainerRuntimeFactory} construction properties.
68
+ * @alpha
69
+ */
70
+ export declare interface BaseContainerRuntimeFactoryProps {
71
+ /**
72
+ * The data store registry for containers produced.
73
+ */
74
+ registryEntries: NamedFluidDataStoreRegistryEntries;
75
+ /**
76
+ * @deprecated Will be removed in a future release.
77
+ */
78
+ dependencyContainer?: IFluidDependencySynthesizer;
79
+ /**
80
+ * Request handlers for containers produced.
81
+ * @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
82
+ */
83
+ requestHandlers?: RuntimeRequestHandler[];
84
+ /**
85
+ * The runtime options passed to the ContainerRuntime when instantiating it
86
+ */
87
+ runtimeOptions?: IContainerRuntimeOptions;
88
+ /**
89
+ * Function that will initialize the entryPoint of the ContainerRuntime instances
90
+ * created with this factory
91
+ */
92
+ provideEntryPoint: (runtime: IContainerRuntime) => Promise<FluidObject>;
93
+ }
94
+
78
95
  /**
79
96
  * A ContainerRuntimeFactory that initializes Containers with a single default data store, which can be requested from
80
97
  * the container with an empty URL.
@@ -85,30 +102,43 @@ export declare class BaseContainerRuntimeFactory extends RuntimeFactoryHelper im
85
102
  export declare class ContainerRuntimeFactoryWithDefaultDataStore extends BaseContainerRuntimeFactory {
86
103
  static readonly defaultDataStoreId = "default";
87
104
  protected readonly defaultFactory: IFluidDataStoreFactory;
88
- /**
89
- * Constructor
90
- * @param defaultFactory -
91
- * @param registryEntries -
92
- * @param dependencyContainer - deprecated, will be removed in a future release
93
- * @param requestHandlers -
94
- * @param runtimeOptions -
95
- * @param provideEntryPoint -
96
- */
97
- constructor(props: {
98
- defaultFactory: IFluidDataStoreFactory;
99
- registryEntries: NamedFluidDataStoreRegistryEntries;
100
- dependencyContainer?: IFluidDependencySynthesizer;
101
- /** @deprecated Will be removed once Loader LTS version is "2.0.0-internal.7.0.0". Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md */
102
- requestHandlers?: RuntimeRequestHandler[];
103
- runtimeOptions?: IContainerRuntimeOptions;
104
- provideEntryPoint?: (runtime: IContainerRuntime) => Promise<FluidObject>;
105
- });
105
+ constructor(props: ContainerRuntimeFactoryWithDefaultDataStoreProps);
106
106
  /**
107
107
  * {@inheritDoc BaseContainerRuntimeFactory.containerInitializingFirstTime}
108
108
  */
109
109
  protected containerInitializingFirstTime(runtime: IContainerRuntime): Promise<void>;
110
110
  }
111
111
 
112
+ /**
113
+ * {@link ContainerRuntimeFactoryWithDefaultDataStore} construction properties.
114
+ * @alpha
115
+ */
116
+ export declare interface ContainerRuntimeFactoryWithDefaultDataStoreProps {
117
+ defaultFactory: IFluidDataStoreFactory;
118
+ /**
119
+ * The data store registry for containers produced.
120
+ */
121
+ registryEntries: NamedFluidDataStoreRegistryEntries;
122
+ /**
123
+ * @deprecated Will be removed in a future release.
124
+ */
125
+ dependencyContainer?: IFluidDependencySynthesizer;
126
+ /**
127
+ * Request handlers for containers produced.
128
+ * @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
129
+ */
130
+ requestHandlers?: RuntimeRequestHandler[];
131
+ /**
132
+ * The runtime options passed to the ContainerRuntime when instantiating it
133
+ */
134
+ runtimeOptions?: IContainerRuntimeOptions;
135
+ /**
136
+ * Function that will initialize the entryPoint of the ContainerRuntime instances
137
+ * created with this factory
138
+ */
139
+ provideEntryPoint?: (runtime: IContainerRuntime) => Promise<FluidObject>;
140
+ }
141
+
112
142
  /**
113
143
  * DataObject is a base data store that is primed with a root directory. It
114
144
  * ensures that it is created and ready before you can access it.
@@ -159,15 +189,15 @@ export declare class DataObjectFactory<TObj extends DataObject<I>, I extends Dat
159
189
  */
160
190
  export declare interface DataObjectTypes {
161
191
  /**
162
- * represents a type that will define optional providers that will be injected
192
+ * Represents a type that will define optional providers that will be injected.
163
193
  */
164
194
  OptionalProviders?: FluidObject;
165
195
  /**
166
- * the initial state type that the produced data object may take during creation
196
+ * The initial state type that the produced data object may take during creation.
167
197
  */
168
198
  InitialState?: any;
169
199
  /**
170
- * represents events that will be available in the EventForwarder
200
+ * Represents events that will be available in the EventForwarder.
171
201
  */
172
202
  Events?: IEvent;
173
203
  }
@@ -210,13 +240,19 @@ export declare abstract class PureDataObject<I extends DataObjectTypes = DataObj
210
240
  protected initProps?: I["InitialState"];
211
241
  protected initializeP: Promise<void> | undefined;
212
242
  get id(): string;
243
+ /**
244
+ * {@inheritDoc @fluidframework/core-interfaces#IProvideFluidLoadable.IFluidLoadable}
245
+ */
213
246
  get IFluidLoadable(): this;
247
+ /**
248
+ * {@inheritDoc @fluidframework/core-interfaces#IProvideFluidHandle.IFluidHandle}
249
+ */
214
250
  get IFluidHandle(): IFluidHandle<this>;
215
251
  /**
216
252
  * Handle to a data store
217
253
  */
218
254
  get handle(): IFluidHandle<this>;
219
- static getDataObject(runtime: IFluidDataStoreRuntime): Promise<PureDataObject<DataObjectTypes>>;
255
+ static getDataObject(runtime: IFluidDataStoreRuntime): Promise<PureDataObject>;
220
256
  constructor(props: IDataObjectProps<I>);
221
257
  /**
222
258
  * Return this object if someone requests it directly
@@ -283,7 +319,13 @@ export declare class PureDataObjectFactory<TObj extends PureDataObject<I>, I ext
283
319
  private readonly sharedObjectRegistry;
284
320
  private readonly registry;
285
321
  constructor(type: string, ctor: new (props: IDataObjectProps<I>) => TObj, sharedObjects: readonly IChannelFactory[], optionalProviders: FluidObjectSymbolProvider<I["OptionalProviders"]>, registryEntries?: NamedFluidDataStoreRegistryEntries, runtimeClass?: typeof FluidDataStoreRuntime);
322
+ /**
323
+ * {@inheritDoc @fluidframework/runtime-definitions#IProvideFluidDataStoreFactory.IFluidDataStoreFactory}
324
+ */
286
325
  get IFluidDataStoreFactory(): this;
326
+ /**
327
+ * {@inheritDoc @fluidframework/runtime-definitions#IProvideFluidDataStoreRegistry.IFluidDataStoreRegistry}
328
+ */
287
329
  get IFluidDataStoreRegistry(): IFluidDataStoreRegistry | undefined;
288
330
  /**
289
331
  * Convenience helper to get the data store's/factory's data store registry entry.
@@ -2,14 +2,42 @@
2
2
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
3
  * Licensed under the MIT License.
4
4
  */
5
- import { IContainerContext } from "@fluidframework/container-definitions";
6
- import { IContainerRuntimeOptions, ContainerRuntime } from "@fluidframework/container-runtime";
7
- import { IContainerRuntime } from "@fluidframework/container-runtime-definitions";
8
- import { RuntimeRequestHandler } from "@fluidframework/request-handler";
9
- import { IFluidDataStoreRegistry, IProvideFluidDataStoreRegistry, NamedFluidDataStoreRegistryEntries } from "@fluidframework/runtime-definitions";
10
- import { IFluidDependencySynthesizer } from "@fluidframework/synthesize";
5
+ import { type IContainerContext } from "@fluidframework/container-definitions";
6
+ import { type IContainerRuntimeOptions, ContainerRuntime } from "@fluidframework/container-runtime";
7
+ import { type IContainerRuntime } from "@fluidframework/container-runtime-definitions";
8
+ import { type RuntimeRequestHandler } from "@fluidframework/request-handler";
9
+ import { type IFluidDataStoreRegistry, type IProvideFluidDataStoreRegistry, type NamedFluidDataStoreRegistryEntries } from "@fluidframework/runtime-definitions";
10
+ import { type IFluidDependencySynthesizer } from "@fluidframework/synthesize";
11
11
  import { RuntimeFactoryHelper } from "@fluidframework/runtime-utils";
12
- import { FluidObject } from "@fluidframework/core-interfaces";
12
+ import { type FluidObject } from "@fluidframework/core-interfaces";
13
+ /**
14
+ * {@link BaseContainerRuntimeFactory} construction properties.
15
+ * @alpha
16
+ */
17
+ export interface BaseContainerRuntimeFactoryProps {
18
+ /**
19
+ * The data store registry for containers produced.
20
+ */
21
+ registryEntries: NamedFluidDataStoreRegistryEntries;
22
+ /**
23
+ * @deprecated Will be removed in a future release.
24
+ */
25
+ dependencyContainer?: IFluidDependencySynthesizer;
26
+ /**
27
+ * Request handlers for containers produced.
28
+ * @deprecated Will be removed once Loader LTS version is "2.0.0-internal.7.0.0". Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
29
+ */
30
+ requestHandlers?: RuntimeRequestHandler[];
31
+ /**
32
+ * The runtime options passed to the ContainerRuntime when instantiating it
33
+ */
34
+ runtimeOptions?: IContainerRuntimeOptions;
35
+ /**
36
+ * Function that will initialize the entryPoint of the ContainerRuntime instances
37
+ * created with this factory
38
+ */
39
+ provideEntryPoint: (runtime: IContainerRuntime) => Promise<FluidObject>;
40
+ }
13
41
  /**
14
42
  * BaseContainerRuntimeFactory produces container runtimes with the specified data store and service registries,
15
43
  * request handlers, runtimeOptions, and entryPoint initialization function.
@@ -17,6 +45,9 @@ import { FluidObject } from "@fluidframework/core-interfaces";
17
45
  * @alpha
18
46
  */
19
47
  export declare class BaseContainerRuntimeFactory extends RuntimeFactoryHelper implements IProvideFluidDataStoreRegistry {
48
+ /**
49
+ * {@inheritDoc @fluidframework/runtime-definitions#IProvideFluidDataStoreRegistry.IFluidDataStoreRegistry}
50
+ */
20
51
  get IFluidDataStoreRegistry(): IFluidDataStoreRegistry;
21
52
  private readonly registry;
22
53
  private readonly registryEntries;
@@ -24,22 +55,7 @@ export declare class BaseContainerRuntimeFactory extends RuntimeFactoryHelper im
24
55
  private readonly runtimeOptions?;
25
56
  private readonly requestHandlers;
26
57
  private readonly provideEntryPoint;
27
- /**
28
- * @param registryEntries - The data store registry for containers produced
29
- * @param dependencyContainer - deprecated, will be removed in a future release
30
- * @param requestHandlers - Request handlers for containers produced
31
- * @param runtimeOptions - The runtime options passed to the ContainerRuntime when instantiating it
32
- * @param provideEntryPoint - Function that will initialize the entryPoint of the ContainerRuntime instances
33
- * created with this factory
34
- */
35
- constructor(props: {
36
- registryEntries: NamedFluidDataStoreRegistryEntries;
37
- dependencyContainer?: IFluidDependencySynthesizer;
38
- /** @deprecated Will be removed once Loader LTS version is "2.0.0-internal.7.0.0". Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md */
39
- requestHandlers?: RuntimeRequestHandler[];
40
- runtimeOptions?: IContainerRuntimeOptions;
41
- provideEntryPoint: (runtime: IContainerRuntime) => Promise<FluidObject>;
42
- });
58
+ constructor(props: BaseContainerRuntimeFactoryProps);
43
59
  instantiateFirstTime(runtime: ContainerRuntime): Promise<void>;
44
60
  instantiateFromExisting(runtime: ContainerRuntime): Promise<void>;
45
61
  preInitialize(context: IContainerContext, existing: boolean): Promise<ContainerRuntime>;
@@ -1 +1 @@
1
- {"version":3,"file":"baseContainerRuntimeFactory.d.mts","sourceRoot":"","sources":["../../src/container-runtime-factories/baseContainerRuntimeFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;OAEI,EAAE,iBAAiB,EAAE,MAAM,uCAAuC;OAClE,EACN,wBAAwB,EAExB,gBAAgB,EAChB,MAAM,mCAAmC;OACnC,EAAE,iBAAiB,EAAE,MAAM,+CAA+C;OAE1E,EAAE,qBAAqB,EAA8B,MAAM,iCAAiC;OAC5F,EACN,uBAAuB,EACvB,8BAA8B,EAC9B,kCAAkC,EAClC,MAAM,qCAAqC;OACrC,EAEN,2BAA2B,EAE3B,MAAM,4BAA4B;OAC5B,EAAE,oBAAoB,EAAE,MAAM,+BAA+B;OAC7D,EAAE,WAAW,EAAE,MAAM,iCAAiC;AAE7D;;;;;GAKG;AACH,qBAAa,2BACZ,SAAQ,oBACR,YAAW,8BAA8B;IAEzC,IAAW,uBAAuB,4BAEjC;IACD,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAA0B;IAEnD,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAqC;IACrE,OAAO,CAAC,QAAQ,CAAC,mBAAmB,CAAC,CAA8B;IACnE,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAC,CAA2B;IAC3D,OAAO,CAAC,QAAQ,CAAC,eAAe,CAA0B;IAC1D,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAuD;IAEzF;;;;;;;OAOG;gBACS,KAAK,EAAE;QAClB,eAAe,EAAE,kCAAkC,CAAC;QACpD,mBAAmB,CAAC,EAAE,2BAA2B,CAAC;QAClD,sLAAsL;QACtL,eAAe,CAAC,EAAE,qBAAqB,EAAE,CAAC;QAC1C,cAAc,CAAC,EAAE,wBAAwB,CAAC;QAC1C,iBAAiB,EAAE,CAAC,OAAO,EAAE,iBAAiB,KAAK,OAAO,CAAC,WAAW,CAAC,CAAC;KACxE;IAWY,oBAAoB,CAAC,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC;IAK9D,uBAAuB,CAAC,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC;IAIjE,aAAa,CACzB,OAAO,EAAE,iBAAiB,EAC1B,QAAQ,EAAE,OAAO,GACf,OAAO,CAAC,gBAAgB,CAAC;IAsB5B;;;;OAIG;cACa,8BAA8B,CAAC,OAAO,EAAE,iBAAiB;IAEzE;;;;OAIG;cACa,uBAAuB,CAAC,OAAO,EAAE,iBAAiB;CAClE"}
1
+ {"version":3,"file":"baseContainerRuntimeFactory.d.mts","sourceRoot":"","sources":["../../src/container-runtime-factories/baseContainerRuntimeFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;OAEI,EAAE,KAAK,iBAAiB,EAAE,MAAM,uCAAuC;OACvE,EACN,KAAK,wBAAwB,EAE7B,gBAAgB,EAChB,MAAM,mCAAmC;OACnC,EAAE,KAAK,iBAAiB,EAAE,MAAM,+CAA+C;OAE/E,EACN,KAAK,qBAAqB,EAE1B,MAAM,iCAAiC;OACjC,EACN,KAAK,uBAAuB,EAC5B,KAAK,8BAA8B,EACnC,KAAK,kCAAkC,EACvC,MAAM,qCAAqC;OACrC,EAEN,KAAK,2BAA2B,EAEhC,MAAM,4BAA4B;OAC5B,EAAE,oBAAoB,EAAE,MAAM,+BAA+B;OAC7D,EAAE,KAAK,WAAW,EAAE,MAAM,iCAAiC;AAElE;;;GAGG;AACH,MAAM,WAAW,gCAAgC;IAChD;;OAEG;IACH,eAAe,EAAE,kCAAkC,CAAC;IACpD;;OAEG;IACH,mBAAmB,CAAC,EAAE,2BAA2B,CAAC;IAClD;;;OAGG;IACH,eAAe,CAAC,EAAE,qBAAqB,EAAE,CAAC;IAC1C;;OAEG;IACH,cAAc,CAAC,EAAE,wBAAwB,CAAC;IAC1C;;;OAGG;IACH,iBAAiB,EAAE,CAAC,OAAO,EAAE,iBAAiB,KAAK,OAAO,CAAC,WAAW,CAAC,CAAC;CACxE;AAED;;;;;GAKG;AACH,qBAAa,2BACZ,SAAQ,oBACR,YAAW,8BAA8B;IAEzC;;OAEG;IACH,IAAW,uBAAuB,IAAI,uBAAuB,CAE5D;IACD,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAA0B;IAEnD,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAqC;IACrE,OAAO,CAAC,QAAQ,CAAC,mBAAmB,CAAC,CAA8B;IACnE,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAC,CAA2B;IAC3D,OAAO,CAAC,QAAQ,CAAC,eAAe,CAA0B;IAC1D,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAuD;gBAEtE,KAAK,EAAE,gCAAgC;IAW7C,oBAAoB,CAAC,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC;IAK9D,uBAAuB,CAAC,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC;IAIjE,aAAa,CACzB,OAAO,EAAE,iBAAiB,EAC1B,QAAQ,EAAE,OAAO,GACf,OAAO,CAAC,gBAAgB,CAAC;IAsB5B;;;;OAIG;cACa,8BAA8B,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC;IAEzF;;;;OAIG;cACa,uBAAuB,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC;CAClF"}
@@ -3,7 +3,7 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
  import { FluidDataStoreRegistry, ContainerRuntime, } from "@fluidframework/container-runtime";
6
- import { buildRuntimeRequestHandler } from "@fluidframework/request-handler";
6
+ import { buildRuntimeRequestHandler, } from "@fluidframework/request-handler";
7
7
  import { DependencyContainer, } from "@fluidframework/synthesize";
8
8
  import { RuntimeFactoryHelper } from "@fluidframework/runtime-utils";
9
9
  /**
@@ -13,17 +13,12 @@ import { RuntimeFactoryHelper } from "@fluidframework/runtime-utils";
13
13
  * @alpha
14
14
  */
15
15
  export class BaseContainerRuntimeFactory extends RuntimeFactoryHelper {
16
+ /**
17
+ * {@inheritDoc @fluidframework/runtime-definitions#IProvideFluidDataStoreRegistry.IFluidDataStoreRegistry}
18
+ */
16
19
  get IFluidDataStoreRegistry() {
17
20
  return this.registry;
18
21
  }
19
- /**
20
- * @param registryEntries - The data store registry for containers produced
21
- * @param dependencyContainer - deprecated, will be removed in a future release
22
- * @param requestHandlers - Request handlers for containers produced
23
- * @param runtimeOptions - The runtime options passed to the ContainerRuntime when instantiating it
24
- * @param provideEntryPoint - Function that will initialize the entryPoint of the ContainerRuntime instances
25
- * created with this factory
26
- */
27
22
  constructor(props) {
28
23
  super();
29
24
  this.registryEntries = props.registryEntries;
@@ -1 +1 @@
1
- {"version":3,"file":"baseContainerRuntimeFactory.mjs","sourceRoot":"","sources":["../../src/container-runtime-factories/baseContainerRuntimeFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;OAGI,EAEN,sBAAsB,EACtB,gBAAgB,GAChB,MAAM,mCAAmC;OAGnC,EAAyB,0BAA0B,EAAE,MAAM,iCAAiC;OAM5F,EACN,mBAAmB,GAGnB,MAAM,4BAA4B;OAC5B,EAAE,oBAAoB,EAAE,MAAM,+BAA+B;AAGpE;;;;;GAKG;AACH,MAAM,OAAO,2BACZ,SAAQ,oBAAoB;IAG5B,IAAW,uBAAuB;QACjC,OAAO,IAAI,CAAC,QAAQ,CAAC;IACtB,CAAC;IASD;;;;;;;OAOG;IACH,YAAY,KAOX;QACA,KAAK,EAAE,CAAC;QAER,IAAI,CAAC,eAAe,GAAG,KAAK,CAAC,eAAe,CAAC;QAC7C,IAAI,CAAC,mBAAmB,GAAG,KAAK,CAAC,mBAAmB,CAAC;QACrD,IAAI,CAAC,cAAc,GAAG,KAAK,CAAC,cAAc,CAAC;QAC3C,IAAI,CAAC,iBAAiB,GAAG,KAAK,CAAC,iBAAiB,CAAC;QACjD,IAAI,CAAC,eAAe,GAAG,KAAK,CAAC,eAAe,IAAI,EAAE,CAAC;QACnD,IAAI,CAAC,QAAQ,GAAG,IAAI,sBAAsB,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;IAClE,CAAC;IAEM,KAAK,CAAC,oBAAoB,CAAC,OAAyB;QAC1D,MAAM,IAAI,CAAC,8BAA8B,CAAC,OAAO,CAAC,CAAC;QACnD,MAAM,IAAI,CAAC,uBAAuB,CAAC,OAAO,CAAC,CAAC;IAC7C,CAAC;IAEM,KAAK,CAAC,uBAAuB,CAAC,OAAyB;QAC7D,MAAM,IAAI,CAAC,uBAAuB,CAAC,OAAO,CAAC,CAAC;IAC7C,CAAC;IAEM,KAAK,CAAC,aAAa,CACzB,OAA0B,EAC1B,QAAiB;QAEjB,MAAM,KAAK,GAAgD,OAAO,CAAC,KAAK,CAAC;QACzE,IAAI,IAAI,CAAC,mBAAmB,EAAE;YAC7B,MAAM,EAAE,GAAG,IAAI,mBAAmB,CACjC,IAAI,CAAC,mBAAmB,EACxB,KAAK,CAAC,2BAA2B,CACjC,CAAC;YACF,KAAK,CAAC,2BAA2B,GAAG,EAAE,CAAC;SACvC;QAED,OAAO,gBAAgB,CAAC,WAAW,CAAC;YACnC,OAAO;YACP,QAAQ;YACR,cAAc,EAAE,IAAI,CAAC,cAAc;YACnC,eAAe,EAAE,IAAI,CAAC,eAAe;YACrC,cAAc,EAAE,KAAK;YACrB,gDAAgD;YAChD,cAAc,EAAE,0BAA0B,CAAC,GAAG,IAAI,CAAC,eAAe,CAAC;YACnE,iBAAiB,EAAE,IAAI,CAAC,iBAAiB;SACzC,CAAC,CAAC;IACJ,CAAC;IAED;;;;OAIG;IACO,KAAK,CAAC,8BAA8B,CAAC,OAA0B,IAAG,CAAC;IAE7E;;;;OAIG;IACO,KAAK,CAAC,uBAAuB,CAAC,OAA0B,IAAG,CAAC;CACtE","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IContainerContext } from \"@fluidframework/container-definitions\";\nimport {\n\tIContainerRuntimeOptions,\n\tFluidDataStoreRegistry,\n\tContainerRuntime,\n} from \"@fluidframework/container-runtime\";\nimport { IContainerRuntime } from \"@fluidframework/container-runtime-definitions\";\n// eslint-disable-next-line import/no-deprecated\nimport { RuntimeRequestHandler, buildRuntimeRequestHandler } from \"@fluidframework/request-handler\";\nimport {\n\tIFluidDataStoreRegistry,\n\tIProvideFluidDataStoreRegistry,\n\tNamedFluidDataStoreRegistryEntries,\n} from \"@fluidframework/runtime-definitions\";\nimport {\n\tDependencyContainer,\n\tIFluidDependencySynthesizer,\n\tIProvideFluidDependencySynthesizer,\n} from \"@fluidframework/synthesize\";\nimport { RuntimeFactoryHelper } from \"@fluidframework/runtime-utils\";\nimport { FluidObject } from \"@fluidframework/core-interfaces\";\n\n/**\n * BaseContainerRuntimeFactory produces container runtimes with the specified data store and service registries,\n * request handlers, runtimeOptions, and entryPoint initialization function.\n * It can be subclassed to implement a first-time initialization procedure for the containers it creates.\n * @alpha\n */\nexport class BaseContainerRuntimeFactory\n\textends RuntimeFactoryHelper\n\timplements IProvideFluidDataStoreRegistry\n{\n\tpublic get IFluidDataStoreRegistry() {\n\t\treturn this.registry;\n\t}\n\tprivate readonly registry: IFluidDataStoreRegistry;\n\n\tprivate readonly registryEntries: NamedFluidDataStoreRegistryEntries;\n\tprivate readonly dependencyContainer?: IFluidDependencySynthesizer;\n\tprivate readonly runtimeOptions?: IContainerRuntimeOptions;\n\tprivate readonly requestHandlers: RuntimeRequestHandler[];\n\tprivate readonly provideEntryPoint: (runtime: IContainerRuntime) => Promise<FluidObject>;\n\n\t/**\n\t * @param registryEntries - The data store registry for containers produced\n\t * @param dependencyContainer - deprecated, will be removed in a future release\n\t * @param requestHandlers - Request handlers for containers produced\n\t * @param runtimeOptions - The runtime options passed to the ContainerRuntime when instantiating it\n\t * @param provideEntryPoint - Function that will initialize the entryPoint of the ContainerRuntime instances\n\t * created with this factory\n\t */\n\tconstructor(props: {\n\t\tregistryEntries: NamedFluidDataStoreRegistryEntries;\n\t\tdependencyContainer?: IFluidDependencySynthesizer;\n\t\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\trequestHandlers?: RuntimeRequestHandler[];\n\t\truntimeOptions?: IContainerRuntimeOptions;\n\t\tprovideEntryPoint: (runtime: IContainerRuntime) => Promise<FluidObject>;\n\t}) {\n\t\tsuper();\n\n\t\tthis.registryEntries = props.registryEntries;\n\t\tthis.dependencyContainer = props.dependencyContainer;\n\t\tthis.runtimeOptions = props.runtimeOptions;\n\t\tthis.provideEntryPoint = props.provideEntryPoint;\n\t\tthis.requestHandlers = props.requestHandlers ?? [];\n\t\tthis.registry = new FluidDataStoreRegistry(this.registryEntries);\n\t}\n\n\tpublic async instantiateFirstTime(runtime: ContainerRuntime): Promise<void> {\n\t\tawait this.containerInitializingFirstTime(runtime);\n\t\tawait this.containerHasInitialized(runtime);\n\t}\n\n\tpublic async instantiateFromExisting(runtime: ContainerRuntime): Promise<void> {\n\t\tawait this.containerHasInitialized(runtime);\n\t}\n\n\tpublic async preInitialize(\n\t\tcontext: IContainerContext,\n\t\texisting: boolean,\n\t): Promise<ContainerRuntime> {\n\t\tconst scope: Partial<IProvideFluidDependencySynthesizer> = context.scope;\n\t\tif (this.dependencyContainer) {\n\t\t\tconst dc = new DependencyContainer<FluidObject>(\n\t\t\t\tthis.dependencyContainer,\n\t\t\t\tscope.IFluidDependencySynthesizer,\n\t\t\t);\n\t\t\tscope.IFluidDependencySynthesizer = dc;\n\t\t}\n\n\t\treturn ContainerRuntime.loadRuntime({\n\t\t\tcontext,\n\t\t\texisting,\n\t\t\truntimeOptions: this.runtimeOptions,\n\t\t\tregistryEntries: this.registryEntries,\n\t\t\tcontainerScope: scope,\n\t\t\t// eslint-disable-next-line import/no-deprecated\n\t\t\trequestHandler: buildRuntimeRequestHandler(...this.requestHandlers),\n\t\t\tprovideEntryPoint: this.provideEntryPoint,\n\t\t});\n\t}\n\n\t/**\n\t * Subclasses may override containerInitializingFirstTime to perform any setup steps at the time the container\n\t * is created. This likely includes creating any initial data stores that are expected to be there at the outset.\n\t * @param runtime - The container runtime for the container being initialized\n\t */\n\tprotected async containerInitializingFirstTime(runtime: IContainerRuntime) {}\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) {}\n}\n"]}
1
+ {"version":3,"file":"baseContainerRuntimeFactory.mjs","sourceRoot":"","sources":["../../src/container-runtime-factories/baseContainerRuntimeFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;OAGI,EAEN,sBAAsB,EACtB,gBAAgB,GAChB,MAAM,mCAAmC;OAGnC,EAEN,0BAA0B,GAC1B,MAAM,iCAAiC;OAMjC,EACN,mBAAmB,GAGnB,MAAM,4BAA4B;OAC5B,EAAE,oBAAoB,EAAE,MAAM,+BAA+B;AAgCpE;;;;;GAKG;AACH,MAAM,OAAO,2BACZ,SAAQ,oBAAoB;IAG5B;;OAEG;IACH,IAAW,uBAAuB;QACjC,OAAO,IAAI,CAAC,QAAQ,CAAC;IACtB,CAAC;IASD,YAAmB,KAAuC;QACzD,KAAK,EAAE,CAAC;QAER,IAAI,CAAC,eAAe,GAAG,KAAK,CAAC,eAAe,CAAC;QAC7C,IAAI,CAAC,mBAAmB,GAAG,KAAK,CAAC,mBAAmB,CAAC;QACrD,IAAI,CAAC,cAAc,GAAG,KAAK,CAAC,cAAc,CAAC;QAC3C,IAAI,CAAC,iBAAiB,GAAG,KAAK,CAAC,iBAAiB,CAAC;QACjD,IAAI,CAAC,eAAe,GAAG,KAAK,CAAC,eAAe,IAAI,EAAE,CAAC;QACnD,IAAI,CAAC,QAAQ,GAAG,IAAI,sBAAsB,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;IAClE,CAAC;IAEM,KAAK,CAAC,oBAAoB,CAAC,OAAyB;QAC1D,MAAM,IAAI,CAAC,8BAA8B,CAAC,OAAO,CAAC,CAAC;QACnD,MAAM,IAAI,CAAC,uBAAuB,CAAC,OAAO,CAAC,CAAC;IAC7C,CAAC;IAEM,KAAK,CAAC,uBAAuB,CAAC,OAAyB;QAC7D,MAAM,IAAI,CAAC,uBAAuB,CAAC,OAAO,CAAC,CAAC;IAC7C,CAAC;IAEM,KAAK,CAAC,aAAa,CACzB,OAA0B,EAC1B,QAAiB;QAEjB,MAAM,KAAK,GAAgD,OAAO,CAAC,KAAK,CAAC;QACzE,IAAI,IAAI,CAAC,mBAAmB,EAAE;YAC7B,MAAM,EAAE,GAAG,IAAI,mBAAmB,CACjC,IAAI,CAAC,mBAAmB,EACxB,KAAK,CAAC,2BAA2B,CACjC,CAAC;YACF,KAAK,CAAC,2BAA2B,GAAG,EAAE,CAAC;SACvC;QAED,OAAO,gBAAgB,CAAC,WAAW,CAAC;YACnC,OAAO;YACP,QAAQ;YACR,cAAc,EAAE,IAAI,CAAC,cAAc;YACnC,eAAe,EAAE,IAAI,CAAC,eAAe;YACrC,cAAc,EAAE,KAAK;YACrB,gDAAgD;YAChD,cAAc,EAAE,0BAA0B,CAAC,GAAG,IAAI,CAAC,eAAe,CAAC;YACnE,iBAAiB,EAAE,IAAI,CAAC,iBAAiB;SACzC,CAAC,CAAC;IACJ,CAAC;IAED;;;;OAIG;IACO,KAAK,CAAC,8BAA8B,CAAC,OAA0B,IAAkB,CAAC;IAE5F;;;;OAIG;IACO,KAAK,CAAC,uBAAuB,CAAC,OAA0B,IAAkB,CAAC;CACrF","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { type IContainerContext } from \"@fluidframework/container-definitions\";\nimport {\n\ttype IContainerRuntimeOptions,\n\tFluidDataStoreRegistry,\n\tContainerRuntime,\n} from \"@fluidframework/container-runtime\";\nimport { type IContainerRuntime } from \"@fluidframework/container-runtime-definitions\";\n// eslint-disable-next-line import/no-deprecated\nimport {\n\ttype RuntimeRequestHandler,\n\tbuildRuntimeRequestHandler,\n} from \"@fluidframework/request-handler\";\nimport {\n\ttype IFluidDataStoreRegistry,\n\ttype IProvideFluidDataStoreRegistry,\n\ttype NamedFluidDataStoreRegistryEntries,\n} from \"@fluidframework/runtime-definitions\";\nimport {\n\tDependencyContainer,\n\ttype IFluidDependencySynthesizer,\n\ttype IProvideFluidDependencySynthesizer,\n} from \"@fluidframework/synthesize\";\nimport { RuntimeFactoryHelper } from \"@fluidframework/runtime-utils\";\nimport { type FluidObject } from \"@fluidframework/core-interfaces\";\n\n/**\n * {@link BaseContainerRuntimeFactory} construction properties.\n * @alpha\n */\nexport interface BaseContainerRuntimeFactoryProps {\n\t/**\n\t * The data store registry for containers produced.\n\t */\n\tregistryEntries: NamedFluidDataStoreRegistryEntries;\n\t/**\n\t * @deprecated Will be removed in a future release.\n\t */\n\tdependencyContainer?: IFluidDependencySynthesizer;\n\t/**\n\t * Request handlers for containers produced.\n\t * @deprecated Will be removed once Loader LTS version is \"2.0.0-internal.7.0.0\". Migrate all usage of IFluidRouter to the \"entryPoint\" pattern. Refer to Removing-IFluidRouter.md\n\t */\n\trequestHandlers?: RuntimeRequestHandler[];\n\t/**\n\t * The runtime options passed to the ContainerRuntime when instantiating it\n\t */\n\truntimeOptions?: IContainerRuntimeOptions;\n\t/**\n\t * Function that will initialize the entryPoint of the ContainerRuntime instances\n\t * created with this factory\n\t */\n\tprovideEntryPoint: (runtime: IContainerRuntime) => Promise<FluidObject>;\n}\n\n/**\n * BaseContainerRuntimeFactory produces container runtimes with the specified data store and service registries,\n * request handlers, runtimeOptions, and entryPoint initialization function.\n * It can be subclassed to implement a first-time initialization procedure for the containers it creates.\n * @alpha\n */\nexport class BaseContainerRuntimeFactory\n\textends RuntimeFactoryHelper\n\timplements IProvideFluidDataStoreRegistry\n{\n\t/**\n\t * {@inheritDoc @fluidframework/runtime-definitions#IProvideFluidDataStoreRegistry.IFluidDataStoreRegistry}\n\t */\n\tpublic get IFluidDataStoreRegistry(): IFluidDataStoreRegistry {\n\t\treturn this.registry;\n\t}\n\tprivate readonly registry: IFluidDataStoreRegistry;\n\n\tprivate readonly registryEntries: NamedFluidDataStoreRegistryEntries;\n\tprivate readonly dependencyContainer?: IFluidDependencySynthesizer;\n\tprivate readonly runtimeOptions?: IContainerRuntimeOptions;\n\tprivate readonly requestHandlers: RuntimeRequestHandler[];\n\tprivate readonly provideEntryPoint: (runtime: IContainerRuntime) => Promise<FluidObject>;\n\n\tpublic constructor(props: BaseContainerRuntimeFactoryProps) {\n\t\tsuper();\n\n\t\tthis.registryEntries = props.registryEntries;\n\t\tthis.dependencyContainer = props.dependencyContainer;\n\t\tthis.runtimeOptions = props.runtimeOptions;\n\t\tthis.provideEntryPoint = props.provideEntryPoint;\n\t\tthis.requestHandlers = props.requestHandlers ?? [];\n\t\tthis.registry = new FluidDataStoreRegistry(this.registryEntries);\n\t}\n\n\tpublic async instantiateFirstTime(runtime: ContainerRuntime): Promise<void> {\n\t\tawait this.containerInitializingFirstTime(runtime);\n\t\tawait this.containerHasInitialized(runtime);\n\t}\n\n\tpublic async instantiateFromExisting(runtime: ContainerRuntime): Promise<void> {\n\t\tawait this.containerHasInitialized(runtime);\n\t}\n\n\tpublic async preInitialize(\n\t\tcontext: IContainerContext,\n\t\texisting: boolean,\n\t): Promise<ContainerRuntime> {\n\t\tconst scope: Partial<IProvideFluidDependencySynthesizer> = context.scope;\n\t\tif (this.dependencyContainer) {\n\t\t\tconst dc = new DependencyContainer<FluidObject>(\n\t\t\t\tthis.dependencyContainer,\n\t\t\t\tscope.IFluidDependencySynthesizer,\n\t\t\t);\n\t\t\tscope.IFluidDependencySynthesizer = dc;\n\t\t}\n\n\t\treturn ContainerRuntime.loadRuntime({\n\t\t\tcontext,\n\t\t\texisting,\n\t\t\truntimeOptions: this.runtimeOptions,\n\t\t\tregistryEntries: this.registryEntries,\n\t\t\tcontainerScope: scope,\n\t\t\t// eslint-disable-next-line import/no-deprecated\n\t\t\trequestHandler: buildRuntimeRequestHandler(...this.requestHandlers),\n\t\t\tprovideEntryPoint: this.provideEntryPoint,\n\t\t});\n\t}\n\n\t/**\n\t * Subclasses may override containerInitializingFirstTime to perform any setup steps at the time the container\n\t * is created. This likely includes creating any initial data stores that are expected to be there at the outset.\n\t * @param runtime - The container runtime for the container being initialized\n\t */\n\tprotected async containerInitializingFirstTime(runtime: IContainerRuntime): Promise<void> {}\n\n\t/**\n\t * Subclasses may override containerHasInitialized to perform any steps after the container has initialized.\n\t * This likely includes loading any data stores that are expected to be there at the outset.\n\t * @param runtime - The container runtime for the container being initialized\n\t */\n\tprotected async containerHasInitialized(runtime: IContainerRuntime): Promise<void> {}\n}\n"]}