@fluidframework/aqueduct 2.53.1 → 2.61.0-355054

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 (76) hide show
  1. package/.mocharc.cjs +1 -2
  2. package/CHANGELOG.md +4 -0
  3. package/api-report/{aqueduct.legacy.alpha.api.md → aqueduct.legacy.beta.api.md} +14 -14
  4. package/dist/container-runtime-factories/baseContainerRuntimeFactory.d.ts +2 -2
  5. package/dist/container-runtime-factories/baseContainerRuntimeFactory.js +1 -1
  6. package/dist/container-runtime-factories/baseContainerRuntimeFactory.js.map +1 -1
  7. package/dist/container-runtime-factories/containerRuntimeFactoryWithDefaultDataStore.d.ts +2 -2
  8. package/dist/container-runtime-factories/containerRuntimeFactoryWithDefaultDataStore.js +1 -1
  9. package/dist/container-runtime-factories/containerRuntimeFactoryWithDefaultDataStore.js.map +1 -1
  10. package/dist/data-object-factories/dataObjectFactory.d.ts +1 -1
  11. package/dist/data-object-factories/dataObjectFactory.js +1 -1
  12. package/dist/data-object-factories/dataObjectFactory.js.map +1 -1
  13. package/dist/data-object-factories/pureDataObjectFactory.d.ts +2 -4
  14. package/dist/data-object-factories/pureDataObjectFactory.d.ts.map +1 -1
  15. package/dist/data-object-factories/pureDataObjectFactory.js +1 -2
  16. package/dist/data-object-factories/pureDataObjectFactory.js.map +1 -1
  17. package/dist/data-object-factories/treeDataObjectFactory.d.ts +1 -1
  18. package/dist/data-object-factories/treeDataObjectFactory.js +1 -1
  19. package/dist/data-object-factories/treeDataObjectFactory.js.map +1 -1
  20. package/dist/data-objects/dataObject.d.ts +1 -1
  21. package/dist/data-objects/dataObject.js +1 -1
  22. package/dist/data-objects/dataObject.js.map +1 -1
  23. package/dist/data-objects/pureDataObject.d.ts +1 -2
  24. package/dist/data-objects/pureDataObject.d.ts.map +1 -1
  25. package/dist/data-objects/pureDataObject.js +1 -2
  26. package/dist/data-objects/pureDataObject.js.map +1 -1
  27. package/dist/data-objects/treeDataObject.d.ts +1 -1
  28. package/dist/data-objects/treeDataObject.js +1 -1
  29. package/dist/data-objects/treeDataObject.js.map +1 -1
  30. package/dist/data-objects/types.d.ts +2 -4
  31. package/dist/data-objects/types.d.ts.map +1 -1
  32. package/dist/data-objects/types.js.map +1 -1
  33. package/dist/legacy.d.ts +2 -1
  34. package/internal.d.ts +1 -1
  35. package/legacy.d.ts +1 -1
  36. package/lib/container-runtime-factories/baseContainerRuntimeFactory.d.ts +2 -2
  37. package/lib/container-runtime-factories/baseContainerRuntimeFactory.js +1 -1
  38. package/lib/container-runtime-factories/baseContainerRuntimeFactory.js.map +1 -1
  39. package/lib/container-runtime-factories/containerRuntimeFactoryWithDefaultDataStore.d.ts +2 -2
  40. package/lib/container-runtime-factories/containerRuntimeFactoryWithDefaultDataStore.js +1 -1
  41. package/lib/container-runtime-factories/containerRuntimeFactoryWithDefaultDataStore.js.map +1 -1
  42. package/lib/data-object-factories/dataObjectFactory.d.ts +1 -1
  43. package/lib/data-object-factories/dataObjectFactory.js +1 -1
  44. package/lib/data-object-factories/dataObjectFactory.js.map +1 -1
  45. package/lib/data-object-factories/pureDataObjectFactory.d.ts +2 -4
  46. package/lib/data-object-factories/pureDataObjectFactory.d.ts.map +1 -1
  47. package/lib/data-object-factories/pureDataObjectFactory.js +1 -2
  48. package/lib/data-object-factories/pureDataObjectFactory.js.map +1 -1
  49. package/lib/data-object-factories/treeDataObjectFactory.d.ts +1 -1
  50. package/lib/data-object-factories/treeDataObjectFactory.js +1 -1
  51. package/lib/data-object-factories/treeDataObjectFactory.js.map +1 -1
  52. package/lib/data-objects/dataObject.d.ts +1 -1
  53. package/lib/data-objects/dataObject.js +1 -1
  54. package/lib/data-objects/dataObject.js.map +1 -1
  55. package/lib/data-objects/pureDataObject.d.ts +1 -2
  56. package/lib/data-objects/pureDataObject.d.ts.map +1 -1
  57. package/lib/data-objects/pureDataObject.js +1 -2
  58. package/lib/data-objects/pureDataObject.js.map +1 -1
  59. package/lib/data-objects/treeDataObject.d.ts +1 -1
  60. package/lib/data-objects/treeDataObject.js +1 -1
  61. package/lib/data-objects/treeDataObject.js.map +1 -1
  62. package/lib/data-objects/types.d.ts +2 -4
  63. package/lib/data-objects/types.d.ts.map +1 -1
  64. package/lib/data-objects/types.js.map +1 -1
  65. package/lib/legacy.d.ts +2 -1
  66. package/lib/tsdoc-metadata.json +1 -1
  67. package/package.json +28 -28
  68. package/src/container-runtime-factories/baseContainerRuntimeFactory.ts +2 -2
  69. package/src/container-runtime-factories/containerRuntimeFactoryWithDefaultDataStore.ts +2 -2
  70. package/src/data-object-factories/dataObjectFactory.ts +1 -1
  71. package/src/data-object-factories/pureDataObjectFactory.ts +2 -4
  72. package/src/data-object-factories/treeDataObjectFactory.ts +1 -1
  73. package/src/data-objects/dataObject.ts +1 -1
  74. package/src/data-objects/pureDataObject.ts +1 -2
  75. package/src/data-objects/treeDataObject.ts +1 -1
  76. package/src/data-objects/types.ts +2 -4
