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

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 (122) hide show
  1. package/dist/aqueduct-alpha.d.ts +36 -10
  2. package/dist/aqueduct-beta.d.ts +6 -0
  3. package/dist/aqueduct-public.d.ts +6 -0
  4. package/dist/aqueduct-untrimmed.d.ts +36 -10
  5. package/dist/container-runtime-factories/containerRuntimeFactoryWithDefaultDataStore.d.ts +1 -1
  6. package/dist/container-runtime-factories/containerRuntimeFactoryWithDefaultDataStore.d.ts.map +1 -1
  7. package/dist/container-runtime-factories/containerRuntimeFactoryWithDefaultDataStore.js +2 -2
  8. package/dist/container-runtime-factories/containerRuntimeFactoryWithDefaultDataStore.js.map +1 -1
  9. package/dist/container-runtime-factories/index.d.ts +2 -2
  10. package/dist/container-runtime-factories/index.d.ts.map +1 -1
  11. package/dist/container-runtime-factories/index.js +4 -4
  12. package/dist/container-runtime-factories/index.js.map +1 -1
  13. package/dist/data-object-factories/dataObjectFactory.d.ts +3 -3
  14. package/dist/data-object-factories/dataObjectFactory.d.ts.map +1 -1
  15. package/dist/data-object-factories/dataObjectFactory.js +2 -2
  16. package/dist/data-object-factories/dataObjectFactory.js.map +1 -1
  17. package/dist/data-object-factories/index.d.ts +2 -2
  18. package/dist/data-object-factories/index.d.ts.map +1 -1
  19. package/dist/data-object-factories/index.js +4 -4
  20. package/dist/data-object-factories/index.js.map +1 -1
  21. package/dist/data-object-factories/pureDataObjectFactory.d.ts +35 -11
  22. package/dist/data-object-factories/pureDataObjectFactory.d.ts.map +1 -1
  23. package/dist/data-object-factories/pureDataObjectFactory.js +50 -14
  24. package/dist/data-object-factories/pureDataObjectFactory.js.map +1 -1
  25. package/dist/data-objects/dataObject.d.ts +2 -2
  26. package/dist/data-objects/dataObject.d.ts.map +1 -1
  27. package/dist/data-objects/dataObject.js +2 -2
  28. package/dist/data-objects/dataObject.js.map +1 -1
  29. package/dist/data-objects/index.d.ts +3 -3
  30. package/dist/data-objects/index.d.ts.map +1 -1
  31. package/dist/data-objects/index.js +4 -4
  32. package/dist/data-objects/index.js.map +1 -1
  33. package/dist/data-objects/pureDataObject.d.ts +1 -1
  34. package/dist/data-objects/pureDataObject.d.ts.map +1 -1
  35. package/dist/data-objects/pureDataObject.js.map +1 -1
  36. package/dist/index.d.ts +3 -3
  37. package/dist/index.d.ts.map +1 -1
  38. package/dist/index.js +9 -9
  39. package/dist/index.js.map +1 -1
  40. package/dist/package.json +3 -0
  41. package/dist/tsdoc-metadata.json +1 -1
  42. package/lib/{aqueduct-alpha.d.mts → aqueduct-alpha.d.ts} +51 -10
  43. package/lib/{aqueduct-beta.d.mts → aqueduct-beta.d.ts} +21 -0
  44. package/lib/{aqueduct-public.d.mts → aqueduct-public.d.ts} +21 -0
  45. package/lib/{aqueduct-untrimmed.d.mts → aqueduct-untrimmed.d.ts} +51 -10
  46. package/lib/container-runtime-factories/{baseContainerRuntimeFactory.d.mts → baseContainerRuntimeFactory.d.ts} +1 -1
  47. package/lib/container-runtime-factories/baseContainerRuntimeFactory.d.ts.map +1 -0
  48. package/lib/container-runtime-factories/{baseContainerRuntimeFactory.mjs → baseContainerRuntimeFactory.js} +2 -1
  49. package/lib/container-runtime-factories/baseContainerRuntimeFactory.js.map +1 -0
  50. package/lib/container-runtime-factories/{containerRuntimeFactoryWithDefaultDataStore.d.mts → containerRuntimeFactoryWithDefaultDataStore.d.ts} +2 -2
  51. package/lib/container-runtime-factories/containerRuntimeFactoryWithDefaultDataStore.d.ts.map +1 -0
  52. package/lib/container-runtime-factories/{containerRuntimeFactoryWithDefaultDataStore.mjs → containerRuntimeFactoryWithDefaultDataStore.js} +2 -2
  53. package/lib/container-runtime-factories/containerRuntimeFactoryWithDefaultDataStore.js.map +1 -0
  54. package/lib/container-runtime-factories/{index.d.mts → index.d.ts} +3 -3
  55. package/lib/container-runtime-factories/index.d.ts.map +1 -0
  56. package/lib/container-runtime-factories/{index.mjs → index.js} +3 -3
  57. package/lib/container-runtime-factories/index.js.map +1 -0
  58. package/lib/data-object-factories/{dataObjectFactory.d.mts → dataObjectFactory.d.ts} +4 -4
  59. package/lib/data-object-factories/dataObjectFactory.d.ts.map +1 -0
  60. package/lib/data-object-factories/{dataObjectFactory.mjs → dataObjectFactory.js} +2 -2
  61. package/lib/data-object-factories/dataObjectFactory.js.map +1 -0
  62. package/lib/data-object-factories/index.d.ts +7 -0
  63. package/lib/data-object-factories/index.d.ts.map +1 -0
  64. package/lib/data-object-factories/index.js +7 -0
  65. package/lib/data-object-factories/index.js.map +1 -0
  66. package/lib/data-object-factories/{pureDataObjectFactory.d.mts → pureDataObjectFactory.d.ts} +36 -12
  67. package/lib/data-object-factories/pureDataObjectFactory.d.ts.map +1 -0
  68. package/lib/data-object-factories/{pureDataObjectFactory.mjs → pureDataObjectFactory.js} +51 -15
  69. package/lib/data-object-factories/pureDataObjectFactory.js.map +1 -0
  70. package/lib/data-objects/{dataObject.d.mts → dataObject.d.ts} +3 -3
  71. package/lib/data-objects/dataObject.d.ts.map +1 -0
  72. package/lib/data-objects/{dataObject.mjs → dataObject.js} +2 -2
  73. package/lib/data-objects/dataObject.js.map +1 -0
  74. package/lib/data-objects/{index.d.mts → index.d.ts} +4 -4
  75. package/lib/data-objects/index.d.ts.map +1 -0
  76. package/lib/data-objects/index.js +7 -0
  77. package/lib/data-objects/index.js.map +1 -0
  78. package/lib/data-objects/{pureDataObject.d.mts → pureDataObject.d.ts} +2 -2
  79. package/lib/data-objects/pureDataObject.d.ts.map +1 -0
  80. package/lib/data-objects/{pureDataObject.mjs → pureDataObject.js} +1 -1
  81. package/lib/data-objects/pureDataObject.js.map +1 -0
  82. package/lib/data-objects/{types.d.mts → types.d.ts} +1 -1
  83. package/lib/data-objects/types.d.ts.map +1 -0
  84. package/lib/data-objects/{types.mjs → types.js} +1 -1
  85. package/lib/data-objects/types.js.map +1 -0
  86. package/lib/index.d.ts +22 -0
  87. package/lib/index.d.ts.map +1 -0
  88. package/lib/index.js +22 -0
  89. package/lib/index.js.map +1 -0
  90. package/lib/test/aqueduct.spec.js +8 -0
  91. package/lib/test/aqueduct.spec.js.map +1 -0
  92. package/lib/test/tsconfig.tsbuildinfo +1 -0
  93. package/lib/test/types/validateAqueductPrevious.generated.js +26 -0
  94. package/lib/test/types/validateAqueductPrevious.generated.js.map +1 -0
  95. package/package.json +55 -54
  96. package/lib/container-runtime-factories/baseContainerRuntimeFactory.d.mts.map +0 -1
  97. package/lib/container-runtime-factories/baseContainerRuntimeFactory.mjs.map +0 -1
  98. package/lib/container-runtime-factories/containerRuntimeFactoryWithDefaultDataStore.d.mts.map +0 -1
  99. package/lib/container-runtime-factories/containerRuntimeFactoryWithDefaultDataStore.mjs.map +0 -1
  100. package/lib/container-runtime-factories/index.d.mts.map +0 -1
  101. package/lib/container-runtime-factories/index.mjs.map +0 -1
  102. package/lib/data-object-factories/dataObjectFactory.d.mts.map +0 -1
  103. package/lib/data-object-factories/dataObjectFactory.mjs.map +0 -1
  104. package/lib/data-object-factories/index.d.mts +0 -7
  105. package/lib/data-object-factories/index.d.mts.map +0 -1
  106. package/lib/data-object-factories/index.mjs +0 -7
  107. package/lib/data-object-factories/index.mjs.map +0 -1
  108. package/lib/data-object-factories/pureDataObjectFactory.d.mts.map +0 -1
  109. package/lib/data-object-factories/pureDataObjectFactory.mjs.map +0 -1
  110. package/lib/data-objects/dataObject.d.mts.map +0 -1
  111. package/lib/data-objects/dataObject.mjs.map +0 -1
  112. package/lib/data-objects/index.d.mts.map +0 -1
  113. package/lib/data-objects/index.mjs +0 -7
  114. package/lib/data-objects/index.mjs.map +0 -1
  115. package/lib/data-objects/pureDataObject.d.mts.map +0 -1
  116. package/lib/data-objects/pureDataObject.mjs.map +0 -1
  117. package/lib/data-objects/types.d.mts.map +0 -1
  118. package/lib/data-objects/types.mjs.map +0 -1
  119. package/lib/index.d.mts +0 -8
  120. package/lib/index.d.mts.map +0 -1
  121. package/lib/index.mjs +0 -8
  122. package/lib/index.mjs.map +0 -1
