@fluidframework/fluid-static 2.0.0-dev-rc.2.0.0.246488 → 2.0.0-dev-rc.3.0.0.250606

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/api-report/fluid-static.api.md +4 -12
  2. package/dist/fluid-static-alpha.d.ts +5 -26
  3. package/dist/fluid-static-beta.d.ts +5 -26
  4. package/dist/fluid-static-public.d.ts +5 -26
  5. package/dist/fluid-static-untrimmed.d.ts +5 -26
  6. package/dist/fluidContainer.d.ts +2 -2
  7. package/dist/fluidContainer.d.ts.map +1 -1
  8. package/dist/fluidContainer.js.map +1 -1
  9. package/dist/index.d.ts +1 -1
  10. package/dist/index.d.ts.map +1 -1
  11. package/dist/index.js.map +1 -1
  12. package/dist/rootDataObject.d.ts.map +1 -1
  13. package/dist/rootDataObject.js +3 -1
  14. package/dist/rootDataObject.js.map +1 -1
  15. package/dist/serviceAudience.d.ts +1 -1
  16. package/dist/serviceAudience.d.ts.map +1 -1
  17. package/dist/serviceAudience.js.map +1 -1
  18. package/dist/types.d.ts +5 -24
  19. package/dist/types.d.ts.map +1 -1
  20. package/dist/types.js.map +1 -1
  21. package/dist/utils.d.ts +5 -4
  22. package/dist/utils.d.ts.map +1 -1
  23. package/dist/utils.js +16 -9
  24. package/dist/utils.js.map +1 -1
  25. package/lib/fluid-static-alpha.d.ts +5 -26
  26. package/lib/fluid-static-beta.d.ts +5 -26
  27. package/lib/fluid-static-public.d.ts +5 -26
  28. package/lib/fluid-static-untrimmed.d.ts +5 -26
  29. package/lib/fluidContainer.d.ts +2 -2
  30. package/lib/fluidContainer.d.ts.map +1 -1
  31. package/lib/fluidContainer.js.map +1 -1
  32. package/lib/index.d.ts +1 -1
  33. package/lib/index.d.ts.map +1 -1
  34. package/lib/index.js.map +1 -1
  35. package/lib/rootDataObject.d.ts.map +1 -1
  36. package/lib/rootDataObject.js +4 -2
  37. package/lib/rootDataObject.js.map +1 -1
  38. package/lib/serviceAudience.d.ts +1 -1
  39. package/lib/serviceAudience.d.ts.map +1 -1
  40. package/lib/serviceAudience.js.map +1 -1
  41. package/lib/test/fluidContainer.spec.js.map +1 -1
  42. package/lib/test/types/validateFluidStaticPrevious.generated.js +0 -4
  43. package/lib/test/types/validateFluidStaticPrevious.generated.js.map +1 -1
  44. package/lib/test/utils.spec.js.map +1 -1
  45. package/lib/types.d.ts +5 -24
  46. package/lib/types.d.ts.map +1 -1
  47. package/lib/types.js.map +1 -1
  48. package/lib/utils.d.ts +5 -4
  49. package/lib/utils.d.ts.map +1 -1
  50. package/lib/utils.js +14 -7
  51. package/lib/utils.js.map +1 -1
  52. package/package.json +33 -20
  53. package/src/fluidContainer.ts +7 -7
  54. package/src/index.ts +0 -2
  55. package/src/rootDataObject.ts +11 -9
  56. package/src/serviceAudience.ts +1 -1
  57. package/src/types.ts +6 -27
  58. package/src/utils.ts +30 -18
@@ -1 +1 @@
1
- {"version":3,"file":"fluidContainer.js","sourceRoot":"","sources":["../src/fluidContainer.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAMjE,OAAO,EACN,WAAW,GAIX,MAAM,uCAAuC,CAAC;AAoN/C;;;;GAIG;AACH,MAAM,UAAU,oBAAoB,CAElC,KAGD;IACA,OAAO,IAAI,cAAc,CAAmB,KAAK,CAAC,SAAS,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC;AACpF,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,cACL,SAAQ,iBAAwC;IAUhD,YACkB,SAAqB,EACrB,cAA+B;QAEhD,KAAK,EAAE,CAAC;QAHS,cAAS,GAAT,SAAS,CAAY;QACrB,mBAAc,GAAd,cAAc,CAAiB;QAThC,qBAAgB,GAAG,GAAY,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QACzD,wBAAmB,GAAG,GAAY,EAAE,CAAC,IAAI,CAAC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CAAC;IAED;;;;;;;;;;;OAWG;IACI,KAAK,CAAC,MAAM,CAAC,KAA4B;QAC/C,IAAI,IAAI,CAAC,SAAS,CAAC,WAAW,KAAK,WAAW,CAAC,QAAQ,EAAE;YACxD,MAAM,IAAI,KAAK,CAAC,8DAA8D,CAAC,CAAC;SAChF;QACD,MAAM,IAAI,KAAK,CAAC,sDAAsD,CAAC,CAAC;IACzE,CAAC;IAED;;OAEG;IACI,KAAK,CAAC,OAAO;QACnB,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,EAAE,CAAC;IAC5B,CAAC;IAED;;OAEG;IACI,KAAK,CAAC,UAAU;QACtB,IAAI,CAAC,SAAS,CAAC,UAAU,EAAE,EAAE,CAAC;IAC/B,CAAC;IAED;;OAEG;IACI,KAAK,CAAC,MAAM,CAA2B,WAAmC;QAChF,OAAO,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;IAChD,CAAC;IAED;;OAEG;IACI,OAAO;QACb,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,CAAC;QACvB,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,WAAW,EAAE,IAAI,CAAC,gBAAgB,CAAC,CAAC;QACvD,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,QAAQ,EAAE,IAAI,CAAC,eAAe,CAAC,CAAC;QACnD,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,cAAc,EAAE,IAAI,CAAC,mBAAmB,CAAC,CAAC;QAC7D,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,OAAO,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC;QAC/C,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,OAAO,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC;IAChD,CAAC;CAaD","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 {\n\ttype IEvent,\n\ttype IEventProvider,\n\ttype IFluidLoadable,\n} from \"@fluidframework/core-interfaces\";\nimport {\n\tAttachState,\n\ttype IContainer,\n\ttype ICriticalContainerError,\n\ttype ConnectionState,\n} from \"@fluidframework/container-definitions\";\nimport type {\n\tContainerSchema,\n\tContainerAttachProps,\n\tIRootDataObject,\n\tLoadableObjectClass,\n} from \"./types.js\";\n\n/**\n * Extract the type of 'initialObjects' from the given {@link ContainerSchema} type.\n * @public\n */\nexport type InitialObjects<T extends ContainerSchema> = {\n\t// Construct a LoadableObjectRecord type by enumerating the keys of\n\t// 'ContainerSchema.initialObjects' and inferring the value type of each key.\n\t//\n\t// The '? TChannel : never' is required because infer can only be used in\n\t// a conditional 'extends' expression.\n\t[K in keyof T[\"initialObjects\"]]: T[\"initialObjects\"][K] extends LoadableObjectClass<\n\t\tinfer TChannel\n\t>\n\t\t? TChannel\n\t\t: never;\n};\n\n/**\n * Events emitted from {@link IFluidContainer}.\n *\n * @remarks Note: external implementations of this interface are not supported.\n * @sealed\n * @public\n */\nexport interface IFluidContainerEvents extends IEvent {\n\t/**\n\t * Emitted when the {@link IFluidContainer} completes connecting to the Fluid service.\n\t *\n\t * @remarks Reflects connection state changes against the (delta) service acknowledging ops/edits.\n\t *\n\t * @see\n\t *\n\t * - {@link IFluidContainer.connectionState}\n\t *\n\t * - {@link IFluidContainer.connect}\n\t */\n\t(event: \"connected\", listener: () => void): void;\n\n\t/**\n\t * Emitted when the {@link IFluidContainer} becomes disconnected from the Fluid service.\n\t *\n\t * @remarks Reflects connection state changes against the (delta) service acknowledging ops/edits.\n\t *\n\t * @see\n\t *\n\t * - {@link IFluidContainer.connectionState}\n\t *\n\t * - {@link IFluidContainer.disconnect}\n\t */\n\t(event: \"disconnected\", listener: () => void): void;\n\n\t/**\n\t * Emitted when all local changes/edits have been acknowledged by the service.\n\t *\n\t * @remarks \"dirty\" event will be emitted when the next local change has been made.\n\t *\n\t * @see {@link IFluidContainer.isDirty}\n\t */\n\t(event: \"saved\", listener: () => void): void;\n\n\t/**\n\t * Emitted when the first local change has been made, following a \"saved\" event.\n\t *\n\t * @remarks \"saved\" event will be emitted once all local changes have been acknowledged by the service.\n\t *\n\t * @see {@link IFluidContainer.isDirty}\n\t */\n\t(event: \"dirty\", listener: () => void): void;\n\n\t/**\n\t * Emitted when the {@link IFluidContainer} is closed, which permanently disables it.\n\t *\n\t * @remarks Listener parameters:\n\t *\n\t * - `error`: If the container was closed due to error (as opposed to an explicit call to\n\t * {@link IFluidContainer.dispose}), this will contain details about the error that caused it.\n\t */\n\t(event: \"disposed\", listener: (error?: ICriticalContainerError) => void);\n}\n\n/**\n * Provides an entrypoint into the client side of collaborative Fluid data.\n * Provides access to the data as well as status on the collaboration session.\n *\n * @typeparam TContainerSchema - Used to determine the type of 'initialObjects'.\n *\n * @remarks Note: external implementations of this interface are not supported.\n *\n * @sealed\n * @public\n */\nexport interface IFluidContainer<TContainerSchema extends ContainerSchema = ContainerSchema>\n\textends IEventProvider<IFluidContainerEvents> {\n\t/**\n\t * Provides the current connected state of the container\n\t */\n\treadonly connectionState: ConnectionState;\n\n\t/**\n\t * A container is considered **dirty** if it has local changes that have not yet been acknowledged by the service.\n\t *\n\t * @remarks\n\t *\n\t * You should always check the `isDirty` flag before closing the container or navigating away from the page.\n\t * Closing the container while `isDirty === true` may result in the loss of operations that have not yet been\n\t * acknowledged by the service.\n\t *\n\t * A container is considered dirty in the following cases:\n\t *\n\t * 1. The container has been created in the detached state, and either it has not been attached yet or it is\n\t * in the process of being attached (container is in `attaching` state). If container is closed prior to being\n\t * attached, host may never know if the file was created or not.\n\t *\n\t * 2. The container was attached, but it has local changes that have not yet been saved to service endpoint.\n\t * This occurs as part of normal op flow where pending operation (changes) are awaiting acknowledgement from the\n\t * service. In some cases this can be due to lack of network connection. If the network connection is down,\n\t * it needs to be restored for the pending changes to be acknowledged.\n\t */\n\treadonly isDirty: boolean;\n\n\t/**\n\t * Whether or not the container is disposed, which permanently disables it.\n\t */\n\treadonly disposed: boolean;\n\n\t/**\n\t * The collection of data objects and Distributed Data Stores (DDSes) that were specified by the schema.\n\t *\n\t * @remarks These data objects and DDSes exist for the lifetime of the container.\n\t */\n\treadonly initialObjects: InitialObjects<TContainerSchema>;\n\n\t/**\n\t * The current attachment state of the container.\n\t *\n\t * @remarks\n\t *\n\t * Once a container has been attached, it remains attached.\n\t * When loading an existing container, it will already be attached.\n\t */\n\treadonly attachState: AttachState;\n\n\t/**\n\t * A newly created container starts detached from the collaborative service.\n\t * Calling `attach()` uploads the new container to the service and connects to the collaborative service.\n\t *\n\t * @remarks\n\t *\n\t * This should only be called when the container is in the\n\t * {@link @fluidframework/container-definitions#AttachState.Detatched} state.\n\t *\n\t * This can be determined by observing {@link IFluidContainer.attachState}.\n\t *\n\t * @returns A promise which resolves when the attach is complete, with the string identifier of the container.\n\t */\n\tattach(props?: ContainerAttachProps): Promise<string>;\n\n\t/**\n\t * Attempts to connect the container to the delta stream and process operations.\n\t *\n\t * @throws Will throw an error if connection is unsuccessful.\n\t *\n\t * @remarks\n\t *\n\t * This should only be called when the container is in the\n\t * {@link @fluidframework/container-definitions#(ConnectionState:namespace).Disconnected} state.\n\t *\n\t * This can be determined by observing {@link IFluidContainer.connectionState}.\n\t */\n\tconnect(): void;\n\n\t/**\n\t * Disconnects the container from the delta stream and stops processing operations.\n\t *\n\t * @remarks\n\t *\n\t * This should only be called when the container is in the\n\t * {@link @fluidframework/container-definitions#(ConnectionState:namespace).Connected} state.\n\t *\n\t * This can be determined by observing {@link IFluidContainer.connectionState}.\n\t */\n\tdisconnect(): void;\n\n\t/**\n\t * Create a new data object or Distributed Data Store (DDS) of the specified type.\n\t *\n\t * @remarks\n\t *\n\t * In order to share the data object or DDS with other\n\t * collaborators and retrieve it later, store its handle in a collection like a SharedDirectory from your\n\t * initialObjects.\n\t *\n\t * @param objectClass - The class of the `DataObject` or `SharedObject` to create.\n\t *\n\t * @typeParam T - The class of the `DataObject` or `SharedObject`.\n\t */\n\tcreate<T extends IFluidLoadable>(objectClass: LoadableObjectClass<T>): Promise<T>;\n\n\t/**\n\t * Dispose of the container instance, permanently disabling it.\n\t */\n\tdispose(): void;\n}\n\n/**\n * Creates an {@link IFluidContainer} from the provided `container` and `rootDataObject`.\n *\n * @internal\n */\nexport function createFluidContainer<\n\tTContainerSchema extends ContainerSchema = ContainerSchema,\n>(props: {\n\tcontainer: IContainer;\n\trootDataObject: IRootDataObject;\n}): IFluidContainer<TContainerSchema> {\n\treturn new FluidContainer<TContainerSchema>(props.container, props.rootDataObject);\n}\n\n/**\n * Base {@link IFluidContainer} implementation.\n *\n * @typeparam TContainerSchema - Used to determine the type of 'initialObjects'.\n * @remarks\n *\n * Note: this implementation is not complete. Consumers who rely on {@link IFluidContainer.attach}\n * will need to utilize or provide a service-specific implementation of this type that implements that method.\n * @deprecated use {@link createFluidContainer} and {@link IFluidContainer} instead\n * @internal\n */\nclass FluidContainer<TContainerSchema extends ContainerSchema = ContainerSchema>\n\textends TypedEventEmitter<IFluidContainerEvents>\n\timplements IFluidContainer<TContainerSchema>\n{\n\tprivate readonly connectedHandler = (): boolean => this.emit(\"connected\");\n\tprivate readonly disconnectedHandler = (): boolean => this.emit(\"disconnected\");\n\tprivate readonly disposedHandler = (error?: ICriticalContainerError): boolean =>\n\t\tthis.emit(\"disposed\", error);\n\tprivate readonly savedHandler = (): boolean => this.emit(\"saved\");\n\tprivate readonly dirtyHandler = (): boolean => this.emit(\"dirty\");\n\n\tpublic constructor(\n\t\tprivate readonly container: IContainer,\n\t\tprivate readonly rootDataObject: IRootDataObject,\n\t) {\n\t\tsuper();\n\t\tcontainer.on(\"connected\", this.connectedHandler);\n\t\tcontainer.on(\"closed\", this.disposedHandler);\n\t\tcontainer.on(\"disconnected\", this.disconnectedHandler);\n\t\tcontainer.on(\"saved\", this.savedHandler);\n\t\tcontainer.on(\"dirty\", this.dirtyHandler);\n\t}\n\n\t/**\n\t * {@inheritDoc IFluidContainer.isDirty}\n\t */\n\tpublic get isDirty(): boolean {\n\t\treturn this.container.isDirty;\n\t}\n\n\t/**\n\t * {@inheritDoc IFluidContainer.attachState}\n\t */\n\tpublic get attachState(): AttachState {\n\t\treturn this.container.attachState;\n\t}\n\n\t/**\n\t * {@inheritDoc IFluidContainer.disposed}\n\t */\n\tpublic get disposed(): boolean {\n\t\treturn this.container.closed;\n\t}\n\n\t/**\n\t * {@inheritDoc IFluidContainer.connectionState}\n\t */\n\tpublic get connectionState(): ConnectionState {\n\t\treturn this.container.connectionState;\n\t}\n\n\t/**\n\t * {@inheritDoc IFluidContainer.initialObjects}\n\t */\n\tpublic get initialObjects(): InitialObjects<TContainerSchema> {\n\t\treturn this.rootDataObject.initialObjects as InitialObjects<TContainerSchema>;\n\t}\n\n\t/**\n\t * Incomplete base implementation of {@link IFluidContainer.attach}.\n\t *\n\t * @remarks\n\t *\n\t * Note: this implementation will unconditionally throw.\n\t * Consumers who rely on this will need to utilize or provide a service specific implementation of this base type\n\t * that provides an implementation of this method.\n\t *\n\t * The reason is because externally we are presenting a separation between the service and the `FluidContainer`,\n\t * but internally this separation is not there.\n\t */\n\tpublic async attach(props?: ContainerAttachProps): Promise<string> {\n\t\tif (this.container.attachState !== AttachState.Detached) {\n\t\t\tthrow new Error(\"Cannot attach container. Container is not in detached state.\");\n\t\t}\n\t\tthrow new Error(\"Cannot attach container. Attach method not provided.\");\n\t}\n\n\t/**\n\t * {@inheritDoc IFluidContainer.connect}\n\t */\n\tpublic async connect(): Promise<void> {\n\t\tthis.container.connect?.();\n\t}\n\n\t/**\n\t * {@inheritDoc IFluidContainer.connect}\n\t */\n\tpublic async disconnect(): Promise<void> {\n\t\tthis.container.disconnect?.();\n\t}\n\n\t/**\n\t * {@inheritDoc IFluidContainer.create}\n\t */\n\tpublic async create<T extends IFluidLoadable>(objectClass: LoadableObjectClass<T>): Promise<T> {\n\t\treturn this.rootDataObject.create(objectClass);\n\t}\n\n\t/**\n\t * {@inheritDoc IFluidContainer.dispose}\n\t */\n\tpublic dispose(): void {\n\t\tthis.container.close();\n\t\tthis.container.off(\"connected\", this.connectedHandler);\n\t\tthis.container.off(\"closed\", this.disposedHandler);\n\t\tthis.container.off(\"disconnected\", this.disconnectedHandler);\n\t\tthis.container.off(\"saved\", this.savedHandler);\n\t\tthis.container.off(\"dirty\", this.dirtyHandler);\n\t}\n\n\t/**\n\t * FOR INTERNAL USE ONLY. NOT FOR EXTERNAL USE.\n\t * We make no stability guarantees here whatsoever.\n\t *\n\t * Gets the underlying {@link @fluidframework/container-definitions#IContainer}.\n\t *\n\t * @remarks Used to power debug tooling.\n\t */\n\tpublic readonly INTERNAL_CONTAINER_DO_NOT_USE?: () => IContainer = () => {\n\t\treturn this.container;\n\t};\n}\n"]}
1
+ {"version":3,"file":"fluidContainer.js","sourceRoot":"","sources":["../src/fluidContainer.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EACN,WAAW,GAIX,MAAM,uCAAuC,CAAC;AAyN/C;;;;GAIG;AACH,MAAM,UAAU,oBAAoB,CAElC,KAGD;IACA,OAAO,IAAI,cAAc,CAAmB,KAAK,CAAC,SAAS,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC;AACpF,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,cACL,SAAQ,iBAAwC;IAUhD,YACkB,SAAqB,EACrB,cAA+B;QAEhD,KAAK,EAAE,CAAC;QAHS,cAAS,GAAT,SAAS,CAAY;QACrB,mBAAc,GAAd,cAAc,CAAiB;QAThC,qBAAgB,GAAG,GAAY,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QACzD,wBAAmB,GAAG,GAAY,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;QAC/D,oBAAe,GAAG,CAAC,KAA+B,EAAW,EAAE,CAC/E,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC;QACb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xD,MAAM,IAAI,KAAK,CAAC,8DAA8D,CAAC,CAAC;SAChF;QACD,MAAM,IAAI,KAAK,CAAC,sDAAsD,CAAC,CAAC;IACzE,CAAC;IAED;;OAEG;IACI,KAAK,CAAC,OAAO;QACnB,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,EAAE,CAAC;IAC5B,CAAC;IAED;;OAEG;IACI,KAAK,CAAC,UAAU;QACtB,IAAI,CAAC,SAAS,CAAC,UAAU,EAAE,EAAE,CAAC;IAC/B,CAAC;IAED;;OAEG;IACI,KAAK,CAAC,MAAM,CAA2B,WAAmC;QAChF,OAAO,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;IAChD,CAAC;IAED;;OAEG;IACI,OAAO;QACb,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,CAAC;QACvB,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,WAAW,EAAE,IAAI,CAAC,gBAAgB,CAAC,CAAC;QACvD,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,QAAQ,EAAE,IAAI,CAAC,eAAe,CAAC,CAAC;QACnD,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,cAAc,EAAE,IAAI,CAAC,mBAAmB,CAAC,CAAC;QAC7D,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,OAAO,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC;QAC/C,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,OAAO,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC;IAChD,CAAC;CAaD","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 {\n\tAttachState,\n\ttype ConnectionState,\n\ttype IContainer,\n\ttype ICriticalContainerError,\n} from \"@fluidframework/container-definitions\";\nimport {\n\ttype IEvent,\n\ttype IEventProvider,\n\ttype IFluidLoadable,\n} from \"@fluidframework/core-interfaces\";\nimport type {\n\tContainerAttachProps,\n\tContainerSchema,\n\tIRootDataObject,\n\tLoadableObjectClass,\n} from \"./types.js\";\n\n/**\n * Extract the type of 'initialObjects' from the given {@link ContainerSchema} type.\n * @public\n */\nexport type InitialObjects<T extends ContainerSchema> = {\n\t// Construct a LoadableObjectRecord type by enumerating the keys of\n\t// 'ContainerSchema.initialObjects' and inferring the value type of each key.\n\t//\n\t// The '? TChannel : never' is required because infer can only be used in\n\t// a conditional 'extends' expression.\n\t[K in keyof T[\"initialObjects\"]]: T[\"initialObjects\"][K] extends LoadableObjectClass<\n\t\tinfer TChannel\n\t>\n\t\t? TChannel\n\t\t: never;\n};\n\n/**\n * Events emitted from {@link IFluidContainer}.\n *\n * @remarks Note: external implementations of this interface are not supported.\n * @sealed\n * @public\n */\nexport interface IFluidContainerEvents extends IEvent {\n\t/**\n\t * Emitted when the {@link IFluidContainer} completes connecting to the Fluid service.\n\t *\n\t * @remarks Reflects connection state changes against the (delta) service acknowledging ops/edits.\n\t *\n\t * @see\n\t *\n\t * - {@link IFluidContainer.connectionState}\n\t *\n\t * - {@link IFluidContainer.connect}\n\t */\n\t(event: \"connected\", listener: () => void): void;\n\n\t/**\n\t * Emitted when the {@link IFluidContainer} becomes disconnected from the Fluid service.\n\t *\n\t * @remarks Reflects connection state changes against the (delta) service acknowledging ops/edits.\n\t *\n\t * @see\n\t *\n\t * - {@link IFluidContainer.connectionState}\n\t *\n\t * - {@link IFluidContainer.disconnect}\n\t */\n\t(event: \"disconnected\", listener: () => void): void;\n\n\t/**\n\t * Emitted when all local changes/edits have been acknowledged by the service.\n\t *\n\t * @remarks \"dirty\" event will be emitted when the next local change has been made.\n\t *\n\t * @see {@link IFluidContainer.isDirty}\n\t */\n\t(event: \"saved\", listener: () => void): void;\n\n\t/**\n\t * Emitted when the first local change has been made, following a \"saved\" event.\n\t *\n\t * @remarks \"saved\" event will be emitted once all local changes have been acknowledged by the service.\n\t *\n\t * @see {@link IFluidContainer.isDirty}\n\t */\n\t(event: \"dirty\", listener: () => void): void;\n\n\t/**\n\t * Emitted when the {@link IFluidContainer} is closed, which permanently disables it.\n\t *\n\t * @remarks Listener parameters:\n\t *\n\t * - `error`: If the container was closed due to error (as opposed to an explicit call to\n\t * {@link IFluidContainer.dispose}), this will contain details about the error that caused it.\n\t */\n\t(event: \"disposed\", listener: (error?: ICriticalContainerError) => void);\n}\n\n/**\n * Provides an entrypoint into the client side of collaborative Fluid data.\n * Provides access to the data as well as status on the collaboration session.\n *\n * @typeparam TContainerSchema - Used to determine the type of 'initialObjects'.\n *\n * @remarks Note: external implementations of this interface are not supported.\n *\n * @sealed\n * @public\n */\nexport interface IFluidContainer<TContainerSchema extends ContainerSchema = ContainerSchema>\n\textends IEventProvider<IFluidContainerEvents> {\n\t/**\n\t * Provides the current connected state of the container\n\t */\n\treadonly connectionState: ConnectionState;\n\n\t/**\n\t * A container is considered **dirty** if it has local changes that have not yet been acknowledged by the service.\n\t *\n\t * @remarks\n\t *\n\t * You should always check the `isDirty` flag before closing the container or navigating away from the page.\n\t * Closing the container while `isDirty === true` may result in the loss of operations that have not yet been\n\t * acknowledged by the service.\n\t *\n\t * A container is considered dirty in the following cases:\n\t *\n\t * 1. The container has been created in the detached state, and either it has not been attached yet or it is\n\t * in the process of being attached (container is in `attaching` state). If container is closed prior to being\n\t * attached, host may never know if the file was created or not.\n\t *\n\t * 2. The container was attached, but it has local changes that have not yet been saved to service endpoint.\n\t * This occurs as part of normal op flow where pending operation (changes) are awaiting acknowledgement from the\n\t * service. In some cases this can be due to lack of network connection. If the network connection is down,\n\t * it needs to be restored for the pending changes to be acknowledged.\n\t */\n\treadonly isDirty: boolean;\n\n\t/**\n\t * Whether or not the container is disposed, which permanently disables it.\n\t */\n\treadonly disposed: boolean;\n\n\t/**\n\t * The collection of data objects and Distributed Data Stores (DDSes) that were specified by the schema.\n\t *\n\t * @remarks These data objects and DDSes exist for the lifetime of the container.\n\t */\n\treadonly initialObjects: InitialObjects<TContainerSchema>;\n\n\t/**\n\t * The current attachment state of the container.\n\t *\n\t * @remarks\n\t *\n\t * Once a container has been attached, it remains attached.\n\t * When loading an existing container, it will already be attached.\n\t */\n\treadonly attachState: AttachState;\n\n\t/**\n\t * A newly created container starts detached from the collaborative service.\n\t * Calling `attach()` uploads the new container to the service and connects to the collaborative service.\n\t *\n\t * @remarks\n\t *\n\t * This should only be called when the container is in the\n\t * {@link @fluidframework/container-definitions#AttachState.Detatched} state.\n\t *\n\t * This can be determined by observing {@link IFluidContainer.attachState}.\n\t *\n\t * @returns A promise which resolves when the attach is complete, with the string identifier of the container.\n\t */\n\tattach(props?: ContainerAttachProps): Promise<string>;\n\n\t/**\n\t * Attempts to connect the container to the delta stream and process operations.\n\t *\n\t * @throws Will throw an error if connection is unsuccessful.\n\t *\n\t * @remarks\n\t *\n\t * This should only be called when the container is in the\n\t * {@link @fluidframework/container-definitions#(ConnectionState:namespace).Disconnected} state.\n\t *\n\t * This can be determined by observing {@link IFluidContainer.connectionState}.\n\t */\n\tconnect(): void;\n\n\t/**\n\t * Disconnects the container from the delta stream and stops processing operations.\n\t *\n\t * @remarks\n\t *\n\t * This should only be called when the container is in the\n\t * {@link @fluidframework/container-definitions#(ConnectionState:namespace).Connected} state.\n\t *\n\t * This can be determined by observing {@link IFluidContainer.connectionState}.\n\t */\n\tdisconnect(): void;\n\n\t/**\n\t * Create a new data object or Distributed Data Store (DDS) of the specified type.\n\t *\n\t * @remarks\n\t *\n\t * In order to share the data object or DDS with other\n\t * collaborators and retrieve it later, store its handle in a collection like a SharedDirectory from your\n\t * initialObjects.\n\t *\n\t * @param objectClass - The class of the `DataObject` or `SharedObject` to create.\n\t *\n\t * @typeParam T - The class of the `DataObject` or `SharedObject`.\n\t */\n\tcreate<T extends IFluidLoadable>(objectClass: LoadableObjectClass<T>): Promise<T>;\n\n\t/**\n\t * Dispose of the container instance, permanently disabling it.\n\t */\n\tdispose(): void;\n}\n\n/**\n * Creates an {@link IFluidContainer} from the provided `container` and `rootDataObject`.\n *\n * @internal\n */\nexport function createFluidContainer<\n\tTContainerSchema extends ContainerSchema = ContainerSchema,\n>(props: {\n\tcontainer: IContainer;\n\trootDataObject: IRootDataObject;\n}): IFluidContainer<TContainerSchema> {\n\treturn new FluidContainer<TContainerSchema>(props.container, props.rootDataObject);\n}\n\n/**\n * Base {@link IFluidContainer} implementation.\n *\n * @typeparam TContainerSchema - Used to determine the type of 'initialObjects'.\n * @remarks\n *\n * Note: this implementation is not complete. Consumers who rely on {@link IFluidContainer.attach}\n * will need to utilize or provide a service-specific implementation of this type that implements that method.\n * @deprecated use {@link createFluidContainer} and {@link IFluidContainer} instead\n * @internal\n */\nclass FluidContainer<TContainerSchema extends ContainerSchema = ContainerSchema>\n\textends TypedEventEmitter<IFluidContainerEvents>\n\timplements IFluidContainer<TContainerSchema>\n{\n\tprivate readonly connectedHandler = (): boolean => this.emit(\"connected\");\n\tprivate readonly disconnectedHandler = (): boolean => this.emit(\"disconnected\");\n\tprivate readonly disposedHandler = (error?: ICriticalContainerError): boolean =>\n\t\tthis.emit(\"disposed\", error);\n\tprivate readonly savedHandler = (): boolean => this.emit(\"saved\");\n\tprivate readonly dirtyHandler = (): boolean => this.emit(\"dirty\");\n\n\tpublic constructor(\n\t\tprivate readonly container: IContainer,\n\t\tprivate readonly rootDataObject: IRootDataObject,\n\t) {\n\t\tsuper();\n\t\tcontainer.on(\"connected\", this.connectedHandler);\n\t\tcontainer.on(\"closed\", this.disposedHandler);\n\t\tcontainer.on(\"disconnected\", this.disconnectedHandler);\n\t\tcontainer.on(\"saved\", this.savedHandler);\n\t\tcontainer.on(\"dirty\", this.dirtyHandler);\n\t}\n\n\t/**\n\t * {@inheritDoc IFluidContainer.isDirty}\n\t */\n\tpublic get isDirty(): boolean {\n\t\treturn this.container.isDirty;\n\t}\n\n\t/**\n\t * {@inheritDoc IFluidContainer.attachState}\n\t */\n\tpublic get attachState(): AttachState {\n\t\treturn this.container.attachState;\n\t}\n\n\t/**\n\t * {@inheritDoc IFluidContainer.disposed}\n\t */\n\tpublic get disposed(): boolean {\n\t\treturn this.container.closed;\n\t}\n\n\t/**\n\t * {@inheritDoc IFluidContainer.connectionState}\n\t */\n\tpublic get connectionState(): ConnectionState {\n\t\treturn this.container.connectionState;\n\t}\n\n\t/**\n\t * {@inheritDoc IFluidContainer.initialObjects}\n\t */\n\tpublic get initialObjects(): InitialObjects<TContainerSchema> {\n\t\treturn this.rootDataObject.initialObjects as InitialObjects<TContainerSchema>;\n\t}\n\n\t/**\n\t * Incomplete base implementation of {@link IFluidContainer.attach}.\n\t *\n\t * @remarks\n\t *\n\t * Note: this implementation will unconditionally throw.\n\t * Consumers who rely on this will need to utilize or provide a service specific implementation of this base type\n\t * that provides an implementation of this method.\n\t *\n\t * The reason is because externally we are presenting a separation between the service and the `FluidContainer`,\n\t * but internally this separation is not there.\n\t */\n\tpublic async attach(props?: ContainerAttachProps): Promise<string> {\n\t\tif (this.container.attachState !== AttachState.Detached) {\n\t\t\tthrow new Error(\"Cannot attach container. Container is not in detached state.\");\n\t\t}\n\t\tthrow new Error(\"Cannot attach container. Attach method not provided.\");\n\t}\n\n\t/**\n\t * {@inheritDoc IFluidContainer.connect}\n\t */\n\tpublic async connect(): Promise<void> {\n\t\tthis.container.connect?.();\n\t}\n\n\t/**\n\t * {@inheritDoc IFluidContainer.connect}\n\t */\n\tpublic async disconnect(): Promise<void> {\n\t\tthis.container.disconnect?.();\n\t}\n\n\t/**\n\t * {@inheritDoc IFluidContainer.create}\n\t */\n\tpublic async create<T extends IFluidLoadable>(objectClass: LoadableObjectClass<T>): Promise<T> {\n\t\treturn this.rootDataObject.create(objectClass);\n\t}\n\n\t/**\n\t * {@inheritDoc IFluidContainer.dispose}\n\t */\n\tpublic dispose(): void {\n\t\tthis.container.close();\n\t\tthis.container.off(\"connected\", this.connectedHandler);\n\t\tthis.container.off(\"closed\", this.disposedHandler);\n\t\tthis.container.off(\"disconnected\", this.disconnectedHandler);\n\t\tthis.container.off(\"saved\", this.savedHandler);\n\t\tthis.container.off(\"dirty\", this.dirtyHandler);\n\t}\n\n\t/**\n\t * FOR INTERNAL USE ONLY. NOT FOR EXTERNAL USE.\n\t * We make no stability guarantees here whatsoever.\n\t *\n\t * Gets the underlying {@link @fluidframework/container-definitions#IContainer}.\n\t *\n\t * @remarks Used to power debug tooling.\n\t */\n\tpublic readonly INTERNAL_CONTAINER_DO_NOT_USE?: () => IContainer = () => {\n\t\treturn this.container;\n\t};\n}\n"]}
package/lib/index.d.ts CHANGED
@@ -10,5 +10,5 @@
10
10
  export { createFluidContainer, type IFluidContainer, type IFluidContainerEvents, type InitialObjects, } from "./fluidContainer.js";
