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

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
@@ -23,7 +23,9 @@ import { IContainerContext } from '@fluidframework/container-definitions';
23
23
  import { IContainerRuntime } from '@fluidframework/container-runtime-definitions';
24
24
  import { IContainerRuntimeBase } from '@fluidframework/runtime-definitions';
25
25
  import { IContainerRuntimeOptions } from '@fluidframework/container-runtime';
26
+ import { IDataStore } from '@fluidframework/runtime-definitions';
26
27
  import { IEvent } from '@fluidframework/core-interfaces';
28
+ import { IFluidDataStoreChannel } from '@fluidframework/runtime-definitions';
27
29
  import { IFluidDataStoreContext } from '@fluidframework/runtime-definitions';
28
30
  import { IFluidDataStoreContextDetached } from '@fluidframework/runtime-definitions';
29
31
  import { IFluidDataStoreFactory } from '@fluidframework/runtime-definitions';
@@ -195,7 +197,7 @@ export declare abstract class DataObject<I extends DataObjectTypes = DataObjectT
195
197
  * @alpha
196
198
  */
197
199
  export declare class DataObjectFactory<TObj extends DataObject<I>, I extends DataObjectTypes = DataObjectTypes> extends PureDataObjectFactory<TObj, I> {
198
- 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);
199
201
  }
200
202
 
201
203
  /**
@@ -327,13 +329,20 @@ export declare abstract class PureDataObject<I extends DataObjectTypes = DataObj
327
329
  * @alpha
328
330
  */
329
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
+ */
330
335
  readonly type: string;
331
336
  private readonly ctor;
332
337
  private readonly optionalProviders;
333
338
  private readonly runtimeClass;
334
339
  private readonly sharedObjectRegistry;
335
340
  private readonly registry;
336
- 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);
337
346
  /**
338
347
  * {@inheritDoc @fluidframework/runtime-definitions#IProvideFluidDataStoreFactory.IFluidDataStoreFactory}
339
348
  */
@@ -350,11 +359,9 @@ export declare class PureDataObjectFactory<TObj extends PureDataObject<I>, I ext
350
359
  */
351
360
  get registryEntry(): NamedFluidDataStoreRegistryEntry;
352
361
  /**
353
- * This is where we do data store setup.
354
- *
355
- * @param context - data store context used to load a data store runtime
362
+ * {@inheritDoc @fluidframework/runtime-definitions#IFluidDataStoreFactory.instantiateDataStore}
356
363
  */
357
- instantiateDataStore(context: IFluidDataStoreContext, existing: boolean): Promise<FluidDataStoreRuntime>;
364
+ instantiateDataStore(context: IFluidDataStoreContext, existing: boolean): Promise<IFluidDataStoreChannel>;
358
365
  /**
359
366
  * Creates a new instance of the object. Uses parent context's registry to build package path to this factory.
360
367
  * In other words, registry of context passed in has to contain this factory, with the name that matches
@@ -363,10 +370,11 @@ export declare class PureDataObjectFactory<TObj extends PureDataObject<I>, I ext
363
370
  * @param context - The context being used to create the runtime
364
371
  * (the created object will have its own new context created as well)
365
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
366
374
  * @returns an object created by this factory. Data store and objects created are not attached to container.
367
375
  * They get attached only when a handle to one of them is attached to already attached objects.
368
376
  */
369
- createChildInstance(parentContext: IFluidDataStoreContext, initialState?: I["InitialState"]): Promise<TObj>;
377
+ createChildInstance(parentContext: IFluidDataStoreContext, initialState?: I["InitialState"], loadingGroupId?: string): Promise<TObj>;
370
378
  /**
371
379
  * Creates a new instance of the object. Uses peer context's registry and its package path to identify this factory.
372
380
  * In other words, registry of context passed in has to have this factory.
@@ -374,10 +382,11 @@ export declare class PureDataObjectFactory<TObj extends PureDataObject<I>, I ext
374
382
  * @param context - The component context being used to create the object
375
383
  * (the created object will have its own new context created as well)
376
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
377
386
  * @returns an object created by this factory. Data store and objects created are not attached to container.
378
387
  * They get attached only when a handle to one of them is attached to already attached objects.
379
388
  */
