@fluidframework/aqueduct 2.0.0-internal.6.1.1 → 2.0.0-internal.6.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -11,9 +11,10 @@ When taking a dependency on a Fluid Framework library, we recommend using a `^`
11
11
  While Fluid Framework libraries may use different ranges with interdependencies between other Fluid Framework libraries,
12
12
  library consumers should always prefer `^`.
13
13
 
14
- Note that when depending on a library version of the form 2.0.0-internal.x.y.z, called the Fluid internal version
15
- scheme, you must use a `>= <` dependency range. Standard `^` and `~` ranges will not work as expected. See the
16
- [@fluid-tools/version-tools](https://github.com/microsoft/FluidFramework/blob/main/build-tools/packages/version-tools/README.md)
14
+ Note that when depending on a library version of the form `2.0.0-internal.x.y.z`, called the Fluid internal version scheme,
15
+ you must use a `>= <` dependency range (such as `>=2.0.0-internal.x.y.z <2.0.0-internal.w.0.0` where `w` is `x+1`).
16
+ Standard `^` and `~` ranges will not work as expected.
17
+ See the [@fluid-tools/version-tools](https://github.com/microsoft/FluidFramework/blob/main/build-tools/packages/version-tools/README.md)
17
18
  package for more information including tools to convert between version schemes.
18
19
 
19
20
  <!-- prettier-ignore-end -->
@@ -1 +1 @@
1
- {"version":3,"file":"baseContainerRuntimeFactory.d.ts","sourceRoot":"","sources":["../../src/container-runtime-factories/baseContainerRuntimeFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAC;AAC1E,OAAO,EACN,wBAAwB,EAExB,gBAAgB,EAChB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;AAClF,OAAO,EAAE,qBAAqB,EAA8B,MAAM,iCAAiC,CAAC;AACpG,OAAO,EACN,uBAAuB,EACvB,8BAA8B,EAC9B,kCAAkC,EAClC,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAEN,2BAA2B,EAE3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AAC,OAAO,EAAE,iBAAiB;IAEzE;;;;OAIG;cACa,uBAAuB,CAAC,OAAO,EAAE,iBAAiB;CAClE"}
@@ -48,14 +48,16 @@ class BaseContainerRuntimeFactory extends runtime_utils_1.RuntimeFactoryHelper {
48
48
  const dc = new synthesize_1.DependencyContainer(this.dependencyContainer, scope.IFluidDependencySynthesizer);
49
49
  scope.IFluidDependencySynthesizer = dc;
50
50
  }
51
+ const augment = this.initializeEntryPoint
52
+ ? { initializeEntryPoint: this.initializeEntryPoint }
53
+ : { requestHandler: (0, request_handler_1.buildRuntimeRequestHandler)(...this.requestHandlers) };
51
54
  return container_runtime_1.ContainerRuntime.loadRuntime({
52
55
  context,
53
- requestHandler: (0, request_handler_1.buildRuntimeRequestHandler)(...this.requestHandlers),
54
56
  existing,
55
57
  runtimeOptions: this.runtimeOptions,
56
58
  registryEntries: this.registryEntries,
57
59
  containerScope: scope,
58
- initializeEntryPoint: this.initializeEntryPoint,
60
+ ...augment,
59
61
  });
60
62
  }
61
63
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"baseContainerRuntimeFactory.js","sourceRoot":"","sources":["../../src/container-runtime-factories/baseContainerRuntimeFactory.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAGH,yEAI2C;AAE3C,qEAAoG;AAMpG,2DAIoC;AACpC,iEAAqE;AAGrE;;;;GAIG;AACH,MAAa,2BACZ,SAAQ,oCAAoB;IAQ5B;;;;;;;OAOG;IACH,YACkB,eAAmD,EACnD,mBAAiD,EACjD,kBAA2C,EAAE,EAC7C,cAAyC,EACzC,oBAEQ;QAEzB,KAAK,EAAE,CAAC;QARS,oBAAe,GAAf,eAAe,CAAoC;QACnD,wBAAmB,GAAnB,mBAAmB,CAA8B;QACjD,oBAAe,GAAf,eAAe,CAA8B;QAC7C,mBAAc,GAAd,cAAc,CAA2B;QACzC,yBAAoB,GAApB,oBAAoB,CAEZ;QAGzB,IAAI,CAAC,QAAQ,GAAG,IAAI,0CAAsB,CAAC,eAAe,CAAC,CAAC;IAC7D,CAAC;IAxBD,IAAW,uBAAuB;QACjC,OAAO,IAAI,CAAC,QAAQ,CAAC;IACtB,CAAC;IAwBM,KAAK,CAAC,oBAAoB,CAAC,OAAyB;QAC1D,MAAM,IAAI,CAAC,8BAA8B,CAAC,OAAO,CAAC,CAAC;QACnD,MAAM,IAAI,CAAC,uBAAuB,CAAC,OAAO,CAAC,CAAC;IAC7C,CAAC;IAEM,KAAK,CAAC,uBAAuB,CAAC,OAAyB;QAC7D,MAAM,IAAI,CAAC,uBAAuB,CAAC,OAAO,CAAC,CAAC;IAC7C,CAAC;IAEM,KAAK,CAAC,aAAa,CACzB,OAA0B,EAC1B,QAAiB;QAEjB,MAAM,KAAK,GAAgD,OAAO,CAAC,KAAK,CAAC;QACzE,IAAI,IAAI,CAAC,mBAAmB,EAAE;YAC7B,MAAM,EAAE,GAAG,IAAI,gCAAmB,CACjC,IAAI,CAAC,mBAAmB,EACxB,KAAK,CAAC,2BAA2B,CACjC,CAAC;YACF,KAAK,CAAC,2BAA2B,GAAG,EAAE,CAAC;SACvC;QACD,OAAO,oCAAgB,CAAC,WAAW,CAAC;YACnC,OAAO;YACP,cAAc,EAAE,IAAA,4CAA0B,EAAC,GAAG,IAAI,CAAC,eAAe,CAAC;YACnE,QAAQ;YACR,cAAc,EAAE,IAAI,CAAC,cAAc;YACnC,eAAe,EAAE,IAAI,CAAC,eAAe;YACrC,cAAc,EAAE,KAAK;YACrB,oBAAoB,EAAE,IAAI,CAAC,oBAAoB;SAC/C,CAAC,CAAC;IACJ,CAAC;IAED;;;;OAIG;IACO,KAAK,CAAC,8BAA8B,CAAC,OAA0B,IAAG,CAAC;IAE7E;;;;OAIG;IACO,KAAK,CAAC,uBAAuB,CAAC,OAA0B,IAAG,CAAC;CACtE;AA3ED,kEA2EC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IContainerContext } from \"@fluidframework/container-definitions\";\nimport {\n\tIContainerRuntimeOptions,\n\tFluidDataStoreRegistry,\n\tContainerRuntime,\n} from \"@fluidframework/container-runtime\";\nimport { IContainerRuntime } from \"@fluidframework/container-runtime-definitions\";\nimport { RuntimeRequestHandler, buildRuntimeRequestHandler } from \"@fluidframework/request-handler\";\nimport {\n\tIFluidDataStoreRegistry,\n\tIProvideFluidDataStoreRegistry,\n\tNamedFluidDataStoreRegistryEntries,\n} from \"@fluidframework/runtime-definitions\";\nimport {\n\tDependencyContainer,\n\tIFluidDependencySynthesizer,\n\tIProvideFluidDependencySynthesizer,\n} from \"@fluidframework/synthesize\";\nimport { RuntimeFactoryHelper } from \"@fluidframework/runtime-utils\";\nimport { FluidObject } from \"@fluidframework/core-interfaces\";\n\n/**\n * BaseContainerRuntimeFactory produces container runtimes with the specified data store and service registries,\n * request handlers, runtimeOptions, and entryPoint initialization function.\n * It can be subclassed to implement a first-time initialization procedure for the containers it creates.\n */\nexport class BaseContainerRuntimeFactory\n\textends RuntimeFactoryHelper\n\timplements IProvideFluidDataStoreRegistry\n{\n\tpublic get IFluidDataStoreRegistry() {\n\t\treturn this.registry;\n\t}\n\tprivate readonly registry: IFluidDataStoreRegistry;\n\n\t/**\n\t * @param registryEntries - The data store registry for containers produced\n\t * @param dependencyContainer - deprecated, will be removed in a future release\n\t * @param requestHandlers - Request handlers for containers produced\n\t * @param runtimeOptions - The runtime options passed to the ContainerRuntime when instantiating it\n\t * @param initializeEntryPoint - Function that will initialize the entryPoint of the ContainerRuntime instances\n\t * created with this factory\n\t */\n\tconstructor(\n\t\tprivate readonly registryEntries: NamedFluidDataStoreRegistryEntries,\n\t\tprivate readonly dependencyContainer?: IFluidDependencySynthesizer,\n\t\tprivate readonly requestHandlers: RuntimeRequestHandler[] = [],\n\t\tprivate readonly runtimeOptions?: IContainerRuntimeOptions,\n\t\tprivate readonly initializeEntryPoint?: (\n\t\t\truntime: IContainerRuntime,\n\t\t) => Promise<FluidObject>,\n\t) {\n\t\tsuper();\n\t\tthis.registry = new FluidDataStoreRegistry(registryEntries);\n\t}\n\n\tpublic async instantiateFirstTime(runtime: ContainerRuntime): Promise<void> {\n\t\tawait this.containerInitializingFirstTime(runtime);\n\t\tawait this.containerHasInitialized(runtime);\n\t}\n\n\tpublic async instantiateFromExisting(runtime: ContainerRuntime): Promise<void> {\n\t\tawait this.containerHasInitialized(runtime);\n\t}\n\n\tpublic async preInitialize(\n\t\tcontext: IContainerContext,\n\t\texisting: boolean,\n\t): Promise<ContainerRuntime> {\n\t\tconst scope: Partial<IProvideFluidDependencySynthesizer> = context.scope;\n\t\tif (this.dependencyContainer) {\n\t\t\tconst dc = new DependencyContainer<FluidObject>(\n\t\t\t\tthis.dependencyContainer,\n\t\t\t\tscope.IFluidDependencySynthesizer,\n\t\t\t);\n\t\t\tscope.IFluidDependencySynthesizer = dc;\n\t\t}\n\t\treturn ContainerRuntime.loadRuntime({\n\t\t\tcontext,\n\t\t\trequestHandler: buildRuntimeRequestHandler(...this.requestHandlers),\n\t\t\texisting,\n\t\t\truntimeOptions: this.runtimeOptions,\n\t\t\tregistryEntries: this.registryEntries,\n\t\t\tcontainerScope: scope,\n\t\t\tinitializeEntryPoint: this.initializeEntryPoint,\n\t\t});\n\t}\n\n\t/**\n\t * Subclasses may override containerInitializingFirstTime to perform any setup steps at the time the container\n\t * is created. This likely includes creating any initial data stores that are expected to be there at the outset.\n\t * @param runtime - The container runtime for the container being initialized\n\t */\n\tprotected async containerInitializingFirstTime(runtime: IContainerRuntime) {}\n\n\t/**\n\t * Subclasses may override containerHasInitialized to perform any steps after the container has initialized.\n\t * This likely includes loading any data stores that are expected to be there at the outset.\n\t * @param runtime - The container runtime for the container being initialized\n\t */\n\tprotected async containerHasInitialized(runtime: IContainerRuntime) {}\n}\n"]}
1
+ {"version":3,"file":"baseContainerRuntimeFactory.js","sourceRoot":"","sources":["../../src/container-runtime-factories/baseContainerRuntimeFactory.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAGH,yEAI2C;AAE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rD,CAAC,CAAC,EAAE,cAAc,EAAE,IAAA,4CAA0B,EAAC,GAAG,IAAI,CAAC,eAAe,CAAC,EAAE,CAAC;QAE3E,OAAO,oCAAgB,CAAC,WAAW,CAAC;YACnC,OAAO;YACP,QAAQ;YACR,cAAc,EAAE,IAAI,CAAC,cAAc;YACnC,eAAe,EAAE,IAAI,CAAC,eAAe;YACrC,cAAc,EAAE,KAAK;YACrB,GAAG,OAAO;SACV,CAAC,CAAC;IACJ,CAAC;IAED;;;;OAIG;IACO,KAAK,CAAC,8BAA8B,CAAC,OAA0B,IAAG,CAAC;IAE7E;;;;OAIG;IACO,KAAK,CAAC,uBAAuB,CAAC,OAA0B,IAAG,CAAC;CACtE;AA/ED,kEA+EC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IContainerContext } from \"@fluidframework/container-definitions\";\nimport {\n\tIContainerRuntimeOptions,\n\tFluidDataStoreRegistry,\n\tContainerRuntime,\n} from \"@fluidframework/container-runtime\";\nimport { IContainerRuntime } from \"@fluidframework/container-runtime-definitions\";\nimport { RuntimeRequestHandler, buildRuntimeRequestHandler } from \"@fluidframework/request-handler\";\nimport {\n\tIFluidDataStoreRegistry,\n\tIProvideFluidDataStoreRegistry,\n\tNamedFluidDataStoreRegistryEntries,\n} from \"@fluidframework/runtime-definitions\";\nimport {\n\tDependencyContainer,\n\tIFluidDependencySynthesizer,\n\tIProvideFluidDependencySynthesizer,\n} from \"@fluidframework/synthesize\";\nimport { RuntimeFactoryHelper } from \"@fluidframework/runtime-utils\";\nimport { FluidObject } from \"@fluidframework/core-interfaces\";\n\n/**\n * BaseContainerRuntimeFactory produces container runtimes with the specified data store and service registries,\n * request handlers, runtimeOptions, and entryPoint initialization function.\n * It can be subclassed to implement a first-time initialization procedure for the containers it creates.\n */\nexport class BaseContainerRuntimeFactory\n\textends RuntimeFactoryHelper\n\timplements IProvideFluidDataStoreRegistry\n{\n\tpublic get IFluidDataStoreRegistry() {\n\t\treturn this.registry;\n\t}\n\tprivate readonly registry: IFluidDataStoreRegistry;\n\n\t/**\n\t * @param registryEntries - The data store registry for containers produced\n\t * @param dependencyContainer - deprecated, will be removed in a future release\n\t * @param requestHandlers - Request handlers for containers produced\n\t * @param runtimeOptions - The runtime options passed to the ContainerRuntime when instantiating it\n\t * @param initializeEntryPoint - Function that will initialize the entryPoint of the ContainerRuntime instances\n\t * created with this factory\n\t */\n\tconstructor(\n\t\tprivate readonly registryEntries: NamedFluidDataStoreRegistryEntries,\n\t\tprivate readonly dependencyContainer?: IFluidDependencySynthesizer,\n\t\tprivate readonly requestHandlers: RuntimeRequestHandler[] = [],\n\t\tprivate readonly runtimeOptions?: IContainerRuntimeOptions,\n\t\tprivate readonly initializeEntryPoint?: (\n\t\t\truntime: IContainerRuntime,\n\t\t) => Promise<FluidObject>,\n\t) {\n\t\tsuper();\n\t\tthis.registry = new FluidDataStoreRegistry(registryEntries);\n\t}\n\n\tpublic async instantiateFirstTime(runtime: ContainerRuntime): Promise<void> {\n\t\tawait this.containerInitializingFirstTime(runtime);\n\t\tawait this.containerHasInitialized(runtime);\n\t}\n\n\tpublic async instantiateFromExisting(runtime: ContainerRuntime): Promise<void> {\n\t\tawait this.containerHasInitialized(runtime);\n\t}\n\n\tpublic async preInitialize(\n\t\tcontext: IContainerContext,\n\t\texisting: boolean,\n\t): Promise<ContainerRuntime> {\n\t\tconst scope: Partial<IProvideFluidDependencySynthesizer> = context.scope;\n\t\tif (this.dependencyContainer) {\n\t\t\tconst dc = new DependencyContainer<FluidObject>(\n\t\t\t\tthis.dependencyContainer,\n\t\t\t\tscope.IFluidDependencySynthesizer,\n\t\t\t);\n\t\t\tscope.IFluidDependencySynthesizer = dc;\n\t\t}\n\n\t\tconst augment = this.initializeEntryPoint\n\t\t\t? { initializeEntryPoint: this.initializeEntryPoint }\n\t\t\t: { requestHandler: buildRuntimeRequestHandler(...this.requestHandlers) };\n\n\t\treturn ContainerRuntime.loadRuntime({\n\t\t\tcontext,\n\t\t\texisting,\n\t\t\truntimeOptions: this.runtimeOptions,\n\t\t\tregistryEntries: this.registryEntries,\n\t\t\tcontainerScope: scope,\n\t\t\t...augment,\n\t\t});\n\t}\n\n\t/**\n\t * Subclasses may override containerInitializingFirstTime to perform any setup steps at the time the container\n\t * is created. This likely includes creating any initial data stores that are expected to be there at the outset.\n\t * @param runtime - The container runtime for the container being initialized\n\t */\n\tprotected async containerInitializingFirstTime(runtime: IContainerRuntime) {}\n\n\t/**\n\t * Subclasses may override containerHasInitialized to perform any steps after the container has initialized.\n\t * This likely includes loading any data stores that are expected to be there at the outset.\n\t * @param runtime - The container runtime for the container being initialized\n\t */\n\tprotected async containerHasInitialized(runtime: IContainerRuntime) {}\n}\n"]}
@@ -3,9 +3,8 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
  import type { EventEmitter } from "events";
6
- import { IEvent, IEventProvider } from "@fluidframework/common-definitions";
7
6
  import { EventForwarder } from "@fluidframework/common-utils";
8
- import { IFluidHandle, IFluidLoadable, IFluidRouter, IProvideFluidHandle, IRequest, IResponse } from "@fluidframework/core-interfaces";
7
+ import { IEvent, IEventProvider, IFluidHandle, IFluidLoadable, IFluidRouter, IProvideFluidHandle, IRequest, IResponse } from "@fluidframework/core-interfaces";
9
8
  import { IFluidDataStoreRuntime } from "@fluidframework/datastore-definitions";
10
9
  import { IFluidDataStoreContext } from "@fluidframework/runtime-definitions";
11
10
  import { AsyncFluidObjectProvider } from "@fluidframework/synthesize";
@@ -1 +1 @@
1
- {"version":3,"file":"pureDataObject.d.ts","sourceRoot":"","sources":["../../src/data-objects/pureDataObject.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AAC5E,OAAO,EAAU,cAAc,EAAE,MAAM,8BAA8B,CAAC;AACtE,OA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GG;IACO,KAAK,CAAC,wBAAwB,KAAmB,CAAC;IAE5D;;OAEG;IACO,KAAK,CAAC,cAAc,KAAmB,CAAC;IAElD;;;OAGG;IACI,OAAO;QACb,KAAK,CAAC,OAAO,EAAE,CAAC;IACjB,CAAC;IAED;;;OAGG;IACO,MAAM,CAAC,cAAc,CAAC,KAAa;QAC5C,OAAO,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;IACpC,CAAC;IAED;;;OAGG;IACO,YAAY,CACrB,MAA2D,EAC3D,GAAG,MAAgB;QAEnB,KAAK,CAAC,YAAY,CAAC,MAAM,EAAE,GAAG,MAAM,CAAC,CAAC;IACvC,CAAC;IAED;;;OAGG;IACO,cAAc,CACvB,MAA2D,EAC3D,GAAG,MAAgB;QAEnB,KAAK,CAAC,cAAc,CAAC,MAAM,EAAE,GAAG,MAAM,CAAC,CAAC;IACzC,CAAC;CACD;AA3MD,wCA2MC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { EventEmitter } from \"events\";\nimport { IEvent, IEventProvider } from \"@fluidframework/common-definitions\";\nimport { assert, EventForwarder } from \"@fluidframework/common-utils\";\nimport {\n\tIFluidHandle,\n\tIFluidLoadable,\n\tIFluidRouter,\n\tIProvideFluidHandle,\n\tIRequest,\n\tIResponse,\n} from \"@fluidframework/core-interfaces\";\nimport { IFluidDataStoreRuntime } from \"@fluidframework/datastore-definitions\";\nimport { IFluidDataStoreContext } from \"@fluidframework/runtime-definitions\";\nimport { AsyncFluidObjectProvider } from \"@fluidframework/synthesize\";\nimport { defaultFluidObjectRequestHandler } from \"../request-handlers\";\nimport { DataObjectTypes, IDataObjectProps } from \"./types\";\n\n/**\n * This is a bare-bones base class that does basic setup and enables for factory on an initialize call.\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 */\nexport abstract class PureDataObject<I extends DataObjectTypes = DataObjectTypes>\n\textends EventForwarder<I[\"Events\"] & IEvent>\n\timplements IFluidLoadable, IFluidRouter, IProvideFluidHandle\n{\n\tprivate _disposed = false;\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 ContainerRuntime\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\tprotected initializeP: Promise<void> | undefined;\n\n\t/**\n\t * @deprecated 2.0.0-internal.5.2.0 - PureDataObject does not provide a functioning built-in disposed flow.\n\t * This member will be removed in an upcoming release.\n\t */\n\tpublic get disposed() {\n\t\treturn this._disposed;\n\t}\n\n\tpublic get id() {\n\t\treturn this.runtime.id;\n\t}\n\tpublic get IFluidRouter() {\n\t\treturn this;\n\t}\n\tpublic get IFluidLoadable() {\n\t\treturn this;\n\t}\n\tpublic get IFluidHandle() {\n\t\treturn this.handle;\n\t}\n\n\t/**\n\t * Handle to a data store\n\t */\n\tpublic get handle(): IFluidHandle<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 IFluidHandle<this>;\n\t}\n\n\tpublic static async getDataObject(runtime: IFluidDataStoreRuntime) {\n\t\tconst obj = await runtime.entryPoint?.get();\n\t\tassert(obj !== undefined, 0x0bc /* \"The runtime's handle is not initialized yet!\" */);\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\n\t\tassert(\n\t\t\t(this.runtime as any)._dataObject === undefined,\n\t\t\t0x0bd /* \"Object runtime already has DataObject!\" */,\n\t\t);\n\t\t(this.runtime as any)._dataObject = this;\n\n\t\t// Container event handlers\n\t\tthis.runtime.once(\"dispose\", () => {\n\t\t\tthis._disposed = true;\n\t\t\tthis.dispose();\n\t\t});\n\t}\n\n\t// #region IFluidRouter\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 defaultFluidObjectRequestHandler(this, req);\n\t}\n\n\t// #endregion IFluidRouter\n\n\t/**\n\t * Call 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 call this API to ensure object is fully initialized.\n\t */\n\tpublic async finishInitialization(existing: boolean): Promise<void> {\n\t\tif (this.initializeP !== undefined) {\n\t\t\treturn this.initializeP;\n\t\t}\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\t/**\n\t * Called when the host container closes and disposes itself\n\t * @deprecated 2.0.0-internal.5.2.0 - Dispose does nothing and will be removed in an upcoming release.\n\t */\n\tpublic dispose(): void {\n\t\tsuper.dispose();\n\t}\n\n\t/**\n\t * @deprecated 2.0.0-internal.5.2.0 - PureDataObject does not actually set up to forward events, and will not be an EventForwarder\n\t * in a future release.\n\t */\n\tprotected static isEmitterEvent(event: string): boolean {\n\t\treturn super.isEmitterEvent(event);\n\t}\n\n\t/**\n\t * @deprecated 2.0.0-internal.5.2.0 - PureDataObject does not actually set up to forward events, and will not be an EventForwarder\n\t * in a future release.\n\t */\n\tprotected forwardEvent(\n\t\tsource: EventEmitter | IEventProvider<I[\"Events\"] & IEvent>,\n\t\t...events: string[]\n\t): void {\n\t\tsuper.forwardEvent(source, ...events);\n\t}\n\n\t/**\n\t * @deprecated 2.0.0-internal.5.2.0 - PureDataObject does not actually set up to forward events, and will not be an EventForwarder\n\t * in a future release.\n\t */\n\tprotected unforwardEvent(\n\t\tsource: EventEmitter | IEventProvider<I[\"Events\"] & IEvent>,\n\t\t...events: string[]\n\t): void {\n\t\tsuper.unforwardEvent(source, ...events);\n\t}\n}\n"]}
1
+ {"version":3,"file":"pureDataObject.js","sourceRoot":"","sources":["../../src/data-objects/pureDataObject.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAGH,+DAAsE;AActE,0DAAuE;AAGvE;;;;;;GAMG;AACH,MAAsB,cACrB,SAAQ,6BAAoC;IAkE5C,YAAmB,KAA0B;QAC5C,KAAK,EAAE,CAAC;QAhED,cAAS,GAAG,KAAK,CAAC;QAiEzB,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC;QAC7B,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC;QAC7B,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC,SAAS,CAAC;QACjC,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC,SAAS,CAAC;QAEjC,IAAA,qBAAM,EACJ,IAAI,CAAC,OAAe,CAAC,WAAW,KAAK,SAAS,EAC/C,KAAK,CAAC,8CAA8C,CACpD,CAAC;QACD,IAAI,CAAC,OAAe,CAAC,WAAW,GAAG,IAAI,CAAC;QAEzC,2BAA2B;QAC3B,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,EAAE,GAAG,EAAE;YACjC,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;YACtB,IAAI,CAAC,OAAO,EAAE,CAAC;QAChB,CAAC,CAAC,CAAC;IACJ,CAAC;IAxDD;;;OAGG;IACH,IAAW,QAAQ;QAClB,OAAO,IAAI,CAAC,SAAS,CAAC;IACvB,CAAC;IAED,IAAW,EAAE;QACZ,OAAO,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC;IACxB,CAAC;IACD,IAAW,YAAY;QACtB,OAAO,IAAI,CAAC;IACb,CAAC;IACD,IAAW,cAAc;QACxB,OAAO,IAAI,CAAC;IACb,CAAC;IACD,IAAW,YAAY;QACtB,OAAO,IAAI,CAAC,MAAM,CAAC;IACpB,CAAC;IAED;;OAEG;IACH,IAAW,M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AAI,IAAI,CAAC,SAAS,CACjE,CAAC;SACF;QACD,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC;IAC7B,CAAC;IAED;;;OAGG;IACO,KAAK,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;IAElD;;;OAGG;IACI,OAAO;QACb,KAAK,CAAC,OAAO,EAAE,CAAC;IACjB,CAAC;IAED;;;OAGG;IACO,MAAM,CAAC,cAAc,CAAC,KAAa;QAC5C,OAAO,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;IACpC,CAAC;IAED;;;OAGG;IACO,YAAY,CACrB,MAA2D,EAC3D,GAAG,MAAgB;QAEnB,KAAK,CAAC,YAAY,CAAC,MAAM,EAAE,GAAG,MAAM,CAAC,CAAC;IACvC,CAAC;IAED;;;OAGG;IACO,cAAc,CACvB,MAA2D,EAC3D,GAAG,MAAgB;QAEnB,KAAK,CAAC,cAAc,CAAC,MAAM,EAAE,GAAG,MAAM,CAAC,CAAC;IACzC,CAAC;CACD;AA3MD,wCA2MC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { EventEmitter } from \"events\";\nimport { assert, EventForwarder } from \"@fluidframework/common-utils\";\nimport {\n\tIEvent,\n\tIEventProvider,\n\tIFluidHandle,\n\tIFluidLoadable,\n\tIFluidRouter,\n\tIProvideFluidHandle,\n\tIRequest,\n\tIResponse,\n} from \"@fluidframework/core-interfaces\";\nimport { IFluidDataStoreRuntime } from \"@fluidframework/datastore-definitions\";\nimport { IFluidDataStoreContext } from \"@fluidframework/runtime-definitions\";\nimport { AsyncFluidObjectProvider } from \"@fluidframework/synthesize\";\nimport { defaultFluidObjectRequestHandler } from \"../request-handlers\";\nimport { DataObjectTypes, IDataObjectProps } from \"./types\";\n\n/**\n * This is a bare-bones base class that does basic setup and enables for factory on an initialize call.\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 */\nexport abstract class PureDataObject<I extends DataObjectTypes = DataObjectTypes>\n\textends EventForwarder<I[\"Events\"] & IEvent>\n\timplements IFluidLoadable, IFluidRouter, IProvideFluidHandle\n{\n\tprivate _disposed = false;\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 ContainerRuntime\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\tprotected initializeP: Promise<void> | undefined;\n\n\t/**\n\t * @deprecated 2.0.0-internal.5.2.0 - PureDataObject does not provide a functioning built-in disposed flow.\n\t * This member will be removed in an upcoming release.\n\t */\n\tpublic get disposed() {\n\t\treturn this._disposed;\n\t}\n\n\tpublic get id() {\n\t\treturn this.runtime.id;\n\t}\n\tpublic get IFluidRouter() {\n\t\treturn this;\n\t}\n\tpublic get IFluidLoadable() {\n\t\treturn this;\n\t}\n\tpublic get IFluidHandle() {\n\t\treturn this.handle;\n\t}\n\n\t/**\n\t * Handle to a data store\n\t */\n\tpublic get handle(): IFluidHandle<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 IFluidHandle<this>;\n\t}\n\n\tpublic static async getDataObject(runtime: IFluidDataStoreRuntime) {\n\t\tconst obj = await runtime.entryPoint?.get();\n\t\tassert(obj !== undefined, 0x0bc /* \"The runtime's handle is not initialized yet!\" */);\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\n\t\tassert(\n\t\t\t(this.runtime as any)._dataObject === undefined,\n\t\t\t0x0bd /* \"Object runtime already has DataObject!\" */,\n\t\t);\n\t\t(this.runtime as any)._dataObject = this;\n\n\t\t// Container event handlers\n\t\tthis.runtime.once(\"dispose\", () => {\n\t\t\tthis._disposed = true;\n\t\t\tthis.dispose();\n\t\t});\n\t}\n\n\t// #region IFluidRouter\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 defaultFluidObjectRequestHandler(this, req);\n\t}\n\n\t// #endregion IFluidRouter\n\n\t/**\n\t * Call 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 call this API to ensure object is fully initialized.\n\t */\n\tpublic async finishInitialization(existing: boolean): Promise<void> {\n\t\tif (this.initializeP !== undefined) {\n\t\t\treturn this.initializeP;\n\t\t}\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\t/**\n\t * Called when the host container closes and disposes itself\n\t * @deprecated 2.0.0-internal.5.2.0 - Dispose does nothing and will be removed in an upcoming release.\n\t */\n\tpublic dispose(): void {\n\t\tsuper.dispose();\n\t}\n\n\t/**\n\t * @deprecated 2.0.0-internal.5.2.0 - PureDataObject does not actually set up to forward events, and will not be an EventForwarder\n\t * in a future release.\n\t */\n\tprotected static isEmitterEvent(event: string): boolean {\n\t\treturn super.isEmitterEvent(event);\n\t}\n\n\t/**\n\t * @deprecated 2.0.0-internal.5.2.0 - PureDataObject does not actually set up to forward events, and will not be an EventForwarder\n\t * in a future release.\n\t */\n\tprotected forwardEvent(\n\t\tsource: EventEmitter | IEventProvider<I[\"Events\"] & IEvent>,\n\t\t...events: string[]\n\t): void {\n\t\tsuper.forwardEvent(source, ...events);\n\t}\n\n\t/**\n\t * @deprecated 2.0.0-internal.5.2.0 - PureDataObject does not actually set up to forward events, and will not be an EventForwarder\n\t * in a future release.\n\t */\n\tprotected unforwardEvent(\n\t\tsource: EventEmitter | IEventProvider<I[\"Events\"] & IEvent>,\n\t\t...events: string[]\n\t): void {\n\t\tsuper.unforwardEvent(source, ...events);\n\t}\n}\n"]}
@@ -2,11 +2,10 @@
2
2
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
3
  * Licensed under the MIT License.
4
4
  */
5
- import { FluidObject } from "@fluidframework/core-interfaces";
5
+ import { IEvent, FluidObject } from "@fluidframework/core-interfaces";
6
6
  import { AsyncFluidObjectProvider } from "@fluidframework/synthesize";
7
7
  import { IFluidDataStoreContext } from "@fluidframework/runtime-definitions";
8
8
  import { IFluidDataStoreRuntime } from "@fluidframework/datastore-definitions";
9
- import { IEvent } from "@fluidframework/common-definitions";
10
9
  /**
11
10
  * This type is used as the base generic input to DataObject and PureDataObject.
12
11
  */
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/data-objects/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAC9D,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAE,sBAAsB,EAAE,MAAM,qCAAqC,CAAC;AAC7E,OAAO,EAAE,sBAAsB,EAAE,MAAM,uCAAuC,CAAC;AAC/E,OAAO,EAAE,MAAM,EAAE,MAAM,oCAAoC,CAAC;AAE5D;;GAEG;AACH,MAAM,WAAW,eAAe;IAC/B;;OAEG;IACH,iBAAiB,CAAC,EAAE,WAAW,CAAC;IAChC;;OAEG;IACH,YAAY,CAAC,EAAE,GAAG,CAAC;IACnB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,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"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/data-objects/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAE,sBAAsB,EAAE,MAAM,qCAAqC,CAAC;AAC7E,OAAO,EAAE,sBAAsB,EAAE,MAAM,uCAAuC,CAAC;AAE/E;;GAEG;AACH,MAAM,WAAW,eAAe;IAC/B;;OAEG;IACH,iBAAiB,CAAC,EAAE,WAAW,CAAC;IAChC;;OAEG;IACH,YAAY,CAAC,EAAE,GAAG,CAAC;IACnB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,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"}
@@ -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 { FluidObject } from \"@fluidframework/core-interfaces\";\nimport { AsyncFluidObjectProvider } from \"@fluidframework/synthesize\";\nimport { IFluidDataStoreContext } from \"@fluidframework/runtime-definitions\";\nimport { IFluidDataStoreRuntime } from \"@fluidframework/datastore-definitions\";\nimport { IEvent } from \"@fluidframework/common-definitions\";\n\n/**\n * This type is used as the base generic input to DataObject and PureDataObject.\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\tInitialState?: any;\n\t/**\n\t * represents events that will be available in the EventForwarder\n\t */\n\tEvents?: IEvent;\n}\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"]}
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 { IEvent, FluidObject } from \"@fluidframework/core-interfaces\";\nimport { AsyncFluidObjectProvider } from \"@fluidframework/synthesize\";\nimport { IFluidDataStoreContext } from \"@fluidframework/runtime-definitions\";\nimport { IFluidDataStoreRuntime } from \"@fluidframework/datastore-definitions\";\n\n/**\n * This type is used as the base generic input to DataObject and PureDataObject.\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\tInitialState?: any;\n\t/**\n\t * represents events that will be available in the EventForwarder\n\t */\n\tEvents?: IEvent;\n}\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"]}
@@ -45,14 +45,16 @@ export class BaseContainerRuntimeFactory extends RuntimeFactoryHelper {
45
45
  const dc = new DependencyContainer(this.dependencyContainer, scope.IFluidDependencySynthesizer);
46
46
  scope.IFluidDependencySynthesizer = dc;
47
47
  }