@@ -1,3 +1,18 @@
1
+ /**
2
+ * The `aqueduct` package is a library for building Fluid objects and Fluid
3
+ * containers within the Fluid Framework. Its goal is to provide a thin base
4
+ * layer over the existing Fluid Framework interfaces that allows developers to
5
+ * get started quickly.
6
+ *
7
+ * @remarks
8
+ * About the library name: An "aqueduct" is a way to transport water from a source
9
+ * to another location. The library name was chosen because its purpose is to
10
+ * facilitate using lower level constructs and therefore handle 'fluid' items
11
+ * same as an aqueduct.
12
+ *
13
+ * @packageDocumentation
14
+ */
15
+
1
16
  import { AsyncFluidObjectProvider } from '@fluidframework/synthesize';
2
17
  import { ContainerRuntime } from '@fluidframework/container-runtime';
3
18
  import { FluidDataStoreRuntime } from '@fluidframework/datastore';
@@ -8,7 +23,9 @@ import { IContainerContext } from '@fluidframework/container-definitions';
8
23
  import { IContainerRuntime } from '@fluidframework/container-runtime-definitions';
9
24
  import { IContainerRuntimeBase } from '@fluidframework/runtime-definitions';
10
25
  import { IContainerRuntimeOptions } from '@fluidframework/container-runtime';
26
+ import { IDataStore } from '@fluidframework/runtime-definitions';
11
27
  import { IEvent } from '@fluidframework/core-interfaces';
28
+ import { IFluidDataStoreChannel } from '@fluidframework/runtime-definitions';
12
29
  import { IFluidDataStoreContext } from '@fluidframework/runtime-definitions';
13
30
  import { IFluidDataStoreContextDetached } from '@fluidframework/runtime-definitions';
14
31
  import { IFluidDataStoreFactory } from '@fluidframework/runtime-definitions';
@@ -180,7 +197,7 @@ export declare abstract class DataObject<I extends DataObjectTypes = DataObjectT
180
197
  * @alpha
181
198
  */
182
199
  export declare class DataObjectFactory<TObj extends DataObject<I>, I extends DataObjectTypes = DataObjectTypes> extends PureDataObjectFactory<TObj, I> {
183
- constructor(type: string, ctor: new (props: IDataObjectProps<I>) => TObj, sharedObjects: readonly IChannelFactory[] | undefined, optionalProviders: FluidObjectSymbolProvider<I["OptionalProviders"]>, registryEntries?: NamedFluidDataStoreRegistryEntries, runtimeFactory?: typeof FluidDataStoreRuntime);
200
+ constructor(type: string, ctor: new (props: IDataObjectProps<I>) => TObj, sharedObjects: readonly IChannelFactory<IFluidLoadable>[] | undefined, optionalProviders: FluidObjectSymbolProvider<I["OptionalProviders"]>, registryEntries?: NamedFluidDataStoreRegistryEntries, runtimeFactory?: typeof FluidDataStoreRuntime);
184
201
  }
185
202
 
186
203
  /**
@@ -312,13 +329,20 @@ export declare abstract class PureDataObject<I extends DataObjectTypes = DataObj
312
329
  * @alpha
313
330
  */
