@fluidframework/container-definitions 2.10.0-307399 → 2.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +22 -0
- package/api-report/container-definitions.legacy.alpha.api.md +1 -0
- package/dist/loader.d.ts +7 -1
- package/dist/loader.d.ts.map +1 -1
- package/dist/loader.js.map +1 -1
- package/lib/loader.d.ts +7 -1
- package/lib/loader.d.ts.map +1 -1
- package/lib/loader.js.map +1 -1
- package/package.json +6 -16
- package/src/loader.ts +8 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# @fluidframework/container-definitions
|
|
2
2
|
|
|
3
|
+
## 2.11.0
|
|
4
|
+
|
|
5
|
+
Dependency updates only.
|
|
6
|
+
|
|
7
|
+
## 2.10.0
|
|
8
|
+
|
|
9
|
+
### Minor Changes
|
|
10
|
+
|
|
11
|
+
- The inbound and outbound properties have been removed from IDeltaManager ([#22282](https://github.com/microsoft/FluidFramework/pull/22282)) [45a57693f2](https://github.com/microsoft/FluidFramework/commit/45a57693f291e0dc5e91af7f29a9b9c8f82dfad5)
|
|
12
|
+
|
|
13
|
+
The inbound and outbound properties were [deprecated in version 2.0.0-rc.2.0.0](https://github.com/microsoft/FluidFramework/blob/main/RELEASE_NOTES/2.0.0-rc.2.0.0.md#container-definitions-deprecate-ideltamanagerinbound-and-ideltamanageroutbound) and have been removed from `IDeltaManager`.
|
|
14
|
+
|
|
15
|
+
`IDeltaManager.inbound` contained functionality that could break core runtime features such as summarization and processing batches if used improperly. Data loss or corruption could occur when `IDeltaManger.inbound.pause()` or `IDeltaManager.inbound.resume()` were called.
|
|
16
|
+
|
|
17
|
+
Similarly, `IDeltaManager.outbound` contained functionality that could break core runtime features such as generation of batches and chunking. Data loss or corruption could occur when `IDeltaManger.inbound.pause()` or `IDeltaManager.inbound.resume()` were called.
|
|
18
|
+
|
|
19
|
+
#### Alternatives
|
|
20
|
+
|
|
21
|
+
- Alternatives to `IDeltaManager.inbound.on("op", ...)` are `IDeltaManager.on("op", ...)`
|
|
22
|
+
- Alternatives to calling `IDeltaManager.inbound.pause`, `IDeltaManager.outbound.pause` for `IContainer` disconnect use `IContainer.disconnect`.
|
|
23
|
+
- Alternatives to calling `IDeltaManager.inbound.resume`, `IDeltaManager.outbound.resume` for `IContainer` reconnect use `IContainer.connect`.
|
|
24
|
+
|
|
3
25
|
## 2.5.0
|
|
4
26
|
|
|
5
27
|
Dependency updates only.
|
|
@@ -109,6 +109,7 @@ export interface IContainer extends IEventProvider<IContainerEvents> {
|
|
|
109
109
|
readonly disposed?: boolean;
|
|
110
110
|
forceReadonly?(readonly: boolean): any;
|
|
111
111
|
getAbsoluteUrl(relativeUrl: string): Promise<string | undefined>;
|
|
112
|
+
getContainerPackageInfo?(): IContainerPackageInfo | undefined;
|
|
112
113
|
getEntryPoint(): Promise<FluidObject>;
|
|
113
114
|
getLoadedCodeDetails(): IFluidCodeDetails | undefined;
|
|
114
115
|
getQuorum(): IQuorumClients;
|
package/dist/loader.d.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import type { FluidObject, IEvent, IEventProvider, IRequest } from "@fluidframework/core-interfaces";
|
|
6
6
|
import type { IClient, IClientDetails, IQuorumClients } from "@fluidframework/driver-definitions";
|
|
7
|
-
import type { IResolvedUrl, IDocumentMessage, ISequencedProposal, ISnapshotTree, ISequencedDocumentMessage } from "@fluidframework/driver-definitions/internal";
|
|
7
|
+
import type { IResolvedUrl, IDocumentMessage, ISequencedProposal, ISnapshotTree, ISequencedDocumentMessage, IContainerPackageInfo } from "@fluidframework/driver-definitions/internal";
|
|
8
8
|
import type { IAudience } from "./audience.js";
|
|
9
9
|
import type { IDeltaManager, ReadOnlyInfo } from "./deltas.js";
|
|
10
10
|
import type { ContainerWarning, ICriticalContainerError } from "./error.js";
|
|
@@ -297,6 +297,12 @@ export interface IContainer extends IEventProvider<IContainerEvents> {
|
|
|
297
297
|
* loaded.
|
|
298
298
|
*/
|
|
299
299
|
getLoadedCodeDetails(): IFluidCodeDetails | undefined;
|
|
300
|
+
/**
|
|
301
|
+
* Get the package info for the code details that were used to load the container.
|
|
302
|
+
* @returns The package info for the code details that were used to load the container if it is loaded, undefined if
|
|
303
|
+
* the container package doesn't have a name.
|
|
304
|
+
*/
|
|
305
|
+
getContainerPackageInfo?(): IContainerPackageInfo | undefined;
|
|
300
306
|
/**
|
|
301
307
|
* Returns true if the container has been closed and/or disposed, otherwise false.
|
|
302
308
|
*/
|
package/dist/loader.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loader.d.ts","sourceRoot":"","sources":["../src/loader.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EACX,WAAW,EACX,MAAM,EACN,cAAc,EACd,QAAQ,EACR,MAAM,iCAAiC,CAAC;AACzC,OAAO,KAAK,EACX,OAAO,EACP,cAAc,EACd,cAAc,EACd,MAAM,oCAAoC,CAAC;AAC5C,OAAO,KAAK,EACX,YAAY,EACZ,gBAAgB,EAChB,kBAAkB,EAClB,aAAa,EACb,yBAAyB,EACzB,MAAM,6CAA6C,CAAC;AAErD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC/D,OAAO,KAAK,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAC;AAC5E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,KAAK,EACX,iBAAiB,EACjB,aAAa,EACb,gCAAgC,EAChC,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEhD;;;;GAIG;AACH,MAAM,WAAW,uBAAuB;IACvC;;OAEG;IACH,MAAM,EAAE,YAAY,CAA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AAG,6BAA6B,CAAA;KAAE,CAAC;CACzD"}
|
package/dist/loader.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loader.js","sourceRoot":"","sources":["../src/loader.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AA0mBH;;;;GAIG;AACH,IAAY,YA2BX;AA3BD,WAAY,YAAY;IACvB;;;OAGG;IACH,qCAAqB,CAAA;IAErB,sDAAsC,CAAA;IAEtC;;OAEG;IACH,qCAAqB,CAAA;IACrB,6CAA6B,CAAA;IAC7B;;;OAGG;IACH,wDAAwC,CAAA;IAExC;;;;;OAKG;IACH,mCAAmB,CAAA;AACpB,CAAC,EA3BW,YAAY,4BAAZ,YAAY,QA2BvB","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type {\n\tFluidObject,\n\tIEvent,\n\tIEventProvider,\n\tIRequest,\n} from \"@fluidframework/core-interfaces\";\nimport type {\n\tIClient,\n\tIClientDetails,\n\tIQuorumClients,\n} from \"@fluidframework/driver-definitions\";\nimport type {\n\tIResolvedUrl,\n\tIDocumentMessage,\n\tISequencedProposal,\n\tISnapshotTree,\n\tISequencedDocumentMessage,\n} from \"@fluidframework/driver-definitions/internal\";\n\nimport type { IAudience } from \"./audience.js\";\nimport type { IDeltaManager, ReadOnlyInfo } from \"./deltas.js\";\nimport type { ContainerWarning, ICriticalContainerError } from \"./error.js\";\nimport type { IFluidModule } from \"./fluidModule.js\";\nimport type {\n\tIFluidCodeDetails,\n\tIFluidPackage,\n\tIProvideFluidCodeDetailsComparer,\n} from \"./fluidPackage.js\";\nimport type { AttachState } from \"./runtime.js\";\n\n/**\n * Encapsulates a module entry point with corresponding code details.\n * @legacy\n * @alpha\n */\nexport interface IFluidModuleWithDetails {\n\t/**\n\t * Fluid code module that implements the runtime factory needed to instantiate the container runtime.\n\t */\n\tmodule: IFluidModule;\n\n\t/**\n\t * Code details associated with the module. Represents a document schema this module supports.\n\t * If the code loader implements the {@link @fluidframework/core-interfaces#(IFluidCodeDetailsComparer:interface)}\n\t * interface, it'll be called to determine whether the module code details satisfy the new code proposal in the\n\t * quorum.\n\t */\n\tdetails: IFluidCodeDetails;\n}\n\n/**\n * Fluid code loader resolves a code module matching the document schema, i.e. code details, such as\n * a package name and package version range.\n * @legacy\n * @alpha\n */\nexport interface ICodeDetailsLoader extends Partial<IProvideFluidCodeDetailsComparer> {\n\t/**\n\t * Load the code module (package) that can interact with the document.\n\t *\n\t * @param source - Code proposal that articulates the current schema the document is written in.\n\t * @returns Code module entry point along with the code details associated with it.\n\t */\n\tload(source: IFluidCodeDetails): Promise<IFluidModuleWithDetails>;\n}\n\n/**\n * The interface returned from a IFluidCodeResolver which represents IFluidCodeDetails\n * that have been resolved and are ready to load\n * @internal\n */\nexport interface IResolvedFluidCodeDetails extends IFluidCodeDetails {\n\t/**\n\t * A resolved version of the Fluid package. All Fluid browser file entries should be absolute urls.\n\t */\n\treadonly resolvedPackage: Readonly<IFluidPackage>;\n\t/**\n\t * If not undefined, this id will be used to cache the entry point for the code package\n\t */\n\treadonly resolvedPackageCacheId: string | undefined;\n}\n\n/**\n * Fluid code resolvers take a Fluid code details, and resolve the\n * full Fluid package including absolute urls for the browser file entries.\n * The Fluid code resolver is coupled to a specific cdn and knows how to resolve\n * the code detail for loading from that cdn. This include resolving to the most recent\n * version of package that supports the provided code details.\n * @internal\n */\nexport interface IFluidCodeResolver {\n\t/**\n\t * Resolves a Fluid code details into a form that can be loaded.\n\t * @param details - The Fluid code details to resolve.\n\t * @returns A IResolvedFluidCodeDetails where the resolvedPackage's Fluid file entries are absolute urls, and\n\t * an optional resolvedPackageCacheId if the loaded package should be cached.\n\t */\n\tresolveCodeDetails(details: IFluidCodeDetails): Promise<IResolvedFluidCodeDetails>;\n}\n\n/**\n * Events emitted by the {@link IContainer} \"upwards\" to the Loader and Host.\n * @legacy\n * @alpha\n */\nexport interface IContainerEvents extends IEvent {\n\t/**\n\t * Emitted when the readonly state of the container changes.\n\t *\n\t * @remarks Listener parameters:\n\t *\n\t * - `readonly`: Whether or not the container is now in a readonly state.\n\t *\n\t * @see {@link IContainer.readOnlyInfo}\n\t */\n\t(event: \"readonly\", listener: (readonly: boolean) => void): void;\n\n\t/**\n\t * Emitted when the {@link IContainer} 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 IContainer.connectionState}\n\t *\n\t * - {@link IContainer.connect}\n\t */\n\t(event: \"connected\", listener: (clientId: string) => void);\n\n\t/**\n\t * Fires when new container code details have been proposed, prior to acceptance.\n\t *\n\t * @remarks Listener parameters:\n\t *\n\t * - `codeDetails`: The code details being proposed.\n\t *\n\t * - `proposal`: NOT RECOMMENDED FOR USE.\n\t *\n\t * @see {@link IContainer.proposeCodeDetails}\n\t */\n\t(\n\t\tevent: \"codeDetailsProposed\",\n\t\tlistener: (codeDetails: IFluidCodeDetails, proposal: ISequencedProposal) => void,\n\t);\n\n\t/**\n\t * Emitted when the {@link IContainer} 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 IContainer.connectionState}\n\t *\n\t * - {@link IContainer.disconnect}\n\t */\n\t(event: \"disconnected\", listener: () => void);\n\n\t/**\n\t * Emitted when a {@link AttachState.Detached | detached} container begins the process of\n\t * {@link AttachState.Attaching | attached} to the Fluid service.\n\t *\n\t * @see\n\t *\n\t * - {@link IContainer.attachState}\n\t *\n\t * - {@link IContainer.attach}\n\t */\n\t(event: \"attaching\", listener: () => void);\n\n\t/**\n\t * Emitted when the {@link AttachState.Attaching | attaching} process is complete and the container is\n\t * {@link AttachState.Attached | attached} to the Fluid service.\n\t *\n\t * @see\n\t *\n\t * - {@link IContainer.attachState}\n\t *\n\t * - {@link IContainer.attach}\n\t */\n\t(event: \"attached\", listener: () => void);\n\n\t/**\n\t * Emitted when the {@link IContainer} 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, this will contain details about the error that caused it.\n\t *\n\t * @see {@link IContainer.close}\n\t */\n\t(event: \"closed\", listener: (error?: ICriticalContainerError) => void);\n\n\t/**\n\t * Emitted when the {@link IContainer} is disposed, which permanently disables it.\n\t *\n\t * @remarks Listener parameters:\n\t *\n\t * - `error`: If the container was disposed due to error, this will contain details about the error that caused it.\n\t *\n\t * @see {@link IContainer.dispose}\n\t */\n\t(event: \"disposed\", listener: (error?: ICriticalContainerError) => void);\n\n\t/**\n\t * Emitted when the container encounters a state which may lead to errors, which may be actionable by the consumer.\n\t *\n\t * @remarks\n\t *\n\t * Note: this event is not intended for general use.\n\t * The longer-term intention is to surface warnings more directly on the APIs that produce them.\n\t * For now, use of this should be avoided when possible.\n\t *\n\t * Listener parameters:\n\t *\n\t * - `error`: The warning describing the encountered state.\n\t */\n\t(event: \"warning\", listener: (error: ContainerWarning) => void);\n\n\t/**\n\t * Emitted immediately after processing an incoming operation (op).\n\t *\n\t * @remarks\n\t *\n\t * Note: this event is not intended for general use.\n\t * Prefer to listen to events on the appropriate ultimate recipients of the ops, rather than listening to the\n\t * ops directly on the {@link IContainer}.\n\t *\n\t * Listener parameters:\n\t *\n\t * - `message`: The op that was processed.\n\t */\n\t(event: \"op\", listener: (message: ISequencedDocumentMessage) => void);\n\n\t/**\n\t * Emitted upon the first local change while the Container is in the \"saved\" state.\n\t * That is, when {@link IContainer.isDirty} transitions from `true` to `false`.\n\t *\n\t * @remarks Listener parameters:\n\t *\n\t * - `dirty`: DEPRECATED. This parameter will be removed in a future release.\n\t *\n\t * @see {@link IContainer.isDirty}\n\t */\n\t(event: \"dirty\", listener: (dirty: boolean) => void);\n\n\t/**\n\t * Emitted when all local changes/edits have been acknowledged by the service.\n\t * I.e., when {@link IContainer.isDirty} transitions from `false` to `true`.\n\t *\n\t * @remarks Listener parameters:\n\t *\n\t * - `dirty`: DEPRECATED. This parameter will be removed in a future release.\n\t *\n\t * @see {@link IContainer.isDirty}\n\t */\n\t(event: \"saved\", listener: (dirty: boolean) => void);\n\n\t/**\n\t * Emitted when the some of the properties related to the container are initialized or updated.\n\t * This emitted metadata will the props which are updated. If consumer wants to read full set of\n\t * metadata then they can read it off the container from {@link IContainer.containerMetadata} prop.\n\t */\n\t(event: \"metadataUpdate\", listener: (metadata: Record<string, string>) => void);\n}\n\n/**\n * Namespace for the different connection states a container can be in.\n * PLEASE NOTE: The sequence of the numerical values does no correspond to the typical connection state progression.\n * @public\n */\n// eslint-disable-next-line @typescript-eslint/no-namespace\nexport namespace ConnectionState {\n\t/**\n\t * The container is not connected to the delta server.\n\t * Note - When in this state the container may be about to reconnect,\n\t * or may remain disconnected until explicitly told to connect.\n\t * @public\n\t */\n\texport type Disconnected = 0;\n\n\t/**\n\t * The container is disconnected but actively trying to establish a new connection.\n\t * PLEASE NOTE that this numerical value falls out of the order you may expect for this state.\n\t * @public\n\t */\n\texport type EstablishingConnection = 3;\n\n\t/**\n\t * The container has an inbound connection only, and is catching up to the latest known state from the service.\n\t * @public\n\t */\n\texport type CatchingUp = 1;\n\n\t/**\n\t * The container is fully connected and syncing.\n\t * @public\n\t */\n\texport type Connected = 2;\n}\n\n/**\n * Type defining the different states of connectivity a Container can be in.\n * @public\n */\nexport type ConnectionState =\n\t| ConnectionState.Disconnected\n\t| ConnectionState.EstablishingConnection\n\t| ConnectionState.CatchingUp\n\t| ConnectionState.Connected;\n\n/**\n * The Host's view of a Container and its connection to storage\n * @legacy\n * @alpha\n */\nexport interface IContainer extends IEventProvider<IContainerEvents> {\n\t/**\n\t * The Delta Manager supporting the op stream for this Container\n\t */\n\tdeltaManager: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>;\n\n\t/**\n\t * The collection of write clients which were connected as of the current sequence number.\n\t * Also contains a map of key-value pairs that must be agreed upon by all clients before being accepted.\n\t */\n\tgetQuorum(): IQuorumClients;\n\n\t/**\n\t * Represents the resolved url to the Container.\n\t * Will be undefined only when the container is in the {@link AttachState.Detached | detached} state.\n\t */\n\tresolvedUrl: IResolvedUrl | 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\t/**\n\t * Get the code details that are currently specified for the container.\n\t * @returns The current code details if any are specified, undefined if none are specified.\n\t */\n\tgetSpecifiedCodeDetails(): IFluidCodeDetails | undefined;\n\n\t/**\n\t * Get the code details that were used to load the container.\n\t * @returns The code details that were used to load the container if it is loaded, undefined if it is not yet\n\t * loaded.\n\t */\n\tgetLoadedCodeDetails(): IFluidCodeDetails | undefined;\n\n\t/**\n\t * Returns true if the container has been closed and/or disposed, otherwise false.\n\t */\n\treadonly closed: boolean;\n\n\t/**\n\t * Returns true if the container has been disposed, otherwise false.\n\t */\n\treadonly disposed?: boolean;\n\n\t/**\n\t * Whether or not there are any local changes that have not been saved.\n\t */\n\treadonly isDirty: boolean;\n\n\t/**\n\t * Disposes the container. If not already closed, this acts as a closure and then disposes runtime resources.\n\t * The container is not expected to be used anymore once it is disposed.\n\t *\n\t * @param error - If the container is being disposed due to error, this provides details about the error that\n\t * resulted in disposing it.\n\t */\n\tdispose(error?: ICriticalContainerError): void;\n\n\t/**\n\t * Closes the container.\n\t *\n\t * @param error - If the container is being closed due to error, this provides details about the error that\n\t * resulted in closing it.\n\t */\n\tclose(error?: ICriticalContainerError): void;\n\n\t/**\n\t * Propose new code details that define the code to be loaded for this container's runtime.\n\t *\n\t * The returned promise will be true when the proposal is accepted, and false if the proposal is rejected.\n\t */\n\tproposeCodeDetails(codeDetails: IFluidCodeDetails): Promise<boolean>;\n\n\t/**\n\t * When a container is created in Fluid it starts in detached state,\n\t * which means it is not yet uploaded to server storage and unavailable for other users to open or collaborate with.\n\t * A detached container can be serialized, stored, and rehydrated by the application.\n\t *\n\t * To finish the creation of a container and make it available for other users to open and collaborate with it must be attached,\n\t * which means it is uploaded to server storage. This function accomplishes that.\n\t *\n\t * Use the functionality provided by the driver to craft the IRequest parameter.\n\t * This is usually a free function called createCreateNewRequest, which takes\n\t * strongly typed arguments related to your driver and server.\n\t *\n\t * By default, the container will close if attach fails.\n\t * However, closure can now be avoided in most cased by setting:\n\t * Fluid.Container.RetryOnAttachFailure to true\n\t * via the config provider passed to the loader.\n\t *\n\t * If attach fails, check the closed property to discover if retry is possible.\n\t * If the container is not closed, it is safe to continue editing the container, calling serialize to capture the container's state,\n\t * or try calling attach again.\n\t *\n\t */\n\tattach(\n\t\trequest: IRequest,\n\t\tattachProps?: { deltaConnection?: \"none\" | \"delayed\" },\n\t): Promise<void>;\n\n\t/**\n\t * Capture the state of a container that is not attached or closed.\n\t * This is useful in draft-like scenarios. For example, think of an email draft, where a user can make changes over time,\n\t * but no other users can see or have access to that draft.\n\t *\n\t * This method can only be called when\n\t * the container's closed property is false, and the attachState is not AttachState.Attached.\n\t *\n\t * This method will return a string that includes the full serialized state of the\n\t * container. This string must not be inspected or modified, as the format of the content is not guaranteed.\n\t * @remarks\n\t * Fluid supports rehydrating from strings generated by previous versions, but does not support the content itself being leveraged.\n\t *\n\t * Consider storing this string somewhere durable (e.g. localStorage or IndexedDB) to enable your application to recover it after tab close.\n\t *\n\t * To reload a container from a string your application previously stored, use the Loader method rehydrateDetachedContainerFromSnapshot.\n\t * That method will create a new detached container which matches the state of the previously serialized container.\n\t */\n\tserialize(): string;\n\n\t/**\n\t * Get an absolute URL for a provided container-relative request URL.\n\t * If the container is not attached, this will return undefined.\n\t *\n\t * @param relativeUrl - A container-relative request URL.\n\t */\n\tgetAbsoluteUrl(relativeUrl: string): Promise<string | undefined>;\n\n\t/**\n\t * Provides the current state of the container's connection to the ordering service.\n\t *\n\t * @remarks Consumers can listen for state changes via the \"connected\" and \"disconnected\" events.\n\t */\n\treadonly connectionState: ConnectionState;\n\n\t/**\n\t * Attempts to connect the container to the delta stream and process ops.\n\t *\n\t * @remarks\n\t *\n\t * {@link IContainer.connectionState} will be set to {@link (ConnectionState:namespace).Connected}, and the\n\t * \"connected\" event will be fired if/when connection succeeds.\n\t */\n\tconnect(): void;\n\n\t/**\n\t * Disconnects the container from the delta stream and stops processing ops.\n\t *\n\t * @remarks\n\t *\n\t * {@link IContainer.connectionState} will be set to {@link (ConnectionState:namespace).Disconnected}, and the\n\t * \"disconnected\" event will be fired when disconnection completes.\n\t */\n\tdisconnect(): void;\n\n\t/**\n\t * The audience information for all clients currently associated with the document in the current session.\n\t */\n\treadonly audience: IAudience;\n\n\t/**\n\t * The server provided ID of the client.\n\t *\n\t * Set once {@link IContainer.connectionState} is {@link (ConnectionState:namespace).Connected},\n\t * otherwise will be `undefined`.\n\t */\n\treadonly clientId?: string | undefined;\n\n\t/**\n\t * Tells if container is in read-only mode.\n\t *\n\t * @remarks\n\t *\n\t * Data stores should listen for \"readonly\" notifications and disallow user making changes to data stores.\n\t * Readonly state can be because of no storage write permission,\n\t * or due to host forcing readonly mode for container.\n\t *\n\t * We do not differentiate here between no write access to storage vs. host disallowing changes to container -\n\t * in all cases container runtime and data stores should respect readonly state and not allow local changes.\n\t *\n\t * It is undefined if we have not yet established websocket connection\n\t * and do not know if user has write access to a file.\n\t */\n\treadonly readOnlyInfo: ReadOnlyInfo;\n\n\t/**\n\t * Allows the host to have the container force to be in read-only mode\n\t * @param readonly - Boolean that toggles if read-only policies will be enforced\n\t */\n\tforceReadonly?(readonly: boolean);\n\n\t/**\n\t * Exposes the entryPoint for the container.\n\t * Use this as the primary way of getting access to the user-defined logic within the container.\n\t */\n\tgetEntryPoint(): Promise<FluidObject>;\n\n\t/**\n\t * Exposes any metadata/props related to the container. This is full set of metadata props which the container wants to\n\t * expose. Whenever container receives updates from `IContainerEvents.metadataUpdate` event, we overwrite only those\n\t * updated props in the update and rest remains the same.\n\t */\n\tcontainerMetadata: Record<string, string>;\n}\n\n/**\n * The Runtime's view of the Loader, used for loading Containers\n * @legacy\n * @alpha\n */\nexport interface ILoader extends Partial<IProvideLoader> {\n\t/**\n\t * Resolves the resource specified by the URL + headers contained in the request object\n\t * to the underlying container that will resolve the request.\n\t *\n\t * @remarks\n\t *\n\t * An analogy for this is resolve is a DNS resolve of a Fluid container. Request then executes\n\t * a request against the server found from the resolve step.\n\t */\n\tresolve(request: IRequest, pendingLocalState?: string): Promise<IContainer>;\n}\n\n/**\n * The Host's view of the Loader, used for loading Containers\n * @legacy\n * @alpha\n */\nexport interface IHostLoader extends ILoader {\n\t/**\n\t * Creates a new container using the specified chaincode but in an unattached state. While unattached all\n\t * updates will only be local until the user explicitly attaches the container to a service provider.\n\t */\n\tcreateDetachedContainer(\n\t\tcodeDetails: IFluidCodeDetails,\n\t\tcreateDetachedProps?: {\n\t\t\tcanReconnect?: boolean;\n\t\t\tclientDetailsOverride?: IClientDetails;\n\t\t},\n\t): Promise<IContainer>;\n\n\t/**\n\t * Creates a new container using the specified snapshot but in an unattached state. While unattached all\n\t * updates will only be local until the user explicitly attaches the container to a service provider.\n\t */\n\trehydrateDetachedContainerFromSnapshot(\n\t\tsnapshot: string,\n\t\tcreateDetachedProps?: {\n\t\t\tcanReconnect?: boolean;\n\t\t\tclientDetailsOverride?: IClientDetails;\n\t\t},\n\t): Promise<IContainer>;\n}\n\n/**\n * Options to configure various behaviors of the ILoader.\n * @legacy\n * @alpha\n */\n// eslint-disable-next-line @typescript-eslint/consistent-type-definitions\nexport type ILoaderOptions = {\n\t/**\n\t * @deprecated This option has been deprecated and will be removed in a future release\n\t * Set caching behavior for the loader. If true, we will load a container from cache if one\n\t * with the same id/version exists or create a new container and cache it if it does not. If\n\t * false, always load a new container and don't cache it. If the container has already been\n\t * closed, it will not be cached. A cache option in the LoaderHeader for an individual\n\t * request will override the Loader's value.\n\t * Defaults to false.\n\t */\n\tcache?: boolean;\n\n\t/**\n\t * @deprecated Do not use.\n\t */\n\tclient?: IClient;\n\n\t/**\n\t * @deprecated Do not use.\n\t */\n\tenableOfflineLoad?: boolean;\n\n\t/**\n\t * Provide the current Loader through the scope object when creating Containers. It is added\n\t * as the `ILoader` property, and will overwrite an existing property of the same name on the\n\t * scope. Useful for when the host wants to provide the current Loader's functionality to\n\t * individual Data Stores, which is typically expected when creating with a Loader.\n\t * Defaults to true.\n\t */\n\tprovideScopeLoader?: boolean;\n\n\t/**\n\t * Max time (in ms) container will wait for a leave message of a disconnected client.\n\t */\n\tmaxClientLeaveWaitTime?: number;\n};\n\n/**\n * Accepted header keys for requests coming to the Loader\n * @legacy\n * @alpha\n */\nexport enum LoaderHeader {\n\t/**\n\t * @deprecated This header has been deprecated and will be removed in a future release\n\t * Override the Loader's default caching behavior for this container.\n\t */\n\tcache = \"fluid-cache\",\n\n\tclientDetails = \"fluid-client-details\",\n\n\t/**\n\t * Start the container in a paused, unconnected state. Defaults to false\n\t */\n\tloadMode = \"loadMode\",\n\treconnect = \"fluid-reconnect\",\n\t/**\n\t * Loads the container to at least the specified sequence number.\n\t * If not defined, behavior will fall back to `IContainerLoadMode.opsBeforeReturn`.\n\t */\n\tsequenceNumber = \"fluid-sequence-number\",\n\n\t/**\n\t * One of the following:\n\t * null or \"null\": use ops, no snapshots\n\t * undefined: fetch latest snapshot\n\t * otherwise, version sha to load snapshot\n\t */\n\tversion = \"version\",\n}\n\n/**\n * @legacy\n * @alpha\n */\nexport interface IContainerLoadMode {\n\topsBeforeReturn?: /*\n\t * No trailing ops are applied before container is returned.\n\t * Default value.\n\t */\n\t\t| undefined\n\t\t/*\n\t\t * Only cached trailing ops are applied before returning container.\n\t\t * Caching is optional and could be implemented by the driver.\n\t\t * If driver does not implement any kind of local caching strategy, this is same as above.\n\t\t * Driver may cache a lot of ops, so care needs to be exercised (see below).\n\t\t */\n\t\t| \"cached\"\n\t\t/*\n\t\t * All trailing ops in storage are fetched and applied before container is returned\n\t\t * This mode might have significant impact on boot speed (depends on storage perf characteristics)\n\t\t * Also there might be a lot of trailing ops and applying them might take time, so hosts are\n\t\t * recommended to have some progress UX / cancellation built into loading flow when using this option.\n\t\t * WARNING: This is the only option that may result in unbound wait. If machine is offline or hits some other\n\t\t * errors (like 429s), it may get into inifinite retry loop, with no ability to observe or cancel that process.\n\t\t */\n\t\t| \"all\";\n\n\tdeltaConnection?: /*\n\t * Connection to delta stream is made only when Container.connect() call is made. Op processing\n\t * is paused (when container is returned from Loader.resolve()) until Container.connect() call is made.\n\t */\n\t\t| \"none\"\n\t\t/*\n\t\t * Connection to delta stream is made only when Container.connect() call is made.\n\t\t * Op fetching from storage is performed and ops are applied as they come in.\n\t\t * This is useful option if connection to delta stream is expensive and thus it's beneficial to move it\n\t\t * out from critical boot sequence, but it's beneficial to allow catch up to happen as fast as possible.\n\t\t */\n\t\t| \"delayed\"\n\t\t/*\n\t\t * Connection to delta stream is made right away.\n\t\t * Ops processing is enabled and ops are flowing through the system.\n\t\t * Default value.\n\t\t */\n\t\t| undefined;\n}\n\n/**\n * Set of Request Headers that the Loader understands and may inspect or modify\n * @internal\n */\nexport interface ILoaderHeader {\n\t/**\n\t * @deprecated This header has been deprecated and will be removed in a future release\n\t */\n\t[LoaderHeader.cache]: boolean;\n\t[LoaderHeader.clientDetails]: IClientDetails;\n\t[LoaderHeader.loadMode]: IContainerLoadMode;\n\t[LoaderHeader.reconnect]: boolean;\n\t[LoaderHeader.version]: string | undefined;\n}\n\n/**\n * @legacy\n * @alpha\n */\nexport interface IProvideLoader {\n\treadonly ILoader: ILoader;\n}\n\n/**\n * This is used when we rehydrate a container from the snapshot. Here we put the blob contents\n * in separate property: {@link ISnapshotTreeWithBlobContents.blobsContents}.\n *\n * @remarks This is used as the `ContainerContext`'s base snapshot when attaching.\n * @legacy\n * @alpha\n */\nexport interface ISnapshotTreeWithBlobContents extends ISnapshotTree {\n\tblobsContents?: { [path: string]: ArrayBufferLike };\n\ttrees: { [path: string]: ISnapshotTreeWithBlobContents };\n}\n"]}
|
|
1
|
+
{"version":3,"file":"loader.js","sourceRoot":"","sources":["../src/loader.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAknBH;;;;GAIG;AACH,IAAY,YA2BX;AA3BD,WAAY,YAAY;IACvB;;;OAGG;IACH,qCAAqB,CAAA;IAErB,sDAAsC,CAAA;IAEtC;;OAEG;IACH,qCAAqB,CAAA;IACrB,6CAA6B,CAAA;IAC7B;;;OAGG;IACH,wDAAwC,CAAA;IAExC;;;;;OAKG;IACH,mCAAmB,CAAA;AACpB,CAAC,EA3BW,YAAY,4BAAZ,YAAY,QA2BvB","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type {\n\tFluidObject,\n\tIEvent,\n\tIEventProvider,\n\tIRequest,\n} from \"@fluidframework/core-interfaces\";\nimport type {\n\tIClient,\n\tIClientDetails,\n\tIQuorumClients,\n} from \"@fluidframework/driver-definitions\";\nimport type {\n\tIResolvedUrl,\n\tIDocumentMessage,\n\tISequencedProposal,\n\tISnapshotTree,\n\tISequencedDocumentMessage,\n\tIContainerPackageInfo,\n} from \"@fluidframework/driver-definitions/internal\";\n\nimport type { IAudience } from \"./audience.js\";\nimport type { IDeltaManager, ReadOnlyInfo } from \"./deltas.js\";\nimport type { ContainerWarning, ICriticalContainerError } from \"./error.js\";\nimport type { IFluidModule } from \"./fluidModule.js\";\nimport type {\n\tIFluidCodeDetails,\n\tIFluidPackage,\n\tIProvideFluidCodeDetailsComparer,\n} from \"./fluidPackage.js\";\nimport type { AttachState } from \"./runtime.js\";\n\n/**\n * Encapsulates a module entry point with corresponding code details.\n * @legacy\n * @alpha\n */\nexport interface IFluidModuleWithDetails {\n\t/**\n\t * Fluid code module that implements the runtime factory needed to instantiate the container runtime.\n\t */\n\tmodule: IFluidModule;\n\n\t/**\n\t * Code details associated with the module. Represents a document schema this module supports.\n\t * If the code loader implements the {@link @fluidframework/core-interfaces#(IFluidCodeDetailsComparer:interface)}\n\t * interface, it'll be called to determine whether the module code details satisfy the new code proposal in the\n\t * quorum.\n\t */\n\tdetails: IFluidCodeDetails;\n}\n\n/**\n * Fluid code loader resolves a code module matching the document schema, i.e. code details, such as\n * a package name and package version range.\n * @legacy\n * @alpha\n */\nexport interface ICodeDetailsLoader extends Partial<IProvideFluidCodeDetailsComparer> {\n\t/**\n\t * Load the code module (package) that can interact with the document.\n\t *\n\t * @param source - Code proposal that articulates the current schema the document is written in.\n\t * @returns Code module entry point along with the code details associated with it.\n\t */\n\tload(source: IFluidCodeDetails): Promise<IFluidModuleWithDetails>;\n}\n\n/**\n * The interface returned from a IFluidCodeResolver which represents IFluidCodeDetails\n * that have been resolved and are ready to load\n * @internal\n */\nexport interface IResolvedFluidCodeDetails extends IFluidCodeDetails {\n\t/**\n\t * A resolved version of the Fluid package. All Fluid browser file entries should be absolute urls.\n\t */\n\treadonly resolvedPackage: Readonly<IFluidPackage>;\n\t/**\n\t * If not undefined, this id will be used to cache the entry point for the code package\n\t */\n\treadonly resolvedPackageCacheId: string | undefined;\n}\n\n/**\n * Fluid code resolvers take a Fluid code details, and resolve the\n * full Fluid package including absolute urls for the browser file entries.\n * The Fluid code resolver is coupled to a specific cdn and knows how to resolve\n * the code detail for loading from that cdn. This include resolving to the most recent\n * version of package that supports the provided code details.\n * @internal\n */\nexport interface IFluidCodeResolver {\n\t/**\n\t * Resolves a Fluid code details into a form that can be loaded.\n\t * @param details - The Fluid code details to resolve.\n\t * @returns A IResolvedFluidCodeDetails where the resolvedPackage's Fluid file entries are absolute urls, and\n\t * an optional resolvedPackageCacheId if the loaded package should be cached.\n\t */\n\tresolveCodeDetails(details: IFluidCodeDetails): Promise<IResolvedFluidCodeDetails>;\n}\n\n/**\n * Events emitted by the {@link IContainer} \"upwards\" to the Loader and Host.\n * @legacy\n * @alpha\n */\nexport interface IContainerEvents extends IEvent {\n\t/**\n\t * Emitted when the readonly state of the container changes.\n\t *\n\t * @remarks Listener parameters:\n\t *\n\t * - `readonly`: Whether or not the container is now in a readonly state.\n\t *\n\t * @see {@link IContainer.readOnlyInfo}\n\t */\n\t(event: \"readonly\", listener: (readonly: boolean) => void): void;\n\n\t/**\n\t * Emitted when the {@link IContainer} 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 IContainer.connectionState}\n\t *\n\t * - {@link IContainer.connect}\n\t */\n\t(event: \"connected\", listener: (clientId: string) => void);\n\n\t/**\n\t * Fires when new container code details have been proposed, prior to acceptance.\n\t *\n\t * @remarks Listener parameters:\n\t *\n\t * - `codeDetails`: The code details being proposed.\n\t *\n\t * - `proposal`: NOT RECOMMENDED FOR USE.\n\t *\n\t * @see {@link IContainer.proposeCodeDetails}\n\t */\n\t(\n\t\tevent: \"codeDetailsProposed\",\n\t\tlistener: (codeDetails: IFluidCodeDetails, proposal: ISequencedProposal) => void,\n\t);\n\n\t/**\n\t * Emitted when the {@link IContainer} 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 IContainer.connectionState}\n\t *\n\t * - {@link IContainer.disconnect}\n\t */\n\t(event: \"disconnected\", listener: () => void);\n\n\t/**\n\t * Emitted when a {@link AttachState.Detached | detached} container begins the process of\n\t * {@link AttachState.Attaching | attached} to the Fluid service.\n\t *\n\t * @see\n\t *\n\t * - {@link IContainer.attachState}\n\t *\n\t * - {@link IContainer.attach}\n\t */\n\t(event: \"attaching\", listener: () => void);\n\n\t/**\n\t * Emitted when the {@link AttachState.Attaching | attaching} process is complete and the container is\n\t * {@link AttachState.Attached | attached} to the Fluid service.\n\t *\n\t * @see\n\t *\n\t * - {@link IContainer.attachState}\n\t *\n\t * - {@link IContainer.attach}\n\t */\n\t(event: \"attached\", listener: () => void);\n\n\t/**\n\t * Emitted when the {@link IContainer} 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, this will contain details about the error that caused it.\n\t *\n\t * @see {@link IContainer.close}\n\t */\n\t(event: \"closed\", listener: (error?: ICriticalContainerError) => void);\n\n\t/**\n\t * Emitted when the {@link IContainer} is disposed, which permanently disables it.\n\t *\n\t * @remarks Listener parameters:\n\t *\n\t * - `error`: If the container was disposed due to error, this will contain details about the error that caused it.\n\t *\n\t * @see {@link IContainer.dispose}\n\t */\n\t(event: \"disposed\", listener: (error?: ICriticalContainerError) => void);\n\n\t/**\n\t * Emitted when the container encounters a state which may lead to errors, which may be actionable by the consumer.\n\t *\n\t * @remarks\n\t *\n\t * Note: this event is not intended for general use.\n\t * The longer-term intention is to surface warnings more directly on the APIs that produce them.\n\t * For now, use of this should be avoided when possible.\n\t *\n\t * Listener parameters:\n\t *\n\t * - `error`: The warning describing the encountered state.\n\t */\n\t(event: \"warning\", listener: (error: ContainerWarning) => void);\n\n\t/**\n\t * Emitted immediately after processing an incoming operation (op).\n\t *\n\t * @remarks\n\t *\n\t * Note: this event is not intended for general use.\n\t * Prefer to listen to events on the appropriate ultimate recipients of the ops, rather than listening to the\n\t * ops directly on the {@link IContainer}.\n\t *\n\t * Listener parameters:\n\t *\n\t * - `message`: The op that was processed.\n\t */\n\t(event: \"op\", listener: (message: ISequencedDocumentMessage) => void);\n\n\t/**\n\t * Emitted upon the first local change while the Container is in the \"saved\" state.\n\t * That is, when {@link IContainer.isDirty} transitions from `true` to `false`.\n\t *\n\t * @remarks Listener parameters:\n\t *\n\t * - `dirty`: DEPRECATED. This parameter will be removed in a future release.\n\t *\n\t * @see {@link IContainer.isDirty}\n\t */\n\t(event: \"dirty\", listener: (dirty: boolean) => void);\n\n\t/**\n\t * Emitted when all local changes/edits have been acknowledged by the service.\n\t * I.e., when {@link IContainer.isDirty} transitions from `false` to `true`.\n\t *\n\t * @remarks Listener parameters:\n\t *\n\t * - `dirty`: DEPRECATED. This parameter will be removed in a future release.\n\t *\n\t * @see {@link IContainer.isDirty}\n\t */\n\t(event: \"saved\", listener: (dirty: boolean) => void);\n\n\t/**\n\t * Emitted when the some of the properties related to the container are initialized or updated.\n\t * This emitted metadata will the props which are updated. If consumer wants to read full set of\n\t * metadata then they can read it off the container from {@link IContainer.containerMetadata} prop.\n\t */\n\t(event: \"metadataUpdate\", listener: (metadata: Record<string, string>) => void);\n}\n\n/**\n * Namespace for the different connection states a container can be in.\n * PLEASE NOTE: The sequence of the numerical values does no correspond to the typical connection state progression.\n * @public\n */\n// eslint-disable-next-line @typescript-eslint/no-namespace\nexport namespace ConnectionState {\n\t/**\n\t * The container is not connected to the delta server.\n\t * Note - When in this state the container may be about to reconnect,\n\t * or may remain disconnected until explicitly told to connect.\n\t * @public\n\t */\n\texport type Disconnected = 0;\n\n\t/**\n\t * The container is disconnected but actively trying to establish a new connection.\n\t * PLEASE NOTE that this numerical value falls out of the order you may expect for this state.\n\t * @public\n\t */\n\texport type EstablishingConnection = 3;\n\n\t/**\n\t * The container has an inbound connection only, and is catching up to the latest known state from the service.\n\t * @public\n\t */\n\texport type CatchingUp = 1;\n\n\t/**\n\t * The container is fully connected and syncing.\n\t * @public\n\t */\n\texport type Connected = 2;\n}\n\n/**\n * Type defining the different states of connectivity a Container can be in.\n * @public\n */\nexport type ConnectionState =\n\t| ConnectionState.Disconnected\n\t| ConnectionState.EstablishingConnection\n\t| ConnectionState.CatchingUp\n\t| ConnectionState.Connected;\n\n/**\n * The Host's view of a Container and its connection to storage\n * @legacy\n * @alpha\n */\nexport interface IContainer extends IEventProvider<IContainerEvents> {\n\t/**\n\t * The Delta Manager supporting the op stream for this Container\n\t */\n\tdeltaManager: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>;\n\n\t/**\n\t * The collection of write clients which were connected as of the current sequence number.\n\t * Also contains a map of key-value pairs that must be agreed upon by all clients before being accepted.\n\t */\n\tgetQuorum(): IQuorumClients;\n\n\t/**\n\t * Represents the resolved url to the Container.\n\t * Will be undefined only when the container is in the {@link AttachState.Detached | detached} state.\n\t */\n\tresolvedUrl: IResolvedUrl | 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\t/**\n\t * Get the code details that are currently specified for the container.\n\t * @returns The current code details if any are specified, undefined if none are specified.\n\t */\n\tgetSpecifiedCodeDetails(): IFluidCodeDetails | undefined;\n\n\t/**\n\t * Get the code details that were used to load the container.\n\t * @returns The code details that were used to load the container if it is loaded, undefined if it is not yet\n\t * loaded.\n\t */\n\tgetLoadedCodeDetails(): IFluidCodeDetails | undefined;\n\n\t/**\n\t * Get the package info for the code details that were used to load the container.\n\t * @returns The package info for the code details that were used to load the container if it is loaded, undefined if\n\t * the container package doesn't have a name.\n\t */\n\tgetContainerPackageInfo?(): IContainerPackageInfo | undefined;\n\n\t/**\n\t * Returns true if the container has been closed and/or disposed, otherwise false.\n\t */\n\treadonly closed: boolean;\n\n\t/**\n\t * Returns true if the container has been disposed, otherwise false.\n\t */\n\treadonly disposed?: boolean;\n\n\t/**\n\t * Whether or not there are any local changes that have not been saved.\n\t */\n\treadonly isDirty: boolean;\n\n\t/**\n\t * Disposes the container. If not already closed, this acts as a closure and then disposes runtime resources.\n\t * The container is not expected to be used anymore once it is disposed.\n\t *\n\t * @param error - If the container is being disposed due to error, this provides details about the error that\n\t * resulted in disposing it.\n\t */\n\tdispose(error?: ICriticalContainerError): void;\n\n\t/**\n\t * Closes the container.\n\t *\n\t * @param error - If the container is being closed due to error, this provides details about the error that\n\t * resulted in closing it.\n\t */\n\tclose(error?: ICriticalContainerError): void;\n\n\t/**\n\t * Propose new code details that define the code to be loaded for this container's runtime.\n\t *\n\t * The returned promise will be true when the proposal is accepted, and false if the proposal is rejected.\n\t */\n\tproposeCodeDetails(codeDetails: IFluidCodeDetails): Promise<boolean>;\n\n\t/**\n\t * When a container is created in Fluid it starts in detached state,\n\t * which means it is not yet uploaded to server storage and unavailable for other users to open or collaborate with.\n\t * A detached container can be serialized, stored, and rehydrated by the application.\n\t *\n\t * To finish the creation of a container and make it available for other users to open and collaborate with it must be attached,\n\t * which means it is uploaded to server storage. This function accomplishes that.\n\t *\n\t * Use the functionality provided by the driver to craft the IRequest parameter.\n\t * This is usually a free function called createCreateNewRequest, which takes\n\t * strongly typed arguments related to your driver and server.\n\t *\n\t * By default, the container will close if attach fails.\n\t * However, closure can now be avoided in most cased by setting:\n\t * Fluid.Container.RetryOnAttachFailure to true\n\t * via the config provider passed to the loader.\n\t *\n\t * If attach fails, check the closed property to discover if retry is possible.\n\t * If the container is not closed, it is safe to continue editing the container, calling serialize to capture the container's state,\n\t * or try calling attach again.\n\t *\n\t */\n\tattach(\n\t\trequest: IRequest,\n\t\tattachProps?: { deltaConnection?: \"none\" | \"delayed\" },\n\t): Promise<void>;\n\n\t/**\n\t * Capture the state of a container that is not attached or closed.\n\t * This is useful in draft-like scenarios. For example, think of an email draft, where a user can make changes over time,\n\t * but no other users can see or have access to that draft.\n\t *\n\t * This method can only be called when\n\t * the container's closed property is false, and the attachState is not AttachState.Attached.\n\t *\n\t * This method will return a string that includes the full serialized state of the\n\t * container. This string must not be inspected or modified, as the format of the content is not guaranteed.\n\t * @remarks\n\t * Fluid supports rehydrating from strings generated by previous versions, but does not support the content itself being leveraged.\n\t *\n\t * Consider storing this string somewhere durable (e.g. localStorage or IndexedDB) to enable your application to recover it after tab close.\n\t *\n\t * To reload a container from a string your application previously stored, use the Loader method rehydrateDetachedContainerFromSnapshot.\n\t * That method will create a new detached container which matches the state of the previously serialized container.\n\t */\n\tserialize(): string;\n\n\t/**\n\t * Get an absolute URL for a provided container-relative request URL.\n\t * If the container is not attached, this will return undefined.\n\t *\n\t * @param relativeUrl - A container-relative request URL.\n\t */\n\tgetAbsoluteUrl(relativeUrl: string): Promise<string | undefined>;\n\n\t/**\n\t * Provides the current state of the container's connection to the ordering service.\n\t *\n\t * @remarks Consumers can listen for state changes via the \"connected\" and \"disconnected\" events.\n\t */\n\treadonly connectionState: ConnectionState;\n\n\t/**\n\t * Attempts to connect the container to the delta stream and process ops.\n\t *\n\t * @remarks\n\t *\n\t * {@link IContainer.connectionState} will be set to {@link (ConnectionState:namespace).Connected}, and the\n\t * \"connected\" event will be fired if/when connection succeeds.\n\t */\n\tconnect(): void;\n\n\t/**\n\t * Disconnects the container from the delta stream and stops processing ops.\n\t *\n\t * @remarks\n\t *\n\t * {@link IContainer.connectionState} will be set to {@link (ConnectionState:namespace).Disconnected}, and the\n\t * \"disconnected\" event will be fired when disconnection completes.\n\t */\n\tdisconnect(): void;\n\n\t/**\n\t * The audience information for all clients currently associated with the document in the current session.\n\t */\n\treadonly audience: IAudience;\n\n\t/**\n\t * The server provided ID of the client.\n\t *\n\t * Set once {@link IContainer.connectionState} is {@link (ConnectionState:namespace).Connected},\n\t * otherwise will be `undefined`.\n\t */\n\treadonly clientId?: string | undefined;\n\n\t/**\n\t * Tells if container is in read-only mode.\n\t *\n\t * @remarks\n\t *\n\t * Data stores should listen for \"readonly\" notifications and disallow user making changes to data stores.\n\t * Readonly state can be because of no storage write permission,\n\t * or due to host forcing readonly mode for container.\n\t *\n\t * We do not differentiate here between no write access to storage vs. host disallowing changes to container -\n\t * in all cases container runtime and data stores should respect readonly state and not allow local changes.\n\t *\n\t * It is undefined if we have not yet established websocket connection\n\t * and do not know if user has write access to a file.\n\t */\n\treadonly readOnlyInfo: ReadOnlyInfo;\n\n\t/**\n\t * Allows the host to have the container force to be in read-only mode\n\t * @param readonly - Boolean that toggles if read-only policies will be enforced\n\t */\n\tforceReadonly?(readonly: boolean);\n\n\t/**\n\t * Exposes the entryPoint for the container.\n\t * Use this as the primary way of getting access to the user-defined logic within the container.\n\t */\n\tgetEntryPoint(): Promise<FluidObject>;\n\n\t/**\n\t * Exposes any metadata/props related to the container. This is full set of metadata props which the container wants to\n\t * expose. Whenever container receives updates from `IContainerEvents.metadataUpdate` event, we overwrite only those\n\t * updated props in the update and rest remains the same.\n\t */\n\tcontainerMetadata: Record<string, string>;\n}\n\n/**\n * The Runtime's view of the Loader, used for loading Containers\n * @legacy\n * @alpha\n */\nexport interface ILoader extends Partial<IProvideLoader> {\n\t/**\n\t * Resolves the resource specified by the URL + headers contained in the request object\n\t * to the underlying container that will resolve the request.\n\t *\n\t * @remarks\n\t *\n\t * An analogy for this is resolve is a DNS resolve of a Fluid container. Request then executes\n\t * a request against the server found from the resolve step.\n\t */\n\tresolve(request: IRequest, pendingLocalState?: string): Promise<IContainer>;\n}\n\n/**\n * The Host's view of the Loader, used for loading Containers\n * @legacy\n * @alpha\n */\nexport interface IHostLoader extends ILoader {\n\t/**\n\t * Creates a new container using the specified chaincode but in an unattached state. While unattached all\n\t * updates will only be local until the user explicitly attaches the container to a service provider.\n\t */\n\tcreateDetachedContainer(\n\t\tcodeDetails: IFluidCodeDetails,\n\t\tcreateDetachedProps?: {\n\t\t\tcanReconnect?: boolean;\n\t\t\tclientDetailsOverride?: IClientDetails;\n\t\t},\n\t): Promise<IContainer>;\n\n\t/**\n\t * Creates a new container using the specified snapshot but in an unattached state. While unattached all\n\t * updates will only be local until the user explicitly attaches the container to a service provider.\n\t */\n\trehydrateDetachedContainerFromSnapshot(\n\t\tsnapshot: string,\n\t\tcreateDetachedProps?: {\n\t\t\tcanReconnect?: boolean;\n\t\t\tclientDetailsOverride?: IClientDetails;\n\t\t},\n\t): Promise<IContainer>;\n}\n\n/**\n * Options to configure various behaviors of the ILoader.\n * @legacy\n * @alpha\n */\n// eslint-disable-next-line @typescript-eslint/consistent-type-definitions\nexport type ILoaderOptions = {\n\t/**\n\t * @deprecated This option has been deprecated and will be removed in a future release\n\t * Set caching behavior for the loader. If true, we will load a container from cache if one\n\t * with the same id/version exists or create a new container and cache it if it does not. If\n\t * false, always load a new container and don't cache it. If the container has already been\n\t * closed, it will not be cached. A cache option in the LoaderHeader for an individual\n\t * request will override the Loader's value.\n\t * Defaults to false.\n\t */\n\tcache?: boolean;\n\n\t/**\n\t * @deprecated Do not use.\n\t */\n\tclient?: IClient;\n\n\t/**\n\t * @deprecated Do not use.\n\t */\n\tenableOfflineLoad?: boolean;\n\n\t/**\n\t * Provide the current Loader through the scope object when creating Containers. It is added\n\t * as the `ILoader` property, and will overwrite an existing property of the same name on the\n\t * scope. Useful for when the host wants to provide the current Loader's functionality to\n\t * individual Data Stores, which is typically expected when creating with a Loader.\n\t * Defaults to true.\n\t */\n\tprovideScopeLoader?: boolean;\n\n\t/**\n\t * Max time (in ms) container will wait for a leave message of a disconnected client.\n\t */\n\tmaxClientLeaveWaitTime?: number;\n};\n\n/**\n * Accepted header keys for requests coming to the Loader\n * @legacy\n * @alpha\n */\nexport enum LoaderHeader {\n\t/**\n\t * @deprecated This header has been deprecated and will be removed in a future release\n\t * Override the Loader's default caching behavior for this container.\n\t */\n\tcache = \"fluid-cache\",\n\n\tclientDetails = \"fluid-client-details\",\n\n\t/**\n\t * Start the container in a paused, unconnected state. Defaults to false\n\t */\n\tloadMode = \"loadMode\",\n\treconnect = \"fluid-reconnect\",\n\t/**\n\t * Loads the container to at least the specified sequence number.\n\t * If not defined, behavior will fall back to `IContainerLoadMode.opsBeforeReturn`.\n\t */\n\tsequenceNumber = \"fluid-sequence-number\",\n\n\t/**\n\t * One of the following:\n\t * null or \"null\": use ops, no snapshots\n\t * undefined: fetch latest snapshot\n\t * otherwise, version sha to load snapshot\n\t */\n\tversion = \"version\",\n}\n\n/**\n * @legacy\n * @alpha\n */\nexport interface IContainerLoadMode {\n\topsBeforeReturn?: /*\n\t * No trailing ops are applied before container is returned.\n\t * Default value.\n\t */\n\t\t| undefined\n\t\t/*\n\t\t * Only cached trailing ops are applied before returning container.\n\t\t * Caching is optional and could be implemented by the driver.\n\t\t * If driver does not implement any kind of local caching strategy, this is same as above.\n\t\t * Driver may cache a lot of ops, so care needs to be exercised (see below).\n\t\t */\n\t\t| \"cached\"\n\t\t/*\n\t\t * All trailing ops in storage are fetched and applied before container is returned\n\t\t * This mode might have significant impact on boot speed (depends on storage perf characteristics)\n\t\t * Also there might be a lot of trailing ops and applying them might take time, so hosts are\n\t\t * recommended to have some progress UX / cancellation built into loading flow when using this option.\n\t\t * WARNING: This is the only option that may result in unbound wait. If machine is offline or hits some other\n\t\t * errors (like 429s), it may get into inifinite retry loop, with no ability to observe or cancel that process.\n\t\t */\n\t\t| \"all\";\n\n\tdeltaConnection?: /*\n\t * Connection to delta stream is made only when Container.connect() call is made. Op processing\n\t * is paused (when container is returned from Loader.resolve()) until Container.connect() call is made.\n\t */\n\t\t| \"none\"\n\t\t/*\n\t\t * Connection to delta stream is made only when Container.connect() call is made.\n\t\t * Op fetching from storage is performed and ops are applied as they come in.\n\t\t * This is useful option if connection to delta stream is expensive and thus it's beneficial to move it\n\t\t * out from critical boot sequence, but it's beneficial to allow catch up to happen as fast as possible.\n\t\t */\n\t\t| \"delayed\"\n\t\t/*\n\t\t * Connection to delta stream is made right away.\n\t\t * Ops processing is enabled and ops are flowing through the system.\n\t\t * Default value.\n\t\t */\n\t\t| undefined;\n}\n\n/**\n * Set of Request Headers that the Loader understands and may inspect or modify\n * @internal\n */\nexport interface ILoaderHeader {\n\t/**\n\t * @deprecated This header has been deprecated and will be removed in a future release\n\t */\n\t[LoaderHeader.cache]: boolean;\n\t[LoaderHeader.clientDetails]: IClientDetails;\n\t[LoaderHeader.loadMode]: IContainerLoadMode;\n\t[LoaderHeader.reconnect]: boolean;\n\t[LoaderHeader.version]: string | undefined;\n}\n\n/**\n * @legacy\n * @alpha\n */\nexport interface IProvideLoader {\n\treadonly ILoader: ILoader;\n}\n\n/**\n * This is used when we rehydrate a container from the snapshot. Here we put the blob contents\n * in separate property: {@link ISnapshotTreeWithBlobContents.blobsContents}.\n *\n * @remarks This is used as the `ContainerContext`'s base snapshot when attaching.\n * @legacy\n * @alpha\n */\nexport interface ISnapshotTreeWithBlobContents extends ISnapshotTree {\n\tblobsContents?: { [path: string]: ArrayBufferLike };\n\ttrees: { [path: string]: ISnapshotTreeWithBlobContents };\n}\n"]}
|
package/lib/loader.d.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import type { FluidObject, IEvent, IEventProvider, IRequest } from "@fluidframework/core-interfaces";
|
|
6
6
|
import type { IClient, IClientDetails, IQuorumClients } from "@fluidframework/driver-definitions";
|
|
7
|
-
import type { IResolvedUrl, IDocumentMessage, ISequencedProposal, ISnapshotTree, ISequencedDocumentMessage } from "@fluidframework/driver-definitions/internal";
|
|
7
|
+
import type { IResolvedUrl, IDocumentMessage, ISequencedProposal, ISnapshotTree, ISequencedDocumentMessage, IContainerPackageInfo } from "@fluidframework/driver-definitions/internal";
|
|
8
8
|
import type { IAudience } from "./audience.js";
|
|
9
9
|
import type { IDeltaManager, ReadOnlyInfo } from "./deltas.js";
|
|
10
10
|
import type { ContainerWarning, ICriticalContainerError } from "./error.js";
|
|
@@ -297,6 +297,12 @@ export interface IContainer extends IEventProvider<IContainerEvents> {
|
|
|
297
297
|
* loaded.
|
|
298
298
|
*/
|
|
299
299
|
getLoadedCodeDetails(): IFluidCodeDetails | undefined;
|
|
300
|
+
/**
|
|
301
|
+
* Get the package info for the code details that were used to load the container.
|
|
302
|
+
* @returns The package info for the code details that were used to load the container if it is loaded, undefined if
|
|
303
|
+
* the container package doesn't have a name.
|
|
304
|
+
*/
|
|
305
|
+
getContainerPackageInfo?(): IContainerPackageInfo | undefined;
|
|
300
306
|
/**
|
|
301
307
|
* Returns true if the container has been closed and/or disposed, otherwise false.
|
|
302
308
|
*/
|
package/lib/loader.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loader.d.ts","sourceRoot":"","sources":["../src/loader.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EACX,WAAW,EACX,MAAM,EACN,cAAc,EACd,QAAQ,EACR,MAAM,iCAAiC,CAAC;AACzC,OAAO,KAAK,EACX,OAAO,EACP,cAAc,EACd,cAAc,EACd,MAAM,oCAAoC,CAAC;AAC5C,OAAO,KAAK,EACX,YAAY,EACZ,gBAAgB,EAChB,kBAAkB,EAClB,aAAa,EACb,yBAAyB,EACzB,MAAM,6CAA6C,CAAC;AAErD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EA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C,EAAE,OAAO,CAAC;IAClC,CAAC,YAAY,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC3C;AAED;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC9B,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;CAC1B;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,6BAA8B,SAAQ,aAAa;IACnE,aAAa,CAAC,EAAE;QAAE,CAAC,IAAI,EAAE,MAAM,GAAG,eAAe,CAAA;KAAE,CAAC;IACpD,KAAK,EAAE;QAAE,CAAC,IAAI,EAAE,MAAM,GAAG,6BAA6B,CAAA;KAAE,CAAC;CACzD"}
|
package/lib/loader.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loader.js","sourceRoot":"","sources":["../src/loader.ts"],"names":[],"mappings":"AAAA;;;GAGG;AA0mBH;;;;GAIG;AACH,MAAM,CAAN,IAAY,YA2BX;AA3BD,WAAY,YAAY;IACvB;;;OAGG;IACH,qCAAqB,CAAA;IAErB,sDAAsC,CAAA;IAEtC;;OAEG;IACH,qCAAqB,CAAA;IACrB,6CAA6B,CAAA;IAC7B;;;OAGG;IACH,wDAAwC,CAAA;IAExC;;;;;OAKG;IACH,mCAAmB,CAAA;AACpB,CAAC,EA3BW,YAAY,KAAZ,YAAY,QA2BvB","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type {\n\tFluidObject,\n\tIEvent,\n\tIEventProvider,\n\tIRequest,\n} from \"@fluidframework/core-interfaces\";\nimport type {\n\tIClient,\n\tIClientDetails,\n\tIQuorumClients,\n} from \"@fluidframework/driver-definitions\";\nimport type {\n\tIResolvedUrl,\n\tIDocumentMessage,\n\tISequencedProposal,\n\tISnapshotTree,\n\tISequencedDocumentMessage,\n} from \"@fluidframework/driver-definitions/internal\";\n\nimport type { IAudience } from \"./audience.js\";\nimport type { IDeltaManager, ReadOnlyInfo } from \"./deltas.js\";\nimport type { ContainerWarning, ICriticalContainerError } from \"./error.js\";\nimport type { IFluidModule } from \"./fluidModule.js\";\nimport type {\n\tIFluidCodeDetails,\n\tIFluidPackage,\n\tIProvideFluidCodeDetailsComparer,\n} from \"./fluidPackage.js\";\nimport type { AttachState } from \"./runtime.js\";\n\n/**\n * Encapsulates a module entry point with corresponding code details.\n * @legacy\n * @alpha\n */\nexport interface IFluidModuleWithDetails {\n\t/**\n\t * Fluid code module that implements the runtime factory needed to instantiate the container runtime.\n\t */\n\tmodule: IFluidModule;\n\n\t/**\n\t * Code details associated with the module. Represents a document schema this module supports.\n\t * If the code loader implements the {@link @fluidframework/core-interfaces#(IFluidCodeDetailsComparer:interface)}\n\t * interface, it'll be called to determine whether the module code details satisfy the new code proposal in the\n\t * quorum.\n\t */\n\tdetails: IFluidCodeDetails;\n}\n\n/**\n * Fluid code loader resolves a code module matching the document schema, i.e. code details, such as\n * a package name and package version range.\n * @legacy\n * @alpha\n */\nexport interface ICodeDetailsLoader extends Partial<IProvideFluidCodeDetailsComparer> {\n\t/**\n\t * Load the code module (package) that can interact with the document.\n\t *\n\t * @param source - Code proposal that articulates the current schema the document is written in.\n\t * @returns Code module entry point along with the code details associated with it.\n\t */\n\tload(source: IFluidCodeDetails): Promise<IFluidModuleWithDetails>;\n}\n\n/**\n * The interface returned from a IFluidCodeResolver which represents IFluidCodeDetails\n * that have been resolved and are ready to load\n * @internal\n */\nexport interface IResolvedFluidCodeDetails extends IFluidCodeDetails {\n\t/**\n\t * A resolved version of the Fluid package. All Fluid browser file entries should be absolute urls.\n\t */\n\treadonly resolvedPackage: Readonly<IFluidPackage>;\n\t/**\n\t * If not undefined, this id will be used to cache the entry point for the code package\n\t */\n\treadonly resolvedPackageCacheId: string | undefined;\n}\n\n/**\n * Fluid code resolvers take a Fluid code details, and resolve the\n * full Fluid package including absolute urls for the browser file entries.\n * The Fluid code resolver is coupled to a specific cdn and knows how to resolve\n * the code detail for loading from that cdn. This include resolving to the most recent\n * version of package that supports the provided code details.\n * @internal\n */\nexport interface IFluidCodeResolver {\n\t/**\n\t * Resolves a Fluid code details into a form that can be loaded.\n\t * @param details - The Fluid code details to resolve.\n\t * @returns A IResolvedFluidCodeDetails where the resolvedPackage's Fluid file entries are absolute urls, and\n\t * an optional resolvedPackageCacheId if the loaded package should be cached.\n\t */\n\tresolveCodeDetails(details: IFluidCodeDetails): Promise<IResolvedFluidCodeDetails>;\n}\n\n/**\n * Events emitted by the {@link IContainer} \"upwards\" to the Loader and Host.\n * @legacy\n * @alpha\n */\nexport interface IContainerEvents extends IEvent {\n\t/**\n\t * Emitted when the readonly state of the container changes.\n\t *\n\t * @remarks Listener parameters:\n\t *\n\t * - `readonly`: Whether or not the container is now in a readonly state.\n\t *\n\t * @see {@link IContainer.readOnlyInfo}\n\t */\n\t(event: \"readonly\", listener: (readonly: boolean) => void): void;\n\n\t/**\n\t * Emitted when the {@link IContainer} 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 IContainer.connectionState}\n\t *\n\t * - {@link IContainer.connect}\n\t */\n\t(event: \"connected\", listener: (clientId: string) => void);\n\n\t/**\n\t * Fires when new container code details have been proposed, prior to acceptance.\n\t *\n\t * @remarks Listener parameters:\n\t *\n\t * - `codeDetails`: The code details being proposed.\n\t *\n\t * - `proposal`: NOT RECOMMENDED FOR USE.\n\t *\n\t * @see {@link IContainer.proposeCodeDetails}\n\t */\n\t(\n\t\tevent: \"codeDetailsProposed\",\n\t\tlistener: (codeDetails: IFluidCodeDetails, proposal: ISequencedProposal) => void,\n\t);\n\n\t/**\n\t * Emitted when the {@link IContainer} 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 IContainer.connectionState}\n\t *\n\t * - {@link IContainer.disconnect}\n\t */\n\t(event: \"disconnected\", listener: () => void);\n\n\t/**\n\t * Emitted when a {@link AttachState.Detached | detached} container begins the process of\n\t * {@link AttachState.Attaching | attached} to the Fluid service.\n\t *\n\t * @see\n\t *\n\t * - {@link IContainer.attachState}\n\t *\n\t * - {@link IContainer.attach}\n\t */\n\t(event: \"attaching\", listener: () => void);\n\n\t/**\n\t * Emitted when the {@link AttachState.Attaching | attaching} process is complete and the container is\n\t * {@link AttachState.Attached | attached} to the Fluid service.\n\t *\n\t * @see\n\t *\n\t * - {@link IContainer.attachState}\n\t *\n\t * - {@link IContainer.attach}\n\t */\n\t(event: \"attached\", listener: () => void);\n\n\t/**\n\t * Emitted when the {@link IContainer} 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, this will contain details about the error that caused it.\n\t *\n\t * @see {@link IContainer.close}\n\t */\n\t(event: \"closed\", listener: (error?: ICriticalContainerError) => void);\n\n\t/**\n\t * Emitted when the {@link IContainer} is disposed, which permanently disables it.\n\t *\n\t * @remarks Listener parameters:\n\t *\n\t * - `error`: If the container was disposed due to error, this will contain details about the error that caused it.\n\t *\n\t * @see {@link IContainer.dispose}\n\t */\n\t(event: \"disposed\", listener: (error?: ICriticalContainerError) => void);\n\n\t/**\n\t * Emitted when the container encounters a state which may lead to errors, which may be actionable by the consumer.\n\t *\n\t * @remarks\n\t *\n\t * Note: this event is not intended for general use.\n\t * The longer-term intention is to surface warnings more directly on the APIs that produce them.\n\t * For now, use of this should be avoided when possible.\n\t *\n\t * Listener parameters:\n\t *\n\t * - `error`: The warning describing the encountered state.\n\t */\n\t(event: \"warning\", listener: (error: ContainerWarning) => void);\n\n\t/**\n\t * Emitted immediately after processing an incoming operation (op).\n\t *\n\t * @remarks\n\t *\n\t * Note: this event is not intended for general use.\n\t * Prefer to listen to events on the appropriate ultimate recipients of the ops, rather than listening to the\n\t * ops directly on the {@link IContainer}.\n\t *\n\t * Listener parameters:\n\t *\n\t * - `message`: The op that was processed.\n\t */\n\t(event: \"op\", listener: (message: ISequencedDocumentMessage) => void);\n\n\t/**\n\t * Emitted upon the first local change while the Container is in the \"saved\" state.\n\t * That is, when {@link IContainer.isDirty} transitions from `true` to `false`.\n\t *\n\t * @remarks Listener parameters:\n\t *\n\t * - `dirty`: DEPRECATED. This parameter will be removed in a future release.\n\t *\n\t * @see {@link IContainer.isDirty}\n\t */\n\t(event: \"dirty\", listener: (dirty: boolean) => void);\n\n\t/**\n\t * Emitted when all local changes/edits have been acknowledged by the service.\n\t * I.e., when {@link IContainer.isDirty} transitions from `false` to `true`.\n\t *\n\t * @remarks Listener parameters:\n\t *\n\t * - `dirty`: DEPRECATED. This parameter will be removed in a future release.\n\t *\n\t * @see {@link IContainer.isDirty}\n\t */\n\t(event: \"saved\", listener: (dirty: boolean) => void);\n\n\t/**\n\t * Emitted when the some of the properties related to the container are initialized or updated.\n\t * This emitted metadata will the props which are updated. If consumer wants to read full set of\n\t * metadata then they can read it off the container from {@link IContainer.containerMetadata} prop.\n\t */\n\t(event: \"metadataUpdate\", listener: (metadata: Record<string, string>) => void);\n}\n\n/**\n * Namespace for the different connection states a container can be in.\n * PLEASE NOTE: The sequence of the numerical values does no correspond to the typical connection state progression.\n * @public\n */\n// eslint-disable-next-line @typescript-eslint/no-namespace\nexport namespace ConnectionState {\n\t/**\n\t * The container is not connected to the delta server.\n\t * Note - When in this state the container may be about to reconnect,\n\t * or may remain disconnected until explicitly told to connect.\n\t * @public\n\t */\n\texport type Disconnected = 0;\n\n\t/**\n\t * The container is disconnected but actively trying to establish a new connection.\n\t * PLEASE NOTE that this numerical value falls out of the order you may expect for this state.\n\t * @public\n\t */\n\texport type EstablishingConnection = 3;\n\n\t/**\n\t * The container has an inbound connection only, and is catching up to the latest known state from the service.\n\t * @public\n\t */\n\texport type CatchingUp = 1;\n\n\t/**\n\t * The container is fully connected and syncing.\n\t * @public\n\t */\n\texport type Connected = 2;\n}\n\n/**\n * Type defining the different states of connectivity a Container can be in.\n * @public\n */\nexport type ConnectionState =\n\t| ConnectionState.Disconnected\n\t| ConnectionState.EstablishingConnection\n\t| ConnectionState.CatchingUp\n\t| ConnectionState.Connected;\n\n/**\n * The Host's view of a Container and its connection to storage\n * @legacy\n * @alpha\n */\nexport interface IContainer extends IEventProvider<IContainerEvents> {\n\t/**\n\t * The Delta Manager supporting the op stream for this Container\n\t */\n\tdeltaManager: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>;\n\n\t/**\n\t * The collection of write clients which were connected as of the current sequence number.\n\t * Also contains a map of key-value pairs that must be agreed upon by all clients before being accepted.\n\t */\n\tgetQuorum(): IQuorumClients;\n\n\t/**\n\t * Represents the resolved url to the Container.\n\t * Will be undefined only when the container is in the {@link AttachState.Detached | detached} state.\n\t */\n\tresolvedUrl: IResolvedUrl | 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\t/**\n\t * Get the code details that are currently specified for the container.\n\t * @returns The current code details if any are specified, undefined if none are specified.\n\t */\n\tgetSpecifiedCodeDetails(): IFluidCodeDetails | undefined;\n\n\t/**\n\t * Get the code details that were used to load the container.\n\t * @returns The code details that were used to load the container if it is loaded, undefined if it is not yet\n\t * loaded.\n\t */\n\tgetLoadedCodeDetails(): IFluidCodeDetails | undefined;\n\n\t/**\n\t * Returns true if the container has been closed and/or disposed, otherwise false.\n\t */\n\treadonly closed: boolean;\n\n\t/**\n\t * Returns true if the container has been disposed, otherwise false.\n\t */\n\treadonly disposed?: boolean;\n\n\t/**\n\t * Whether or not there are any local changes that have not been saved.\n\t */\n\treadonly isDirty: boolean;\n\n\t/**\n\t * Disposes the container. If not already closed, this acts as a closure and then disposes runtime resources.\n\t * The container is not expected to be used anymore once it is disposed.\n\t *\n\t * @param error - If the container is being disposed due to error, this provides details about the error that\n\t * resulted in disposing it.\n\t */\n\tdispose(error?: ICriticalContainerError): void;\n\n\t/**\n\t * Closes the container.\n\t *\n\t * @param error - If the container is being closed due to error, this provides details about the error that\n\t * resulted in closing it.\n\t */\n\tclose(error?: ICriticalContainerError): void;\n\n\t/**\n\t * Propose new code details that define the code to be loaded for this container's runtime.\n\t *\n\t * The returned promise will be true when the proposal is accepted, and false if the proposal is rejected.\n\t */\n\tproposeCodeDetails(codeDetails: IFluidCodeDetails): Promise<boolean>;\n\n\t/**\n\t * When a container is created in Fluid it starts in detached state,\n\t * which means it is not yet uploaded to server storage and unavailable for other users to open or collaborate with.\n\t * A detached container can be serialized, stored, and rehydrated by the application.\n\t *\n\t * To finish the creation of a container and make it available for other users to open and collaborate with it must be attached,\n\t * which means it is uploaded to server storage. This function accomplishes that.\n\t *\n\t * Use the functionality provided by the driver to craft the IRequest parameter.\n\t * This is usually a free function called createCreateNewRequest, which takes\n\t * strongly typed arguments related to your driver and server.\n\t *\n\t * By default, the container will close if attach fails.\n\t * However, closure can now be avoided in most cased by setting:\n\t * Fluid.Container.RetryOnAttachFailure to true\n\t * via the config provider passed to the loader.\n\t *\n\t * If attach fails, check the closed property to discover if retry is possible.\n\t * If the container is not closed, it is safe to continue editing the container, calling serialize to capture the container's state,\n\t * or try calling attach again.\n\t *\n\t */\n\tattach(\n\t\trequest: IRequest,\n\t\tattachProps?: { deltaConnection?: \"none\" | \"delayed\" },\n\t): Promise<void>;\n\n\t/**\n\t * Capture the state of a container that is not attached or closed.\n\t * This is useful in draft-like scenarios. For example, think of an email draft, where a user can make changes over time,\n\t * but no other users can see or have access to that draft.\n\t *\n\t * This method can only be called when\n\t * the container's closed property is false, and the attachState is not AttachState.Attached.\n\t *\n\t * This method will return a string that includes the full serialized state of the\n\t * container. This string must not be inspected or modified, as the format of the content is not guaranteed.\n\t * @remarks\n\t * Fluid supports rehydrating from strings generated by previous versions, but does not support the content itself being leveraged.\n\t *\n\t * Consider storing this string somewhere durable (e.g. localStorage or IndexedDB) to enable your application to recover it after tab close.\n\t *\n\t * To reload a container from a string your application previously stored, use the Loader method rehydrateDetachedContainerFromSnapshot.\n\t * That method will create a new detached container which matches the state of the previously serialized container.\n\t */\n\tserialize(): string;\n\n\t/**\n\t * Get an absolute URL for a provided container-relative request URL.\n\t * If the container is not attached, this will return undefined.\n\t *\n\t * @param relativeUrl - A container-relative request URL.\n\t */\n\tgetAbsoluteUrl(relativeUrl: string): Promise<string | undefined>;\n\n\t/**\n\t * Provides the current state of the container's connection to the ordering service.\n\t *\n\t * @remarks Consumers can listen for state changes via the \"connected\" and \"disconnected\" events.\n\t */\n\treadonly connectionState: ConnectionState;\n\n\t/**\n\t * Attempts to connect the container to the delta stream and process ops.\n\t *\n\t * @remarks\n\t *\n\t * {@link IContainer.connectionState} will be set to {@link (ConnectionState:namespace).Connected}, and the\n\t * \"connected\" event will be fired if/when connection succeeds.\n\t */\n\tconnect(): void;\n\n\t/**\n\t * Disconnects the container from the delta stream and stops processing ops.\n\t *\n\t * @remarks\n\t *\n\t * {@link IContainer.connectionState} will be set to {@link (ConnectionState:namespace).Disconnected}, and the\n\t * \"disconnected\" event will be fired when disconnection completes.\n\t */\n\tdisconnect(): void;\n\n\t/**\n\t * The audience information for all clients currently associated with the document in the current session.\n\t */\n\treadonly audience: IAudience;\n\n\t/**\n\t * The server provided ID of the client.\n\t *\n\t * Set once {@link IContainer.connectionState} is {@link (ConnectionState:namespace).Connected},\n\t * otherwise will be `undefined`.\n\t */\n\treadonly clientId?: string | undefined;\n\n\t/**\n\t * Tells if container is in read-only mode.\n\t *\n\t * @remarks\n\t *\n\t * Data stores should listen for \"readonly\" notifications and disallow user making changes to data stores.\n\t * Readonly state can be because of no storage write permission,\n\t * or due to host forcing readonly mode for container.\n\t *\n\t * We do not differentiate here between no write access to storage vs. host disallowing changes to container -\n\t * in all cases container runtime and data stores should respect readonly state and not allow local changes.\n\t *\n\t * It is undefined if we have not yet established websocket connection\n\t * and do not know if user has write access to a file.\n\t */\n\treadonly readOnlyInfo: ReadOnlyInfo;\n\n\t/**\n\t * Allows the host to have the container force to be in read-only mode\n\t * @param readonly - Boolean that toggles if read-only policies will be enforced\n\t */\n\tforceReadonly?(readonly: boolean);\n\n\t/**\n\t * Exposes the entryPoint for the container.\n\t * Use this as the primary way of getting access to the user-defined logic within the container.\n\t */\n\tgetEntryPoint(): Promise<FluidObject>;\n\n\t/**\n\t * Exposes any metadata/props related to the container. This is full set of metadata props which the container wants to\n\t * expose. Whenever container receives updates from `IContainerEvents.metadataUpdate` event, we overwrite only those\n\t * updated props in the update and rest remains the same.\n\t */\n\tcontainerMetadata: Record<string, string>;\n}\n\n/**\n * The Runtime's view of the Loader, used for loading Containers\n * @legacy\n * @alpha\n */\nexport interface ILoader extends Partial<IProvideLoader> {\n\t/**\n\t * Resolves the resource specified by the URL + headers contained in the request object\n\t * to the underlying container that will resolve the request.\n\t *\n\t * @remarks\n\t *\n\t * An analogy for this is resolve is a DNS resolve of a Fluid container. Request then executes\n\t * a request against the server found from the resolve step.\n\t */\n\tresolve(request: IRequest, pendingLocalState?: string): Promise<IContainer>;\n}\n\n/**\n * The Host's view of the Loader, used for loading Containers\n * @legacy\n * @alpha\n */\nexport interface IHostLoader extends ILoader {\n\t/**\n\t * Creates a new container using the specified chaincode but in an unattached state. While unattached all\n\t * updates will only be local until the user explicitly attaches the container to a service provider.\n\t */\n\tcreateDetachedContainer(\n\t\tcodeDetails: IFluidCodeDetails,\n\t\tcreateDetachedProps?: {\n\t\t\tcanReconnect?: boolean;\n\t\t\tclientDetailsOverride?: IClientDetails;\n\t\t},\n\t): Promise<IContainer>;\n\n\t/**\n\t * Creates a new container using the specified snapshot but in an unattached state. While unattached all\n\t * updates will only be local until the user explicitly attaches the container to a service provider.\n\t */\n\trehydrateDetachedContainerFromSnapshot(\n\t\tsnapshot: string,\n\t\tcreateDetachedProps?: {\n\t\t\tcanReconnect?: boolean;\n\t\t\tclientDetailsOverride?: IClientDetails;\n\t\t},\n\t): Promise<IContainer>;\n}\n\n/**\n * Options to configure various behaviors of the ILoader.\n * @legacy\n * @alpha\n */\n// eslint-disable-next-line @typescript-eslint/consistent-type-definitions\nexport type ILoaderOptions = {\n\t/**\n\t * @deprecated This option has been deprecated and will be removed in a future release\n\t * Set caching behavior for the loader. If true, we will load a container from cache if one\n\t * with the same id/version exists or create a new container and cache it if it does not. If\n\t * false, always load a new container and don't cache it. If the container has already been\n\t * closed, it will not be cached. A cache option in the LoaderHeader for an individual\n\t * request will override the Loader's value.\n\t * Defaults to false.\n\t */\n\tcache?: boolean;\n\n\t/**\n\t * @deprecated Do not use.\n\t */\n\tclient?: IClient;\n\n\t/**\n\t * @deprecated Do not use.\n\t */\n\tenableOfflineLoad?: boolean;\n\n\t/**\n\t * Provide the current Loader through the scope object when creating Containers. It is added\n\t * as the `ILoader` property, and will overwrite an existing property of the same name on the\n\t * scope. Useful for when the host wants to provide the current Loader's functionality to\n\t * individual Data Stores, which is typically expected when creating with a Loader.\n\t * Defaults to true.\n\t */\n\tprovideScopeLoader?: boolean;\n\n\t/**\n\t * Max time (in ms) container will wait for a leave message of a disconnected client.\n\t */\n\tmaxClientLeaveWaitTime?: number;\n};\n\n/**\n * Accepted header keys for requests coming to the Loader\n * @legacy\n * @alpha\n */\nexport enum LoaderHeader {\n\t/**\n\t * @deprecated This header has been deprecated and will be removed in a future release\n\t * Override the Loader's default caching behavior for this container.\n\t */\n\tcache = \"fluid-cache\",\n\n\tclientDetails = \"fluid-client-details\",\n\n\t/**\n\t * Start the container in a paused, unconnected state. Defaults to false\n\t */\n\tloadMode = \"loadMode\",\n\treconnect = \"fluid-reconnect\",\n\t/**\n\t * Loads the container to at least the specified sequence number.\n\t * If not defined, behavior will fall back to `IContainerLoadMode.opsBeforeReturn`.\n\t */\n\tsequenceNumber = \"fluid-sequence-number\",\n\n\t/**\n\t * One of the following:\n\t * null or \"null\": use ops, no snapshots\n\t * undefined: fetch latest snapshot\n\t * otherwise, version sha to load snapshot\n\t */\n\tversion = \"version\",\n}\n\n/**\n * @legacy\n * @alpha\n */\nexport interface IContainerLoadMode {\n\topsBeforeReturn?: /*\n\t * No trailing ops are applied before container is returned.\n\t * Default value.\n\t */\n\t\t| undefined\n\t\t/*\n\t\t * Only cached trailing ops are applied before returning container.\n\t\t * Caching is optional and could be implemented by the driver.\n\t\t * If driver does not implement any kind of local caching strategy, this is same as above.\n\t\t * Driver may cache a lot of ops, so care needs to be exercised (see below).\n\t\t */\n\t\t| \"cached\"\n\t\t/*\n\t\t * All trailing ops in storage are fetched and applied before container is returned\n\t\t * This mode might have significant impact on boot speed (depends on storage perf characteristics)\n\t\t * Also there might be a lot of trailing ops and applying them might take time, so hosts are\n\t\t * recommended to have some progress UX / cancellation built into loading flow when using this option.\n\t\t * WARNING: This is the only option that may result in unbound wait. If machine is offline or hits some other\n\t\t * errors (like 429s), it may get into inifinite retry loop, with no ability to observe or cancel that process.\n\t\t */\n\t\t| \"all\";\n\n\tdeltaConnection?: /*\n\t * Connection to delta stream is made only when Container.connect() call is made. Op processing\n\t * is paused (when container is returned from Loader.resolve()) until Container.connect() call is made.\n\t */\n\t\t| \"none\"\n\t\t/*\n\t\t * Connection to delta stream is made only when Container.connect() call is made.\n\t\t * Op fetching from storage is performed and ops are applied as they come in.\n\t\t * This is useful option if connection to delta stream is expensive and thus it's beneficial to move it\n\t\t * out from critical boot sequence, but it's beneficial to allow catch up to happen as fast as possible.\n\t\t */\n\t\t| \"delayed\"\n\t\t/*\n\t\t * Connection to delta stream is made right away.\n\t\t * Ops processing is enabled and ops are flowing through the system.\n\t\t * Default value.\n\t\t */\n\t\t| undefined;\n}\n\n/**\n * Set of Request Headers that the Loader understands and may inspect or modify\n * @internal\n */\nexport interface ILoaderHeader {\n\t/**\n\t * @deprecated This header has been deprecated and will be removed in a future release\n\t */\n\t[LoaderHeader.cache]: boolean;\n\t[LoaderHeader.clientDetails]: IClientDetails;\n\t[LoaderHeader.loadMode]: IContainerLoadMode;\n\t[LoaderHeader.reconnect]: boolean;\n\t[LoaderHeader.version]: string | undefined;\n}\n\n/**\n * @legacy\n * @alpha\n */\nexport interface IProvideLoader {\n\treadonly ILoader: ILoader;\n}\n\n/**\n * This is used when we rehydrate a container from the snapshot. Here we put the blob contents\n * in separate property: {@link ISnapshotTreeWithBlobContents.blobsContents}.\n *\n * @remarks This is used as the `ContainerContext`'s base snapshot when attaching.\n * @legacy\n * @alpha\n */\nexport interface ISnapshotTreeWithBlobContents extends ISnapshotTree {\n\tblobsContents?: { [path: string]: ArrayBufferLike };\n\ttrees: { [path: string]: ISnapshotTreeWithBlobContents };\n}\n"]}
|
|
1
|
+
{"version":3,"file":"loader.js","sourceRoot":"","sources":["../src/loader.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAknBH;;;;GAIG;AACH,MAAM,CAAN,IAAY,YA2BX;AA3BD,WAAY,YAAY;IACvB;;;OAGG;IACH,qCAAqB,CAAA;IAErB,sDAAsC,CAAA;IAEtC;;OAEG;IACH,qCAAqB,CAAA;IACrB,6CAA6B,CAAA;IAC7B;;;OAGG;IACH,wDAAwC,CAAA;IAExC;;;;;OAKG;IACH,mCAAmB,CAAA;AACpB,CAAC,EA3BW,YAAY,KAAZ,YAAY,QA2BvB","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type {\n\tFluidObject,\n\tIEvent,\n\tIEventProvider,\n\tIRequest,\n} from \"@fluidframework/core-interfaces\";\nimport type {\n\tIClient,\n\tIClientDetails,\n\tIQuorumClients,\n} from \"@fluidframework/driver-definitions\";\nimport type {\n\tIResolvedUrl,\n\tIDocumentMessage,\n\tISequencedProposal,\n\tISnapshotTree,\n\tISequencedDocumentMessage,\n\tIContainerPackageInfo,\n} from \"@fluidframework/driver-definitions/internal\";\n\nimport type { IAudience } from \"./audience.js\";\nimport type { IDeltaManager, ReadOnlyInfo } from \"./deltas.js\";\nimport type { ContainerWarning, ICriticalContainerError } from \"./error.js\";\nimport type { IFluidModule } from \"./fluidModule.js\";\nimport type {\n\tIFluidCodeDetails,\n\tIFluidPackage,\n\tIProvideFluidCodeDetailsComparer,\n} from \"./fluidPackage.js\";\nimport type { AttachState } from \"./runtime.js\";\n\n/**\n * Encapsulates a module entry point with corresponding code details.\n * @legacy\n * @alpha\n */\nexport interface IFluidModuleWithDetails {\n\t/**\n\t * Fluid code module that implements the runtime factory needed to instantiate the container runtime.\n\t */\n\tmodule: IFluidModule;\n\n\t/**\n\t * Code details associated with the module. Represents a document schema this module supports.\n\t * If the code loader implements the {@link @fluidframework/core-interfaces#(IFluidCodeDetailsComparer:interface)}\n\t * interface, it'll be called to determine whether the module code details satisfy the new code proposal in the\n\t * quorum.\n\t */\n\tdetails: IFluidCodeDetails;\n}\n\n/**\n * Fluid code loader resolves a code module matching the document schema, i.e. code details, such as\n * a package name and package version range.\n * @legacy\n * @alpha\n */\nexport interface ICodeDetailsLoader extends Partial<IProvideFluidCodeDetailsComparer> {\n\t/**\n\t * Load the code module (package) that can interact with the document.\n\t *\n\t * @param source - Code proposal that articulates the current schema the document is written in.\n\t * @returns Code module entry point along with the code details associated with it.\n\t */\n\tload(source: IFluidCodeDetails): Promise<IFluidModuleWithDetails>;\n}\n\n/**\n * The interface returned from a IFluidCodeResolver which represents IFluidCodeDetails\n * that have been resolved and are ready to load\n * @internal\n */\nexport interface IResolvedFluidCodeDetails extends IFluidCodeDetails {\n\t/**\n\t * A resolved version of the Fluid package. All Fluid browser file entries should be absolute urls.\n\t */\n\treadonly resolvedPackage: Readonly<IFluidPackage>;\n\t/**\n\t * If not undefined, this id will be used to cache the entry point for the code package\n\t */\n\treadonly resolvedPackageCacheId: string | undefined;\n}\n\n/**\n * Fluid code resolvers take a Fluid code details, and resolve the\n * full Fluid package including absolute urls for the browser file entries.\n * The Fluid code resolver is coupled to a specific cdn and knows how to resolve\n * the code detail for loading from that cdn. This include resolving to the most recent\n * version of package that supports the provided code details.\n * @internal\n */\nexport interface IFluidCodeResolver {\n\t/**\n\t * Resolves a Fluid code details into a form that can be loaded.\n\t * @param details - The Fluid code details to resolve.\n\t * @returns A IResolvedFluidCodeDetails where the resolvedPackage's Fluid file entries are absolute urls, and\n\t * an optional resolvedPackageCacheId if the loaded package should be cached.\n\t */\n\tresolveCodeDetails(details: IFluidCodeDetails): Promise<IResolvedFluidCodeDetails>;\n}\n\n/**\n * Events emitted by the {@link IContainer} \"upwards\" to the Loader and Host.\n * @legacy\n * @alpha\n */\nexport interface IContainerEvents extends IEvent {\n\t/**\n\t * Emitted when the readonly state of the container changes.\n\t *\n\t * @remarks Listener parameters:\n\t *\n\t * - `readonly`: Whether or not the container is now in a readonly state.\n\t *\n\t * @see {@link IContainer.readOnlyInfo}\n\t */\n\t(event: \"readonly\", listener: (readonly: boolean) => void): void;\n\n\t/**\n\t * Emitted when the {@link IContainer} 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 IContainer.connectionState}\n\t *\n\t * - {@link IContainer.connect}\n\t */\n\t(event: \"connected\", listener: (clientId: string) => void);\n\n\t/**\n\t * Fires when new container code details have been proposed, prior to acceptance.\n\t *\n\t * @remarks Listener parameters:\n\t *\n\t * - `codeDetails`: The code details being proposed.\n\t *\n\t * - `proposal`: NOT RECOMMENDED FOR USE.\n\t *\n\t * @see {@link IContainer.proposeCodeDetails}\n\t */\n\t(\n\t\tevent: \"codeDetailsProposed\",\n\t\tlistener: (codeDetails: IFluidCodeDetails, proposal: ISequencedProposal) => void,\n\t);\n\n\t/**\n\t * Emitted when the {@link IContainer} 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 IContainer.connectionState}\n\t *\n\t * - {@link IContainer.disconnect}\n\t */\n\t(event: \"disconnected\", listener: () => void);\n\n\t/**\n\t * Emitted when a {@link AttachState.Detached | detached} container begins the process of\n\t * {@link AttachState.Attaching | attached} to the Fluid service.\n\t *\n\t * @see\n\t *\n\t * - {@link IContainer.attachState}\n\t *\n\t * - {@link IContainer.attach}\n\t */\n\t(event: \"attaching\", listener: () => void);\n\n\t/**\n\t * Emitted when the {@link AttachState.Attaching | attaching} process is complete and the container is\n\t * {@link AttachState.Attached | attached} to the Fluid service.\n\t *\n\t * @see\n\t *\n\t * - {@link IContainer.attachState}\n\t *\n\t * - {@link IContainer.attach}\n\t */\n\t(event: \"attached\", listener: () => void);\n\n\t/**\n\t * Emitted when the {@link IContainer} 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, this will contain details about the error that caused it.\n\t *\n\t * @see {@link IContainer.close}\n\t */\n\t(event: \"closed\", listener: (error?: ICriticalContainerError) => void);\n\n\t/**\n\t * Emitted when the {@link IContainer} is disposed, which permanently disables it.\n\t *\n\t * @remarks Listener parameters:\n\t *\n\t * - `error`: If the container was disposed due to error, this will contain details about the error that caused it.\n\t *\n\t * @see {@link IContainer.dispose}\n\t */\n\t(event: \"disposed\", listener: (error?: ICriticalContainerError) => void);\n\n\t/**\n\t * Emitted when the container encounters a state which may lead to errors, which may be actionable by the consumer.\n\t *\n\t * @remarks\n\t *\n\t * Note: this event is not intended for general use.\n\t * The longer-term intention is to surface warnings more directly on the APIs that produce them.\n\t * For now, use of this should be avoided when possible.\n\t *\n\t * Listener parameters:\n\t *\n\t * - `error`: The warning describing the encountered state.\n\t */\n\t(event: \"warning\", listener: (error: ContainerWarning) => void);\n\n\t/**\n\t * Emitted immediately after processing an incoming operation (op).\n\t *\n\t * @remarks\n\t *\n\t * Note: this event is not intended for general use.\n\t * Prefer to listen to events on the appropriate ultimate recipients of the ops, rather than listening to the\n\t * ops directly on the {@link IContainer}.\n\t *\n\t * Listener parameters:\n\t *\n\t * - `message`: The op that was processed.\n\t */\n\t(event: \"op\", listener: (message: ISequencedDocumentMessage) => void);\n\n\t/**\n\t * Emitted upon the first local change while the Container is in the \"saved\" state.\n\t * That is, when {@link IContainer.isDirty} transitions from `true` to `false`.\n\t *\n\t * @remarks Listener parameters:\n\t *\n\t * - `dirty`: DEPRECATED. This parameter will be removed in a future release.\n\t *\n\t * @see {@link IContainer.isDirty}\n\t */\n\t(event: \"dirty\", listener: (dirty: boolean) => void);\n\n\t/**\n\t * Emitted when all local changes/edits have been acknowledged by the service.\n\t * I.e., when {@link IContainer.isDirty} transitions from `false` to `true`.\n\t *\n\t * @remarks Listener parameters:\n\t *\n\t * - `dirty`: DEPRECATED. This parameter will be removed in a future release.\n\t *\n\t * @see {@link IContainer.isDirty}\n\t */\n\t(event: \"saved\", listener: (dirty: boolean) => void);\n\n\t/**\n\t * Emitted when the some of the properties related to the container are initialized or updated.\n\t * This emitted metadata will the props which are updated. If consumer wants to read full set of\n\t * metadata then they can read it off the container from {@link IContainer.containerMetadata} prop.\n\t */\n\t(event: \"metadataUpdate\", listener: (metadata: Record<string, string>) => void);\n}\n\n/**\n * Namespace for the different connection states a container can be in.\n * PLEASE NOTE: The sequence of the numerical values does no correspond to the typical connection state progression.\n * @public\n */\n// eslint-disable-next-line @typescript-eslint/no-namespace\nexport namespace ConnectionState {\n\t/**\n\t * The container is not connected to the delta server.\n\t * Note - When in this state the container may be about to reconnect,\n\t * or may remain disconnected until explicitly told to connect.\n\t * @public\n\t */\n\texport type Disconnected = 0;\n\n\t/**\n\t * The container is disconnected but actively trying to establish a new connection.\n\t * PLEASE NOTE that this numerical value falls out of the order you may expect for this state.\n\t * @public\n\t */\n\texport type EstablishingConnection = 3;\n\n\t/**\n\t * The container has an inbound connection only, and is catching up to the latest known state from the service.\n\t * @public\n\t */\n\texport type CatchingUp = 1;\n\n\t/**\n\t * The container is fully connected and syncing.\n\t * @public\n\t */\n\texport type Connected = 2;\n}\n\n/**\n * Type defining the different states of connectivity a Container can be in.\n * @public\n */\nexport type ConnectionState =\n\t| ConnectionState.Disconnected\n\t| ConnectionState.EstablishingConnection\n\t| ConnectionState.CatchingUp\n\t| ConnectionState.Connected;\n\n/**\n * The Host's view of a Container and its connection to storage\n * @legacy\n * @alpha\n */\nexport interface IContainer extends IEventProvider<IContainerEvents> {\n\t/**\n\t * The Delta Manager supporting the op stream for this Container\n\t */\n\tdeltaManager: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>;\n\n\t/**\n\t * The collection of write clients which were connected as of the current sequence number.\n\t * Also contains a map of key-value pairs that must be agreed upon by all clients before being accepted.\n\t */\n\tgetQuorum(): IQuorumClients;\n\n\t/**\n\t * Represents the resolved url to the Container.\n\t * Will be undefined only when the container is in the {@link AttachState.Detached | detached} state.\n\t */\n\tresolvedUrl: IResolvedUrl | 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\t/**\n\t * Get the code details that are currently specified for the container.\n\t * @returns The current code details if any are specified, undefined if none are specified.\n\t */\n\tgetSpecifiedCodeDetails(): IFluidCodeDetails | undefined;\n\n\t/**\n\t * Get the code details that were used to load the container.\n\t * @returns The code details that were used to load the container if it is loaded, undefined if it is not yet\n\t * loaded.\n\t */\n\tgetLoadedCodeDetails(): IFluidCodeDetails | undefined;\n\n\t/**\n\t * Get the package info for the code details that were used to load the container.\n\t * @returns The package info for the code details that were used to load the container if it is loaded, undefined if\n\t * the container package doesn't have a name.\n\t */\n\tgetContainerPackageInfo?(): IContainerPackageInfo | undefined;\n\n\t/**\n\t * Returns true if the container has been closed and/or disposed, otherwise false.\n\t */\n\treadonly closed: boolean;\n\n\t/**\n\t * Returns true if the container has been disposed, otherwise false.\n\t */\n\treadonly disposed?: boolean;\n\n\t/**\n\t * Whether or not there are any local changes that have not been saved.\n\t */\n\treadonly isDirty: boolean;\n\n\t/**\n\t * Disposes the container. If not already closed, this acts as a closure and then disposes runtime resources.\n\t * The container is not expected to be used anymore once it is disposed.\n\t *\n\t * @param error - If the container is being disposed due to error, this provides details about the error that\n\t * resulted in disposing it.\n\t */\n\tdispose(error?: ICriticalContainerError): void;\n\n\t/**\n\t * Closes the container.\n\t *\n\t * @param error - If the container is being closed due to error, this provides details about the error that\n\t * resulted in closing it.\n\t */\n\tclose(error?: ICriticalContainerError): void;\n\n\t/**\n\t * Propose new code details that define the code to be loaded for this container's runtime.\n\t *\n\t * The returned promise will be true when the proposal is accepted, and false if the proposal is rejected.\n\t */\n\tproposeCodeDetails(codeDetails: IFluidCodeDetails): Promise<boolean>;\n\n\t/**\n\t * When a container is created in Fluid it starts in detached state,\n\t * which means it is not yet uploaded to server storage and unavailable for other users to open or collaborate with.\n\t * A detached container can be serialized, stored, and rehydrated by the application.\n\t *\n\t * To finish the creation of a container and make it available for other users to open and collaborate with it must be attached,\n\t * which means it is uploaded to server storage. This function accomplishes that.\n\t *\n\t * Use the functionality provided by the driver to craft the IRequest parameter.\n\t * This is usually a free function called createCreateNewRequest, which takes\n\t * strongly typed arguments related to your driver and server.\n\t *\n\t * By default, the container will close if attach fails.\n\t * However, closure can now be avoided in most cased by setting:\n\t * Fluid.Container.RetryOnAttachFailure to true\n\t * via the config provider passed to the loader.\n\t *\n\t * If attach fails, check the closed property to discover if retry is possible.\n\t * If the container is not closed, it is safe to continue editing the container, calling serialize to capture the container's state,\n\t * or try calling attach again.\n\t *\n\t */\n\tattach(\n\t\trequest: IRequest,\n\t\tattachProps?: { deltaConnection?: \"none\" | \"delayed\" },\n\t): Promise<void>;\n\n\t/**\n\t * Capture the state of a container that is not attached or closed.\n\t * This is useful in draft-like scenarios. For example, think of an email draft, where a user can make changes over time,\n\t * but no other users can see or have access to that draft.\n\t *\n\t * This method can only be called when\n\t * the container's closed property is false, and the attachState is not AttachState.Attached.\n\t *\n\t * This method will return a string that includes the full serialized state of the\n\t * container. This string must not be inspected or modified, as the format of the content is not guaranteed.\n\t * @remarks\n\t * Fluid supports rehydrating from strings generated by previous versions, but does not support the content itself being leveraged.\n\t *\n\t * Consider storing this string somewhere durable (e.g. localStorage or IndexedDB) to enable your application to recover it after tab close.\n\t *\n\t * To reload a container from a string your application previously stored, use the Loader method rehydrateDetachedContainerFromSnapshot.\n\t * That method will create a new detached container which matches the state of the previously serialized container.\n\t */\n\tserialize(): string;\n\n\t/**\n\t * Get an absolute URL for a provided container-relative request URL.\n\t * If the container is not attached, this will return undefined.\n\t *\n\t * @param relativeUrl - A container-relative request URL.\n\t */\n\tgetAbsoluteUrl(relativeUrl: string): Promise<string | undefined>;\n\n\t/**\n\t * Provides the current state of the container's connection to the ordering service.\n\t *\n\t * @remarks Consumers can listen for state changes via the \"connected\" and \"disconnected\" events.\n\t */\n\treadonly connectionState: ConnectionState;\n\n\t/**\n\t * Attempts to connect the container to the delta stream and process ops.\n\t *\n\t * @remarks\n\t *\n\t * {@link IContainer.connectionState} will be set to {@link (ConnectionState:namespace).Connected}, and the\n\t * \"connected\" event will be fired if/when connection succeeds.\n\t */\n\tconnect(): void;\n\n\t/**\n\t * Disconnects the container from the delta stream and stops processing ops.\n\t *\n\t * @remarks\n\t *\n\t * {@link IContainer.connectionState} will be set to {@link (ConnectionState:namespace).Disconnected}, and the\n\t * \"disconnected\" event will be fired when disconnection completes.\n\t */\n\tdisconnect(): void;\n\n\t/**\n\t * The audience information for all clients currently associated with the document in the current session.\n\t */\n\treadonly audience: IAudience;\n\n\t/**\n\t * The server provided ID of the client.\n\t *\n\t * Set once {@link IContainer.connectionState} is {@link (ConnectionState:namespace).Connected},\n\t * otherwise will be `undefined`.\n\t */\n\treadonly clientId?: string | undefined;\n\n\t/**\n\t * Tells if container is in read-only mode.\n\t *\n\t * @remarks\n\t *\n\t * Data stores should listen for \"readonly\" notifications and disallow user making changes to data stores.\n\t * Readonly state can be because of no storage write permission,\n\t * or due to host forcing readonly mode for container.\n\t *\n\t * We do not differentiate here between no write access to storage vs. host disallowing changes to container -\n\t * in all cases container runtime and data stores should respect readonly state and not allow local changes.\n\t *\n\t * It is undefined if we have not yet established websocket connection\n\t * and do not know if user has write access to a file.\n\t */\n\treadonly readOnlyInfo: ReadOnlyInfo;\n\n\t/**\n\t * Allows the host to have the container force to be in read-only mode\n\t * @param readonly - Boolean that toggles if read-only policies will be enforced\n\t */\n\tforceReadonly?(readonly: boolean);\n\n\t/**\n\t * Exposes the entryPoint for the container.\n\t * Use this as the primary way of getting access to the user-defined logic within the container.\n\t */\n\tgetEntryPoint(): Promise<FluidObject>;\n\n\t/**\n\t * Exposes any metadata/props related to the container. This is full set of metadata props which the container wants to\n\t * expose. Whenever container receives updates from `IContainerEvents.metadataUpdate` event, we overwrite only those\n\t * updated props in the update and rest remains the same.\n\t */\n\tcontainerMetadata: Record<string, string>;\n}\n\n/**\n * The Runtime's view of the Loader, used for loading Containers\n * @legacy\n * @alpha\n */\nexport interface ILoader extends Partial<IProvideLoader> {\n\t/**\n\t * Resolves the resource specified by the URL + headers contained in the request object\n\t * to the underlying container that will resolve the request.\n\t *\n\t * @remarks\n\t *\n\t * An analogy for this is resolve is a DNS resolve of a Fluid container. Request then executes\n\t * a request against the server found from the resolve step.\n\t */\n\tresolve(request: IRequest, pendingLocalState?: string): Promise<IContainer>;\n}\n\n/**\n * The Host's view of the Loader, used for loading Containers\n * @legacy\n * @alpha\n */\nexport interface IHostLoader extends ILoader {\n\t/**\n\t * Creates a new container using the specified chaincode but in an unattached state. While unattached all\n\t * updates will only be local until the user explicitly attaches the container to a service provider.\n\t */\n\tcreateDetachedContainer(\n\t\tcodeDetails: IFluidCodeDetails,\n\t\tcreateDetachedProps?: {\n\t\t\tcanReconnect?: boolean;\n\t\t\tclientDetailsOverride?: IClientDetails;\n\t\t},\n\t): Promise<IContainer>;\n\n\t/**\n\t * Creates a new container using the specified snapshot but in an unattached state. While unattached all\n\t * updates will only be local until the user explicitly attaches the container to a service provider.\n\t */\n\trehydrateDetachedContainerFromSnapshot(\n\t\tsnapshot: string,\n\t\tcreateDetachedProps?: {\n\t\t\tcanReconnect?: boolean;\n\t\t\tclientDetailsOverride?: IClientDetails;\n\t\t},\n\t): Promise<IContainer>;\n}\n\n/**\n * Options to configure various behaviors of the ILoader.\n * @legacy\n * @alpha\n */\n// eslint-disable-next-line @typescript-eslint/consistent-type-definitions\nexport type ILoaderOptions = {\n\t/**\n\t * @deprecated This option has been deprecated and will be removed in a future release\n\t * Set caching behavior for the loader. If true, we will load a container from cache if one\n\t * with the same id/version exists or create a new container and cache it if it does not. If\n\t * false, always load a new container and don't cache it. If the container has already been\n\t * closed, it will not be cached. A cache option in the LoaderHeader for an individual\n\t * request will override the Loader's value.\n\t * Defaults to false.\n\t */\n\tcache?: boolean;\n\n\t/**\n\t * @deprecated Do not use.\n\t */\n\tclient?: IClient;\n\n\t/**\n\t * @deprecated Do not use.\n\t */\n\tenableOfflineLoad?: boolean;\n\n\t/**\n\t * Provide the current Loader through the scope object when creating Containers. It is added\n\t * as the `ILoader` property, and will overwrite an existing property of the same name on the\n\t * scope. Useful for when the host wants to provide the current Loader's functionality to\n\t * individual Data Stores, which is typically expected when creating with a Loader.\n\t * Defaults to true.\n\t */\n\tprovideScopeLoader?: boolean;\n\n\t/**\n\t * Max time (in ms) container will wait for a leave message of a disconnected client.\n\t */\n\tmaxClientLeaveWaitTime?: number;\n};\n\n/**\n * Accepted header keys for requests coming to the Loader\n * @legacy\n * @alpha\n */\nexport enum LoaderHeader {\n\t/**\n\t * @deprecated This header has been deprecated and will be removed in a future release\n\t * Override the Loader's default caching behavior for this container.\n\t */\n\tcache = \"fluid-cache\",\n\n\tclientDetails = \"fluid-client-details\",\n\n\t/**\n\t * Start the container in a paused, unconnected state. Defaults to false\n\t */\n\tloadMode = \"loadMode\",\n\treconnect = \"fluid-reconnect\",\n\t/**\n\t * Loads the container to at least the specified sequence number.\n\t * If not defined, behavior will fall back to `IContainerLoadMode.opsBeforeReturn`.\n\t */\n\tsequenceNumber = \"fluid-sequence-number\",\n\n\t/**\n\t * One of the following:\n\t * null or \"null\": use ops, no snapshots\n\t * undefined: fetch latest snapshot\n\t * otherwise, version sha to load snapshot\n\t */\n\tversion = \"version\",\n}\n\n/**\n * @legacy\n * @alpha\n */\nexport interface IContainerLoadMode {\n\topsBeforeReturn?: /*\n\t * No trailing ops are applied before container is returned.\n\t * Default value.\n\t */\n\t\t| undefined\n\t\t/*\n\t\t * Only cached trailing ops are applied before returning container.\n\t\t * Caching is optional and could be implemented by the driver.\n\t\t * If driver does not implement any kind of local caching strategy, this is same as above.\n\t\t * Driver may cache a lot of ops, so care needs to be exercised (see below).\n\t\t */\n\t\t| \"cached\"\n\t\t/*\n\t\t * All trailing ops in storage are fetched and applied before container is returned\n\t\t * This mode might have significant impact on boot speed (depends on storage perf characteristics)\n\t\t * Also there might be a lot of trailing ops and applying them might take time, so hosts are\n\t\t * recommended to have some progress UX / cancellation built into loading flow when using this option.\n\t\t * WARNING: This is the only option that may result in unbound wait. If machine is offline or hits some other\n\t\t * errors (like 429s), it may get into inifinite retry loop, with no ability to observe or cancel that process.\n\t\t */\n\t\t| \"all\";\n\n\tdeltaConnection?: /*\n\t * Connection to delta stream is made only when Container.connect() call is made. Op processing\n\t * is paused (when container is returned from Loader.resolve()) until Container.connect() call is made.\n\t */\n\t\t| \"none\"\n\t\t/*\n\t\t * Connection to delta stream is made only when Container.connect() call is made.\n\t\t * Op fetching from storage is performed and ops are applied as they come in.\n\t\t * This is useful option if connection to delta stream is expensive and thus it's beneficial to move it\n\t\t * out from critical boot sequence, but it's beneficial to allow catch up to happen as fast as possible.\n\t\t */\n\t\t| \"delayed\"\n\t\t/*\n\t\t * Connection to delta stream is made right away.\n\t\t * Ops processing is enabled and ops are flowing through the system.\n\t\t * Default value.\n\t\t */\n\t\t| undefined;\n}\n\n/**\n * Set of Request Headers that the Loader understands and may inspect or modify\n * @internal\n */\nexport interface ILoaderHeader {\n\t/**\n\t * @deprecated This header has been deprecated and will be removed in a future release\n\t */\n\t[LoaderHeader.cache]: boolean;\n\t[LoaderHeader.clientDetails]: IClientDetails;\n\t[LoaderHeader.loadMode]: IContainerLoadMode;\n\t[LoaderHeader.reconnect]: boolean;\n\t[LoaderHeader.version]: string | undefined;\n}\n\n/**\n * @legacy\n * @alpha\n */\nexport interface IProvideLoader {\n\treadonly ILoader: ILoader;\n}\n\n/**\n * This is used when we rehydrate a container from the snapshot. Here we put the blob contents\n * in separate property: {@link ISnapshotTreeWithBlobContents.blobsContents}.\n *\n * @remarks This is used as the `ContainerContext`'s base snapshot when attaching.\n * @legacy\n * @alpha\n */\nexport interface ISnapshotTreeWithBlobContents extends ISnapshotTree {\n\tblobsContents?: { [path: string]: ArrayBufferLike };\n\ttrees: { [path: string]: ISnapshotTreeWithBlobContents };\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluidframework/container-definitions",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.11.0",
|
|
4
4
|
"description": "Fluid container definitions",
|
|
5
5
|
"homepage": "https://fluidframework.com",
|
|
6
6
|
"repository": {
|
|
@@ -47,8 +47,8 @@
|
|
|
47
47
|
"main": "lib/index.js",
|
|
48
48
|
"types": "lib/public.d.ts",
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@fluidframework/core-interfaces": "2.
|
|
51
|
-
"@fluidframework/driver-definitions": "2.
|
|
50
|
+
"@fluidframework/core-interfaces": "~2.11.0",
|
|
51
|
+
"@fluidframework/driver-definitions": "~2.11.0"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"@arethetypeswrong/cli": "^0.16.4",
|
|
@@ -56,8 +56,8 @@
|
|
|
56
56
|
"@fluid-tools/build-cli": "^0.51.0",
|
|
57
57
|
"@fluidframework/build-common": "^2.0.3",
|
|
58
58
|
"@fluidframework/build-tools": "^0.51.0",
|
|
59
|
-
"@fluidframework/container-definitions-previous": "npm:@fluidframework/container-definitions
|
|
60
|
-
"@fluidframework/eslint-config-fluid": "^5.
|
|
59
|
+
"@fluidframework/container-definitions-previous": "npm:@fluidframework/container-definitions@2.10.0",
|
|
60
|
+
"@fluidframework/eslint-config-fluid": "^5.6.0",
|
|
61
61
|
"@microsoft/api-extractor": "7.47.8",
|
|
62
62
|
"concurrently": "^8.2.1",
|
|
63
63
|
"copyfiles": "^2.4.1",
|
|
@@ -68,17 +68,7 @@
|
|
|
68
68
|
"typescript": "~5.4.5"
|
|
69
69
|
},
|
|
70
70
|
"typeValidation": {
|
|
71
|
-
"broken": {
|
|
72
|
-
"Interface_IContainer": {
|
|
73
|
-
"backCompat": false
|
|
74
|
-
},
|
|
75
|
-
"Interface_IContainerContext": {
|
|
76
|
-
"backCompat": false
|
|
77
|
-
},
|
|
78
|
-
"Interface_IDeltaManager": {
|
|
79
|
-
"backCompat": false
|
|
80
|
-
}
|
|
81
|
-
},
|
|
71
|
+
"broken": {},
|
|
82
72
|
"entrypoint": "legacy"
|
|
83
73
|
},
|
|
84
74
|
"scripts": {
|
package/src/loader.ts
CHANGED
|
@@ -20,6 +20,7 @@ import type {
|
|
|
20
20
|
ISequencedProposal,
|
|
21
21
|
ISnapshotTree,
|
|
22
22
|
ISequencedDocumentMessage,
|
|
23
|
+
IContainerPackageInfo,
|
|
23
24
|
} from "@fluidframework/driver-definitions/internal";
|
|
24
25
|
|
|
25
26
|
import type { IAudience } from "./audience.js";
|
|
@@ -356,6 +357,13 @@ export interface IContainer extends IEventProvider<IContainerEvents> {
|
|
|
356
357
|
*/
|
|
357
358
|
getLoadedCodeDetails(): IFluidCodeDetails | undefined;
|
|
358
359
|
|
|
360
|
+
/**
|
|
361
|
+
* Get the package info for the code details that were used to load the container.
|
|
362
|
+
* @returns The package info for the code details that were used to load the container if it is loaded, undefined if
|
|
363
|
+
* the container package doesn't have a name.
|
|
364
|
+
*/
|
|
365
|
+
getContainerPackageInfo?(): IContainerPackageInfo | undefined;
|
|
366
|
+
|
|
359
367
|
/**
|
|
360
368
|
* Returns true if the container has been closed and/or disposed, otherwise false.
|
|
361
369
|
*/
|