11
11
  export { createDOProviderContainerRuntimeFactory } from "./rootDataObject.js";
12
12
  export { createServiceAudience } from "./serviceAudience.js";
13
- export { type ContainerSchema, type ContainerAttachProps, type DataObjectClass, type IConnection, type IMember, type IRootDataObject, type IServiceAudience, type IServiceAudienceEvents, type LoadableObjectClass, type LoadableObjectClassRecord, type LoadableObjectCtor, type LoadableObjectRecord, type MemberChangedListener, type Myself, type SharedObjectClass, type IProvideRootDataObject, } from "./types.js";
13
+ export { type ContainerSchema, type ContainerAttachProps, type DataObjectClass, type IConnection, type IMember, type IRootDataObject, type IServiceAudience, type IServiceAudienceEvents, type LoadableObjectClass, type LoadableObjectClassRecord, type LoadableObjectRecord, type MemberChangedListener, type Myself, type IProvideRootDataObject, } from "./types.js";
14
14
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;GAIG;AAEH,OAAO,EACN,oBAAoB,EACpB,KAAK,eAAe,EACpB,KAAK,qBAAqB,EAC1B,KAAK,cAAc,GACnB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,uCAAuC,EAAE,MAAM,qBAAqB,CAAC;AAC9E,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EACN,KAAK,eAAe,EACpB,KAAK,oBAAoB,EACzB,KAAK,eAAe,EACpB,KAAK,WAAW,EAChB,KAAK,OAAO,EACZ,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,KAAK,sBAAsB,EAC3B,KAAK,mBAAmB,EACxB,KAAK,yBAAyB,EAC9B,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EACzB,KAAK,qBAAqB,EAC1B,KAAK,MAAM,EACX,KAAK,iBAAiB,EACtB,KAAK,sBAAsB,GAC3B,MAAM,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;GAIG;AAEH,OAAO,EACN,oBAAoB,EACpB,KAAK,eAAe,EACpB,KAAK,qBAAqB,EAC1B,KAAK,cAAc,GACnB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,uCAAuC,EAAE,MAAM,qBAAqB,CAAC;AAC9E,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EACN,KAAK,eAAe,EACpB,KAAK,oBAAoB,EACzB,KAAK,eAAe,EACpB,KAAK,WAAW,EAChB,KAAK,OAAO,EACZ,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,KAAK,sBAAsB,EAC3B,KAAK,mBAAmB,EACxB,KAAK,yBAAyB,EAC9B,KAAK,oBAAoB,EACzB,KAAK,qBAAqB,EAC1B,KAAK,MAAM,EACX,KAAK,sBAAsB,GAC3B,MAAM,YAAY,CAAC"}
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;GAIG;AAEH,OAAO,EACN,oBAAoB,GAIpB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,uCAAuC,EAAE,MAAM,qBAAqB,CAAC;AAC9E,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * Provides a simple and powerful way to consume collaborative Fluid data.\n *\n * @packageDocumentation\n */\n\nexport {\n\tcreateFluidContainer,\n\ttype IFluidContainer,\n\ttype IFluidContainerEvents,\n\ttype InitialObjects,\n} from \"./fluidContainer.js\";\nexport { createDOProviderContainerRuntimeFactory } from \"./rootDataObject.js\";\nexport { createServiceAudience } from \"./serviceAudience.js\";\nexport {\n\ttype ContainerSchema,\n\ttype ContainerAttachProps,\n\ttype DataObjectClass,\n\ttype IConnection,\n\ttype IMember,\n\ttype IRootDataObject,\n\ttype IServiceAudience,\n\ttype IServiceAudienceEvents,\n\ttype LoadableObjectClass,\n\ttype LoadableObjectClassRecord,\n\ttype LoadableObjectCtor,\n\ttype LoadableObjectRecord,\n\ttype MemberChangedListener,\n\ttype Myself,\n\ttype SharedObjectClass,\n\ttype IProvideRootDataObject,\n} from \"./types.js\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;GAIG;AAEH,OAAO,EACN,oBAAoB,GAIpB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,uCAAuC,EAAE,MAAM,qBAAqB,CAAC;AAC9E,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * Provides a simple and powerful way to consume collaborative Fluid data.\n *\n * @packageDocumentation\n */\n\nexport {\n\tcreateFluidContainer,\n\ttype IFluidContainer,\n\ttype IFluidContainerEvents,\n\ttype InitialObjects,\n} from \"./fluidContainer.js\";\nexport { createDOProviderContainerRuntimeFactory } from \"./rootDataObject.js\";\nexport { createServiceAudience } from \"./serviceAudience.js\";\nexport {\n\ttype ContainerSchema,\n\ttype ContainerAttachProps,\n\ttype DataObjectClass,\n\ttype IConnection,\n\ttype IMember,\n\ttype IRootDataObject,\n\ttype IServiceAudience,\n\ttype IServiceAudienceEvents,\n\ttype LoadableObjectClass,\n\ttype LoadableObjectClassRecord,\n\ttype LoadableObjectRecord,\n\ttype MemberChangedListener,\n\ttype Myself,\n\ttype IProvideRootDataObject,\n} from \"./types.js\";\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"rootDataObject.d.ts","sourceRoot":"","sources":["../src/rootDataObject.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAeH,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,uCAAuC,CAAC;AAK7E,OAAO,EACN,KAAK,eAAe,EAGpB,KAAK,yBAAyB,EAG9B,MAAM,YAAY,CAAC;AAQpB;;GAEG;AACH,MAAM,WAAW,mBAAmB;IACnC;;;;OAIG;IACH,cAAc,EAAE,yBAAyB,CAAC;CAC1C;AA+GD;;;;;GAKG;AACH,wBAAgB,uCAAuC,CAAC,KAAK,EAAE;IAC9D,MAAM,EAAE,eAAe,CAAC;CACxB,GAAG,eAAe,CAElB"}
1
+ {"version":3,"file":"rootDataObject.d.ts","sourceRoot":"","sources":["../src/rootDataObject.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAOH,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,uCAAuC,CAAC;AAc7E,OAAO,EACN,KAAK,eAAe,EAGpB,KAAK,yBAAyB,EAE9B,MAAM,YAAY,CAAC;AAQpB;;GAEG;AACH,MAAM,WAAW,mBAAmB;IACnC;;;;OAIG;IACH,cAAc,EAAE,yBAAyB,CAAC;CAC1C;AA+GD;;;;;GAKG;AACH,wBAAgB,uCAAuC,CAAC,KAAK,EAAE;IAC9D,MAAM,EAAE,eAAe,CAAC;CACxB,GAAG,eAAe,CAElB"}
@@ -5,7 +5,7 @@
5
5
  import { BaseContainerRuntimeFactory, DataObject, DataObjectFactory, } from "@fluidframework/aqueduct";
6
6
  import { FlushMode } from "@fluidframework/runtime-definitions";
7
7
  import { RequestParser } from "@fluidframework/runtime-utils";
8
- import { isDataObjectClass, isSharedObjectClass, parseDataObjectsFromSharedObjects, } from "./utils.js";
8
+ import { isDataObjectClass, isSharedObjectKind, parseDataObjectsFromSharedObjects, } from "./utils.js";
9
9
  /**
10
10
  * The entry-point/root collaborative object of the {@link IFluidContainer | Fluid Container}.
11
11
  * Abstracts the dynamic code required to build a Fluid Container into a static representation for end customers.
@@ -80,7 +80,7 @@ class RootDataObject extends DataObject {
80
80
  if (isDataObjectClass(objectClass)) {
81
81
  return this.createDataObject(objectClass);
82
82
  }
83
- else if (isSharedObjectClass(objectClass)) {
83
+ else if (isSharedObjectKind(objectClass)) {
84
84
  return this.createSharedObject(objectClass);
85
85
  }
86
86
  throw new Error("Could not create new Fluid object because an unknown object was passed");
@@ -143,12 +143,14 @@ class DOProviderContainerRuntimeFactory extends BaseContainerRuntimeFactory {
143
143
  super({
144
144
  registryEntries: [rootDataObjectFactory.registryEntry],
145
145
  requestHandlers: [getDefaultObject],
146
+ // WARNING: These settigs are not compatible with FF 1.3 clients!
146
147
  runtimeOptions: {
147
148
  // temporary workaround to disable message batching until the message batch size issue is resolved
148
149
  // resolution progress is tracked by the Feature 465 work item in AzDO
149
150
  flushMode: FlushMode.Immediate,
150
151
  // The runtime compressor is required to be on to use @fluidframework/tree.
151
152
  enableRuntimeIdCompressor: "on",
153
+ explicitSchemaControl: true,
152
154
  },
153
155
  provideEntryPoint,
154
156
  });
@@ -1 +1 @@
1
- {"version":3,"file":"rootDataObject.js","sourceRoot":"","sources":["../src/rootDataObject.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,2BAA2B,EAC3B,UAAU,EACV,iBAAiB,GACjB,MAAM,0BAA0B,CAAC;AAQlC,OAAO,EAAE,SAAS,EAAE,MAAM,qCAAqC,CAAC;AAEhE,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAY9D,OAAO,EAEN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EAAE;YACnC,MAAM,MAAM,GAAG,aAAa,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;YAC7C,IAAI,MAAM,CAAC,SAAS,CAAC,MAAM,KAAK,CAAC,EAAE;gBAClC,gFAAgF;gBAChF,OAAQ,OAA4B,CAAC,aAAa,CAAC;oBAClD,GAAG,EAAE,IAAI,eAAe,GAAG,MAAM,CAAC,KAAK,EAAE;oBACzC,OAAO,EAAE,OAAO,CAAC,OAAO;iBACxB,CAAC,CAAC;aACH;YACD,OAAO,SAAS,CAAC,CAAC,kBAAkB;QACrC,CAAC,CAAC;QACF,KAAK,CAAC;YACL,eAAe,EAAE,CAAC,qBAAqB,CAAC,aAAa,CAAC;YACtD,eAAe,EAAE,CAAC,gBAAgB,CAAC;YACnC,cAAc,EAAE;gBACf,kGAAkG;gBAClG,sEAAsE;gBACtE,SAAS,EAAE,SAAS,CAAC,SAAS;gBAC9B,2EAA2E;gBAC3E,yBAAyB,EAAE,IAAI;aAC/B;YACD,iBAAiB;SACjB,CAAC,CAAC;QACH,IAAI,CAAC,qBAAqB,GAAG,qBAAqB,CAAC;QACnD,IAAI,CAAC,cAAc,GAAG,MAAM,CAAC,cAAc,CAAC;IAC7C,CAAC;IAED;;OAEG;IACO,KAAK,CAAC,8BAA8B,CAAC,OAA0B;QACxE,sEAAsE;QACtE,MAAM,IAAI,CAAC,qBAAqB,CAAC,kBAAkB,CAAC,eAAe,EAAE,OAAO,EAAE;YAC7E,cAAc,EAAE,IAAI,CAAC,cAAc;SACnC,CAAC,CAAC;IACJ,CAAC;CACD","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport {\n\tBaseContainerRuntimeFactory,\n\tDataObject,\n\tDataObjectFactory,\n} from \"@fluidframework/aqueduct\";\nimport { type IContainerRuntime } from \"@fluidframework/container-runtime-definitions\";\nimport {\n\ttype FluidObject,\n\ttype IFluidLoadable,\n\ttype IRequest,\n\ttype IResponse,\n} from \"@fluidframework/core-interfaces\";\nimport { FlushMode } from \"@fluidframework/runtime-definitions\";\nimport { type IRuntimeFactory } from \"@fluidframework/container-definitions\";\nimport { RequestParser } from \"@fluidframework/runtime-utils\";\nimport { type ContainerRuntime } from \"@fluidframework/container-runtime\";\nimport { type IDirectory } from \"@fluidframework/map\";\n\nimport {\n\ttype ContainerSchema,\n\ttype IRootDataObject,\n\ttype LoadableObjectClass,\n\ttype LoadableObjectClassRecord,\n\ttype LoadableObjectRecord,\n\ttype SharedObjectClass,\n} from \"./types.js\";\nimport {\n\ttype InternalDataObjectClass,\n\tisDataObjectClass,\n\tisSharedObjectClass,\n\tparseDataObjectsFromSharedObjects,\n} from \"./utils.js\";\n\n/**\n * Input props for {@link RootDataObject.initializingFirstTime}.\n */\nexport interface RootDataObjectProps {\n\t/**\n\t * Initial object structure with which the {@link RootDataObject} will be first-time initialized.\n\t *\n\t * @see {@link RootDataObject.initializingFirstTime}\n\t */\n\tinitialObjects: LoadableObjectClassRecord;\n}\n\n/**\n * The entry-point/root collaborative object of the {@link IFluidContainer | Fluid Container}.\n * Abstracts the dynamic code required to build a Fluid Container into a static representation for end customers.\n */\nclass RootDataObject\n\textends DataObject<{ InitialState: RootDataObjectProps }>\n\timplements IRootDataObject\n{\n\tprivate readonly initialObjectsDirKey = \"initial-objects-key\";\n\tprivate readonly _initialObjects: LoadableObjectRecord = {};\n\n\tpublic get IRootDataObject(): IRootDataObject {\n\t\treturn this;\n\t}\n\n\tprivate get initialObjectsDir(): IDirectory {\n\t\tconst dir = this.root.getSubDirectory(this.initialObjectsDirKey);\n\t\tif (dir === undefined) {\n\t\t\tthrow new Error(\"InitialObjects sub-directory was not initialized\");\n\t\t}\n\t\treturn dir;\n\t}\n\n\t/**\n\t * The first time this object is initialized, creates each object identified in\n\t * {@link RootDataObjectProps.initialObjects} and stores them as unique values in the root directory.\n\t *\n\t * @see {@link @fluidframework/aqueduct#PureDataObject.initializingFirstTime}\n\t */\n\tprotected async initializingFirstTime(props: RootDataObjectProps): Promise<void> {\n\t\tthis.root.createSubDirectory(this.initialObjectsDirKey);\n\n\t\t// Create initial objects provided by the developer\n\t\tconst initialObjectsP: Promise<void>[] = [];\n\t\tfor (const [id, objectClass] of Object.entries(props.initialObjects)) {\n\t\t\tconst createObject = async (): Promise<void> => {\n\t\t\t\tconst obj = await this.create<IFluidLoadable>(objectClass);\n\t\t\t\tthis.initialObjectsDir.set(id, obj.handle);\n\t\t\t};\n\t\t\tinitialObjectsP.push(createObject());\n\t\t}\n\n\t\tawait Promise.all(initialObjectsP);\n\t}\n\n\t/**\n\t * Every time an instance is initialized, loads all of the initial objects in the root directory so they can be\n\t * accessed immediately.\n\t *\n\t * @see {@link @fluidframework/aqueduct#PureDataObject.hasInitialized}\n\t */\n\tprotected async hasInitialized(): Promise<void> {\n\t\t// We will always load the initial objects so they are available to the developer\n\t\tconst loadInitialObjectsP: Promise<void>[] = [];\n\t\tfor (const [key, value] of this.initialObjectsDir.entries()) {\n\t\t\tconst loadDir = async (): Promise<void> => {\n\t\t\t\t// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call\n\t\t\t\tconst obj: unknown = await value.get();\n\t\t\t\tObject.assign(this._initialObjects, { [key]: obj });\n\t\t\t};\n\t\t\tloadInitialObjectsP.push(loadDir());\n\t\t}\n\n\t\tawait Promise.all(loadInitialObjectsP);\n\t}\n\n\t/**\n\t * {@inheritDoc IRootDataObject.initialObjects}\n\t */\n\tpublic get initialObjects(): LoadableObjectRecord {\n\t\tif (Object.keys(this._initialObjects).length === 0) {\n\t\t\tthrow new Error(\"Initial Objects were not correctly initialized\");\n\t\t}\n\t\treturn this._initialObjects;\n\t}\n\n\t/**\n\t * {@inheritDoc IRootDataObject.create}\n\t */\n\tpublic async create<T extends IFluidLoadable>(objectClass: LoadableObjectClass<T>): Promise<T> {\n\t\tif (isDataObjectClass(objectClass)) {\n\t\t\treturn this.createDataObject<T>(objectClass);\n\t\t} else if (isSharedObjectClass(objectClass)) {\n\t\t\treturn this.createSharedObject<T>(objectClass);\n\t\t}\n\t\tthrow new Error(\"Could not create new Fluid object because an unknown object was passed\");\n\t}\n\n\tprivate async createDataObject<T extends IFluidLoadable>(\n\t\tdataObjectClass: InternalDataObjectClass<T>,\n\t): Promise<T> {\n\t\tconst factory = dataObjectClass.factory;\n\t\tconst packagePath = [...this.context.packagePath, factory.type];\n\t\tconst dataStore = await this.context.containerRuntime.createDataStore(packagePath);\n\t\tconst entryPoint = await dataStore.entryPoint.get();\n\t\treturn entryPoint as unknown as T;\n\t}\n\n\tprivate createSharedObject<T extends IFluidLoadable>(\n\t\tsharedObjectClass: SharedObjectClass<T>,\n\t): T {\n\t\tconst factory = sharedObjectClass.getFactory();\n\t\tconst obj = this.runtime.createChannel(undefined, factory.type);\n\t\treturn obj as unknown as T;\n\t}\n}\n\nconst rootDataStoreId = \"rootDOId\";\n\n/**\n * Creates an {@link @fluidframework/aqueduct#BaseContainerRuntimeFactory} for a container with a single\n * {@link IRootDataObject}, which is constructed from the provided schema.\n *\n * @internal\n */\nexport function createDOProviderContainerRuntimeFactory(props: {\n\tschema: ContainerSchema;\n}): IRuntimeFactory {\n\treturn new DOProviderContainerRuntimeFactory(props.schema);\n}\n\n/**\n * Container code that provides a single {@link IRootDataObject}.\n *\n * @remarks\n *\n * This data object is dynamically customized (registry and initial objects) based on the schema provided.\n * to the container runtime factory.\n *\n * @internal\n */\nclass DOProviderContainerRuntimeFactory extends BaseContainerRuntimeFactory {\n\tprivate readonly rootDataObjectFactory: DataObjectFactory<\n\t\tRootDataObject,\n\t\t{\n\t\t\tInitialState: RootDataObjectProps;\n\t\t}\n\t>;\n\n\tprivate readonly initialObjects: LoadableObjectClassRecord;\n\n\tpublic constructor(schema: ContainerSchema) {\n\t\tconst [registryEntries, sharedObjects] = parseDataObjectsFromSharedObjects(schema);\n\t\tconst rootDataObjectFactory = new DataObjectFactory(\n\t\t\t\"rootDO\",\n\t\t\tRootDataObject,\n\t\t\tsharedObjects,\n\t\t\t{},\n\t\t\tregistryEntries,\n\t\t);\n\t\tconst provideEntryPoint = async (\n\t\t\tcontainerRuntime: IContainerRuntime,\n\t\t\t// eslint-disable-next-line unicorn/consistent-function-scoping\n\t\t): Promise<FluidObject> => {\n\t\t\tconst entryPoint =\n\t\t\t\tawait containerRuntime.getAliasedDataStoreEntryPoint(rootDataStoreId);\n\t\t\tif (entryPoint === undefined) {\n\t\t\t\tthrow new Error(`default dataStore [${rootDataStoreId}] must exist`);\n\t\t\t}\n\t\t\treturn entryPoint.get();\n\t\t};\n\t\tconst getDefaultObject = async (\n\t\t\trequest: IRequest,\n\t\t\truntime: IContainerRuntime,\n\t\t\t// eslint-disable-next-line unicorn/consistent-function-scoping\n\t\t): Promise<IResponse | undefined> => {\n\t\t\tconst parser = RequestParser.create(request);\n\t\t\tif (parser.pathParts.length === 0) {\n\t\t\t\t// This cast is safe as ContainerRuntime.loadRuntime is called in the base class\n\t\t\t\treturn (runtime as ContainerRuntime).resolveHandle({\n\t\t\t\t\turl: `/${rootDataStoreId}${parser.query}`,\n\t\t\t\t\theaders: request.headers,\n\t\t\t\t});\n\t\t\t}\n\t\t\treturn undefined; // continue search\n\t\t};\n\t\tsuper({\n\t\t\tregistryEntries: [rootDataObjectFactory.registryEntry],\n\t\t\trequestHandlers: [getDefaultObject],\n\t\t\truntimeOptions: {\n\t\t\t\t// temporary workaround to disable message batching until the message batch size issue is resolved\n\t\t\t\t// resolution progress is tracked by the Feature 465 work item in AzDO\n\t\t\t\tflushMode: FlushMode.Immediate,\n\t\t\t\t// The runtime compressor is required to be on to use @fluidframework/tree.\n\t\t\t\tenableRuntimeIdCompressor: \"on\",\n\t\t\t},\n\t\t\tprovideEntryPoint,\n\t\t});\n\t\tthis.rootDataObjectFactory = rootDataObjectFactory;\n\t\tthis.initialObjects = schema.initialObjects;\n\t}\n\n\t/**\n\t * {@inheritDoc @fluidframework/aqueduct#BaseContainerRuntimeFactory.containerInitializingFirstTime}\n\t */\n\tprotected async containerInitializingFirstTime(runtime: IContainerRuntime): Promise<void> {\n\t\t// The first time we create the container we create the RootDataObject\n\t\tawait this.rootDataObjectFactory.createRootInstance(rootDataStoreId, runtime, {\n\t\t\tinitialObjects: this.initialObjects,\n\t\t});\n\t}\n}\n"]}
1
+ {"version":3,"file":"rootDataObject.js","sourceRoot":"","sources":["../src/rootDataObject.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,2BAA2B,EAC3B,UAAU,EACV,iBAAiB,GACjB,MAAM,0BAA0B,CAAC;AAWlC,OAAO,EAAE,SAAS,EAAE,MAAM,qCAAqC,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAU9D,OAAO,EAEN,iBAAiB,EACjB,kBAAkB,EAClB,iCAAiC,GACjC,MAAM,YAAY,CAAC;AAcpB;;;GAGG;AACH,MAAM,cACL,SAAQ,UAAiD;IAD1D;;QAIkB,yBAAoB,GAAG,qBAAqB,CAAC;QAC7C,oBAAe,GAAyB,EAAE,CAAC;IAgG7D,CAAC;IA9FA,IAAW,eAAe;QACzB,OAAO,IAAI,CAAC;IACb,CAAC;IAED,IAAY,iBAAiB;QAC5B,MAAM,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC;QACjE,IAAI,GAAG,KAAK,SAAS,EAAE;YACtB,MAAM,IAAI,KAAK,CAAC,kDAAkD,CAAC,CAAC;SACpE;QACD,OAAO,GAAG,CAAC;IACZ,CAAC;IAED;;;;;OAKG;IACO,KAAK,CAAC,qBAAqB,CAAC,KAA0B;QAC/D,IAAI,CAAC,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC;QAExD,mDAAmD;QACnD,MAAM,eAAe,GAAoB,EAAE,CAAC;QAC5C,KAAK,MAAM,CAAC,EAAE,EAAE,WAAW,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK,C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CAAC,cAAc,CAAC;IAC7C,CAAC;IAED;;OAEG;IACO,KAAK,CAAC,8BAA8B,CAAC,OAA0B;QACxE,sEAAsE;QACtE,MAAM,IAAI,CAAC,qBAAqB,CAAC,kBAAkB,CAAC,eAAe,EAAE,OAAO,EAAE;YAC7E,cAAc,EAAE,IAAI,CAAC,cAAc;SACnC,CAAC,CAAC;IACJ,CAAC;CACD","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport {\n\tBaseContainerRuntimeFactory,\n\tDataObject,\n\tDataObjectFactory,\n} from \"@fluidframework/aqueduct\";\nimport { type IRuntimeFactory } from \"@fluidframework/container-definitions\";\nimport { type ContainerRuntime } from \"@fluidframework/container-runtime\";\nimport { type IContainerRuntime } from \"@fluidframework/container-runtime-definitions\";\nimport {\n\ttype FluidObject,\n\ttype IFluidLoadable,\n\ttype IRequest,\n\ttype IResponse,\n} from \"@fluidframework/core-interfaces\";\nimport { type IDirectory } from \"@fluidframework/map\";\nimport { FlushMode } from \"@fluidframework/runtime-definitions\";\nimport { RequestParser } from \"@fluidframework/runtime-utils\";\n\nimport type { ISharedObjectKind } from \"@fluidframework/shared-object-base\";\nimport {\n\ttype ContainerSchema,\n\ttype IRootDataObject,\n\ttype LoadableObjectClass,\n\ttype LoadableObjectClassRecord,\n\ttype LoadableObjectRecord,\n} from \"./types.js\";\nimport {\n\ttype InternalDataObjectClass,\n\tisDataObjectClass,\n\tisSharedObjectKind,\n\tparseDataObjectsFromSharedObjects,\n} from \"./utils.js\";\n\n/**\n * Input props for {@link RootDataObject.initializingFirstTime}.\n */\nexport interface RootDataObjectProps {\n\t/**\n\t * Initial object structure with which the {@link RootDataObject} will be first-time initialized.\n\t *\n\t * @see {@link RootDataObject.initializingFirstTime}\n\t */\n\tinitialObjects: LoadableObjectClassRecord;\n}\n\n/**\n * The entry-point/root collaborative object of the {@link IFluidContainer | Fluid Container}.\n * Abstracts the dynamic code required to build a Fluid Container into a static representation for end customers.\n */\nclass RootDataObject\n\textends DataObject<{ InitialState: RootDataObjectProps }>\n\timplements IRootDataObject\n{\n\tprivate readonly initialObjectsDirKey = \"initial-objects-key\";\n\tprivate readonly _initialObjects: LoadableObjectRecord = {};\n\n\tpublic get IRootDataObject(): IRootDataObject {\n\t\treturn this;\n\t}\n\n\tprivate get initialObjectsDir(): IDirectory {\n\t\tconst dir = this.root.getSubDirectory(this.initialObjectsDirKey);\n\t\tif (dir === undefined) {\n\t\t\tthrow new Error(\"InitialObjects sub-directory was not initialized\");\n\t\t}\n\t\treturn dir;\n\t}\n\n\t/**\n\t * The first time this object is initialized, creates each object identified in\n\t * {@link RootDataObjectProps.initialObjects} and stores them as unique values in the root directory.\n\t *\n\t * @see {@link @fluidframework/aqueduct#PureDataObject.initializingFirstTime}\n\t */\n\tprotected async initializingFirstTime(props: RootDataObjectProps): Promise<void> {\n\t\tthis.root.createSubDirectory(this.initialObjectsDirKey);\n\n\t\t// Create initial objects provided by the developer\n\t\tconst initialObjectsP: Promise<void>[] = [];\n\t\tfor (const [id, objectClass] of Object.entries(props.initialObjects)) {\n\t\t\tconst createObject = async (): Promise<void> => {\n\t\t\t\tconst obj = await this.create<IFluidLoadable>(objectClass);\n\t\t\t\tthis.initialObjectsDir.set(id, obj.handle);\n\t\t\t};\n\t\t\tinitialObjectsP.push(createObject());\n\t\t}\n\n\t\tawait Promise.all(initialObjectsP);\n\t}\n\n\t/**\n\t * Every time an instance is initialized, loads all of the initial objects in the root directory so they can be\n\t * accessed immediately.\n\t *\n\t * @see {@link @fluidframework/aqueduct#PureDataObject.hasInitialized}\n\t */\n\tprotected async hasInitialized(): Promise<void> {\n\t\t// We will always load the initial objects so they are available to the developer\n\t\tconst loadInitialObjectsP: Promise<void>[] = [];\n\t\tfor (const [key, value] of this.initialObjectsDir.entries()) {\n\t\t\tconst loadDir = async (): Promise<void> => {\n\t\t\t\t// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call\n\t\t\t\tconst obj: unknown = await value.get();\n\t\t\t\tObject.assign(this._initialObjects, { [key]: obj });\n\t\t\t};\n\t\t\tloadInitialObjectsP.push(loadDir());\n\t\t}\n\n\t\tawait Promise.all(loadInitialObjectsP);\n\t}\n\n\t/**\n\t * {@inheritDoc IRootDataObject.initialObjects}\n\t */\n\tpublic get initialObjects(): LoadableObjectRecord {\n\t\tif (Object.keys(this._initialObjects).length === 0) {\n\t\t\tthrow new Error(\"Initial Objects were not correctly initialized\");\n\t\t}\n\t\treturn this._initialObjects;\n\t}\n\n\t/**\n\t * {@inheritDoc IRootDataObject.create}\n\t */\n\tpublic async create<T extends IFluidLoadable>(objectClass: LoadableObjectClass<T>): Promise<T> {\n\t\tif (isDataObjectClass(objectClass)) {\n\t\t\treturn this.createDataObject(objectClass);\n\t\t} else if (isSharedObjectKind(objectClass)) {\n\t\t\treturn this.createSharedObject(objectClass);\n\t\t}\n\t\tthrow new Error(\"Could not create new Fluid object because an unknown object was passed\");\n\t}\n\n\tprivate async createDataObject<T extends IFluidLoadable>(\n\t\tdataObjectClass: InternalDataObjectClass<T>,\n\t): Promise<T> {\n\t\tconst factory = dataObjectClass.factory;\n\t\tconst packagePath = [...this.context.packagePath, factory.type];\n\t\tconst dataStore = await this.context.containerRuntime.createDataStore(packagePath);\n\t\tconst entryPoint = await dataStore.entryPoint.get();\n\t\treturn entryPoint as unknown as T;\n\t}\n\n\tprivate createSharedObject<T extends IFluidLoadable>(\n\t\tsharedObjectClass: ISharedObjectKind<T>,\n\t): T {\n\t\tconst factory = sharedObjectClass.getFactory();\n\t\tconst obj = this.runtime.createChannel(undefined, factory.type);\n\t\treturn obj as unknown as T;\n\t}\n}\n\nconst rootDataStoreId = \"rootDOId\";\n\n/**\n * Creates an {@link @fluidframework/aqueduct#BaseContainerRuntimeFactory} for a container with a single\n * {@link IRootDataObject}, which is constructed from the provided schema.\n *\n * @internal\n */\nexport function createDOProviderContainerRuntimeFactory(props: {\n\tschema: ContainerSchema;\n}): IRuntimeFactory {\n\treturn new DOProviderContainerRuntimeFactory(props.schema);\n}\n\n/**\n * Container code that provides a single {@link IRootDataObject}.\n *\n * @remarks\n *\n * This data object is dynamically customized (registry and initial objects) based on the schema provided.\n * to the container runtime factory.\n *\n * @internal\n */\nclass DOProviderContainerRuntimeFactory extends BaseContainerRuntimeFactory {\n\tprivate readonly rootDataObjectFactory: DataObjectFactory<\n\t\tRootDataObject,\n\t\t{\n\t\t\tInitialState: RootDataObjectProps;\n\t\t}\n\t>;\n\n\tprivate readonly initialObjects: LoadableObjectClassRecord;\n\n\tpublic constructor(schema: ContainerSchema) {\n\t\tconst [registryEntries, sharedObjects] = parseDataObjectsFromSharedObjects(schema);\n\t\tconst rootDataObjectFactory = new DataObjectFactory(\n\t\t\t\"rootDO\",\n\t\t\tRootDataObject,\n\t\t\tsharedObjects,\n\t\t\t{},\n\t\t\tregistryEntries,\n\t\t);\n\t\tconst provideEntryPoint = async (\n\t\t\tcontainerRuntime: IContainerRuntime,\n\t\t\t// eslint-disable-next-line unicorn/consistent-function-scoping\n\t\t): Promise<FluidObject> => {\n\t\t\tconst entryPoint =\n\t\t\t\tawait containerRuntime.getAliasedDataStoreEntryPoint(rootDataStoreId);\n\t\t\tif (entryPoint === undefined) {\n\t\t\t\tthrow new Error(`default dataStore [${rootDataStoreId}] must exist`);\n\t\t\t}\n\t\t\treturn entryPoint.get();\n\t\t};\n\t\tconst getDefaultObject = async (\n\t\t\trequest: IRequest,\n\t\t\truntime: IContainerRuntime,\n\t\t\t// eslint-disable-next-line unicorn/consistent-function-scoping\n\t\t): Promise<IResponse | undefined> => {\n\t\t\tconst parser = RequestParser.create(request);\n\t\t\tif (parser.pathParts.length === 0) {\n\t\t\t\t// This cast is safe as ContainerRuntime.loadRuntime is called in the base class\n\t\t\t\treturn (runtime as ContainerRuntime).resolveHandle({\n\t\t\t\t\turl: `/${rootDataStoreId}${parser.query}`,\n\t\t\t\t\theaders: request.headers,\n\t\t\t\t});\n\t\t\t}\n\t\t\treturn undefined; // continue search\n\t\t};\n\t\tsuper({\n\t\t\tregistryEntries: [rootDataObjectFactory.registryEntry],\n\t\t\trequestHandlers: [getDefaultObject],\n\t\t\t// WARNING: These settigs are not compatible with FF 1.3 clients!\n\t\t\truntimeOptions: {\n\t\t\t\t// temporary workaround to disable message batching until the message batch size issue is resolved\n\t\t\t\t// resolution progress is tracked by the Feature 465 work item in AzDO\n\t\t\t\tflushMode: FlushMode.Immediate,\n\t\t\t\t// The runtime compressor is required to be on to use @fluidframework/tree.\n\t\t\t\tenableRuntimeIdCompressor: \"on\",\n\t\t\t\texplicitSchemaControl: true,\n\t\t\t},\n\t\t\tprovideEntryPoint,\n\t\t});\n\t\tthis.rootDataObjectFactory = rootDataObjectFactory;\n\t\tthis.initialObjects = schema.initialObjects;\n\t}\n\n\t/**\n\t * {@inheritDoc @fluidframework/aqueduct#BaseContainerRuntimeFactory.containerInitializingFirstTime}\n\t */\n\tprotected async containerInitializingFirstTime(runtime: IContainerRuntime): Promise<void> {\n\t\t// The first time we create the container we create the RootDataObject\n\t\tawait this.rootDataObjectFactory.createRootInstance(rootDataStoreId, runtime, {\n\t\t\tinitialObjects: this.initialObjects,\n\t\t});\n\t}\n}\n"]}
@@ -4,7 +4,7 @@
4
4
  */