380
- createPeerInstance(peerContext: IFluidDataStoreContext, initialState?: I["InitialState"]): Promise<TObj>;
389
+ createPeerInstance(peerContext: IFluidDataStoreContext, initialState?: I["InitialState"], loadingGroupId?: string): Promise<TObj>;
381
390
  /**
382
391
  * Creates a new instance of the object. Uses container's registry to find this factory.
383
392
  * It's expected that only container owners would use this functionality, as only such developers
@@ -385,10 +394,24 @@ export declare class PureDataObjectFactory<TObj extends PureDataObject<I>, I ext
385
394
  * The name in this registry for such record should match type of this factory.
386
395
  * @param runtime - container runtime. It's registry is used to create an object.
387
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
388
398
  * @returns an object created by this factory. Data store and objects created are not attached to container.
389
399
  * They get attached only when a handle to one of them is attached to already attached objects.
390
400
  */
391
- 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]>;
392
415
  /**
393
416
  * Creates a new root instance of the object. Uses container's registry to find this factory.
394
417
  * It's expected that only container owners would use this functionality, as only such developers
@@ -398,9 +421,12 @@ export declare class PureDataObjectFactory<TObj extends PureDataObject<I>, I ext
398
421
  * @param initialState - The initial state to provide to the created component.
399
422
  * @returns an object created by this factory. Data store and objects created are not attached to container.
400
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.
401
427
  */
402
428
  createRootInstance(rootDataStoreId: string, runtime: IContainerRuntime, initialState?: I["InitialState"]): Promise<TObj>;
403
- 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>;
404
430
  protected createInstanceCore(context: IFluidDataStoreContextDetached, initialState?: I["InitialState"]): Promise<TObj>;
405
431
  }
406
432
 
@@ -23,7 +23,9 @@ import { IContainerContext } from '@fluidframework/container-definitions';
23
23
  import { IContainerRuntime } from '@fluidframework/container-runtime-definitions';
24
24
  import { IContainerRuntimeBase } from '@fluidframework/runtime-definitions';
25
25
  import { IContainerRuntimeOptions } from '@fluidframework/container-runtime';
26
+ import { IDataStore } from '@fluidframework/runtime-definitions';
26
27
  import { IEvent } from '@fluidframework/core-interfaces';
28
+ import { IFluidDataStoreChannel } from '@fluidframework/runtime-definitions';
27
29
  import { IFluidDataStoreContext } from '@fluidframework/runtime-definitions';
28
30
  import { IFluidDataStoreContextDetached } from '@fluidframework/runtime-definitions';
29
31
  import { IFluidDataStoreFactory } from '@fluidframework/runtime-definitions';
@@ -75,6 +77,10 @@ import { TypedEventEmitter } from '@fluid-internal/client-utils';
75
77
 
76
78
  /* Excluded from this release type: IDataObjectProps */
77
79
 
80
+ /* Excluded from this release type: IDataStore */
81
+
82
+ /* Excluded from this release type: IFluidDataStoreChannel */
83
+
78
84
  /* Excluded from this release type: IFluidDataStoreContext */
79
85
 
80
86
  /* Excluded from this release type: IFluidDataStoreContextDetached */
@@ -23,7 +23,9 @@ import { IContainerContext } from '@fluidframework/container-definitions';
23
23
  import { IContainerRuntime } from '@fluidframework/container-runtime-definitions';
24
24
  import { IContainerRuntimeBase } from '@fluidframework/runtime-definitions';
25
25
  import { IContainerRuntimeOptions } from '@fluidframework/container-runtime';
26
+ import { IDataStore } from '@fluidframework/runtime-definitions';
26
27
  import { IEvent } from '@fluidframework/core-interfaces';
28
+ import { IFluidDataStoreChannel } from '@fluidframework/runtime-definitions';
27
29
  import { IFluidDataStoreContext } from '@fluidframework/runtime-definitions';
28
30
  import { IFluidDataStoreContextDetached } from '@fluidframework/runtime-definitions';
29
31
  import { IFluidDataStoreFactory } from '@fluidframework/runtime-definitions';
@@ -75,6 +77,10 @@ import { TypedEventEmitter } from '@fluid-internal/client-utils';
75
77
 
76
78
  /* Excluded from this release type: IDataObjectProps */
77
79
 
80
+ /* Excluded from this release type: IDataStore */
81
+
82
+ /* Excluded from this release type: IFluidDataStoreChannel */
83
+
78
84
  /* Excluded from this release type: IFluidDataStoreContext */
79
85
 
80
86
  /* Excluded from this release type: IFluidDataStoreContextDetached */