314
331
  export declare class PureDataObjectFactory<TObj extends PureDataObject<I>, I extends DataObjectTypes = DataObjectTypes> implements IFluidDataStoreFactory, Partial<IProvideFluidDataStoreRegistry> {
332
+ /**
333
+ * {@inheritDoc @fluidframework/runtime-definitions#IFluidDataStoreFactory."type"}
334
+ */
315
335
  readonly type: string;
316
336
  private readonly ctor;
317
337
  private readonly optionalProviders;
318
338
  private readonly runtimeClass;
319
339
  private readonly sharedObjectRegistry;
320
340
  private readonly registry;
321
- constructor(type: string, ctor: new (props: IDataObjectProps<I>) => TObj, sharedObjects: readonly IChannelFactory[], optionalProviders: FluidObjectSymbolProvider<I["OptionalProviders"]>, registryEntries?: NamedFluidDataStoreRegistryEntries, runtimeClass?: typeof FluidDataStoreRuntime);
341
+ constructor(
342
+ /**
343
+ * {@inheritDoc @fluidframework/runtime-definitions#IFluidDataStoreFactory."type"}
344
+ */
345
+ type: string, ctor: new (props: IDataObjectProps<I>) => TObj, sharedObjects: readonly IChannelFactory[], optionalProviders: FluidObjectSymbolProvider<I["OptionalProviders"]>, registryEntries?: NamedFluidDataStoreRegistryEntries, runtimeClass?: typeof FluidDataStoreRuntime);
322
346
  /**
323
347
  * {@inheritDoc @fluidframework/runtime-definitions#IProvideFluidDataStoreFactory.IFluidDataStoreFactory}
324
348
  */
@@ -335,11 +359,9 @@ export declare class PureDataObjectFactory<TObj extends PureDataObject<I>, I ext
335
359
  */
336
360
  get registryEntry(): NamedFluidDataStoreRegistryEntry;
337
361
  /**
338
- * This is where we do data store setup.
339
- *
340
- * @param context - data store context used to load a data store runtime
362
+ * {@inheritDoc @fluidframework/runtime-definitions#IFluidDataStoreFactory.instantiateDataStore}
341
363
  */
342
- instantiateDataStore(context: IFluidDataStoreContext, existing: boolean): Promise<FluidDataStoreRuntime>;
364
+ instantiateDataStore(context: IFluidDataStoreContext, existing: boolean): Promise<IFluidDataStoreChannel>;
343
365
  /**
344
366
  * Creates a new instance of the object. Uses parent context's registry to build package path to this factory.
345
367
  * In other words, registry of context passed in has to contain this factory, with the name that matches
@@ -348,10 +370,11 @@ export declare class PureDataObjectFactory<TObj extends PureDataObject<I>, I ext
348
370
  * @param context - The context being used to create the runtime
349
371
  * (the created object will have its own new context created as well)
350
372
  * @param initialState - The initial state to provide to the created data store.
373
+ * @param loadingGroupId - NOT production ready, EXPERIMENTAL, please read {@link https://github.com/microsoft/FluidFramework/blob/main/packages/runtime/container-runtime/README.md | README}. The service needs to support this feature, does not work for most services
351
374
  * @returns an object created by this factory. Data store and objects created are not attached to container.
352
375
  * They get attached only when a handle to one of them is attached to already attached objects.
353
376
  */
354
- createChildInstance(parentContext: IFluidDataStoreContext, initialState?: I["InitialState"]): Promise<TObj>;
377
+ createChildInstance(parentContext: IFluidDataStoreContext, initialState?: I["InitialState"], loadingGroupId?: string): Promise<TObj>;
355
378
  /**
356
379
  * Creates a new instance of the object. Uses peer context's registry and its package path to identify this factory.
357
380
  * In other words, registry of context passed in has to have this factory.
@@ -359,10 +382,11 @@ export declare class PureDataObjectFactory<TObj extends PureDataObject<I>, I ext
359
382
  * @param context - The component context being used to create the object
360
383
  * (the created object will have its own new context created as well)
361
384
  * @param initialState - The initial state to provide to the created component.
385
+ * @param loadingGroupId - NOT production ready, EXPERIMENTAL, please read {@link https://github.com/microsoft/FluidFramework/blob/main/packages/runtime/container-runtime/README.md | README}. The service needs to support this feature, does not work for most services
362
386
  * @returns an object created by this factory. Data store and objects created are not attached to container.
363
387
  * They get attached only when a handle to one of them is attached to already attached objects.
364
388
  */
365
- createPeerInstance(peerContext: IFluidDataStoreContext, initialState?: I["InitialState"]): Promise<TObj>;
389
+ createPeerInstance(peerContext: IFluidDataStoreContext, initialState?: I["InitialState"], loadingGroupId?: string): Promise<TObj>;
366
390
  /**
367
391
  * Creates a new instance of the object. Uses container's registry to find this factory.
368
392
  * It's expected that only container owners would use this functionality, as only such developers
@@ -370,10 +394,24 @@ export declare class PureDataObjectFactory<TObj extends PureDataObject<I>, I ext
370
394
  * The name in this registry for such record should match type of this factory.
371
395
  * @param runtime - container runtime. It's registry is used to create an object.
372
396
  * @param initialState - The initial state to provide to the created component.
397
+ * @param loadingGroupId - NOT production ready, EXPERIMENTAL, please read {@link https://github.com/microsoft/FluidFramework/blob/main/packages/runtime/container-runtime/README.md | README}. The service needs to support this feature, does not work for most services
373
398
  * @returns an object created by this factory. Data store and objects created are not attached to container.
374
399
  * They get attached only when a handle to one of them is attached to already attached objects.
375
400
  */
376
- createInstance(runtime: IContainerRuntimeBase, initialState?: I["InitialState"]): Promise<TObj>;
401
+ createInstance(runtime: IContainerRuntimeBase, initialState?: I["InitialState"], loadingGroupId?: string): Promise<TObj>;
402
+ /**
403
+ * Creates a new instance of the object with a datastore which exposes the aliasing api.
404
+ * @param runtime - container runtime. It is the runtime that will be used to create the object. It will produce
405
+ * the underlying infrastructure to get the data object to operate.
406
+ * @param initialState - The initial state to provide to the created component.
407
+ * @param packagePath - The path to the data store factory to use to create the data object.
408
+ * @param loadingGroupId - NOT production ready, EXPERIMENTAL, please read {@link https://github.com/microsoft/FluidFramework/blob/main/packages/runtime/container-runtime/README.md | README}. The service needs to support this feature, does not work for most services
409
+ * @returns an array containing the object created by this factory and an IDataStore object that enables users to
410
+ * alias the data object.
411
+ * The data object is attached only when it is attached to the handle graph that connects to an aliased object or
412
+ * when the data object is aliased.
413
+ */
414
+ createInstanceWithDataStore(containerRuntime: IContainerRuntimeBase, initialState?: I["InitialState"], packagePath?: Readonly<string[]>, loadingGroupId?: string): Promise<[TObj, IDataStore]>;
377
415
  /**
378
416
  * Creates a new root instance of the object. Uses container's registry to find this factory.
379
417
  * It's expected that only container owners would use this functionality, as only such developers
@@ -383,9 +421,12 @@ export declare class PureDataObjectFactory<TObj extends PureDataObject<I>, I ext
383
421
  * @param initialState - The initial state to provide to the created component.
384
422
  * @returns an object created by this factory. Data store and objects created are not attached to container.
385
423
  * They get attached only when a handle to one of them is attached to already attached objects.
424
+ *
425
+ * @deprecated - the issue is that it does not allow the customer to decide the conflict resolution policy when an
426
+ * aliasing conflict occurs. Use {@link PureDataObjectFactory.createInstanceWithDataStore} instead.
386
427
  */
387
428
  createRootInstance(rootDataStoreId: string, runtime: IContainerRuntime, initialState?: I["InitialState"]): Promise<TObj>;
388
- protected createNonRootInstanceCore(containerRuntime: IContainerRuntimeBase, packagePath: Readonly<string[]>, initialState?: I["InitialState"]): Promise<TObj>;
429
+ protected createNonRootInstanceCore(containerRuntime: IContainerRuntimeBase, packagePath: Readonly<string[]>, initialState?: I["InitialState"], loadingGroupId?: string): Promise<TObj>;
389
430
  protected createInstanceCore(context: IFluidDataStoreContextDetached, initialState?: I["InitialState"]): Promise<TObj>;
390
431
  }
391
432
 
@@ -1,3 +1,18 @@
1
+ /**
2
+ * The `aqueduct` package is a library for building Fluid objects and Fluid
3
+ * containers within the Fluid Framework. Its goal is to provide a thin base
4
+ * layer over the existing Fluid Framework interfaces that allows developers to
5
+ * get started quickly.
6
+ *
7
+ * @remarks
8
+ * About the library name: An "aqueduct" is a way to transport water from a source
9
+ * to another location. The library name was chosen because its purpose is to
10
+ * facilitate using lower level constructs and therefore handle 'fluid' items
11
+ * same as an aqueduct.
12
+ *
13
+ * @packageDocumentation
14
+ */
15
+
1
16
  import { AsyncFluidObjectProvider } from '@fluidframework/synthesize';
2
17
  import { ContainerRuntime } from '@fluidframework/container-runtime';
3
18
  import { FluidDataStoreRuntime } from '@fluidframework/datastore';
@@ -8,7 +23,9 @@ import { IContainerContext } from '@fluidframework/container-definitions';
8
23
  import { IContainerRuntime } from '@fluidframework/container-runtime-definitions';
9
24
  import { IContainerRuntimeBase } from '@fluidframework/runtime-definitions';
10
25
  import { IContainerRuntimeOptions } from '@fluidframework/container-runtime';
26
+ import { IDataStore } from '@fluidframework/runtime-definitions';
11
27
  import { IEvent } from '@fluidframework/core-interfaces';
28
+ import { IFluidDataStoreChannel } from '@fluidframework/runtime-definitions';
12
29
  import { IFluidDataStoreContext } from '@fluidframework/runtime-definitions';
13
30
  import { IFluidDataStoreContextDetached } from '@fluidframework/runtime-definitions';