5
5
  import { type IContainer } from "@fluidframework/container-definitions";
6
6
  import { type IClient } from "@fluidframework/protocol-definitions";
7
- import { type IServiceAudience, type IMember } from "./types.js";
7
+ import { type IMember, type IServiceAudience } from "./types.js";
8
8
  /**
9
9
  * Creates a service audience for the provided container.
10
10
  *
@@ -1 +1 @@
1
- {"version":3,"file":"serviceAudience.d.ts","sourceRoot":"","sources":["../src/serviceAudience.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAkB,KAAK,UAAU,EAAE,MAAM,uCAAuC,CAAC;AACxF,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,sCAAsC,CAAC;AACpE,OAAO,EACN,KAAK,gBAAgB,EAErB,KAAK,OAAO,EAEZ,MAAM,YAAY,CAAC;AAEpB;;;;;;;;;GASG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,SAAS,OAAO,GAAG,OAAO,EAAE,KAAK,EAAE;IAC/E,SAAS,EAAE,UAAU,CAAC;IACtB,mBAAmB,EAAE,CAAC,cAAc,EAAE,OAAO,KAAK,OAAO,CAAC;CAC1D,GAAG,gBAAgB,CAAC,OAAO,CAAC,CAE5B"}
1
+ {"version":3,"file":"serviceAudience.d.ts","sourceRoot":"","sources":["../src/serviceAudience.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAkB,KAAK,UAAU,EAAE,MAAM,uCAAuC,CAAC;AACxF,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,sCAAsC,CAAC;AACpE,OAAO,EACN,KAAK,OAAO,EACZ,KAAK,gBAAgB,EAGrB,MAAM,YAAY,CAAC;AAEpB;;;;;;;;;GASG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,SAAS,OAAO,GAAG,OAAO,EAAE,KAAK,EAAE;IAC/E,SAAS,EAAE,UAAU,CAAC;IACtB,mBAAmB,EAAE,CAAC,cAAc,EAAE,OAAO,KAAK,OAAO,CAAC;CAC1D,GAAG,gBAAgB,CAAC,OAAO,CAAC,CAE5B"}
@@ -1 +1 @@
1
- {"version":3,"file":"serviceAudience.js","sourceRoot":"","sources":["../src/serviceAudience.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAUjE;;;;;;;;;GASG;AACH,MAAM,UAAU,qBAAqB,CAAoC,KAGxE;IACA,OAAO,IAAI,eAAe,CAAC,KAAK,CAAC,SAAS,EAAE,KAAK,CAAC,mBAAmB,CAAC,CAAC;AACxE,CAAC;AAED;;;;;;;;;;;GAWG;AACH,MAAM,eACL,SAAQ,iBAAkD;IA2B1D;IACC;;OAEG;IACc,SAAqB,EACrB,mBAAyD;QAE1E,KAAK,EA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;QACjC,oEAAoE;QACpE,MAAM,sBAAsB,GAAG,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;QACjE,IAAI,sBAAsB,KAAK,SAAS,EAAE;YACzC,OAAO,SAAS,CAAC;SACjB;QACD,2EAA2E;QAC3E,MAAM,UAAU,GAAG,IAAI,CAAC,UAAU,EAAE,CAAC;QACrC,MAAM,MAAM,GAAG,UAAU,CAAC,GAAG,CAAC,sBAAsB,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC;QAC/D,IAAI,MAAM,KAAK,SAAS,EAAE;YACzB,MAAM,IAAI,KAAK,CACd,6BAA6B,QAAQ,8CAA8C,CACnF,CAAC;SACF;QACD,OAAO,MAAM,CAAC;IACf,CAAC;IAED;;;;;OAKG;IACK,qBAAqB,CAAC,MAAe;QAC5C,6BAA6B;QAC7B,OAAO,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,WAAW,CAAC;IAChD,CAAC;CACD","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { TypedEventEmitter } from \"@fluid-internal/client-utils\";\nimport { type IAudience, type IContainer } from \"@fluidframework/container-definitions\";\nimport { type IClient } from \"@fluidframework/protocol-definitions\";\nimport {\n\ttype IServiceAudience,\n\ttype IServiceAudienceEvents,\n\ttype IMember,\n\ttype Myself,\n} from \"./types.js\";\n\n/**\n * Creates a service audience for the provided container.\n *\n * @param container - The container with which the audience is associated.\n * @param createServiceMember - A function for creating audience members.\n *\n * @typeParam TMember - The {@link IMember} representation used by the audience.\n *\n * @internal\n */\nexport function createServiceAudience<TMember extends IMember = IMember>(props: {\n\tcontainer: IContainer;\n\tcreateServiceMember: (audienceMember: IClient) => TMember;\n}): IServiceAudience<TMember> {\n\treturn new ServiceAudience(props.container, props.createServiceMember);\n}\n\n/**\n * Base class for providing audience information for sessions interacting with {@link IFluidContainer}\n *\n * @remarks\n *\n * This can be extended by different service-specific client packages to additional parameters to\n * the user and client details returned in {@link IMember}.\n *\n * @typeParam TMember - A service-specific {@link IMember} implementation.\n *\n * @internal\n */\nclass ServiceAudience<TMember extends IMember = IMember>\n\textends TypedEventEmitter<IServiceAudienceEvents<TMember>>\n\timplements IServiceAudience<TMember>\n{\n\t/**\n\t * Audience object which includes all the existing members of the {@link IFluidContainer | container}.\n\t */\n\tprivate readonly audience: IAudience;\n\n\t/**\n\t * Retain the most recent member list.\n\t *\n\t * @remarks\n\t *\n\t * This is so we have more information about a member leaving the audience in the `removeMember` event.\n\t *\n\t * It allows us to match the behavior of the `addMember` event where it only fires on a change to the members this\n\t * class exposes (and would actually produce a change in what `getMembers` returns).\n\t *\n\t * It also allows us to provide the client details in the event which makes it easier to find that client connection\n\t * in a map keyed on the `userId` and not `clientId`.\n\t *\n\t * This map will always be up-to-date in a `removeMember` event because it is set once at construction and in\n\t * every `addMember` event. It is mapped `clientId` to `M` to be better work with what the {@link IServiceAudience}\n\t * events provide.\n\t */\n\tprivate lastMembers = new Map<string, TMember>();\n\n\tpublic constructor(\n\t\t/**\n\t\t * Fluid Container to read the audience from.\n\t\t */\n\t\tprivate readonly container: IContainer,\n\t\tprivate readonly createServiceMember: (audienceMember: IClient) => TMember,\n\t) {\n\t\tsuper();\n\t\tthis.audience = container.audience;\n\n\t\t// getMembers will assign lastMembers so the removeMember event has what it needs\n\t\t// in case it would fire before getMembers otherwise gets called the first time\n\t\tthis.getMembers();\n\n\t\tthis.audience.on(\"addMember\", (clientId: string, details: IClient) => {\n\t\t\tif (this.shouldIncludeAsMember(details)) {\n\t\t\t\tconst member = this.getMember(clientId);\n\t\t\t\tthis.emit(\"memberAdded\", clientId, member);\n\t\t\t\tthis.emit(\"membersChanged\");\n\t\t\t}\n\t\t});\n\n\t\tthis.audience.on(\"removeMember\", (clientId: string) => {\n\t\t\tif (this.lastMembers.has(clientId)) {\n\t\t\t\tthis.emit(\"memberRemoved\", clientId, this.lastMembers.get(clientId));\n\t\t\t\tthis.emit(\"membersChanged\");\n\t\t\t}\n\t\t});\n\n\t\tthis.container.on(\"connected\", () => this.emit(\"membersChanged\"));\n\t}\n\n\t/**\n\t * {@inheritDoc IServiceAudience.getMembers}\n\t */\n\tpublic getMembers(): Map<string, TMember> {\n\t\tconst users = new Map<string, TMember>();\n\t\tconst clientMemberMap = new Map<string, TMember>();\n\t\t// Iterate through the members and get the user specifics.\n\t\tfor (const [clientId, member] of this.audience.getMembers()) {\n\t\t\tif (this.shouldIncludeAsMember(member)) {\n\t\t\t\tconst userId = member.user.id;\n\t\t\t\t// Ensure we're tracking the user\n\t\t\t\tlet user = users.get(userId);\n\t\t\t\tif (user === undefined) {\n\t\t\t\t\tuser = this.createServiceMember(member);\n\t\t\t\t\tusers.set(userId, user);\n\t\t\t\t}\n\n\t\t\t\t// Add this connection to their collection\n\t\t\t\tuser.connections.push({ id: clientId, mode: member.mode });\n\t\t\t\tclientMemberMap.set(clientId, user);\n\t\t\t}\n\t\t}\n\t\tthis.lastMembers = clientMemberMap;\n\t\treturn users;\n\t}\n\n\t/**\n\t * {@inheritDoc IServiceAudience.getMyself}\n\t */\n\tpublic getMyself(): Myself<TMember> | undefined {\n\t\tconst clientId = this.container.clientId;\n\t\tif (clientId === undefined) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst member = this.getMember(clientId);\n\t\tif (member === undefined) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst myself: Myself<TMember> = { ...member, currentConnection: clientId };\n\n\t\treturn myself;\n\t}\n\n\tprivate getMember(clientId: string): TMember | undefined {\n\t\t// Fetch the user ID assoicated with this client ID from the runtime\n\t\tconst internalAudienceMember = this.audience.getMember(clientId);\n\t\tif (internalAudienceMember === undefined) {\n\t\t\treturn undefined;\n\t\t}\n\t\t// Return the member object with any other clients associated for this user\n\t\tconst allMembers = this.getMembers();\n\t\tconst member = allMembers.get(internalAudienceMember?.user.id);\n\t\tif (member === undefined) {\n\t\t\tthrow new Error(\n\t\t\t\t`Attempted to fetch client ${clientId} that is not part of the current member list`,\n\t\t\t);\n\t\t}\n\t\treturn member;\n\t}\n\n\t/**\n\t * Provides ability for the inheriting class to include/omit specific members.\n\t * An example use case is omitting the summarizer client.\n\t *\n\t * @param member - Member to be included/omitted.\n\t */\n\tprivate shouldIncludeAsMember(member: IClient): boolean {\n\t\t// Include only human members\n\t\treturn member.details.capabilities.interactive;\n\t}\n}\n"]}
1
+ {"version":3,"file":"serviceAudience.js","sourceRoot":"","sources":["../src/serviceAudience.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAUjE;;;;;;;;;GASG;AACH,MAAM,UAAU,qBAAqB,CAAoC,KAGxE;IACA,OAAO,IAAI,eAAe,CAAC,KAAK,CAAC,SAAS,EAAE,KAAK,CAAC,mBAAmB,CAAC,CAAC;AACxE,CAAC;AAED;;;;;;;;;;;GAWG;AACH,MAAM,eACL,SAAQ,iBAAkD;IA2B1D;IACC;;OAEG;IACc,SAAqB,EACrB,mBAAyD;QAE1E,KAAK,EAAE,CAAC;QAHS,cAAS,GAAT,SAAS,CAAY;QACrB,wBAAmB,GAAnB,mBAAmB,CAAsC;QAxB3E;;;;;;;;;;;;;;;;WAgBG;QACK,gBAAW,GAAG,IAAI,GAAG,EAAmB,CAAC;QAUhD,IAAI,CAAC,QAAQ,GAAG,SAAS,CAAC,QAAQ,CAAC;QAEnC,iFAAiF;QACjF,+EAA+E;QAC/E,IAAI,CAAC,UAAU,EAAE,CAAC;QAElB,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,WAAW,EAAE,CAAC,QAAgB,EAAE,OAAgB,EAAE,EAAE;YACpE,IAAI,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC,EAAE;gBACxC,MAAM,MAAM,GAAG,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;gBACxC,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,QAAQ,EAAE,MAAM,CAAC,CA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CAAC,WAAW,CAAC;IAChD,CAAC;CACD","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { TypedEventEmitter } from \"@fluid-internal/client-utils\";\nimport { type IAudience, type IContainer } from \"@fluidframework/container-definitions\";\nimport { type IClient } from \"@fluidframework/protocol-definitions\";\nimport {\n\ttype IMember,\n\ttype IServiceAudience,\n\ttype IServiceAudienceEvents,\n\ttype Myself,\n} from \"./types.js\";\n\n/**\n * Creates a service audience for the provided container.\n *\n * @param container - The container with which the audience is associated.\n * @param createServiceMember - A function for creating audience members.\n *\n * @typeParam TMember - The {@link IMember} representation used by the audience.\n *\n * @internal\n */\nexport function createServiceAudience<TMember extends IMember = IMember>(props: {\n\tcontainer: IContainer;\n\tcreateServiceMember: (audienceMember: IClient) => TMember;\n}): IServiceAudience<TMember> {\n\treturn new ServiceAudience(props.container, props.createServiceMember);\n}\n\n/**\n * Base class for providing audience information for sessions interacting with {@link IFluidContainer}\n *\n * @remarks\n *\n * This can be extended by different service-specific client packages to additional parameters to\n * the user and client details returned in {@link IMember}.\n *\n * @typeParam TMember - A service-specific {@link IMember} implementation.\n *\n * @internal\n */\nclass ServiceAudience<TMember extends IMember = IMember>\n\textends TypedEventEmitter<IServiceAudienceEvents<TMember>>\n\timplements IServiceAudience<TMember>\n{\n\t/**\n\t * Audience object which includes all the existing members of the {@link IFluidContainer | container}.\n\t */\n\tprivate readonly audience: IAudience;\n\n\t/**\n\t * Retain the most recent member list.\n\t *\n\t * @remarks\n\t *\n\t * This is so we have more information about a member leaving the audience in the `removeMember` event.\n\t *\n\t * It allows us to match the behavior of the `addMember` event where it only fires on a change to the members this\n\t * class exposes (and would actually produce a change in what `getMembers` returns).\n\t *\n\t * It also allows us to provide the client details in the event which makes it easier to find that client connection\n\t * in a map keyed on the `userId` and not `clientId`.\n\t *\n\t * This map will always be up-to-date in a `removeMember` event because it is set once at construction and in\n\t * every `addMember` event. It is mapped `clientId` to `M` to be better work with what the {@link IServiceAudience}\n\t * events provide.\n\t */\n\tprivate lastMembers = new Map<string, TMember>();\n\n\tpublic constructor(\n\t\t/**\n\t\t * Fluid Container to read the audience from.\n\t\t */\n\t\tprivate readonly container: IContainer,\n\t\tprivate readonly createServiceMember: (audienceMember: IClient) => TMember,\n\t) {\n\t\tsuper();\n\t\tthis.audience = container.audience;\n\n\t\t// getMembers will assign lastMembers so the removeMember event has what it needs\n\t\t// in case it would fire before getMembers otherwise gets called the first time\n\t\tthis.getMembers();\n\n\t\tthis.audience.on(\"addMember\", (clientId: string, details: IClient) => {\n\t\t\tif (this.shouldIncludeAsMember(details)) {\n\t\t\t\tconst member = this.getMember(clientId);\n\t\t\t\tthis.emit(\"memberAdded\", clientId, member);\n\t\t\t\tthis.emit(\"membersChanged\");\n\t\t\t}\n\t\t});\n\n\t\tthis.audience.on(\"removeMember\", (clientId: string) => {\n\t\t\tif (this.lastMembers.has(clientId)) {\n\t\t\t\tthis.emit(\"memberRemoved\", clientId, this.lastMembers.get(clientId));\n\t\t\t\tthis.emit(\"membersChanged\");\n\t\t\t}\n\t\t});\n\n\t\tthis.container.on(\"connected\", () => this.emit(\"membersChanged\"));\n\t}\n\n\t/**\n\t * {@inheritDoc IServiceAudience.getMembers}\n\t */\n\tpublic getMembers(): Map<string, TMember> {\n\t\tconst users = new Map<string, TMember>();\n\t\tconst clientMemberMap = new Map<string, TMember>();\n\t\t// Iterate through the members and get the user specifics.\n\t\tfor (const [clientId, member] of this.audience.getMembers()) {\n\t\t\tif (this.shouldIncludeAsMember(member)) {\n\t\t\t\tconst userId = member.user.id;\n\t\t\t\t// Ensure we're tracking the user\n\t\t\t\tlet user = users.get(userId);\n\t\t\t\tif (user === undefined) {\n\t\t\t\t\tuser = this.createServiceMember(member);\n\t\t\t\t\tusers.set(userId, user);\n\t\t\t\t}\n\n\t\t\t\t// Add this connection to their collection\n\t\t\t\tuser.connections.push({ id: clientId, mode: member.mode });\n\t\t\t\tclientMemberMap.set(clientId, user);\n\t\t\t}\n\t\t}\n\t\tthis.lastMembers = clientMemberMap;\n\t\treturn users;\n\t}\n\n\t/**\n\t * {@inheritDoc IServiceAudience.getMyself}\n\t */\n\tpublic getMyself(): Myself<TMember> | undefined {\n\t\tconst clientId = this.container.clientId;\n\t\tif (clientId === undefined) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst member = this.getMember(clientId);\n\t\tif (member === undefined) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst myself: Myself<TMember> = { ...member, currentConnection: clientId };\n\n\t\treturn myself;\n\t}\n\n\tprivate getMember(clientId: string): TMember | undefined {\n\t\t// Fetch the user ID assoicated with this client ID from the runtime\n\t\tconst internalAudienceMember = this.audience.getMember(clientId);\n\t\tif (internalAudienceMember === undefined) {\n\t\t\treturn undefined;\n\t\t}\n\t\t// Return the member object with any other clients associated for this user\n\t\tconst allMembers = this.getMembers();\n\t\tconst member = allMembers.get(internalAudienceMember?.user.id);\n\t\tif (member === undefined) {\n\t\t\tthrow new Error(\n\t\t\t\t`Attempted to fetch client ${clientId} that is not part of the current member list`,\n\t\t\t);\n\t\t}\n\t\treturn member;\n\t}\n\n\t/**\n\t * Provides ability for the inheriting class to include/omit specific members.\n\t * An example use case is omitting the summarizer client.\n\t *\n\t * @param member - Member to be included/omitted.\n\t */\n\tprivate shouldIncludeAsMember(member: IClient): boolean {\n\t\t// Include only human members\n\t\treturn member.details.capabilities.interactive;\n\t}\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"fluidContainer.spec.js","sourceRoot":"","sources":["../../src/test/fluidContainer.spec.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAmBH,gCAAgC;AAChC;IACC,uBAAuB;IACvB;KAIC;IAgBD,2BAA2B;IAC3B;KAIC;IAED,oBAAoB;IACpB;KAIC;IAED,kBAAkB;IAClB;KAIC;CACD","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { IFluidLoadable } from \"@fluidframework/core-interfaces\";\nimport type { IChannel } from \"@fluidframework/datastore-definitions\";\nimport type { InitialObjects } from \"../index.js\";\nimport type {\n\tContainerSchema,\n\tDataObjectClass,\n\tLoadableObjectClass,\n\tSharedObjectClass,\n} from \"../types.js\";\n\n/**\n * Compile time assert that A is assignable to (extends) B.\n * To use, simply define a type:\n * `type _check = requireAssignableTo<T, Expected>;`\n */\nexport type requireAssignableTo<_A extends B, B> = true;\n\n// Type tests for InitialObjects\n{\n\t// ContainerSchema case\n\t{\n\t\ttype _a = InitialObjects<ContainerSchema>;\n\t\ttype _b = requireAssignableTo<_a, Record<string, IFluidLoadable>>;\n\t\ttype _c = requireAssignableTo<Record<string, IFluidLoadable>, _a>;\n\t}\n\ttype ContainerSchemaWith<T> = ContainerSchema & { initialObjects: { item: T } };\n\tinterface TestSharedObject extends IChannel {\n\t\tx: number;\n\t}\n\tinterface TestSharedObjectFactory extends SharedObjectClass<TestSharedObject> {\n\t\ty: number;\n\t}\n\n\tinterface TestDataObject extends IFluidLoadable {\n\t\tx: number;\n\t}\n\tinterface TestDataObjectFactory extends DataObjectClass<TestDataObject> {\n\t\ty: number;\n\t}\n\n\t// LoadableObjectClass case\n\t{\n\t\ttype _a = InitialObjects<ContainerSchemaWith<LoadableObjectClass>>[\"item\"];\n\t\ttype _b = requireAssignableTo<_a, IFluidLoadable>;\n\t\ttype _c = requireAssignableTo<IFluidLoadable, _a>;\n\t}\n\n\t// SharedObject case\n\t{\n\t\ttype _a = InitialObjects<ContainerSchemaWith<TestSharedObjectFactory>>[\"item\"];\n\t\ttype _b = requireAssignableTo<_a, TestSharedObject>;\n\t\ttype _c = requireAssignableTo<TestSharedObject, _a>;\n\t}\n\n\t// DataObject case\n\t{\n\t\ttype _a = InitialObjects<ContainerSchemaWith<TestDataObjectFactory>>[\"item\"];\n\t\ttype _b = requireAssignableTo<_a, TestDataObject>;\n\t\ttype _c = requireAssignableTo<TestDataObject, _a>;\n\t}\n}\n"]}
1
+ {"version":3,"file":"fluidContainer.spec.js","sourceRoot":"","sources":["../../src/test/fluidContainer.spec.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAeH,gCAAgC;AAChC;IACC,uBAAuB;IACvB;KAIC;IAgBD,2BAA2B;IAC3B;KAIC;IAED,oBAAoB;IACpB;KAIC;IAED,kBAAkB;IAClB;KAIC;CACD","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { IFluidLoadable } from \"@fluidframework/core-interfaces\";\nimport type { IChannel } from \"@fluidframework/datastore-definitions\";\nimport type { ISharedObjectKind } from \"@fluidframework/shared-object-base\";\nimport type { InitialObjects } from \"../index.js\";\nimport type { ContainerSchema, DataObjectClass, LoadableObjectClass } from \"../types.js\";\n\n/**\n * Compile time assert that A is assignable to (extends) B.\n * To use, simply define a type:\n * `type _check = requireAssignableTo<T, Expected>;`\n */\nexport type requireAssignableTo<_A extends B, B> = true;\n\n// Type tests for InitialObjects\n{\n\t// ContainerSchema case\n\t{\n\t\ttype _a = InitialObjects<ContainerSchema>;\n\t\ttype _b = requireAssignableTo<_a, Record<string, IFluidLoadable>>;\n\t\ttype _c = requireAssignableTo<Record<string, IFluidLoadable>, _a>;\n\t}\n\ttype ContainerSchemaWith<T> = ContainerSchema & { initialObjects: { item: T } };\n\tinterface TestSharedObject extends IChannel {\n\t\tx: number;\n\t}\n\tinterface TestSharedObjectFactory extends ISharedObjectKind<TestSharedObject> {\n\t\ty: number;\n\t}\n\n\tinterface TestDataObject extends IFluidLoadable {\n\t\tx: number;\n\t}\n\tinterface TestDataObjectFactory extends DataObjectClass<TestDataObject> {\n\t\ty: number;\n\t}\n\n\t// LoadableObjectClass case\n\t{\n\t\ttype _a = InitialObjects<ContainerSchemaWith<LoadableObjectClass>>[\"item\"];\n\t\ttype _b = requireAssignableTo<_a, IFluidLoadable>;\n\t\ttype _c = requireAssignableTo<IFluidLoadable, _a>;\n\t}\n\n\t// SharedObject case\n\t{\n\t\ttype _a = InitialObjects<ContainerSchemaWith<TestSharedObjectFactory>>[\"item\"];\n\t\ttype _b = requireAssignableTo<_a, TestSharedObject>;\n\t\ttype _c = requireAssignableTo<TestSharedObject, _a>;\n\t}\n\n\t// DataObject case\n\t{\n\t\ttype _a = InitialObjects<ContainerSchemaWith<TestDataObjectFactory>>[\"item\"];\n\t\ttype _b = requireAssignableTo<_a, TestDataObject>;\n\t\ttype _c = requireAssignableTo<TestDataObject, _a>;\n\t}\n}\n"]}
@@ -26,16 +26,12 @@ use_current_TypeAliasDeclaration_LoadableObjectClass(get_old_TypeAliasDeclaratio
26
26
  use_old_TypeAliasDeclaration_LoadableObjectClass(get_current_TypeAliasDeclaration_LoadableObjectClass());
27
27
  use_current_TypeAliasDeclaration_LoadableObjectClassRecord(get_old_TypeAliasDeclaration_LoadableObjectClassRecord());
28
28
  use_old_TypeAliasDeclaration_LoadableObjectClassRecord(get_current_TypeAliasDeclaration_LoadableObjectClassRecord());
29
- use_current_TypeAliasDeclaration_LoadableObjectCtor(get_old_TypeAliasDeclaration_LoadableObjectCtor());
30
- use_old_TypeAliasDeclaration_LoadableObjectCtor(get_current_TypeAliasDeclaration_LoadableObjectCtor());
31
29
  use_current_TypeAliasDeclaration_LoadableObjectRecord(get_old_TypeAliasDeclaration_LoadableObjectRecord());
32
30
  use_old_TypeAliasDeclaration_LoadableObjectRecord(get_current_TypeAliasDeclaration_LoadableObjectRecord());
33
31
  use_current_TypeAliasDeclaration_MemberChangedListener(get_old_TypeAliasDeclaration_MemberChangedListener());
34
32
  use_old_TypeAliasDeclaration_MemberChangedListener(get_current_TypeAliasDeclaration_MemberChangedListener());
35
33
  use_current_TypeAliasDeclaration_Myself(get_old_TypeAliasDeclaration_Myself());
36
34
  use_old_TypeAliasDeclaration_Myself(get_current_TypeAliasDeclaration_Myself());
37
- use_current_RemovedTypeAliasDeclaration_SharedObjectClass(get_old_TypeAliasDeclaration_SharedObjectClass());
38
- use_old_TypeAliasDeclaration_SharedObjectClass(get_current_RemovedTypeAliasDeclaration_SharedObjectClass());
39
35
  use_current_FunctionDeclaration_createDOProviderContainerRuntimeFactory(get_old_FunctionDeclaration_createDOProviderContainerRuntimeFactory());
40
36
  use_old_FunctionDeclaration_createDOProviderContainerRuntimeFactory(get_current_FunctionDeclaration_createDOProviderContainerRuntimeFactory());
41
37
  use_current_FunctionDeclaration_createFluidContainer(get_old_FunctionDeclaration_createFluidContainer());
@@ -1 +1 @@
1
- {"version":3,"file":"validateFluidStaticPrevious.generated.js","sourceRoot":"","sources":["../../../src/test/types/validateFluidStaticPrevious.generated.ts"],"names":[],"mappings":"AAgCA,gDAAgD,CAC5C,4CAA4C,EAAE,CAAC,CAAC;AAWpD,4CAA4C;AACxC,uDAAuD;AACvD,gDAAgD,EAAE,CAAC,CAAC;AAWxD,gDAAgD,CAC5C,4CAA4C,EAAE,CAAC,CAAC;AAWpD,4CAA4C,CACxC,gDAAgD,EAAE,CAAC,CAAC;AAWxD,4CAA4C,CACxC,wCAAwC,EAAE,CAAC,CAAC;AAWhD,wCAAwC,CACpC,4CAA4C,EAAE,CAAC,CAAC;AAWpD,gDAAgD,CAC5C,4CAA4C,EAAE,CAAC,CAAC;AAWpD,4CAA4C,CACxC,gDAAgD,EAAE,CAAC,CAAC;AAWxD,sDAAsD,CAClD,kDAAkD,EAAE,CAAC,CAAC;AAW1D,kDAAkD,CAC9C,sDAAsD,EAAE,CAAC,CAAC;AAW9D,wCAAwC,CACpC,oCAAoC,EAAE,CAAC,CAAC;AAW5C,oCAAoC,CAChC,wCAAwC,EAAE,CAAC,CAAC;AAWhD,uDAAuD,CACnD,mDAAmD,EAAE,CAAC,CAAC;AAW3D,mDAAmD,CAC/C,uDAAuD,EAAE,CAAC,CAAC;AAW/D,gDAAgD,CAC5C,4CAA4C,EAAE,CAAC,CAAC;AAWpD,4CAA4C,CACxC,gDAAgD,EAAE,CAAC,CAAC;AAWxD,iDAAiD,CAC7C,6CAA6C,EAAE,CAAC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":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n/*\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.\n * Generated by fluid-type-test-generator in @fluidframework/build-tools.\n */\nimport type * as old from \"@fluidframework/fluid-static-previous\";\nimport type * as current from \"../../index.js\";\n\n\n// See 'build-tools/src/type-test-generator/compatibility.ts' for more information.\ntype TypeOnly<T> = T extends number\n\t? number\n\t: T extends string\n\t? string\n\t: T extends boolean | bigint | symbol\n\t? T\n\t: {\n\t\t\t[P in keyof T]: TypeOnly<T[P]>;\n\t };\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"InterfaceDeclaration_ContainerSchema\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_InterfaceDeclaration_ContainerSchema():\n TypeOnly<old.ContainerSchema>;\ndeclare function use_current_InterfaceDeclaration_ContainerSchema(\n use: TypeOnly<current.ContainerSchema>): void;\nuse_current_InterfaceDeclaration_ContainerSchema(\n get_old_InterfaceDeclaration_ContainerSchema());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"InterfaceDeclaration_ContainerSchema\": {\"backCompat\": false}\n*/\ndeclare function get_current_InterfaceDeclaration_ContainerSchema():\n TypeOnly<current.ContainerSchema>;\ndeclare function use_old_InterfaceDeclaration_ContainerSchema(\n use: TypeOnly<old.ContainerSchema>): void;\nuse_old_InterfaceDeclaration_ContainerSchema(\n // @ts-expect-error compatibility expected to be broken\n get_current_InterfaceDeclaration_ContainerSchema());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"TypeAliasDeclaration_DataObjectClass\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_TypeAliasDeclaration_DataObjectClass():\n TypeOnly<old.DataObjectClass<any>>;\ndeclare function use_current_TypeAliasDeclaration_DataObjectClass(\n use: TypeOnly<current.DataObjectClass<any>>): void;\nuse_current_TypeAliasDeclaration_DataObjectClass(\n get_old_TypeAliasDeclaration_DataObjectClass());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"TypeAliasDeclaration_DataObjectClass\": {\"backCompat\": false}\n*/\ndeclare function get_current_TypeAliasDeclaration_DataObjectClass():\n TypeOnly<current.DataObjectClass<any>>;\ndeclare function use_old_TypeAliasDeclaration_DataObjectClass(\n use: TypeOnly<old.DataObjectClass<any>>): void;\nuse_old_TypeAliasDeclaration_DataObjectClass(\n get_current_TypeAliasDeclaration_DataObjectClass());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"InterfaceDeclaration_IConnection\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_InterfaceDeclaration_IConnection():\n TypeOnly<old.IConnection>;\ndeclare function use_current_InterfaceDeclaration_IConnection(\n use: TypeOnly<current.IConnection>): void;\nuse_current_InterfaceDeclaration_IConnection(\n get_old_InterfaceDeclaration_IConnection());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"InterfaceDeclaration_IConnection\": {\"backCompat\": false}\n*/\ndeclare function get_current_InterfaceDeclaration_IConnection():\n TypeOnly<current.IConnection>;\ndeclare function use_old_InterfaceDeclaration_IConnection(\n use: TypeOnly<old.IConnection>): void;\nuse_old_InterfaceDeclaration_IConnection(\n get_current_InterfaceDeclaration_IConnection());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"InterfaceDeclaration_IFluidContainer\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_InterfaceDeclaration_IFluidContainer():\n TypeOnly<old.IFluidContainer>;\ndeclare function use_current_InterfaceDeclaration_IFluidContainer(\n use: TypeOnly<current.IFluidContainer>): void;\nuse_current_InterfaceDeclaration_IFluidContainer(\n get_old_InterfaceDeclaration_IFluidContainer());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"InterfaceDeclaration_IFluidContainer\": {\"backCompat\": false}\n*/\ndeclare function get_current_InterfaceDeclaration_IFluidContainer():\n TypeOnly<current.IFluidContainer>;\ndeclare function use_old_InterfaceDeclaration_IFluidContainer(\n use: TypeOnly<old.IFluidContainer>): void;\nuse_old_InterfaceDeclaration_IFluidContainer(\n get_current_InterfaceDeclaration_IFluidContainer());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"InterfaceDeclaration_IFluidContainerEvents\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_InterfaceDeclaration_IFluidContainerEvents():\n TypeOnly<old.IFluidContainerEvents>;\ndeclare function use_current_InterfaceDeclaration_IFluidContainerEvents(\n use: TypeOnly<current.IFluidContainerEvents>): void;\nuse_current_InterfaceDeclaration_IFluidContainerEvents(\n get_old_InterfaceDeclaration_IFluidContainerEvents());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"InterfaceDeclaration_IFluidContainerEvents\": {\"backCompat\": false}\n*/\ndeclare function get_current_InterfaceDeclaration_IFluidContainerEvents():\n TypeOnly<current.IFluidContainerEvents>;\ndeclare function use_old_InterfaceDeclaration_IFluidContainerEvents(\n use: TypeOnly<old.IFluidContainerEvents>): void;\nuse_old_InterfaceDeclaration_IFluidContainerEvents(\n get_current_InterfaceDeclaration_IFluidContainerEvents());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"InterfaceDeclaration_IMember\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_InterfaceDeclaration_IMember():\n TypeOnly<old.IMember>;\ndeclare function use_current_InterfaceDeclaration_IMember(\n use: TypeOnly<current.IMember>): void;\nuse_current_InterfaceDeclaration_IMember(\n get_old_InterfaceDeclaration_IMember());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"InterfaceDeclaration_IMember\": {\"backCompat\": false}\n*/\ndeclare function get_current_InterfaceDeclaration_IMember():\n TypeOnly<current.IMember>;\ndeclare function use_old_InterfaceDeclaration_IMember(\n use: TypeOnly<old.IMember>): void;\nuse_old_InterfaceDeclaration_IMember(\n get_current_InterfaceDeclaration_IMember());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"InterfaceDeclaration_IProvideRootDataObject\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_InterfaceDeclaration_IProvideRootDataObject():\n TypeOnly<old.IProvideRootDataObject>;\ndeclare function use_current_InterfaceDeclaration_IProvideRootDataObject(\n use: TypeOnly<current.IProvideRootDataObject>): void;\nuse_current_InterfaceDeclaration_IProvideRootDataObject(\n get_old_InterfaceDeclaration_IProvideRootDataObject());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"InterfaceDeclaration_IProvideRootDataObject\": {\"backCompat\": false}\n*/\ndeclare function get_current_InterfaceDeclaration_IProvideRootDataObject():\n TypeOnly<current.IProvideRootDataObject>;\ndeclare function use_old_InterfaceDeclaration_IProvideRootDataObject(\n use: TypeOnly<old.IProvideRootDataObject>): void;\nuse_old_InterfaceDeclaration_IProvideRootDataObject(\n get_current_InterfaceDeclaration_IProvideRootDataObject());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"InterfaceDeclaration_IRootDataObject\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_InterfaceDeclaration_IRootDataObject():\n TypeOnly<old.IRootDataObject>;\ndeclare function use_current_InterfaceDeclaration_IRootDataObject(\n use: TypeOnly<current.IRootDataObject>): void;\nuse_current_InterfaceDeclaration_IRootDataObject(\n get_old_InterfaceDeclaration_IRootDataObject());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"InterfaceDeclaration_IRootDataObject\": {\"backCompat\": false}\n*/\ndeclare function get_current_InterfaceDeclaration_IRootDataObject():\n TypeOnly<current.IRootDataObject>;\ndeclare function use_old_InterfaceDeclaration_IRootDataObject(\n use: TypeOnly<old.IRootDataObject>): void;\nuse_old_InterfaceDeclaration_IRootDataObject(\n get_current_InterfaceDeclaration_IRootDataObject());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"InterfaceDeclaration_IServiceAudience\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_InterfaceDeclaration_IServiceAudience():\n TypeOnly<old.IServiceAudience<any>>;\ndeclare function use_current_InterfaceDeclaration_IServiceAudience(\n use: TypeOnly<current.IServiceAudience<any>>): void;\nuse_current_InterfaceDeclaration_IServiceAudience(\n get_old_InterfaceDeclaration_IServiceAudience());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"InterfaceDeclaration_IServiceAudience\": {\"backCompat\": false}\n*/\ndeclare function get_current_InterfaceDeclaration_IServiceAudience():\n TypeOnly<current.IServiceAudience<any>>;\ndeclare function use_old_InterfaceDeclaration_IServiceAudience(\n use: TypeOnly<old.IServiceAudience<any>>): void;\nuse_old_InterfaceDeclaration_IServiceAudience(\n get_current_InterfaceDeclaration_IServiceAudience());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"InterfaceDeclaration_IServiceAudienceEvents\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_InterfaceDeclaration_IServiceAudienceEvents():\n TypeOnly<old.IServiceAudienceEvents<any>>;\ndeclare function use_current_InterfaceDeclaration_IServiceAudienceEvents(\n use: TypeOnly<current.IServiceAudienceEvents<any>>): void;\nuse_current_InterfaceDeclaration_IServiceAudienceEvents(\n get_old_InterfaceDeclaration_IServiceAudienceEvents());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"InterfaceDeclaration_IServiceAudienceEvents\": {\"backCompat\": false}\n*/\ndeclare function get_current_InterfaceDeclaration_IServiceAudienceEvents():\n TypeOnly<current.IServiceAudienceEvents<any>>;\ndeclare function use_old_InterfaceDeclaration_IServiceAudienceEvents(\n use: TypeOnly<old.IServiceAudienceEvents<any>>): void;\nuse_old_InterfaceDeclaration_IServiceAudienceEvents(\n get_current_InterfaceDeclaration_IServiceAudienceEvents());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"TypeAliasDeclaration_InitialObjects\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_TypeAliasDeclaration_InitialObjects():\n TypeOnly<old.InitialObjects<any>>;\ndeclare function use_current_TypeAliasDeclaration_InitialObjects(\n use: TypeOnly<current.InitialObjects<any>>): void;\nuse_current_TypeAliasDeclaration_InitialObjects(\n get_old_TypeAliasDeclaration_InitialObjects());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"TypeAliasDeclaration_InitialObjects\": {\"backCompat\": false}\n*/\ndeclare function get_current_TypeAliasDeclaration_InitialObjects():\n TypeOnly<current.InitialObjects<any>>;\ndeclare function use_old_TypeAliasDeclaration_InitialObjects(\n use: TypeOnly<old.InitialObjects<any>>): void;\nuse_old_TypeAliasDeclaration_InitialObjects(\n get_current_TypeAliasDeclaration_InitialObjects());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"TypeAliasDeclaration_LoadableObjectClass\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_TypeAliasDeclaration_LoadableObjectClass():\n TypeOnly<old.LoadableObjectClass<any>>;\ndeclare function use_current_TypeAliasDeclaration_LoadableObjectClass(\n use: TypeOnly<current.LoadableObjectClass>): void;\nuse_current_TypeAliasDeclaration_LoadableObjectClass(\n get_old_TypeAliasDeclaration_LoadableObjectClass());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"TypeAliasDeclaration_LoadableObjectClass\": {\"backCompat\": false}\n*/\ndeclare function get_current_TypeAliasDeclaration_LoadableObjectClass():\n TypeOnly<current.LoadableObjectClass>;\ndeclare function use_old_TypeAliasDeclaration_LoadableObjectClass(\n use: TypeOnly<old.LoadableObjectClass<any>>): void;\nuse_old_TypeAliasDeclaration_LoadableObjectClass(\n get_current_TypeAliasDeclaration_LoadableObjectClass());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"TypeAliasDeclaration_LoadableObjectClassRecord\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_TypeAliasDeclaration_LoadableObjectClassRecord():\n TypeOnly<old.LoadableObjectClassRecord>;\ndeclare function use_current_TypeAliasDeclaration_LoadableObjectClassRecord(\n use: TypeOnly<current.LoadableObjectClassRecord>): void;\nuse_current_TypeAliasDeclaration_LoadableObjectClassRecord(\n get_old_TypeAliasDeclaration_LoadableObjectClassRecord());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"TypeAliasDeclaration_LoadableObjectClassRecord\": {\"backCompat\": false}\n*/\ndeclare function get_current_TypeAliasDeclaration_LoadableObjectClassRecord():\n TypeOnly<current.LoadableObjectClassRecord>;\ndeclare function use_old_TypeAliasDeclaration_LoadableObjectClassRecord(\n use: TypeOnly<old.LoadableObjectClassRecord>): void;\nuse_old_TypeAliasDeclaration_LoadableObjectClassRecord(\n get_current_TypeAliasDeclaration_LoadableObjectClassRecord());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"TypeAliasDeclaration_LoadableObjectCtor\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_TypeAliasDeclaration_LoadableObjectCtor():\n TypeOnly<old.LoadableObjectCtor<any>>;\ndeclare function use_current_TypeAliasDeclaration_LoadableObjectCtor(\n use: TypeOnly<current.LoadableObjectCtor<any>>): void;\nuse_current_TypeAliasDeclaration_LoadableObjectCtor(\n get_old_TypeAliasDeclaration_LoadableObjectCtor());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"TypeAliasDeclaration_LoadableObjectCtor\": {\"backCompat\": false}\n*/\ndeclare function get_current_TypeAliasDeclaration_LoadableObjectCtor():\n TypeOnly<current.LoadableObjectCtor<any>>;\ndeclare function use_old_TypeAliasDeclaration_LoadableObjectCtor(\n use: TypeOnly<old.LoadableObjectCtor<any>>): void;\nuse_old_TypeAliasDeclaration_LoadableObjectCtor(\n get_current_TypeAliasDeclaration_LoadableObjectCtor());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"TypeAliasDeclaration_LoadableObjectRecord\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_TypeAliasDeclaration_LoadableObjectRecord():\n TypeOnly<old.LoadableObjectRecord>;\ndeclare function use_current_TypeAliasDeclaration_LoadableObjectRecord(\n use: TypeOnly<current.LoadableObjectRecord>): void;\nuse_current_TypeAliasDeclaration_LoadableObjectRecord(\n get_old_TypeAliasDeclaration_LoadableObjectRecord());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"TypeAliasDeclaration_LoadableObjectRecord\": {\"backCompat\": false}\n*/\ndeclare function get_current_TypeAliasDeclaration_LoadableObjectRecord():\n TypeOnly<current.LoadableObjectRecord>;\ndeclare function use_old_TypeAliasDeclaration_LoadableObjectRecord(\n use: TypeOnly<old.LoadableObjectRecord>): void;\nuse_old_TypeAliasDeclaration_LoadableObjectRecord(\n get_current_TypeAliasDeclaration_LoadableObjectRecord());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"TypeAliasDeclaration_MemberChangedListener\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_TypeAliasDeclaration_MemberChangedListener():\n TypeOnly<old.MemberChangedListener<any>>;\ndeclare function use_current_TypeAliasDeclaration_MemberChangedListener(\n use: TypeOnly<current.MemberChangedListener<any>>): void;\nuse_current_TypeAliasDeclaration_MemberChangedListener(\n get_old_TypeAliasDeclaration_MemberChangedListener());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"TypeAliasDeclaration_MemberChangedListener\": {\"backCompat\": false}\n*/\ndeclare function get_current_TypeAliasDeclaration_MemberChangedListener():\n TypeOnly<current.MemberChangedListener<any>>;\ndeclare function use_old_TypeAliasDeclaration_MemberChangedListener(\n use: TypeOnly<old.MemberChangedListener<any>>): void;\nuse_old_TypeAliasDeclaration_MemberChangedListener(\n get_current_TypeAliasDeclaration_MemberChangedListener());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"TypeAliasDeclaration_Myself\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_TypeAliasDeclaration_Myself():\n TypeOnly<old.Myself>;\ndeclare function use_current_TypeAliasDeclaration_Myself(\n use: TypeOnly<current.Myself>): void;\nuse_current_TypeAliasDeclaration_Myself(\n get_old_TypeAliasDeclaration_Myself());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"TypeAliasDeclaration_Myself\": {\"backCompat\": false}\n*/\ndeclare function get_current_TypeAliasDeclaration_Myself():\n TypeOnly<current.Myself>;\ndeclare function use_old_TypeAliasDeclaration_Myself(\n use: TypeOnly<old.Myself>): void;\nuse_old_TypeAliasDeclaration_Myself(\n get_current_TypeAliasDeclaration_Myself());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"RemovedTypeAliasDeclaration_SharedObjectClass\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_TypeAliasDeclaration_SharedObjectClass():\n TypeOnly<old.SharedObjectClass<any>>;\ndeclare function use_current_RemovedTypeAliasDeclaration_SharedObjectClass(\n use: TypeOnly<current.SharedObjectClass<any>>): void;\nuse_current_RemovedTypeAliasDeclaration_SharedObjectClass(\n get_old_TypeAliasDeclaration_SharedObjectClass());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"RemovedTypeAliasDeclaration_SharedObjectClass\": {\"backCompat\": false}\n*/\ndeclare function get_current_RemovedTypeAliasDeclaration_SharedObjectClass():\n TypeOnly<current.SharedObjectClass<any>>;\ndeclare function use_old_TypeAliasDeclaration_SharedObjectClass(\n use: TypeOnly<old.SharedObjectClass<any>>): void;\nuse_old_TypeAliasDeclaration_SharedObjectClass(\n get_current_RemovedTypeAliasDeclaration_SharedObjectClass());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"FunctionDeclaration_createDOProviderContainerRuntimeFactory\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_FunctionDeclaration_createDOProviderContainerRuntimeFactory():\n TypeOnly<typeof old.createDOProviderContainerRuntimeFactory>;\ndeclare function use_current_FunctionDeclaration_createDOProviderContainerRuntimeFactory(\n use: TypeOnly<typeof current.createDOProviderContainerRuntimeFactory>): void;\nuse_current_FunctionDeclaration_createDOProviderContainerRuntimeFactory(\n get_old_FunctionDeclaration_createDOProviderContainerRuntimeFactory());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"FunctionDeclaration_createDOProviderContainerRuntimeFactory\": {\"backCompat\": false}\n*/\ndeclare function get_current_FunctionDeclaration_createDOProviderContainerRuntimeFactory():\n TypeOnly<typeof current.createDOProviderContainerRuntimeFactory>;\ndeclare function use_old_FunctionDeclaration_createDOProviderContainerRuntimeFactory(\n use: TypeOnly<typeof old.createDOProviderContainerRuntimeFactory>): void;\nuse_old_FunctionDeclaration_createDOProviderContainerRuntimeFactory(\n get_current_FunctionDeclaration_createDOProviderContainerRuntimeFactory());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"FunctionDeclaration_createFluidContainer\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_FunctionDeclaration_createFluidContainer():\n TypeOnly<typeof old.createFluidContainer>;\ndeclare function use_current_FunctionDeclaration_createFluidContainer(\n use: TypeOnly<typeof current.createFluidContainer>): void;\nuse_current_FunctionDeclaration_createFluidContainer(\n get_old_FunctionDeclaration_createFluidContainer());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"FunctionDeclaration_createFluidContainer\": {\"backCompat\": false}\n*/\ndeclare function get_current_FunctionDeclaration_createFluidContainer():\n TypeOnly<typeof current.createFluidContainer>;\ndeclare function use_old_FunctionDeclaration_createFluidContainer(\n use: TypeOnly<typeof old.createFluidContainer>): void;\nuse_old_FunctionDeclaration_createFluidContainer(\n get_current_FunctionDeclaration_createFluidContainer());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"FunctionDeclaration_createServiceAudience\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_FunctionDeclaration_createServiceAudience():\n TypeOnly<typeof old.createServiceAudience>;\ndeclare function use_current_FunctionDeclaration_createServiceAudience(\n use: TypeOnly<typeof current.createServiceAudience>): void;\nuse_current_FunctionDeclaration_createServiceAudience(\n get_old_FunctionDeclaration_createServiceAudience());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"FunctionDeclaration_createServiceAudience\": {\"backCompat\": false}\n*/\ndeclare function get_current_FunctionDeclaration_createServiceAudience():\n TypeOnly<typeof current.createServiceAudience>;\ndeclare function use_old_FunctionDeclaration_createServiceAudience(\n use: TypeOnly<typeof old.createServiceAudience>): void;\nuse_old_FunctionDeclaration_createServiceAudience(\n get_current_FunctionDeclaration_createServiceAudience());\n"]}
1
+ {"version":3,"file":"validateFluidStaticPrevious.generated.js","sourceRoot":"","sources":["../../../src/test/types/validateFluidStaticPrevious.generated.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E,CAAC,CAAC;AAW9D,sDAAsD,CAClD,0DAA0D,EAAE,CAAC,CAAC;AAuBlE,qDAAqD,CACjD,iDAAiD,EAAE,CAAC,CAAC;AAWzD,iDAAiD,CAC7C,qDAAqD,EAAE,CAAC,CAAC;AAW7D,sDAAsD,CAClD,kDAAkD,EAAE,CAAC,CAAC;AAW1D,kDAAkD,CAC9C,sDAAsD,EAAE,CAAC,CAAC;AAW9D,uCAAuC,CACnC,mCAAmC,EAAE,CAAC,CAAC;AAW3C,mCAAmC,CAC/B,uCAAuC,EAAE,CAAC,CAAC;AAuB/C,uEAAuE,CACnE,mEAAmE,EAAE,CAAC,CAAC;AAW3E,mEAAmE,CAC/D,uEAAuE,EAAE,CAAC,CAAC;AAW/E,oDAAoD,CAChD,gDAAgD,EAAE,CAAC,CAAC;AAWxD,gDAAgD,CAC5C,oDAAoD,EAAE,CAAC,CAAC;AAW5D,qDAAqD,CACjD,iDAAiD,EAAE,CAAC,CAAC;AAWzD,iDAAiD,CAC7C,qDAAqD,EAAE,CAAC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n/*\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.\n * Generated by fluid-type-test-generator in @fluidframework/build-tools.\n */\nimport type * as old from \"@fluidframework/fluid-static-previous\";\nimport type * as current from \"../../index.js\";\n\n\n// See 'build-tools/src/type-test-generator/compatibility.ts' for more information.\ntype TypeOnly<T> = T extends number\n\t? number\n\t: T extends string\n\t? string\n\t: T extends boolean | bigint | symbol\n\t? T\n\t: {\n\t\t\t[P in keyof T]: TypeOnly<T[P]>;\n\t };\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"InterfaceDeclaration_ContainerSchema\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_InterfaceDeclaration_ContainerSchema():\n TypeOnly<old.ContainerSchema>;\ndeclare function use_current_InterfaceDeclaration_ContainerSchema(\n use: TypeOnly<current.ContainerSchema>): void;\nuse_current_InterfaceDeclaration_ContainerSchema(\n get_old_InterfaceDeclaration_ContainerSchema());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"InterfaceDeclaration_ContainerSchema\": {\"backCompat\": false}\n*/\ndeclare function get_current_InterfaceDeclaration_ContainerSchema():\n TypeOnly<current.ContainerSchema>;\ndeclare function use_old_InterfaceDeclaration_ContainerSchema(\n use: TypeOnly<old.ContainerSchema>): void;\nuse_old_InterfaceDeclaration_ContainerSchema(\n // @ts-expect-error compatibility expected to be broken\n get_current_InterfaceDeclaration_ContainerSchema());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"TypeAliasDeclaration_DataObjectClass\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_TypeAliasDeclaration_DataObjectClass():\n TypeOnly<old.DataObjectClass<any>>;\ndeclare function use_current_TypeAliasDeclaration_DataObjectClass(\n use: TypeOnly<current.DataObjectClass>): void;\nuse_current_TypeAliasDeclaration_DataObjectClass(\n get_old_TypeAliasDeclaration_DataObjectClass());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"TypeAliasDeclaration_DataObjectClass\": {\"backCompat\": false}\n*/\ndeclare function get_current_TypeAliasDeclaration_DataObjectClass():\n TypeOnly<current.DataObjectClass>;\ndeclare function use_old_TypeAliasDeclaration_DataObjectClass(\n use: TypeOnly<old.DataObjectClass<any>>): void;\nuse_old_TypeAliasDeclaration_DataObjectClass(\n get_current_TypeAliasDeclaration_DataObjectClass());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"InterfaceDeclaration_IConnection\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_InterfaceDeclaration_IConnection():\n TypeOnly<old.IConnection>;\ndeclare function use_current_InterfaceDeclaration_IConnection(\n use: TypeOnly<current.IConnection>): void;\nuse_current_InterfaceDeclaration_IConnection(\n get_old_InterfaceDeclaration_IConnection());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"InterfaceDeclaration_IConnection\": {\"backCompat\": false}\n*/\ndeclare function get_current_InterfaceDeclaration_IConnection():\n TypeOnly<current.IConnection>;\ndeclare function use_old_InterfaceDeclaration_IConnection(\n use: TypeOnly<old.IConnection>): void;\nuse_old_InterfaceDeclaration_IConnection(\n get_current_InterfaceDeclaration_IConnection());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"InterfaceDeclaration_IFluidContainer\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_InterfaceDeclaration_IFluidContainer():\n TypeOnly<old.IFluidContainer>;\ndeclare function use_current_InterfaceDeclaration_IFluidContainer(\n use: TypeOnly<current.IFluidContainer>): void;\nuse_current_InterfaceDeclaration_IFluidContainer(\n get_old_InterfaceDeclaration_IFluidContainer());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"InterfaceDeclaration_IFluidContainer\": {\"backCompat\": false}\n*/\ndeclare function get_current_InterfaceDeclaration_IFluidContainer():\n TypeOnly<current.IFluidContainer>;\ndeclare function use_old_InterfaceDeclaration_IFluidContainer(\n use: TypeOnly<old.IFluidContainer>): void;\nuse_old_InterfaceDeclaration_IFluidContainer(\n get_current_InterfaceDeclaration_IFluidContainer());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"InterfaceDeclaration_IFluidContainerEvents\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_InterfaceDeclaration_IFluidContainerEvents():\n TypeOnly<old.IFluidContainerEvents>;\ndeclare function use_current_InterfaceDeclaration_IFluidContainerEvents(\n use: TypeOnly<current.IFluidContainerEvents>): void;\nuse_current_InterfaceDeclaration_IFluidContainerEvents(\n get_old_InterfaceDeclaration_IFluidContainerEvents());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"InterfaceDeclaration_IFluidContainerEvents\": {\"backCompat\": false}\n*/\ndeclare function get_current_InterfaceDeclaration_IFluidContainerEvents():\n TypeOnly<current.IFluidContainerEvents>;\ndeclare function use_old_InterfaceDeclaration_IFluidContainerEvents(\n use: TypeOnly<old.IFluidContainerEvents>): void;\nuse_old_InterfaceDeclaration_IFluidContainerEvents(\n get_current_InterfaceDeclaration_IFluidContainerEvents());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"InterfaceDeclaration_IMember\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_InterfaceDeclaration_IMember():\n TypeOnly<old.IMember>;\ndeclare function use_current_InterfaceDeclaration_IMember(\n use: TypeOnly<current.IMember>): void;\nuse_current_InterfaceDeclaration_IMember(\n get_old_InterfaceDeclaration_IMember());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"InterfaceDeclaration_IMember\": {\"backCompat\": false}\n*/\ndeclare function get_current_InterfaceDeclaration_IMember():\n TypeOnly<current.IMember>;\ndeclare function use_old_InterfaceDeclaration_IMember(\n use: TypeOnly<old.IMember>): void;\nuse_old_InterfaceDeclaration_IMember(\n get_current_InterfaceDeclaration_IMember());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"InterfaceDeclaration_IProvideRootDataObject\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_InterfaceDeclaration_IProvideRootDataObject():\n TypeOnly<old.IProvideRootDataObject>;\ndeclare function use_current_InterfaceDeclaration_IProvideRootDataObject(\n use: TypeOnly<current.IProvideRootDataObject>): void;\nuse_current_InterfaceDeclaration_IProvideRootDataObject(\n get_old_InterfaceDeclaration_IProvideRootDataObject());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"InterfaceDeclaration_IProvideRootDataObject\": {\"backCompat\": false}\n*/\ndeclare function get_current_InterfaceDeclaration_IProvideRootDataObject():\n TypeOnly<current.IProvideRootDataObject>;\ndeclare function use_old_InterfaceDeclaration_IProvideRootDataObject(\n use: TypeOnly<old.IProvideRootDataObject>): void;\nuse_old_InterfaceDeclaration_IProvideRootDataObject(\n get_current_InterfaceDeclaration_IProvideRootDataObject());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"InterfaceDeclaration_IRootDataObject\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_InterfaceDeclaration_IRootDataObject():\n TypeOnly<old.IRootDataObject>;\ndeclare function use_current_InterfaceDeclaration_IRootDataObject(\n use: TypeOnly<current.IRootDataObject>): void;\nuse_current_InterfaceDeclaration_IRootDataObject(\n get_old_InterfaceDeclaration_IRootDataObject());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"InterfaceDeclaration_IRootDataObject\": {\"backCompat\": false}\n*/\ndeclare function get_current_InterfaceDeclaration_IRootDataObject():\n TypeOnly<current.IRootDataObject>;\ndeclare function use_old_InterfaceDeclaration_IRootDataObject(\n use: TypeOnly<old.IRootDataObject>): void;\nuse_old_InterfaceDeclaration_IRootDataObject(\n get_current_InterfaceDeclaration_IRootDataObject());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"InterfaceDeclaration_IServiceAudience\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_InterfaceDeclaration_IServiceAudience():\n TypeOnly<old.IServiceAudience<any>>;\ndeclare function use_current_InterfaceDeclaration_IServiceAudience(\n use: TypeOnly<current.IServiceAudience<any>>): void;\nuse_current_InterfaceDeclaration_IServiceAudience(\n get_old_InterfaceDeclaration_IServiceAudience());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"InterfaceDeclaration_IServiceAudience\": {\"backCompat\": false}\n*/\ndeclare function get_current_InterfaceDeclaration_IServiceAudience():\n TypeOnly<current.IServiceAudience<any>>;\ndeclare function use_old_InterfaceDeclaration_IServiceAudience(\n use: TypeOnly<old.IServiceAudience<any>>): void;\nuse_old_InterfaceDeclaration_IServiceAudience(\n get_current_InterfaceDeclaration_IServiceAudience());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"InterfaceDeclaration_IServiceAudienceEvents\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_InterfaceDeclaration_IServiceAudienceEvents():\n TypeOnly<old.IServiceAudienceEvents<any>>;\ndeclare function use_current_InterfaceDeclaration_IServiceAudienceEvents(\n use: TypeOnly<current.IServiceAudienceEvents<any>>): void;\nuse_current_InterfaceDeclaration_IServiceAudienceEvents(\n get_old_InterfaceDeclaration_IServiceAudienceEvents());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"InterfaceDeclaration_IServiceAudienceEvents\": {\"backCompat\": false}\n*/\ndeclare function get_current_InterfaceDeclaration_IServiceAudienceEvents():\n TypeOnly<current.IServiceAudienceEvents<any>>;\ndeclare function use_old_InterfaceDeclaration_IServiceAudienceEvents(\n use: TypeOnly<old.IServiceAudienceEvents<any>>): void;\nuse_old_InterfaceDeclaration_IServiceAudienceEvents(\n get_current_InterfaceDeclaration_IServiceAudienceEvents());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"TypeAliasDeclaration_InitialObjects\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_TypeAliasDeclaration_InitialObjects():\n TypeOnly<old.InitialObjects<any>>;\ndeclare function use_current_TypeAliasDeclaration_InitialObjects(\n use: TypeOnly<current.InitialObjects<any>>): void;\nuse_current_TypeAliasDeclaration_InitialObjects(\n get_old_TypeAliasDeclaration_InitialObjects());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"TypeAliasDeclaration_InitialObjects\": {\"backCompat\": false}\n*/\ndeclare function get_current_TypeAliasDeclaration_InitialObjects():\n TypeOnly<current.InitialObjects<any>>;\ndeclare function use_old_TypeAliasDeclaration_InitialObjects(\n use: TypeOnly<old.InitialObjects<any>>): void;\nuse_old_TypeAliasDeclaration_InitialObjects(\n get_current_TypeAliasDeclaration_InitialObjects());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"TypeAliasDeclaration_LoadableObjectClass\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_TypeAliasDeclaration_LoadableObjectClass():\n TypeOnly<old.LoadableObjectClass<any>>;\ndeclare function use_current_TypeAliasDeclaration_LoadableObjectClass(\n use: TypeOnly<current.LoadableObjectClass>): void;\nuse_current_TypeAliasDeclaration_LoadableObjectClass(\n get_old_TypeAliasDeclaration_LoadableObjectClass());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"TypeAliasDeclaration_LoadableObjectClass\": {\"backCompat\": false}\n*/\ndeclare function get_current_TypeAliasDeclaration_LoadableObjectClass():\n TypeOnly<current.LoadableObjectClass>;\ndeclare function use_old_TypeAliasDeclaration_LoadableObjectClass(\n use: TypeOnly<old.LoadableObjectClass<any>>): void;\nuse_old_TypeAliasDeclaration_LoadableObjectClass(\n get_current_TypeAliasDeclaration_LoadableObjectClass());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"TypeAliasDeclaration_LoadableObjectClassRecord\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_TypeAliasDeclaration_LoadableObjectClassRecord():\n TypeOnly<old.LoadableObjectClassRecord>;\ndeclare function use_current_TypeAliasDeclaration_LoadableObjectClassRecord(\n use: TypeOnly<current.LoadableObjectClassRecord>): void;\nuse_current_TypeAliasDeclaration_LoadableObjectClassRecord(\n get_old_TypeAliasDeclaration_LoadableObjectClassRecord());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"TypeAliasDeclaration_LoadableObjectClassRecord\": {\"backCompat\": false}\n*/\ndeclare function get_current_TypeAliasDeclaration_LoadableObjectClassRecord():\n TypeOnly<current.LoadableObjectClassRecord>;\ndeclare function use_old_TypeAliasDeclaration_LoadableObjectClassRecord(\n use: TypeOnly<old.LoadableObjectClassRecord>): void;\nuse_old_TypeAliasDeclaration_LoadableObjectClassRecord(\n get_current_TypeAliasDeclaration_LoadableObjectClassRecord());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"RemovedTypeAliasDeclaration_LoadableObjectCtor\": {\"forwardCompat\": false}\n*/\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"RemovedTypeAliasDeclaration_LoadableObjectCtor\": {\"backCompat\": false}\n*/\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"TypeAliasDeclaration_LoadableObjectRecord\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_TypeAliasDeclaration_LoadableObjectRecord():\n TypeOnly<old.LoadableObjectRecord>;\ndeclare function use_current_TypeAliasDeclaration_LoadableObjectRecord(\n use: TypeOnly<current.LoadableObjectRecord>): void;\nuse_current_TypeAliasDeclaration_LoadableObjectRecord(\n get_old_TypeAliasDeclaration_LoadableObjectRecord());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"TypeAliasDeclaration_LoadableObjectRecord\": {\"backCompat\": false}\n*/\ndeclare function get_current_TypeAliasDeclaration_LoadableObjectRecord():\n TypeOnly<current.LoadableObjectRecord>;\ndeclare function use_old_TypeAliasDeclaration_LoadableObjectRecord(\n use: TypeOnly<old.LoadableObjectRecord>): void;\nuse_old_TypeAliasDeclaration_LoadableObjectRecord(\n get_current_TypeAliasDeclaration_LoadableObjectRecord());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"TypeAliasDeclaration_MemberChangedListener\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_TypeAliasDeclaration_MemberChangedListener():\n TypeOnly<old.MemberChangedListener<any>>;\ndeclare function use_current_TypeAliasDeclaration_MemberChangedListener(\n use: TypeOnly<current.MemberChangedListener<any>>): void;\nuse_current_TypeAliasDeclaration_MemberChangedListener(\n get_old_TypeAliasDeclaration_MemberChangedListener());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"TypeAliasDeclaration_MemberChangedListener\": {\"backCompat\": false}\n*/\ndeclare function get_current_TypeAliasDeclaration_MemberChangedListener():\n TypeOnly<current.MemberChangedListener<any>>;\ndeclare function use_old_TypeAliasDeclaration_MemberChangedListener(\n use: TypeOnly<old.MemberChangedListener<any>>): void;\nuse_old_TypeAliasDeclaration_MemberChangedListener(\n get_current_TypeAliasDeclaration_MemberChangedListener());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"TypeAliasDeclaration_Myself\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_TypeAliasDeclaration_Myself():\n TypeOnly<old.Myself>;\ndeclare function use_current_TypeAliasDeclaration_Myself(\n use: TypeOnly<current.Myself>): void;\nuse_current_TypeAliasDeclaration_Myself(\n get_old_TypeAliasDeclaration_Myself());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"TypeAliasDeclaration_Myself\": {\"backCompat\": false}\n*/\ndeclare function get_current_TypeAliasDeclaration_Myself():\n TypeOnly<current.Myself>;\ndeclare function use_old_TypeAliasDeclaration_Myself(\n use: TypeOnly<old.Myself>): void;\nuse_old_TypeAliasDeclaration_Myself(\n get_current_TypeAliasDeclaration_Myself());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"RemovedTypeAliasDeclaration_SharedObjectClass\": {\"forwardCompat\": false}\n*/\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"RemovedTypeAliasDeclaration_SharedObjectClass\": {\"backCompat\": false}\n*/\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"FunctionDeclaration_createDOProviderContainerRuntimeFactory\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_FunctionDeclaration_createDOProviderContainerRuntimeFactory():\n TypeOnly<typeof old.createDOProviderContainerRuntimeFactory>;\ndeclare function use_current_FunctionDeclaration_createDOProviderContainerRuntimeFactory(\n use: TypeOnly<typeof current.createDOProviderContainerRuntimeFactory>): void;\nuse_current_FunctionDeclaration_createDOProviderContainerRuntimeFactory(\n get_old_FunctionDeclaration_createDOProviderContainerRuntimeFactory());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"FunctionDeclaration_createDOProviderContainerRuntimeFactory\": {\"backCompat\": false}\n*/\ndeclare function get_current_FunctionDeclaration_createDOProviderContainerRuntimeFactory():\n TypeOnly<typeof current.createDOProviderContainerRuntimeFactory>;\ndeclare function use_old_FunctionDeclaration_createDOProviderContainerRuntimeFactory(\n use: TypeOnly<typeof old.createDOProviderContainerRuntimeFactory>): void;\nuse_old_FunctionDeclaration_createDOProviderContainerRuntimeFactory(\n get_current_FunctionDeclaration_createDOProviderContainerRuntimeFactory());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"FunctionDeclaration_createFluidContainer\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_FunctionDeclaration_createFluidContainer():\n TypeOnly<typeof old.createFluidContainer>;\ndeclare function use_current_FunctionDeclaration_createFluidContainer(\n use: TypeOnly<typeof current.createFluidContainer>): void;\nuse_current_FunctionDeclaration_createFluidContainer(\n get_old_FunctionDeclaration_createFluidContainer());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"FunctionDeclaration_createFluidContainer\": {\"backCompat\": false}\n*/\ndeclare function get_current_FunctionDeclaration_createFluidContainer():\n TypeOnly<typeof current.createFluidContainer>;\ndeclare function use_old_FunctionDeclaration_createFluidContainer(\n use: TypeOnly<typeof old.createFluidContainer>): void;\nuse_old_FunctionDeclaration_createFluidContainer(\n get_current_FunctionDeclaration_createFluidContainer());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"FunctionDeclaration_createServiceAudience\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_FunctionDeclaration_createServiceAudience():\n TypeOnly<typeof old.createServiceAudience>;\ndeclare function use_current_FunctionDeclaration_createServiceAudience(\n use: TypeOnly<typeof current.createServiceAudience>): void;\nuse_current_FunctionDeclaration_createServiceAudience(\n get_old_FunctionDeclaration_createServiceAudience());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"FunctionDeclaration_createServiceAudience\": {\"backCompat\": false}\n*/\ndeclare function get_current_FunctionDeclaration_createServiceAudience():\n TypeOnly<typeof current.createServiceAudience>;\ndeclare function use_old_FunctionDeclaration_createServiceAudience(\n use: TypeOnly<typeof old.createServiceAudience>): void;\nuse_old_FunctionDeclaration_createServiceAudience(\n get_current_FunctionDeclaration_createServiceAudience());\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"utils.spec.js","sourceRoot":"","sources":["../../src/test/utils.spec.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,IAAI,MAAM,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AACzE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAC5D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AG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;QACrD,MAAM,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,cAAc,CAAC,IAAI,EAAE,mCAAmC,CAAC,CAAC;IACxF,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { strict as assert } from \"node:assert\";\nimport { DataObject, DataObjectFactory } from \"@fluidframework/aqueduct\";\nimport { MapFactory, SharedMap } from \"@fluidframework/map\";\nimport { SharedString, SharedStringFactory } from \"@fluidframework/sequence\";\nimport { parseDataObjectsFromSharedObjects } from \"../utils.js\";\nimport { type ContainerSchema } from \"../types.js\";\n\nclass TestDataObject extends DataObject {\n\tpublic static readonly Name = \"@fluid-example/test-data-object\";\n\n\tpublic static readonly factory = new DataObjectFactory(\n\t\tTestDataObject.Name,\n\t\tTestDataObject,\n\t\t[],\n\t\t{},\n\t);\n}\n\ndescribe(\"parseDataObjectsFromSharedObjects\", () => {\n\tit(\"should be able to handle basic DDS types\", () => {\n\t\tconst schema = {\n\t\t\tinitialObjects: {\n\t\t\t\tmap: SharedMap,\n\t\t\t\ttext: SharedString,\n\t\t\t},\n\t\t} satisfies ContainerSchema;\n\t\tconst [registryEntries, sharedObjects] = parseDataObjectsFromSharedObjects(schema);\n\n\t\tassert.strictEqual(registryEntries.length, 0, \"We should have no registry entries\");\n\t\tassert.strictEqual(sharedObjects.length, 2, \"We should have 2 shared objects\");\n\n\t\tconst types = sharedObjects.map((item) => item.type);\n\t\tassert.strictEqual(types[0], MapFactory.Type, \"SharedMap should be included\");\n\t\tassert.strictEqual(types[1], SharedStringFactory.Type, \"SharedString should be included\");\n\t});\n\n\tit(\"should be able to handle dup DDS types\", () => {\n\t\tconst schema = {\n\t\t\tinitialObjects: {\n\t\t\t\tmap: SharedMap,\n\t\t\t\ttext: SharedString,\n\t\t\t\ttext2: SharedString,\n\t\t\t},\n\t\t} satisfies ContainerSchema;\n\t\tconst [registryEntries, sharedObjects] = parseDataObjectsFromSharedObjects(schema);\n\n\t\tassert.strictEqual(registryEntries.length, 0, \"We should have no registry entries\");\n\t\tassert.strictEqual(sharedObjects.length, 2, \"We should have 2 shared objects\");\n\n\t\tconst types = sharedObjects.map((item) => item.type);\n\t\tassert.strictEqual(types[0], MapFactory.Type, \"SharedMap should be included\");\n\t\tassert.strictEqual(types[1], SharedStringFactory.Type, \"SharedString should be included\");\n\t});\n\n\tit(\"should be able to handle Data Objects\", () => {\n\t\tconst schema = {\n\t\t\tinitialObjects: {\n\t\t\t\tmap: SharedMap,\n\t\t\t\tdo: TestDataObject,\n\t\t\t},\n\t\t} satisfies ContainerSchema;\n\t\tconst [registryEntries, sharedObjects] = parseDataObjectsFromSharedObjects(schema);\n\n\t\tassert.strictEqual(registryEntries.length, 1, \"We should have one registry entry\");\n\t\tassert.strictEqual(sharedObjects.length, 1, \"We should have 1 shared object\");\n\n\t\tconst types = registryEntries.map((item) => item[0]);\n\t\tassert.strictEqual(types[0], TestDataObject.Name, \"TestDataObject should be included\");\n\t});\n\n\tit(\"should be able to dedup Data Objects\", () => {\n\t\tconst schema = {\n\t\t\tinitialObjects: {\n\t\t\t\tmap: SharedMap,\n\t\t\t\tdo: TestDataObject,\n\t\t\t\tdo2: TestDataObject,\n\t\t\t},\n\t\t} satisfies ContainerSchema;\n\t\tconst [registryEntries, sharedObjects] = parseDataObjectsFromSharedObjects(schema);\n\n\t\tassert.strictEqual(registryEntries.length, 1, \"We should have one registry entry\");\n\t\tassert.strictEqual(sharedObjects.length, 1, \"We should have 1 shared object\");\n\n\t\tconst types = registryEntries.map((item) => item[0]);\n\t\tassert.strictEqual(types[0], TestDataObject.Name, \"TestDataObject should be included\");\n\t});\n\n\tit(\"should be able to dedup Data Objects even if passed as dynamic types\", () => {\n\t\tconst schema: ContainerSchema = {\n\t\t\tinitialObjects: {\n\t\t\t\tmap: SharedMap,\n\t\t\t\tdo: TestDataObject,\n\t\t\t},\n\t\t\tdynamicObjectTypes: [SharedString, TestDataObject],\n\t\t} satisfies ContainerSchema;\n\t\tconst [registryEntries, sharedObjects] = parseDataObjectsFromSharedObjects(schema);\n\n\t\tassert.strictEqual(registryEntries.length, 1, \"We should have one registry entry\");\n\t\tassert.strictEqual(sharedObjects.length, 2, \"We should have 2 shared object\");\n\n\t\tconst types = registryEntries.map((item) => item[0]);\n\t\tassert.strictEqual(types[0], TestDataObject.Name, \"TestDataObject should be included\");\n\t});\n});\n"]}
1
+ {"version":3,"file":"utils.spec.js","sourceRoot":"","sources":["../../src/test/utils.spec.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,IAAI,MAAM,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AACzE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAE7E,OAAO,EAAE,iCAAiC,EAAE,MAAM,aAAa,CAAC;AAEhE,MAAM,cAAe,SAAQ,UAAU;;AACf,mBAAI,GAAG,iCAAiC,CAAC;AAEzC,sBAAO,GAAG,IAAI,iBAAiB,CACrD,cAAc,CAAC,IAAI,EACnB,cAAc,EACd,EAAE,EACF,EAAE,CACF,CAAC;AAGH,QAAQ,CAAC,mCAAmC,EAAE,GAAG,EAAE;IAClD,EAAE,CAAC,0CAA0C,EAAE,GAAG,EAAE;QACnD,MAAM,MAAM,GAAG;YACd,cAAc,EAAE;gBACf,GAAG,EAAE,SAAS;gBACd,IAAI,EAAE,YAAY;aAClB;SACyB,CAAC;QAC5B,MAAM,CAAC,eAAe,EAAE,aAAa,CAAC,GAAG,iCAAiC,CAAC,MAAM,CAAC,CAAC;QAEnF,MAAM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AAC,CAAC,CAAC,CAAC,CAAC;QACrD,MAAM,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,cAAc,CAAC,IAAI,EAAE,mCAAmC,CAAC,CAAC;IACxF,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,sEAAsE,EAAE,GAAG,EAAE;QAC/E,MAAM,MAAM,GAAoB;YAC/B,cAAc,EAAE;gBACf,GAAG,EAAE,SAAS;gBACd,EAAE,EAAE,cAAc;aAClB;YACD,kBAAkB,EAAE,CAAC,YAAY,EAAE,cAAc,CAAC;SACxB,CAAC;QAC5B,MAAM,CAAC,eAAe,EAAE,aAAa,CAAC,GAAG,iCAAiC,CAAC,MAAM,CAAC,CAAC;QAEnF,MAAM,CAAC,WAAW,CAAC,eAAe,CAAC,MAAM,EAAE,CAAC,EAAE,mCAAmC,CAAC,CAAC;QACnF,MAAM,CAAC,WAAW,CAAC,aAAa,CAAC,MAAM,EAAE,CAAC,EAAE,gCAAgC,CAAC,CAAC;QAE9E,MAAM,KAAK,GAAG,eAAe,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;QACrD,MAAM,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,cAAc,CAAC,IAAI,EAAE,mCAAmC,CAAC,CAAC;IACxF,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { strict as assert } from \"node:assert\";\nimport { DataObject, DataObjectFactory } from \"@fluidframework/aqueduct\";\nimport { MapFactory, SharedMap } from \"@fluidframework/map\";\nimport { SharedString, SharedStringFactory } from \"@fluidframework/sequence\";\nimport { type ContainerSchema } from \"../types.js\";\nimport { parseDataObjectsFromSharedObjects } from \"../utils.js\";\n\nclass TestDataObject extends DataObject {\n\tpublic static readonly Name = \"@fluid-example/test-data-object\";\n\n\tpublic static readonly factory = new DataObjectFactory(\n\t\tTestDataObject.Name,\n\t\tTestDataObject,\n\t\t[],\n\t\t{},\n\t);\n}\n\ndescribe(\"parseDataObjectsFromSharedObjects\", () => {\n\tit(\"should be able to handle basic DDS types\", () => {\n\t\tconst schema = {\n\t\t\tinitialObjects: {\n\t\t\t\tmap: SharedMap,\n\t\t\t\ttext: SharedString,\n\t\t\t},\n\t\t} satisfies ContainerSchema;\n\t\tconst [registryEntries, sharedObjects] = parseDataObjectsFromSharedObjects(schema);\n\n\t\tassert.strictEqual(registryEntries.length, 0, \"We should have no registry entries\");\n\t\tassert.strictEqual(sharedObjects.length, 2, \"We should have 2 shared objects\");\n\n\t\tconst types = sharedObjects.map((item) => item.type);\n\t\tassert.strictEqual(types[0], MapFactory.Type, \"SharedMap should be included\");\n\t\tassert.strictEqual(types[1], SharedStringFactory.Type, \"SharedString should be included\");\n\t});\n\n\tit(\"should be able to handle dup DDS types\", () => {\n\t\tconst schema = {\n\t\t\tinitialObjects: {\n\t\t\t\tmap: SharedMap,\n\t\t\t\ttext: SharedString,\n\t\t\t\ttext2: SharedString,\n\t\t\t},\n\t\t} satisfies ContainerSchema;\n\t\tconst [registryEntries, sharedObjects] = parseDataObjectsFromSharedObjects(schema);\n\n\t\tassert.strictEqual(registryEntries.length, 0, \"We should have no registry entries\");\n\t\tassert.strictEqual(sharedObjects.length, 2, \"We should have 2 shared objects\");\n\n\t\tconst types = sharedObjects.map((item) => item.type);\n\t\tassert.strictEqual(types[0], MapFactory.Type, \"SharedMap should be included\");\n\t\tassert.strictEqual(types[1], SharedStringFactory.Type, \"SharedString should be included\");\n\t});\n\n\tit(\"should be able to handle Data Objects\", () => {\n\t\tconst schema = {\n\t\t\tinitialObjects: {\n\t\t\t\tmap: SharedMap,\n\t\t\t\tdo: TestDataObject,\n\t\t\t},\n\t\t} satisfies ContainerSchema;\n\t\tconst [registryEntries, sharedObjects] = parseDataObjectsFromSharedObjects(schema);\n\n\t\tassert.strictEqual(registryEntries.length, 1, \"We should have one registry entry\");\n\t\tassert.strictEqual(sharedObjects.length, 1, \"We should have 1 shared object\");\n\n\t\tconst types = registryEntries.map((item) => item[0]);\n\t\tassert.strictEqual(types[0], TestDataObject.Name, \"TestDataObject should be included\");\n\t});\n\n\tit(\"should be able to dedup Data Objects\", () => {\n\t\tconst schema = {\n\t\t\tinitialObjects: {\n\t\t\t\tmap: SharedMap,\n\t\t\t\tdo: TestDataObject,\n\t\t\t\tdo2: TestDataObject,\n\t\t\t},\n\t\t} satisfies ContainerSchema;\n\t\tconst [registryEntries, sharedObjects] = parseDataObjectsFromSharedObjects(schema);\n\n\t\tassert.strictEqual(registryEntries.length, 1, \"We should have one registry entry\");\n\t\tassert.strictEqual(sharedObjects.length, 1, \"We should have 1 shared object\");\n\n\t\tconst types = registryEntries.map((item) => item[0]);\n\t\tassert.strictEqual(types[0], TestDataObject.Name, \"TestDataObject should be included\");\n\t});\n\n\tit(\"should be able to dedup Data Objects even if passed as dynamic types\", () => {\n\t\tconst schema: ContainerSchema = {\n\t\t\tinitialObjects: {\n\t\t\t\tmap: SharedMap,\n\t\t\t\tdo: TestDataObject,\n\t\t\t},\n\t\t\tdynamicObjectTypes: [SharedString, TestDataObject],\n\t\t} satisfies ContainerSchema;\n\t\tconst [registryEntries, sharedObjects] = parseDataObjectsFromSharedObjects(schema);\n\n\t\tassert.strictEqual(registryEntries.length, 1, \"We should have one registry entry\");\n\t\tassert.strictEqual(sharedObjects.length, 2, \"We should have 2 shared object\");\n\n\t\tconst types = registryEntries.map((item) => item[0]);\n\t\tassert.strictEqual(types[0], TestDataObject.Name, \"TestDataObject should be included\");\n\t});\n});\n"]}
package/lib/types.d.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
  import { type IEvent, type IEventProvider, type IFluidLoadable } from "@fluidframework/core-interfaces";
6
- import { type IChannelFactory } from "@fluidframework/datastore-definitions";
6
+ import { type ISharedObjectKind } from "@fluidframework/shared-object-base";
7
7
  /**
8
8
  * A mapping of string identifiers to instantiated `DataObject`s or `SharedObject`s.
9
9
  * @internal
@@ -25,10 +25,10 @@ export type LoadableObjectClassRecord = Record<string, LoadableObjectClass>;
25
25
  * There are some edge cases in TypeScript where the order of the members in a union matter.
26
26
  * Once such edge case is when multiple members of a generic union partially match, and the type parameter is being inferred.
27
27
  * In this case, its better to have the desired match and/or the simpler type first.
28
- * In this case placing SharedObjectClass fixed one usage and didn't break anything, and generally seems more likely to work than the reverse, so this is the order being used.
28
+ * In this case placing ISharedObjectKind fixed one usage and didn't break anything, and generally seems more likely to work than the reverse, so this is the order being used.
29
29
  * This is likely (a bug in TypeScript)[https://github.com/microsoft/TypeScript/issues/45809].
30
30
  */
31
- export type LoadableObjectClass<T extends IFluidLoadable = IFluidLoadable> = SharedObjectClass<T> | DataObjectClass<T>;
31
+ export type LoadableObjectClass<T extends IFluidLoadable = IFluidLoadable> = ISharedObjectKind<T> | DataObjectClass<T>;
32
32
  /**
33
33
  * A class that has a factory that can create a `DataObject` and a
34
34
  * constructor that will return the type of the `DataObject`.
@@ -36,30 +36,11 @@ export type LoadableObjectClass<T extends IFluidLoadable = IFluidLoadable> = Sha
36
36
  * @typeParam T - The class of the `DataObject`.
37
37
  * @public
38
38
  */
39
- export type DataObjectClass<T extends IFluidLoadable> = {
39
+ export type DataObjectClass<T extends IFluidLoadable = IFluidLoadable> = {
40
40
  readonly factory: {
41
41
  IFluidDataStoreFactory: DataObjectClass<T>["factory"];
42
42
  };
43
- } & LoadableObjectCtor<T>;
44
- /**
45
- * A factory that produces a factory that can create a DDSes (`SharedObject`s).
46
- *
47
- * @typeParam T - The class of the `SharedObject`.
48
- * @public
49
- */
50
- export interface SharedObjectClass<T extends IFluidLoadable> {
51
- /**
52
- * Gets the factory this factory is a wrapper for.
53
- */
54
- readonly getFactory: () => IChannelFactory<T>;
55
- }
56
- /**
57
- * An object with a constructor that will return an {@link @fluidframework/core-interfaces#IFluidLoadable}.
58
- *
59
- * @typeParam T - The class of the loadable object.
60
- * @public
61
- */
62
- export type LoadableObjectCtor<T extends IFluidLoadable> = new (...args: any[]) => T;
43
+ } & (new (...args: any[]) => T);
63
44
  /**
64
45
  * Represents properties that can be attached to a container.
65
46
  * @public
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,KAAK,MAAM,EACX,KAAK,cAAc,EACnB,KAAK,cAAc,EACnB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,uCAAuC,CAAC;AAE7E;;;GAGG;AACH,MAAM,MAAM,oBAAoB,GAAG,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;AAElE;;;;GAIG;AACH,MAAM,MAAM,yBAAyB,GAAG,MAAM,CAAC,MAAM,EAAE,mBAAmB,CAAC,CAAC;AAE5E;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,mBAAmB,CAAC,CAAC,SAAS,cAAc,GAAG,cAAc,IACtE,iBAAiB,CAAC,CAAC,CAAC,GACpB,eAAe,CAAC,CAAC,CAAC,CAAC;AAEtB;;;;;;GAMG;AACH,MAAM,MAAM,eAAe,CAAC,CAAC,SAAS,cAAc,IAAI;IACvD,QAAQ,CAAC,OAAO,EAAE;QAAE,sBAAsB,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAA;KAAE,CAAC;CAC5E,GAAG,kBAAkB,CAAC,CAAC,CAAC,CAAC;AAE1B;;;;;GAKG;AACH,MAAM,WAAW,iBAAiB,CAAC,CAAC,SAAS,cAAc;IAC1D;;OAEG;IACH,QAAQ,CAAC,UAAU,EAAE,MAAM,eAAe,CAAC,CAAC,CAAC,CAAC;CAC9C;AAED;;;;;GAKG;AAEH,MAAM,MAAM,kBAAkB,CAAC,CAAC,SAAS,cAAc,IAAI,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,KAA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