@@ -23,7 +23,9 @@ import { IContainerContext } from '@fluidframework/container-definitions';
23
23
  import { IContainerRuntime } from '@fluidframework/container-runtime-definitions';
24
24
  import { IContainerRuntimeBase } from '@fluidframework/runtime-definitions';
25
25
  import { IContainerRuntimeOptions } from '@fluidframework/container-runtime';
26
+ import { IDataStore } from '@fluidframework/runtime-definitions';
26
27
  import { IEvent } from '@fluidframework/core-interfaces';
28
+ import { IFluidDataStoreChannel } from '@fluidframework/runtime-definitions';
27
29
  import { IFluidDataStoreContext } from '@fluidframework/runtime-definitions';
28
30
  import { IFluidDataStoreContextDetached } from '@fluidframework/runtime-definitions';
29
31
  import { IFluidDataStoreFactory } from '@fluidframework/runtime-definitions';
@@ -195,7 +197,7 @@ export declare abstract class DataObject<I extends DataObjectTypes = DataObjectT
195
197
  * @alpha
196
198
  */
197
199
  export declare class DataObjectFactory<TObj extends DataObject<I>, I extends DataObjectTypes = DataObjectTypes> extends PureDataObjectFactory<TObj, I> {
198
- 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);
199
201
  }
200
202
 
201
203
  /**
@@ -327,13 +329,20 @@ export declare abstract class PureDataObject<I extends DataObjectTypes = DataObj
327
329
  * @alpha
328
330
  */
329
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
+ */
330
335
  readonly type: string;
331
336
  private readonly ctor;
332
337
  private readonly optionalProviders;
333
338
  private readonly runtimeClass;
334
339
  private readonly sharedObjectRegistry;
335
340
  private readonly registry;
336
- 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);
337
346
  /**
338
347
  * {@inheritDoc @fluidframework/runtime-definitions#IProvideFluidDataStoreFactory.IFluidDataStoreFactory}
339
348
  */
@@ -350,11 +359,9 @@ export declare class PureDataObjectFactory<TObj extends PureDataObject<I>, I ext
350
359
  */
351
360
  get registryEntry(): NamedFluidDataStoreRegistryEntry;
352
361
  /**
353
- * This is where we do data store setup.
354
- *
355
- * @param context - data store context used to load a data store runtime
362
+ * {@inheritDoc @fluidframework/runtime-definitions#IFluidDataStoreFactory.instantiateDataStore}
356
363
  */
357
- instantiateDataStore(context: IFluidDataStoreContext, existing: boolean): Promise<FluidDataStoreRuntime>;
364
+ instantiateDataStore(context: IFluidDataStoreContext, existing: boolean): Promise<IFluidDataStoreChannel>;
358
365
  /**
359
366
  * Creates a new instance of the object. Uses parent context's registry to build package path to this factory.
360
367
  * In other words, registry of context passed in has to contain this factory, with the name that matches
@@ -363,10 +370,11 @@ export declare class PureDataObjectFactory<TObj extends PureDataObject<I>, I ext
363
370
  * @param context - The context being used to create the runtime
364
371
  * (the created object will have its own new context created as well)
365
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
366
374
  * @returns an object created by this factory. Data store and objects created are not attached to container.
367
375
  * They get attached only when a handle to one of them is attached to already attached objects.
368
376
  */
369
- createChildInstance(parentContext: IFluidDataStoreContext, initialState?: I["InitialState"]): Promise<TObj>;
377
+ createChildInstance(parentContext: IFluidDataStoreContext, initialState?: I["InitialState"], loadingGroupId?: string): Promise<TObj>;
370
378
  /**
371
379
  * Creates a new instance of the object. Uses peer context's registry and its package path to identify this factory.
372
380
  * In other words, registry of context passed in has to have this factory.
@@ -374,10 +382,11 @@ export declare class PureDataObjectFactory<TObj extends PureDataObject<I>, I ext
374
382
  * @param context - The component context being used to create the object
375
383
  * (the created object will have its own new context created as well)
376
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
377
386
  * @returns an object created by this factory. Data store and objects created are not attached to container.
378
387
  * They get attached only when a handle to one of them is attached to already attached objects.
379
388
  */