14
31
  import { IFluidDataStoreFactory } from '@fluidframework/runtime-definitions';
@@ -60,6 +77,10 @@ import { TypedEventEmitter } from '@fluid-internal/client-utils';
60
77
 
61
78
  /* Excluded from this release type: IDataObjectProps */
62
79
 
80
+ /* Excluded from this release type: IDataStore */
81
+
82
+ /* Excluded from this release type: IFluidDataStoreChannel */
83
+
63
84
  /* Excluded from this release type: IFluidDataStoreContext */
64
85
 
65
86
  /* Excluded from this release type: IFluidDataStoreContextDetached */
@@ -1,3 +1,18 @@
1
+ /**
2
+ * The `aqueduct` package is a library for building Fluid objects and Fluid
3
+ * containers within the Fluid Framework. Its goal is to provide a thin base
4
+ * layer over the existing Fluid Framework interfaces that allows developers to
5
+ * get started quickly.
6
+ *
7
+ * @remarks
8
+ * About the library name: An "aqueduct" is a way to transport water from a source
9
+ * to another location. The library name was chosen because its purpose is to
10
+ * facilitate using lower level constructs and therefore handle 'fluid' items
11
+ * same as an aqueduct.
12
+ *
13
+ * @packageDocumentation
14
+ */
15
+
1
16
  import { AsyncFluidObjectProvider } from '@fluidframework/synthesize';
2
17
  import { ContainerRuntime } from '@fluidframework/container-runtime';
3
18
  import { FluidDataStoreRuntime } from '@fluidframework/datastore';
@@ -8,7 +23,9 @@ import { IContainerContext } from '@fluidframework/container-definitions';
8
23
  import { IContainerRuntime } from '@fluidframework/container-runtime-definitions';
9
24
  import { IContainerRuntimeBase } from '@fluidframework/runtime-definitions';
10
25
  import { IContainerRuntimeOptions } from '@fluidframework/container-runtime';
26
+ import { IDataStore } from '@fluidframework/runtime-definitions';
11
27
  import { IEvent } from '@fluidframework/core-interfaces';
28
+ import { IFluidDataStoreChannel } from '@fluidframework/runtime-definitions';
12
29
  import { IFluidDataStoreContext } from '@fluidframework/runtime-definitions';
13
30
  import { IFluidDataStoreContextDetached } from '@fluidframework/runtime-definitions';
14
31
  import { IFluidDataStoreFactory } from '@fluidframework/runtime-definitions';
@@ -60,6 +77,10 @@ import { TypedEventEmitter } from '@fluid-internal/client-utils';
60
77
 
61
78
  /* Excluded from this release type: IDataObjectProps */
62
79
 
80
+ /* Excluded from this release type: IDataStore */
81
+
82
+ /* Excluded from this release type: IFluidDataStoreChannel */
83
+
63
84
  /* Excluded from this release type: IFluidDataStoreContext */
64
85
 
65
86
  /* Excluded from this release type: IFluidDataStoreContextDetached */
@@ -1,3 +1,18 @@
1
+ /**
2
+ * The `aqueduct` package is a library for building Fluid objects and Fluid
3
+ * containers within the Fluid Framework. Its goal is to provide a thin base
4
+ * layer over the existing Fluid Framework interfaces that allows developers to
5
+ * get started quickly.
6
+ *
7
+ * @remarks
8
+ * About the library name: An "aqueduct" is a way to transport water from a source
9
+ * to another location. The library name was chosen because its purpose is to
10
+ * facilitate using lower level constructs and therefore handle 'fluid' items
11
+ * same as an aqueduct.
12
+ *
13
+ * @packageDocumentation
14
+ */
15
+
1
16
  import { AsyncFluidObjectProvider } from '@fluidframework/synthesize';
2
17
  import { ContainerRuntime } from '@fluidframework/container-runtime';
3
18
  import { FluidDataStoreRuntime } from '@fluidframework/datastore';
@@ -8,7 +23,9 @@ import { IContainerContext } from '@fluidframework/container-definitions';
8
23
  import { IContainerRuntime } from '@fluidframework/container-runtime-definitions';
9
24
  import { IContainerRuntimeBase } from '@fluidframework/runtime-definitions';
10
25
  import { IContainerRuntimeOptions } from '@fluidframework/container-runtime';
26
+ import { IDataStore } from '@fluidframework/runtime-definitions';
11
27
  import { IEvent } from '@fluidframework/core-interfaces';
28
+ import { IFluidDataStoreChannel } from '@fluidframework/runtime-definitions';
12
29
  import { IFluidDataStoreContext } from '@fluidframework/runtime-definitions';
13
30
  import { IFluidDataStoreContextDetached } from '@fluidframework/runtime-definitions';
14
31
  import { IFluidDataStoreFactory } from '@fluidframework/runtime-definitions';
@@ -180,7 +197,7 @@ export declare abstract class DataObject<I extends DataObjectTypes = DataObjectT
180
197
  * @alpha
181
198
  */
182
199
  export declare class DataObjectFactory<TObj extends DataObject<I>, I extends DataObjectTypes = DataObjectTypes> extends PureDataObjectFactory<TObj, I> {
183
- constructor(type: string, ctor: new (props: IDataObjectProps<I>) => TObj, sharedObjects: readonly IChannelFactory[] | undefined, optionalProviders: FluidObjectSymbolProvider<I["OptionalProviders"]>, registryEntries?: NamedFluidDataStoreRegistryEntries, runtimeFactory?: typeof FluidDataStoreRuntime);
200
+ constructor(type: string, ctor: new (props: IDataObjectProps<I>) => TObj, sharedObjects: readonly IChannelFactory<IFluidLoadable>[] | undefined, optionalProviders: FluidObjectSymbolProvider<I["OptionalProviders"]>, registryEntries?: NamedFluidDataStoreRegistryEntries, runtimeFactory?: typeof FluidDataStoreRuntime);
184
201
  }
185
202
 
186
203
  /**
@@ -312,13 +329,20 @@ export declare abstract class PureDataObject<I extends DataObjectTypes = DataObj
312
329
  * @alpha
313
330
  */
