@fluidframework/aqueduct 2.0.0-internal.7.4.0 → 2.0.0-internal.8.0.1
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/dist/aqueduct-alpha.d.ts +4 -35
- package/dist/aqueduct-beta.d.ts +0 -26
- package/dist/aqueduct-public.d.ts +0 -26
- package/dist/aqueduct-untrimmed.d.ts +4 -98
- package/dist/container-runtime-factories/baseContainerRuntimeFactory.cjs.map +1 -1
- package/dist/container-runtime-factories/baseContainerRuntimeFactory.d.ts +1 -1
- package/dist/container-runtime-factories/baseContainerRuntimeFactory.d.ts.map +1 -1
- package/dist/container-runtime-factories/containerRuntimeFactoryWithDefaultDataStore.cjs +13 -4
- package/dist/container-runtime-factories/containerRuntimeFactoryWithDefaultDataStore.cjs.map +1 -1
- package/dist/container-runtime-factories/containerRuntimeFactoryWithDefaultDataStore.d.ts +1 -1
- package/dist/container-runtime-factories/containerRuntimeFactoryWithDefaultDataStore.d.ts.map +1 -1
- package/dist/data-object-factories/index.cjs.map +1 -1
- package/dist/data-object-factories/index.d.ts +1 -1
- package/dist/data-object-factories/index.d.ts.map +1 -1
- package/dist/data-object-factories/pureDataObjectFactory.cjs.map +1 -1
- package/dist/data-object-factories/pureDataObjectFactory.d.ts +1 -10
- package/dist/data-object-factories/pureDataObjectFactory.d.ts.map +1 -1
- package/dist/data-objects/pureDataObject.cjs +0 -7
- package/dist/data-objects/pureDataObject.cjs.map +1 -1
- package/dist/data-objects/pureDataObject.d.ts +2 -6
- package/dist/data-objects/pureDataObject.d.ts.map +1 -1
- package/dist/index.cjs +1 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -3
- package/dist/index.d.ts.map +1 -1
- package/lib/aqueduct-alpha.d.ts +4 -35
- package/lib/aqueduct-beta.d.ts +0 -26
- package/lib/aqueduct-public.d.ts +0 -26
- package/lib/aqueduct-untrimmed.d.ts +4 -98
- package/lib/container-runtime-factories/baseContainerRuntimeFactory.d.ts +1 -1
- package/lib/container-runtime-factories/baseContainerRuntimeFactory.d.ts.map +1 -1
- package/lib/container-runtime-factories/baseContainerRuntimeFactory.mjs.map +1 -1
- package/lib/container-runtime-factories/containerRuntimeFactoryWithDefaultDataStore.d.ts +1 -1
- package/lib/container-runtime-factories/containerRuntimeFactoryWithDefaultDataStore.d.ts.map +1 -1
- package/lib/container-runtime-factories/containerRuntimeFactoryWithDefaultDataStore.mjs +13 -3
- package/lib/container-runtime-factories/containerRuntimeFactoryWithDefaultDataStore.mjs.map +1 -1
- package/lib/data-object-factories/index.d.ts +1 -1
- package/lib/data-object-factories/index.d.ts.map +1 -1
- package/lib/data-object-factories/index.mjs.map +1 -1
- package/lib/data-object-factories/pureDataObjectFactory.d.ts +1 -10
- package/lib/data-object-factories/pureDataObjectFactory.d.ts.map +1 -1
- package/lib/data-object-factories/pureDataObjectFactory.mjs.map +1 -1
- package/lib/data-objects/pureDataObject.d.ts +2 -6
- package/lib/data-objects/pureDataObject.d.ts.map +1 -1
- package/lib/data-objects/pureDataObject.mjs +0 -7
- package/lib/data-objects/pureDataObject.mjs.map +1 -1
- package/lib/index.d.ts +1 -3
- package/lib/index.d.ts.map +1 -1
- package/lib/index.mjs +1 -3
- package/lib/index.mjs.map +1 -1
- package/package.json +55 -17
- package/dist/request-handlers/index.cjs +0 -12
- package/dist/request-handlers/index.cjs.map +0 -1
- package/dist/request-handlers/index.d.ts +0 -6
- package/dist/request-handlers/index.d.ts.map +0 -1
- package/dist/request-handlers/requestHandlers.cjs +0 -93
- package/dist/request-handlers/requestHandlers.cjs.map +0 -1
- package/dist/request-handlers/requestHandlers.d.ts +0 -46
- package/dist/request-handlers/requestHandlers.d.ts.map +0 -1
- package/dist/utils/containerInteractions.cjs +0 -76
- package/dist/utils/containerInteractions.cjs.map +0 -1
- package/dist/utils/containerInteractions.d.ts +0 -42
- package/dist/utils/containerInteractions.d.ts.map +0 -1
- package/dist/utils/index.cjs +0 -12
- package/dist/utils/index.cjs.map +0 -1
- package/dist/utils/index.d.ts +0 -6
- package/dist/utils/index.d.ts.map +0 -1
- package/lib/request-handlers/index.d.ts +0 -6
- package/lib/request-handlers/index.d.ts.map +0 -1
- package/lib/request-handlers/index.mjs +0 -6
- package/lib/request-handlers/index.mjs.map +0 -1
- package/lib/request-handlers/requestHandlers.d.ts +0 -46
- package/lib/request-handlers/requestHandlers.d.ts.map +0 -1
- package/lib/request-handlers/requestHandlers.mjs +0 -86
- package/lib/request-handlers/requestHandlers.mjs.map +0 -1
- package/lib/utils/containerInteractions.d.ts +0 -38
- package/lib/utils/containerInteractions.d.ts.map +0 -1
- package/lib/utils/containerInteractions.mjs +0 -70
- package/lib/utils/containerInteractions.mjs.map +0 -1
- package/lib/utils/index.d.ts +0 -6
- package/lib/utils/index.d.ts.map +0 -1
- package/lib/utils/index.mjs +0 -6
- package/lib/utils/index.mjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pureDataObjectFactory.cjs","sourceRoot":"","sources":["../../src/data-object-factories/pureDataObjectFactory.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAIH,yDAImC;AACnC,yEAA2E;AAmB3E,2DAAoD;AAYpD;;;GAGG;AACH,KAAK,UAAU,gBAAgB,CAI9B,IAA8C,EAC9C,OAA+B,EAC/B,oBAA2C,EAC3C,iBAAoE,EACpE,eAA6C,EAC7C,QAAiB,EACjB,SAA6B;IAE7B,OAAO;IACP,IAAI,YAAY,GAAG,eAAe,CAAC;IAEnC,mBAAmB;IACnB,YAAY,GAAG,IAAA,+BAAmB,EACjC,KAAK,EAAE,OAAiB,EAAE,UAAiC,EAAE,EAAE;QAC9D,iFAAiF;QACjF,MAAM,UAAU,GAAG,CAAC,MAAM,UAAU,CAAC,UAAU,CAAC,GAAG,EAAE,CAAS,CAAC;QAC/D,IAAA,mBAAM,EACL,UAAU,CAAC,OAAO,KAAK,SAAS,EAChC,KAAK,CAAC,yDAAyD,CAC/D,CAAC;QACF,OAAO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,EACjB,KAAK,EAAE,WAAW;QAClB,YAAY,CACZ,CAAC;QAEF,MAAM,OAAO,CAAC,aAAa,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QAE3C,OAAO,QAAQ,CAAC;IACjB,CAAC;CACD;AA3KD,sDA2KC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n// eslint-disable-next-line import/no-deprecated\nimport { IRequest, IFluidRouter, FluidObject } from \"@fluidframework/core-interfaces\";\nimport {\n\tFluidDataStoreRuntime,\n\tISharedObjectRegistry,\n\tmixinRequestHandler,\n} from \"@fluidframework/datastore\";\nimport { FluidDataStoreRegistry } from \"@fluidframework/container-runtime\";\nimport {\n\tIFluidDataStoreContext,\n\tIContainerRuntimeBase,\n\tIFluidDataStoreFactory,\n\tIFluidDataStoreRegistry,\n\tIProvideFluidDataStoreRegistry,\n\tNamedFluidDataStoreRegistryEntries,\n\tNamedFluidDataStoreRegistryEntry,\n\tIFluidDataStoreContextDetached,\n} from \"@fluidframework/runtime-definitions\";\nimport { IContainerRuntime } from \"@fluidframework/container-runtime-definitions\";\nimport { IChannelFactory, IFluidDataStoreRuntime } from \"@fluidframework/datastore-definitions\";\nimport {\n\tAsyncFluidObjectProvider,\n\tFluidObjectSymbolProvider,\n\tIFluidDependencySynthesizer,\n} from \"@fluidframework/synthesize\";\n\nimport { assert } from \"@fluidframework/core-utils\";\nimport { IDataObjectProps, PureDataObject, DataObjectTypes } from \"../data-objects\";\n/**\n * Useful interface in places where it's useful to do type erasure for PureDataObject generic\n * @deprecated Will be removed in future major release. Please remove all usage of it.\n * @alpha\n */\nexport interface IRootDataObjectFactory extends IFluidDataStoreFactory {\n\t// eslint-disable-next-line import/no-deprecated\n\tcreateRootInstance(rootDataStoreId: string, runtime: IContainerRuntime): Promise<IFluidRouter>;\n}\n\n/**\n * Proxy over PureDataObject\n * Does delayed creation & initialization of PureDataObject\n */\nasync function createDataObject<\n\tTObj extends PureDataObject,\n\tI extends DataObjectTypes = DataObjectTypes,\n>(\n\tctor: new (props: IDataObjectProps<I>) => TObj,\n\tcontext: IFluidDataStoreContext,\n\tsharedObjectRegistry: ISharedObjectRegistry,\n\toptionalProviders: FluidObjectSymbolProvider<I[\"OptionalProviders\"]>,\n\truntimeClassArg: typeof FluidDataStoreRuntime,\n\texisting: boolean,\n\tinitProps?: I[\"InitialState\"],\n) {\n\t// base\n\tlet runtimeClass = runtimeClassArg;\n\n\t// request mixin in\n\truntimeClass = mixinRequestHandler(\n\t\tasync (request: IRequest, runtimeArg: FluidDataStoreRuntime) => {\n\t\t\t// The provideEntryPoint callback below always returns TObj, so this cast is safe\n\t\t\tconst dataObject = (await runtimeArg.entryPoint.get()) as TObj;\n\t\t\tassert(\n\t\t\t\tdataObject.request !== undefined,\n\t\t\t\t0x795 /* Data store runtime entryPoint does not have request */,\n\t\t\t);\n\t\t\treturn dataObject.request(request);\n\t\t},\n\t\truntimeClass,\n\t);\n\n\t// Create a new runtime for our data store, as if via new FluidDataStoreRuntime,\n\t// but using the runtimeClass that's been augmented with mixins\n\t// The runtime is what Fluid uses to create DDS' and route to your data store\n\tconst runtime: FluidDataStoreRuntime = new runtimeClass( // calls new FluidDataStoreRuntime(...)\n\t\tcontext,\n\t\tsharedObjectRegistry,\n\t\texisting,\n\t\tasync (rt: IFluidDataStoreRuntime) => {\n\t\t\tassert(instance !== undefined, 0x46a /* entryPoint is undefined */);\n\t\t\t// Calling finishInitialization here like PureDataObject.getDataObject did, to keep the same behavior,\n\t\t\t// since accessing the runtime's entryPoint is how we want the data object to be retrieved going forward.\n\t\t\t// Without this I ran into issues with the load-existing flow not working correctly.\n\t\t\tawait instance.finishInitialization(true);\n\t\t\treturn instance;\n\t\t} /* provideEntryPoint */,\n\t);\n\n\t// Create object right away.\n\t// This allows object to register various callbacks with runtime before runtime\n\t// becomes globally available. But it's not full initialization - constructor can't\n\t// access DDSes or other services of runtime as objects are not fully initialized.\n\t// In order to use object, we need to go through full initialization by calling finishInitialization().\n\tconst scope: FluidObject<IFluidDependencySynthesizer> = context.scope;\n\tconst providers =\n\t\tscope.IFluidDependencySynthesizer?.synthesize<I[\"OptionalProviders\"]>(\n\t\t\toptionalProviders,\n\t\t\t{},\n\t\t) ??\n\t\t// eslint-disable-next-line @typescript-eslint/consistent-type-assertions\n\t\t({} as AsyncFluidObjectProvider<never>);\n\n\tconst instance = new ctor({ runtime, context, providers, initProps });\n\n\t// if it's a newly created object, we need to wait for it to finish initialization\n\t// as that results in creation of DDSes, before it gets attached, providing atomic\n\t// guarantee of creation.\n\t// WARNING: we can't do the same (yet) for already existing PureDataObject!\n\t// This will result in deadlock, as it tries to resolve internal handles, but any\n\t// handle resolution goes through root (container runtime), which can't route it back\n\t// to this data store, as it's still not initialized and not known to container runtime yet.\n\t// In the future, we should address it by using relative paths for handles and be able to resolve\n\t// local DDSes while data store is not fully initialized.\n\tif (!existing) {\n\t\tawait instance.finishInitialization(existing);\n\t}\n\n\treturn { instance, runtime };\n}\n\n/**\n * PureDataObjectFactory is a barebones IFluidDataStoreFactory for use with PureDataObject.\n * Consumers should typically use DataObjectFactory instead unless creating\n * another base data store factory.\n *\n * @typeParam TObj - DataObject (concrete type)\n * @typeParam I - The input types for the DataObject\n * @alpha\n */\nexport class PureDataObjectFactory<\n\t\tTObj extends PureDataObject<I>,\n\t\tI extends DataObjectTypes = DataObjectTypes,\n\t>\n\timplements\n\t\tIFluidDataStoreFactory,\n\t\tPartial<IProvideFluidDataStoreRegistry>,\n\t\tIRootDataObjectFactory\n{\n\tprivate readonly sharedObjectRegistry: ISharedObjectRegistry;\n\tprivate readonly registry: IFluidDataStoreRegistry | undefined;\n\n\tconstructor(\n\t\tpublic readonly type: string,\n\t\tprivate readonly ctor: new (props: IDataObjectProps<I>) => TObj,\n\t\tsharedObjects: readonly IChannelFactory[],\n\t\tprivate readonly optionalProviders: FluidObjectSymbolProvider<I[\"OptionalProviders\"]>,\n\t\tregistryEntries?: NamedFluidDataStoreRegistryEntries,\n\t\tprivate readonly runtimeClass: typeof FluidDataStoreRuntime = FluidDataStoreRuntime,\n\t) {\n\t\tif (this.type === \"\") {\n\t\t\tthrow new Error(\"undefined type member\");\n\t\t}\n\t\tif (registryEntries !== undefined) {\n\t\t\tthis.registry = new FluidDataStoreRegistry(registryEntries);\n\t\t}\n\t\tthis.sharedObjectRegistry = new Map(sharedObjects.map((ext) => [ext.type, ext]));\n\t}\n\n\tpublic get IFluidDataStoreFactory() {\n\t\treturn this;\n\t}\n\n\tpublic get IFluidDataStoreRegistry() {\n\t\treturn this.registry;\n\t}\n\n\t/**\n\t * Convenience helper to get the data store's/factory's data store registry entry.\n\t * The return type hides the factory's generics, easing grouping of registry\n\t * entries that differ only in this way into the same array.\n\t * @returns The NamedFluidDataStoreRegistryEntry\n\t */\n\tpublic get registryEntry(): NamedFluidDataStoreRegistryEntry {\n\t\treturn [this.type, Promise.resolve(this)];\n\t}\n\n\t/**\n\t * This is where we do data store setup.\n\t *\n\t * @param context - data store context used to load a data store runtime\n\t */\n\tpublic async instantiateDataStore(context: IFluidDataStoreContext, existing: boolean) {\n\t\tconst { runtime } = await createDataObject(\n\t\t\tthis.ctor,\n\t\t\tcontext,\n\t\t\tthis.sharedObjectRegistry,\n\t\t\tthis.optionalProviders,\n\t\t\tthis.runtimeClass,\n\t\t\texisting,\n\t\t);\n\n\t\treturn runtime;\n\t}\n\n\t/**\n\t * Creates a new instance of the object. Uses parent context's registry to build package path to this factory.\n\t * In other words, registry of context passed in has to contain this factory, with the name that matches\n\t * this factory's type.\n\t * It is intended to be used by data store objects that create sub-objects.\n\t * @param context - The context being used to create the runtime\n\t * (the created object will have its own new context created as well)\n\t * @param initialState - The initial state to provide to the created data store.\n\t * @returns an object created by this factory. Data store and objects created are not attached to container.\n\t * They get attached only when a handle to one of them is attached to already attached objects.\n\t */\n\tpublic async createChildInstance(\n\t\tparentContext: IFluidDataStoreContext,\n\t\tinitialState?: I[\"InitialState\"],\n\t): Promise<TObj> {\n\t\treturn this.createNonRootInstanceCore(\n\t\t\tparentContext.containerRuntime,\n\t\t\t[...parentContext.packagePath, this.type],\n\t\t\tinitialState,\n\t\t);\n\t}\n\n\t/**\n\t * Creates a new instance of the object. Uses peer context's registry and its package path to identify this factory.\n\t * In other words, registry of context passed in has to have this factory.\n\t * Intended to be used by data store objects that need to create peers (similar) instances of existing objects.\n\t * @param context - The component context being used to create the object\n\t * (the created object will have its own new context created as well)\n\t * @param initialState - The initial state to provide to the created component.\n\t * @returns an object created by this factory. Data store and objects created are not attached to container.\n\t * They get attached only when a handle to one of them is attached to already attached objects.\n\t */\n\tpublic async createPeerInstance(\n\t\tpeerContext: IFluidDataStoreContext,\n\t\tinitialState?: I[\"InitialState\"],\n\t): Promise<TObj> {\n\t\treturn this.createNonRootInstanceCore(\n\t\t\tpeerContext.containerRuntime,\n\t\t\tpeerContext.packagePath,\n\t\t\tinitialState,\n\t\t);\n\t}\n\n\t/**\n\t * Creates a new instance of the object. Uses container's registry to find this factory.\n\t * It's expected that only container owners would use this functionality, as only such developers\n\t * have knowledge of entries in container registry.\n\t * The name in this registry for such record should match type of this factory.\n\t * @param runtime - container runtime. It's registry is used to create an object.\n\t * @param initialState - The initial state to provide to the created component.\n\t * @returns an object created by this factory. Data store and objects created are not attached to container.\n\t * They get attached only when a handle to one of them is attached to already attached objects.\n\t */\n\tpublic async createInstance(\n\t\truntime: IContainerRuntimeBase,\n\t\tinitialState?: I[\"InitialState\"],\n\t): Promise<TObj> {\n\t\treturn this.createNonRootInstanceCore(runtime, [this.type], initialState);\n\t}\n\n\t/**\n\t * Creates a new root instance of the object. Uses container's registry to find this factory.\n\t * It's expected that only container owners would use this functionality, as only such developers\n\t * have knowledge of entries in container registry.\n\t * The name in this registry for such record should match type of this factory.\n\t * @param runtime - container runtime. It's registry is used to create an object.\n\t * @param initialState - The initial state to provide to the created component.\n\t * @returns an object created by this factory. Data store and objects created are not attached to container.\n\t * They get attached only when a handle to one of them is attached to already attached objects.\n\t */\n\tpublic async createRootInstance(\n\t\trootDataStoreId: string,\n\t\truntime: IContainerRuntime,\n\t\tinitialState?: I[\"InitialState\"],\n\t): Promise<TObj> {\n\t\tconst context = runtime.createDetachedRootDataStore([this.type], rootDataStoreId);\n\t\treturn this.createInstanceCore(context, initialState);\n\t}\n\n\tprotected async createNonRootInstanceCore(\n\t\tcontainerRuntime: IContainerRuntimeBase,\n\t\tpackagePath: Readonly<string[]>,\n\t\tinitialState?: I[\"InitialState\"],\n\t): Promise<TObj> {\n\t\tconst context = containerRuntime.createDetachedDataStore(packagePath);\n\t\treturn this.createInstanceCore(context, initialState);\n\t}\n\n\tprotected async createInstanceCore(\n\t\tcontext: IFluidDataStoreContextDetached,\n\t\tinitialState?: I[\"InitialState\"],\n\t): Promise<TObj> {\n\t\tconst { instance, runtime } = await createDataObject(\n\t\t\tthis.ctor,\n\t\t\tcontext,\n\t\t\tthis.sharedObjectRegistry,\n\t\t\tthis.optionalProviders,\n\t\t\tthis.runtimeClass,\n\t\t\tfalse, // existing\n\t\t\tinitialState,\n\t\t);\n\n\t\tawait context.attachRuntime(this, runtime);\n\n\t\treturn instance;\n\t}\n}\n"]}
|
|
1
|
+
{"version":3,"file":"pureDataObjectFactory.cjs","sourceRoot":"","sources":["../../src/data-object-factories/pureDataObjectFactory.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAGH,yDAImC;AACnC,yEAA2E;AAmB3E,2DAAoD;AAGpD;;;GAGG;AACH,KAAK,UAAU,gBAAgB,CAI9B,IAA8C,EAC9C,OAA+B,EAC/B,oBAA2C,EAC3C,iBAAoE,EACpE,eAA6C,EAC7C,QAAiB,EACjB,SAA6B;IAE7B,OAAO;IACP,IAAI,YAAY,GAAG,eAAe,CAAC;IAEnC,mBAAmB;IACnB,YAAY,GAAG,IAAA,+BAAmB,EACjC,KAAK,EAAE,OAAiB,EAAE,UAAiC,EAAE,EAAE;QAC9D,iFAAiF;QACjF,MAAM,UAAU,GAAG,CAAC,MAAM,UAAU,CA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,OAAO,EAAE,GAAG,MAAM,gBAAgB,CACnD,IAAI,CAAC,IAAI,EACT,OAAO,EACP,IAAI,CAAC,oBAAoB,EACzB,IAAI,CAAC,iBAAiB,EACtB,IAAI,CAAC,YAAY,EACjB,KAAK,EAAE,WAAW;QAClB,YAAY,CACZ,CAAC;QAEF,MAAM,OAAO,CAAC,aAAa,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QAE3C,OAAO,QAAQ,CAAC;IACjB,CAAC;CACD;AAxKD,sDAwKC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IRequest, FluidObject } from \"@fluidframework/core-interfaces\";\nimport {\n\tFluidDataStoreRuntime,\n\tISharedObjectRegistry,\n\tmixinRequestHandler,\n} from \"@fluidframework/datastore\";\nimport { FluidDataStoreRegistry } from \"@fluidframework/container-runtime\";\nimport {\n\tIFluidDataStoreContext,\n\tIContainerRuntimeBase,\n\tIFluidDataStoreFactory,\n\tIFluidDataStoreRegistry,\n\tIProvideFluidDataStoreRegistry,\n\tNamedFluidDataStoreRegistryEntries,\n\tNamedFluidDataStoreRegistryEntry,\n\tIFluidDataStoreContextDetached,\n} from \"@fluidframework/runtime-definitions\";\nimport { IContainerRuntime } from \"@fluidframework/container-runtime-definitions\";\nimport { IChannelFactory, IFluidDataStoreRuntime } from \"@fluidframework/datastore-definitions\";\nimport {\n\tAsyncFluidObjectProvider,\n\tFluidObjectSymbolProvider,\n\tIFluidDependencySynthesizer,\n} from \"@fluidframework/synthesize\";\n\nimport { assert } from \"@fluidframework/core-utils\";\nimport { IDataObjectProps, PureDataObject, DataObjectTypes } from \"../data-objects\";\n\n/**\n * Proxy over PureDataObject\n * Does delayed creation & initialization of PureDataObject\n */\nasync function createDataObject<\n\tTObj extends PureDataObject,\n\tI extends DataObjectTypes = DataObjectTypes,\n>(\n\tctor: new (props: IDataObjectProps<I>) => TObj,\n\tcontext: IFluidDataStoreContext,\n\tsharedObjectRegistry: ISharedObjectRegistry,\n\toptionalProviders: FluidObjectSymbolProvider<I[\"OptionalProviders\"]>,\n\truntimeClassArg: typeof FluidDataStoreRuntime,\n\texisting: boolean,\n\tinitProps?: I[\"InitialState\"],\n) {\n\t// base\n\tlet runtimeClass = runtimeClassArg;\n\n\t// request mixin in\n\truntimeClass = mixinRequestHandler(\n\t\tasync (request: IRequest, runtimeArg: FluidDataStoreRuntime) => {\n\t\t\t// The provideEntryPoint callback below always returns TObj, so this cast is safe\n\t\t\tconst dataObject = (await runtimeArg.entryPoint.get()) as TObj;\n\t\t\tassert(\n\t\t\t\tdataObject.request !== undefined,\n\t\t\t\t0x795 /* Data store runtime entryPoint does not have request */,\n\t\t\t);\n\t\t\treturn dataObject.request(request);\n\t\t},\n\t\truntimeClass,\n\t);\n\n\t// Create a new runtime for our data store, as if via new FluidDataStoreRuntime,\n\t// but using the runtimeClass that's been augmented with mixins\n\t// The runtime is what Fluid uses to create DDS' and route to your data store\n\tconst runtime: FluidDataStoreRuntime = new runtimeClass( // calls new FluidDataStoreRuntime(...)\n\t\tcontext,\n\t\tsharedObjectRegistry,\n\t\texisting,\n\t\tasync (rt: IFluidDataStoreRuntime) => {\n\t\t\tassert(instance !== undefined, 0x46a /* entryPoint is undefined */);\n\t\t\t// Calling finishInitialization here like PureDataObject.getDataObject did, to keep the same behavior,\n\t\t\t// since accessing the runtime's entryPoint is how we want the data object to be retrieved going forward.\n\t\t\t// Without this I ran into issues with the load-existing flow not working correctly.\n\t\t\tawait instance.finishInitialization(true);\n\t\t\treturn instance;\n\t\t} /* provideEntryPoint */,\n\t);\n\n\t// Create object right away.\n\t// This allows object to register various callbacks with runtime before runtime\n\t// becomes globally available. But it's not full initialization - constructor can't\n\t// access DDSes or other services of runtime as objects are not fully initialized.\n\t// In order to use object, we need to go through full initialization by calling finishInitialization().\n\tconst scope: FluidObject<IFluidDependencySynthesizer> = context.scope;\n\tconst providers =\n\t\tscope.IFluidDependencySynthesizer?.synthesize<I[\"OptionalProviders\"]>(\n\t\t\toptionalProviders,\n\t\t\t{},\n\t\t) ??\n\t\t// eslint-disable-next-line @typescript-eslint/consistent-type-assertions\n\t\t({} as AsyncFluidObjectProvider<never>);\n\n\tconst instance = new ctor({ runtime, context, providers, initProps });\n\n\t// if it's a newly created object, we need to wait for it to finish initialization\n\t// as that results in creation of DDSes, before it gets attached, providing atomic\n\t// guarantee of creation.\n\t// WARNING: we can't do the same (yet) for already existing PureDataObject!\n\t// This will result in deadlock, as it tries to resolve internal handles, but any\n\t// handle resolution goes through root (container runtime), which can't route it back\n\t// to this data store, as it's still not initialized and not known to container runtime yet.\n\t// In the future, we should address it by using relative paths for handles and be able to resolve\n\t// local DDSes while data store is not fully initialized.\n\tif (!existing) {\n\t\tawait instance.finishInitialization(existing);\n\t}\n\n\treturn { instance, runtime };\n}\n\n/**\n * PureDataObjectFactory is a barebones IFluidDataStoreFactory for use with PureDataObject.\n * Consumers should typically use DataObjectFactory instead unless creating\n * another base data store factory.\n *\n * @typeParam TObj - DataObject (concrete type)\n * @typeParam I - The input types for the DataObject\n * @alpha\n */\nexport class PureDataObjectFactory<\n\t\tTObj extends PureDataObject<I>,\n\t\tI extends DataObjectTypes = DataObjectTypes,\n\t>\n\timplements IFluidDataStoreFactory, Partial<IProvideFluidDataStoreRegistry>\n{\n\tprivate readonly sharedObjectRegistry: ISharedObjectRegistry;\n\tprivate readonly registry: IFluidDataStoreRegistry | undefined;\n\n\tconstructor(\n\t\tpublic readonly type: string,\n\t\tprivate readonly ctor: new (props: IDataObjectProps<I>) => TObj,\n\t\tsharedObjects: readonly IChannelFactory[],\n\t\tprivate readonly optionalProviders: FluidObjectSymbolProvider<I[\"OptionalProviders\"]>,\n\t\tregistryEntries?: NamedFluidDataStoreRegistryEntries,\n\t\tprivate readonly runtimeClass: typeof FluidDataStoreRuntime = FluidDataStoreRuntime,\n\t) {\n\t\tif (this.type === \"\") {\n\t\t\tthrow new Error(\"undefined type member\");\n\t\t}\n\t\tif (registryEntries !== undefined) {\n\t\t\tthis.registry = new FluidDataStoreRegistry(registryEntries);\n\t\t}\n\t\tthis.sharedObjectRegistry = new Map(sharedObjects.map((ext) => [ext.type, ext]));\n\t}\n\n\tpublic get IFluidDataStoreFactory() {\n\t\treturn this;\n\t}\n\n\tpublic get IFluidDataStoreRegistry() {\n\t\treturn this.registry;\n\t}\n\n\t/**\n\t * Convenience helper to get the data store's/factory's data store registry entry.\n\t * The return type hides the factory's generics, easing grouping of registry\n\t * entries that differ only in this way into the same array.\n\t * @returns The NamedFluidDataStoreRegistryEntry\n\t */\n\tpublic get registryEntry(): NamedFluidDataStoreRegistryEntry {\n\t\treturn [this.type, Promise.resolve(this)];\n\t}\n\n\t/**\n\t * This is where we do data store setup.\n\t *\n\t * @param context - data store context used to load a data store runtime\n\t */\n\tpublic async instantiateDataStore(context: IFluidDataStoreContext, existing: boolean) {\n\t\tconst { runtime } = await createDataObject(\n\t\t\tthis.ctor,\n\t\t\tcontext,\n\t\t\tthis.sharedObjectRegistry,\n\t\t\tthis.optionalProviders,\n\t\t\tthis.runtimeClass,\n\t\t\texisting,\n\t\t);\n\n\t\treturn runtime;\n\t}\n\n\t/**\n\t * Creates a new instance of the object. Uses parent context's registry to build package path to this factory.\n\t * In other words, registry of context passed in has to contain this factory, with the name that matches\n\t * this factory's type.\n\t * It is intended to be used by data store objects that create sub-objects.\n\t * @param context - The context being used to create the runtime\n\t * (the created object will have its own new context created as well)\n\t * @param initialState - The initial state to provide to the created data store.\n\t * @returns an object created by this factory. Data store and objects created are not attached to container.\n\t * They get attached only when a handle to one of them is attached to already attached objects.\n\t */\n\tpublic async createChildInstance(\n\t\tparentContext: IFluidDataStoreContext,\n\t\tinitialState?: I[\"InitialState\"],\n\t): Promise<TObj> {\n\t\treturn this.createNonRootInstanceCore(\n\t\t\tparentContext.containerRuntime,\n\t\t\t[...parentContext.packagePath, this.type],\n\t\t\tinitialState,\n\t\t);\n\t}\n\n\t/**\n\t * Creates a new instance of the object. Uses peer context's registry and its package path to identify this factory.\n\t * In other words, registry of context passed in has to have this factory.\n\t * Intended to be used by data store objects that need to create peers (similar) instances of existing objects.\n\t * @param context - The component context being used to create the object\n\t * (the created object will have its own new context created as well)\n\t * @param initialState - The initial state to provide to the created component.\n\t * @returns an object created by this factory. Data store and objects created are not attached to container.\n\t * They get attached only when a handle to one of them is attached to already attached objects.\n\t */\n\tpublic async createPeerInstance(\n\t\tpeerContext: IFluidDataStoreContext,\n\t\tinitialState?: I[\"InitialState\"],\n\t): Promise<TObj> {\n\t\treturn this.createNonRootInstanceCore(\n\t\t\tpeerContext.containerRuntime,\n\t\t\tpeerContext.packagePath,\n\t\t\tinitialState,\n\t\t);\n\t}\n\n\t/**\n\t * Creates a new instance of the object. Uses container's registry to find this factory.\n\t * It's expected that only container owners would use this functionality, as only such developers\n\t * have knowledge of entries in container registry.\n\t * The name in this registry for such record should match type of this factory.\n\t * @param runtime - container runtime. It's registry is used to create an object.\n\t * @param initialState - The initial state to provide to the created component.\n\t * @returns an object created by this factory. Data store and objects created are not attached to container.\n\t * They get attached only when a handle to one of them is attached to already attached objects.\n\t */\n\tpublic async createInstance(\n\t\truntime: IContainerRuntimeBase,\n\t\tinitialState?: I[\"InitialState\"],\n\t): Promise<TObj> {\n\t\treturn this.createNonRootInstanceCore(runtime, [this.type], initialState);\n\t}\n\n\t/**\n\t * Creates a new root instance of the object. Uses container's registry to find this factory.\n\t * It's expected that only container owners would use this functionality, as only such developers\n\t * have knowledge of entries in container registry.\n\t * The name in this registry for such record should match type of this factory.\n\t * @param runtime - container runtime. It's registry is used to create an object.\n\t * @param initialState - The initial state to provide to the created component.\n\t * @returns an object created by this factory. Data store and objects created are not attached to container.\n\t * They get attached only when a handle to one of them is attached to already attached objects.\n\t */\n\tpublic async createRootInstance(\n\t\trootDataStoreId: string,\n\t\truntime: IContainerRuntime,\n\t\tinitialState?: I[\"InitialState\"],\n\t): Promise<TObj> {\n\t\tconst context = runtime.createDetachedRootDataStore([this.type], rootDataStoreId);\n\t\treturn this.createInstanceCore(context, initialState);\n\t}\n\n\tprotected async createNonRootInstanceCore(\n\t\tcontainerRuntime: IContainerRuntimeBase,\n\t\tpackagePath: Readonly<string[]>,\n\t\tinitialState?: I[\"InitialState\"],\n\t): Promise<TObj> {\n\t\tconst context = containerRuntime.createDetachedDataStore(packagePath);\n\t\treturn this.createInstanceCore(context, initialState);\n\t}\n\n\tprotected async createInstanceCore(\n\t\tcontext: IFluidDataStoreContextDetached,\n\t\tinitialState?: I[\"InitialState\"],\n\t): Promise<TObj> {\n\t\tconst { instance, runtime } = await createDataObject(\n\t\t\tthis.ctor,\n\t\t\tcontext,\n\t\t\tthis.sharedObjectRegistry,\n\t\t\tthis.optionalProviders,\n\t\t\tthis.runtimeClass,\n\t\t\tfalse, // existing\n\t\t\tinitialState,\n\t\t);\n\n\t\tawait context.attachRuntime(this, runtime);\n\n\t\treturn instance;\n\t}\n}\n"]}
|
|
@@ -2,21 +2,12 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
import { IFluidRouter } from "@fluidframework/core-interfaces";
|
|
6
5
|
import { FluidDataStoreRuntime } from "@fluidframework/datastore";
|
|
7
6
|
import { IFluidDataStoreContext, IContainerRuntimeBase, IFluidDataStoreFactory, IFluidDataStoreRegistry, IProvideFluidDataStoreRegistry, NamedFluidDataStoreRegistryEntries, NamedFluidDataStoreRegistryEntry, IFluidDataStoreContextDetached } from "@fluidframework/runtime-definitions";
|
|
8
7
|
import { IContainerRuntime } from "@fluidframework/container-runtime-definitions";
|
|
9
8
|
import { IChannelFactory } from "@fluidframework/datastore-definitions";
|
|
10
9
|
import { FluidObjectSymbolProvider } from "@fluidframework/synthesize";
|
|
11
10
|
import { IDataObjectProps, PureDataObject, DataObjectTypes } from "../data-objects";
|
|
12
|
-
/**
|
|
13
|
-
* Useful interface in places where it's useful to do type erasure for PureDataObject generic
|
|
14
|
-
* @deprecated Will be removed in future major release. Please remove all usage of it.
|
|
15
|
-
* @alpha
|
|
16
|
-
*/
|
|
17
|
-
export interface IRootDataObjectFactory extends IFluidDataStoreFactory {
|
|
18
|
-
createRootInstance(rootDataStoreId: string, runtime: IContainerRuntime): Promise<IFluidRouter>;
|
|
19
|
-
}
|
|
20
11
|
/**
|
|
21
12
|
* PureDataObjectFactory is a barebones IFluidDataStoreFactory for use with PureDataObject.
|
|
22
13
|
* Consumers should typically use DataObjectFactory instead unless creating
|
|
@@ -26,7 +17,7 @@ export interface IRootDataObjectFactory extends IFluidDataStoreFactory {
|
|
|
26
17
|
* @typeParam I - The input types for the DataObject
|
|
27
18
|
* @alpha
|
|
28
19
|
*/
|
|
29
|
-
export declare class PureDataObjectFactory<TObj extends PureDataObject<I>, I extends DataObjectTypes = DataObjectTypes> implements IFluidDataStoreFactory, Partial<IProvideFluidDataStoreRegistry
|
|
20
|
+
export declare class PureDataObjectFactory<TObj extends PureDataObject<I>, I extends DataObjectTypes = DataObjectTypes> implements IFluidDataStoreFactory, Partial<IProvideFluidDataStoreRegistry> {
|
|
30
21
|
readonly type: string;
|
|
31
22
|
private readonly ctor;
|
|
32
23
|
private readonly optionalProviders;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pureDataObjectFactory.d.ts","sourceRoot":"","sources":["../../src/data-object-factories/pureDataObjectFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,
|
|
1
|
+
{"version":3,"file":"pureDataObjectFactory.d.ts","sourceRoot":"","sources":["../../src/data-object-factories/pureDataObjectFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EACN,qBAAqB,EAGrB,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EACN,sBAAsB,EACtB,qBAAqB,EACrB,sBAAsB,EACtB,uBAAuB,EACvB,8BAA8B,EAC9B,kCAAkC,EAClC,gCAAgC,EAChC,8BAA8B,EAC9B,MAAM,qCAAqC,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9B,OAAO,CAAC,IAAI,CAAC;IAQhB;;;;;;;;;OASG;IACU,kBAAkB,CAC9B,WAAW,EAAE,sBAAsB,EACnC,YAAY,CAAC,EAAE,CAAC,CAAC,cAAc,CAAC,GAC9B,OAAO,CAAC,IAAI,CAAC;IAQhB;;;;;;;;;OASG;IACU,cAAc,CAC1B,OAAO,EAAE,qBAAqB,EAC9B,YAAY,CAAC,EAAE,CAAC,CAAC,cAAc,CAAC,GAC9B,OAAO,CAAC,IAAI,CAAC;IAIhB;;;;;;;;;OASG;IACU,kBAAkB,CAC9B,eAAe,EAAE,MAAM,EACvB,OAAO,EAAE,iBAAiB,EAC1B,YAAY,CAAC,EAAE,CAAC,CAAC,cAAc,CAAC,GAC9B,OAAO,CAAC,IAAI,CAAC;cAKA,yBAAyB,CACxC,gBAAgB,EAAE,qBAAqB,EACvC,WAAW,EAAE,QAAQ,CAAC,MAAM,EAAE,CAAC,EAC/B,YAAY,CAAC,EAAE,CAAC,CAAC,cAAc,CAAC,GAC9B,OAAO,CAAC,IAAI,CAAC;cAKA,kBAAkB,CACjC,OAAO,EAAE,8BAA8B,EACvC,YAAY,CAAC,EAAE,CAAC,CAAC,cAAc,CAAC,GAC9B,OAAO,CAAC,IAAI,CAAC;CAehB"}
|
|
@@ -20,13 +20,6 @@ class PureDataObject extends client_utils_1.TypedEventEmitter {
|
|
|
20
20
|
get id() {
|
|
21
21
|
return this.runtime.id;
|
|
22
22
|
}
|
|
23
|
-
/**
|
|
24
|
-
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
|
|
25
|
-
*/
|
|
26
|
-
// eslint-disable-next-line import/no-deprecated
|
|
27
|
-
get IFluidRouter() {
|
|
28
|
-
return this;
|
|
29
|
-
}
|
|
30
23
|
get IFluidLoadable() {
|
|
31
24
|
return this;
|
|
32
25
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pureDataObject.cjs","sourceRoot":"","sources":["../../src/data-objects/pureDataObject.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,+DAAiE;AACjE,2DAAoD;
|
|
1
|
+
{"version":3,"file":"pureDataObject.cjs","sourceRoot":"","sources":["../../src/data-objects/pureDataObject.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,+DAAiE;AACjE,2DAAoD;AAYpD,iEAAkE;AAGlE;;;;;;;GAOG;AACH,MAAsB,cACrB,SAAQ,gCAAuC;IA0B/C,IAAW,EAAE;QACZ,OAAO,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC;IACxB,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,MAAM;QAChB,0GAA0G;QAC1G,yGAAyG;QACzG,wDAAwD;QACxD,IAAA,mBAAM,EAAC,IAAI,CAAC,OAAO,CAAC,UAAU,KAAK,SAAS,EAAE,KAAK,CAAC,8BAA8B,CAAC,CAAC;QACpF,OAAO,IAAI,CAAC,OAAO,CAAC,UAAgC,CAAC;IACtD,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,OAAO,CAAC;QAC7B,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC,SAAS,CAAC;QACjC,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC,SAAS,CAAC;QAEjC,IAAA,mBAAM,EACJ,IAAI,CAAC,OAAe,CAAC,WAAW,KAAK,SAAS,EAC/C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AK,CAAC,qBAAqB,CAAC,KAAyB,IAAkB,CAAC;IAElF;;;OAGG;IACO,KAAK,CAAC,wBAAwB,KAAmB,CAAC;IAE5D;;OAEG;IACO,KAAK,CAAC,cAAc,KAAmB,CAAC;CAClD;AA/ID,wCA+IC","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 { assert } from \"@fluidframework/core-utils\";\nimport {\n\tIEvent,\n\tIFluidHandle,\n\tIFluidLoadable,\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 { create404Response } from \"@fluidframework/runtime-utils\";\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 * @alpha\n */\nexport abstract class PureDataObject<I extends DataObjectTypes = DataObjectTypes>\n\textends TypedEventEmitter<I[\"Events\"] & IEvent>\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 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\tpublic get id() {\n\t\treturn this.runtime.id;\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\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\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 * 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"]}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
import { TypedEventEmitter } from "@fluid-internal/client-utils";
|
|
6
|
-
import { IEvent, IFluidHandle, IFluidLoadable,
|
|
6
|
+
import { IEvent, IFluidHandle, IFluidLoadable, IProvideFluidHandle, IRequest, IResponse } from "@fluidframework/core-interfaces";
|
|
7
7
|
import { IFluidDataStoreRuntime } from "@fluidframework/datastore-definitions";
|
|
8
8
|
import { IFluidDataStoreContext } from "@fluidframework/runtime-definitions";
|
|
9
9
|
import { AsyncFluidObjectProvider } from "@fluidframework/synthesize";
|
|
@@ -16,7 +16,7 @@ import { DataObjectTypes, IDataObjectProps } from "./types";
|
|
|
16
16
|
* @typeParam I - The optional input types used to strongly type the data object
|
|
17
17
|
* @alpha
|
|
18
18
|
*/
|
|
19
|
-
export declare abstract class PureDataObject<I extends DataObjectTypes = DataObjectTypes> extends TypedEventEmitter<I["Events"] & IEvent> implements IFluidLoadable,
|
|
19
|
+
export declare abstract class PureDataObject<I extends DataObjectTypes = DataObjectTypes> extends TypedEventEmitter<I["Events"] & IEvent> implements IFluidLoadable, IProvideFluidHandle {
|
|
20
20
|
/**
|
|
21
21
|
* This is your FluidDataStoreRuntime object
|
|
22
22
|
*/
|
|
@@ -36,10 +36,6 @@ export declare abstract class PureDataObject<I extends DataObjectTypes = DataObj
|
|
|
36
36
|
protected initProps?: I["InitialState"];
|
|
37
37
|
protected initializeP: Promise<void> | undefined;
|
|
38
38
|
get id(): string;
|
|
39
|
-
/**
|
|
40
|
-
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
|
|
41
|
-
*/
|
|
42
|
-
get IFluidRouter(): this;
|
|
43
39
|
get IFluidLoadable(): this;
|
|
44
40
|
get IFluidHandle(): IFluidHandle<this>;
|
|
45
41
|
/**
|
|
@@ -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;AAEjE,OAAO,EACN,MAAM,EACN,YAAY,EACZ,cAAc,
|
|
1
|
+
{"version":3,"file":"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AK,EAAE,gBAAgB,CAAC,CAAC,CAAC;IAc7C;;;;;;;OAOG;IACU,OAAO,CAAC,GAAG,EAAE,QAAQ,GAAG,OAAO,CAAC,SAAS,CAAC;IAMvD;;;;;;OAMG;IACU,oBAAoB,CAAC,QAAQ,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IAQnE;;;;;;OAMG;IACU,kBAAkB,CAAC,QAAQ,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IAgBjE;;;OAGG;cACa,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC;IAE9C;;;;;OAKG;cACa,qBAAqB,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,cAAc,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAE/E;;;OAGG;cACa,wBAAwB,IAAI,OAAO,CAAC,IAAI,CAAC;IAEzD;;OAEG;cACa,cAAc,IAAI,OAAO,CAAC,IAAI,CAAC;CAC/C"}
|
package/dist/index.cjs
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Licensed under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.
|
|
7
|
+
exports.ContainerRuntimeFactoryWithDefaultDataStore = exports.BaseContainerRuntimeFactory = exports.PureDataObject = exports.DataObject = exports.PureDataObjectFactory = exports.DataObjectFactory = void 0;
|
|
8
8
|
/**
|
|
9
9
|
* The `aqueduct` package is a library for building Fluid objects and Fluid
|
|
10
10
|
* containers within the Fluid Framework. Its goal is to provide a thin base
|
|
@@ -28,12 +28,4 @@ Object.defineProperty(exports, "PureDataObject", { enumerable: true, get: functi
|
|
|
28
28
|
var container_runtime_factories_1 = require("./container-runtime-factories/index.cjs");
|
|
29
29
|
Object.defineProperty(exports, "BaseContainerRuntimeFactory", { enumerable: true, get: function () { return container_runtime_factories_1.BaseContainerRuntimeFactory; } });
|
|
30
30
|
Object.defineProperty(exports, "ContainerRuntimeFactoryWithDefaultDataStore", { enumerable: true, get: function () { return container_runtime_factories_1.ContainerRuntimeFactoryWithDefaultDataStore; } });
|
|
31
|
-
var request_handlers_1 = require("./request-handlers/index.cjs");
|
|
32
|
-
Object.defineProperty(exports, "defaultFluidObjectRequestHandler", { enumerable: true, get: function () { return request_handlers_1.defaultFluidObjectRequestHandler; } });
|
|
33
|
-
Object.defineProperty(exports, "defaultRouteRequestHandler", { enumerable: true, get: function () { return request_handlers_1.defaultRouteRequestHandler; } });
|
|
34
|
-
Object.defineProperty(exports, "mountableViewRequestHandler", { enumerable: true, get: function () { return request_handlers_1.mountableViewRequestHandler; } });
|
|
35
|
-
var utils_1 = require("./utils/index.cjs");
|
|
36
|
-
Object.defineProperty(exports, "getDefaultObjectFromContainer", { enumerable: true, get: function () { return utils_1.getDefaultObjectFromContainer; } });
|
|
37
|
-
Object.defineProperty(exports, "getObjectFromContainer", { enumerable: true, get: function () { return utils_1.getObjectFromContainer; } });
|
|
38
|
-
Object.defineProperty(exports, "getObjectWithIdFromContainer", { enumerable: true, get: function () { return utils_1.getObjectWithIdFromContainer; } });
|
|
39
31
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH;;;;;;;;;;;;;GAaG;AAEH,
|
|
1
|
+
{"version":3,"file":"index.cjs","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH;;;;;;;;;;;;;GAaG;AAEH,2EAAmF;AAA1E,0HAAA,iBAAiB,OAAA;AAAE,8HAAA,qBAAqB,OAAA;AACjD,yDAA+F;AAAtF,0GAAA,UAAU,OAAA;AAAqC,8GAAA,cAAc,OAAA;AACtE,uFAGuC;AAFtC,0IAAA,2BAA2B,OAAA;AAC3B,0JAAA,2CAA2C,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * The `aqueduct` package is a library for building Fluid objects and Fluid\n * containers within the Fluid Framework. Its goal is to provide a thin base\n * layer over the existing Fluid Framework interfaces that allows developers to\n * get started quickly.\n *\n * @remarks\n * About the library name: An \"aqueduct\" is a way to transport water from a source\n * to another location. The library name was chosen because its purpose is to\n * facilitate using lower level constructs and therefore handle 'fluid' items\n * same as an aqueduct.\n *\n * @packageDocumentation\n */\n\nexport { DataObjectFactory, PureDataObjectFactory } from \"./data-object-factories\";\nexport { DataObject, DataObjectTypes, IDataObjectProps, PureDataObject } from \"./data-objects\";\nexport {\n\tBaseContainerRuntimeFactory,\n\tContainerRuntimeFactoryWithDefaultDataStore,\n} from \"./container-runtime-factories\";\n"]}
|
package/dist/index.d.ts
CHANGED
|
@@ -16,9 +16,7 @@
|
|
|
16
16
|
*
|
|
17
17
|
* @packageDocumentation
|
|
18
18
|
*/
|
|
19
|
-
export { DataObjectFactory,
|
|
19
|
+
export { DataObjectFactory, PureDataObjectFactory } from "./data-object-factories";
|
|
20
20
|
export { DataObject, DataObjectTypes, IDataObjectProps, PureDataObject } from "./data-objects";
|
|
21
21
|
export { BaseContainerRuntimeFactory, ContainerRuntimeFactoryWithDefaultDataStore, } from "./container-runtime-factories";
|
|
22
|
-
export { defaultFluidObjectRequestHandler, defaultRouteRequestHandler, mountableViewRequestHandler, } from "./request-handlers";
|
|
23
|
-
export { getDefaultObjectFromContainer, getObjectFromContainer, getObjectWithIdFromContainer, } from "./utils";
|
|
24
22
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;;GAaG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AACnF,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC/F,OAAO,EACN,2BAA2B,EAC3B,2CAA2C,GAC3C,MAAM,+BAA+B,CAAC"}
|
package/lib/aqueduct-alpha.d.ts
CHANGED
|
@@ -19,7 +19,6 @@ import { FluidDataStoreRuntime } from '@fluidframework/datastore';
|
|
|
19
19
|
import { FluidObject } from '@fluidframework/core-interfaces';
|
|
20
20
|
import { FluidObjectSymbolProvider } from '@fluidframework/synthesize';
|
|
21
21
|
import { IChannelFactory } from '@fluidframework/datastore-definitions';
|
|
22
|
-
import { IContainer } from '@fluidframework/container-definitions';
|
|
23
22
|
import { IContainerContext } from '@fluidframework/container-definitions';
|
|
24
23
|
import { IContainerRuntime } from '@fluidframework/container-runtime-definitions';
|
|
25
24
|
import { IContainerRuntimeBase } from '@fluidframework/runtime-definitions';
|
|
@@ -33,8 +32,6 @@ import { IFluidDataStoreRuntime } from '@fluidframework/datastore-definitions';
|
|
|
33
32
|
import { IFluidDependencySynthesizer } from '@fluidframework/synthesize';
|
|
34
33
|
import { IFluidHandle } from '@fluidframework/core-interfaces';
|
|
35
34
|
import { IFluidLoadable } from '@fluidframework/core-interfaces';
|
|
36
|
-
import type { IFluidMountableViewClass } from '@fluidframework/view-interfaces';
|
|
37
|
-
import { IFluidRouter } from '@fluidframework/core-interfaces';
|
|
38
35
|
import { IProvideFluidDataStoreRegistry } from '@fluidframework/runtime-definitions';
|
|
39
36
|
import { IProvideFluidHandle } from '@fluidframework/core-interfaces';
|
|
40
37
|
import { IRequest } from '@fluidframework/core-interfaces';
|
|
@@ -42,7 +39,6 @@ import { IResponse } from '@fluidframework/core-interfaces';
|
|
|
42
39
|
import { ISharedDirectory } from '@fluidframework/map';
|
|
43
40
|
import { NamedFluidDataStoreRegistryEntries } from '@fluidframework/runtime-definitions';
|
|
44
41
|
import { NamedFluidDataStoreRegistryEntry } from '@fluidframework/runtime-definitions';
|
|
45
|
-
import { RequestParser } from '@fluidframework/runtime-utils';
|
|
46
42
|
import { RuntimeFactoryHelper } from '@fluidframework/runtime-utils';
|
|
47
43
|
import { RuntimeRequestHandler } from '@fluidframework/request-handler';
|
|
48
44
|
import { TypedEventEmitter } from '@fluid-internal/client-utils';
|
|
@@ -72,7 +68,7 @@ export declare class BaseContainerRuntimeFactory extends RuntimeFactoryHelper im
|
|
|
72
68
|
constructor(props: {
|
|
73
69
|
registryEntries: NamedFluidDataStoreRegistryEntries;
|
|
74
70
|
dependencyContainer?: IFluidDependencySynthesizer;
|
|
75
|
-
/** @deprecated Will be removed
|
|
71
|
+
/** @deprecated Will be removed once Loader LTS version is "2.0.0-internal.7.0.0". Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md */
|
|
76
72
|
requestHandlers?: RuntimeRequestHandler[];
|
|
77
73
|
runtimeOptions?: IContainerRuntimeOptions;
|
|
78
74
|
provideEntryPoint: (runtime: IContainerRuntime) => Promise<FluidObject>;
|
|
@@ -117,7 +113,7 @@ export declare class ContainerRuntimeFactoryWithDefaultDataStore extends BaseCon
|
|
|
117
113
|
defaultFactory: IFluidDataStoreFactory;
|
|
118
114
|
registryEntries: NamedFluidDataStoreRegistryEntries;
|
|
119
115
|
dependencyContainer?: IFluidDependencySynthesizer;
|
|
120
|
-
/** @deprecated Will be removed
|
|
116
|
+
/** @deprecated Will be removed once Loader LTS version is "2.0.0-internal.7.0.0". Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md */
|
|
121
117
|
requestHandlers?: RuntimeRequestHandler[];
|
|
122
118
|
runtimeOptions?: IContainerRuntimeOptions;
|
|
123
119
|
provideEntryPoint?: (runtime: IContainerRuntime) => Promise<FluidObject>;
|
|
@@ -191,16 +187,6 @@ export declare interface DataObjectTypes {
|
|
|
191
187
|
Events?: IEvent;
|
|
192
188
|
}
|
|
193
189
|
|
|
194
|
-
/* Excluded from this release type: defaultFluidObjectRequestHandler */
|
|
195
|
-
|
|
196
|
-
/* Excluded from this release type: defaultRouteRequestHandler */
|
|
197
|
-
|
|
198
|
-
/* Excluded from this release type: getDefaultObjectFromContainer */
|
|
199
|
-
|
|
200
|
-
/* Excluded from this release type: getObjectFromContainer */
|
|
201
|
-
|
|
202
|
-
/* Excluded from this release type: getObjectWithIdFromContainer */
|
|
203
|
-
|
|
204
190
|
/**
|
|
205
191
|
* @alpha
|
|
206
192
|
*/
|
|
@@ -211,19 +197,6 @@ export declare interface IDataObjectProps<I extends DataObjectTypes = DataObject
|
|
|
211
197
|
readonly initProps?: I["InitialState"];
|
|
212
198
|
}
|
|
213
199
|
|
|
214
|
-
/* Excluded from this release type: IFluidMountableViewClass */
|
|
215
|
-
|
|
216
|
-
/**
|
|
217
|
-
* Useful interface in places where it's useful to do type erasure for PureDataObject generic
|
|
218
|
-
* @deprecated Will be removed in future major release. Please remove all usage of it.
|
|
219
|
-
* @alpha
|
|
220
|
-
*/
|
|
221
|
-
export declare interface IRootDataObjectFactory extends IFluidDataStoreFactory {
|
|
222
|
-
createRootInstance(rootDataStoreId: string, runtime: IContainerRuntime): Promise<IFluidRouter>;
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
/* Excluded from this release type: mountableViewRequestHandler */
|
|
226
|
-
|
|
227
200
|
/**
|
|
228
201
|
* This is a bare-bones base class that does basic setup and enables for factory on an initialize call.
|
|
229
202
|
* You probably don't want to inherit from this data store directly unless
|
|
@@ -232,7 +205,7 @@ export declare interface IRootDataObjectFactory extends IFluidDataStoreFactory {
|
|
|
232
205
|
* @typeParam I - The optional input types used to strongly type the data object
|
|
233
206
|
* @alpha
|
|
234
207
|
*/
|
|
235
|
-
export declare abstract class PureDataObject<I extends DataObjectTypes = DataObjectTypes> extends TypedEventEmitter<I["Events"] & IEvent> implements IFluidLoadable,
|
|
208
|
+
export declare abstract class PureDataObject<I extends DataObjectTypes = DataObjectTypes> extends TypedEventEmitter<I["Events"] & IEvent> implements IFluidLoadable, IProvideFluidHandle {
|
|
236
209
|
/**
|
|
237
210
|
* This is your FluidDataStoreRuntime object
|
|
238
211
|
*/
|
|
@@ -252,10 +225,6 @@ export declare abstract class PureDataObject<I extends DataObjectTypes = DataObj
|
|
|
252
225
|
protected initProps?: I["InitialState"];
|
|
253
226
|
protected initializeP: Promise<void> | undefined;
|
|
254
227
|
get id(): string;
|
|
255
|
-
/**
|
|
256
|
-
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
|
|
257
|
-
*/
|
|
258
|
-
get IFluidRouter(): this;
|
|
259
228
|
get IFluidLoadable(): this;
|
|
260
229
|
get IFluidHandle(): IFluidHandle<this>;
|
|
261
230
|
/**
|
|
@@ -321,7 +290,7 @@ export declare abstract class PureDataObject<I extends DataObjectTypes = DataObj
|
|
|
321
290
|
* @typeParam I - The input types for the DataObject
|
|
322
291
|
* @alpha
|
|
323
292
|
*/
|
|
324
|
-
export declare class PureDataObjectFactory<TObj extends PureDataObject<I>, I extends DataObjectTypes = DataObjectTypes> implements IFluidDataStoreFactory, Partial<IProvideFluidDataStoreRegistry
|
|
293
|
+
export declare class PureDataObjectFactory<TObj extends PureDataObject<I>, I extends DataObjectTypes = DataObjectTypes> implements IFluidDataStoreFactory, Partial<IProvideFluidDataStoreRegistry> {
|
|
325
294
|
readonly type: string;
|
|
326
295
|
private readonly ctor;
|
|
327
296
|
private readonly optionalProviders;
|
package/lib/aqueduct-beta.d.ts
CHANGED
|
@@ -19,7 +19,6 @@ import { FluidDataStoreRuntime } from '@fluidframework/datastore';
|
|
|
19
19
|
import { FluidObject } from '@fluidframework/core-interfaces';
|
|
20
20
|
import { FluidObjectSymbolProvider } from '@fluidframework/synthesize';
|
|
21
21
|
import { IChannelFactory } from '@fluidframework/datastore-definitions';
|
|
22
|
-
import { IContainer } from '@fluidframework/container-definitions';
|
|
23
22
|
import { IContainerContext } from '@fluidframework/container-definitions';
|
|
24
23
|
import { IContainerRuntime } from '@fluidframework/container-runtime-definitions';
|
|
25
24
|
import { IContainerRuntimeBase } from '@fluidframework/runtime-definitions';
|
|
@@ -33,8 +32,6 @@ import { IFluidDataStoreRuntime } from '@fluidframework/datastore-definitions';
|
|
|
33
32
|
import { IFluidDependencySynthesizer } from '@fluidframework/synthesize';
|
|
34
33
|
import { IFluidHandle } from '@fluidframework/core-interfaces';
|
|
35
34
|
import { IFluidLoadable } from '@fluidframework/core-interfaces';
|
|
36
|
-
import type { IFluidMountableViewClass } from '@fluidframework/view-interfaces';
|
|
37
|
-
import { IFluidRouter } from '@fluidframework/core-interfaces';
|
|
38
35
|
import { IProvideFluidDataStoreRegistry } from '@fluidframework/runtime-definitions';
|
|
39
36
|
import { IProvideFluidHandle } from '@fluidframework/core-interfaces';
|
|
40
37
|
import { IRequest } from '@fluidframework/core-interfaces';
|
|
@@ -42,7 +39,6 @@ import { IResponse } from '@fluidframework/core-interfaces';
|
|
|
42
39
|
import { ISharedDirectory } from '@fluidframework/map';
|
|
43
40
|
import { NamedFluidDataStoreRegistryEntries } from '@fluidframework/runtime-definitions';
|
|
44
41
|
import { NamedFluidDataStoreRegistryEntry } from '@fluidframework/runtime-definitions';
|
|
45
|
-
import { RequestParser } from '@fluidframework/runtime-utils';
|
|
46
42
|
import { RuntimeFactoryHelper } from '@fluidframework/runtime-utils';
|
|
47
43
|
import { RuntimeRequestHandler } from '@fluidframework/request-handler';
|
|
48
44
|
import { TypedEventEmitter } from '@fluid-internal/client-utils';
|
|
@@ -61,26 +57,14 @@ import { TypedEventEmitter } from '@fluid-internal/client-utils';
|
|
|
61
57
|
|
|
62
58
|
/* Excluded from this release type: DataObjectTypes */
|
|
63
59
|
|
|
64
|
-
/* Excluded from this release type: defaultFluidObjectRequestHandler */
|
|
65
|
-
|
|
66
|
-
/* Excluded from this release type: defaultRouteRequestHandler */
|
|
67
|
-
|
|
68
60
|
/* Excluded from this release type: FluidDataStoreRuntime */
|
|
69
61
|
|
|
70
62
|
/* Excluded from this release type: FluidObject */
|
|
71
63
|
|
|
72
64
|
/* Excluded from this release type: FluidObjectSymbolProvider */
|
|
73
65
|
|
|
74
|
-
/* Excluded from this release type: getDefaultObjectFromContainer */
|
|
75
|
-
|
|
76
|
-
/* Excluded from this release type: getObjectFromContainer */
|
|
77
|
-
|
|
78
|
-
/* Excluded from this release type: getObjectWithIdFromContainer */
|
|
79
|
-
|
|
80
66
|
/* Excluded from this release type: IChannelFactory */
|
|
81
67
|
|
|
82
|
-
/* Excluded from this release type: IContainer */
|
|
83
|
-
|
|
84
68
|
/* Excluded from this release type: IContainerContext */
|
|
85
69
|
|
|
86
70
|
/* Excluded from this release type: IContainerRuntime */
|
|
@@ -109,10 +93,6 @@ import { TypedEventEmitter } from '@fluid-internal/client-utils';
|
|
|
109
93
|
|
|
110
94
|
/* Excluded from this release type: IFluidLoadable */
|
|
111
95
|
|
|
112
|
-
/* Excluded from this release type: IFluidMountableViewClass */
|
|
113
|
-
|
|
114
|
-
/* Excluded from this release type: IFluidRouter */
|
|
115
|
-
|
|
116
96
|
/* Excluded from this release type: IProvideFluidDataStoreRegistry */
|
|
117
97
|
|
|
118
98
|
/* Excluded from this release type: IProvideFluidHandle */
|
|
@@ -121,12 +101,8 @@ import { TypedEventEmitter } from '@fluid-internal/client-utils';
|
|
|
121
101
|
|
|
122
102
|
/* Excluded from this release type: IResponse */
|
|
123
103
|
|
|
124
|
-
/* Excluded from this release type: IRootDataObjectFactory */
|
|
125
|
-
|
|
126
104
|
/* Excluded from this release type: ISharedDirectory */
|
|
127
105
|
|
|
128
|
-
/* Excluded from this release type: mountableViewRequestHandler */
|
|
129
|
-
|
|
130
106
|
/* Excluded from this release type: NamedFluidDataStoreRegistryEntries */
|
|
131
107
|
|
|
132
108
|
/* Excluded from this release type: NamedFluidDataStoreRegistryEntry */
|
|
@@ -135,8 +111,6 @@ import { TypedEventEmitter } from '@fluid-internal/client-utils';
|
|
|
135
111
|
|
|
136
112
|
/* Excluded from this release type: PureDataObjectFactory */
|
|
137
113
|
|
|
138
|
-
/* Excluded from this release type: RequestParser */
|
|
139
|
-
|
|
140
114
|
/* Excluded from this release type: RuntimeFactoryHelper */
|
|
141
115
|
|
|
142
116
|
/* Excluded from this release type: RuntimeRequestHandler */
|
package/lib/aqueduct-public.d.ts
CHANGED
|
@@ -19,7 +19,6 @@ import { FluidDataStoreRuntime } from '@fluidframework/datastore';
|
|
|
19
19
|
import { FluidObject } from '@fluidframework/core-interfaces';
|
|
20
20
|
import { FluidObjectSymbolProvider } from '@fluidframework/synthesize';
|
|
21
21
|
import { IChannelFactory } from '@fluidframework/datastore-definitions';
|
|
22
|
-
import { IContainer } from '@fluidframework/container-definitions';
|
|
23
22
|
import { IContainerContext } from '@fluidframework/container-definitions';
|
|
24
23
|
import { IContainerRuntime } from '@fluidframework/container-runtime-definitions';
|
|
25
24
|
import { IContainerRuntimeBase } from '@fluidframework/runtime-definitions';
|
|
@@ -33,8 +32,6 @@ import { IFluidDataStoreRuntime } from '@fluidframework/datastore-definitions';
|
|
|
33
32
|
import { IFluidDependencySynthesizer } from '@fluidframework/synthesize';
|
|
34
33
|
import { IFluidHandle } from '@fluidframework/core-interfaces';
|
|
35
34
|
import { IFluidLoadable } from '@fluidframework/core-interfaces';
|
|
36
|
-
import type { IFluidMountableViewClass } from '@fluidframework/view-interfaces';
|
|
37
|
-
import { IFluidRouter } from '@fluidframework/core-interfaces';
|
|
38
35
|
import { IProvideFluidDataStoreRegistry } from '@fluidframework/runtime-definitions';
|
|
39
36
|
import { IProvideFluidHandle } from '@fluidframework/core-interfaces';
|
|
40
37
|
import { IRequest } from '@fluidframework/core-interfaces';
|
|
@@ -42,7 +39,6 @@ import { IResponse } from '@fluidframework/core-interfaces';
|
|
|
42
39
|
import { ISharedDirectory } from '@fluidframework/map';
|
|
43
40
|
import { NamedFluidDataStoreRegistryEntries } from '@fluidframework/runtime-definitions';
|
|
44
41
|
import { NamedFluidDataStoreRegistryEntry } from '@fluidframework/runtime-definitions';
|
|
45
|
-
import { RequestParser } from '@fluidframework/runtime-utils';
|
|
46
42
|
import { RuntimeFactoryHelper } from '@fluidframework/runtime-utils';
|
|
47
43
|
import { RuntimeRequestHandler } from '@fluidframework/request-handler';
|
|
48
44
|
import { TypedEventEmitter } from '@fluid-internal/client-utils';
|
|
@@ -61,26 +57,14 @@ import { TypedEventEmitter } from '@fluid-internal/client-utils';
|
|
|
61
57
|
|
|
62
58
|
/* Excluded from this release type: DataObjectTypes */
|
|
63
59
|
|
|
64
|
-
/* Excluded from this release type: defaultFluidObjectRequestHandler */
|
|
65
|
-
|
|
66
|
-
/* Excluded from this release type: defaultRouteRequestHandler */
|
|
67
|
-
|
|
68
60
|
/* Excluded from this release type: FluidDataStoreRuntime */
|
|
69
61
|
|
|
70
62
|
/* Excluded from this release type: FluidObject */
|
|
71
63
|
|
|
72
64
|
/* Excluded from this release type: FluidObjectSymbolProvider */
|
|
73
65
|
|
|
74
|
-
/* Excluded from this release type: getDefaultObjectFromContainer */
|
|
75
|
-
|
|
76
|
-
/* Excluded from this release type: getObjectFromContainer */
|
|
77
|
-
|
|
78
|
-
/* Excluded from this release type: getObjectWithIdFromContainer */
|
|
79
|
-
|
|
80
66
|
/* Excluded from this release type: IChannelFactory */
|
|
81
67
|
|
|
82
|
-
/* Excluded from this release type: IContainer */
|
|
83
|
-
|
|
84
68
|
/* Excluded from this release type: IContainerContext */
|
|
85
69
|
|
|
86
70
|
/* Excluded from this release type: IContainerRuntime */
|
|
@@ -109,10 +93,6 @@ import { TypedEventEmitter } from '@fluid-internal/client-utils';
|
|
|
109
93
|
|
|
110
94
|
/* Excluded from this release type: IFluidLoadable */
|
|
111
95
|
|
|
112
|
-
/* Excluded from this release type: IFluidMountableViewClass */
|
|
113
|
-
|
|
114
|
-
/* Excluded from this release type: IFluidRouter */
|
|
115
|
-
|
|
116
96
|
/* Excluded from this release type: IProvideFluidDataStoreRegistry */
|
|
117
97
|
|
|
118
98
|
/* Excluded from this release type: IProvideFluidHandle */
|
|
@@ -121,12 +101,8 @@ import { TypedEventEmitter } from '@fluid-internal/client-utils';
|
|
|
121
101
|
|
|
122
102
|
/* Excluded from this release type: IResponse */
|
|
123
103
|
|
|
124
|
-
/* Excluded from this release type: IRootDataObjectFactory */
|
|
125
|
-
|
|
126
104
|
/* Excluded from this release type: ISharedDirectory */
|
|
127
105
|
|
|
128
|
-
/* Excluded from this release type: mountableViewRequestHandler */
|
|
129
|
-
|
|
130
106
|
/* Excluded from this release type: NamedFluidDataStoreRegistryEntries */
|
|
131
107
|
|
|
132
108
|
/* Excluded from this release type: NamedFluidDataStoreRegistryEntry */
|
|
@@ -135,8 +111,6 @@ import { TypedEventEmitter } from '@fluid-internal/client-utils';
|
|
|
135
111
|
|
|
136
112
|
/* Excluded from this release type: PureDataObjectFactory */
|
|
137
113
|
|
|
138
|
-
/* Excluded from this release type: RequestParser */
|
|
139
|
-
|
|
140
114
|
/* Excluded from this release type: RuntimeFactoryHelper */
|
|
141
115
|
|
|
142
116
|
/* Excluded from this release type: RuntimeRequestHandler */
|