380
- createPeerInstance(peerContext: IFluidDataStoreContext, initialState?: I["InitialState"]): Promise<TObj>;
389
+ createPeerInstance(peerContext: IFluidDataStoreContext, initialState?: I["InitialState"], loadingGroupId?: string): Promise<TObj>;
381
390
  /**
382
391
  * Creates a new instance of the object. Uses container's registry to find this factory.
383
392
  * It's expected that only container owners would use this functionality, as only such developers
@@ -385,10 +394,24 @@ export declare class PureDataObjectFactory<TObj extends PureDataObject<I>, I ext
385
394
  * The name in this registry for such record should match type of this factory.
386
395
  * @param runtime - container runtime. It's registry is used to create an object.
387
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
388
398
  * @returns an object created by this factory. Data store and objects created are not attached to container.
389
399
  * They get attached only when a handle to one of them is attached to already attached objects.
390
400
  */
391
- 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]>;
392
415
  /**
393
416
  * Creates a new root instance of the object. Uses container's registry to find this factory.
394
417
  * It's expected that only container owners would use this functionality, as only such developers
@@ -398,9 +421,12 @@ export declare class PureDataObjectFactory<TObj extends PureDataObject<I>, I ext
398
421
  * @param initialState - The initial state to provide to the created component.
399
422
  * @returns an object created by this factory. Data store and objects created are not attached to container.
400
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.
401
427
  */
402
428
  createRootInstance(rootDataStoreId: string, runtime: IContainerRuntime, initialState?: I["InitialState"]): Promise<TObj>;
403
- 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>;
404
430
  protected createInstanceCore(context: IFluidDataStoreContextDetached, initialState?: I["InitialState"]): Promise<TObj>;
405
431
  }
406
432
 
@@ -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";
11
+ import { BaseContainerRuntimeFactory } from "./baseContainerRuntimeFactory.js";
12
12
  /**
13
13
  * {@link ContainerRuntimeFactoryWithDefaultDataStore} construction properties.
14
14
  * @alpha
@@ -1 +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,+BAA+B,CAAC;AAY5E;;;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"}
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"}
@@ -6,7 +6,7 @@
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
7
  exports.ContainerRuntimeFactoryWithDefaultDataStore = void 0;
8
8
  const runtime_utils_1 = require("@fluidframework/runtime-utils");
9
- const baseContainerRuntimeFactory_1 = require("./baseContainerRuntimeFactory");
9
+ const baseContainerRuntimeFactory_js_1 = require("./baseContainerRuntimeFactory.js");
10
10
  const defaultDataStoreId = "default";
11
11
  async function getDefaultFluidObject(runtime) {
12
12
  const entryPoint = await runtime.getAliasedDataStoreEntryPoint("default");
@@ -22,7 +22,7 @@ async function getDefaultFluidObject(runtime) {
22
22
  * This factory should be exposed as fluidExport off the entry point to your module.
23
23
  * @alpha
24
24
  */