314
331
  export declare class PureDataObjectFactory<TObj extends PureDataObject<I>, I extends DataObjectTypes = DataObjectTypes> implements IFluidDataStoreFactory, Partial<IProvideFluidDataStoreRegistry> {
332
+ /**
333
+ * {@inheritDoc @fluidframework/runtime-definitions#IFluidDataStoreFactory."type"}
334
+ */
315
335
  readonly type: string;
316
336
  private readonly ctor;
317
337
  private readonly optionalProviders;
318
338
  private readonly runtimeClass;
319
339
  private readonly sharedObjectRegistry;
320
340
  private readonly registry;
321
- constructor(type: string, ctor: new (props: IDataObjectProps<I>) => TObj, sharedObjects: readonly IChannelFactory[], optionalProviders: FluidObjectSymbolProvider<I["OptionalProviders"]>, registryEntries?: NamedFluidDataStoreRegistryEntries, runtimeClass?: typeof FluidDataStoreRuntime);
341
+ constructor(
342
+ /**
343
+ * {@inheritDoc @fluidframework/runtime-definitions#IFluidDataStoreFactory."type"}
344
+ */
345
+ type: string, ctor: new (props: IDataObjectProps<I>) => TObj, sharedObjects: readonly IChannelFactory[], optionalProviders: FluidObjectSymbolProvider<I["OptionalProviders"]>, registryEntries?: NamedFluidDataStoreRegistryEntries, runtimeClass?: typeof FluidDataStoreRuntime);
322
346
  /**
323
347
  * {@inheritDoc @fluidframework/runtime-definitions#IProvideFluidDataStoreFactory.IFluidDataStoreFactory}
324
348
  */
@@ -335,11 +359,9 @@ export declare class PureDataObjectFactory<TObj extends PureDataObject<I>, I ext
335
359
  */
336
360
  get registryEntry(): NamedFluidDataStoreRegistryEntry;
337
361
  /**
338
- * This is where we do data store setup.
339
- *
340
- * @param context - data store context used to load a data store runtime
362
+ * {@inheritDoc @fluidframework/runtime-definitions#IFluidDataStoreFactory.instantiateDataStore}
341
363
  */
342
- instantiateDataStore(context: IFluidDataStoreContext, existing: boolean): Promise<FluidDataStoreRuntime>;
364
+ instantiateDataStore(context: IFluidDataStoreContext, existing: boolean): Promise<IFluidDataStoreChannel>;
343
365
  /**
344
366
  * Creates a new instance of the object. Uses parent context's registry to build package path to this factory.
345
367
  * In other words, registry of context passed in has to contain this factory, with the name that matches
@@ -348,10 +370,11 @@ export declare class PureDataObjectFactory<TObj extends PureDataObject<I>, I ext
348
370
  * @param context - The context being used to create the runtime
349
371
  * (the created object will have its own new context created as well)
350
372
  * @param initialState - The initial state to provide to the created data store.
373
+ * @param loadingGroupId - NOT production ready, EXPERIMENTAL, please read {@link https://github.com/microsoft/FluidFramework/blob/main/packages/runtime/container-runtime/README.md | README}. The service needs to support this feature, does not work for most services
351
374
  * @returns an object created by this factory. Data store and objects created are not attached to container.
352
375
  * They get attached only when a handle to one of them is attached to already attached objects.
353
376
  */
354
- createChildInstance(parentContext: IFluidDataStoreContext, initialState?: I["InitialState"]): Promise<TObj>;
377
+ createChildInstance(parentContext: IFluidDataStoreContext, initialState?: I["InitialState"], loadingGroupId?: string): Promise<TObj>;
355
378
  /**
356
379
  * Creates a new instance of the object. Uses peer context's registry and its package path to identify this factory.
357
380
  * In other words, registry of context passed in has to have this factory.
@@ -359,10 +382,11 @@ export declare class PureDataObjectFactory<TObj extends PureDataObject<I>, I ext
359
382
  * @param context - The component context being used to create the object
360
383
  * (the created object will have its own new context created as well)
361
384
  * @param initialState - The initial state to provide to the created component.
385
+ * @param loadingGroupId - NOT production ready, EXPERIMENTAL, please read {@link https://github.com/microsoft/FluidFramework/blob/main/packages/runtime/container-runtime/README.md | README}. The service needs to support this feature, does not work for most services
362
386
  * @returns an object created by this factory. Data store and objects created are not attached to container.
363
387
  * They get attached only when a handle to one of them is attached to already attached objects.
364
388
  */
365
- createPeerInstance(peerContext: IFluidDataStoreContext, initialState?: I["InitialState"]): Promise<TObj>;
389
+ createPeerInstance(peerContext: IFluidDataStoreContext, initialState?: I["InitialState"], loadingGroupId?: string): Promise<TObj>;
366
390
  /**
367
391
  * Creates a new instance of the object. Uses container's registry to find this factory.
368
392
  * It's expected that only container owners would use this functionality, as only such developers
@@ -370,10 +394,24 @@ export declare class PureDataObjectFactory<TObj extends PureDataObject<I>, I ext
370
394
  * The name in this registry for such record should match type of this factory.
371
395
  * @param runtime - container runtime. It's registry is used to create an object.
372
396
  * @param initialState - The initial state to provide to the created component.
397
+ * @param loadingGroupId - NOT production ready, EXPERIMENTAL, please read {@link https://github.com/microsoft/FluidFramework/blob/main/packages/runtime/container-runtime/README.md | README}. The service needs to support this feature, does not work for most services
373
398
  * @returns an object created by this factory. Data store and objects created are not attached to container.
374
399
  * They get attached only when a handle to one of them is attached to already attached objects.
375
400
  */
376
- createInstance(runtime: IContainerRuntimeBase, initialState?: I["InitialState"]): Promise<TObj>;
401
+ createInstance(runtime: IContainerRuntimeBase, initialState?: I["InitialState"], loadingGroupId?: string): Promise<TObj>;
402
+ /**
403
+ * Creates a new instance of the object with a datastore which exposes the aliasing api.
404
+ * @param runtime - container runtime. It is the runtime that will be used to create the object. It will produce
405
+ * the underlying infrastructure to get the data object to operate.
406
+ * @param initialState - The initial state to provide to the created component.
407
+ * @param packagePath - The path to the data store factory to use to create the data object.
408
+ * @param loadingGroupId - NOT production ready, EXPERIMENTAL, please read {@link https://github.com/microsoft/FluidFramework/blob/main/packages/runtime/container-runtime/README.md | README}. The service needs to support this feature, does not work for most services
409
+ * @returns an array containing the object created by this factory and an IDataStore object that enables users to
410
+ * alias the data object.
411
+ * The data object is attached only when it is attached to the handle graph that connects to an aliased object or
412
+ * when the data object is aliased.
413
+ */
414
+ createInstanceWithDataStore(containerRuntime: IContainerRuntimeBase, initialState?: I["InitialState"], packagePath?: Readonly<string[]>, loadingGroupId?: string): Promise<[TObj, IDataStore]>;
377
415
  /**
378
416
  * Creates a new root instance of the object. Uses container's registry to find this factory.
379
417
  * It's expected that only container owners would use this functionality, as only such developers
@@ -383,9 +421,12 @@ export declare class PureDataObjectFactory<TObj extends PureDataObject<I>, I ext
383
421
  * @param initialState - The initial state to provide to the created component.
384
422
  * @returns an object created by this factory. Data store and objects created are not attached to container.
385
423
  * They get attached only when a handle to one of them is attached to already attached objects.
424
+ *
425
+ * @deprecated - the issue is that it does not allow the customer to decide the conflict resolution policy when an
426
+ * aliasing conflict occurs. Use {@link PureDataObjectFactory.createInstanceWithDataStore} instead.
386
427
  */
387
428
  createRootInstance(rootDataStoreId: string, runtime: IContainerRuntime, initialState?: I["InitialState"]): Promise<TObj>;
388
- protected createNonRootInstanceCore(containerRuntime: IContainerRuntimeBase, packagePath: Readonly<string[]>, initialState?: I["InitialState"]): Promise<TObj>;
429
+ protected createNonRootInstanceCore(containerRuntime: IContainerRuntimeBase, packagePath: Readonly<string[]>, initialState?: I["InitialState"], loadingGroupId?: string): Promise<TObj>;
389
430
  protected createInstanceCore(context: IFluidDataStoreContextDetached, initialState?: I["InitialState"]): Promise<TObj>;
390
431
  }
391
432
 
@@ -72,4 +72,4 @@ export declare class BaseContainerRuntimeFactory extends RuntimeFactoryHelper im
72
72
  */
73
73
  protected containerHasInitialized(runtime: IContainerRuntime): Promise<void>;
74
74
  }
75
- //# sourceMappingURL=baseContainerRuntimeFactory.d.mts.map
75
+ //# sourceMappingURL=baseContainerRuntimeFactory.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"baseContainerRuntimeFactory.d.ts","sourceRoot":"","sources":["../../src/container-runtime-factories/baseContainerRuntimeFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,uCAAuC,CAAC;AAC/E,OAAO,EACN,KAAK,wBAAwB,EAE7B,gBAAgB,EAChB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;AAEvF,OAAO,EACN,KAAK,qBAAqB,EAE1B,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACN,KAAK,uBAAuB,EAC5B,KAAK,8BAA8B,EACnC,KAAK,kCAAkC,EACvC,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAEN,KAAK,2BAA2B,EAEhC,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAEnE;;;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,6 +3,7 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
  import { FluidDataStoreRegistry, ContainerRuntime, } from "@fluidframework/container-runtime";