@@ -1 +1 @@
1
- {"version":3,"file":"dataObject.js","sourceRoot":"","sources":["../../src/data-objects/dataObject.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAEN,UAAU,EACV,eAAe,GACf,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAGrD;;;;;;;;;;;GAWG;AACH,MAAM,OAAgB,UAEpB,SAAQ,cAAiB;IAF3B;;QAIkB,oBAAe,GAAG,MAAM,CAAC;IAoD3C,CAAC;IAlDA;;;OAGG;IACH,IAAc,IAAI;QACjB,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,CAAC;YACxB,MAAM,IAAI,KAAK,CAAC,IAAI,CAAC,2BAA2B,CAAC,MAAM,CAAC,CAAC,CAAC;QAC3D,CAAC;QAED,OAAO,IAAI,CAAC,YAAY,CAAC;IAC1B,CAAC;IAED;;;OAGG;IACa,KAAK,CAAC,kBAAkB,CAAC,QAAiB;QACzD,IAAI,QAAQ,EAAE,CAAC;YACd,oGAAoG;YACpG,IAAI,CAAC,YAAY,GAAG,CAAC,MAAM,IAAI,CAAC,OAAO,CAAC,UAAU,CACjD,IAAI,CAAC,eAAe,CACpB,CAAqB,CAAC;YAEvB,oGAAoG;YACpG,gGAAgG;YAChG,qGAAqG;YACrG,IAAI,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC,IAAI,KAAK,UAAU,CAAC,IAAI,EAAE,CAAC;gBAC3D,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC;oBACxB,QAAQ,EAAE,SAAS;oBACnB,SAAS,EAAE,eAAe;oBAC1B,OAAO,EACN,6EAA6E;iBAC9E,CAAC,CAAC;YACJ,CAAC;QACF,CAAC;aAAM,CAAC;YACP,+EAA+E;YAC/E,IAAI,CAAC,YAAY,GAAG,eAAe,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,eAAe,CAAC,CAAC;YAC/E,IAAI,CAAC,YAAY,CAAC,aAAa,EAAE,CAAC;QACnC,CAAC;QAED,MAAM,KAAK,CAAC,kBAAkB,CAAC,QAAQ,CAAC,CAAC;IAC1C,CAAC;IAED;;;OAGG;IACO,2BAA2B,CAAC,IAAY;QACjD,OAAO,GAAG,IAAI,6CAA6C,CAAC;IAC7D,CAAC;CACD","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport {\n\ttype ISharedDirectory,\n\tMapFactory,\n\tSharedDirectory,\n} from \"@fluidframework/map/internal\";\n\nimport { PureDataObject } from \"./pureDataObject.js\";\nimport type { DataObjectTypes } from \"./types.js\";\n\n/**\n * DataObject is a base data store that is primed with a root directory. It\n * ensures that it is created and ready before you can access it.\n *\n * Having a single root directory allows for easier development. Instead of creating\n * and registering channels with the runtime any new DDS that is set on the root\n * will automatically be registered.\n *\n * @typeParam I - The optional input types used to strongly type the data object\n * @legacy\n * @alpha\n */\nexport abstract class DataObject<\n\tI extends DataObjectTypes = DataObjectTypes,\n> extends PureDataObject<I> {\n\tprivate internalRoot: ISharedDirectory | undefined;\n\tprivate readonly rootDirectoryId = \"root\";\n\n\t/**\n\t * The root directory will either be ready or will return an error. If an error is thrown\n\t * the root has not been correctly created/set.\n\t */\n\tprotected get root(): ISharedDirectory {\n\t\tif (!this.internalRoot) {\n\t\t\tthrow new Error(this.getUninitializedErrorString(`root`));\n\t\t}\n\n\t\treturn this.internalRoot;\n\t}\n\n\t/**\n\t * Initializes internal objects and calls initialization overrides.\n\t * Caller is responsible for ensuring this is only invoked once.\n\t */\n\tpublic override async initializeInternal(existing: boolean): Promise<void> {\n\t\tif (existing) {\n\t\t\t// data store has a root directory so we just need to set it before calling initializingFromExisting\n\t\t\tthis.internalRoot = (await this.runtime.getChannel(\n\t\t\t\tthis.rootDirectoryId,\n\t\t\t)) as ISharedDirectory;\n\n\t\t\t// This will actually be an ISharedMap if the channel was previously created by the older version of\n\t\t\t// DataObject which used a SharedMap. Since SharedMap and SharedDirectory are compatible unless\n\t\t\t// SharedDirectory-only commands are used on SharedMap, this will mostly just work for compatibility.\n\t\t\tif (this.internalRoot.attributes.type === MapFactory.Type) {\n\t\t\t\tthis.runtime.logger.send({\n\t\t\t\t\tcategory: \"generic\",\n\t\t\t\t\teventName: \"MapDataObject\",\n\t\t\t\t\tmessage:\n\t\t\t\t\t\t\"Legacy document, SharedMap is masquerading as SharedDirectory in DataObject\",\n\t\t\t\t});\n\t\t\t}\n\t\t} else {\n\t\t\t// Create a root directory and register it before calling initializingFirstTime\n\t\t\tthis.internalRoot = SharedDirectory.create(this.runtime, this.rootDirectoryId);\n\t\t\tthis.internalRoot.bindToContext();\n\t\t}\n\n\t\tawait super.initializeInternal(existing);\n\t}\n\n\t/**\n\t * Generates an error string indicating an item is uninitialized.\n\t * @param item - The name of the item that was uninitialized.\n\t */\n\tprotected getUninitializedErrorString(item: string): string {\n\t\treturn `${item} must be initialized before being accessed.`;\n\t}\n}\n"]}
1
+ {"version":3,"file":"dataObject.js","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nC,CAAC;QAED,MAAM,KAAK,CAAC,kBAAkB,CAAC,QAAQ,CAAC,CAAC;IAC1C,CAAC;IAED;;;OAGG;IACO,2BAA2B,CAAC,IAAY;QACjD,OAAO,GAAG,IAAI,6CAA6C,CAAC;IAC7D,CAAC;CACD","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport {\n\ttype ISharedDirectory,\n\tMapFactory,\n\tSharedDirectory,\n} from \"@fluidframework/map/internal\";\n\nimport { PureDataObject } from \"./pureDataObject.js\";\nimport type { DataObjectTypes } from \"./types.js\";\n\n/**\n * DataObject is a base data store that is primed with a root directory. It\n * ensures that it is created and ready before you can access it.\n *\n * Having a single root directory allows for easier development. Instead of creating\n * and registering channels with the runtime any new DDS that is set on the root\n * will automatically be registered.\n *\n * @typeParam I - The optional input types used to strongly type the data object\n * @legacy\n * @beta\n */\nexport abstract class DataObject<\n\tI extends DataObjectTypes = DataObjectTypes,\n> extends PureDataObject<I> {\n\tprivate internalRoot: ISharedDirectory | undefined;\n\tprivate readonly rootDirectoryId = \"root\";\n\n\t/**\n\t * The root directory will either be ready or will return an error. If an error is thrown\n\t * the root has not been correctly created/set.\n\t */\n\tprotected get root(): ISharedDirectory {\n\t\tif (!this.internalRoot) {\n\t\t\tthrow new Error(this.getUninitializedErrorString(`root`));\n\t\t}\n\n\t\treturn this.internalRoot;\n\t}\n\n\t/**\n\t * Initializes internal objects and calls initialization overrides.\n\t * Caller is responsible for ensuring this is only invoked once.\n\t */\n\tpublic override async initializeInternal(existing: boolean): Promise<void> {\n\t\tif (existing) {\n\t\t\t// data store has a root directory so we just need to set it before calling initializingFromExisting\n\t\t\tthis.internalRoot = (await this.runtime.getChannel(\n\t\t\t\tthis.rootDirectoryId,\n\t\t\t)) as ISharedDirectory;\n\n\t\t\t// This will actually be an ISharedMap if the channel was previously created by the older version of\n\t\t\t// DataObject which used a SharedMap. Since SharedMap and SharedDirectory are compatible unless\n\t\t\t// SharedDirectory-only commands are used on SharedMap, this will mostly just work for compatibility.\n\t\t\tif (this.internalRoot.attributes.type === MapFactory.Type) {\n\t\t\t\tthis.runtime.logger.send({\n\t\t\t\t\tcategory: \"generic\",\n\t\t\t\t\teventName: \"MapDataObject\",\n\t\t\t\t\tmessage:\n\t\t\t\t\t\t\"Legacy document, SharedMap is masquerading as SharedDirectory in DataObject\",\n\t\t\t\t});\n\t\t\t}\n\t\t} else {\n\t\t\t// Create a root directory and register it before calling initializingFirstTime\n\t\t\tthis.internalRoot = SharedDirectory.create(this.runtime, this.rootDirectoryId);\n\t\t\tthis.internalRoot.bindToContext();\n\t\t}\n\n\t\tawait super.initializeInternal(existing);\n\t}\n\n\t/**\n\t * Generates an error string indicating an item is uninitialized.\n\t * @param item - The name of the item that was uninitialized.\n\t */\n\tprotected getUninitializedErrorString(item: string): string {\n\t\treturn `${item} must be initialized before being accessed.`;\n\t}\n}\n"]}
@@ -17,8 +17,7 @@ import type { DataObjectTypes, IDataObjectProps } from "./types.js";
17
17
  * you are creating another base data store class.
18
18
  *
19
19
  * @typeParam I - The optional input types used to strongly type the data object
20
- * @legacy
21
- * @alpha
20
+ * @legacy @beta
22
21
  */