48
+ const augment = this.initializeEntryPoint
49
+ ? { initializeEntryPoint: this.initializeEntryPoint }
50
+ : { requestHandler: buildRuntimeRequestHandler(...this.requestHandlers) };
48
51
  return ContainerRuntime.loadRuntime({
49
52
  context,
50
- requestHandler: buildRuntimeRequestHandler(...this.requestHandlers),
51
53
  existing,
52
54
  runtimeOptions: this.runtimeOptions,
53
55
  registryEntries: this.registryEntries,
54
56
  containerScope: scope,
55
- initializeEntryPoint: this.initializeEntryPoint,
57
+ ...augment,
56
58
  });
57
59
  }
58
60
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"baseContainerRuntimeFactory.js","sourceRoot":"","sources":["../../src/container-runtime-factories/baseContainerRuntimeFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAEN,sBAAsB,EACtB,gBAAgB,GAChB,MAAM,mCAAmC,CAAC;AAE3C,OAAO,EAAyB,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAMpG,OAAO,EACN,mBAAmB,GAGnB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAGrE;;;;GAIG;AACH,MAAM,OAAO,2BACZ,SAAQ,oBAAoB;IAQ5B;;;;;;;OAOG;IACH,YACkB,eAAmD,EACnD,mBAAiD,EACjD,kBAA2C,EAAE,EAC7C,cAAyC,EACzC,oBAEQ;QAEzB,KAAK,EAAE,CAAC;QARS,oBAAe,GAAf,eAAe,CAAoC;QACnD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AIG;IACO,KAAK,CAAC,uBAAuB,CAAC,OAA0B,IAAG,CAAC;CACtE","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IContainerContext } from \"@fluidframework/container-definitions\";\nimport {\n\tIContainerRuntimeOptions,\n\tFluidDataStoreRegistry,\n\tContainerRuntime,\n} from \"@fluidframework/container-runtime\";\nimport { IContainerRuntime } from \"@fluidframework/container-runtime-definitions\";\nimport { RuntimeRequestHandler, buildRuntimeRequestHandler } from \"@fluidframework/request-handler\";\nimport {\n\tIFluidDataStoreRegistry,\n\tIProvideFluidDataStoreRegistry,\n\tNamedFluidDataStoreRegistryEntries,\n} from \"@fluidframework/runtime-definitions\";\nimport {\n\tDependencyContainer,\n\tIFluidDependencySynthesizer,\n\tIProvideFluidDependencySynthesizer,\n} from \"@fluidframework/synthesize\";\nimport { RuntimeFactoryHelper } from \"@fluidframework/runtime-utils\";\nimport { FluidObject } from \"@fluidframework/core-interfaces\";\n\n/**\n * BaseContainerRuntimeFactory produces container runtimes with the specified data store and service registries,\n * request handlers, runtimeOptions, and entryPoint initialization function.\n * It can be subclassed to implement a first-time initialization procedure for the containers it creates.\n */\nexport class BaseContainerRuntimeFactory\n\textends RuntimeFactoryHelper\n\timplements IProvideFluidDataStoreRegistry\n{\n\tpublic get IFluidDataStoreRegistry() {\n\t\treturn this.registry;\n\t}\n\tprivate readonly registry: IFluidDataStoreRegistry;\n\n\t/**\n\t * @param registryEntries - The data store registry for containers produced\n\t * @param dependencyContainer - deprecated, will be removed in a future release\n\t * @param requestHandlers - Request handlers for containers produced\n\t * @param runtimeOptions - The runtime options passed to the ContainerRuntime when instantiating it\n\t * @param initializeEntryPoint - Function that will initialize the entryPoint of the ContainerRuntime instances\n\t * created with this factory\n\t */\n\tconstructor(\n\t\tprivate readonly registryEntries: NamedFluidDataStoreRegistryEntries,\n\t\tprivate readonly dependencyContainer?: IFluidDependencySynthesizer,\n\t\tprivate readonly requestHandlers: RuntimeRequestHandler[] = [],\n\t\tprivate readonly runtimeOptions?: IContainerRuntimeOptions,\n\t\tprivate readonly initializeEntryPoint?: (\n\t\t\truntime: IContainerRuntime,\n\t\t) => Promise<FluidObject>,\n\t) {\n\t\tsuper();\n\t\tthis.registry = new FluidDataStoreRegistry(registryEntries);\n\t}\n\n\tpublic async instantiateFirstTime(runtime: ContainerRuntime): Promise<void> {\n\t\tawait this.containerInitializingFirstTime(runtime);\n\t\tawait this.containerHasInitialized(runtime);\n\t}\n\n\tpublic async instantiateFromExisting(runtime: ContainerRuntime): Promise<void> {\n\t\tawait this.containerHasInitialized(runtime);\n\t}\n\n\tpublic async preInitialize(\n\t\tcontext: IContainerContext,\n\t\texisting: boolean,\n\t): Promise<ContainerRuntime> {\n\t\tconst scope: Partial<IProvideFluidDependencySynthesizer> = context.scope;\n\t\tif (this.dependencyContainer) {\n\t\t\tconst dc = new DependencyContainer<FluidObject>(\n\t\t\t\tthis.dependencyContainer,\n\t\t\t\tscope.IFluidDependencySynthesizer,\n\t\t\t);\n\t\t\tscope.IFluidDependencySynthesizer = dc;\n\t\t}\n\t\treturn ContainerRuntime.loadRuntime({\n\t\t\tcontext,\n\t\t\trequestHandler: buildRuntimeRequestHandler(...this.requestHandlers),\n\t\t\texisting,\n\t\t\truntimeOptions: this.runtimeOptions,\n\t\t\tregistryEntries: this.registryEntries,\n\t\t\tcontainerScope: scope,\n\t\t\tinitializeEntryPoint: this.initializeEntryPoint,\n\t\t});\n\t}\n\n\t/**\n\t * Subclasses may override containerInitializingFirstTime to perform any setup steps at the time the container\n\t * is created. This likely includes creating any initial data stores that are expected to be there at the outset.\n\t * @param runtime - The container runtime for the container being initialized\n\t */\n\tprotected async containerInitializingFirstTime(runtime: IContainerRuntime) {}\n\n\t/**\n\t * Subclasses may override containerHasInitialized to perform any steps after the container has initialized.\n\t * This likely includes loading any data stores that are expected to be there at the outset.\n\t * @param runtime - The container runtime for the container being initialized\n\t */\n\tprotected async containerHasInitialized(runtime: IContainerRuntime) {}\n}\n"]}
1
+ {"version":3,"file":"baseContainerRuntimeFactory.js","sourceRoot":"","sources":["../../src/container-runtime-factories/baseContainerRuntimeFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAEN,sBAAsB,EACtB,gBAAgB,GAChB,MAAM,mCAAmC,CAAC;AAE3C,OAAO,EAAyB,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAMpG,OAAO,EACN,mBAAmB,GAGnB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAGrE;;;;GAIG;AACH,MAAM,OAAO,2BACZ,SAAQ,oBAAoB;IAQ5B;;;;;;;OAOG;IACH,YACkB,eAAmD,EACnD,mBAAiD,EACjD,kBAA2C,EAAE,EAC7C,cAAyC,EACzC,oBAEQ;QAEzB,KAAK,EAAE,CAAC;QARS,oBAAe,GAAf,eAAe,CAAoC;QACnD,wBAAmB,GAAnB,mBAAmB,CAA8B;QACjD,oBAAe,GAAf,eAAe,CAA8B;QAC7C,mBAAc,GAAd,cAAc,CAA2B;QACzC,yBAAoB,GAApB,oBAAoB,CAEZ;QAGzB,IAAI,CAAC,QAAQ,GAAG,IAAI,sBAAsB,CAAC,eAAe,CAAC,CAAC;IAC7D,CAAC;IAxBD,IAAW,uBAAuB;QACjC,OAAO,IAAI,CAAC,QAAQ,CAAC;IACtB,CAAC;IAwBM,KAAK,CAAC,oBAAoB,CAAC,OAAyB;QAC1D,MAAM,IAAI,CAAC,8BAA8B,CAAC,OAAO,CAAC,CAAC;QACnD,MAAM,IAAI,CAAC,uBAAuB,CAAC,OAAO,CAAC,CAAC;IAC7C,CAAC;IAEM,KAAK,CAAC,uBAAuB,CAAC,OAAyB;QAC7D,MAAM,IAAI,CAAC,uBAAuB,CAAC,OAAO,CAAC,CAAC;IAC7C,CAAC;IAEM,KAAK,CAAC,aAAa,CACzB,OAA0B,EAC1B,QAAiB;QAEjB,MAAM,KAAK,GAAgD,OAAO,CAAC,KAAK,CAAC;QACzE,IAAI,IAAI,CAAC,mBAAmB,EAAE;YAC7B,MAAM,EAAE,GAAG,IAAI,mBAAmB,CACjC,IAAI,CAAC,mBAAmB,EACxB,KAAK,CAAC,2BAA2B,CACjC,CAAC;YACF,KAAK,CAAC,2BAA2B,GAAG,EAAE,CAAC;SACvC;QAED,MAAM,OAAO,GAAG,IAAI,CAAC,oBAAoB;YACxC,CAAC,CAAC,EAAE,oBAAoB,EAAE,IAAI,CAAC,oBAAoB,EAAE;YACrD,CAAC,CAAC,EAAE,cAAc,EAAE,0BAA0B,CAAC,GAAG,IAAI,CAAC,eAAe,CAAC,EAAE,CAAC;QAE3E,OAAO,gBAAgB,CAAC,WAAW,CAAC;YACnC,OAAO;YACP,QAAQ;YACR,cAAc,EAAE,IAAI,CAAC,cAAc;YACnC,eAAe,EAAE,IAAI,CAAC,eAAe;YACrC,cAAc,EAAE,KAAK;YACrB,GAAG,OAAO;SACV,CAAC,CAAC;IACJ,CAAC;IAED;;;;OAIG;IACO,KAAK,CAAC,8BAA8B,CAAC,OAA0B,IAAG,CAAC;IAE7E;;;;OAIG;IACO,KAAK,CAAC,uBAAuB,CAAC,OAA0B,IAAG,CAAC;CACtE","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IContainerContext } from \"@fluidframework/container-definitions\";\nimport {\n\tIContainerRuntimeOptions,\n\tFluidDataStoreRegistry,\n\tContainerRuntime,\n} from \"@fluidframework/container-runtime\";\nimport { IContainerRuntime } from \"@fluidframework/container-runtime-definitions\";\nimport { RuntimeRequestHandler, buildRuntimeRequestHandler } from \"@fluidframework/request-handler\";\nimport {\n\tIFluidDataStoreRegistry,\n\tIProvideFluidDataStoreRegistry,\n\tNamedFluidDataStoreRegistryEntries,\n} from \"@fluidframework/runtime-definitions\";\nimport {\n\tDependencyContainer,\n\tIFluidDependencySynthesizer,\n\tIProvideFluidDependencySynthesizer,\n} from \"@fluidframework/synthesize\";\nimport { RuntimeFactoryHelper } from \"@fluidframework/runtime-utils\";\nimport { FluidObject } from \"@fluidframework/core-interfaces\";\n\n/**\n * BaseContainerRuntimeFactory produces container runtimes with the specified data store and service registries,\n * request handlers, runtimeOptions, and entryPoint initialization function.\n * It can be subclassed to implement a first-time initialization procedure for the containers it creates.\n */\nexport class BaseContainerRuntimeFactory\n\textends RuntimeFactoryHelper\n\timplements IProvideFluidDataStoreRegistry\n{\n\tpublic get IFluidDataStoreRegistry() {\n\t\treturn this.registry;\n\t}\n\tprivate readonly registry: IFluidDataStoreRegistry;\n\n\t/**\n\t * @param registryEntries - The data store registry for containers produced\n\t * @param dependencyContainer - deprecated, will be removed in a future release\n\t * @param requestHandlers - Request handlers for containers produced\n\t * @param runtimeOptions - The runtime options passed to the ContainerRuntime when instantiating it\n\t * @param initializeEntryPoint - Function that will initialize the entryPoint of the ContainerRuntime instances\n\t * created with this factory\n\t */\n\tconstructor(\n\t\tprivate readonly registryEntries: NamedFluidDataStoreRegistryEntries,\n\t\tprivate readonly dependencyContainer?: IFluidDependencySynthesizer,\n\t\tprivate readonly requestHandlers: RuntimeRequestHandler[] = [],\n\t\tprivate readonly runtimeOptions?: IContainerRuntimeOptions,\n\t\tprivate readonly initializeEntryPoint?: (\n\t\t\truntime: IContainerRuntime,\n\t\t) => Promise<FluidObject>,\n\t) {\n\t\tsuper();\n\t\tthis.registry = new FluidDataStoreRegistry(registryEntries);\n\t}\n\n\tpublic async instantiateFirstTime(runtime: ContainerRuntime): Promise<void> {\n\t\tawait this.containerInitializingFirstTime(runtime);\n\t\tawait this.containerHasInitialized(runtime);\n\t}\n\n\tpublic async instantiateFromExisting(runtime: ContainerRuntime): Promise<void> {\n\t\tawait this.containerHasInitialized(runtime);\n\t}\n\n\tpublic async preInitialize(\n\t\tcontext: IContainerContext,\n\t\texisting: boolean,\n\t): Promise<ContainerRuntime> {\n\t\tconst scope: Partial<IProvideFluidDependencySynthesizer> = context.scope;\n\t\tif (this.dependencyContainer) {\n\t\t\tconst dc = new DependencyContainer<FluidObject>(\n\t\t\t\tthis.dependencyContainer,\n\t\t\t\tscope.IFluidDependencySynthesizer,\n\t\t\t);\n\t\t\tscope.IFluidDependencySynthesizer = dc;\n\t\t}\n\n\t\tconst augment = this.initializeEntryPoint\n\t\t\t? { initializeEntryPoint: this.initializeEntryPoint }\n\t\t\t: { requestHandler: buildRuntimeRequestHandler(...this.requestHandlers) };\n\n\t\treturn ContainerRuntime.loadRuntime({\n\t\t\tcontext,\n\t\t\texisting,\n\t\t\truntimeOptions: this.runtimeOptions,\n\t\t\tregistryEntries: this.registryEntries,\n\t\t\tcontainerScope: scope,\n\t\t\t...augment,\n\t\t});\n\t}\n\n\t/**\n\t * Subclasses may override containerInitializingFirstTime to perform any setup steps at the time the container\n\t * is created. This likely includes creating any initial data stores that are expected to be there at the outset.\n\t * @param runtime - The container runtime for the container being initialized\n\t */\n\tprotected async containerInitializingFirstTime(runtime: IContainerRuntime) {}\n\n\t/**\n\t * Subclasses may override containerHasInitialized to perform any steps after the container has initialized.\n\t * This likely includes loading any data stores that are expected to be there at the outset.\n\t * @param runtime - The container runtime for the container being initialized\n\t */\n\tprotected async containerHasInitialized(runtime: IContainerRuntime) {}\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"pureDataObject.js","sourceRoot":"","sources":["../../src/data-objects/pureDataObject.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAYtE,OAAO,EAAE,gCAAgC,EAAE,MAAM,qBAAqB,CAAC;AAGvE;;;;;;GAMG;AACH,MAAM,OAAgB,cACrB,SAAQ,cAAoC;IAkE5C,YAAmB,KAA0B;QAC5C,KAAK,EAAE,CAAC;QAhED,cAAS,GAAG,KAAK,CAAC;QAiEzB,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC;QAC7B,IAAI,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,MAAM,CAAC,cAAc,CAAC,KAAa;QAC5C,OAAO,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;IACpC,CAAC;IAED;;;OAGG;IACO,YAAY,CACrB,MAA2D,EAC3D,GAAG,MAAgB;QAEnB,KAAK,CAAC,YAAY,CAAC,MAAM,EAAE,GAAG,MAAM,CAAC,CAAC;IACvC,CAAC;IAED;;;OAGG;IACO,cAAc,CACvB,MAA2D,EAC3D,GAAG,MAAgB;QAEnB,KAAK,CAAC,cAAc,CAAC,MAAM,EAAE,GAAG,MAAM,CAAC,CAAC;IACzC,CAAC;CACD","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { EventEmitter } from \"events\";\nimport { IEvent, IEventProvider } from \"@fluidframework/common-definitions\";\nimport { assert, EventForwarder } from \"@fluidframework/common-utils\";\nimport {\n\tIFluidHandle,\n\tIFluidLoadable,\n\tIFluidRouter,\n\tIProvideFluidHandle,\n\tIRequest,\n\tIResponse,\n} from \"@fluidframework/core-interfaces\";\nimport { IFluidDataStoreRuntime } from \"@fluidframework/datastore-definitions\";\nimport { IFluidDataStoreContext } from \"@fluidframework/runtime-definitions\";\nimport { AsyncFluidObjectProvider } from \"@fluidframework/synthesize\";\nimport { defaultFluidObjectRequestHandler } from \"../request-handlers\";\nimport { DataObjectTypes, IDataObjectProps } from \"./types\";\n\n/**\n * This is a bare-bones base class that does basic setup and enables for factory on an initialize call.\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 */\nexport abstract class PureDataObject<I extends DataObjectTypes = DataObjectTypes>\n\textends EventForwarder<I[\"Events\"] & IEvent>\n\timplements IFluidLoadable, IFluidRouter, IProvideFluidHandle\n{\n\tprivate _disposed = false;\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 ContainerRuntime\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\tprotected initializeP: Promise<void> | undefined;\n\n\t/**\n\t * @deprecated 2.0.0-internal.5.2.0 - PureDataObject does not provide a functioning built-in disposed flow.\n\t * This member will be removed in an upcoming release.\n\t */\n\tpublic get disposed() {\n\t\treturn this._disposed;\n\t}\n\n\tpublic get id() {\n\t\treturn this.runtime.id;\n\t}\n\tpublic get IFluidRouter() {\n\t\treturn this;\n\t}\n\tpublic get IFluidLoadable() {\n\t\treturn this;\n\t}\n\tpublic get IFluidHandle() {\n\t\treturn this.handle;\n\t}\n\n\t/**\n\t * Handle to a data store\n\t */\n\tpublic get handle(): IFluidHandle<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 IFluidHandle<this>;\n\t}\n\n\tpublic static async getDataObject(runtime: IFluidDataStoreRuntime) {\n\t\tconst obj = await runtime.entryPoint?.get();\n\t\tassert(obj !== undefined, 0x0bc /* \"The runtime's handle is not initialized yet!\" */);\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\n\t\tassert(\n\t\t\t(this.runtime as any)._dataObject === undefined,\n\t\t\t0x0bd /* \"Object runtime already has DataObject!\" */,\n\t\t);\n\t\t(this.runtime as any)._dataObject = this;\n\n\t\t// Container event handlers\n\t\tthis.runtime.once(\"dispose\", () => {\n\t\t\tthis._disposed = true;\n\t\t\tthis.dispose();\n\t\t});\n\t}\n\n\t// #region IFluidRouter\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 defaultFluidObjectRequestHandler(this, req);\n\t}\n\n\t// #endregion IFluidRouter\n\n\t/**\n\t * Call 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 call this API to ensure object is fully initialized.\n\t */\n\tpublic async finishInitialization(existing: boolean): Promise<void> {\n\t\tif (this.initializeP !== undefined) {\n\t\t\treturn this.initializeP;\n\t\t}\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\t/**\n\t * Called when the host container closes and disposes itself\n\t * @deprecated 2.0.0-internal.5.2.0 - Dispose does nothing and will be removed in an upcoming release.\n\t */\n\tpublic dispose(): void {\n\t\tsuper.dispose();\n\t}\n\n\t/**\n\t * @deprecated 2.0.0-internal.5.2.0 - PureDataObject does not actually set up to forward events, and will not be an EventForwarder\n\t * in a future release.\n\t */\n\tprotected static isEmitterEvent(event: string): boolean {\n\t\treturn super.isEmitterEvent(event);\n\t}\n\n\t/**\n\t * @deprecated 2.0.0-internal.5.2.0 - PureDataObject does not actually set up to forward events, and will not be an EventForwarder\n\t * in a future release.\n\t */\n\tprotected forwardEvent(\n\t\tsource: EventEmitter | IEventProvider<I[\"Events\"] & IEvent>,\n\t\t...events: string[]\n\t): void {\n\t\tsuper.forwardEvent(source, ...events);\n\t}\n\n\t/**\n\t * @deprecated 2.0.0-internal.5.2.0 - PureDataObject does not actually set up to forward events, and will not be an EventForwarder\n\t * in a future release.\n\t */\n\tprotected unforwardEvent(\n\t\tsource: EventEmitter | IEventProvider<I[\"Events\"] & IEvent>,\n\t\t...events: string[]\n\t): void {\n\t\tsuper.unforwardEvent(source, ...events);\n\t}\n}\n"]}
1
+ {"version":3,"file":"pureDataObject.js","sourceRoot":"","sources":["../../src/data-objects/pureDataObject.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,8BAA8B,C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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;IAElD;;;OAGG;IACI,OAAO;QACb,KAAK,CAAC,OAAO,EAAE,CAAC;IACjB,CAAC;IAED;;;OAGG;IACO,MAAM,CAAC,cAAc,CAAC,KAAa;QAC5C,OAAO,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;IACpC,CAAC;IAED;;;OAGG;IACO,YAAY,CACrB,MAA2D,EAC3D,GAAG,MAAgB;QAEnB,KAAK,CAAC,YAAY,CAAC,MAAM,EAAE,GAAG,MAAM,CAAC,CAAC;IACvC,CAAC;IAED;;;OAGG;IACO,cAAc,CACvB,MAA2D,EAC3D,GAAG,MAAgB;QAEnB,KAAK,CAAC,cAAc,CAAC,MAAM,EAAE,GAAG,MAAM,CAAC,CAAC;IACzC,CAAC;CACD","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { EventEmitter } from \"events\";\nimport { assert, EventForwarder } from \"@fluidframework/common-utils\";\nimport {\n\tIEvent,\n\tIEventProvider,\n\tIFluidHandle,\n\tIFluidLoadable,\n\tIFluidRouter,\n\tIProvideFluidHandle,\n\tIRequest,\n\tIResponse,\n} from \"@fluidframework/core-interfaces\";\nimport { IFluidDataStoreRuntime } from \"@fluidframework/datastore-definitions\";\nimport { IFluidDataStoreContext } from \"@fluidframework/runtime-definitions\";\nimport { AsyncFluidObjectProvider } from \"@fluidframework/synthesize\";\nimport { defaultFluidObjectRequestHandler } from \"../request-handlers\";\nimport { DataObjectTypes, IDataObjectProps } from \"./types\";\n\n/**\n * This is a bare-bones base class that does basic setup and enables for factory on an initialize call.\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 */\nexport abstract class PureDataObject<I extends DataObjectTypes = DataObjectTypes>\n\textends EventForwarder<I[\"Events\"] & IEvent>\n\timplements IFluidLoadable, IFluidRouter, IProvideFluidHandle\n{\n\tprivate _disposed = false;\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 ContainerRuntime\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\tprotected initializeP: Promise<void> | undefined;\n\n\t/**\n\t * @deprecated 2.0.0-internal.5.2.0 - PureDataObject does not provide a functioning built-in disposed flow.\n\t * This member will be removed in an upcoming release.\n\t */\n\tpublic get disposed() {\n\t\treturn this._disposed;\n\t}\n\n\tpublic get id() {\n\t\treturn this.runtime.id;\n\t}\n\tpublic get IFluidRouter() {\n\t\treturn this;\n\t}\n\tpublic get IFluidLoadable() {\n\t\treturn this;\n\t}\n\tpublic get IFluidHandle() {\n\t\treturn this.handle;\n\t}\n\n\t/**\n\t * Handle to a data store\n\t */\n\tpublic get handle(): IFluidHandle<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 IFluidHandle<this>;\n\t}\n\n\tpublic static async getDataObject(runtime: IFluidDataStoreRuntime) {\n\t\tconst obj = await runtime.entryPoint?.get();\n\t\tassert(obj !== undefined, 0x0bc /* \"The runtime's handle is not initialized yet!\" */);\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\n\t\tassert(\n\t\t\t(this.runtime as any)._dataObject === undefined,\n\t\t\t0x0bd /* \"Object runtime already has DataObject!\" */,\n\t\t);\n\t\t(this.runtime as any)._dataObject = this;\n\n\t\t// Container event handlers\n\t\tthis.runtime.once(\"dispose\", () => {\n\t\t\tthis._disposed = true;\n\t\t\tthis.dispose();\n\t\t});\n\t}\n\n\t// #region IFluidRouter\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 defaultFluidObjectRequestHandler(this, req);\n\t}\n\n\t// #endregion IFluidRouter\n\n\t/**\n\t * Call 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 call this API to ensure object is fully initialized.\n\t */\n\tpublic async finishInitialization(existing: boolean): Promise<void> {\n\t\tif (this.initializeP !== undefined) {\n\t\t\treturn this.initializeP;\n\t\t}\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\t/**\n\t * Called when the host container closes and disposes itself\n\t * @deprecated 2.0.0-internal.5.2.0 - Dispose does nothing and will be removed in an upcoming release.\n\t */\n\tpublic dispose(): void {\n\t\tsuper.dispose();\n\t}\n\n\t/**\n\t * @deprecated 2.0.0-internal.5.2.0 - PureDataObject does not actually set up to forward events, and will not be an EventForwarder\n\t * in a future release.\n\t */\n\tprotected static isEmitterEvent(event: string): boolean {\n\t\treturn super.isEmitterEvent(event);\n\t}\n\n\t/**\n\t * @deprecated 2.0.0-internal.5.2.0 - PureDataObject does not actually set up to forward events, and will not be an EventForwarder\n\t * in a future release.\n\t */\n\tprotected forwardEvent(\n\t\tsource: EventEmitter | IEventProvider<I[\"Events\"] & IEvent>,\n\t\t...events: string[]\n\t): void {\n\t\tsuper.forwardEvent(source, ...events);\n\t}\n\n\t/**\n\t * @deprecated 2.0.0-internal.5.2.0 - PureDataObject does not actually set up to forward events, and will not be an EventForwarder\n\t * in a future release.\n\t */\n\tprotected unforwardEvent(\n\t\tsource: EventEmitter | IEventProvider<I[\"Events\"] & IEvent>,\n\t\t...events: string[]\n\t): void {\n\t\tsuper.unforwardEvent(source, ...events);\n\t}\n}\n"]}
@@ -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 { FluidObject } from \"@fluidframework/core-interfaces\";\nimport { AsyncFluidObjectProvider } from \"@fluidframework/synthesize\";\nimport { IFluidDataStoreContext } from \"@fluidframework/runtime-definitions\";\nimport { IFluidDataStoreRuntime } from \"@fluidframework/datastore-definitions\";\nimport { IEvent } from \"@fluidframework/common-definitions\";\n\n/**\n * This type is used as the base generic input to DataObject and PureDataObject.\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\tInitialState?: any;\n\t/**\n\t * represents events that will be available in the EventForwarder\n\t */\n\tEvents?: IEvent;\n}\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"]}
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 { IEvent, FluidObject } from \"@fluidframework/core-interfaces\";\nimport { AsyncFluidObjectProvider } from \"@fluidframework/synthesize\";\nimport { IFluidDataStoreContext } from \"@fluidframework/runtime-definitions\";\nimport { IFluidDataStoreRuntime } from \"@fluidframework/datastore-definitions\";\n\n/**\n * This type is used as the base generic input to DataObject and PureDataObject.\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\tInitialState?: any;\n\t/**\n\t * represents events that will be available in the EventForwarder\n\t */\n\tEvents?: IEvent;\n}\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"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluidframework/aqueduct",
3
- "version": "2.0.0-internal.6.1.1",
3
+ "version": "2.0.0-internal.6.2.0",
4
4
  "description": "A set of implementations for Fluid Framework interfaces.",