6
+ // eslint-disable-next-line import/no-deprecated
6
7
  import { buildRuntimeRequestHandler, } from "@fluidframework/request-handler";
7
8
  import { DependencyContainer, } from "@fluidframework/synthesize";
8
9
  import { RuntimeFactoryHelper } from "@fluidframework/runtime-utils";
@@ -65,4 +66,4 @@ export class BaseContainerRuntimeFactory extends RuntimeFactoryHelper {
65
66
  */
66
67
  async containerHasInitialized(runtime) { }
67
68
  }
68
- //# sourceMappingURL=baseContainerRuntimeFactory.mjs.map
69
+ //# sourceMappingURL=baseContainerRuntimeFactory.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"baseContainerRuntimeFactory.js","sourceRoot":"","sources":["../../src/container-runtime-factories/baseContainerRuntimeFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAEN,sBAAsB,EACtB,gBAAgB,GAChB,MAAM,mCAAmC,CAAC;AAE3C,gDAAgD;AAChD,OAAO,EAEN,0BAA0B,GAC1B,MAAM,iCAAiC,CAAC;AAMzC,OAAO,EACN,mBAAmB,GAGnB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAgCrE;;;;;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"]}
@@ -8,7 +8,7 @@ import { type IContainerRuntime } from "@fluidframework/container-runtime-defini
8
8
  import { type FluidObject } from "@fluidframework/core-interfaces";
9
9
  import { type IFluidDependencySynthesizer } from "@fluidframework/synthesize";
10
10
  import { type RuntimeRequestHandler } from "@fluidframework/request-handler";
11
- import { BaseContainerRuntimeFactory } from "./baseContainerRuntimeFactory.mjs";
11
+ import { BaseContainerRuntimeFactory } from "./baseContainerRuntimeFactory.js";
12
12
  /**
13
13
  * {@link ContainerRuntimeFactoryWithDefaultDataStore} construction properties.
14
14
  * @alpha
@@ -54,4 +54,4 @@ export declare class ContainerRuntimeFactoryWithDefaultDataStore extends BaseCon
54
54
  */
55
55
  protected containerInitializingFirstTime(runtime: IContainerRuntime): Promise<void>;
56
56
  }
57
- //# sourceMappingURL=containerRuntimeFactoryWithDefaultDataStore.d.mts.map
57
+ //# sourceMappingURL=containerRuntimeFactoryWithDefaultDataStore.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"containerRuntimeFactoryWithDefaultDataStore.d.ts","sourceRoot":"","sources":["../../src/container-runtime-factories/containerRuntimeFactoryWithDefaultDataStore.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,KAAK,wBAAwB,EAE7B,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EACN,KAAK,kCAAkC,EACvC,KAAK,sBAAsB,EAC3B,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;AACvF,OAAO,EAAE,KAAK,WAAW,EAAiC,MAAM,iCAAiC,CAAC;AAElG,OAAO,EAAE,KAAK,2BAA2B,EAAE,MAAM,4BAA4B,CAAC;AAC9E,OAAO,EAAE,KAAK,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AAC7E,OAAO,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAC;AAY/E;;;GAGG;AACH,MAAM,WAAW,gDAAgD;IAChE,cAAc,EAAE,sBAAsB,CAAC;IACvC;;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,CAAC,EAAE,CAAC,OAAO,EAAE,iBAAiB,KAAK,OAAO,CAAC,WAAW,CAAC,CAAC;CACzE;AAED;;;;;;GAMG;AACH,qBAAa,2CAA4C,SAAQ,2BAA2B;IAC3F,gBAAuB,kBAAkB,aAAsB;IAE/D,SAAS,CAAC,QAAQ,CAAC,cAAc,EAAE,sBAAsB,CAAC;gBAEvC,KAAK,EAAE,gDAAgD;IA6B1E;;OAEG;cACa,8BAA8B,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC;CAIzF"}
@@ -3,7 +3,7 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
  import { RequestParser } from "@fluidframework/runtime-utils";
6
- import { BaseContainerRuntimeFactory } from "./baseContainerRuntimeFactory.mjs";
6
+ import { BaseContainerRuntimeFactory } from "./baseContainerRuntimeFactory.js";
7
7
  const defaultDataStoreId = "default";
8
8
  async function getDefaultFluidObject(runtime) {
9
9
  const entryPoint = await runtime.getAliasedDataStoreEntryPoint("default");
@@ -50,4 +50,4 @@ export class ContainerRuntimeFactoryWithDefaultDataStore extends BaseContainerRu
50
50
  }
51
51
  }
52
52
  ContainerRuntimeFactoryWithDefaultDataStore.defaultDataStoreId = defaultDataStoreId;