25
- class ContainerRuntimeFactoryWithDefaultDataStore extends baseContainerRuntimeFactory_1.BaseContainerRuntimeFactory {
25
+ class ContainerRuntimeFactoryWithDefaultDataStore extends baseContainerRuntimeFactory_js_1.BaseContainerRuntimeFactory {
26
26
  constructor(props) {
27
27
  const requestHandlers = props.requestHandlers ?? [];
28
28
  const provideEntryPoint = props.provideEntryPoint ?? getDefaultFluidObject;
@@ -1 +1 @@
1
- {"version":3,"file":"containerRuntimeFactoryWithDefaultDataStore.js","sourceRoot":"","sources":["../../src/container-runtime-factories/containerRuntimeFactoryWithDefaultDataStore.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAYH,iEAA8D;AAG9D,+EAA4E;AAE5E,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,MAAa,2CAA4C,SAAQ,yDAA2B;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,6BAAa,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;;AAxCF,kGAyCC;AAxCuB,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\";\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"]}
1
+ {"version":3,"file":"containerRuntimeFactoryWithDefaultDataStore.js","sourceRoot":"","sources":["../../src/container-runtime-factories/containerRuntimeFactoryWithDefaultDataStore.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAYH,iEAA8D;AAG9D,qFAA+E;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,MAAa,2CAA4C,SAAQ,4DAA2B;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,6BAAa,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;;AAxCF,kGAyCC;AAxCuB,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";
6
- export { ContainerRuntimeFactoryWithDefaultDataStore, type ContainerRuntimeFactoryWithDefaultDataStoreProps, } from "./containerRuntimeFactoryWithDefaultDataStore";
5
+ export { BaseContainerRuntimeFactory, type BaseContainerRuntimeFactoryProps, } from "./baseContainerRuntimeFactory.js";
6
+ export { ContainerRuntimeFactoryWithDefaultDataStore, type ContainerRuntimeFactoryWithDefaultDataStoreProps, } from "./containerRuntimeFactoryWithDefaultDataStore.js";
7
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +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,+BAA+B,CAAC;AACvC,OAAO,EACN,2CAA2C,EAC3C,KAAK,gDAAgD,GACrD,MAAM,+CAA+C,CAAC"}
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"}
@@ -5,8 +5,8 @@
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
7
  exports.ContainerRuntimeFactoryWithDefaultDataStore = exports.BaseContainerRuntimeFactory = void 0;
8
- var baseContainerRuntimeFactory_1 = require("./baseContainerRuntimeFactory");
9
- Object.defineProperty(exports, "BaseContainerRuntimeFactory", { enumerable: true, get: function () { return baseContainerRuntimeFactory_1.BaseContainerRuntimeFactory; } });
10
- var containerRuntimeFactoryWithDefaultDataStore_1 = require("./containerRuntimeFactoryWithDefaultDataStore");
11
- Object.defineProperty(exports, "ContainerRuntimeFactoryWithDefaultDataStore", { enumerable: true, get: function () { return containerRuntimeFactoryWithDefaultDataStore_1.ContainerRuntimeFactoryWithDefaultDataStore; } });
8
+ var baseContainerRuntimeFactory_js_1 = require("./baseContainerRuntimeFactory.js");
9
+ Object.defineProperty(exports, "BaseContainerRuntimeFactory", { enumerable: true, get: function () { return baseContainerRuntimeFactory_js_1.BaseContainerRuntimeFactory; } });
10
+ var containerRuntimeFactoryWithDefaultDataStore_js_1 = require("./containerRuntimeFactoryWithDefaultDataStore.js");
11
+ Object.defineProperty(exports, "ContainerRuntimeFactoryWithDefaultDataStore", { enumerable: true, get: function () { return containerRuntimeFactoryWithDefaultDataStore_js_1.ContainerRuntimeFactoryWithDefaultDataStore; } });
12
12
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/container-runtime-factories/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,6EAGuC;AAFtC,0IAAA,2BAA2B,OAAA;AAG5B,6GAGuD;AAFtD,0KAAA,2CAA2C,OAAA","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\";\nexport {\n\tContainerRuntimeFactoryWithDefaultDataStore,\n\ttype ContainerRuntimeFactoryWithDefaultDataStoreProps,\n} from \"./containerRuntimeFactoryWithDefaultDataStore\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/container-runtime-factories/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,mFAG0C;AAFzC,6IAAA,2BAA2B,OAAA;AAG5B,mHAG0D;AAFzD,6KAAA,2CAA2C,OAAA","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";
10
- import { PureDataObjectFactory } from "./pureDataObjectFactory";
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";
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
23
  //# sourceMappingURL=dataObjectFactory.d.ts.map
@@ -1 +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,EAAE,KAAK,UAAU,EAAE,KAAK,eAAe,EAAE,KAAK,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAC/F,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAEhE;;;;;;;;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,wCAAiC,EAC9C,iBAAiB,EAAE,yBAAyB,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,EACpE,eAAe,CAAC,EAAE,kCAAkC,EACpD,cAAc,GAAE,OAAO,qBAA6C;CAiBrE"}
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"}
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
7
7
  exports.DataObjectFactory = void 0;
8
8
  const map_1 = require("@fluidframework/map");
9
9
  const datastore_1 = require("@fluidframework/datastore");
10
- const pureDataObjectFactory_1 = require("./pureDataObjectFactory");
10
+ const pureDataObjectFactory_js_1 = require("./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
@@ -17,7 +17,7 @@ const pureDataObjectFactory_1 = require("./pureDataObjectFactory");
17
17
  * @typeParam I - The input types for the DataObject
18
18
  * @alpha
19
19
  */
20
- class DataObjectFactory extends pureDataObjectFactory_1.PureDataObjectFactory {
20
+ class DataObjectFactory extends pureDataObjectFactory_js_1.PureDataObjectFactory {
21
21
  constructor(type, ctor, sharedObjects = [], optionalProviders, registryEntries, runtimeFactory = datastore_1.FluidDataStoreRuntime) {
22
22
  const mergedObjects = [...sharedObjects];
23
23
  if (!sharedObjects.some((factory) => factory.type === map_1.DirectoryFactory.Type)) {
@@ -1 +1 @@
1
- {"version":3,"file":"dataObjectFactory.js","sourceRoot":"","sources":["../../src/data-object-factories/dataObjectFactory.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,6CAA+F;AAI/F,yDAAkE;AAGlE,mEAAgE;AAEhE;;;;;;;;GAQG;AACH,MAAa,iBAGX,SAAQ,6CAA8B;IACvC,YACC,IAAY,EACZ,IAA8C,EAC9C,gBAA4C,EAAE,EAC9C,iBAAoE,EACpE,eAAoD,EACpD,iBAA+C,iCAAqB;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,sBAAgB,CAAC,IAAI,CAAC,EAAE;YAC7E,sCAAsC;YACtC,aAAa,CAAC,IAAI,CAAC,qBAAe,CAAC,UAAU,EAAE,CAAC,CAAC;SACjD;QAED,0GAA0G;QAC1G,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,KAAK,gBAAU,CAAC,IAAI,CAAC,EAAE;YACvE,gCAAgC;YAChC,aAAa,CAAC,IAAI,CAAC,eAAS,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;AA3BD,8CA2BC","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 { type DataObject, type DataObjectTypes, type IDataObjectProps } from \"../data-objects\";\nimport { PureDataObjectFactory } from \"./pureDataObjectFactory\";\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"]}
1
+ {"version":3,"file":"dataObjectFactory.js","sourceRoot":"","sources":["../../src/data-object-factories/dataObjectFactory.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,6CAA+F;AAI/F,yDAAkE;AAOlE,yEAAmE;AAEnE;;;;;;;;GAQG;AACH,MAAa,iBAGX,SAAQ,gDAA8B;IACvC,YACC,IAAY,EACZ,IAA8C,EAC9C,gBAA4C,EAAE,EAC9C,iBAAoE,EACpE,eAAoD,EACpD,iBAA+C,iCAAqB;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,sBAAgB,CAAC,IAAI,CAAC,EAAE;YAC7E,sCAAsC;YACtC,aAAa,CAAC,IAAI,CAAC,qBAAe,CAAC,UAAU,EAAE,CAAC,CAAC;SACjD;QAED,0GAA0G;QAC1G,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,KAAK,gBAAU,CAAC,IAAI,CAAC,EAAE;YACvE,gCAAgC;YAChC,aAAa,CAAC,IAAI,CAAC,eAAS,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;AA3BD,8CA2BC","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"]}
@@ -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 { DataObjectFactory } from "./dataObjectFactory";
6
- export { PureDataObjectFactory } from "./pureDataObjectFactory";
5
+ export { DataObjectFactory } from "./dataObjectFactory.js";
6
+ export { PureDataObjectFactory } from "./pureDataObjectFactory.js";
7
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +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,qBAAqB,CAAC;AACxD,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC"}
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"}
@@ -5,8 +5,8 @@
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
7
  exports.PureDataObjectFactory = exports.DataObjectFactory = void 0;
8
- var dataObjectFactory_1 = require("./dataObjectFactory");
9
- Object.defineProperty(exports, "DataObjectFactory", { enumerable: true, get: function () { return dataObjectFactory_1.DataObjectFactory; } });
10
- var pureDataObjectFactory_1 = require("./pureDataObjectFactory");
11
- Object.defineProperty(exports, "PureDataObjectFactory", { enumerable: true, get: function () { return pureDataObjectFactory_1.PureDataObjectFactory; } });
8
+ var dataObjectFactory_js_1 = require("./dataObjectFactory.js");
9
+ Object.defineProperty(exports, "DataObjectFactory", { enumerable: true, get: function () { return dataObjectFactory_js_1.DataObjectFactory; } });
10
+ var pureDataObjectFactory_js_1 = require("./pureDataObjectFactory.js");
11
+ Object.defineProperty(exports, "PureDataObjectFactory", { enumerable: true, get: function () { return pureDataObjectFactory_js_1.PureDataObjectFactory; } });
12
12
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/data-object-factories/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,yDAAwD;AAA/C,sHAAA,iBAAiB,OAAA;AAC1B,iEAAgE;AAAvD,8HAAA,qBAAqB,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport { DataObjectFactory } from \"./dataObjectFactory\";\nexport { PureDataObjectFactory } from \"./pureDataObjectFactory\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/data-object-factories/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,+DAA2D;AAAlD,yHAAA,iBAAiB,OAAA;AAC1B,uEAAmE;AAA1D,iIAAA,qBAAqB,OAAA","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"]}