5
5
  "homepage": "https://fluidframework.com",
6
6
  "repository": {
@@ -40,29 +40,28 @@
40
40
  "temp-directory": "nyc/.nyc_output"
41
41
  },
42
42
  "dependencies": {
43
- "@fluidframework/common-definitions": "^0.20.1",
44
43
  "@fluidframework/common-utils": "^1.1.1",
45
- "@fluidframework/container-definitions": ">=2.0.0-internal.6.1.1 <2.0.0-internal.6.2.0",
46
- "@fluidframework/container-runtime": ">=2.0.0-internal.6.1.1 <2.0.0-internal.6.2.0",
47
- "@fluidframework/container-runtime-definitions": ">=2.0.0-internal.6.1.1 <2.0.0-internal.6.2.0",
48
- "@fluidframework/core-interfaces": ">=2.0.0-internal.6.1.1 <2.0.0-internal.6.2.0",
49
- "@fluidframework/datastore": ">=2.0.0-internal.6.1.1 <2.0.0-internal.6.2.0",
50
- "@fluidframework/datastore-definitions": ">=2.0.0-internal.6.1.1 <2.0.0-internal.6.2.0",
51
- "@fluidframework/map": ">=2.0.0-internal.6.1.1 <2.0.0-internal.6.2.0",
52
- "@fluidframework/request-handler": ">=2.0.0-internal.6.1.1 <2.0.0-internal.6.2.0",
53
- "@fluidframework/runtime-definitions": ">=2.0.0-internal.6.1.1 <2.0.0-internal.6.2.0",
54
- "@fluidframework/runtime-utils": ">=2.0.0-internal.6.1.1 <2.0.0-internal.6.2.0",
55
- "@fluidframework/synthesize": ">=2.0.0-internal.6.1.1 <2.0.0-internal.6.2.0",
56
- "@fluidframework/view-interfaces": ">=2.0.0-internal.6.1.1 <2.0.0-internal.6.2.0",
57
- "uuid": "^8.3.1"
44
+ "@fluidframework/container-definitions": ">=2.0.0-internal.6.2.0 <2.0.0-internal.6.3.0",
45
+ "@fluidframework/container-runtime": ">=2.0.0-internal.6.2.0 <2.0.0-internal.6.3.0",
46
+ "@fluidframework/container-runtime-definitions": ">=2.0.0-internal.6.2.0 <2.0.0-internal.6.3.0",
47
+ "@fluidframework/core-interfaces": ">=2.0.0-internal.6.2.0 <2.0.0-internal.6.3.0",
48
+ "@fluidframework/datastore": ">=2.0.0-internal.6.2.0 <2.0.0-internal.6.3.0",
49
+ "@fluidframework/datastore-definitions": ">=2.0.0-internal.6.2.0 <2.0.0-internal.6.3.0",
50
+ "@fluidframework/map": ">=2.0.0-internal.6.2.0 <2.0.0-internal.6.3.0",
51
+ "@fluidframework/request-handler": ">=2.0.0-internal.6.2.0 <2.0.0-internal.6.3.0",
52
+ "@fluidframework/runtime-definitions": ">=2.0.0-internal.6.2.0 <2.0.0-internal.6.3.0",
53
+ "@fluidframework/runtime-utils": ">=2.0.0-internal.6.2.0 <2.0.0-internal.6.3.0",
54
+ "@fluidframework/synthesize": ">=2.0.0-internal.6.2.0 <2.0.0-internal.6.3.0",
55
+ "@fluidframework/view-interfaces": ">=2.0.0-internal.6.2.0 <2.0.0-internal.6.3.0",
56
+ "uuid": "^9.0.0"
58
57
  },