53
- //# sourceMappingURL=containerRuntimeFactoryWithDefaultDataStore.mjs.map
53
+ //# sourceMappingURL=containerRuntimeFactoryWithDefaultDataStore.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"containerRuntimeFactoryWithDefaultDataStore.js","sourceRoot":"","sources":["../../src/container-runtime-factories/containerRuntimeFactoryWithDefaultDataStore.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAYH,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAG9D,OAAO,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAC;AAE/E,MAAM,kBAAkB,GAAG,SAAS,CAAC;AAErC,KAAK,UAAU,qBAAqB,CAAC,OAA0B;IAC9D,MAAM,UAAU,GAAG,MAAM,OAAO,CAAC,6BAA6B,CAAC,SAAS,CAAC,CAAC;IAC1E,IAAI,UAAU,KAAK,SAAS,EAAE;QAC7B,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;KAChD;IACD,OAAO,UAAU,CAAC,GAAG,EAAE,CAAC;AACzB,CAAC;AAgCD;;;;;;GAMG;AACH,MAAM,OAAO,2CAA4C,SAAQ,2BAA2B;IAK3F,YAAmB,KAAuD;QACzE,MAAM,eAAe,GAAG,KAAK,CAAC,eAAe,IAAI,EAAE,CAAC;QACpD,MAAM,iBAAiB,GAAG,KAAK,CAAC,iBAAiB,IAAI,qBAAqB,CAAC;QAE3E,MAAM,gBAAgB,GAAG,KAAK,EAC7B,OAAiB,EACjB,OAA0B,EAEO,EAAE;YACnC,MAAM,MAAM,GAAG,aAAa,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;YAC7C,IAAI,MAAM,CAAC,SAAS,CAAC,MAAM,KAAK,CAAC,EAAE;gBAClC,gFAAgF;gBAChF,OAAQ,OAA4B,CAAC,aAAa,CAAC;oBAClD,GAAG,EAAE,IAAI,kBAAkB,GAAG,MAAM,CAAC,KAAK,EAAE;oBAC5C,OAAO,EAAE,OAAO,CAAC,OAAO;iBACxB,CAAC,CAAC;aACH;YACD,OAAO,SAAS,CAAC,CAAC,kBAAkB;QACrC,CAAC,CAAC;QAEF,KAAK,CAAC;YACL,GAAG,KAAK;YACR,eAAe,EAAE,CAAC,gBAAgB,EAAE,GAAG,eAAe,CAAC;YACvD,iBAAiB;SACjB,CAAC,CAAC;QAEH,IAAI,CAAC,cAAc,GAAG,KAAK,CAAC,cAAc,CAAC;IAC5C,CAAC;IAED;;OAEG;IACO,KAAK,CAAC,8BAA8B,CAAC,OAA0B;QACxE,MAAM,SAAS,GAAG,MAAM,OAAO,CAAC,eAAe,CAAC,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;QAC1E,MAAM,SAAS,CAAC,WAAW,CAAC,kBAAkB,CAAC,CAAC;IACjD,CAAC;;AAvCsB,8DAAkB,GAAG,kBAAkB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport {\n\ttype IContainerRuntimeOptions,\n\ttype ContainerRuntime,\n} from \"@fluidframework/container-runtime\";\nimport {\n\ttype NamedFluidDataStoreRegistryEntries,\n\ttype IFluidDataStoreFactory,\n} from \"@fluidframework/runtime-definitions\";\nimport { type IContainerRuntime } from \"@fluidframework/container-runtime-definitions\";\nimport { type FluidObject, type IRequest, type IResponse } from \"@fluidframework/core-interfaces\";\nimport { RequestParser } from \"@fluidframework/runtime-utils\";\nimport { type IFluidDependencySynthesizer } from \"@fluidframework/synthesize\";\nimport { type RuntimeRequestHandler } from \"@fluidframework/request-handler\";\nimport { BaseContainerRuntimeFactory } from \"./baseContainerRuntimeFactory.js\";\n\nconst defaultDataStoreId = \"default\";\n\nasync function getDefaultFluidObject(runtime: IContainerRuntime): Promise<FluidObject> {\n\tconst entryPoint = await runtime.getAliasedDataStoreEntryPoint(\"default\");\n\tif (entryPoint === undefined) {\n\t\tthrow new Error(\"default dataStore must exist\");\n\t}\n\treturn entryPoint.get();\n}\n\n/**\n * {@link ContainerRuntimeFactoryWithDefaultDataStore} construction properties.\n * @alpha\n */\nexport interface ContainerRuntimeFactoryWithDefaultDataStoreProps {\n\tdefaultFactory: IFluidDataStoreFactory;\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 * A ContainerRuntimeFactory that initializes Containers with a single default data store, which can be requested from\n * the container with an empty URL.\n *\n * This factory should be exposed as fluidExport off the entry point to your module.\n * @alpha\n */\nexport class ContainerRuntimeFactoryWithDefaultDataStore extends BaseContainerRuntimeFactory {\n\tpublic static readonly defaultDataStoreId = defaultDataStoreId;\n\n\tprotected readonly defaultFactory: IFluidDataStoreFactory;\n\n\tpublic constructor(props: ContainerRuntimeFactoryWithDefaultDataStoreProps) {\n\t\tconst requestHandlers = props.requestHandlers ?? [];\n\t\tconst provideEntryPoint = props.provideEntryPoint ?? getDefaultFluidObject;\n\n\t\tconst getDefaultObject = async (\n\t\t\trequest: IRequest,\n\t\t\truntime: IContainerRuntime,\n\t\t\t// eslint-disable-next-line unicorn/consistent-function-scoping\n\t\t): Promise<IResponse | undefined> => {\n\t\t\tconst parser = RequestParser.create(request);\n\t\t\tif (parser.pathParts.length === 0) {\n\t\t\t\t// This cast is safe as ContainerRuntime.loadRuntime is called in the base class\n\t\t\t\treturn (runtime as ContainerRuntime).resolveHandle({\n\t\t\t\t\turl: `/${defaultDataStoreId}${parser.query}`,\n\t\t\t\t\theaders: request.headers,\n\t\t\t\t});\n\t\t\t}\n\t\t\treturn undefined; // continue search\n\t\t};\n\n\t\tsuper({\n\t\t\t...props,\n\t\t\trequestHandlers: [getDefaultObject, ...requestHandlers],\n\t\t\tprovideEntryPoint,\n\t\t});\n\n\t\tthis.defaultFactory = props.defaultFactory;\n\t}\n\n\t/**\n\t * {@inheritDoc BaseContainerRuntimeFactory.containerInitializingFirstTime}\n\t */\n\tprotected async containerInitializingFirstTime(runtime: IContainerRuntime): Promise<void> {\n\t\tconst dataStore = await runtime.createDataStore(this.defaultFactory.type);\n\t\tawait dataStore.trySetAlias(defaultDataStoreId);\n\t}\n}\n"]}
@@ -2,6 +2,6 @@
2
2
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
3
  * Licensed under the MIT License.
4
4
  */
5
- export { BaseContainerRuntimeFactory, type BaseContainerRuntimeFactoryProps, } from "./baseContainerRuntimeFactory.mjs";
6
- export { ContainerRuntimeFactoryWithDefaultDataStore, type ContainerRuntimeFactoryWithDefaultDataStoreProps, } from "./containerRuntimeFactoryWithDefaultDataStore.mjs";
7
- //# sourceMappingURL=index.d.mts.map
5
+ export { BaseContainerRuntimeFactory, type BaseContainerRuntimeFactoryProps, } from "./baseContainerRuntimeFactory.js";
6
+ export { ContainerRuntimeFactoryWithDefaultDataStore, type ContainerRuntimeFactoryWithDefaultDataStoreProps, } from "./containerRuntimeFactoryWithDefaultDataStore.js";
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/container-runtime-factories/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,2BAA2B,EAC3B,KAAK,gCAAgC,GACrC,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EACN,2CAA2C,EAC3C,KAAK,gDAAgD,GACrD,MAAM,kDAAkD,CAAC"}
@@ -2,6 +2,6 @@
2
2
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
3
  * Licensed under the MIT License.
4
4
  */
5
- export { BaseContainerRuntimeFactory, } from "./baseContainerRuntimeFactory.mjs";
6
- export { ContainerRuntimeFactoryWithDefaultDataStore, } from "./containerRuntimeFactoryWithDefaultDataStore.mjs";
7
- //# sourceMappingURL=index.mjs.map
5
+ export { BaseContainerRuntimeFactory, } from "./baseContainerRuntimeFactory.js";
6
+ export { ContainerRuntimeFactoryWithDefaultDataStore, } from "./containerRuntimeFactoryWithDefaultDataStore.js";
7
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/container-runtime-factories/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,2BAA2B,GAE3B,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EACN,2CAA2C,GAE3C,MAAM,kDAAkD,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport {\n\tBaseContainerRuntimeFactory,\n\ttype BaseContainerRuntimeFactoryProps,\n} from \"./baseContainerRuntimeFactory.js\";\nexport {\n\tContainerRuntimeFactoryWithDefaultDataStore,\n\ttype ContainerRuntimeFactoryWithDefaultDataStoreProps,\n} from \"./containerRuntimeFactoryWithDefaultDataStore.js\";\n"]}
@@ -6,8 +6,8 @@ import { type NamedFluidDataStoreRegistryEntries } from "@fluidframework/runtime
6
6
  import { type IChannelFactory } from "@fluidframework/datastore-definitions";
7
7
  import { type FluidObjectSymbolProvider } from "@fluidframework/synthesize";
8
8
  import { FluidDataStoreRuntime } from "@fluidframework/datastore";
9
- import { type DataObject, type DataObjectTypes, type IDataObjectProps } from "../data-objects/index.mjs";
10
- import { PureDataObjectFactory } from "./pureDataObjectFactory.mjs";
9
+ import { type DataObject, type DataObjectTypes, type IDataObjectProps } from "../data-objects/index.js";
10
+ import { PureDataObjectFactory } from "./pureDataObjectFactory.js";
11
11
  /**
12
12
  * DataObjectFactory is the IFluidDataStoreFactory for use with DataObjects.
13
13
  * It facilitates DataObject's features (such as its shared directory) by
@@ -18,6 +18,6 @@ import { PureDataObjectFactory } from "./pureDataObjectFactory.mjs";
18
18
  * @alpha
19
19
  */
