@fluidframework/container-definitions 2.0.0-dev.7.4.0.215930 → 2.0.0-dev.7.4.0.217212

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 (67) hide show
  1. package/api-extractor-lint.json +13 -0
  2. package/api-report/container-definitions.api.md +51 -53
  3. package/dist/audience.d.ts +2 -2
  4. package/dist/audience.js.map +1 -1
  5. package/dist/browserPackage.d.ts +3 -3
  6. package/dist/browserPackage.js +1 -1
  7. package/dist/browserPackage.js.map +1 -1
  8. package/dist/container-definitions-alpha.d.ts +57 -310
  9. package/dist/container-definitions-beta.d.ts +72 -1366
  10. package/dist/container-definitions-public.d.ts +72 -1366
  11. package/dist/container-definitions-untrimmed.d.ts +55 -55
  12. package/dist/deltas.d.ts +7 -7
  13. package/dist/deltas.js.map +1 -1
  14. package/dist/error.d.ts +5 -6
  15. package/dist/error.d.ts.map +1 -1
  16. package/dist/error.js +2 -2
  17. package/dist/error.js.map +1 -1
  18. package/dist/fluidModule.d.ts +1 -1
  19. package/dist/fluidModule.js.map +1 -1
  20. package/dist/fluidPackage.d.ts +9 -9
  21. package/dist/fluidPackage.js +3 -3
  22. package/dist/fluidPackage.js.map +1 -1
  23. package/dist/loader.d.ts +21 -18
  24. package/dist/loader.d.ts.map +1 -1
  25. package/dist/loader.js +1 -1
  26. package/dist/loader.js.map +1 -1
  27. package/dist/runtime.d.ts +7 -9
  28. package/dist/runtime.d.ts.map +1 -1
  29. package/dist/runtime.js +2 -2
  30. package/dist/runtime.js.map +1 -1
  31. package/lib/audience.d.ts +2 -2
  32. package/lib/audience.js.map +1 -1
  33. package/lib/browserPackage.d.ts +3 -3
  34. package/lib/browserPackage.js +1 -1
  35. package/lib/browserPackage.js.map +1 -1
  36. package/lib/container-definitions-alpha.d.ts +57 -310
  37. package/lib/container-definitions-beta.d.ts +72 -1366
  38. package/lib/container-definitions-public.d.ts +72 -1366
  39. package/lib/container-definitions-untrimmed.d.ts +55 -55
  40. package/lib/deltas.d.ts +7 -7
  41. package/lib/deltas.js.map +1 -1
  42. package/lib/error.d.ts +5 -6
  43. package/lib/error.d.ts.map +1 -1
  44. package/lib/error.js +2 -2
  45. package/lib/error.js.map +1 -1
  46. package/lib/fluidModule.d.ts +1 -1
  47. package/lib/fluidModule.js.map +1 -1
  48. package/lib/fluidPackage.d.ts +9 -9
  49. package/lib/fluidPackage.js +3 -3
  50. package/lib/fluidPackage.js.map +1 -1
  51. package/lib/loader.d.ts +21 -18
  52. package/lib/loader.d.ts.map +1 -1
  53. package/lib/loader.js +1 -1
  54. package/lib/loader.js.map +1 -1
  55. package/lib/runtime.d.ts +7 -9
  56. package/lib/runtime.d.ts.map +1 -1
  57. package/lib/runtime.js +2 -2
  58. package/lib/runtime.js.map +1 -1
  59. package/package.json +5 -4
  60. package/src/audience.ts +2 -2
  61. package/src/browserPackage.ts +3 -3
  62. package/src/deltas.ts +7 -7
  63. package/src/error.ts +5 -6
  64. package/src/fluidModule.ts +1 -1
  65. package/src/fluidPackage.ts +9 -9
  66. package/src/loader.ts +21 -18
  67. package/src/runtime.ts +7 -9