59
58
  "devDependencies": {
60
- "@fluid-tools/build-cli": "^0.22.0",
61
- "@fluidframework/aqueduct-previous": "npm:@fluidframework/aqueduct@2.0.0-internal.6.0.0",
59
+ "@fluid-tools/build-cli": "^0.23.0",
60
+ "@fluidframework/aqueduct-previous": "npm:@fluidframework/aqueduct@2.0.0-internal.6.1.1",
62
61
  "@fluidframework/build-common": "^2.0.0",
63
- "@fluidframework/build-tools": "^0.22.0",
64
- "@fluidframework/eslint-config-fluid": "^2.0.0",
65
- "@fluidframework/mocha-test-setup": ">=2.0.0-internal.6.1.1 <2.0.0-internal.6.2.0",
62
+ "@fluidframework/build-tools": "^0.23.0",
63
+ "@fluidframework/eslint-config-fluid": "^2.1.0",
64
+ "@fluidframework/mocha-test-setup": ">=2.0.0-internal.6.2.0 <2.0.0-internal.6.3.0",
66
65
  "@microsoft/api-extractor": "^7.34.4",
67
66
  "@types/events": "^3.0.0",
68
67
  "@types/mocha": "^9.1.1",
@@ -82,14 +81,7 @@
82
81
  },
83
82
  "module:es5": "es5/index.js",
84
83
  "typeValidation": {
85
- "broken": {
86
- "ClassDeclaration_PureDataObject": {
87
- "forwardCompat": false
88
- },
89
- "ClassDeclaration_DataObject": {
90
- "forwardCompat": false
91
- }
92
- }
84
+ "broken": {}
93
85
  },
94
86
  "scripts": {
95
87
  "build": "fluid-build . --task build",
@@ -110,7 +102,7 @@
110
102
  "test": "npm run test:mocha",
111
103
  "test:coverage": "nyc npm test -- --reporter xunit --reporter-option output=nyc/junit-report.xml",
112
104
  "test:mocha": "mocha --ignore 'dist/test/types/*' --recursive dist/test -r node_modules/@fluidframework/mocha-test-setup --unhandled-rejections=strict",
113
- "test:mocha:multireport": "cross-env FLUID_TEST_MULTIREPORT=1 npm run test:mocha",
105
+ "test:mocha:multireport": "npm run test:mocha",
114
106
  "test:mocha:verbose": "cross-env FLUID_TEST_VERBOSE=1 npm run test:mocha",
115
107
  "tsc": "tsc",
116
108
  "typetests:gen": "fluid-type-test-generator",