23
22
  export declare abstract class PureDataObject<I extends DataObjectTypes = DataObjectTypes> extends TypedEventEmitter<I["Events"] & IEvent> implements IFluidLoadable, IProvideFluidHandle {
24
23
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"pureDataObject.d.ts","sourceRoot":"","sources":["../../src/data-objects/pureDataObject.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,KAAK,EACX,MAAM,EACN,cAAc,EACd,QAAQ,EACR,SAAS,EACT,MAAM,iCAAiC,CAAC;AACzC,OAAO,KAAK,EACX,oBAAoB,EAEpB,mBAAmB,EACnB,MAAM,0CAA0C,CAAC;AAElD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,gDA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AAI,OAAO,CAAC,IAAI,CAAC;CAC/C"}
@@ -13,8 +13,7 @@ import { create404Response } from "@fluidframework/runtime-utils/internal";
13
13
  * you are creating another base data store class.
14
14
  *
15
15
  * @typeParam I - The optional input types used to strongly type the data object
16
- * @legacy
17
- * @alpha
16
+ * @legacy @beta
18
17
  */
19
18
  export class PureDataObject extends TypedEventEmitter {
20
19
  get id() {
@@ -1 +1 @@
1
- {"version":3,"file":"pureDataObject.js","sourceRoot":"","sources":["../../src/data-objects/pureDataObject.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAYjE,OAAO,EAAE,MAAM,EAAE,MAAM,qCAAqC,CAAC;AAG7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAC;AAK3E;;;;;;;;;;GAUG;AACH,MAAM,OAAgB,cACrB,SAAQ,iBAAuC;IAkC/C,IAAW,EAAE;QACZ,OAAO,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC;IACxB,CAAC;IAED;;OAEG;IACH,IAAW,cAAc;QACxB,OAAO,IAAI,CAAC;IACb,CAAC;IAED;;OAEG;IACH,IAAW,YAAY;QACtB,OAAO,IAAI,CAAC,MAAM,CAAC;IACpB,CAAC;IAED;;OAEG;IACH,IAAW,MAAM;QAChB,0GAA0G;QAC1G,yGAAyG;QACzG,wDAAwD;QACxD,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,KAAK,SAAS,EAAE,KAAK,CAAC,8BAA8B,CAAC,CAAC;QACpF,OAAO,IAAI,CAAC,OAAO,CAAC,UAAwC,CAAC;IAC9D,CAAC;IAEM,MAAM,CAAC,KAAK,CAAC,aAAa,CAAC,OAA+B;QAChE,MAAM,GAAG,GAAG,MAAM,OAAO,CAAC,UAAU,CAAC,GAAG,EAAE,CAAC;QAC3C,OAAO,GAAqB,CAAC;IAC9B,CAAC;IAED,YAAmB,KAA0B;QAC5C,KAAK,EAAE,CAA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AK,CAAC,aAAa,KAAmB,CAAC;IAEjD;;;;;OAKG;IACO,KAAK,CAAC,qBAAqB,CAAC,KAAyB,IAAkB,CAAC;IAElF;;;OAGG;IACO,KAAK,CAAC,wBAAwB,KAAmB,CAAC;IAE5D;;OAEG;IACO,KAAK,CAAC,cAAc,KAAmB,CAAC;CAClD","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { TypedEventEmitter } from \"@fluid-internal/client-utils\";\nimport type {\n\tIEvent,\n\tIFluidLoadable,\n\tIRequest,\n\tIResponse,\n} from \"@fluidframework/core-interfaces\";\nimport type {\n\tIFluidHandleInternal,\n\t// eslint-disable-next-line import/no-deprecated\n\tIProvideFluidHandle,\n} from \"@fluidframework/core-interfaces/internal\";\nimport { assert } from \"@fluidframework/core-utils/internal\";\nimport type { IFluidDataStoreRuntime } from \"@fluidframework/datastore-definitions/internal\";\nimport type { IFluidDataStoreContext } from \"@fluidframework/runtime-definitions/internal\";\nimport { create404Response } from \"@fluidframework/runtime-utils/internal\";\nimport type { AsyncFluidObjectProvider } from \"@fluidframework/synthesize/internal\";\n\nimport type { DataObjectTypes, IDataObjectProps } from \"./types.js\";\n\n/**\n * This is a bare-bones base class that does basic setup and enables for factory on an initialize call.\n *\n * @remarks\n * You probably don't want to inherit from this data store directly unless\n * you are creating another base data store class.\n *\n * @typeParam I - The optional input types used to strongly type the data object\n * @legacy\n * @alpha\n */\nexport abstract class PureDataObject<I extends DataObjectTypes = DataObjectTypes>\n\textends TypedEventEmitter<I[\"Events\"] & IEvent>\n\t// eslint-disable-next-line import/no-deprecated\n\timplements IFluidLoadable, IProvideFluidHandle\n{\n\t/**\n\t * This is your FluidDataStoreRuntime object\n\t */\n\tprotected readonly runtime: IFluidDataStoreRuntime;\n\n\t/**\n\t * This context is used to talk up to the IContainerRuntime\n\t */\n\tprotected readonly context: IFluidDataStoreContext;\n\n\t/**\n\t * Providers are FluidObject keyed objects that provide back\n\t * a promise to the corresponding FluidObject or undefined.\n\t * Providers injected/provided by the Container and/or HostingApplication\n\t *\n\t * To define providers set FluidObject interfaces in the OptionalProviders generic type for your data store\n\t */\n\tprotected readonly providers: AsyncFluidObjectProvider<I[\"OptionalProviders\"]>;\n\n\tprotected initProps?: I[\"InitialState\"];\n\n\t/**\n\t * Internal implementation detail.\n\t * Subclasses should not use this.\n\t * @privateRemarks\n\t * For unknown reasons this API was exposed as a protected member with no documented behavior nor any external usage or clear use-case.\n\t * Ideally a breaking change would be made to replace this with a better named private property like `#initializationPromise` when permitted.\n\t */\n\tprotected initializeP: Promise<void> | undefined;\n\n\tpublic get id(): string {\n\t\treturn this.runtime.id;\n\t}\n\n\t/**\n\t * {@inheritDoc @fluidframework/core-interfaces#IProvideFluidLoadable.IFluidLoadable}\n\t */\n\tpublic get IFluidLoadable(): this {\n\t\treturn this;\n\t}\n\n\t/**\n\t * {@inheritDoc @fluidframework/core-interfaces#IProvideFluidHandle.IFluidHandle}\n\t */\n\tpublic get IFluidHandle(): IFluidHandleInternal<this> {\n\t\treturn this.handle;\n\t}\n\n\t/**\n\t * Handle to a data store\n\t */\n\tpublic get handle(): IFluidHandleInternal<this> {\n\t\t// PureDataObjectFactory already provides an entryPoint initialization function to the data store runtime,\n\t\t// so this object should always have access to a non-null entryPoint. Need to cast because PureDataObject\n\t\t// tried to be too smart with its typing for handles :).\n\t\tassert(this.runtime.entryPoint !== undefined, 0x46b /* EntryPoint was undefined */);\n\t\treturn this.runtime.entryPoint as IFluidHandleInternal<this>;\n\t}\n\n\tpublic static async getDataObject(runtime: IFluidDataStoreRuntime): Promise<PureDataObject> {\n\t\tconst obj = await runtime.entryPoint.get();\n\t\treturn obj as PureDataObject;\n\t}\n\n\tpublic constructor(props: IDataObjectProps<I>) {\n\t\tsuper();\n\t\tthis.runtime = props.runtime;\n\t\tthis.context = props.context;\n\t\tthis.providers = props.providers;\n\t\tthis.initProps = props.initProps;\n\t}\n\n\t/**\n\t * Return this object if someone requests it directly\n\t * We will return this object in two scenarios:\n\t *\n\t * 1. the request url is a \"/\"\n\t *\n\t * 2. the request url is empty\n\t */\n\tpublic async request(req: IRequest): Promise<IResponse> {\n\t\treturn req.url === \"\" || req.url === \"/\" || req.url.startsWith(\"/?\")\n\t\t\t? { mimeType: \"fluid/object\", status: 200, value: this }\n\t\t\t: create404Response(req);\n\t}\n\n\t/**\n\t * Await this API to ensure PureDataObject is fully initialized.\n\t * Initialization happens on demand, only on as-needed bases.\n\t * In most cases you should allow factory/object to decide when to finish initialization.\n\t * But if you are supplying your own implementation of DataStoreRuntime factory and overriding some methods\n\t * and need a fully initialized object, then you can await this API to ensure object is fully initialized.\n\t */\n\tpublic async finishInitialization(existing: boolean): Promise<void> {\n\t\tthis.initializeP ??= this.initializeInternal(existing);\n\t\treturn this.initializeP;\n\t}\n\n\t/**\n\t * Internal initialize implementation. Overwriting this will change the flow of the PureDataObject and should\n\t * generally not be done.\n\t *\n\t * Calls initializingFirstTime, initializingFromExisting, and hasInitialized. Caller is\n\t * responsible for ensuring this is only invoked once.\n\t */\n\tpublic async initializeInternal(existing: boolean): Promise<void> {\n\t\tawait this.preInitialize();\n\t\tif (existing) {\n\t\t\tassert(\n\t\t\t\tthis.initProps === undefined,\n\t\t\t\t0x0be /* \"Trying to initialize from existing while initProps is set!\" */,\n\t\t\t);\n\t\t\tawait this.initializingFromExisting();\n\t\t} else {\n\t\t\tawait this.initializingFirstTime(\n\t\t\t\t(this.context.createProps as I[\"InitialState\"]) ?? this.initProps,\n\t\t\t);\n\t\t}\n\t\tawait this.hasInitialized();\n\t}\n\n\t/**\n\t * Called every time the data store is initialized, before initializingFirstTime or\n\t * initializingFromExisting is called.\n\t */\n\tprotected async preInitialize(): Promise<void> {}\n\n\t/**\n\t * Called the first time the data store is initialized (new creations with a new\n\t * data store runtime)\n\t *\n\t * @param props - Optional props to be passed in on create\n\t */\n\tprotected async initializingFirstTime(props?: I[\"InitialState\"]): Promise<void> {}\n\n\t/**\n\t * Called every time but the first time the data store is initialized (creations\n\t * with an existing data store runtime)\n\t */\n\tprotected async initializingFromExisting(): Promise<void> {}\n\n\t/**\n\t * Called every time the data store is initialized after create or existing.\n\t */\n\tprotected async hasInitialized(): Promise<void> {}\n}\n"]}
1
+ {"version":3,"file":"pureDataObject.js","sourceRoot":"","sources":["../../src/data-objects/pureDataObject.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAYjE,OAAO,EAAE,MAAM,EAAE,MAAM,qCAAqC,CAAC;AAG7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAC;AAK3E;;;;;;;;;GASG;AACH,MAAM,OAAgB,cACrB,SAAQ,iBAAuC;IAkC/C,IAAW,EAAE;QACZ,OAAO,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC;IACxB,CAAC;IAED;;OAEG;IACH,IAAW,cAAc;QACxB,OAAO,IAAI,CAAC;IACb,CAAC;IAED;;OAEG;IACH,IAAW,YAAY;QACtB,OAAO,IAAI,CAAC,MAAM,CAAC;IACpB,CAAC;IAED;;OAEG;IACH,IAAW,MAAM;QAChB,0GAA0G;QAC1G,yGAAyG;QACzG,wDAAwD;QACxD,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,KAAK,SAAS,EAAE,KAAK,CAAC,8BAA8B,CAAC,CAAC;QACpF,OAAO,IAAI,CAAC,OAAO,CAAC,UAAwC,CAAC;IAC9D,CAAC;IAEM,MAAM,CAAC,KAAK,CAAC,aAAa,CAAC,OAA+B;QAChE,MAAM,GAAG,GAAG,MAAM,OAAO,CAAC,UAAU,CAAC,GAAG,EAAE,CAAC;QAC3C,OAAO,GAAqB,CAAC;IAC9B,CAAC;IAED,YAAmB,KAA0B;QAC5C,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC;QAC7B,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC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;IAElF;;;OAGG;IACO,KAAK,CAAC,wBAAwB,KAAmB,CAAC;IAE5D;;OAEG;IACO,KAAK,CAAC,cAAc,KAAmB,CAAC;CAClD","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { TypedEventEmitter } from \"@fluid-internal/client-utils\";\nimport type {\n\tIEvent,\n\tIFluidLoadable,\n\tIRequest,\n\tIResponse,\n} from \"@fluidframework/core-interfaces\";\nimport type {\n\tIFluidHandleInternal,\n\t// eslint-disable-next-line import/no-deprecated\n\tIProvideFluidHandle,\n} from \"@fluidframework/core-interfaces/internal\";\nimport { assert } from \"@fluidframework/core-utils/internal\";\nimport type { IFluidDataStoreRuntime } from \"@fluidframework/datastore-definitions/internal\";\nimport type { IFluidDataStoreContext } from \"@fluidframework/runtime-definitions/internal\";\nimport { create404Response } from \"@fluidframework/runtime-utils/internal\";\nimport type { AsyncFluidObjectProvider } from \"@fluidframework/synthesize/internal\";\n\nimport type { DataObjectTypes, IDataObjectProps } from \"./types.js\";\n\n/**\n * This is a bare-bones base class that does basic setup and enables for factory on an initialize call.\n *\n * @remarks\n * You probably don't want to inherit from this data store directly unless\n * you are creating another base data store class.\n *\n * @typeParam I - The optional input types used to strongly type the data object\n * @legacy @beta\n */\nexport abstract class PureDataObject<I extends DataObjectTypes = DataObjectTypes>\n\textends TypedEventEmitter<I[\"Events\"] & IEvent>\n\t// eslint-disable-next-line import/no-deprecated\n\timplements IFluidLoadable, IProvideFluidHandle\n{\n\t/**\n\t * This is your FluidDataStoreRuntime object\n\t */\n\tprotected readonly runtime: IFluidDataStoreRuntime;\n\n\t/**\n\t * This context is used to talk up to the IContainerRuntime\n\t */\n\tprotected readonly context: IFluidDataStoreContext;\n\n\t/**\n\t * Providers are FluidObject keyed objects that provide back\n\t * a promise to the corresponding FluidObject or undefined.\n\t * Providers injected/provided by the Container and/or HostingApplication\n\t *\n\t * To define providers set FluidObject interfaces in the OptionalProviders generic type for your data store\n\t */\n\tprotected readonly providers: AsyncFluidObjectProvider<I[\"OptionalProviders\"]>;\n\n\tprotected initProps?: I[\"InitialState\"];\n\n\t/**\n\t * Internal implementation detail.\n\t * Subclasses should not use this.\n\t * @privateRemarks\n\t * For unknown reasons this API was exposed as a protected member with no documented behavior nor any external usage or clear use-case.\n\t * Ideally a breaking change would be made to replace this with a better named private property like `#initializationPromise` when permitted.\n\t */\n\tprotected initializeP: Promise<void> | undefined;\n\n\tpublic get id(): string {\n\t\treturn this.runtime.id;\n\t}\n\n\t/**\n\t * {@inheritDoc @fluidframework/core-interfaces#IProvideFluidLoadable.IFluidLoadable}\n\t */\n\tpublic get IFluidLoadable(): this {\n\t\treturn this;\n\t}\n\n\t/**\n\t * {@inheritDoc @fluidframework/core-interfaces#IProvideFluidHandle.IFluidHandle}\n\t */\n\tpublic get IFluidHandle(): IFluidHandleInternal<this> {\n\t\treturn this.handle;\n\t}\n\n\t/**\n\t * Handle to a data store\n\t */\n\tpublic get handle(): IFluidHandleInternal<this> {\n\t\t// PureDataObjectFactory already provides an entryPoint initialization function to the data store runtime,\n\t\t// so this object should always have access to a non-null entryPoint. Need to cast because PureDataObject\n\t\t// tried to be too smart with its typing for handles :).\n\t\tassert(this.runtime.entryPoint !== undefined, 0x46b /* EntryPoint was undefined */);\n\t\treturn this.runtime.entryPoint as IFluidHandleInternal<this>;\n\t}\n\n\tpublic static async getDataObject(runtime: IFluidDataStoreRuntime): Promise<PureDataObject> {\n\t\tconst obj = await runtime.entryPoint.get();\n\t\treturn obj as PureDataObject;\n\t}\n\n\tpublic constructor(props: IDataObjectProps<I>) {\n\t\tsuper();\n\t\tthis.runtime = props.runtime;\n\t\tthis.context = props.context;\n\t\tthis.providers = props.providers;\n\t\tthis.initProps = props.initProps;\n\t}\n\n\t/**\n\t * Return this object if someone requests it directly\n\t * We will return this object in two scenarios:\n\t *\n\t * 1. the request url is a \"/\"\n\t *\n\t * 2. the request url is empty\n\t */\n\tpublic async request(req: IRequest): Promise<IResponse> {\n\t\treturn req.url === \"\" || req.url === \"/\" || req.url.startsWith(\"/?\")\n\t\t\t? { mimeType: \"fluid/object\", status: 200, value: this }\n\t\t\t: create404Response(req);\n\t}\n\n\t/**\n\t * Await this API to ensure PureDataObject is fully initialized.\n\t * Initialization happens on demand, only on as-needed bases.\n\t * In most cases you should allow factory/object to decide when to finish initialization.\n\t * But if you are supplying your own implementation of DataStoreRuntime factory and overriding some methods\n\t * and need a fully initialized object, then you can await this API to ensure object is fully initialized.\n\t */\n\tpublic async finishInitialization(existing: boolean): Promise<void> {\n\t\tthis.initializeP ??= this.initializeInternal(existing);\n\t\treturn this.initializeP;\n\t}\n\n\t/**\n\t * Internal initialize implementation. Overwriting this will change the flow of the PureDataObject and should\n\t * generally not be done.\n\t *\n\t * Calls initializingFirstTime, initializingFromExisting, and hasInitialized. Caller is\n\t * responsible for ensuring this is only invoked once.\n\t */\n\tpublic async initializeInternal(existing: boolean): Promise<void> {\n\t\tawait this.preInitialize();\n\t\tif (existing) {\n\t\t\tassert(\n\t\t\t\tthis.initProps === undefined,\n\t\t\t\t0x0be /* \"Trying to initialize from existing while initProps is set!\" */,\n\t\t\t);\n\t\t\tawait this.initializingFromExisting();\n\t\t} else {\n\t\t\tawait this.initializingFirstTime(\n\t\t\t\t(this.context.createProps as I[\"InitialState\"]) ?? this.initProps,\n\t\t\t);\n\t\t}\n\t\tawait this.hasInitialized();\n\t}\n\n\t/**\n\t * Called every time the data store is initialized, before initializingFirstTime or\n\t * initializingFromExisting is called.\n\t */\n\tprotected async preInitialize(): Promise<void> {}\n\n\t/**\n\t * Called the first time the data store is initialized (new creations with a new\n\t * data store runtime)\n\t *\n\t * @param props - Optional props to be passed in on create\n\t */\n\tprotected async initializingFirstTime(props?: I[\"InitialState\"]): Promise<void> {}\n\n\t/**\n\t * Called every time but the first time the data store is initialized (creations\n\t * with an existing data store runtime)\n\t */\n\tprotected async initializingFromExisting(): Promise<void> {}\n\n\t/**\n\t * Called every time the data store is initialized after create or existing.\n\t */\n\tprotected async hasInitialized(): Promise<void> {}\n}\n"]}
@@ -43,7 +43,7 @@ import type { DataObjectTypes } from "./types.js";
43
43
  * }
44
44
  * ```
45
45
  *
46
- * @legacy @alpha
46
+ * @legacy @beta
47
47
  */
48
48
  export declare abstract class TreeDataObject<TDataObjectTypes extends DataObjectTypes = DataObjectTypes> extends PureDataObject<TDataObjectTypes> {
49
49
  #private;
@@ -61,7 +61,7 @@ const uninitializedErrorString = "The tree has not yet been initialized. The dat
61
61
  * }
62
62
  * ```
63
63
  *
64
- * @legacy @alpha
64
+ * @legacy @beta
65
65
  */
66
66
  export class TreeDataObject extends PureDataObject {
67
67
  constructor() {
@@ -1 +1 @@
1
- {"version":3,"file":"treeDataObject.js","sourceRoot":"","sources":["../../src/data-objects/treeDataObject.ts"],"names":[],"mappings":"AAAA;;;GAGG;;;;;;;;;;;;;AAGH,OAAO,EAAE,UAAU,EAAE,MAAM,0CAA0C,CAAC;AACtE,OAAO,EAAE,UAAU,EAAc,MAAM,+BAA+B,CAAC;AAEvE,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAGrD;;;GAGG;AACH,MAAM,aAAa,GAAG,WAAW,CAAC;AAElC,MAAM,wBAAwB,GAC7B,8FAA8F,CAAC;AAEhG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,MAAM,OAAgB,cAEpB,SAAQ,cAAgC;IAF1C;;QAGC;;;WAGG;QACH,uCAAyB;IA2C1B,CAAC;IAzCA;;;OAGG;IACH,IAAc,IAAI;QACjB,IAAI,uBAAA,IAAI,4BAAM,KAAK,SAAS,EAAE,CAAC;YAC9B,MAAM,IAAI,UAAU,CAAC,wBAAwB,CAAC,CAAC;QAChD,CAAC;QACD,OAAO,uBAAA,IAAI,4BAAM,CAAC;IACnB,CAAC;IAEe,KAAK,CAAC,kBAAkB,CAAC,QAAiB;QACzD,IAAI,QAAQ,EAAE,CAAC;YACd,+FAA+F;YAC/F,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;YAE7D,0FAA0F;YAC1F,8FAA8F;YAC9F,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;gBAC7B,MAAM,IAAI,KAAK,CACd,mBAAmB,OAAO,CAAC,EAAE,gEAAgE,CAC7F,CAAC;YACH,CAAC;YACD,MAAM,UAAU,GAAU,OAAO,CAAC;YAElC,uBAAA,IAAI,wBAAS,UAAU,MAAA,CAAC;QACzB,CAAC;aAAM,CAAC;YACP,MAAM,UAAU,GAAG,IAAI,CAAC,OAAO,CAAC,aAAa,CAC5C,aAAa,EACb,UAAU,CAAC,UAAU,EAAE,CAAC,IAAI,CACR,CAAC;YACrB,UAAuC,CAAC,aAAa,EAAE,CAAC;YAEzD,uBAAA,IAAI,wBAAS,UAAU,MAAA,CAAC;YAExB,oFAAoF;YACpF,2DAA2D;QAC5D,CAAC;QAED,MAAM,KAAK,CAAC,kBAAkB,CAAC,QAAQ,CAAC,CAAC;IAC1C,CAAC;CACD","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { ISharedObject } from \"@fluidframework/shared-object-base/internal\";\nimport { UsageError } from \"@fluidframework/telemetry-utils/internal\";\nimport { SharedTree, type ITree } from \"@fluidframework/tree/internal\";\n\nimport { PureDataObject } from \"./pureDataObject.js\";\nimport type { DataObjectTypes } from \"./types.js\";\n\n/**\n * Channel ID of {@link TreeDataObject}'s root {@link @fluidframework/tree#SharedTree}.\n * @privateRemarks This key is persisted and should not be changed without a migration strategy.\n */\nconst treeChannelId = \"root-tree\";\n\nconst uninitializedErrorString =\n\t\"The tree has not yet been initialized. The data object must be initialized before accessing.\";\n\n/**\n * A {@link PureDataObject | data object} backed by a {@link @fluidframework/tree#ITree}.\n *\n * @remarks\n *\n * In order to view the tree's data, consumers of this type will need to apply the appropriate view schema to the {@link TreeDataObject.tree}.\n * This will generally be done via {@link PureDataObject.initializingFromExisting} and {@link PureDataObject.initializingFirstTime} methods.\n *\n * To initialize the tree's data for initial creation, implementers of this class will need to override {@link PureDataObject.initializingFirstTime} and set the data in the schema-aware view.\n *\n * @typeParam TDataObjectTypes - The optional input types used to strongly type the data object.\n *\n * @example Implementing `initializingFirstTime`\n *\n * ```typescript\n * protected override async initializingFirstTime(): Promise<void> {\n * \t// Generate the schema-aware view of the tree.\n * \tthis.treeView = this.tree.viewWith(treeViewConfiguration);\n *\n * \t// Initialize the tree with initial data.\n * \tthis.treeView.initialize(initialTree);\n * }\n * ```\n *\n * @example Implementing `initializingFromExisting`\n *\n * ```typescript\n * protected override async initializingFromExisting(): Promise<void> {\n * \t// Generate the schema-aware view of the tree.\n * \tthis.treeView = this.tree.viewWith(treeViewConfiguration);\n *\n * // Ensure the loaded tree is compatible with the view schema.\n * \tif (!this.treeView.compatibility.canView) {\n * \t\t// Handle out-of-schema data as appropriate.\n * \t}\n * }\n * ```\n *\n * @legacy @alpha\n */\nexport abstract class TreeDataObject<\n\tTDataObjectTypes extends DataObjectTypes = DataObjectTypes,\n> extends PureDataObject<TDataObjectTypes> {\n\t/**\n\t * The underlying {@link @fluidframework/tree#ITree | tree}.\n\t * @remarks Created once during initialization.\n\t */\n\t#tree: ITree | undefined;\n\n\t/**\n\t * The underlying {@link @fluidframework/tree#ITree | tree}.\n\t * @remarks Created once during initialization.\n\t */\n\tprotected get tree(): ITree {\n\t\tif (this.#tree === undefined) {\n\t\t\tthrow new UsageError(uninitializedErrorString);\n\t\t}\n\t\treturn this.#tree;\n\t}\n\n\tpublic override async initializeInternal(existing: boolean): Promise<void> {\n\t\tif (existing) {\n\t\t\t// data store has a root tree so we just need to set it before calling initializingFromExisting\n\t\t\tconst channel = await this.runtime.getChannel(treeChannelId);\n\n\t\t\t// TODO: Support using a Directory to Tree migration shim and DataObject's root channel ID\n\t\t\t// to allow migrating from DataObject to TreeDataObject instead of just erroring in that case.\n\t\t\tif (!SharedTree.is(channel)) {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t`Content with id ${channel.id} is not a SharedTree and cannot be loaded with treeDataObject.`,\n\t\t\t\t);\n\t\t\t}\n\t\t\tconst sharedTree: ITree = channel;\n\n\t\t\tthis.#tree = sharedTree;\n\t\t} else {\n\t\t\tconst sharedTree = this.runtime.createChannel(\n\t\t\t\ttreeChannelId,\n\t\t\t\tSharedTree.getFactory().type,\n\t\t\t) as unknown as ITree;\n\t\t\t(sharedTree as unknown as ISharedObject).bindToContext();\n\n\t\t\tthis.#tree = sharedTree;\n\n\t\t\t// Note, the implementer is responsible for initializing the tree with initial data.\n\t\t\t// Generally, this can be done via `initializingFirstTime`.\n\t\t}\n\n\t\tawait super.initializeInternal(existing);\n\t}\n}\n"]}
1
+ {"version":3,"file":"treeDataObject.js","sourceRoot":"","sources":["../../src/data-objects/treeDataObject.ts"],"names":[],"mappings":"AAAA;;;GAGG;;;;;;;;;;;;;AAGH,OAAO,EAAE,UAAU,EAAE,MAAM,0CAA0C,CAAC;AACtE,OAAO,EAAE,UAAU,EAAc,MAAM,+BAA+B,CAAC;AAEvE,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAGrD;;;GAGG;AACH,MAAM,aAAa,GAAG,WAAW,CAAC;AAElC,MAAM,wBAAwB,GAC7B,8FAA8F,CAAC;AAEhG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,MAAM,OAAgB,cAEpB,SAAQ,cAAgC;IAF1C;;QAGC;;;WAGG;QACH,uCAAyB;IA2C1B,CAAC;IAzCA;;;OAGG;IACH,IAAc,IAAI;QACjB,IAAI,uBAAA,IAAI,4BAAM,KAAK,SAAS,EAAE,CAAC;YAC9B,MAAM,IAAI,UAAU,CAAC,wBAAwB,CAAC,CAAC;QAChD,CAAC;QACD,OAAO,uBAAA,IAAI,4BAAM,CAAC;IACnB,CAAC;IAEe,KAAK,CAAC,kBAAkB,CAAC,QAAiB;QACzD,IAAI,QAAQ,EAAE,CAAC;YACd,+FAA+F;YAC/F,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;YAE7D,0FAA0F;YAC1F,8FAA8F;YAC9F,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;gBAC7B,MAAM,IAAI,KAAK,CACd,mBAAmB,OAAO,CAAC,EAAE,gEAAgE,CAC7F,CAAC;YACH,CAAC;YACD,MAAM,UAAU,GAAU,OAAO,CAAC;YAElC,uBAAA,IAAI,wBAAS,UAAU,MAAA,CAAC;QACzB,CAAC;aAAM,CAAC;YACP,MAAM,UAAU,GAAG,IAAI,CAAC,OAAO,CAAC,aAAa,CAC5C,aAAa,EACb,UAAU,CAAC,UAAU,EAAE,CAAC,IAAI,CACR,CAAC;YACrB,UAAuC,CAAC,aAAa,EAAE,CAAC;YAEzD,uBAAA,IAAI,wBAAS,UAAU,MAAA,CAAC;YAExB,oFAAoF;YACpF,2DAA2D;QAC5D,CAAC;QAED,MAAM,KAAK,CAAC,kBAAkB,CAAC,QAAQ,CAAC,CAAC;IAC1C,CAAC;CACD","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { ISharedObject } from \"@fluidframework/shared-object-base/internal\";\nimport { UsageError } from \"@fluidframework/telemetry-utils/internal\";\nimport { SharedTree, type ITree } from \"@fluidframework/tree/internal\";\n\nimport { PureDataObject } from \"./pureDataObject.js\";\nimport type { DataObjectTypes } from \"./types.js\";\n\n/**\n * Channel ID of {@link TreeDataObject}'s root {@link @fluidframework/tree#SharedTree}.\n * @privateRemarks This key is persisted and should not be changed without a migration strategy.\n */\nconst treeChannelId = \"root-tree\";\n\nconst uninitializedErrorString =\n\t\"The tree has not yet been initialized. The data object must be initialized before accessing.\";\n\n/**\n * A {@link PureDataObject | data object} backed by a {@link @fluidframework/tree#ITree}.\n *\n * @remarks\n *\n * In order to view the tree's data, consumers of this type will need to apply the appropriate view schema to the {@link TreeDataObject.tree}.\n * This will generally be done via {@link PureDataObject.initializingFromExisting} and {@link PureDataObject.initializingFirstTime} methods.\n *\n * To initialize the tree's data for initial creation, implementers of this class will need to override {@link PureDataObject.initializingFirstTime} and set the data in the schema-aware view.\n *\n * @typeParam TDataObjectTypes - The optional input types used to strongly type the data object.\n *\n * @example Implementing `initializingFirstTime`\n *\n * ```typescript\n * protected override async initializingFirstTime(): Promise<void> {\n * \t// Generate the schema-aware view of the tree.\n * \tthis.treeView = this.tree.viewWith(treeViewConfiguration);\n *\n * \t// Initialize the tree with initial data.\n * \tthis.treeView.initialize(initialTree);\n * }\n * ```\n *\n * @example Implementing `initializingFromExisting`\n *\n * ```typescript\n * protected override async initializingFromExisting(): Promise<void> {\n * \t// Generate the schema-aware view of the tree.\n * \tthis.treeView = this.tree.viewWith(treeViewConfiguration);\n *\n * // Ensure the loaded tree is compatible with the view schema.\n * \tif (!this.treeView.compatibility.canView) {\n * \t\t// Handle out-of-schema data as appropriate.\n * \t}\n * }\n * ```\n *\n * @legacy @beta\n */\nexport abstract class TreeDataObject<\n\tTDataObjectTypes extends DataObjectTypes = DataObjectTypes,\n> extends PureDataObject<TDataObjectTypes> {\n\t/**\n\t * The underlying {@link @fluidframework/tree#ITree | tree}.\n\t * @remarks Created once during initialization.\n\t */\n\t#tree: ITree | undefined;\n\n\t/**\n\t * The underlying {@link @fluidframework/tree#ITree | tree}.\n\t * @remarks Created once during initialization.\n\t */\n\tprotected get tree(): ITree {\n\t\tif (this.#tree === undefined) {\n\t\t\tthrow new UsageError(uninitializedErrorString);\n\t\t}\n\t\treturn this.#tree;\n\t}\n\n\tpublic override async initializeInternal(existing: boolean): Promise<void> {\n\t\tif (existing) {\n\t\t\t// data store has a root tree so we just need to set it before calling initializingFromExisting\n\t\t\tconst channel = await this.runtime.getChannel(treeChannelId);\n\n\t\t\t// TODO: Support using a Directory to Tree migration shim and DataObject's root channel ID\n\t\t\t// to allow migrating from DataObject to TreeDataObject instead of just erroring in that case.\n\t\t\tif (!SharedTree.is(channel)) {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t`Content with id ${channel.id} is not a SharedTree and cannot be loaded with treeDataObject.`,\n\t\t\t\t);\n\t\t\t}\n\t\t\tconst sharedTree: ITree = channel;\n\n\t\t\tthis.#tree = sharedTree;\n\t\t} else {\n\t\t\tconst sharedTree = this.runtime.createChannel(\n\t\t\t\ttreeChannelId,\n\t\t\t\tSharedTree.getFactory().type,\n\t\t\t) as unknown as ITree;\n\t\t\t(sharedTree as unknown as ISharedObject).bindToContext();\n\n\t\t\tthis.#tree = sharedTree;\n\n\t\t\t// Note, the implementer is responsible for initializing the tree with initial data.\n\t\t\t// Generally, this can be done via `initializingFirstTime`.\n\t\t}\n\n\t\tawait super.initializeInternal(existing);\n\t}\n}\n"]}
@@ -8,8 +8,7 @@ import type { IFluidDataStoreContext, IFluidDataStoreFactory } from "@fluidframe
8
8
  import type { AsyncFluidObjectProvider } from "@fluidframework/synthesize/internal";
9
9
  /**
10
10
  * This type is used as the base generic input to DataObject and PureDataObject.
11
- * @legacy
12
- * @alpha
11
+ * @legacy @beta
13
12
  */
14
13
  export interface DataObjectTypes {
15
14
  /**
@@ -26,8 +25,7 @@ export interface DataObjectTypes {
26
25
  Events?: IEvent;
27
26
  }
28
27
  /**
29
- * @legacy
30
- * @alpha
28
+ * @legacy @beta
31
29
  */
32
30
  export interface IDataObjectProps<I extends DataObjectTypes = DataObjectTypes> {
33
31
  readonly runtime: IFluidDataStoreRuntime;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/data-objects/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAC;AAC3E,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,gDAAg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CAA8C,CAAC;AACtD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,qCAAqC,CAAC;AAEpF;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC/B;;OAEG;IACH,iBAAiB,CAAC,EAAE,WAAW,CAAC;IAChC;;OAEG;IAGH,YAAY,CAAC,EAAE,GAAG,CAAC;IACnB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB,CAAC,CAAC,SAAS,eAAe,GAAG,eAAe;IAC5E,QAAQ,CAAC,OAAO,EAAE,sBAAsB,CAAC;IACzC,QAAQ,CAAC,OAAO,EAAE,sBAAsB,CAAC;IACzC,QAAQ,CAAC,SAAS,EAAE,wBAAwB,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC;IACrE,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC,cAAc,CAAC,CAAC;CACvC;AAED;;;;GAIG;AACH,MAAM,MAAM,cAAc,CAAC,CAAC,GAAG,OAAO,IAAI;IACzC,QAAQ,CAAC,OAAO,EAAE,sBAAsB,CAAC;CACzC,GAAG,CACD;IACA;;OAEG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC;CACtC;AACH;;GAEG;GACD,CAAC,KACD,GAAG,IAAI,EAAE,KAAK,EAAE,KACX,CAAC,CAAC,CACT,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/data-objects/types.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { FluidObject, IEvent } from \"@fluidframework/core-interfaces\";\nimport type { IFluidDataStoreRuntime } from \"@fluidframework/datastore-definitions/internal\";\nimport type {\n\tIFluidDataStoreContext,\n\tIFluidDataStoreFactory,\n} from \"@fluidframework/runtime-definitions/internal\";\nimport type { AsyncFluidObjectProvider } from \"@fluidframework/synthesize/internal\";\n\n/**\n * This type is used as the base generic input to DataObject and PureDataObject.\n * @legacy\n * @alpha\n */\nexport interface DataObjectTypes {\n\t/**\n\t * Represents a type that will define optional providers that will be injected.\n\t */\n\tOptionalProviders?: FluidObject;\n\t/**\n\t * The initial state type that the produced data object may take during creation.\n\t */\n\t// TODO: Use a real type here.\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\tInitialState?: any;\n\t/**\n\t * Represents events that will be available in the EventForwarder.\n\t */\n\tEvents?: IEvent;\n}\n\n/**\n * @legacy\n * @alpha\n */\nexport interface IDataObjectProps<I extends DataObjectTypes = DataObjectTypes> {\n\treadonly runtime: IFluidDataStoreRuntime;\n\treadonly context: IFluidDataStoreContext;\n\treadonly providers: AsyncFluidObjectProvider<I[\"OptionalProviders\"]>;\n\treadonly initProps?: I[\"InitialState\"];\n}\n\n/**\n * An object that has a factory that can create a data object.\n * @typeParam T - The type of the data object.\n * @internal\n */\nexport type DataObjectKind<T = unknown> = {\n\treadonly factory: IFluidDataStoreFactory;\n} & (\n\t| {\n\t\t\t/**\n\t\t\t * Not actually used, but required for strong typing.\n\t\t\t */\n\t\t\treadonly makeCovariant?: T | undefined;\n\t }\n\t/**\n\t * Not actually used, but helps with strong typing.\n\t */\n\t| (new (\n\t\t\t...args: never[]\n\t ) => T)\n);\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/data-objects/types.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { FluidObject, IEvent } from \"@fluidframework/core-interfaces\";\nimport type { IFluidDataStoreRuntime } from \"@fluidframework/datastore-definitions/internal\";\nimport type {\n\tIFluidDataStoreContext,\n\tIFluidDataStoreFactory,\n} from \"@fluidframework/runtime-definitions/internal\";\nimport type { AsyncFluidObjectProvider } from \"@fluidframework/synthesize/internal\";\n\n/**\n * This type is used as the base generic input to DataObject and PureDataObject.\n * @legacy @beta\n */\nexport interface DataObjectTypes {\n\t/**\n\t * Represents a type that will define optional providers that will be injected.\n\t */\n\tOptionalProviders?: FluidObject;\n\t/**\n\t * The initial state type that the produced data object may take during creation.\n\t */\n\t// TODO: Use a real type here.\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\tInitialState?: any;\n\t/**\n\t * Represents events that will be available in the EventForwarder.\n\t */\n\tEvents?: IEvent;\n}\n\n/**\n * @legacy @beta\n */\nexport interface IDataObjectProps<I extends DataObjectTypes = DataObjectTypes> {\n\treadonly runtime: IFluidDataStoreRuntime;\n\treadonly context: IFluidDataStoreContext;\n\treadonly providers: AsyncFluidObjectProvider<I[\"OptionalProviders\"]>;\n\treadonly initProps?: I[\"InitialState\"];\n}\n\n/**\n * An object that has a factory that can create a data object.\n * @typeParam T - The type of the data object.\n * @internal\n */\nexport type DataObjectKind<T = unknown> = {\n\treadonly factory: IFluidDataStoreFactory;\n} & (\n\t| {\n\t\t\t/**\n\t\t\t * Not actually used, but required for strong typing.\n\t\t\t */\n\t\t\treadonly makeCovariant?: T | undefined;\n\t }\n\t/**\n\t * Not actually used, but helps with strong typing.\n\t */\n\t| (new (\n\t\t\t...args: never[]\n\t ) => T)\n);\n"]}
package/lib/legacy.d.ts CHANGED
@@ -24,7 +24,7 @@
24
24
  */
25
25
 
26
26
  export {
27
- // @legacy APIs
27
+ // #region @legacyBeta APIs
28
28
  BaseContainerRuntimeFactory,
29
29
  BaseContainerRuntimeFactoryProps,
30
30
  ContainerRuntimeFactoryWithDefaultDataStore,
@@ -38,4 +38,5 @@ export {
38
38
  PureDataObjectFactory,
39
39
  TreeDataObject,
40
40
  TreeDataObjectFactory
41
+ // #endregion
41
42
  } from "./index.js";
@@ -5,7 +5,7 @@
5
5
  "toolPackages": [
6
6
  {
7
7
  "packageName": "@microsoft/api-extractor",
8
- "packageVersion": "7.52.8"
8
+ "packageVersion": "7.52.11"
9
9
  }
10
10
  ]
11
11
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluidframework/aqueduct",
3
- "version": "2.53.1",
3
+ "version": "2.61.0-355054",
4
4
  "description": "A set of implementations for Fluid Framework interfaces.",
5
5
  "homepage": "https://fluidframework.com",
6
6
  "repository": {
@@ -69,36 +69,36 @@
69
69
  "temp-directory": "nyc/.nyc_output"
70
70
  },
71
71
  "dependencies": {
72
- "@fluid-internal/client-utils": "~2.53.1",
73
- "@fluidframework/container-definitions": "~2.53.1",
74
- "@fluidframework/container-runtime": "~2.53.1",
75
- "@fluidframework/container-runtime-definitions": "~2.53.1",
76
- "@fluidframework/core-interfaces": "~2.53.1",
77
- "@fluidframework/core-utils": "~2.53.1",
78
- "@fluidframework/datastore": "~2.53.1",
79
- "@fluidframework/datastore-definitions": "~2.53.1",
80
- "@fluidframework/map": "~2.53.1",
81
- "@fluidframework/request-handler": "~2.53.1",
82
- "@fluidframework/runtime-definitions": "~2.53.1",
83
- "@fluidframework/runtime-utils": "~2.53.1",
84
- "@fluidframework/shared-object-base": "~2.53.1",
85
- "@fluidframework/synthesize": "~2.53.1",
86
- "@fluidframework/telemetry-utils": "~2.53.1",
87
- "@fluidframework/tree": "~2.53.1"
72
+ "@fluid-internal/client-utils": "2.61.0-355054",
73
+ "@fluidframework/container-definitions": "2.61.0-355054",
74
+ "@fluidframework/container-runtime": "2.61.0-355054",
75
+ "@fluidframework/container-runtime-definitions": "2.61.0-355054",
76
+ "@fluidframework/core-interfaces": "2.61.0-355054",
77
+ "@fluidframework/core-utils": "2.61.0-355054",
78
+ "@fluidframework/datastore": "2.61.0-355054",
79
+ "@fluidframework/datastore-definitions": "2.61.0-355054",
80
+ "@fluidframework/map": "2.61.0-355054",
81
+ "@fluidframework/request-handler": "2.61.0-355054",
82
+ "@fluidframework/runtime-definitions": "2.61.0-355054",
83
+ "@fluidframework/runtime-utils": "2.61.0-355054",
84
+ "@fluidframework/shared-object-base": "2.61.0-355054",
85
+ "@fluidframework/synthesize": "2.61.0-355054",
86
+ "@fluidframework/telemetry-utils": "2.61.0-355054",
87
+ "@fluidframework/tree": "2.61.0-355054"
88
88
  },
89
89
  "devDependencies": {
90
90
  "@arethetypeswrong/cli": "^0.17.1",
91
91
  "@biomejs/biome": "~1.9.3",
92
- "@fluid-internal/mocha-test-setup": "~2.53.1",
93
- "@fluid-tools/build-cli": "^0.57.0",
94
- "@fluidframework/aqueduct-previous": "npm:@fluidframework/aqueduct@2.53.0",
92
+ "@fluid-internal/mocha-test-setup": "2.61.0-355054",
93
+ "@fluid-tools/build-cli": "^0.58.2",
94
+ "@fluidframework/aqueduct-previous": "npm:@fluidframework/aqueduct@2.60.0",
95
95
  "@fluidframework/build-common": "^2.0.3",
96
- "@fluidframework/build-tools": "^0.57.0",
97
- "@fluidframework/eslint-config-fluid": "^5.7.4",
98
- "@microsoft/api-extractor": "7.52.8",
96
+ "@fluidframework/build-tools": "^0.58.2",
97
+ "@fluidframework/eslint-config-fluid": "^6.0.0",
98
+ "@microsoft/api-extractor": "7.52.11",
99
99
  "@types/mocha": "^10.0.10",
100
100
  "@types/node": "^18.19.0",
101
- "c8": "^8.0.1",
101
+ "c8": "^10.1.3",
102
102
  "concurrently": "^8.2.1",
103
103
  "copyfiles": "^2.4.1",
104
104
  "cross-env": "^7.0.3",
@@ -114,8 +114,8 @@
114
114
  },
115
115
  "scripts": {
116
116
  "api": "fluid-build . --task api",
117
- "api-extractor:commonjs": "flub generate entrypoints --outDir ./dist",
118
- "api-extractor:esnext": "flub generate entrypoints --outDir ./lib --node10TypeCompat",
117
+ "api-extractor:commonjs": "flub generate entrypoints --outFileLegacyBeta legacy --outDir ./dist",
118
+ "api-extractor:esnext": "flub generate entrypoints --outFileLegacyBeta legacy --outDir ./lib --node10TypeCompat",
119
119
  "build": "fluid-build . --task build",
120
120
  "build:api-reports": "concurrently \"npm:build:api-reports:*\"",
121
121
  "build:api-reports:current": "api-extractor run --local --config api-extractor/api-extractor.current.json",
@@ -150,8 +150,8 @@
150
150
  "test": "npm run test:mocha",
151
151
  "test:coverage": "c8 npm test",
152
152
  "test:mocha": "npm run test:mocha:esm && echo skipping cjs to avoid overhead - npm run test:mocha:cjs",
153
- "test:mocha:cjs": "mocha --recursive \"dist/test/**/*.spec.*js\"",
154
- "test:mocha:esm": "mocha --recursive \"lib/test/**/*.spec.*js\"",
153
+ "test:mocha:cjs": "cross-env MOCHA_SPEC=dist/test mocha",
154
+ "test:mocha:esm": "mocha",
155
155
  "test:mocha:verbose": "cross-env FLUID_TEST_VERBOSE=1 npm run test:mocha",
156
156
  "tsc": "fluid-tsc commonjs --project ./tsconfig.cjs.json && copyfiles -f ../../../common/build/build-common/src/cjs/package.json ./dist",
157
157
  "typetests:gen": "flub generate typetests --dir . -v",
@@ -36,7 +36,7 @@ import {
36
36
  /**
37
37
  * {@link BaseContainerRuntimeFactory} construction properties.
38
38
  * @legacy
39
- * @alpha
39
+ * @beta
40
40
  */
41
41
  export interface BaseContainerRuntimeFactoryProps {
42
42
  /**
@@ -74,7 +74,7 @@ export interface BaseContainerRuntimeFactoryProps {
74
74
  * request handlers, runtimeOptions, and entryPoint initialization function.
75
75
  * It can be subclassed to implement a first-time initialization procedure for the containers it creates.
76
76
  * @legacy
77
- * @alpha
77
+ * @beta
78
78
  */
79
79
  export class BaseContainerRuntimeFactory
80
80
  extends RuntimeFactoryHelper
@@ -34,7 +34,7 @@ async function getDefaultFluidObject(runtime: IContainerRuntime): Promise<FluidO
34
34
  /**
35
35
  * {@link ContainerRuntimeFactoryWithDefaultDataStore} construction properties.
36
36
  * @legacy
37
- * @alpha
37
+ * @beta
38
38
  */
39
39
  export interface ContainerRuntimeFactoryWithDefaultDataStoreProps {
40
40
  defaultFactory: IFluidDataStoreFactory;
@@ -69,7 +69,7 @@ export interface ContainerRuntimeFactoryWithDefaultDataStoreProps {
69
69
  *
70
70
  * This factory should be exposed as fluidExport off the entry point to your module.
71
71
  * @legacy
72
- * @alpha
72
+ * @beta
73
73
  */
74
74
  export class ContainerRuntimeFactoryWithDefaultDataStore extends BaseContainerRuntimeFactory {
75
75
  public static readonly defaultDataStoreId = defaultDataStoreId;
@@ -29,7 +29,7 @@ import {
29
29
  * @typeParam TObj - DataObject (concrete type)
30
30
  * @typeParam I - The input types for the DataObject
31
31
  * @legacy
32
- * @alpha
32
+ * @beta
33
33
  */
34
34
  export class DataObjectFactory<
35
35
  TObj extends DataObject<I>,
@@ -145,8 +145,7 @@ async function createDataObject<
145
145
  * registry entries, and the runtime class to use for the data object.
146
146
  * @typeParam TObj - DataObject (concrete type)
147
147
  * @typeParam I - The input types for the DataObject
148
- * @legacy
149
- * @alpha
148
+ * @legacy @beta
150
149
  */
151
150
  export interface DataObjectFactoryProps<
152
151
  TObj extends PureDataObject<I>,
@@ -198,8 +197,7 @@ export interface DataObjectFactoryProps<
198
197
  *
199
198
  * @typeParam TObj - DataObject (concrete type)
200
199
  * @typeParam I - The input types for the DataObject
201
- * @legacy
202
- * @alpha
200
+ * @legacy @beta
203
201
  */
204
202
  export class PureDataObjectFactory<
205
203
  TObj extends PureDataObject<I>,
@@ -18,7 +18,7 @@ import {
18
18
  * @typeParam TDataObject - The concrete TreeDataObject implementation.
19
19
  * @typeParam TDataObjectTypes - The input types for the DataObject
20
20
  *
21
- * @legacy @alpha
21
+ * @legacy @beta
22
22
  */
23
23
  export class TreeDataObjectFactory<
24
24
  TDataObject extends TreeDataObject<TDataObjectTypes>,
@@ -22,7 +22,7 @@ import type { DataObjectTypes } from "./types.js";
22
22
  *
23
23
  * @typeParam I - The optional input types used to strongly type the data object
24
24
  * @legacy
25
- * @alpha
25
+ * @beta
26
26
  */
27
27
  export abstract class DataObject<
28
28
  I extends DataObjectTypes = DataObjectTypes,
@@ -31,8 +31,7 @@ import type { DataObjectTypes, IDataObjectProps } from "./types.js";
31
31
  * you are creating another base data store class.
32
32
  *
33
33
  * @typeParam I - The optional input types used to strongly type the data object
34
- * @legacy
35
- * @alpha
34
+ * @legacy @beta
36
35
  */
37
36
  export abstract class PureDataObject<I extends DataObjectTypes = DataObjectTypes>
38
37
  extends TypedEventEmitter<I["Events"] & IEvent>
@@ -57,7 +57,7 @@ const uninitializedErrorString =
57
57
  * }
58
58
  * ```
59
59
  *
60
- * @legacy @alpha
60
+ * @legacy @beta
61
61
  */
62
62
  export abstract class TreeDataObject<
63
63
  TDataObjectTypes extends DataObjectTypes = DataObjectTypes,
@@ -13,8 +13,7 @@ import type { AsyncFluidObjectProvider } from "@fluidframework/synthesize/intern
13
13
 
14
14
  /**
15
15
  * This type is used as the base generic input to DataObject and PureDataObject.
16
- * @legacy
17
- * @alpha
16
+ * @legacy @beta
18
17
  */
19
18
  export interface DataObjectTypes {
20
19
  /**
@@ -34,8 +33,7 @@ export interface DataObjectTypes {
34
33
  }
35
34
 
36
35
  /**
37
- * @legacy
38
- * @alpha
36
+ * @legacy @beta
39
37
  */
40
38
  export interface IDataObjectProps<I extends DataObjectTypes = DataObjectTypes> {
41
39
  readonly runtime: IFluidDataStoreRuntime;