@@ -1 +1 @@
1
- {"version":3,"file":"runtime.js","sourceRoot":"","sources":["../src/runtime.ts"],"names":[],"mappings":"AAAA;;;GAGG;AA4BH;;;;GAIG;AACH,MAAM,CAAN,IAAY,WAiBX;AAjBD,WAAY,WAAW;IACtB;;;OAGG;IACH,oCAAqB,CAAA;IAErB;;OAEG;IACH,sCAAuB,CAAA;IAEvB;;;OAGG;IACH,oCAAqB,CAAA;AACtB,CAAC,EAjBW,WAAW,KAAX,WAAW,QAiBtB;AA0KD;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAAiC,iBAAiB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport {\n\tITelemetryBaseLogger,\n\tIDisposable,\n\tFluidObject,\n\tIRequest,\n\tIResponse,\n} from \"@fluidframework/core-interfaces\";\n\nimport { IDocumentStorageService } from \"@fluidframework/driver-definitions\";\nimport {\n\tIClientDetails,\n\tISequencedDocumentMessage,\n\tISnapshotTree,\n\tMessageType,\n\tISummaryTree,\n\tIVersion,\n\tIDocumentMessage,\n\tIQuorumClients,\n\tISummaryContent,\n} from \"@fluidframework/protocol-definitions\";\nimport { IAudience } from \"./audience\";\nimport { IDeltaManager } from \"./deltas\";\nimport { ICriticalContainerError } from \"./error\";\nimport { ILoader, ILoaderOptions, ISnapshotTreeWithBlobContents } from \"./loader\";\nimport { IFluidCodeDetails } from \"./fluidPackage\";\n\n/**\n * The attachment state of some Fluid data (e.g. a container or data store), denoting whether it is uploaded to the\n * service. The transition from detached to attached state is a one-way transition.\n * @public\n */\nexport enum AttachState {\n\t/**\n\t * In detached state, the data is only present on the local client's machine. It has not yet been uploaded\n\t * to the service.\n\t */\n\tDetached = \"Detached\",\n\n\t/**\n\t * In attaching state, the data has started the upload to the service, but has not yet completed.\n\t */\n\tAttaching = \"Attaching\",\n\n\t/**\n\t * In attached state, the data has completed upload to the service. It can be accessed by other clients after\n\t * reaching attached state.\n\t */\n\tAttached = \"Attached\",\n}\n\n/**\n * The IRuntime represents an instantiation of a code package within a Container.\n * Primarily held by the ContainerContext to be able to interact with the running instance of the Container.\n * @public\n */\nexport interface IRuntime extends IDisposable {\n\t/**\n\t * Executes a request against the runtime\n\t * @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the \"entryPoint\" pattern. Refer to Removing-IFluidRouter.md\n\t */\n\trequest(request: IRequest): Promise<IResponse>;\n\n\t/**\n\t * Notifies the runtime of a change in the connection state\n\t */\n\tsetConnectionState(connected: boolean, clientId?: string);\n\n\t/**\n\t * Processes the given op (message)\n\t */\n\tprocess(message: ISequencedDocumentMessage, local: boolean);\n\n\t/**\n\t * Processes the given signal\n\t */\n\t// TODO: use `unknown` instead (API breaking)\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\tprocessSignal(message: any, local: boolean);\n\n\t/**\n\t * Create a summary. Used when attaching or serializing a detached container.\n\t *\n\t * @param blobRedirectTable - A table passed during the attach process. While detached, blob upload is supported\n\t * using IDs generated locally. After attach, these IDs cannot be used, so this table maps the old local IDs to the\n\t * new storage IDs so requests can be redirected.\n\t */\n\tcreateSummary(blobRedirectTable?: Map<string, string>): ISummaryTree;\n\n\t/**\n\t * Propagate the container state when container is attaching or attached.\n\t * @param attachState - State of the container.\n\t */\n\tsetAttachState(attachState: AttachState.Attaching | AttachState.Attached): void;\n\n\t/**\n\t * Get pending local state in a serializable format to be given back to a newly loaded container\n\t * @alpha\n\t * {@link https://github.com/microsoft/FluidFramework/packages/tree/main/loader/container-loader/closeAndGetPendingLocalState.md}\n\t */\n\tgetPendingLocalState(props?: IGetPendingLocalStateProps): unknown;\n\n\t/**\n\t * Notify runtime that container is moving to \"Attaching\" state\n\t * @param snapshot - snapshot created at attach time\n\t * @deprecated not necessary after op replay moved to Container\n\t */\n\tnotifyAttaching(snapshot: ISnapshotTreeWithBlobContents): void;\n\n\t/**\n\t * Notify runtime that we have processed a saved message, so that it can do async work (applying\n\t * stashed ops) after having processed it.\n\t */\n\tnotifyOpReplay?(message: ISequencedDocumentMessage): Promise<void>;\n\n\t/**\n\t * Exposes the entryPoint for the container runtime.\n\t * Use this as the primary way of getting access to the user-defined logic within the container runtime.\n\t *\n\t * @see {@link IContainer.getEntryPoint}\n\t */\n\tgetEntryPoint(): Promise<FluidObject | undefined>;\n}\n\n/**\n * Payload type for IContainerContext.submitBatchFn()\n * @public\n */\nexport interface IBatchMessage {\n\tcontents?: string;\n\tmetadata: Record<string, unknown> | undefined;\n\tcompression?: string;\n\treferenceSequenceNumber?: number;\n}\n\n/**\n * IContainerContext is fundamentally just the set of things that an IRuntimeFactory (and IRuntime) will consume from the\n * loader layer. It gets passed into the IRuntimeFactory.instantiateRuntime call. Only include members on this interface\n * if you intend them to be consumed/called from the runtime layer.\n * @public\n */\nexport interface IContainerContext {\n\treadonly options: ILoaderOptions;\n\treadonly clientId: string | undefined;\n\treadonly clientDetails: IClientDetails;\n\treadonly storage: IDocumentStorageService;\n\treadonly connected: boolean;\n\treadonly baseSnapshot: ISnapshotTree | undefined;\n\t/**\n\t * @deprecated Please use submitBatchFn & submitSummaryFn\n\t */\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\treadonly submitFn: (type: MessageType, contents: any, batch: boolean, appData?: any) => number;\n\t/**\n\t * @returns clientSequenceNumber of last message in a batch\n\t */\n\treadonly submitBatchFn: (batch: IBatchMessage[], referenceSequenceNumber?: number) => number;\n\treadonly submitSummaryFn: (\n\t\tsummaryOp: ISummaryContent,\n\t\treferenceSequenceNumber?: number,\n\t) => number;\n\t// TODO: use `unknown` instead (API breaking)\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\treadonly submitSignalFn: (contents: any, targetClientId?: string) => void;\n\treadonly disposeFn?: (error?: ICriticalContainerError) => void;\n\treadonly closeFn: (error?: ICriticalContainerError) => void;\n\treadonly deltaManager: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>;\n\treadonly quorum: IQuorumClients;\n\t/**\n\t * @deprecated This method is provided as a migration tool for customers currently reading the code details\n\t * from within the Container by directly accessing the Quorum proposals. The code details should not be accessed\n\t * from within the Container as this requires coupling between the container contents and the code loader.\n\t * Direct access to Quorum proposals will be removed in an upcoming release, and in a further future release this\n\t * migration tool will be removed.\n\t */\n\tgetSpecifiedCodeDetails?(): IFluidCodeDetails | undefined;\n\treadonly audience: IAudience | undefined;\n\treadonly loader: ILoader;\n\t// The logger implementation, which would support tagged events, should be provided by the loader.\n\treadonly taggedLogger: ITelemetryBaseLogger;\n\tpendingLocalState?: unknown;\n\n\t/**\n\t * Ambient services provided with the context\n\t */\n\treadonly scope: FluidObject;\n\n\t/**\n\t * Get an absolute url for a provided container-relative request.\n\t * @param relativeUrl - A relative request within the container\n\t *\n\t * TODO: Optional for backwards compatibility. Make non-optional in version 0.19\n\t */\n\tgetAbsoluteUrl?(relativeUrl: string): Promise<string | undefined>;\n\n\t/**\n\t * Indicates the attachment state of the container to a host service.\n\t */\n\treadonly attachState: AttachState;\n\n\tgetLoadedFromVersion(): IVersion | undefined;\n\n\tupdateDirtyContainerState(dirty: boolean): void;\n\n\treadonly supportedFeatures?: ReadonlyMap<string, unknown>;\n\n\t/**\n\t * WARNING: this id is meant for telemetry usages ONLY, not recommended for other consumption\n\t * This id is not supposed to be exposed anywhere else. It is dependant on usage or drivers\n\t * and scenarios which can change in the future.\n\t * @deprecated 2.0.0-internal.5.2.0 - The docId is already logged by the {@link IContainerContext.taggedLogger} for\n\t * telemetry purposes, so this is generally unnecessary for telemetry.\n\t * If the id is needed for other purposes it should be passed to the consumer explicitly.\n\t *\n\t * @privateremarks Tracking in AB#5714\n\t */\n\treadonly id: string;\n}\n\n/**\n * @public\n */\nexport const IRuntimeFactory: keyof IProvideRuntimeFactory = \"IRuntimeFactory\";\n\n/**\n * @public\n */\nexport interface IProvideRuntimeFactory {\n\treadonly IRuntimeFactory: IRuntimeFactory;\n}\n\n/**\n * Exported module definition\n *\n * Provides the entry point for the ContainerContext to load the proper IRuntime\n * to start up the running instance of the Container.\n * @public\n */\nexport interface IRuntimeFactory extends IProvideRuntimeFactory {\n\t/**\n\t * Instantiates a new IRuntime for the given IContainerContext to proxy to\n\t * This is the main entry point to the Container's business logic\n\t *\n\t * @param context - container context to be supplied to the runtime\n\t * @param existing - whether to instantiate for the first time or from an existing context\n\t */\n\tinstantiateRuntime(context: IContainerContext, existing: boolean): Promise<IRuntime>;\n}\n\n/**\n * Defines list of properties expected for getPendingLocalState\n * @alpha\n */\nexport interface IGetPendingLocalStateProps {\n\t/**\n\t * Indicates the container will close after getting the pending state. Used internally\n\t * to wait for blobs to be attached to a DDS and collect generated ops before closing.\n\t */\n\treadonly notifyImminentClosure: boolean;\n\n\t/**\n\t * Abort signal to stop waiting for blobs to get attached to a DDS. When triggered,\n\t * only blobs attached will be collected in the pending state.\n\t * Intended to be used in the very rare scenario in which getLocalPendingState go stale due\n\t * to a blob failed to be referenced. Such a blob will be lost but the rest of the state will\n\t * be preserved and collected.\n\t */\n\treadonly stopBlobAttachingSignal?: AbortSignal;\n}\n"]}
1
+ {"version":3,"file":"runtime.js","sourceRoot":"","sources":["../src/runtime.ts"],"names":[],"mappings":"AAAA;;;GAGG;AA4BH;;;;GAIG;AACH,MAAM,CAAN,IAAY,WAiBX;AAjBD,WAAY,WAAW;IACtB;;;OAGG;IACH,oCAAqB,CAAA;IAErB;;OAEG;IACH,sCAAuB,CAAA;IAEvB;;;OAGG;IACH,oCAAqB,CAAA;AACtB,CAAC,EAjBW,WAAW,KAAX,WAAW,QAiBtB;AAwKD;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAAiC,iBAAiB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport {\n\tITelemetryBaseLogger,\n\tIDisposable,\n\tFluidObject,\n\tIRequest,\n\tIResponse,\n} from \"@fluidframework/core-interfaces\";\n\nimport { IDocumentStorageService } from \"@fluidframework/driver-definitions\";\nimport {\n\tIClientDetails,\n\tISequencedDocumentMessage,\n\tISnapshotTree,\n\tMessageType,\n\tISummaryTree,\n\tIVersion,\n\tIDocumentMessage,\n\tIQuorumClients,\n\tISummaryContent,\n} from \"@fluidframework/protocol-definitions\";\nimport { IAudience } from \"./audience\";\nimport { IDeltaManager } from \"./deltas\";\nimport { ICriticalContainerError } from \"./error\";\nimport { ILoader, ILoaderOptions, ISnapshotTreeWithBlobContents } from \"./loader\";\nimport { IFluidCodeDetails } from \"./fluidPackage\";\n\n/**\n * The attachment state of some Fluid data (e.g. a container or data store), denoting whether it is uploaded to the\n * service. The transition from detached to attached state is a one-way transition.\n * @alpha\n */\nexport enum AttachState {\n\t/**\n\t * In detached state, the data is only present on the local client's machine. It has not yet been uploaded\n\t * to the service.\n\t */\n\tDetached = \"Detached\",\n\n\t/**\n\t * In attaching state, the data has started the upload to the service, but has not yet completed.\n\t */\n\tAttaching = \"Attaching\",\n\n\t/**\n\t * In attached state, the data has completed upload to the service. It can be accessed by other clients after\n\t * reaching attached state.\n\t */\n\tAttached = \"Attached\",\n}\n\n/**\n * The IRuntime represents an instantiation of a code package within a Container.\n * Primarily held by the ContainerContext to be able to interact with the running instance of the Container.\n * @alpha\n */\nexport interface IRuntime extends IDisposable {\n\t/**\n\t * Executes a request against the runtime\n\t * @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the \"entryPoint\" pattern. Refer to Removing-IFluidRouter.md\n\t */\n\trequest(request: IRequest): Promise<IResponse>;\n\n\t/**\n\t * Notifies the runtime of a change in the connection state\n\t */\n\tsetConnectionState(connected: boolean, clientId?: string);\n\n\t/**\n\t * Processes the given op (message)\n\t */\n\tprocess(message: ISequencedDocumentMessage, local: boolean);\n\n\t/**\n\t * Processes the given signal\n\t */\n\t// TODO: use `unknown` instead (API breaking)\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\tprocessSignal(message: any, local: boolean);\n\n\t/**\n\t * Create a summary. Used when attaching or serializing a detached container.\n\t *\n\t * @param blobRedirectTable - A table passed during the attach process. While detached, blob upload is supported\n\t * using IDs generated locally. After attach, these IDs cannot be used, so this table maps the old local IDs to the\n\t * new storage IDs so requests can be redirected.\n\t */\n\tcreateSummary(blobRedirectTable?: Map<string, string>): ISummaryTree;\n\n\t/**\n\t * Propagate the container state when container is attaching or attached.\n\t * @param attachState - State of the container.\n\t */\n\tsetAttachState(attachState: AttachState.Attaching | AttachState.Attached): void;\n\n\t/**\n\t * Get pending local state in a serializable format to be given back to a newly loaded container\n\t */\n\tgetPendingLocalState(props?: IGetPendingLocalStateProps): unknown;\n\n\t/**\n\t * Notify runtime that container is moving to \"Attaching\" state\n\t * @param snapshot - snapshot created at attach time\n\t * @deprecated not necessary after op replay moved to Container\n\t */\n\tnotifyAttaching(snapshot: ISnapshotTreeWithBlobContents): void;\n\n\t/**\n\t * Notify runtime that we have processed a saved message, so that it can do async work (applying\n\t * stashed ops) after having processed it.\n\t */\n\tnotifyOpReplay?(message: ISequencedDocumentMessage): Promise<void>;\n\n\t/**\n\t * Exposes the entryPoint for the container runtime.\n\t * Use this as the primary way of getting access to the user-defined logic within the container runtime.\n\t *\n\t * @see {@link IContainer.getEntryPoint}\n\t */\n\tgetEntryPoint(): Promise<FluidObject | undefined>;\n}\n\n/**\n * Payload type for IContainerContext.submitBatchFn()\n * @alpha\n */\nexport interface IBatchMessage {\n\tcontents?: string;\n\tmetadata: Record<string, unknown> | undefined;\n\tcompression?: string;\n\treferenceSequenceNumber?: number;\n}\n\n/**\n * IContainerContext is fundamentally just the set of things that an IRuntimeFactory (and IRuntime) will consume from the\n * loader layer. It gets passed into the IRuntimeFactory.instantiateRuntime call. Only include members on this interface\n * if you intend them to be consumed/called from the runtime layer.\n * @alpha\n */\nexport interface IContainerContext {\n\treadonly options: ILoaderOptions;\n\treadonly clientId: string | undefined;\n\treadonly clientDetails: IClientDetails;\n\treadonly storage: IDocumentStorageService;\n\treadonly connected: boolean;\n\treadonly baseSnapshot: ISnapshotTree | undefined;\n\t/**\n\t * @deprecated Please use submitBatchFn & submitSummaryFn\n\t */\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\treadonly submitFn: (type: MessageType, contents: any, batch: boolean, appData?: any) => number;\n\t/**\n\t * @returns clientSequenceNumber of last message in a batch\n\t */\n\treadonly submitBatchFn: (batch: IBatchMessage[], referenceSequenceNumber?: number) => number;\n\treadonly submitSummaryFn: (\n\t\tsummaryOp: ISummaryContent,\n\t\treferenceSequenceNumber?: number,\n\t) => number;\n\t// TODO: use `unknown` instead (API breaking)\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\treadonly submitSignalFn: (contents: any, targetClientId?: string) => void;\n\treadonly disposeFn?: (error?: ICriticalContainerError) => void;\n\treadonly closeFn: (error?: ICriticalContainerError) => void;\n\treadonly deltaManager: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>;\n\treadonly quorum: IQuorumClients;\n\t/**\n\t * @deprecated This method is provided as a migration tool for customers currently reading the code details\n\t * from within the Container by directly accessing the Quorum proposals. The code details should not be accessed\n\t * from within the Container as this requires coupling between the container contents and the code loader.\n\t * Direct access to Quorum proposals will be removed in an upcoming release, and in a further future release this\n\t * migration tool will be removed.\n\t */\n\tgetSpecifiedCodeDetails?(): IFluidCodeDetails | undefined;\n\treadonly audience: IAudience | undefined;\n\treadonly loader: ILoader;\n\t// The logger implementation, which would support tagged events, should be provided by the loader.\n\treadonly taggedLogger: ITelemetryBaseLogger;\n\tpendingLocalState?: unknown;\n\n\t/**\n\t * Ambient services provided with the context\n\t */\n\treadonly scope: FluidObject;\n\n\t/**\n\t * Get an absolute url for a provided container-relative request.\n\t * @param relativeUrl - A relative request within the container\n\t *\n\t * TODO: Optional for backwards compatibility. Make non-optional in version 0.19\n\t */\n\tgetAbsoluteUrl?(relativeUrl: string): Promise<string | undefined>;\n\n\t/**\n\t * Indicates the attachment state of the container to a host service.\n\t */\n\treadonly attachState: AttachState;\n\n\tgetLoadedFromVersion(): IVersion | undefined;\n\n\tupdateDirtyContainerState(dirty: boolean): void;\n\n\treadonly supportedFeatures?: ReadonlyMap<string, unknown>;\n\n\t/**\n\t * WARNING: this id is meant for telemetry usages ONLY, not recommended for other consumption\n\t * This id is not supposed to be exposed anywhere else. It is dependant on usage or drivers\n\t * and scenarios which can change in the future.\n\t * @deprecated 2.0.0-internal.5.2.0 - The docId is already logged by the {@link IContainerContext.taggedLogger} for\n\t * telemetry purposes, so this is generally unnecessary for telemetry.\n\t * If the id is needed for other purposes it should be passed to the consumer explicitly.\n\t *\n\t * @privateremarks Tracking in AB#5714\n\t */\n\treadonly id: string;\n}\n\n/**\n * @alpha\n */\nexport const IRuntimeFactory: keyof IProvideRuntimeFactory = \"IRuntimeFactory\";\n\n/**\n * @alpha\n */\nexport interface IProvideRuntimeFactory {\n\treadonly IRuntimeFactory: IRuntimeFactory;\n}\n\n/**\n * Exported module definition\n *\n * Provides the entry point for the ContainerContext to load the proper IRuntime\n * to start up the running instance of the Container.\n * @alpha\n */\nexport interface IRuntimeFactory extends IProvideRuntimeFactory {\n\t/**\n\t * Instantiates a new IRuntime for the given IContainerContext to proxy to\n\t * This is the main entry point to the Container's business logic\n\t *\n\t * @param context - container context to be supplied to the runtime\n\t * @param existing - whether to instantiate for the first time or from an existing context\n\t */\n\tinstantiateRuntime(context: IContainerContext, existing: boolean): Promise<IRuntime>;\n}\n\n/**\n * Defines list of properties expected for getPendingLocalState\n * @alpha\n */\nexport interface IGetPendingLocalStateProps {\n\t/**\n\t * Indicates the container will close after getting the pending state. Used internally\n\t * to wait for blobs to be attached to a DDS and collect generated ops before closing.\n\t */\n\treadonly notifyImminentClosure: boolean;\n\n\t/**\n\t * Abort signal to stop waiting for blobs to get attached to a DDS. When triggered,\n\t * only blobs attached will be collected in the pending state.\n\t * Intended to be used in the very rare scenario in which getLocalPendingState go stale due\n\t * to a blob failed to be referenced. Such a blob will be lost but the rest of the state will\n\t * be preserved and collected.\n\t */\n\treadonly stopBlobAttachingSignal?: AbortSignal;\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluidframework/container-definitions",
3
- "version": "2.0.0-dev.7.4.0.215930",
3
+ "version": "2.0.0-dev.7.4.0.217212",
4
4
  "description": "Fluid container definitions",
5
5
  "homepage": "https://fluidframework.com",
6
6
  "repository": {
@@ -15,8 +15,8 @@
15
15
  "module": "lib/index.js",
16
16
  "types": "dist/index.d.ts",
17
17
  "dependencies": {
18
- "@fluidframework/core-interfaces": "2.0.0-dev.7.4.0.215930",
19
- "@fluidframework/driver-definitions": "2.0.0-dev.7.4.0.215930",
18
+ "@fluidframework/core-interfaces": "2.0.0-dev.7.4.0.217212",
19
+ "@fluidframework/driver-definitions": "2.0.0-dev.7.4.0.217212",
20
20
  "@fluidframework/protocol-definitions": "^3.0.0",
21
21
  "events": "^3.1.0"
22
22
  },
@@ -60,6 +60,7 @@
60
60
  "build:docs": "fluid-build . --task api",
61
61
  "build:esnext": "tsc --project ./tsconfig.esnext.json",
62
62
  "build:test": "tsc --project ./src/test/types/tsconfig.json",
63
+ "check:release-tags": "api-extractor run --local --config ./api-extractor-lint.json",
63
64
  "ci:build": "npm run build:compile",
64
65
  "ci:build:docs": "api-extractor run",
65
66
  "ci:test": "echo No test for this package",
@@ -68,7 +69,7 @@
68
69
  "eslint": "eslint --format stylish src",
69
70
  "eslint:fix": "eslint --format stylish src --fix --fix-type problem,suggestion,layout",
70
71
  "format": "npm run prettier:fix",
71
- "lint": "npm run prettier && npm run eslint",
72
+ "lint": "npm run prettier && npm run check:release-tags && npm run eslint",
72
73
  "lint:fix": "npm run prettier:fix && npm run eslint:fix",
73
74
  "prettier": "prettier --check . --cache --ignore-path ../../../.prettierignore",
74
75
  "prettier:fix": "prettier --write . --cache --ignore-path ../../../.prettierignore",
package/src/audience.ts CHANGED
@@ -10,7 +10,7 @@ import { IClient } from "@fluidframework/protocol-definitions";
10
10
 
11
11
  /**
12
12
  * Manages the state and the members for {@link IAudience}
13
- * @public
13
+ * @alpha
14
14
  */
15
15
  export interface IAudienceOwner extends IAudience {
16
16
  /**
@@ -30,7 +30,7 @@ export interface IAudienceOwner extends IAudience {
30
30
  *
31
31
  * See {@link https://nodejs.org/api/events.html#class-eventemitter | here} for an overview of the `EventEmitter`
32
32
  * class.
33
- * @public
33
+ * @alpha
34
34
  */
35
35
  export interface IAudience extends EventEmitter {
36
36
  /**
@@ -7,7 +7,7 @@ import { IFluidPackage, isFluidPackage, IFluidPackageEnvironment } from "./fluid
7
7
 
8
8
  /**
9
9
  * A specific Fluid package environment for browsers
10
- * @public
10
+ * @internal
11
11
  */
12
12
  export interface IFluidBrowserPackageEnvironment extends IFluidPackageEnvironment {
13
13
  /**
@@ -31,7 +31,7 @@ export interface IFluidBrowserPackageEnvironment extends IFluidPackageEnvironmen
31
31
 
32
32
  /**
33
33
  * A Fluid package for specification for browser environments
34
- * @public
34
+ * @internal
35
35
  */
36
36
  export interface IFluidBrowserPackage extends IFluidPackage {
37
37
  /**
@@ -52,7 +52,7 @@ export interface IFluidBrowserPackage extends IFluidPackage {
52
52
  /**
53
53
  * Determines if any object is an IFluidBrowserPackage
54
54
  * @param maybePkg - The object to check for compatibility with IFluidBrowserPackage
55
- * @public
55
+ * @internal
56
56
  */
57
57
  export const isFluidBrowserPackage = (
58
58
  maybePkg: unknown,
package/src/deltas.ts CHANGED
@@ -22,7 +22,7 @@ import {
22
22
 
23
23
  /**
24
24
  * Contract representing the result of a newly established connection to the server for syncing deltas.
25
- * @public
25
+ * @alpha
26
26
  */
27
27
  export interface IConnectionDetails {
28
28
  clientId: string;
@@ -44,7 +44,7 @@ export interface IConnectionDetails {
44
44
 
45
45
  /**
46
46
  * Contract supporting delivery of outbound messages to the server
47
- * @public
47
+ * @alpha
48
48
  */
49
49
  export interface IDeltaSender {
50
50
  /**
@@ -55,7 +55,7 @@ export interface IDeltaSender {
55
55
 
56
56
  /**
57
57
  * Events emitted by {@link IDeltaManager}.
58
- * @public
58
+ * @alpha
59
59
  */
60
60
  export interface IDeltaManagerEvents extends IEvent {
61
61
  /**
@@ -135,7 +135,7 @@ export interface IDeltaManagerEvents extends IEvent {
135
135
 
136
136
  /**
137
137
  * Manages the transmission of ops between the runtime and storage.
138
- * @public
138
+ * @alpha
139
139
  */
140
140
  export interface IDeltaManager<T, U> extends IEventProvider<IDeltaManagerEvents>, IDeltaSender {
141
141
  /**
@@ -221,7 +221,7 @@ export interface IDeltaManager<T, U> extends IEventProvider<IDeltaManagerEvents>
221
221
 
222
222
  /**
223
223
  * Events emitted by {@link IDeltaQueue}.
224
- * @public
224
+ * @alpha
225
225
  */
226
226
  export interface IDeltaQueueEvents<T> extends IErrorEvent {
227
227
  /**
@@ -264,7 +264,7 @@ export interface IDeltaQueueEvents<T> extends IErrorEvent {
264
264
 
265
265
  /**
266
266
  * Queue of ops to be sent to or processed from storage
267
- * @public
267
+ * @alpha
268
268
  */
269
269
  export interface IDeltaQueue<T> extends IEventProvider<IDeltaQueueEvents<T>>, IDisposable {
270
270
  /**
@@ -313,7 +313,7 @@ export interface IDeltaQueue<T> extends IEventProvider<IDeltaQueueEvents<T>>, ID
313
313
  }
314
314
 
315
315
  /**
316
- * @public
316
+ * @alpha
317
317
  */
318
318
  export type ReadOnlyInfo =
319
319
  | {
package/src/error.ts CHANGED
@@ -7,7 +7,7 @@ import { FluidErrorTypes, IErrorBase } from "@fluidframework/core-interfaces";
7
7
 
8
8
  /**
9
9
  * Different error types the ClientSession may report out to the Host.
10
- * @public
10
+ * @internal
11
11
  */
12
12
  export const ContainerErrorTypes = {
13
13
  ...FluidErrorTypes,
@@ -19,7 +19,7 @@ export const ContainerErrorTypes = {
19
19
  } as const;
20
20
 
21
21
  /**
22
- * @public
22
+ * @internal
23
23
  */
24
24
  export type ContainerErrorTypes = (typeof ContainerErrorTypes)[keyof typeof ContainerErrorTypes];
25
25
 
@@ -27,7 +27,7 @@ export type ContainerErrorTypes = (typeof ContainerErrorTypes)[keyof typeof Cont
27
27
  * Different error types the Container may report out to the Host.
28
28
  *
29
29
  * @deprecated ContainerErrorType is being deprecated as a public export. Please use {@link ContainerErrorTypes#clientSessionExpiredError} instead.
30
- * @public
30
+ * @internal
31
31
  */
32
32
  export enum ContainerErrorType {
33
33
  /**
@@ -64,7 +64,7 @@ export enum ContainerErrorType {
64
64
 
65
65
  /**
66
66
  * Represents warnings raised on container.
67
- * @public
67
+ * @alpha
68
68
  */
69
69
  export interface ContainerWarning extends IErrorBase {
70
70
  /**
@@ -89,7 +89,6 @@ export interface ContainerWarning extends IErrorBase {
89
89
  * - {@link @fluidframework/odsp-driver-definitions#OdspErrorType}
90
90
  *
91
91
  * - {@link @fluidframework/routerlicious-driver#RouterliciousErrorType}
92
- *
93
- * @public
92
+ * @alpha
94
93
  */
95
94
  export type ICriticalContainerError = IErrorBase;
@@ -8,7 +8,7 @@ import { IProvideFluidCodeDetailsComparer } from "./fluidPackage";
8
8
  import { IRuntimeFactory } from "./runtime";
9
9
 
10
10
  /**
11
- * @public
11
+ * @alpha
12
12
  */
13
13
  export interface IFluidModule {
14
14
  fluidExport: FluidObject<IRuntimeFactory & IProvideFluidCodeDetailsComparer>;
@@ -5,7 +5,7 @@
5
5
 
6
6
  /**
7
7
  * Specifies an environment on Fluid property of a IFluidPackage.
8
- * @public
8
+ * @alpha
9
9
  */
10
10
  export interface IFluidPackageEnvironment {
11
11
  /**
@@ -36,7 +36,7 @@ export interface IFluidPackageEnvironment {
36
36
  * While compatible with the npm package format it is not necessary that that package is an
37
37
  * npm package:
38
38
  * {@link https://stackoverflow.com/questions/10065564/add-custom-metadata-or-config-to-package-json-is-it-valid}
39
- * @public
39
+ * @alpha
40
40
  */
41
41
  export interface IFluidPackage {
42
42
  /**
@@ -64,7 +64,7 @@ export interface IFluidPackage {
64
64
  /**
65
65
  * Check if the package.json defines a Fluid package
66
66
  * @param pkg - the package json data to check if it is a Fluid package.
67
- * @public
67
+ * @internal
68
68
  */
69
69
  export const isFluidPackage = (pkg: unknown): pkg is Readonly<IFluidPackage> =>
70
70
  typeof pkg === "object" &&
@@ -73,7 +73,7 @@ export const isFluidPackage = (pkg: unknown): pkg is Readonly<IFluidPackage> =>
73
73
 
74
74
  /**
75
75
  * Package manager configuration. Provides a key value mapping of config values
76
- * @public
76
+ * @alpha
77
77
  */
78
78
  export interface IFluidCodeDetailsConfig {
79
79
  readonly [key: string]: string;
@@ -81,7 +81,7 @@ export interface IFluidCodeDetailsConfig {
81
81
 
82
82
  /**
83
83
  * Data structure used to describe the code to load on the Fluid document
84
- * @public
84
+ * @alpha
85
85
  */
86
86
  export interface IFluidCodeDetails {
87
87
  /**
@@ -101,7 +101,7 @@ export interface IFluidCodeDetails {
101
101
 
102
102
  /**
103
103
  * Determines if any object is an IFluidCodeDetails
104
- * @public
104
+ * @internal
105
105
  */
106
106
  export const isFluidCodeDetails = (details: unknown): details is Readonly<IFluidCodeDetails> => {
107
107
  const maybeCodeDetails = details as Partial<IFluidCodeDetails> | undefined;
@@ -114,13 +114,13 @@ export const isFluidCodeDetails = (details: unknown): details is Readonly<IFluid
114
114
  };
115
115
 
116
116
  /**
117
- * @public
117
+ * @alpha
118
118
  */
119
119
  export const IFluidCodeDetailsComparer: keyof IProvideFluidCodeDetailsComparer =
120
120
  "IFluidCodeDetailsComparer";
121
121
 
122
122
  /**
123
- * @public
123
+ * @alpha
124
124
  */
125
125
  export interface IProvideFluidCodeDetailsComparer {
126
126
  readonly IFluidCodeDetailsComparer: IFluidCodeDetailsComparer;
@@ -128,7 +128,7 @@ export interface IProvideFluidCodeDetailsComparer {
128
128
 
129
129
  /**
130
130
  * Provides capability to compare Fluid code details.
131
- * @public
131
+ * @alpha
132
132
  */
133
133
  export interface IFluidCodeDetailsComparer extends IProvideFluidCodeDetailsComparer {
134
134
  /**
package/src/loader.ts CHANGED
@@ -30,7 +30,7 @@ import { IFluidCodeDetails, IFluidPackage, IProvideFluidCodeDetailsComparer } fr
30
30
 
31
31
  /**
32
32
  * Encapsulates a module entry point with corresponding code details.
33
- * @public
33
+ * @internal
34
34
  */
35
35
  export interface IFluidModuleWithDetails {
36
36
  /**
@@ -50,7 +50,7 @@ export interface IFluidModuleWithDetails {
50
50
  /**
51
51
  * Fluid code loader resolves a code module matching the document schema, i.e. code details, such as
52
52
  * a package name and package version range.
53
- * @public
53
+ * @internal
54
54
  */
55
55
  export interface ICodeDetailsLoader extends Partial<IProvideFluidCodeDetailsComparer> {
56
56
  /**
@@ -65,7 +65,7 @@ export interface ICodeDetailsLoader extends Partial<IProvideFluidCodeDetailsComp
65
65
  /**
66
66
  * The interface returned from a IFluidCodeResolver which represents IFluidCodeDetails
67
67
  * that have been resolved and are ready to load
68
- * @public
68
+ * @internal
69
69
  */
70
70
  export interface IResolvedFluidCodeDetails extends IFluidCodeDetails {
71
71
  /**
@@ -84,7 +84,7 @@ export interface IResolvedFluidCodeDetails extends IFluidCodeDetails {
84
84
  * The Fluid code resolver is coupled to a specific cdn and knows how to resolve
85
85
  * the code detail for loading from that cdn. This include resolving to the most recent
86
86
  * version of package that supports the provided code details.
87
- * @public
87
+ * @internal
88
88
  */
89
89
  export interface IFluidCodeResolver {
90
90
  /**
@@ -98,7 +98,7 @@ export interface IFluidCodeResolver {
98
98
 
99
99
  /**
100
100
  * Events emitted by the {@link IContainer} "upwards" to the Loader and Host.
101
- * @public
101
+ * @alpha
102
102
  */
103
103
  export interface IContainerEvents extends IEvent {
104
104
  /**
@@ -258,7 +258,7 @@ export interface IContainerEvents extends IEvent {
258
258
  /**
259
259
  * Namespace for the different connection states a container can be in.
260
260
  * PLEASE NOTE: The sequence of the numerical values does no correspond to the typical connection state progression.
261
- * @public
261
+ * @alpha
262
262
  */
263
263
  // eslint-disable-next-line @typescript-eslint/no-namespace
264
264
  export namespace ConnectionState {
@@ -266,29 +266,33 @@ export namespace ConnectionState {
266
266
  * The container is not connected to the delta server.
267
267
  * Note - When in this state the container may be about to reconnect,
268
268
  * or may remain disconnected until explicitly told to connect.
269
+ * @alpha
269
270
  */
270
271
  export type Disconnected = 0;
271
272
 
272
273
  /**
273
274
  * The container is disconnected but actively trying to establish a new connection.
274
275
  * PLEASE NOTE that this numerical value falls out of the order you may expect for this state.
276
+ * @alpha
275
277
  */
276
278
  export type EstablishingConnection = 3;
277
279
 
278
280
  /**
279
281
  * The container has an inbound connection only, and is catching up to the latest known state from the service.
282
+ * @alpha
280
283
  */
281
284
  export type CatchingUp = 1;
282
285
 
283
286
  /**
284
287
  * The container is fully connected and syncing.
288
+ * @alpha
285
289
  */
286
290
  export type Connected = 2;
287
291
  }
288
292
 
289
293
  /**
290
294
  * Type defining the different states of connectivity a Container can be in.
291
- * @public
295
+ * @alpha
292
296
  */
293
297
  export type ConnectionState =
294
298
  | ConnectionState.Disconnected
@@ -298,7 +302,7 @@ export type ConnectionState =
298
302
 
299
303
  /**
300
304
  * The Host's view of a Container and its connection to storage
301
- * @public
305
+ * @alpha
302
306
  */
303
307
  // eslint-disable-next-line import/no-deprecated
304
308
  export interface IContainer extends IEventProvider<IContainerEvents>, IFluidRouter {
@@ -497,7 +501,6 @@ export interface IContainer extends IEventProvider<IContainerEvents>, IFluidRout
497
501
  /**
498
502
  * Allows the host to have the container force to be in read-only mode
499
503
  * @param readonly - Boolean that toggles if read-only policies will be enforced
500
- * @alpha
501
504
  */
502
505
  forceReadonly?(readonly: boolean);
503
506
 
@@ -510,7 +513,7 @@ export interface IContainer extends IEventProvider<IContainerEvents>, IFluidRout
510
513
 
511
514
  /**
512
515
  * The Runtime's view of the Loader, used for loading Containers
513
- * @public
516
+ * @alpha
514
517
  */
515
518
  export interface ILoader extends Partial<IProvideLoader> {
516
519
  /**
@@ -538,7 +541,7 @@ export interface ILoader extends Partial<IProvideLoader> {
538
541
 
539
542
  /**
540
543
  * The Host's view of the Loader, used for loading Containers
541
- * @public
544
+ * @internal
542
545
  */
543
546
  export interface IHostLoader extends ILoader {
544
547
  /**
@@ -567,7 +570,7 @@ export interface IHostLoader extends ILoader {
567
570
  }
568
571
 
569
572
  /**
570
- * @public
573
+ * @alpha
571
574
  */
572
575
  export type ILoaderOptions = {
573
576
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -601,7 +604,7 @@ export type ILoaderOptions = {
601
604
 
602
605
  /**
603
606
  * Accepted header keys for requests coming to the Loader
604
- * @public
607
+ * @internal
605
608
  */
606
609
  export enum LoaderHeader {
607
610
  /**
@@ -633,7 +636,7 @@ export enum LoaderHeader {
633
636
  }
634
637
 
635
638
  /**
636
- * @public
639
+ * @internal
637
640
  */
638
641
  export interface IContainerLoadMode {
639
642
  opsBeforeReturn?: /*
@@ -688,7 +691,7 @@ export interface IContainerLoadMode {
688
691
 
689
692
  /**
690
693
  * Set of Request Headers that the Loader understands and may inspect or modify
691
- * @public
694
+ * @internal
692
695
  */
693
696
  export interface ILoaderHeader {
694
697
  /**
@@ -707,7 +710,7 @@ export interface ILoaderHeader {
707
710
  }
708
711
 
709
712
  /**
710
- * @public
713
+ * @alpha
711
714
  */
712
715
  export interface IProvideLoader {
713
716
  readonly ILoader: ILoader;
@@ -717,7 +720,7 @@ export interface IProvideLoader {
717
720
  * @deprecated 0.48, This API will be removed in 0.50
718
721
  * No replacement since it is not expected anyone will depend on this outside container-loader
719
722
  * See {@link https://github.com/microsoft/FluidFramework/issues/9711} for context.
720
- * @public
723
+ * @internal
721
724
  */
722
725
  export interface IPendingLocalState {
723
726
  url: string;
@@ -729,7 +732,7 @@ export interface IPendingLocalState {
729
732
  * in separate property: {@link ISnapshotTreeWithBlobContents.blobsContents}.
730
733
  *
731
734
  * @remarks This is used as the `ContainerContext`'s base snapshot when attaching.
732
- * @public
735
+ * @alpha
733
736
  */
734
737
  export interface ISnapshotTreeWithBlobContents extends ISnapshotTree {
735
738
  blobsContents: { [path: string]: ArrayBufferLike };
package/src/runtime.ts CHANGED
@@ -32,7 +32,7 @@ import { IFluidCodeDetails } from "./fluidPackage";
32
32
  /**
33
33
  * The attachment state of some Fluid data (e.g. a container or data store), denoting whether it is uploaded to the
34
34
  * service. The transition from detached to attached state is a one-way transition.
35
- * @public
35
+ * @alpha
36
36
  */
37
37
  export enum AttachState {
38
38
  /**
@@ -56,7 +56,7 @@ export enum AttachState {
56
56
  /**
57
57
  * The IRuntime represents an instantiation of a code package within a Container.
58
58
  * Primarily held by the ContainerContext to be able to interact with the running instance of the Container.
59
- * @public
59
+ * @alpha
60
60
  */
61
61
  export interface IRuntime extends IDisposable {
62
62
  /**
@@ -99,8 +99,6 @@ export interface IRuntime extends IDisposable {
99
99
 
100
100
  /**
101
101
  * Get pending local state in a serializable format to be given back to a newly loaded container
102
- * @alpha
103
- * {@link https://github.com/microsoft/FluidFramework/packages/tree/main/loader/container-loader/closeAndGetPendingLocalState.md}
104
102
  */
105
103
  getPendingLocalState(props?: IGetPendingLocalStateProps): unknown;
106
104
 
@@ -128,7 +126,7 @@ export interface IRuntime extends IDisposable {
128
126
 
129
127
  /**
130
128
  * Payload type for IContainerContext.submitBatchFn()
131
- * @public
129
+ * @alpha
132
130
  */
133
131
  export interface IBatchMessage {
134
132
  contents?: string;
@@ -141,7 +139,7 @@ export interface IBatchMessage {
141
139
  * IContainerContext is fundamentally just the set of things that an IRuntimeFactory (and IRuntime) will consume from the
142
140
  * loader layer. It gets passed into the IRuntimeFactory.instantiateRuntime call. Only include members on this interface
143
141
  * if you intend them to be consumed/called from the runtime layer.
144
- * @public
142
+ * @alpha
145
143
  */
146
144
  export interface IContainerContext {
147
145
  readonly options: ILoaderOptions;
@@ -222,12 +220,12 @@ export interface IContainerContext {
222
220
  }
223
221
 
224
222
  /**
225
- * @public
223
+ * @alpha
226
224
  */
227
225
  export const IRuntimeFactory: keyof IProvideRuntimeFactory = "IRuntimeFactory";
228
226
 
229
227
  /**
230
- * @public
228
+ * @alpha
231
229
  */
232
230
  export interface IProvideRuntimeFactory {
233
231
  readonly IRuntimeFactory: IRuntimeFactory;
@@ -238,7 +236,7 @@ export interface IProvideRuntimeFactory {
238
236
  *
239
237
  * Provides the entry point for the ContainerContext to load the proper IRuntime
240
238
  * to start up the running instance of the Container.
241
- * @public
239
+ * @alpha
242
240
  */
243
241
  export interface IRuntimeFactory extends IProvideRuntimeFactory {
244
242
  /**