@fluidframework/container-definitions 2.20.0 → 2.22.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/.eslintrc.cjs +0 -1
- package/CHANGELOG.md +13 -0
- package/README.md +1 -0
- package/api-report/container-definitions.legacy.alpha.api.md +1 -1
- package/dist/error.d.ts +0 -33
- package/dist/error.d.ts.map +1 -1
- package/dist/error.js +1 -35
- package/dist/error.js.map +1 -1
- package/dist/loader.d.ts +0 -4
- package/dist/loader.d.ts.map +1 -1
- package/dist/loader.js.map +1 -1
- package/dist/runtime.d.ts +3 -0
- package/dist/runtime.d.ts.map +1 -1
- package/dist/runtime.js.map +1 -1
- package/lib/error.d.ts +0 -33
- package/lib/error.d.ts.map +1 -1
- package/lib/error.js +0 -34
- package/lib/error.js.map +1 -1
- package/lib/loader.d.ts +0 -4
- package/lib/loader.d.ts.map +1 -1
- package/lib/loader.js.map +1 -1
- package/lib/runtime.d.ts +3 -0
- package/lib/runtime.d.ts.map +1 -1
- package/lib/runtime.js.map +1 -1
- package/package.json +6 -7
- package/src/error.ts +0 -39
- package/src/loader.ts +0 -4
- package/src/runtime.ts +3 -0
package/.eslintrc.cjs
CHANGED
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @fluidframework/container-definitions
|
|
2
2
|
|
|
3
|
+
## 2.22.0
|
|
4
|
+
|
|
5
|
+
Dependency updates only.
|
|
6
|
+
|
|
7
|
+
## 2.21.0
|
|
8
|
+
|
|
9
|
+
### Minor Changes
|
|
10
|
+
|
|
11
|
+
- The IContainerContext.supportedFeatures property is now deprecated ([#22877](https://github.com/microsoft/FluidFramework/pull/22877)) [4c06412bb3](https://github.com/microsoft/FluidFramework/commit/4c06412bb365d680430f83b87c456d132d9da1be)
|
|
12
|
+
|
|
13
|
+
The `IContainerContext.supportedFeatures` optional property was used internally to communicate features supported by the
|
|
14
|
+
Loader layer to the Runtime layer. This has since been replaced with functionality that is not exposed externally.
|
|
15
|
+
|
|
3
16
|
## 2.20.0
|
|
4
17
|
|
|
5
18
|
Dependency updates only.
|
package/README.md
CHANGED
|
@@ -66,6 +66,7 @@ When making such a request please include if the configuration already works (an
|
|
|
66
66
|
### Supported Runtimes
|
|
67
67
|
|
|
68
68
|
- NodeJs ^20.10.0 except that we will drop support for it [when NodeJs 20 loses its upstream support on 2026-04-30](https://github.com/nodejs/release#release-schedule), and will support a newer LTS version of NodeJS (22) at least 1 year before 20 is end-of-life. This same policy applies to NodeJS 22 when it is end of life (2027-04-30).
|
|
69
|
+
- Running Fluid in a Node.js environment with the `--no-experimental-fetch` flag is not supported.
|
|
69
70
|
- Modern browsers supporting the es2022 standard library: in response to asks we can add explicit support for using babel to polyfill to target specific standards or runtimes (meaning we can avoid/remove use of things that don't polyfill robustly, but otherwise target modern standards).
|
|
70
71
|
|
|
71
72
|
### Supported Tools
|
|
@@ -164,7 +164,7 @@ export interface IContainerContext {
|
|
|
164
164
|
readonly submitSignalFn: (contents: unknown, targetClientId?: string) => void;
|
|
165
165
|
// (undocumented)
|
|
166
166
|
readonly submitSummaryFn: (summaryOp: ISummaryContent, referenceSequenceNumber?: number) => number;
|
|
167
|
-
// (undocumented)
|
|
167
|
+
// @deprecated (undocumented)
|
|
168
168
|
readonly supportedFeatures?: ReadonlyMap<string, unknown>;
|
|
169
169
|
// (undocumented)
|
|
170
170
|
readonly taggedLogger: ITelemetryBaseLogger;
|
package/dist/error.d.ts
CHANGED
|
@@ -26,39 +26,6 @@ export declare const ContainerErrorTypes: {
|
|
|
26
26
|
* @alpha
|
|
27
27
|
*/
|
|
28
28
|
export type ContainerErrorTypes = (typeof ContainerErrorTypes)[keyof typeof ContainerErrorTypes];
|
|
29
|
-
/**
|
|
30
|
-
* Different error types the Container may report out to the Host.
|
|
31
|
-
*
|
|
32
|
-
* @deprecated ContainerErrorType is being deprecated as a public export. Please use {@link ContainerErrorTypes#clientSessionExpiredError} instead.
|
|
33
|
-
* @internal
|
|
34
|
-
*/
|
|
35
|
-
export declare enum ContainerErrorType {
|
|
36
|
-
/**
|
|
37
|
-
* Some error, most likely an exception caught by runtime and propagated to container as critical error
|
|
38
|
-
*/
|
|
39
|
-
genericError = "genericError",
|
|
40
|
-
/**
|
|
41
|
-
* Throttling error from server. Server is busy and is asking not to reconnect for some time
|
|
42
|
-
*/
|
|
43
|
-
throttlingError = "throttlingError",
|
|
44
|
-
/**
|
|
45
|
-
* Data loss error detected by Container / DeltaManager. Likely points to storage issue.
|
|
46
|
-
*/
|
|
47
|
-
dataCorruptionError = "dataCorruptionError",
|
|
48
|
-
/**
|
|
49
|
-
* Error encountered when processing an operation. May correlate with data corruption.
|
|
50
|
-
*/
|
|
51
|
-
dataProcessingError = "dataProcessingError",
|
|
52
|
-
/**
|
|
53
|
-
* Error indicating an API is being used improperly resulting in an invalid operation.
|
|
54
|
-
*/
|
|
55
|
-
usageError = "usageError",
|
|
56
|
-
/**
|
|
57
|
-
* Error indicating an client session has expired. Currently this only happens when GC is allowed on a document and
|
|
58
|
-
* aids in safely deleting unused objects.
|
|
59
|
-
*/
|
|
60
|
-
clientSessionExpiredError = "clientSessionExpiredError"
|
|
61
|
-
}
|
|
62
29
|
/**
|
|
63
30
|
* Represents warnings raised on container.
|
|
64
31
|
* @legacy
|
package/dist/error.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../src/error.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAGlE;;;;GAIG;AACH,eAAO,MAAM,mBAAmB;IAE/B;;;OAGG;;;;;;;CAEM,CAAC;AAEX;;;;GAIG;AACH,MAAM,MAAM,mBAAmB,GAC9B,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,OAAO,mBAAmB,CAAC,CAAC;AAEhE
|
|
1
|
+
{"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../src/error.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAGlE;;;;GAIG;AACH,eAAO,MAAM,mBAAmB;IAE/B;;;OAGG;;;;;;;CAEM,CAAC;AAEX;;;;GAIG;AACH,MAAM,MAAM,mBAAmB,GAC9B,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,OAAO,mBAAmB,CAAC,CAAC;AAEhE;;;;GAIG;AACH,MAAM,WAAW,gBAAiB,SAAQ,UAAU;IACnD;;;;OAIG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;CACjB;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,uBAAuB,GAAG,UAAU,CAAC"}
|
package/dist/error.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Licensed under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.
|
|
7
|
+
exports.ContainerErrorTypes = void 0;
|
|
8
8
|
const internal_1 = require("@fluidframework/core-interfaces/internal");
|
|
9
9
|
/**
|
|
10
10
|
* Different error types the ClientSession may report out to the Host.
|
|
@@ -19,38 +19,4 @@ exports.ContainerErrorTypes = {
|
|
|
19
19
|
*/
|
|
20
20
|
clientSessionExpiredError: "clientSessionExpiredError",
|
|
21
21
|
};
|
|
22
|
-
/**
|
|
23
|
-
* Different error types the Container may report out to the Host.
|
|
24
|
-
*
|
|
25
|
-
* @deprecated ContainerErrorType is being deprecated as a public export. Please use {@link ContainerErrorTypes#clientSessionExpiredError} instead.
|
|
26
|
-
* @internal
|
|
27
|
-
*/
|
|
28
|
-
var ContainerErrorType;
|
|
29
|
-
(function (ContainerErrorType) {
|
|
30
|
-
/**
|
|
31
|
-
* Some error, most likely an exception caught by runtime and propagated to container as critical error
|
|
32
|
-
*/
|
|
33
|
-
ContainerErrorType["genericError"] = "genericError";
|
|
34
|
-
/**
|
|
35
|
-
* Throttling error from server. Server is busy and is asking not to reconnect for some time
|
|
36
|
-
*/
|
|
37
|
-
ContainerErrorType["throttlingError"] = "throttlingError";
|
|
38
|
-
/**
|
|
39
|
-
* Data loss error detected by Container / DeltaManager. Likely points to storage issue.
|
|
40
|
-
*/
|
|
41
|
-
ContainerErrorType["dataCorruptionError"] = "dataCorruptionError";
|
|
42
|
-
/**
|
|
43
|
-
* Error encountered when processing an operation. May correlate with data corruption.
|
|
44
|
-
*/
|
|
45
|
-
ContainerErrorType["dataProcessingError"] = "dataProcessingError";
|
|
46
|
-
/**
|
|
47
|
-
* Error indicating an API is being used improperly resulting in an invalid operation.
|
|
48
|
-
*/
|
|
49
|
-
ContainerErrorType["usageError"] = "usageError";
|
|
50
|
-
/**
|
|
51
|
-
* Error indicating an client session has expired. Currently this only happens when GC is allowed on a document and
|
|
52
|
-
* aids in safely deleting unused objects.
|
|
53
|
-
*/
|
|
54
|
-
ContainerErrorType["clientSessionExpiredError"] = "clientSessionExpiredError";
|
|
55
|
-
})(ContainerErrorType || (exports.ContainerErrorType = ContainerErrorType = {}));
|
|
56
22
|
//# sourceMappingURL=error.js.map
|
package/dist/error.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error.js","sourceRoot":"","sources":["../src/error.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAGH,uEAA2E;AAE3E;;;;GAIG;AACU,QAAA,mBAAmB,GAAG;IAClC,GAAG,0BAAe;IAClB;;;OAGG;IACH,yBAAyB,EAAE,2BAA2B;CAC7C,CAAC
|
|
1
|
+
{"version":3,"file":"error.js","sourceRoot":"","sources":["../src/error.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAGH,uEAA2E;AAE3E;;;;GAIG;AACU,QAAA,mBAAmB,GAAG;IAClC,GAAG,0BAAe;IAClB;;;OAGG;IACH,yBAAyB,EAAE,2BAA2B;CAC7C,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { IErrorBase } from \"@fluidframework/core-interfaces\";\nimport { FluidErrorTypes } from \"@fluidframework/core-interfaces/internal\";\n\n/**\n * Different error types the ClientSession may report out to the Host.\n * @legacy\n * @alpha\n */\nexport const ContainerErrorTypes = {\n\t...FluidErrorTypes,\n\t/**\n\t * Error indicating an client session has expired. Currently this only happens when GC is allowed on a document and\n\t * aids in safely deleting unused objects.\n\t */\n\tclientSessionExpiredError: \"clientSessionExpiredError\",\n} as const;\n\n/**\n * {@inheritDoc (ContainerErrorTypes:variable)}\n * @legacy\n * @alpha\n */\nexport type ContainerErrorTypes =\n\t(typeof ContainerErrorTypes)[keyof typeof ContainerErrorTypes];\n\n/**\n * Represents warnings raised on container.\n * @legacy\n * @alpha\n */\nexport interface ContainerWarning extends IErrorBase {\n\t/**\n\t * Whether this error has already been logged. Used to avoid logging errors twice.\n\t *\n\t * @defaultValue `false`\n\t */\n\tlogged?: boolean;\n}\n\n/**\n * Represents errors raised on container.\n *\n * @remarks\n *\n * The following are commonly thrown error types, but `errorType` could be any string.\n *\n * - {@link @fluidframework/core-interfaces#FluidErrorTypes}\n *\n * - {@link @fluidframework/driver-definitions#(DriverErrorTypes:variable)}\n *\n * @public\n */\nexport type ICriticalContainerError = IErrorBase;\n"]}
|
package/dist/loader.d.ts
CHANGED
|
@@ -586,10 +586,6 @@ export interface IContainerLoadMode {
|
|
|
586
586
|
* @internal
|
|
587
587
|
*/
|
|
588
588
|
export interface ILoaderHeader {
|
|
589
|
-
/**
|
|
590
|
-
* @deprecated This header has been deprecated and will be removed in a future release
|
|
591
|
-
*/
|
|
592
|
-
[LoaderHeader.cache]: boolean;
|
|
593
589
|
[LoaderHeader.clientDetails]: IClientDetails;
|
|
594
590
|
[LoaderHeader.loadMode]: IContainerLoadMode;
|
|
595
591
|
[LoaderHeader.reconnect]: boolean;
|
package/dist/loader.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file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C,EAAE,kBAAkB,CAAC;IAC5C,CAAC,YAAY,CAAC,SAAS,CAAC,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/dist/loader.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loader.js","sourceRoot":"","sources":["../src/loader.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AA+nBH;;;;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 * Policies to have various behaviors during container create and load.\n * @legacy\n * @alpha\n */\n// eslint-disable-next-line @typescript-eslint/consistent-type-definitions\nexport type IContainerPolicies = {\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;;;AA+nBH;;;;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 * Policies to have various behaviors during container create and load.\n * @legacy\n * @alpha\n */\n// eslint-disable-next-line @typescript-eslint/consistent-type-definitions\nexport type IContainerPolicies = {\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[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/dist/runtime.d.ts
CHANGED
|
@@ -154,6 +154,9 @@ export interface IContainerContext {
|
|
|
154
154
|
readonly attachState: AttachState;
|
|
155
155
|
getLoadedFromVersion(): IVersion | undefined;
|
|
156
156
|
updateDirtyContainerState(dirty: boolean): void;
|
|
157
|
+
/**
|
|
158
|
+
* @deprecated - This has been deprecated. It was used internally and there is no replacement.
|
|
159
|
+
*/
|
|
157
160
|
readonly supportedFeatures?: ReadonlyMap<string, unknown>;
|
|
158
161
|
/**
|
|
159
162
|
* WARNING: this id is meant for telemetry usages ONLY, not recommended for other consumption
|
package/dist/runtime.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../src/runtime.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EACX,WAAW,EACX,WAAW,EACX,oBAAoB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,IAAY,WAiBX;AAjBD,WAAY,WAAW;IACtB;;;OAGG;IACH,oCAAqB,CAAA;IAErB;;OAEG;IACH,sCAAuB,CAAA;IAEvB;;;OAGG;IACH,oCAAqB,CAAA;AACtB,CAAC,EAjBW,WAAW,2BAAX,WAAW,QAiBtB;AA+KD;;;GAGG;AACU,QAAA,eAAe,GAAiC,iBAAiB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type {\n\tFluidObject,\n\tIDisposable,\n\tITelemetryBaseLogger,\n} from \"@fluidframework/core-interfaces\";\nimport type {\n\tIClientDetails,\n\tIQuorumClients,\n\tISummaryTree,\n} from \"@fluidframework/driver-definitions\";\nimport type {\n\tIDocumentStorageService,\n\tISnapshot,\n\tIDocumentMessage,\n\tISnapshotTree,\n\tISummaryContent,\n\tIVersion,\n\tMessageType,\n\tISequencedDocumentMessage,\n} from \"@fluidframework/driver-definitions/internal\";\n\nimport type { IAudience } from \"./audience.js\";\nimport type { IDeltaManager } from \"./deltas.js\";\nimport type { ICriticalContainerError } from \"./error.js\";\nimport type { ILoader } from \"./loader.js\";\n\n/**\n * The attachment state of some Fluid data (e.g. a container or data store), denoting whether it is uploaded to the\n * service. The transition from detached to attached state is a one-way transition.\n * @public\n */\nexport enum AttachState {\n\t/**\n\t * In detached state, the data is only present on the local client's machine. It has not yet been uploaded\n\t * to the service.\n\t */\n\tDetached = \"Detached\",\n\n\t/**\n\t * In attaching state, the data has started the upload to the service, but has not yet completed.\n\t */\n\tAttaching = \"Attaching\",\n\n\t/**\n\t * In attached state, the data has completed upload to the service. It can be accessed by other clients after\n\t * reaching attached state.\n\t */\n\tAttached = \"Attached\",\n}\n\n/**\n * The IRuntime represents an instantiation of a code package within a Container.\n * Primarily held by the ContainerContext to be able to interact with the running instance of the Container.\n * @legacy\n * @alpha\n */\nexport interface IRuntime extends IDisposable {\n\t/**\n\t * Notifies the runtime of a change in the connection state\n\t */\n\tsetConnectionState(connected: boolean, clientId?: string);\n\n\t/**\n\t * Processes the given op (message)\n\t * @param message - delta message received from the server\n\t * @param local - true if the message was originally generated by the client receiving it.\n\t */\n\tprocess(message: ISequencedDocumentMessage, local: boolean);\n\n\t/**\n\t * Processes the given signal\n\t */\n\t// TODO: use `unknown` instead (API breaking)\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\tprocessSignal(message: any, local: boolean);\n\n\t/**\n\t * Create a summary. Used when attaching or serializing a detached container.\n\t *\n\t * @param blobRedirectTable - A table passed during the attach process. While detached, blob upload is supported\n\t * using IDs generated locally. After attach, these IDs cannot be used, so this table maps the old local IDs to the\n\t * new storage IDs so requests can be redirected.\n\t */\n\tcreateSummary(blobRedirectTable?: Map<string, string>): ISummaryTree;\n\n\t/**\n\t * Propagate the container state when container is attaching or attached.\n\t * @param attachState - State of the container.\n\t */\n\tsetAttachState(attachState: AttachState.Attaching | AttachState.Attached): void;\n\n\t/**\n\t * Get pending local state in a serializable format to be given back to a newly loaded container\n\t */\n\tgetPendingLocalState(props?: IGetPendingLocalStateProps): unknown;\n\n\t/**\n\t * Notify runtime that we have processed a saved message, so that it can do async work (applying\n\t * stashed ops) after having processed it.\n\t */\n\tnotifyOpReplay?(message: ISequencedDocumentMessage): Promise<void>;\n\n\t/**\n\t * Exposes the entryPoint for the container runtime.\n\t * Use this as the primary way of getting access to the user-defined logic within the container runtime.\n\t *\n\t * @see {@link IContainer.getEntryPoint}\n\t */\n\tgetEntryPoint(): Promise<FluidObject>;\n}\n\n/**\n * Payload type for IContainerContext.submitBatchFn()\n * @legacy\n * @alpha\n */\nexport interface IBatchMessage {\n\tcontents?: string;\n\tmetadata?: Record<string, unknown>;\n\tcompression?: string;\n\treferenceSequenceNumber?: number;\n}\n\n/**\n * IContainerContext is fundamentally just the set of things that an IRuntimeFactory (and IRuntime) will consume from the\n * loader layer.\n * It gets passed into the {@link (IRuntimeFactory:interface).instantiateRuntime} call.\n *\n * @privateremarks\n * Only include members on this interface if you intend them to be consumed/called from the runtime layer.\n *\n * TODO: once `@alpha` tag is removed, `unknown` should be removed from submitSignalFn.\n * See {@link https://dev.azure.com/fluidframework/internal/_workitems/edit/7462}\n *\n * @legacy\n * @alpha\n */\nexport interface IContainerContext {\n\t/**\n\t * Not recommended for general use, is used in some cases to control various runtime behaviors.\n\t *\n\t * @remarks\n\t * Used to be ILoaderOptions, this is staging for eventual removal.\n\t */\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\treadonly options: Record<string | number, any>;\n\treadonly clientId: string | undefined;\n\treadonly clientDetails: IClientDetails;\n\treadonly storage: IDocumentStorageService;\n\treadonly connected: boolean;\n\treadonly baseSnapshot: ISnapshotTree | undefined;\n\t/**\n\t * @deprecated Please use submitBatchFn & submitSummaryFn\n\t */\n\treadonly submitFn: (\n\t\ttype: MessageType,\n\t\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t\tcontents: any,\n\t\tbatch: boolean,\n\t\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t\tappData?: any,\n\t) => number;\n\t/**\n\t * @returns clientSequenceNumber of last message in a batch\n\t */\n\treadonly submitBatchFn: (batch: IBatchMessage[], referenceSequenceNumber?: number) => number;\n\treadonly submitSummaryFn: (\n\t\tsummaryOp: ISummaryContent,\n\t\treferenceSequenceNumber?: number,\n\t) => number;\n\treadonly submitSignalFn: (contents: unknown, targetClientId?: string) => void;\n\treadonly disposeFn?: (error?: ICriticalContainerError) => void;\n\treadonly closeFn: (error?: ICriticalContainerError) => void;\n\treadonly deltaManager: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>;\n\treadonly quorum: IQuorumClients;\n\treadonly audience: IAudience;\n\treadonly loader: ILoader;\n\t// The logger implementation, which would support tagged events, should be provided by the loader.\n\treadonly taggedLogger: ITelemetryBaseLogger;\n\tpendingLocalState?: unknown;\n\n\t/**\n\t * Ambient services provided with the context\n\t */\n\treadonly scope: FluidObject;\n\n\t/**\n\t * Get an absolute url for a provided container-relative request.\n\t * @param relativeUrl - A relative request within the container\n\t *\n\t * TODO: Optional for backwards compatibility. Make non-optional in version 0.19\n\t */\n\tgetAbsoluteUrl?(relativeUrl: string): Promise<string | undefined>;\n\n\t/**\n\t * Indicates the attachment state of the container to a host service.\n\t */\n\treadonly attachState: AttachState;\n\n\tgetLoadedFromVersion(): IVersion | undefined;\n\n\tupdateDirtyContainerState(dirty: boolean): void;\n\n\treadonly supportedFeatures?: ReadonlyMap<string, unknown>;\n\n\t/**\n\t * WARNING: this id is meant for telemetry usages ONLY, not recommended for other consumption\n\t * This id is not supposed to be exposed anywhere else. It is dependant on usage or drivers\n\t * and scenarios which can change in the future.\n\t * @deprecated 2.0.0-internal.5.2.0 - The docId is already logged by the {@link IContainerContext.taggedLogger} for\n\t * telemetry purposes, so this is generally unnecessary for telemetry.\n\t * If the id is needed for other purposes it should be passed to the consumer explicitly.\n\t *\n\t * @privateremarks Tracking in AB#5714\n\t */\n\treadonly id: string;\n\n\t/**\n\t * This contains all parts of a snapshot like blobContents, ops etc.\n\t */\n\treadonly snapshotWithContents?: ISnapshot;\n}\n\n/**\n * @legacy\n * @alpha\n */\nexport const IRuntimeFactory: keyof IProvideRuntimeFactory = \"IRuntimeFactory\";\n\n/**\n * @legacy\n * @alpha\n */\nexport interface IProvideRuntimeFactory {\n\treadonly IRuntimeFactory: IRuntimeFactory;\n}\n\n/**\n * Exported module definition\n *\n * Provides the entry point for the ContainerContext to load the proper IRuntime\n * to start up the running instance of the Container.\n * @legacy\n * @alpha\n */\nexport interface IRuntimeFactory extends IProvideRuntimeFactory {\n\t/**\n\t * Instantiates a new IRuntime for the given IContainerContext to proxy to\n\t * This is the main entry point to the Container's business logic\n\t *\n\t * @param context - container context to be supplied to the runtime\n\t * @param existing - whether to instantiate for the first time or from an existing context\n\t */\n\tinstantiateRuntime(context: IContainerContext, existing: boolean): Promise<IRuntime>;\n}\n\n/**\n * Defines list of properties expected for getPendingLocalState\n * @legacy\n * @alpha\n */\nexport interface IGetPendingLocalStateProps {\n\t/**\n\t * Indicates the container will close after getting the pending state. Used internally\n\t * to wait for blobs to be attached to a DDS and collect generated ops before closing.\n\t */\n\treadonly notifyImminentClosure: boolean;\n\n\t/**\n\t * Abort signal to stop waiting for blobs to get attached to a DDS. When triggered,\n\t * only blobs attached will be collected in the pending state.\n\t * Intended to be used in the very rare scenario in which getLocalPendingState go stale due\n\t * to a blob failed to be referenced. Such a blob will be lost but the rest of the state will\n\t * be preserved and collected.\n\t */\n\treadonly stopBlobAttachingSignal?: AbortSignal;\n\n\t/**\n\t * Date to be used as the starting time of a session. This date is updated in case we refresh the\n\t * base snapshot since we won't be referencing ops older than the new snapshot.\n\t */\n\treadonly sessionExpiryTimerStarted?: number;\n\n\t/**\n\t * Snapshot sequence number. It will help the runtime to know which ops should still be stashed.\n\t */\n\treadonly snapshotSequenceNumber?: number;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"runtime.js","sourceRoot":"","sources":["../src/runtime.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AA4BH;;;;GAIG;AACH,IAAY,WAiBX;AAjBD,WAAY,WAAW;IACtB;;;OAGG;IACH,oCAAqB,CAAA;IAErB;;OAEG;IACH,sCAAuB,CAAA;IAEvB;;;OAGG;IACH,oCAAqB,CAAA;AACtB,CAAC,EAjBW,WAAW,2BAAX,WAAW,QAiBtB;AAkLD;;;GAGG;AACU,QAAA,eAAe,GAAiC,iBAAiB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type {\n\tFluidObject,\n\tIDisposable,\n\tITelemetryBaseLogger,\n} from \"@fluidframework/core-interfaces\";\nimport type {\n\tIClientDetails,\n\tIQuorumClients,\n\tISummaryTree,\n} from \"@fluidframework/driver-definitions\";\nimport type {\n\tIDocumentStorageService,\n\tISnapshot,\n\tIDocumentMessage,\n\tISnapshotTree,\n\tISummaryContent,\n\tIVersion,\n\tMessageType,\n\tISequencedDocumentMessage,\n} from \"@fluidframework/driver-definitions/internal\";\n\nimport type { IAudience } from \"./audience.js\";\nimport type { IDeltaManager } from \"./deltas.js\";\nimport type { ICriticalContainerError } from \"./error.js\";\nimport type { ILoader } from \"./loader.js\";\n\n/**\n * The attachment state of some Fluid data (e.g. a container or data store), denoting whether it is uploaded to the\n * service. The transition from detached to attached state is a one-way transition.\n * @public\n */\nexport enum AttachState {\n\t/**\n\t * In detached state, the data is only present on the local client's machine. It has not yet been uploaded\n\t * to the service.\n\t */\n\tDetached = \"Detached\",\n\n\t/**\n\t * In attaching state, the data has started the upload to the service, but has not yet completed.\n\t */\n\tAttaching = \"Attaching\",\n\n\t/**\n\t * In attached state, the data has completed upload to the service. It can be accessed by other clients after\n\t * reaching attached state.\n\t */\n\tAttached = \"Attached\",\n}\n\n/**\n * The IRuntime represents an instantiation of a code package within a Container.\n * Primarily held by the ContainerContext to be able to interact with the running instance of the Container.\n * @legacy\n * @alpha\n */\nexport interface IRuntime extends IDisposable {\n\t/**\n\t * Notifies the runtime of a change in the connection state\n\t */\n\tsetConnectionState(connected: boolean, clientId?: string);\n\n\t/**\n\t * Processes the given op (message)\n\t * @param message - delta message received from the server\n\t * @param local - true if the message was originally generated by the client receiving it.\n\t */\n\tprocess(message: ISequencedDocumentMessage, local: boolean);\n\n\t/**\n\t * Processes the given signal\n\t */\n\t// TODO: use `unknown` instead (API breaking)\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\tprocessSignal(message: any, local: boolean);\n\n\t/**\n\t * Create a summary. Used when attaching or serializing a detached container.\n\t *\n\t * @param blobRedirectTable - A table passed during the attach process. While detached, blob upload is supported\n\t * using IDs generated locally. After attach, these IDs cannot be used, so this table maps the old local IDs to the\n\t * new storage IDs so requests can be redirected.\n\t */\n\tcreateSummary(blobRedirectTable?: Map<string, string>): ISummaryTree;\n\n\t/**\n\t * Propagate the container state when container is attaching or attached.\n\t * @param attachState - State of the container.\n\t */\n\tsetAttachState(attachState: AttachState.Attaching | AttachState.Attached): void;\n\n\t/**\n\t * Get pending local state in a serializable format to be given back to a newly loaded container\n\t */\n\tgetPendingLocalState(props?: IGetPendingLocalStateProps): unknown;\n\n\t/**\n\t * Notify runtime that we have processed a saved message, so that it can do async work (applying\n\t * stashed ops) after having processed it.\n\t */\n\tnotifyOpReplay?(message: ISequencedDocumentMessage): Promise<void>;\n\n\t/**\n\t * Exposes the entryPoint for the container runtime.\n\t * Use this as the primary way of getting access to the user-defined logic within the container runtime.\n\t *\n\t * @see {@link IContainer.getEntryPoint}\n\t */\n\tgetEntryPoint(): Promise<FluidObject>;\n}\n\n/**\n * Payload type for IContainerContext.submitBatchFn()\n * @legacy\n * @alpha\n */\nexport interface IBatchMessage {\n\tcontents?: string;\n\tmetadata?: Record<string, unknown>;\n\tcompression?: string;\n\treferenceSequenceNumber?: number;\n}\n\n/**\n * IContainerContext is fundamentally just the set of things that an IRuntimeFactory (and IRuntime) will consume from the\n * loader layer.\n * It gets passed into the {@link (IRuntimeFactory:interface).instantiateRuntime} call.\n *\n * @privateremarks\n * Only include members on this interface if you intend them to be consumed/called from the runtime layer.\n *\n * TODO: once `@alpha` tag is removed, `unknown` should be removed from submitSignalFn.\n * See {@link https://dev.azure.com/fluidframework/internal/_workitems/edit/7462}\n *\n * @legacy\n * @alpha\n */\nexport interface IContainerContext {\n\t/**\n\t * Not recommended for general use, is used in some cases to control various runtime behaviors.\n\t *\n\t * @remarks\n\t * Used to be ILoaderOptions, this is staging for eventual removal.\n\t */\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\treadonly options: Record<string | number, any>;\n\treadonly clientId: string | undefined;\n\treadonly clientDetails: IClientDetails;\n\treadonly storage: IDocumentStorageService;\n\treadonly connected: boolean;\n\treadonly baseSnapshot: ISnapshotTree | undefined;\n\t/**\n\t * @deprecated Please use submitBatchFn & submitSummaryFn\n\t */\n\treadonly submitFn: (\n\t\ttype: MessageType,\n\t\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t\tcontents: any,\n\t\tbatch: boolean,\n\t\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t\tappData?: any,\n\t) => number;\n\t/**\n\t * @returns clientSequenceNumber of last message in a batch\n\t */\n\treadonly submitBatchFn: (batch: IBatchMessage[], referenceSequenceNumber?: number) => number;\n\treadonly submitSummaryFn: (\n\t\tsummaryOp: ISummaryContent,\n\t\treferenceSequenceNumber?: number,\n\t) => number;\n\treadonly submitSignalFn: (contents: unknown, targetClientId?: string) => void;\n\treadonly disposeFn?: (error?: ICriticalContainerError) => void;\n\treadonly closeFn: (error?: ICriticalContainerError) => void;\n\treadonly deltaManager: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>;\n\treadonly quorum: IQuorumClients;\n\treadonly audience: IAudience;\n\treadonly loader: ILoader;\n\t// The logger implementation, which would support tagged events, should be provided by the loader.\n\treadonly taggedLogger: ITelemetryBaseLogger;\n\tpendingLocalState?: unknown;\n\n\t/**\n\t * Ambient services provided with the context\n\t */\n\treadonly scope: FluidObject;\n\n\t/**\n\t * Get an absolute url for a provided container-relative request.\n\t * @param relativeUrl - A relative request within the container\n\t *\n\t * TODO: Optional for backwards compatibility. Make non-optional in version 0.19\n\t */\n\tgetAbsoluteUrl?(relativeUrl: string): Promise<string | undefined>;\n\n\t/**\n\t * Indicates the attachment state of the container to a host service.\n\t */\n\treadonly attachState: AttachState;\n\n\tgetLoadedFromVersion(): IVersion | undefined;\n\n\tupdateDirtyContainerState(dirty: boolean): void;\n\n\t/**\n\t * @deprecated - This has been deprecated. It was used internally and there is no replacement.\n\t */\n\treadonly supportedFeatures?: ReadonlyMap<string, unknown>;\n\n\t/**\n\t * WARNING: this id is meant for telemetry usages ONLY, not recommended for other consumption\n\t * This id is not supposed to be exposed anywhere else. It is dependant on usage or drivers\n\t * and scenarios which can change in the future.\n\t * @deprecated 2.0.0-internal.5.2.0 - The docId is already logged by the {@link IContainerContext.taggedLogger} for\n\t * telemetry purposes, so this is generally unnecessary for telemetry.\n\t * If the id is needed for other purposes it should be passed to the consumer explicitly.\n\t *\n\t * @privateremarks Tracking in AB#5714\n\t */\n\treadonly id: string;\n\n\t/**\n\t * This contains all parts of a snapshot like blobContents, ops etc.\n\t */\n\treadonly snapshotWithContents?: ISnapshot;\n}\n\n/**\n * @legacy\n * @alpha\n */\nexport const IRuntimeFactory: keyof IProvideRuntimeFactory = \"IRuntimeFactory\";\n\n/**\n * @legacy\n * @alpha\n */\nexport interface IProvideRuntimeFactory {\n\treadonly IRuntimeFactory: IRuntimeFactory;\n}\n\n/**\n * Exported module definition\n *\n * Provides the entry point for the ContainerContext to load the proper IRuntime\n * to start up the running instance of the Container.\n * @legacy\n * @alpha\n */\nexport interface IRuntimeFactory extends IProvideRuntimeFactory {\n\t/**\n\t * Instantiates a new IRuntime for the given IContainerContext to proxy to\n\t * This is the main entry point to the Container's business logic\n\t *\n\t * @param context - container context to be supplied to the runtime\n\t * @param existing - whether to instantiate for the first time or from an existing context\n\t */\n\tinstantiateRuntime(context: IContainerContext, existing: boolean): Promise<IRuntime>;\n}\n\n/**\n * Defines list of properties expected for getPendingLocalState\n * @legacy\n * @alpha\n */\nexport interface IGetPendingLocalStateProps {\n\t/**\n\t * Indicates the container will close after getting the pending state. Used internally\n\t * to wait for blobs to be attached to a DDS and collect generated ops before closing.\n\t */\n\treadonly notifyImminentClosure: boolean;\n\n\t/**\n\t * Abort signal to stop waiting for blobs to get attached to a DDS. When triggered,\n\t * only blobs attached will be collected in the pending state.\n\t * Intended to be used in the very rare scenario in which getLocalPendingState go stale due\n\t * to a blob failed to be referenced. Such a blob will be lost but the rest of the state will\n\t * be preserved and collected.\n\t */\n\treadonly stopBlobAttachingSignal?: AbortSignal;\n\n\t/**\n\t * Date to be used as the starting time of a session. This date is updated in case we refresh the\n\t * base snapshot since we won't be referencing ops older than the new snapshot.\n\t */\n\treadonly sessionExpiryTimerStarted?: number;\n\n\t/**\n\t * Snapshot sequence number. It will help the runtime to know which ops should still be stashed.\n\t */\n\treadonly snapshotSequenceNumber?: number;\n}\n"]}
|
package/lib/error.d.ts
CHANGED
|
@@ -26,39 +26,6 @@ export declare const ContainerErrorTypes: {
|
|
|
26
26
|
* @alpha
|
|
27
27
|
*/
|
|
28
28
|
export type ContainerErrorTypes = (typeof ContainerErrorTypes)[keyof typeof ContainerErrorTypes];
|
|
29
|
-
/**
|
|
30
|
-
* Different error types the Container may report out to the Host.
|
|
31
|
-
*
|
|
32
|
-
* @deprecated ContainerErrorType is being deprecated as a public export. Please use {@link ContainerErrorTypes#clientSessionExpiredError} instead.
|
|
33
|
-
* @internal
|
|
34
|
-
*/
|
|
35
|
-
export declare enum ContainerErrorType {
|
|
36
|
-
/**
|
|
37
|
-
* Some error, most likely an exception caught by runtime and propagated to container as critical error
|
|
38
|
-
*/
|
|
39
|
-
genericError = "genericError",
|
|
40
|
-
/**
|
|
41
|
-
* Throttling error from server. Server is busy and is asking not to reconnect for some time
|
|
42
|
-
*/
|
|
43
|
-
throttlingError = "throttlingError",
|
|
44
|
-
/**
|
|
45
|
-
* Data loss error detected by Container / DeltaManager. Likely points to storage issue.
|
|
46
|
-
*/
|
|
47
|
-
dataCorruptionError = "dataCorruptionError",
|
|
48
|
-
/**
|
|
49
|
-
* Error encountered when processing an operation. May correlate with data corruption.
|
|
50
|
-
*/
|
|
51
|
-
dataProcessingError = "dataProcessingError",
|
|
52
|
-
/**
|
|
53
|
-
* Error indicating an API is being used improperly resulting in an invalid operation.
|
|
54
|
-
*/
|
|
55
|
-
usageError = "usageError",
|
|
56
|
-
/**
|
|
57
|
-
* Error indicating an client session has expired. Currently this only happens when GC is allowed on a document and
|
|
58
|
-
* aids in safely deleting unused objects.
|
|
59
|
-
*/
|
|
60
|
-
clientSessionExpiredError = "clientSessionExpiredError"
|
|
61
|
-
}
|
|
62
29
|
/**
|
|
63
30
|
* Represents warnings raised on container.
|
|
64
31
|
* @legacy
|
package/lib/error.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../src/error.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAGlE;;;;GAIG;AACH,eAAO,MAAM,mBAAmB;IAE/B;;;OAGG;;;;;;;CAEM,CAAC;AAEX;;;;GAIG;AACH,MAAM,MAAM,mBAAmB,GAC9B,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,OAAO,mBAAmB,CAAC,CAAC;AAEhE
|
|
1
|
+
{"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../src/error.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAGlE;;;;GAIG;AACH,eAAO,MAAM,mBAAmB;IAE/B;;;OAGG;;;;;;;CAEM,CAAC;AAEX;;;;GAIG;AACH,MAAM,MAAM,mBAAmB,GAC9B,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,OAAO,mBAAmB,CAAC,CAAC;AAEhE;;;;GAIG;AACH,MAAM,WAAW,gBAAiB,SAAQ,UAAU;IACnD;;;;OAIG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;CACjB;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,uBAAuB,GAAG,UAAU,CAAC"}
|
package/lib/error.js
CHANGED
|
@@ -16,38 +16,4 @@ export const ContainerErrorTypes = {
|
|
|
16
16
|
*/
|
|
17
17
|
clientSessionExpiredError: "clientSessionExpiredError",
|
|
18
18
|
};
|
|
19
|
-
/**
|
|
20
|
-
* Different error types the Container may report out to the Host.
|
|
21
|
-
*
|
|
22
|
-
* @deprecated ContainerErrorType is being deprecated as a public export. Please use {@link ContainerErrorTypes#clientSessionExpiredError} instead.
|
|
23
|
-
* @internal
|
|
24
|
-
*/
|
|
25
|
-
export var ContainerErrorType;
|
|
26
|
-
(function (ContainerErrorType) {
|
|
27
|
-
/**
|
|
28
|
-
* Some error, most likely an exception caught by runtime and propagated to container as critical error
|
|
29
|
-
*/
|
|
30
|
-
ContainerErrorType["genericError"] = "genericError";
|
|
31
|
-
/**
|
|
32
|
-
* Throttling error from server. Server is busy and is asking not to reconnect for some time
|
|
33
|
-
*/
|
|
34
|
-
ContainerErrorType["throttlingError"] = "throttlingError";
|
|
35
|
-
/**
|
|
36
|
-
* Data loss error detected by Container / DeltaManager. Likely points to storage issue.
|
|
37
|
-
*/
|
|
38
|
-
ContainerErrorType["dataCorruptionError"] = "dataCorruptionError";
|
|
39
|
-
/**
|
|
40
|
-
* Error encountered when processing an operation. May correlate with data corruption.
|
|
41
|
-
*/
|
|
42
|
-
ContainerErrorType["dataProcessingError"] = "dataProcessingError";
|
|
43
|
-
/**
|
|
44
|
-
* Error indicating an API is being used improperly resulting in an invalid operation.
|
|
45
|
-
*/
|
|
46
|
-
ContainerErrorType["usageError"] = "usageError";
|
|
47
|
-
/**
|
|
48
|
-
* Error indicating an client session has expired. Currently this only happens when GC is allowed on a document and
|
|
49
|
-
* aids in safely deleting unused objects.
|
|
50
|
-
*/
|
|
51
|
-
ContainerErrorType["clientSessionExpiredError"] = "clientSessionExpiredError";
|
|
52
|
-
})(ContainerErrorType || (ContainerErrorType = {}));
|
|
53
19
|
//# sourceMappingURL=error.js.map
|
package/lib/error.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error.js","sourceRoot":"","sources":["../src/error.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,eAAe,EAAE,MAAM,0CAA0C,CAAC;AAE3E;;;;GAIG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG;IAClC,GAAG,eAAe;IAClB;;;OAGG;IACH,yBAAyB,EAAE,2BAA2B;CAC7C,CAAC
|
|
1
|
+
{"version":3,"file":"error.js","sourceRoot":"","sources":["../src/error.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,eAAe,EAAE,MAAM,0CAA0C,CAAC;AAE3E;;;;GAIG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG;IAClC,GAAG,eAAe;IAClB;;;OAGG;IACH,yBAAyB,EAAE,2BAA2B;CAC7C,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { IErrorBase } from \"@fluidframework/core-interfaces\";\nimport { FluidErrorTypes } from \"@fluidframework/core-interfaces/internal\";\n\n/**\n * Different error types the ClientSession may report out to the Host.\n * @legacy\n * @alpha\n */\nexport const ContainerErrorTypes = {\n\t...FluidErrorTypes,\n\t/**\n\t * Error indicating an client session has expired. Currently this only happens when GC is allowed on a document and\n\t * aids in safely deleting unused objects.\n\t */\n\tclientSessionExpiredError: \"clientSessionExpiredError\",\n} as const;\n\n/**\n * {@inheritDoc (ContainerErrorTypes:variable)}\n * @legacy\n * @alpha\n */\nexport type ContainerErrorTypes =\n\t(typeof ContainerErrorTypes)[keyof typeof ContainerErrorTypes];\n\n/**\n * Represents warnings raised on container.\n * @legacy\n * @alpha\n */\nexport interface ContainerWarning extends IErrorBase {\n\t/**\n\t * Whether this error has already been logged. Used to avoid logging errors twice.\n\t *\n\t * @defaultValue `false`\n\t */\n\tlogged?: boolean;\n}\n\n/**\n * Represents errors raised on container.\n *\n * @remarks\n *\n * The following are commonly thrown error types, but `errorType` could be any string.\n *\n * - {@link @fluidframework/core-interfaces#FluidErrorTypes}\n *\n * - {@link @fluidframework/driver-definitions#(DriverErrorTypes:variable)}\n *\n * @public\n */\nexport type ICriticalContainerError = IErrorBase;\n"]}
|
package/lib/loader.d.ts
CHANGED
|
@@ -586,10 +586,6 @@ export interface IContainerLoadMode {
|
|
|
586
586
|
* @internal
|
|
587
587
|
*/
|
|
588
588
|
export interface ILoaderHeader {
|
|
589
|
-
/**
|
|
590
|
-
* @deprecated This header has been deprecated and will be removed in a future release
|
|
591
|
-
*/
|
|
592
|
-
[LoaderHeader.cache]: boolean;
|
|
593
589
|
[LoaderHeader.clientDetails]: IClientDetails;
|
|
594
590
|
[LoaderHeader.loadMode]: IContainerLoadMode;
|
|
595
591
|
[LoaderHeader.reconnect]: boolean;
|
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,qBAAqB,EACrB,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,CAAC;IAErB;;;;;OAKG;IACH,OAAO,EAAE,iBAAiB,CAAC;CAC3B;AAED;;;;;GAKG;AACH,MAAM,WAAW,kBAAmB,SAAQ,OAAO,CAAC,gCAAgC,CAAC;IACpF;;;;;OAKG;IACH,IAAI,CAAC,MAAM,EAAE,iBAAiB,GAAG,OAAO,CAAC,uBAAuB,CAAC,CAAC;CAClE;AAED;;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MAAM,GAON,SAAS,GAMT,SAAS,CAAC;CACb;AAED;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC7B,CAAC,YAAY,CAAC,aAAa,CAAC,EAAE,cAAc,CAAC;IAC7C,CAAC,YAAY,CAAC,QAAQ,CAAC,EAAE,kBAAkB,CAAC;IAC5C,CAAC,YAAY,CAAC,SAAS,CAAC,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;AA+nBH;;;;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 * Policies to have various behaviors during container create and load.\n * @legacy\n * @alpha\n */\n// eslint-disable-next-line @typescript-eslint/consistent-type-definitions\nexport type IContainerPolicies = {\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;AA+nBH;;;;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 * Policies to have various behaviors during container create and load.\n * @legacy\n * @alpha\n */\n// eslint-disable-next-line @typescript-eslint/consistent-type-definitions\nexport type IContainerPolicies = {\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[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/runtime.d.ts
CHANGED
|
@@ -154,6 +154,9 @@ export interface IContainerContext {
|
|
|
154
154
|
readonly attachState: AttachState;
|
|
155
155
|
getLoadedFromVersion(): IVersion | undefined;
|
|
156
156
|
updateDirtyContainerState(dirty: boolean): void;
|
|
157
|
+
/**
|
|
158
|
+
* @deprecated - This has been deprecated. It was used internally and there is no replacement.
|
|
159
|
+
*/
|
|
157
160
|
readonly supportedFeatures?: ReadonlyMap<string, unknown>;
|
|
158
161
|
/**
|
|
159
162
|
* WARNING: this id is meant for telemetry usages ONLY, not recommended for other consumption
|
package/lib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C,EAAE,MAAM,CAAC;CACzC"}
|
package/lib/runtime.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime.js","sourceRoot":"","sources":["../src/runtime.ts"],"names":[],"mappings":"AAAA;;;GAGG;AA4BH;;;;GAIG;AACH,MAAM,CAAN,IAAY,WAiBX;AAjBD,WAAY,WAAW;IACtB;;;OAGG;IACH,oCAAqB,CAAA;IAErB;;OAEG;IACH,sCAAuB,CAAA;IAEvB;;;OAGG;IACH,oCAAqB,CAAA;AACtB,CAAC,EAjBW,WAAW,KAAX,WAAW,QAiBtB;AA+KD;;;GAGG;AACH,MAAM,CAAC,MAAM,eAAe,GAAiC,iBAAiB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type {\n\tFluidObject,\n\tIDisposable,\n\tITelemetryBaseLogger,\n} from \"@fluidframework/core-interfaces\";\nimport type {\n\tIClientDetails,\n\tIQuorumClients,\n\tISummaryTree,\n} from \"@fluidframework/driver-definitions\";\nimport type {\n\tIDocumentStorageService,\n\tISnapshot,\n\tIDocumentMessage,\n\tISnapshotTree,\n\tISummaryContent,\n\tIVersion,\n\tMessageType,\n\tISequencedDocumentMessage,\n} from \"@fluidframework/driver-definitions/internal\";\n\nimport type { IAudience } from \"./audience.js\";\nimport type { IDeltaManager } from \"./deltas.js\";\nimport type { ICriticalContainerError } from \"./error.js\";\nimport type { ILoader } from \"./loader.js\";\n\n/**\n * The attachment state of some Fluid data (e.g. a container or data store), denoting whether it is uploaded to the\n * service. The transition from detached to attached state is a one-way transition.\n * @public\n */\nexport enum AttachState {\n\t/**\n\t * In detached state, the data is only present on the local client's machine. It has not yet been uploaded\n\t * to the service.\n\t */\n\tDetached = \"Detached\",\n\n\t/**\n\t * In attaching state, the data has started the upload to the service, but has not yet completed.\n\t */\n\tAttaching = \"Attaching\",\n\n\t/**\n\t * In attached state, the data has completed upload to the service. It can be accessed by other clients after\n\t * reaching attached state.\n\t */\n\tAttached = \"Attached\",\n}\n\n/**\n * The IRuntime represents an instantiation of a code package within a Container.\n * Primarily held by the ContainerContext to be able to interact with the running instance of the Container.\n * @legacy\n * @alpha\n */\nexport interface IRuntime extends IDisposable {\n\t/**\n\t * Notifies the runtime of a change in the connection state\n\t */\n\tsetConnectionState(connected: boolean, clientId?: string);\n\n\t/**\n\t * Processes the given op (message)\n\t * @param message - delta message received from the server\n\t * @param local - true if the message was originally generated by the client receiving it.\n\t */\n\tprocess(message: ISequencedDocumentMessage, local: boolean);\n\n\t/**\n\t * Processes the given signal\n\t */\n\t// TODO: use `unknown` instead (API breaking)\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\tprocessSignal(message: any, local: boolean);\n\n\t/**\n\t * Create a summary. Used when attaching or serializing a detached container.\n\t *\n\t * @param blobRedirectTable - A table passed during the attach process. While detached, blob upload is supported\n\t * using IDs generated locally. After attach, these IDs cannot be used, so this table maps the old local IDs to the\n\t * new storage IDs so requests can be redirected.\n\t */\n\tcreateSummary(blobRedirectTable?: Map<string, string>): ISummaryTree;\n\n\t/**\n\t * Propagate the container state when container is attaching or attached.\n\t * @param attachState - State of the container.\n\t */\n\tsetAttachState(attachState: AttachState.Attaching | AttachState.Attached): void;\n\n\t/**\n\t * Get pending local state in a serializable format to be given back to a newly loaded container\n\t */\n\tgetPendingLocalState(props?: IGetPendingLocalStateProps): unknown;\n\n\t/**\n\t * Notify runtime that we have processed a saved message, so that it can do async work (applying\n\t * stashed ops) after having processed it.\n\t */\n\tnotifyOpReplay?(message: ISequencedDocumentMessage): Promise<void>;\n\n\t/**\n\t * Exposes the entryPoint for the container runtime.\n\t * Use this as the primary way of getting access to the user-defined logic within the container runtime.\n\t *\n\t * @see {@link IContainer.getEntryPoint}\n\t */\n\tgetEntryPoint(): Promise<FluidObject>;\n}\n\n/**\n * Payload type for IContainerContext.submitBatchFn()\n * @legacy\n * @alpha\n */\nexport interface IBatchMessage {\n\tcontents?: string;\n\tmetadata?: Record<string, unknown>;\n\tcompression?: string;\n\treferenceSequenceNumber?: number;\n}\n\n/**\n * IContainerContext is fundamentally just the set of things that an IRuntimeFactory (and IRuntime) will consume from the\n * loader layer.\n * It gets passed into the {@link (IRuntimeFactory:interface).instantiateRuntime} call.\n *\n * @privateremarks\n * Only include members on this interface if you intend them to be consumed/called from the runtime layer.\n *\n * TODO: once `@alpha` tag is removed, `unknown` should be removed from submitSignalFn.\n * See {@link https://dev.azure.com/fluidframework/internal/_workitems/edit/7462}\n *\n * @legacy\n * @alpha\n */\nexport interface IContainerContext {\n\t/**\n\t * Not recommended for general use, is used in some cases to control various runtime behaviors.\n\t *\n\t * @remarks\n\t * Used to be ILoaderOptions, this is staging for eventual removal.\n\t */\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\treadonly options: Record<string | number, any>;\n\treadonly clientId: string | undefined;\n\treadonly clientDetails: IClientDetails;\n\treadonly storage: IDocumentStorageService;\n\treadonly connected: boolean;\n\treadonly baseSnapshot: ISnapshotTree | undefined;\n\t/**\n\t * @deprecated Please use submitBatchFn & submitSummaryFn\n\t */\n\treadonly submitFn: (\n\t\ttype: MessageType,\n\t\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t\tcontents: any,\n\t\tbatch: boolean,\n\t\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t\tappData?: any,\n\t) => number;\n\t/**\n\t * @returns clientSequenceNumber of last message in a batch\n\t */\n\treadonly submitBatchFn: (batch: IBatchMessage[], referenceSequenceNumber?: number) => number;\n\treadonly submitSummaryFn: (\n\t\tsummaryOp: ISummaryContent,\n\t\treferenceSequenceNumber?: number,\n\t) => number;\n\treadonly submitSignalFn: (contents: unknown, targetClientId?: string) => void;\n\treadonly disposeFn?: (error?: ICriticalContainerError) => void;\n\treadonly closeFn: (error?: ICriticalContainerError) => void;\n\treadonly deltaManager: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>;\n\treadonly quorum: IQuorumClients;\n\treadonly audience: IAudience;\n\treadonly loader: ILoader;\n\t// The logger implementation, which would support tagged events, should be provided by the loader.\n\treadonly taggedLogger: ITelemetryBaseLogger;\n\tpendingLocalState?: unknown;\n\n\t/**\n\t * Ambient services provided with the context\n\t */\n\treadonly scope: FluidObject;\n\n\t/**\n\t * Get an absolute url for a provided container-relative request.\n\t * @param relativeUrl - A relative request within the container\n\t *\n\t * TODO: Optional for backwards compatibility. Make non-optional in version 0.19\n\t */\n\tgetAbsoluteUrl?(relativeUrl: string): Promise<string | undefined>;\n\n\t/**\n\t * Indicates the attachment state of the container to a host service.\n\t */\n\treadonly attachState: AttachState;\n\n\tgetLoadedFromVersion(): IVersion | undefined;\n\n\tupdateDirtyContainerState(dirty: boolean): void;\n\n\treadonly supportedFeatures?: ReadonlyMap<string, unknown>;\n\n\t/**\n\t * WARNING: this id is meant for telemetry usages ONLY, not recommended for other consumption\n\t * This id is not supposed to be exposed anywhere else. It is dependant on usage or drivers\n\t * and scenarios which can change in the future.\n\t * @deprecated 2.0.0-internal.5.2.0 - The docId is already logged by the {@link IContainerContext.taggedLogger} for\n\t * telemetry purposes, so this is generally unnecessary for telemetry.\n\t * If the id is needed for other purposes it should be passed to the consumer explicitly.\n\t *\n\t * @privateremarks Tracking in AB#5714\n\t */\n\treadonly id: string;\n\n\t/**\n\t * This contains all parts of a snapshot like blobContents, ops etc.\n\t */\n\treadonly snapshotWithContents?: ISnapshot;\n}\n\n/**\n * @legacy\n * @alpha\n */\nexport const IRuntimeFactory: keyof IProvideRuntimeFactory = \"IRuntimeFactory\";\n\n/**\n * @legacy\n * @alpha\n */\nexport interface IProvideRuntimeFactory {\n\treadonly IRuntimeFactory: IRuntimeFactory;\n}\n\n/**\n * Exported module definition\n *\n * Provides the entry point for the ContainerContext to load the proper IRuntime\n * to start up the running instance of the Container.\n * @legacy\n * @alpha\n */\nexport interface IRuntimeFactory extends IProvideRuntimeFactory {\n\t/**\n\t * Instantiates a new IRuntime for the given IContainerContext to proxy to\n\t * This is the main entry point to the Container's business logic\n\t *\n\t * @param context - container context to be supplied to the runtime\n\t * @param existing - whether to instantiate for the first time or from an existing context\n\t */\n\tinstantiateRuntime(context: IContainerContext, existing: boolean): Promise<IRuntime>;\n}\n\n/**\n * Defines list of properties expected for getPendingLocalState\n * @legacy\n * @alpha\n */\nexport interface IGetPendingLocalStateProps {\n\t/**\n\t * Indicates the container will close after getting the pending state. Used internally\n\t * to wait for blobs to be attached to a DDS and collect generated ops before closing.\n\t */\n\treadonly notifyImminentClosure: boolean;\n\n\t/**\n\t * Abort signal to stop waiting for blobs to get attached to a DDS. When triggered,\n\t * only blobs attached will be collected in the pending state.\n\t * Intended to be used in the very rare scenario in which getLocalPendingState go stale due\n\t * to a blob failed to be referenced. Such a blob will be lost but the rest of the state will\n\t * be preserved and collected.\n\t */\n\treadonly stopBlobAttachingSignal?: AbortSignal;\n\n\t/**\n\t * Date to be used as the starting time of a session. This date is updated in case we refresh the\n\t * base snapshot since we won't be referencing ops older than the new snapshot.\n\t */\n\treadonly sessionExpiryTimerStarted?: number;\n\n\t/**\n\t * Snapshot sequence number. It will help the runtime to know which ops should still be stashed.\n\t */\n\treadonly snapshotSequenceNumber?: number;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"runtime.js","sourceRoot":"","sources":["../src/runtime.ts"],"names":[],"mappings":"AAAA;;;GAGG;AA4BH;;;;GAIG;AACH,MAAM,CAAN,IAAY,WAiBX;AAjBD,WAAY,WAAW;IACtB;;;OAGG;IACH,oCAAqB,CAAA;IAErB;;OAEG;IACH,sCAAuB,CAAA;IAEvB;;;OAGG;IACH,oCAAqB,CAAA;AACtB,CAAC,EAjBW,WAAW,KAAX,WAAW,QAiBtB;AAkLD;;;GAGG;AACH,MAAM,CAAC,MAAM,eAAe,GAAiC,iBAAiB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type {\n\tFluidObject,\n\tIDisposable,\n\tITelemetryBaseLogger,\n} from \"@fluidframework/core-interfaces\";\nimport type {\n\tIClientDetails,\n\tIQuorumClients,\n\tISummaryTree,\n} from \"@fluidframework/driver-definitions\";\nimport type {\n\tIDocumentStorageService,\n\tISnapshot,\n\tIDocumentMessage,\n\tISnapshotTree,\n\tISummaryContent,\n\tIVersion,\n\tMessageType,\n\tISequencedDocumentMessage,\n} from \"@fluidframework/driver-definitions/internal\";\n\nimport type { IAudience } from \"./audience.js\";\nimport type { IDeltaManager } from \"./deltas.js\";\nimport type { ICriticalContainerError } from \"./error.js\";\nimport type { ILoader } from \"./loader.js\";\n\n/**\n * The attachment state of some Fluid data (e.g. a container or data store), denoting whether it is uploaded to the\n * service. The transition from detached to attached state is a one-way transition.\n * @public\n */\nexport enum AttachState {\n\t/**\n\t * In detached state, the data is only present on the local client's machine. It has not yet been uploaded\n\t * to the service.\n\t */\n\tDetached = \"Detached\",\n\n\t/**\n\t * In attaching state, the data has started the upload to the service, but has not yet completed.\n\t */\n\tAttaching = \"Attaching\",\n\n\t/**\n\t * In attached state, the data has completed upload to the service. It can be accessed by other clients after\n\t * reaching attached state.\n\t */\n\tAttached = \"Attached\",\n}\n\n/**\n * The IRuntime represents an instantiation of a code package within a Container.\n * Primarily held by the ContainerContext to be able to interact with the running instance of the Container.\n * @legacy\n * @alpha\n */\nexport interface IRuntime extends IDisposable {\n\t/**\n\t * Notifies the runtime of a change in the connection state\n\t */\n\tsetConnectionState(connected: boolean, clientId?: string);\n\n\t/**\n\t * Processes the given op (message)\n\t * @param message - delta message received from the server\n\t * @param local - true if the message was originally generated by the client receiving it.\n\t */\n\tprocess(message: ISequencedDocumentMessage, local: boolean);\n\n\t/**\n\t * Processes the given signal\n\t */\n\t// TODO: use `unknown` instead (API breaking)\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\tprocessSignal(message: any, local: boolean);\n\n\t/**\n\t * Create a summary. Used when attaching or serializing a detached container.\n\t *\n\t * @param blobRedirectTable - A table passed during the attach process. While detached, blob upload is supported\n\t * using IDs generated locally. After attach, these IDs cannot be used, so this table maps the old local IDs to the\n\t * new storage IDs so requests can be redirected.\n\t */\n\tcreateSummary(blobRedirectTable?: Map<string, string>): ISummaryTree;\n\n\t/**\n\t * Propagate the container state when container is attaching or attached.\n\t * @param attachState - State of the container.\n\t */\n\tsetAttachState(attachState: AttachState.Attaching | AttachState.Attached): void;\n\n\t/**\n\t * Get pending local state in a serializable format to be given back to a newly loaded container\n\t */\n\tgetPendingLocalState(props?: IGetPendingLocalStateProps): unknown;\n\n\t/**\n\t * Notify runtime that we have processed a saved message, so that it can do async work (applying\n\t * stashed ops) after having processed it.\n\t */\n\tnotifyOpReplay?(message: ISequencedDocumentMessage): Promise<void>;\n\n\t/**\n\t * Exposes the entryPoint for the container runtime.\n\t * Use this as the primary way of getting access to the user-defined logic within the container runtime.\n\t *\n\t * @see {@link IContainer.getEntryPoint}\n\t */\n\tgetEntryPoint(): Promise<FluidObject>;\n}\n\n/**\n * Payload type for IContainerContext.submitBatchFn()\n * @legacy\n * @alpha\n */\nexport interface IBatchMessage {\n\tcontents?: string;\n\tmetadata?: Record<string, unknown>;\n\tcompression?: string;\n\treferenceSequenceNumber?: number;\n}\n\n/**\n * IContainerContext is fundamentally just the set of things that an IRuntimeFactory (and IRuntime) will consume from the\n * loader layer.\n * It gets passed into the {@link (IRuntimeFactory:interface).instantiateRuntime} call.\n *\n * @privateremarks\n * Only include members on this interface if you intend them to be consumed/called from the runtime layer.\n *\n * TODO: once `@alpha` tag is removed, `unknown` should be removed from submitSignalFn.\n * See {@link https://dev.azure.com/fluidframework/internal/_workitems/edit/7462}\n *\n * @legacy\n * @alpha\n */\nexport interface IContainerContext {\n\t/**\n\t * Not recommended for general use, is used in some cases to control various runtime behaviors.\n\t *\n\t * @remarks\n\t * Used to be ILoaderOptions, this is staging for eventual removal.\n\t */\n\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\treadonly options: Record<string | number, any>;\n\treadonly clientId: string | undefined;\n\treadonly clientDetails: IClientDetails;\n\treadonly storage: IDocumentStorageService;\n\treadonly connected: boolean;\n\treadonly baseSnapshot: ISnapshotTree | undefined;\n\t/**\n\t * @deprecated Please use submitBatchFn & submitSummaryFn\n\t */\n\treadonly submitFn: (\n\t\ttype: MessageType,\n\t\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t\tcontents: any,\n\t\tbatch: boolean,\n\t\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t\tappData?: any,\n\t) => number;\n\t/**\n\t * @returns clientSequenceNumber of last message in a batch\n\t */\n\treadonly submitBatchFn: (batch: IBatchMessage[], referenceSequenceNumber?: number) => number;\n\treadonly submitSummaryFn: (\n\t\tsummaryOp: ISummaryContent,\n\t\treferenceSequenceNumber?: number,\n\t) => number;\n\treadonly submitSignalFn: (contents: unknown, targetClientId?: string) => void;\n\treadonly disposeFn?: (error?: ICriticalContainerError) => void;\n\treadonly closeFn: (error?: ICriticalContainerError) => void;\n\treadonly deltaManager: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>;\n\treadonly quorum: IQuorumClients;\n\treadonly audience: IAudience;\n\treadonly loader: ILoader;\n\t// The logger implementation, which would support tagged events, should be provided by the loader.\n\treadonly taggedLogger: ITelemetryBaseLogger;\n\tpendingLocalState?: unknown;\n\n\t/**\n\t * Ambient services provided with the context\n\t */\n\treadonly scope: FluidObject;\n\n\t/**\n\t * Get an absolute url for a provided container-relative request.\n\t * @param relativeUrl - A relative request within the container\n\t *\n\t * TODO: Optional for backwards compatibility. Make non-optional in version 0.19\n\t */\n\tgetAbsoluteUrl?(relativeUrl: string): Promise<string | undefined>;\n\n\t/**\n\t * Indicates the attachment state of the container to a host service.\n\t */\n\treadonly attachState: AttachState;\n\n\tgetLoadedFromVersion(): IVersion | undefined;\n\n\tupdateDirtyContainerState(dirty: boolean): void;\n\n\t/**\n\t * @deprecated - This has been deprecated. It was used internally and there is no replacement.\n\t */\n\treadonly supportedFeatures?: ReadonlyMap<string, unknown>;\n\n\t/**\n\t * WARNING: this id is meant for telemetry usages ONLY, not recommended for other consumption\n\t * This id is not supposed to be exposed anywhere else. It is dependant on usage or drivers\n\t * and scenarios which can change in the future.\n\t * @deprecated 2.0.0-internal.5.2.0 - The docId is already logged by the {@link IContainerContext.taggedLogger} for\n\t * telemetry purposes, so this is generally unnecessary for telemetry.\n\t * If the id is needed for other purposes it should be passed to the consumer explicitly.\n\t *\n\t * @privateremarks Tracking in AB#5714\n\t */\n\treadonly id: string;\n\n\t/**\n\t * This contains all parts of a snapshot like blobContents, ops etc.\n\t */\n\treadonly snapshotWithContents?: ISnapshot;\n}\n\n/**\n * @legacy\n * @alpha\n */\nexport const IRuntimeFactory: keyof IProvideRuntimeFactory = \"IRuntimeFactory\";\n\n/**\n * @legacy\n * @alpha\n */\nexport interface IProvideRuntimeFactory {\n\treadonly IRuntimeFactory: IRuntimeFactory;\n}\n\n/**\n * Exported module definition\n *\n * Provides the entry point for the ContainerContext to load the proper IRuntime\n * to start up the running instance of the Container.\n * @legacy\n * @alpha\n */\nexport interface IRuntimeFactory extends IProvideRuntimeFactory {\n\t/**\n\t * Instantiates a new IRuntime for the given IContainerContext to proxy to\n\t * This is the main entry point to the Container's business logic\n\t *\n\t * @param context - container context to be supplied to the runtime\n\t * @param existing - whether to instantiate for the first time or from an existing context\n\t */\n\tinstantiateRuntime(context: IContainerContext, existing: boolean): Promise<IRuntime>;\n}\n\n/**\n * Defines list of properties expected for getPendingLocalState\n * @legacy\n * @alpha\n */\nexport interface IGetPendingLocalStateProps {\n\t/**\n\t * Indicates the container will close after getting the pending state. Used internally\n\t * to wait for blobs to be attached to a DDS and collect generated ops before closing.\n\t */\n\treadonly notifyImminentClosure: boolean;\n\n\t/**\n\t * Abort signal to stop waiting for blobs to get attached to a DDS. When triggered,\n\t * only blobs attached will be collected in the pending state.\n\t * Intended to be used in the very rare scenario in which getLocalPendingState go stale due\n\t * to a blob failed to be referenced. Such a blob will be lost but the rest of the state will\n\t * be preserved and collected.\n\t */\n\treadonly stopBlobAttachingSignal?: AbortSignal;\n\n\t/**\n\t * Date to be used as the starting time of a session. This date is updated in case we refresh the\n\t * base snapshot since we won't be referencing ops older than the new snapshot.\n\t */\n\treadonly sessionExpiryTimerStarted?: number;\n\n\t/**\n\t * Snapshot sequence number. It will help the runtime to know which ops should still be stashed.\n\t */\n\treadonly snapshotSequenceNumber?: number;\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluidframework/container-definitions",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.22.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.22.0",
|
|
51
|
+
"@fluidframework/driver-definitions": "~2.22.0"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"@arethetypeswrong/cli": "^0.17.1",
|
|
@@ -56,13 +56,12 @@
|
|
|
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@2.
|
|
60
|
-
"@fluidframework/eslint-config-fluid": "^5.
|
|
59
|
+
"@fluidframework/container-definitions-previous": "npm:@fluidframework/container-definitions@2.21.0",
|
|
60
|
+
"@fluidframework/eslint-config-fluid": "^5.7.3",
|
|
61
61
|
"@microsoft/api-extractor": "7.47.8",
|
|
62
62
|
"concurrently": "^8.2.1",
|
|
63
63
|
"copyfiles": "^2.4.1",
|
|
64
64
|
"eslint": "~8.55.0",
|
|
65
|
-
"eslint-plugin-deprecation": "~2.0.0",
|
|
66
65
|
"prettier": "~3.0.3",
|
|
67
66
|
"rimraf": "^4.4.0",
|
|
68
67
|
"typescript": "~5.4.5"
|
|
@@ -103,7 +102,7 @@
|
|
|
103
102
|
"ci:build:docs": "api-extractor run",
|
|
104
103
|
"ci:test": "echo No test for this package",
|
|
105
104
|
"ci:test:coverage": "echo No test for this package",
|
|
106
|
-
"clean": "rimraf --glob dist lib
|
|
105
|
+
"clean": "rimraf --glob dist lib {alpha,beta,internal,legacy}.d.ts \"**/*.tsbuildinfo\" \"**/*.build.log\" _api-extractor-temp",
|
|
107
106
|
"eslint": "eslint --format stylish src",
|
|
108
107
|
"eslint:fix": "eslint --format stylish src --fix --fix-type problem,suggestion,layout",
|
|
109
108
|
"format": "npm run format:biome",
|
package/src/error.ts
CHANGED
|
@@ -28,45 +28,6 @@ export const ContainerErrorTypes = {
|
|
|
28
28
|
export type ContainerErrorTypes =
|
|
29
29
|
(typeof ContainerErrorTypes)[keyof typeof ContainerErrorTypes];
|
|
30
30
|
|
|
31
|
-
/**
|
|
32
|
-
* Different error types the Container may report out to the Host.
|
|
33
|
-
*
|
|
34
|
-
* @deprecated ContainerErrorType is being deprecated as a public export. Please use {@link ContainerErrorTypes#clientSessionExpiredError} instead.
|
|
35
|
-
* @internal
|
|
36
|
-
*/
|
|
37
|
-
export enum ContainerErrorType {
|
|
38
|
-
/**
|
|
39
|
-
* Some error, most likely an exception caught by runtime and propagated to container as critical error
|
|
40
|
-
*/
|
|
41
|
-
genericError = "genericError",
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
* Throttling error from server. Server is busy and is asking not to reconnect for some time
|
|
45
|
-
*/
|
|
46
|
-
throttlingError = "throttlingError",
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* Data loss error detected by Container / DeltaManager. Likely points to storage issue.
|
|
50
|
-
*/
|
|
51
|
-
dataCorruptionError = "dataCorruptionError",
|
|
52
|
-
|
|
53
|
-
/**
|
|
54
|
-
* Error encountered when processing an operation. May correlate with data corruption.
|
|
55
|
-
*/
|
|
56
|
-
dataProcessingError = "dataProcessingError",
|
|
57
|
-
|
|
58
|
-
/**
|
|
59
|
-
* Error indicating an API is being used improperly resulting in an invalid operation.
|
|
60
|
-
*/
|
|
61
|
-
usageError = "usageError",
|
|
62
|
-
|
|
63
|
-
/**
|
|
64
|
-
* Error indicating an client session has expired. Currently this only happens when GC is allowed on a document and
|
|
65
|
-
* aids in safely deleting unused objects.
|
|
66
|
-
*/
|
|
67
|
-
clientSessionExpiredError = "clientSessionExpiredError",
|
|
68
|
-
}
|
|
69
|
-
|
|
70
31
|
/**
|
|
71
32
|
* Represents warnings raised on container.
|
|
72
33
|
* @legacy
|
package/src/loader.ts
CHANGED
|
@@ -726,10 +726,6 @@ export interface IContainerLoadMode {
|
|
|
726
726
|
* @internal
|
|
727
727
|
*/
|
|
728
728
|
export interface ILoaderHeader {
|
|
729
|
-
/**
|
|
730
|
-
* @deprecated This header has been deprecated and will be removed in a future release
|
|
731
|
-
*/
|
|
732
|
-
[LoaderHeader.cache]: boolean;
|
|
733
729
|
[LoaderHeader.clientDetails]: IClientDetails;
|
|
734
730
|
[LoaderHeader.loadMode]: IContainerLoadMode;
|
|
735
731
|
[LoaderHeader.reconnect]: boolean;
|
package/src/runtime.ts
CHANGED
|
@@ -206,6 +206,9 @@ export interface IContainerContext {
|
|
|
206
206
|
|
|
207
207
|
updateDirtyContainerState(dirty: boolean): void;
|
|
208
208
|
|
|
209
|
+
/**
|
|
210
|
+
* @deprecated - This has been deprecated. It was used internally and there is no replacement.
|
|
211
|
+
*/
|
|
209
212
|
readonly supportedFeatures?: ReadonlyMap<string, unknown>;
|
|
210
213
|
|
|
211
214
|
/**
|