20
20
  export declare class DataObjectFactory<TObj extends DataObject<I>, I extends DataObjectTypes = DataObjectTypes> extends PureDataObjectFactory<TObj, I> {
21
- constructor(type: string, ctor: new (props: IDataObjectProps<I>) => TObj, sharedObjects: readonly IChannelFactory[] | undefined, optionalProviders: FluidObjectSymbolProvider<I["OptionalProviders"]>, registryEntries?: NamedFluidDataStoreRegistryEntries, runtimeFactory?: typeof FluidDataStoreRuntime);
21
+ constructor(type: string, ctor: new (props: IDataObjectProps<I>) => TObj, sharedObjects: readonly IChannelFactory<import("@fluidframework/core-interfaces").IFluidLoadable>[] | undefined, optionalProviders: FluidObjectSymbolProvider<I["OptionalProviders"]>, registryEntries?: NamedFluidDataStoreRegistryEntries, runtimeFactory?: typeof FluidDataStoreRuntime);
22
22
  }
23
- //# sourceMappingURL=dataObjectFactory.d.mts.map
23
+ //# sourceMappingURL=dataObjectFactory.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dataObjectFactory.d.ts","sourceRoot":"","sources":["../../src/data-object-factories/dataObjectFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,KAAK,kCAAkC,EAAE,MAAM,qCAAqC,CAAC;AAC9F,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,uCAAuC,CAAC;AAC7E,OAAO,EAAE,KAAK,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AAC5E,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAElE,OAAO,EACN,KAAK,UAAU,EACf,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAEnE;;;;;;;;GAQG;AACH,qBAAa,iBAAiB,CAC7B,IAAI,SAAS,UAAU,CAAC,CAAC,CAAC,EAC1B,CAAC,SAAS,eAAe,GAAG,eAAe,CAC1C,SAAQ,qBAAqB,CAAC,IAAI,EAAE,CAAC,CAAC;gBAEtC,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,KAAK,KAAK,EAAE,gBAAgB,CAAC,CAAC,CAAC,KAAK,IAAI,EAC9C,aAAa,kGAAiC,EAC9C,iBAAiB,EAAE,yBAAyB,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,EACpE,eAAe,CAAC,EAAE,kCAAkC,EACpD,cAAc,GAAE,OAAO,qBAA6C;CAiBrE"}
@@ -4,7 +4,7 @@
4
4
  */
5
5
  import { DirectoryFactory, MapFactory, SharedDirectory, SharedMap } from "@fluidframework/map";
6
6
  import { FluidDataStoreRuntime } from "@fluidframework/datastore";
7
- import { PureDataObjectFactory } from "./pureDataObjectFactory.mjs";
7
+ import { PureDataObjectFactory } from "./pureDataObjectFactory.js";
8
8
  /**
9
9
  * DataObjectFactory is the IFluidDataStoreFactory for use with DataObjects.
10
10
  * It facilitates DataObject's features (such as its shared directory) by
@@ -29,4 +29,4 @@ export class DataObjectFactory extends PureDataObjectFactory {
29
29
  super(type, ctor, mergedObjects, optionalProviders, registryEntries, runtimeFactory);
30
30
  }
31
31
  }
32
- //# sourceMappingURL=dataObjectFactory.mjs.map
32
+ //# sourceMappingURL=dataObjectFactory.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dataObjectFactory.js","sourceRoot":"","sources":["../../src/data-object-factories/dataObjectFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAI/F,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAOlE,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAEnE;;;;;;;;GAQG;AACH,MAAM,OAAO,iBAGX,SAAQ,qBAA8B;IACvC,YACC,IAAY,EACZ,IAA8C,EAC9C,gBAA4C,EAAE,EAC9C,iBAAoE,EACpE,eAAoD,EACpD,iBAA+C,qBAAqB;QAEpE,MAAM,aAAa,GAAG,CAAC,GAAG,aAAa,CAAC,CAAC;QAEzC,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,KAAK,gBAAgB,CAAC,IAAI,CAAC,EAAE;YAC7E,sCAAsC;YACtC,aAAa,CAAC,IAAI,CAAC,eAAe,CAAC,UAAU,EAAE,CAAC,CAAC;SACjD;QAED,0GAA0G;QAC1G,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,KAAK,UAAU,CAAC,IAAI,CAAC,EAAE;YACvE,gCAAgC;YAChC,aAAa,CAAC,IAAI,CAAC,SAAS,CAAC,UAAU,EAAE,CAAC,CAAC;SAC3C;QAED,KAAK,CAAC,IAAI,EAAE,IAAI,EAAE,aAAa,EAAE,iBAAiB,EAAE,eAAe,EAAE,cAAc,CAAC,CAAC;IACtF,CAAC;CACD","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { DirectoryFactory, MapFactory, SharedDirectory, SharedMap } from \"@fluidframework/map\";\nimport { type NamedFluidDataStoreRegistryEntries } from \"@fluidframework/runtime-definitions\";\nimport { type IChannelFactory } from \"@fluidframework/datastore-definitions\";\nimport { type FluidObjectSymbolProvider } from \"@fluidframework/synthesize\";\nimport { FluidDataStoreRuntime } from \"@fluidframework/datastore\";\n\nimport {\n\ttype DataObject,\n\ttype DataObjectTypes,\n\ttype IDataObjectProps,\n} from \"../data-objects/index.js\";\nimport { PureDataObjectFactory } from \"./pureDataObjectFactory.js\";\n\n/**\n * DataObjectFactory is the IFluidDataStoreFactory for use with DataObjects.\n * It facilitates DataObject's features (such as its shared directory) by\n * ensuring relevant shared objects etc are available to the factory.\n *\n * @typeParam TObj - DataObject (concrete type)\n * @typeParam I - The input types for the DataObject\n * @alpha\n */\nexport class DataObjectFactory<\n\tTObj extends DataObject<I>,\n\tI extends DataObjectTypes = DataObjectTypes,\n> extends PureDataObjectFactory<TObj, I> {\n\tpublic constructor(\n\t\ttype: string,\n\t\tctor: new (props: IDataObjectProps<I>) => TObj,\n\t\tsharedObjects: readonly IChannelFactory[] = [],\n\t\toptionalProviders: FluidObjectSymbolProvider<I[\"OptionalProviders\"]>,\n\t\tregistryEntries?: NamedFluidDataStoreRegistryEntries,\n\t\truntimeFactory: typeof FluidDataStoreRuntime = FluidDataStoreRuntime,\n\t) {\n\t\tconst mergedObjects = [...sharedObjects];\n\n\t\tif (!sharedObjects.some((factory) => factory.type === DirectoryFactory.Type)) {\n\t\t\t// User did not register for directory\n\t\t\tmergedObjects.push(SharedDirectory.getFactory());\n\t\t}\n\n\t\t// TODO: Remove SharedMap factory when compatibility with SharedMap DataObject is no longer needed in 0.10\n\t\tif (!sharedObjects.some((factory) => factory.type === MapFactory.Type)) {\n\t\t\t// User did not register for map\n\t\t\tmergedObjects.push(SharedMap.getFactory());\n\t\t}\n\n\t\tsuper(type, ctor, mergedObjects, optionalProviders, registryEntries, runtimeFactory);\n\t}\n}\n"]}
@@ -0,0 +1,7 @@
1
+ /*!
2
+ * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
+ * Licensed under the MIT License.
4
+ */
5
+ export { DataObjectFactory } from "./dataObjectFactory.js";
6
+ export { PureDataObjectFactory } from "./pureDataObjectFactory.js";
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/data-object-factories/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC"}
@@ -0,0 +1,7 @@
1
+ /*!
2
+ * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
+ * Licensed under the MIT License.
4
+ */
5
+ export { DataObjectFactory } from "./dataObjectFactory.js";
6
+ export { PureDataObjectFactory } from "./pureDataObjectFactory.js";
7
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/data-object-factories/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport { DataObjectFactory } from \"./dataObjectFactory.js\";\nexport { PureDataObjectFactory } from \"./pureDataObjectFactory.js\";\n"]}