@fluidframework/container-definitions 2.0.0-dev.5.3.2.178189 → 2.0.0-dev.6.4.0.191258
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.js +2 -2
- package/CHANGELOG.md +227 -0
- package/README.md +4 -3
- package/dist/browserPackage.d.ts +1 -1
- package/dist/browserPackage.d.ts.map +1 -1
- package/dist/browserPackage.js +3 -6
- package/dist/browserPackage.js.map +1 -1
- package/dist/deltas.d.ts +57 -77
- package/dist/deltas.d.ts.map +1 -1
- package/dist/deltas.js.map +1 -1
- package/dist/error.d.ts +21 -50
- package/dist/error.d.ts.map +1 -1
- package/dist/error.js +16 -2
- package/dist/error.js.map +1 -1
- package/dist/fluidPackage.d.ts +1 -1
- package/dist/fluidPackage.d.ts.map +1 -1
- package/dist/fluidPackage.js +6 -4
- package/dist/fluidPackage.js.map +1 -1
- package/dist/index.d.ts +20 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/loader.d.ts +61 -34
- package/dist/loader.d.ts.map +1 -1
- package/dist/loader.js +5 -1
- package/dist/loader.js.map +1 -1
- package/dist/runtime.d.ts +15 -24
- package/dist/runtime.d.ts.map +1 -1
- package/dist/runtime.js.map +1 -1
- package/lib/browserPackage.d.ts +1 -1
- package/lib/browserPackage.d.ts.map +1 -1
- package/lib/browserPackage.js +3 -6
- package/lib/browserPackage.js.map +1 -1
- package/lib/deltas.d.ts +57 -77
- package/lib/deltas.d.ts.map +1 -1
- package/lib/deltas.js.map +1 -1
- package/lib/error.d.ts +21 -50
- package/lib/error.d.ts.map +1 -1
- package/lib/error.js +15 -1
- package/lib/error.js.map +1 -1
- package/lib/fluidPackage.d.ts +1 -1
- package/lib/fluidPackage.d.ts.map +1 -1
- package/lib/fluidPackage.js +6 -4
- package/lib/fluidPackage.js.map +1 -1
- package/lib/index.d.ts +20 -3
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib/loader.d.ts +61 -34
- package/lib/loader.d.ts.map +1 -1
- package/lib/loader.js +5 -1
- package/lib/loader.js.map +1 -1
- package/lib/runtime.d.ts +15 -24
- package/lib/runtime.d.ts.map +1 -1
- package/lib/runtime.js.map +1 -1
- package/package.json +10 -11
- package/src/browserPackage.ts +3 -1
- package/src/deltas.ts +63 -85
- package/src/error.ts +18 -55
- package/src/fluidPackage.ts +4 -2
- package/src/index.ts +21 -8
- package/src/loader.ts +76 -36
- package/src/runtime.ts +17 -25
package/dist/error.d.ts
CHANGED
|
@@ -2,9 +2,27 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
import {
|
|
5
|
+
import { IErrorBase } from "@fluidframework/core-interfaces";
|
|
6
6
|
/**
|
|
7
|
-
* Different error types the
|
|
7
|
+
* Different error types the ClientSession may report out to the Host.
|
|
8
|
+
*/
|
|
9
|
+
export declare const ContainerErrorTypes: {
|
|
10
|
+
/**
|
|
11
|
+
* Error indicating an client session has expired. Currently this only happens when GC is allowed on a document and
|
|
12
|
+
* aids in safely deleting unused objects.
|
|
13
|
+
*/
|
|
14
|
+
readonly clientSessionExpiredError: "clientSessionExpiredError";
|
|
15
|
+
readonly genericError: "genericError";
|
|
16
|
+
readonly throttlingError: "throttlingError";
|
|
17
|
+
readonly dataCorruptionError: "dataCorruptionError";
|
|
18
|
+
readonly dataProcessingError: "dataProcessingError";
|
|
19
|
+
readonly usageError: "usageError";
|
|
20
|
+
};
|
|
21
|
+
export declare type ContainerErrorTypes = typeof ContainerErrorTypes[keyof typeof ContainerErrorTypes];
|
|
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.
|
|
8
26
|
*/
|
|
9
27
|
export declare enum ContainerErrorType {
|
|
10
28
|
/**
|
|
@@ -33,33 +51,6 @@ export declare enum ContainerErrorType {
|
|
|
33
51
|
*/
|
|
34
52
|
clientSessionExpiredError = "clientSessionExpiredError"
|
|
35
53
|
}
|
|
36
|
-
/**
|
|
37
|
-
* Base interface for all errors and warnings at container level
|
|
38
|
-
*/
|
|
39
|
-
export interface IErrorBase extends Partial<Error> {
|
|
40
|
-
/** errorType is a union of error types from
|
|
41
|
-
* - container
|
|
42
|
-
* - runtime
|
|
43
|
-
* - drivers
|
|
44
|
-
*/
|
|
45
|
-
readonly errorType: string;
|
|
46
|
-
/**
|
|
47
|
-
* See Error.message
|
|
48
|
-
* Privacy Note - This is a freeform string that we may not control in all cases (e.g. a dependency throws an error)
|
|
49
|
-
* If there are known cases where this contains privacy-sensitive data it will be tagged and included in the result
|
|
50
|
-
* of getTelemetryProperties. When logging, consider fetching it that way rather than straight from this field.
|
|
51
|
-
*/
|
|
52
|
-
readonly message: string;
|
|
53
|
-
/** See Error.name */
|
|
54
|
-
readonly name?: string;
|
|
55
|
-
/** See Error.stack */
|
|
56
|
-
readonly stack?: string;
|
|
57
|
-
/**
|
|
58
|
-
* Returns all properties of this error object that are either safe to log
|
|
59
|
-
* or explicitly tagged as containing privacy-sensitive data.
|
|
60
|
-
*/
|
|
61
|
-
getTelemetryProperties?(): ITelemetryProperties;
|
|
62
|
-
}
|
|
63
54
|
/**
|
|
64
55
|
* Represents warnings raised on container.
|
|
65
56
|
*/
|
|
@@ -78,7 +69,7 @@ export interface ContainerWarning extends IErrorBase {
|
|
|
78
69
|
*
|
|
79
70
|
* The following are commonly thrown error types, but `errorType` could be any string.
|
|
80
71
|
*
|
|
81
|
-
* - {@link @fluidframework/
|
|
72
|
+
* - {@link @fluidframework/core-interfaces#ContainerErrorType}
|
|
82
73
|
*
|
|
83
74
|
* - {@link @fluidframework/driver-definitions#DriverErrorType}
|
|
84
75
|
*
|
|
@@ -88,24 +79,4 @@ export interface ContainerWarning extends IErrorBase {
|
|
|
88
79
|
*
|
|
89
80
|
*/
|
|
90
81
|
export declare type ICriticalContainerError = IErrorBase;
|
|
91
|
-
/**
|
|
92
|
-
* Generic wrapper for an unrecognized/uncategorized error object
|
|
93
|
-
*/
|
|
94
|
-
export interface IGenericError extends IErrorBase {
|
|
95
|
-
readonly errorType: ContainerErrorType.genericError;
|
|
96
|
-
error?: any;
|
|
97
|
-
}
|
|
98
|
-
/**
|
|
99
|
-
* Error indicating an API is being used improperly resulting in an invalid operation.
|
|
100
|
-
*/
|
|
101
|
-
export interface IUsageError extends IErrorBase {
|
|
102
|
-
readonly errorType: ContainerErrorType.usageError;
|
|
103
|
-
}
|
|
104
|
-
/**
|
|
105
|
-
* Warning emitted when requests to storage are being throttled
|
|
106
|
-
*/
|
|
107
|
-
export interface IThrottlingWarning extends IErrorBase {
|
|
108
|
-
readonly errorType: ContainerErrorType.throttlingError;
|
|
109
|
-
readonly retryAfterSeconds: number;
|
|
110
|
-
}
|
|
111
82
|
//# sourceMappingURL=error.d.ts.map
|
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,
|
|
1
|
+
{"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../src/error.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAmB,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAE9E;;GAEG;AACH,eAAO,MAAM,mBAAmB;IAE/B;;;OAGG;;;;;;;CAEM,CAAC;AACX,oBAAY,mBAAmB,GAAG,OAAO,mBAAmB,CAAC,MAAM,OAAO,mBAAmB,CAAC,CAAC;AAE/F;;;;GAIG;AACH,oBAAY,kBAAkB;IAC7B;;OAEG;IACH,YAAY,iBAAiB;IAE7B;;OAEG;IACH,eAAe,oBAAoB;IAEnC;;OAEG;IACH,mBAAmB,wBAAwB;IAE3C;;OAEG;IACH,mBAAmB,wBAAwB;IAE3C;;OAEG;IACH,UAAU,eAAe;IAEzB;;;OAGG;IACH,yBAAyB,8BAA8B;CACvD;AAED;;GAEG;AACH,MAAM,WAAW,gBAAiB,SAAQ,UAAU;IACnD;;;;OAIG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;CACjB;AAED;;;;;;;;;;;;;;;GAeG;AACH,oBAAY,uBAAuB,GAAG,UAAU,CAAC"}
|
package/dist/error.js
CHANGED
|
@@ -4,9 +4,23 @@
|
|
|
4
4
|
* Licensed under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.ContainerErrorType = void 0;
|
|
7
|
+
exports.ContainerErrorType = exports.ContainerErrorTypes = void 0;
|
|
8
|
+
const core_interfaces_1 = require("@fluidframework/core-interfaces");
|
|
8
9
|
/**
|
|
9
|
-
* Different error types the
|
|
10
|
+
* Different error types the ClientSession may report out to the Host.
|
|
11
|
+
*/
|
|
12
|
+
exports.ContainerErrorTypes = {
|
|
13
|
+
...core_interfaces_1.FluidErrorTypes,
|
|
14
|
+
/**
|
|
15
|
+
* Error indicating an client session has expired. Currently this only happens when GC is allowed on a document and
|
|
16
|
+
* aids in safely deleting unused objects.
|
|
17
|
+
*/
|
|
18
|
+
clientSessionExpiredError: "clientSessionExpiredError",
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* Different error types the Container may report out to the Host.
|
|
22
|
+
*
|
|
23
|
+
* @deprecated ContainerErrorType is being deprecated as a public export. Please use {@link ContainerErrorTypes#clientSessionExpiredError} instead.
|
|
10
24
|
*/
|
|
11
25
|
var ContainerErrorType;
|
|
12
26
|
(function (ContainerErrorType) {
|
package/dist/error.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error.js","sourceRoot":"","sources":["../src/error.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;
|
|
1
|
+
{"version":3,"file":"error.js","sourceRoot":"","sources":["../src/error.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,qEAA8E;AAE9E;;GAEG;AACU,QAAA,mBAAmB,GAAG;IAClC,GAAG,iCAAe;IAClB;;;OAGG;IACH,yBAAyB,EAAE,2BAA2B;CAC7C,CAAC;AAGX;;;;GAIG;AACH,IAAY,kBA+BX;AA/BD,WAAY,kBAAkB;IAC7B;;OAEG;IACH,mDAA6B,CAAA;IAE7B;;OAEG;IACH,yDAAmC,CAAA;IAEnC;;OAEG;IACH,iEAA2C,CAAA;IAE3C;;OAEG;IACH,iEAA2C,CAAA;IAE3C;;OAEG;IACH,+CAAyB,CAAA;IAEzB;;;OAGG;IACH,6EAAuD,CAAA;AACxD,CAAC,EA/BW,kBAAkB,GAAlB,0BAAkB,KAAlB,0BAAkB,QA+B7B","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { FluidErrorTypes, IErrorBase } from \"@fluidframework/core-interfaces\";\n\n/**\n * Different error types the ClientSession may report out to the Host.\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;\nexport type ContainerErrorTypes = typeof ContainerErrorTypes[keyof typeof ContainerErrorTypes];\n\n/**\n * Different error types the Container may report out to the Host.\n *\n * @deprecated ContainerErrorType is being deprecated as a public export. Please use {@link ContainerErrorTypes#clientSessionExpiredError} instead.\n */\nexport enum ContainerErrorType {\n\t/**\n\t * Some error, most likely an exception caught by runtime and propagated to container as critical error\n\t */\n\tgenericError = \"genericError\",\n\n\t/**\n\t * Throttling error from server. Server is busy and is asking not to reconnect for some time\n\t */\n\tthrottlingError = \"throttlingError\",\n\n\t/**\n\t * Data loss error detected by Container / DeltaManager. Likely points to storage issue.\n\t */\n\tdataCorruptionError = \"dataCorruptionError\",\n\n\t/**\n\t * Error encountered when processing an operation. May correlate with data corruption.\n\t */\n\tdataProcessingError = \"dataProcessingError\",\n\n\t/**\n\t * Error indicating an API is being used improperly resulting in an invalid operation.\n\t */\n\tusageError = \"usageError\",\n\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}\n\n/**\n * Represents warnings raised on container.\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 * @see\n *\n * The following are commonly thrown error types, but `errorType` could be any string.\n *\n * - {@link @fluidframework/core-interfaces#ContainerErrorType}\n *\n * - {@link @fluidframework/driver-definitions#DriverErrorType}\n *\n * - {@link @fluidframework/odsp-driver-definitions#OdspErrorType}\n *\n * - {@link @fluidframework/routerlicious-driver#RouterliciousErrorType}\n *\n */\nexport type ICriticalContainerError = IErrorBase;\n"]}
|
package/dist/fluidPackage.d.ts
CHANGED
|
@@ -57,7 +57,7 @@ export interface IFluidPackage {
|
|
|
57
57
|
* Check if the package.json defines a Fluid package
|
|
58
58
|
* @param pkg - the package json data to check if it is a Fluid package.
|
|
59
59
|
*/
|
|
60
|
-
export declare const isFluidPackage: (pkg:
|
|
60
|
+
export declare const isFluidPackage: (pkg: unknown) => pkg is Readonly<IFluidPackage>;
|
|
61
61
|
/**
|
|
62
62
|
* Package manager configuration. Provides a key value mapping of config values
|
|
63
63
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fluidPackage.d.ts","sourceRoot":"","sources":["../src/fluidPackage.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACxC;;;OAGG;IACH,CAAC,MAAM,EAAE,MAAM,GACZ,S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AW,iBAAiB;IACjC;;;OAGG;IACH,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,QAAQ,CAAC,aAAa,CAAC,CAAC;IAEnD;;;;;OAKG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,uBAAuB,CAAC;CAC1C;AAED,eAAO,MAAM,kBAAkB,YAAa,OAAO,2CAQlD,CAAC;AAEF,eAAO,MAAM,yBAAyB,EAAE,MAAM,gCAClB,CAAC;AAE7B,MAAM,WAAW,gCAAgC;IAChD,QAAQ,CAAC,yBAAyB,EAAE,yBAAyB,CAAC;CAC9D;AAED;;GAEG;AACH,MAAM,WAAW,yBAA0B,SAAQ,gCAAgC;IAClF;;;;;OAKG;IACH,SAAS,CAAC,SAAS,EAAE,iBAAiB,EAAE,UAAU,EAAE,iBAAiB,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAEzF;;;;;;;;;;;;;OAaG;IACH,OAAO,CAAC,CAAC,EAAE,iBAAiB,EAAE,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;CACjF"}
|
package/dist/fluidPackage.js
CHANGED
|
@@ -9,14 +9,16 @@ exports.IFluidCodeDetailsComparer = exports.isFluidCodeDetails = exports.isFluid
|
|
|
9
9
|
* Check if the package.json defines a Fluid package
|
|
10
10
|
* @param pkg - the package json data to check if it is a Fluid package.
|
|
11
11
|
*/
|
|
12
|
-
const isFluidPackage = (pkg) => typeof pkg === "object" &&
|
|
12
|
+
const isFluidPackage = (pkg) => typeof pkg === "object" &&
|
|
13
|
+
typeof pkg?.name === "string" &&
|
|
14
|
+
typeof pkg?.fluid === "object";
|
|
13
15
|
exports.isFluidPackage = isFluidPackage;
|
|
14
16
|
const isFluidCodeDetails = (details) => {
|
|
15
17
|
const maybeCodeDetails = details;
|
|
16
18
|
return (typeof maybeCodeDetails === "object" &&
|
|
17
|
-
(typeof
|
|
18
|
-
(0, exports.isFluidPackage)(maybeCodeDetails
|
|
19
|
-
(
|
|
19
|
+
(typeof maybeCodeDetails?.package === "string" ||
|
|
20
|
+
(0, exports.isFluidPackage)(maybeCodeDetails?.package)) &&
|
|
21
|
+
(maybeCodeDetails?.config === undefined || typeof maybeCodeDetails?.config === "object"));
|
|
20
22
|
};
|
|
21
23
|
exports.isFluidCodeDetails = isFluidCodeDetails;
|
|
22
24
|
exports.IFluidCodeDetailsComparer = "IFluidCodeDetailsComparer";
|
package/dist/fluidPackage.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fluidPackage.js","sourceRoot":"","sources":["../src/fluidPackage.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AA0DH;;;GAGG;AACI,MAAM,cAAc,GAAG,CAAC,
|
|
1
|
+
{"version":3,"file":"fluidPackage.js","sourceRoot":"","sources":["../src/fluidPackage.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AA0DH;;;GAGG;AACI,MAAM,cAAc,GAAG,CAAC,GAAY,EAAkC,EAAE,CAC9E,OAAO,GAAG,KAAK,QAAQ;IACvB,OAAQ,GAA8B,EAAE,IAAI,KAAK,QAAQ;IACzD,OAAQ,GAA8B,EAAE,KAAK,KAAK,QAAQ,CAAC;AAH/C,QAAA,cAAc,kBAGiC;AA4BrD,MAAM,kBAAkB,GAAG,CAAC,OAAgB,EAA0C,EAAE;IAC9F,MAAM,gBAAgB,GAAG,OAAiD,CAAC;IAC3E,OAAO,CACN,OAAO,gBAAgB,KAAK,QAAQ;QACpC,CAAC,OAAO,gBAAgB,EAAE,OAAO,KAAK,QAAQ;YAC7C,IAAA,sBAAc,EAAC,gBAAgB,EAAE,OAAO,CAAC,CAAC;QAC3C,CAAC,gBAAgB,EAAE,MAAM,KAAK,SAAS,IAAI,OAAO,gBAAgB,EAAE,MAAM,KAAK,QAAQ,CAAC,CACxF,CAAC;AACH,CAAC,CAAC;AARW,QAAA,kBAAkB,sBAQ7B;AAEW,QAAA,yBAAyB,GACrC,2BAA2B,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * Specifies an environment on Fluid property of a IFluidPackage.\n */\nexport interface IFluidPackageEnvironment {\n\t/**\n\t * The name of the target. For a browser environment, this could be umd for scripts\n\t * or css for styles.\n\t */\n\t[target: string]:\n\t\t| undefined\n\t\t| {\n\t\t\t\t/**\n\t\t\t\t * List of files for the target. These can be relative or absolute.\n\t\t\t\t * The code loader should resolve relative paths, and validate all\n\t\t\t\t * full urls.\n\t\t\t\t */\n\t\t\t\tfiles: string[];\n\n\t\t\t\t/**\n\t\t\t\t * General access for extended fields as specific usages will\n\t\t\t\t * likely have additional infornamation like a definition\n\t\t\t\t * of Library, the entrypoint for umd packages.\n\t\t\t\t */\n\t\t\t\t[key: string]: unknown;\n\t\t };\n}\n\n/**\n * Fluid-specific properties expected on a package to be loaded by the code loader.\n * While compatible with the npm package format it is not necessary that that package is an\n * npm package:\n * {@link https://stackoverflow.com/questions/10065564/add-custom-metadata-or-config-to-package-json-is-it-valid}\n */\nexport interface IFluidPackage {\n\t/**\n\t * The name of the package that this code represnets\n\t */\n\tname: string;\n\t/**\n\t * This object represents the Fluid specific properties of the package\n\t */\n\tfluid: {\n\t\t/**\n\t\t * The name of the of the environment. This should be something like browser, or node\n\t\t * and contain the necessary targets for loading this code in that environment.\n\t\t */\n\t\t[environment: string]: undefined | IFluidPackageEnvironment;\n\t};\n\t/**\n\t * General access for extended fields as specific usages will\n\t * likely have additional infornamation like a definition of\n\t * compatible versions, or deployment information like rings or rollouts.\n\t */\n\t[key: string]: unknown;\n}\n\n/**\n * Check if the package.json defines a Fluid package\n * @param pkg - the package json data to check if it is a Fluid package.\n */\nexport const isFluidPackage = (pkg: unknown): pkg is Readonly<IFluidPackage> =>\n\ttypeof pkg === \"object\" &&\n\ttypeof (pkg as Partial<IFluidPackage>)?.name === \"string\" &&\n\ttypeof (pkg as Partial<IFluidPackage>)?.fluid === \"object\";\n\n/**\n * Package manager configuration. Provides a key value mapping of config values\n */\nexport interface IFluidCodeDetailsConfig {\n\treadonly [key: string]: string;\n}\n\n/**\n * Data structure used to describe the code to load on the Fluid document\n */\nexport interface IFluidCodeDetails {\n\t/**\n\t * The code package to be used on the Fluid document. This is either the package name which will be loaded\n\t * from a package manager. Or the expanded Fluid package.\n\t */\n\treadonly package: string | Readonly<IFluidPackage>;\n\n\t/**\n\t * Configuration details. This includes links to the package manager and base CDNs.\n\t *\n\t * @remarks This is strictly consumer-defined data.\n\t * Its contents and semantics (including whether or not this data is present) are completely up to the consumer.\n\t */\n\treadonly config?: IFluidCodeDetailsConfig;\n}\n\nexport const isFluidCodeDetails = (details: unknown): details is Readonly<IFluidCodeDetails> => {\n\tconst maybeCodeDetails = details as Partial<IFluidCodeDetails> | undefined;\n\treturn (\n\t\ttypeof maybeCodeDetails === \"object\" &&\n\t\t(typeof maybeCodeDetails?.package === \"string\" ||\n\t\t\tisFluidPackage(maybeCodeDetails?.package)) &&\n\t\t(maybeCodeDetails?.config === undefined || typeof maybeCodeDetails?.config === \"object\")\n\t);\n};\n\nexport const IFluidCodeDetailsComparer: keyof IProvideFluidCodeDetailsComparer =\n\t\"IFluidCodeDetailsComparer\";\n\nexport interface IProvideFluidCodeDetailsComparer {\n\treadonly IFluidCodeDetailsComparer: IFluidCodeDetailsComparer;\n}\n\n/**\n * Provides capability to compare Fluid code details.\n */\nexport interface IFluidCodeDetailsComparer extends IProvideFluidCodeDetailsComparer {\n\t/**\n\t * Determines if the `candidate` code details satisfy the constraints specified in `constraint` code details.\n\t *\n\t * Similar semantics to:\n\t * {@link https://github.com/npm/node-semver#usage}\n\t */\n\tsatisfies(candidate: IFluidCodeDetails, constraint: IFluidCodeDetails): Promise<boolean>;\n\n\t/**\n\t * Return a number representing the ascending sort order of the `a` and `b` code details:\n\t *\n\t * - `< 0` if `a < b`.\n\t *\n\t * - `= 0` if `a === b`.\n\t *\n\t * - `> 0` if `a > b`.\n\t *\n\t * - `undefined` if `a` is not comparable to `b`.\n\t *\n\t * Similar semantics to:\n\t * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#description | Array.sort}\n\t */\n\tcompare(a: IFluidCodeDetails, b: IFluidCodeDetails): Promise<number | undefined>;\n}\n"]}
|
package/dist/index.d.ts
CHANGED
|
@@ -9,10 +9,27 @@
|
|
|
9
9
|
*/
|
|
10
10
|
export { IAudience, IAudienceOwner } from "./audience";
|
|
11
11
|
export { IFluidBrowserPackage, IFluidBrowserPackageEnvironment, isFluidBrowserPackage, } from "./browserPackage";
|
|
12
|
-
export { IConnectionDetails,
|
|
13
|
-
export { ContainerErrorType, ContainerWarning, ICriticalContainerError,
|
|
14
|
-
export { ConnectionState,
|
|
12
|
+
export { IConnectionDetails, IDeltaManager, IDeltaManagerEvents, IDeltaQueue, IDeltaQueueEvents, IDeltaSender, ReadOnlyInfo, } from "./deltas";
|
|
13
|
+
export { ContainerErrorTypes, ContainerErrorType, ContainerWarning, ICriticalContainerError, } from "./error";
|
|
14
|
+
export { ConnectionState, ICodeDetailsLoader, IContainer, IContainerEvents, IContainerLoadMode, IFluidCodeResolver, IFluidModuleWithDetails, IHostLoader, ILoader, ILoaderHeader, ILoaderOptions, IPendingLocalState, IProvideLoader, IResolvedFluidCodeDetails, ISnapshotTreeWithBlobContents, LoaderHeader, } from "./loader";
|
|
15
15
|
export { IFluidModule } from "./fluidModule";
|
|
16
16
|
export { IFluidPackage, IFluidPackageEnvironment, IFluidCodeDetails, IFluidCodeDetailsComparer, IFluidCodeDetailsConfig, IProvideFluidCodeDetailsComparer, isFluidPackage, isFluidCodeDetails, } from "./fluidPackage";
|
|
17
17
|
export { AttachState, IBatchMessage, IContainerContext, IProvideRuntimeFactory, IRuntime, IRuntimeFactory, } from "./runtime";
|
|
18
|
+
export {
|
|
19
|
+
/**
|
|
20
|
+
* @deprecated IErrorBase is being deprecated as a public export is moving to "core-interfaces".
|
|
21
|
+
*/
|
|
22
|
+
IErrorBase,
|
|
23
|
+
/**
|
|
24
|
+
* @deprecated IGenericError is being deprecated as a public export is moving to "core-interfaces".
|
|
25
|
+
*/
|
|
26
|
+
IGenericError,
|
|
27
|
+
/**
|
|
28
|
+
* @deprecated IThrottlingWarning is being deprecated as a public export is moving to "core-interfaces".
|
|
29
|
+
*/
|
|
30
|
+
IThrottlingWarning,
|
|
31
|
+
/**
|
|
32
|
+
* @deprecated IUsageError is being deprecated as a public export is moving to "core-interfaces".
|
|
33
|
+
*/
|
|
34
|
+
IUsageError, } from "@fluidframework/core-interfaces";
|
|
18
35
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;GAIG;AAEH,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AACvD,OAAO,EACN,oBAAoB,EACpB,+BAA+B,EAC/B,qBAAqB,GACrB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACN,kBAAkB,EAClB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;GAIG;AAEH,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AACvD,OAAO,EACN,oBAAoB,EACpB,+BAA+B,EAC/B,qBAAqB,GACrB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACN,kBAAkB,EAClB,aAAa,EACb,mBAAmB,EACnB,WAAW,EACX,iBAAiB,EACjB,YAAY,EACZ,YAAY,GACZ,MAAM,UAAU,CAAC;AAClB,OAAO,EACN,mBAAmB,EACnB,kBAAkB,EAClB,gBAAgB,EAChB,uBAAuB,GACvB,MAAM,SAAS,CAAC;AACjB,OAAO,EACN,eAAe,EACf,kBAAkB,EAClB,UAAU,EACV,gBAAgB,EAChB,kBAAkB,EAClB,kBAAkB,EAClB,uBAAuB,EACvB,WAAW,EACX,OAAO,EACP,aAAa,EACb,cAAc,EACd,kBAAkB,EAClB,cAAc,EACd,yBAAyB,EACzB,6BAA6B,EAC7B,YAAY,GACZ,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EACN,aAAa,EACb,wBAAwB,EACxB,iBAAiB,EACjB,yBAAyB,EACzB,uBAAuB,EACvB,gCAAgC,EAChC,cAAc,EACd,kBAAkB,GAClB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACN,WAAW,EACX,aAAa,EACb,iBAAiB,EACjB,sBAAsB,EACtB,QAAQ,EACR,eAAe,GACf,MAAM,WAAW,CAAC;AAEnB,OAAO;AACN;;GAEG;AACH,UAAU;AACV;;GAEG;AACH,aAAa;AACb;;GAEG;AACH,kBAAkB;AAClB;;GAEG;AACH,WAAW,GACX,MAAM,iCAAiC,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -4,10 +4,11 @@
|
|
|
4
4
|
* Licensed under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.IRuntimeFactory = exports.AttachState = exports.isFluidCodeDetails = exports.isFluidPackage = exports.IFluidCodeDetailsComparer = exports.LoaderHeader = exports.ContainerErrorType = exports.isFluidBrowserPackage = void 0;
|
|
7
|
+
exports.IRuntimeFactory = exports.AttachState = exports.isFluidCodeDetails = exports.isFluidPackage = exports.IFluidCodeDetailsComparer = exports.LoaderHeader = exports.ContainerErrorType = exports.ContainerErrorTypes = exports.isFluidBrowserPackage = void 0;
|
|
8
8
|
var browserPackage_1 = require("./browserPackage");
|
|
9
9
|
Object.defineProperty(exports, "isFluidBrowserPackage", { enumerable: true, get: function () { return browserPackage_1.isFluidBrowserPackage; } });
|
|
10
10
|
var error_1 = require("./error");
|
|
11
|
+
Object.defineProperty(exports, "ContainerErrorTypes", { enumerable: true, get: function () { return error_1.ContainerErrorTypes; } });
|
|
11
12
|
Object.defineProperty(exports, "ContainerErrorType", { enumerable: true, get: function () { return error_1.ContainerErrorType; } });
|
|
12
13
|
var loader_1 = require("./loader");
|
|
13
14
|
Object.defineProperty(exports, "LoaderHeader", { enumerable: true, get: function () { return loader_1.LoaderHeader; } });
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AASH,mDAI0B;AADzB,uHAAA,qBAAqB,OAAA;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AASH,mDAI0B;AADzB,uHAAA,qBAAqB,OAAA;AAWtB,iCAKiB;AAJhB,4GAAA,mBAAmB,OAAA;AACnB,2GAAA,kBAAkB,OAAA;AAInB,mCAiBkB;AADjB,sGAAA,YAAY,OAAA;AAGb,+CASwB;AALvB,yHAAA,yBAAyB,OAAA;AAGzB,8GAAA,cAAc,OAAA;AACd,kHAAA,kBAAkB,OAAA;AAEnB,qCAOmB;AANlB,sGAAA,WAAW,OAAA;AAKX,0GAAA,eAAe,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * This library contains the interfaces and types concerning the `Loader` and loading the `Container`.\n *\n * @packageDocumentation\n */\n\nexport { IAudience, IAudienceOwner } from \"./audience\";\nexport {\n\tIFluidBrowserPackage,\n\tIFluidBrowserPackageEnvironment,\n\tisFluidBrowserPackage,\n} from \"./browserPackage\";\nexport {\n\tIConnectionDetails,\n\tIDeltaManager,\n\tIDeltaManagerEvents,\n\tIDeltaQueue,\n\tIDeltaQueueEvents,\n\tIDeltaSender,\n\tReadOnlyInfo,\n} from \"./deltas\";\nexport {\n\tContainerErrorTypes,\n\tContainerErrorType,\n\tContainerWarning,\n\tICriticalContainerError,\n} from \"./error\";\nexport {\n\tConnectionState,\n\tICodeDetailsLoader,\n\tIContainer,\n\tIContainerEvents,\n\tIContainerLoadMode,\n\tIFluidCodeResolver,\n\tIFluidModuleWithDetails,\n\tIHostLoader,\n\tILoader,\n\tILoaderHeader,\n\tILoaderOptions,\n\tIPendingLocalState,\n\tIProvideLoader,\n\tIResolvedFluidCodeDetails,\n\tISnapshotTreeWithBlobContents,\n\tLoaderHeader,\n} from \"./loader\";\nexport { IFluidModule } from \"./fluidModule\";\nexport {\n\tIFluidPackage,\n\tIFluidPackageEnvironment,\n\tIFluidCodeDetails,\n\tIFluidCodeDetailsComparer,\n\tIFluidCodeDetailsConfig,\n\tIProvideFluidCodeDetailsComparer,\n\tisFluidPackage,\n\tisFluidCodeDetails,\n} from \"./fluidPackage\";\nexport {\n\tAttachState,\n\tIBatchMessage,\n\tIContainerContext,\n\tIProvideRuntimeFactory,\n\tIRuntime,\n\tIRuntimeFactory,\n} from \"./runtime\";\n\nexport {\n\t/**\n\t * @deprecated IErrorBase is being deprecated as a public export is moving to \"core-interfaces\".\n\t */\n\tIErrorBase,\n\t/**\n\t * @deprecated IGenericError is being deprecated as a public export is moving to \"core-interfaces\".\n\t */\n\tIGenericError,\n\t/**\n\t * @deprecated IThrottlingWarning is being deprecated as a public export is moving to \"core-interfaces\".\n\t */\n\tIThrottlingWarning,\n\t/**\n\t * @deprecated IUsageError is being deprecated as a public export is moving to \"core-interfaces\".\n\t */\n\tIUsageError,\n} from \"@fluidframework/core-interfaces\";\n"]}
|
package/dist/loader.d.ts
CHANGED
|
@@ -2,10 +2,9 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
import { IRequest, IResponse, IFluidRouter, FluidObject } from "@fluidframework/core-interfaces";
|
|
5
|
+
import { IRequest, IResponse, IFluidRouter, FluidObject, IEvent, IEventProvider } from "@fluidframework/core-interfaces";
|
|
6
6
|
import { IClientDetails, IDocumentMessage, IQuorumClients, ISequencedDocumentMessage, ISequencedProposal, ISnapshotTree } from "@fluidframework/protocol-definitions";
|
|
7
7
|
import { IResolvedUrl } from "@fluidframework/driver-definitions";
|
|
8
|
-
import { IEvent, IEventProvider } from "@fluidframework/common-definitions";
|
|
9
8
|
import { IAudience } from "./audience";
|
|
10
9
|
import { IDeltaManager, ReadOnlyInfo } from "./deltas";
|
|
11
10
|
import { ICriticalContainerError, ContainerWarning } from "./error";
|
|
@@ -37,7 +36,7 @@ export interface ICodeDetailsLoader extends Partial<IProvideFluidCodeDetailsComp
|
|
|
37
36
|
* Load the code module (package) that can interact with the document.
|
|
38
37
|
*
|
|
39
38
|
* @param source - Code proposal that articulates the current schema the document is written in.
|
|
40
|
-
* @returns
|
|
39
|
+
* @returns Code module entry point along with the code details associated with it.
|
|
41
40
|
*/
|
|
42
41
|
load(source: IFluidCodeDetails): Promise<IFluidModuleWithDetails>;
|
|
43
42
|
}
|
|
@@ -66,22 +65,11 @@ export interface IFluidCodeResolver {
|
|
|
66
65
|
/**
|
|
67
66
|
* Resolves a Fluid code details into a form that can be loaded.
|
|
68
67
|
* @param details - The Fluid code details to resolve.
|
|
69
|
-
* @returns
|
|
68
|
+
* @returns A IResolvedFluidCodeDetails where the resolvedPackage's Fluid file entries are absolute urls, and
|
|
70
69
|
* an optional resolvedPackageCacheId if the loaded package should be cached.
|
|
71
70
|
*/
|
|
72
71
|
resolveCodeDetails(details: IFluidCodeDetails): Promise<IResolvedFluidCodeDetails>;
|
|
73
72
|
}
|
|
74
|
-
/**
|
|
75
|
-
* Code AllowListing Interface
|
|
76
|
-
*
|
|
77
|
-
* @deprecated 2.0.0-internal.3.2.0 Fluid does not prescribe a particular code validation approach. Will be removed in an upcoming release.
|
|
78
|
-
*/
|
|
79
|
-
export interface ICodeAllowList {
|
|
80
|
-
/**
|
|
81
|
-
* @deprecated 2.0.0-internal.3.2.0 Fluid does not prescribe a particular code validation approach. Will be removed in an upcoming release.
|
|
82
|
-
*/
|
|
83
|
-
testSource(source: IResolvedFluidCodeDetails): Promise<boolean>;
|
|
84
|
-
}
|
|
85
73
|
/**
|
|
86
74
|
* Events emitted by the {@link IContainer} "upwards" to the Loader and Host.
|
|
87
75
|
*/
|
|
@@ -120,10 +108,6 @@ export interface IContainerEvents extends IEvent {
|
|
|
120
108
|
* @see {@link IContainer.proposeCodeDetails}
|
|
121
109
|
*/
|
|
122
110
|
(event: "codeDetailsProposed", listener: (codeDetails: IFluidCodeDetails, proposal: ISequencedProposal) => void): any;
|
|
123
|
-
/**
|
|
124
|
-
* @deprecated No replacement API recommended.
|
|
125
|
-
*/
|
|
126
|
-
(event: "contextChanged", listener: (codeDetails: IFluidCodeDetails) => void): any;
|
|
127
111
|
/**
|
|
128
112
|
* Emitted when the {@link IContainer} becomes disconnected from the Fluid service.
|
|
129
113
|
*
|
|
@@ -292,9 +276,13 @@ export interface IContainer extends IEventProvider<IContainerEvents>, IFluidRout
|
|
|
292
276
|
*/
|
|
293
277
|
getLoadedCodeDetails(): IFluidCodeDetails | undefined;
|
|
294
278
|
/**
|
|
295
|
-
* Returns true if the container has been closed, otherwise false.
|
|
279
|
+
* Returns true if the container has been closed and/or disposed, otherwise false.
|
|
296
280
|
*/
|
|
297
281
|
readonly closed: boolean;
|
|
282
|
+
/**
|
|
283
|
+
* Returns true if the container has been disposed, otherwise false.
|
|
284
|
+
*/
|
|
285
|
+
readonly disposed?: boolean;
|
|
298
286
|
/**
|
|
299
287
|
* Whether or not there are any local changes that have not been saved.
|
|
300
288
|
*/
|
|
@@ -314,15 +302,6 @@ export interface IContainer extends IEventProvider<IContainerEvents>, IFluidRout
|
|
|
314
302
|
* resulted in closing it.
|
|
315
303
|
*/
|
|
316
304
|
close(error?: ICriticalContainerError): void;
|
|
317
|
-
/**
|
|
318
|
-
* @deprecated - This is moved to the IContainerExperimental interface. To access you should cast IContainerExperimental before attempting to use
|
|
319
|
-
*
|
|
320
|
-
* Closes the container and returns serialized local state intended to be
|
|
321
|
-
* given to a newly loaded container.
|
|
322
|
-
* @experimental
|
|
323
|
-
* {@link https://github.com/microsoft/FluidFramework/blob/main/packages/loader/container-loader/closeAndGetPendingLocalState.md}
|
|
324
|
-
*/
|
|
325
|
-
closeAndGetPendingLocalState(): string;
|
|
326
305
|
/**
|
|
327
306
|
* Propose new code details that define the code to be loaded for this container's runtime.
|
|
328
307
|
*
|
|
@@ -350,11 +329,38 @@ export interface IContainer extends IEventProvider<IContainerEvents>, IFluidRout
|
|
|
350
329
|
* @param relativeUrl - A container-relative request URL.
|
|
351
330
|
*/
|
|
352
331
|
getAbsoluteUrl(relativeUrl: string): Promise<string | undefined>;
|
|
332
|
+
/**
|
|
333
|
+
* IMPORTANT: This overload is provided for back-compat where IContainer.request(\{ url: "/" \}) is already implemented and used.
|
|
334
|
+
* The functionality it can provide (if the Container implementation is built for it) is redundant with @see {@link IContainer.getEntryPoint}.
|
|
335
|
+
* Once that API is mandatory on IContainer, this overload will be deprecated.
|
|
336
|
+
*
|
|
337
|
+
* Refer to Removing-IFluidRouter.md for details on migrating from the request pattern to using entryPoint.
|
|
338
|
+
*
|
|
339
|
+
* @param request - Only requesting \{ url: "/" \} is supported, requesting arbitrary URLs is deprecated.
|
|
340
|
+
*/
|
|
341
|
+
request(request: {
|
|
342
|
+
url: "/";
|
|
343
|
+
headers?: undefined;
|
|
344
|
+
}): Promise<IResponse>;
|
|
353
345
|
/**
|
|
354
346
|
* Issue a request against the container for a resource.
|
|
355
347
|
* @param request - The request to be issued against the container
|
|
348
|
+
*
|
|
349
|
+
* @deprecated - Requesting an arbitrary URL with headers will not be supported in a future major release.
|
|
350
|
+
* Instead, access the objects in a Fluid Container using entryPoint, and then navigate from there using
|
|
351
|
+
* app-specific logic (e.g. retrieving handles from the entryPoint's DDSes, or a container's entryPoint object
|
|
352
|
+
* could implement a request paradigm itself)
|
|
353
|
+
*
|
|
354
|
+
* NOTE: IContainer.request(\{url: "/"\}) is not yet deprecated. If and only if the Container implementation supports it,
|
|
355
|
+
* that overload may be used as a proxy for getting the entryPoint until {@link IContainer.getEntryPoint} is mandatory.
|
|
356
|
+
*
|
|
357
|
+
* Refer to Removing-IFluidRouter.md for details on migrating from the request pattern to using entryPoint.
|
|
356
358
|
*/
|
|
357
359
|
request(request: IRequest): Promise<IResponse>;
|
|
360
|
+
/**
|
|
361
|
+
* @deprecated - Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
|
|
362
|
+
*/
|
|
363
|
+
readonly IFluidRouter: IFluidRouter;
|
|
358
364
|
/**
|
|
359
365
|
* Provides the current state of the container's connection to the ordering service.
|
|
360
366
|
*
|
|
@@ -428,7 +434,7 @@ export interface IContainer extends IEventProvider<IContainerEvents>, IFluidRout
|
|
|
428
434
|
/**
|
|
429
435
|
* The Runtime's view of the Loader, used for loading Containers
|
|
430
436
|
*/
|
|
431
|
-
export interface ILoader extends
|
|
437
|
+
export interface ILoader extends Partial<IProvideLoader> {
|
|
432
438
|
/**
|
|
433
439
|
* Resolves the resource specified by the URL + headers contained in the request object
|
|
434
440
|
* to the underlying container that will resolve the request.
|
|
@@ -439,6 +445,14 @@ export interface ILoader extends IFluidRouter, Partial<IProvideLoader> {
|
|
|
439
445
|
* a request against the server found from the resolve step.
|
|
440
446
|
*/
|
|
441
447
|
resolve(request: IRequest, pendingLocalState?: string): Promise<IContainer>;
|
|
448
|
+
/**
|
|
449
|
+
* @deprecated - Will be removed in future major release. Migrate all usage of IFluidRouter to the Container's IFluidRouter/request.
|
|
450
|
+
*/
|
|
451
|
+
request(request: IRequest): Promise<IResponse>;
|
|
452
|
+
/**
|
|
453
|
+
* @deprecated - Will be removed in future major release. Migrate all usage of IFluidRouter to the Container's IFluidRouter/request.
|
|
454
|
+
*/
|
|
455
|
+
readonly IFluidRouter: IFluidRouter;
|
|
442
456
|
}
|
|
443
457
|
/**
|
|
444
458
|
* The Host's view of the Loader, used for loading Containers
|
|
@@ -459,12 +473,13 @@ export declare type ILoaderOptions = {
|
|
|
459
473
|
[key in string | number]: any;
|
|
460
474
|
} & {
|
|
461
475
|
/**
|
|
476
|
+
* @deprecated This option has been deprecated and will be removed in a future release
|
|
462
477
|
* Set caching behavior for the loader. If true, we will load a container from cache if one
|
|
463
478
|
* with the same id/version exists or create a new container and cache it if it does not. If
|
|
464
479
|
* false, always load a new container and don't cache it. If the container has already been
|
|
465
480
|
* closed, it will not be cached. A cache option in the LoaderHeader for an individual
|
|
466
481
|
* request will override the Loader's value.
|
|
467
|
-
* Defaults to
|
|
482
|
+
* Defaults to false.
|
|
468
483
|
*/
|
|
469
484
|
cache?: boolean;
|
|
470
485
|
/**
|
|
@@ -485,7 +500,7 @@ export declare type ILoaderOptions = {
|
|
|
485
500
|
*/
|
|
486
501
|
export declare enum LoaderHeader {
|
|
487
502
|
/**
|
|
488
|
-
* @deprecated
|
|
503
|
+
* @deprecated This header has been deprecated and will be removed in a future release
|
|
489
504
|
* Override the Loader's default caching behavior for this container.
|
|
490
505
|
*/
|
|
491
506
|
cache = "fluid-cache",
|
|
@@ -495,6 +510,10 @@ export declare enum LoaderHeader {
|
|
|
495
510
|
*/
|
|
496
511
|
loadMode = "loadMode",
|
|
497
512
|
reconnect = "fluid-reconnect",
|
|
513
|
+
/**
|
|
514
|
+
* Loads the container to at least the specified sequence number.
|
|
515
|
+
* If not defined, behavior will fall back to `IContainerLoadMode.opsBeforeReturn`.
|
|
516
|
+
*/
|
|
498
517
|
sequenceNumber = "fluid-sequence-number",
|
|
499
518
|
/**
|
|
500
519
|
* One of the following:
|
|
@@ -505,19 +524,27 @@ export declare enum LoaderHeader {
|
|
|
505
524
|
version = "version"
|
|
506
525
|
}
|
|
507
526
|
export interface IContainerLoadMode {
|
|
508
|
-
opsBeforeReturn?: undefined | "cached" | "all";
|
|
527
|
+
opsBeforeReturn?: undefined | "sequenceNumber" | "cached" | "all";
|
|
509
528
|
deltaConnection?: "none" | "delayed" | undefined;
|
|
529
|
+
/**
|
|
530
|
+
* If set to true, will indefinitely pause all incoming and outgoing after the container is loaded.
|
|
531
|
+
*/
|
|
532
|
+
pauseAfterLoad?: boolean;
|
|
510
533
|
}
|
|
511
534
|
/**
|
|
512
535
|
* Set of Request Headers that the Loader understands and may inspect or modify
|
|
513
536
|
*/
|
|
514
537
|
export interface ILoaderHeader {
|
|
515
538
|
/**
|
|
516
|
-
* @deprecated
|
|
539
|
+
* @deprecated This header has been deprecated and will be removed in a future release
|
|
517
540
|
*/
|
|
518
541
|
[LoaderHeader.cache]: boolean;
|
|
519
542
|
[LoaderHeader.clientDetails]: IClientDetails;
|
|
520
543
|
[LoaderHeader.loadMode]: IContainerLoadMode;
|
|
544
|
+
/**
|
|
545
|
+
* Loads the container to at least the specified sequence number.
|
|
546
|
+
* If not defined, behavior will fall back to `IContainerLoadMode.opsBeforeReturn`.
|
|
547
|
+
*/
|
|
521
548
|
[LoaderHeader.sequenceNumber]: number;
|
|
522
549
|
[LoaderHeader.reconnect]: boolean;
|
|
523
550
|
[LoaderHeader.version]: string | undefined;
|
package/dist/loader.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loader.d.ts","sourceRoot":"","sources":["../src/loader.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"loader.d.ts","sourceRoot":"","sources":["../src/loader.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,QAAQ,EACR,SAAS,EACT,YAAY,EACZ,WAAW,EACX,MAAM,EACN,cAAc,EACd,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACN,cAAc,EACd,gBAAgB,EAChB,cAAc,EACd,yBAAyB,EACzB,kBAAkB,EAClB,aAAa,EACb,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAClE,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,aAA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C;IAC5C;;;OAGG;IACH,CAAC,YAAY,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC;IACtC,CAAC,YAAY,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC;IAClC,CAAC,YAAY,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC3C;AAED,MAAM,WAAW,cAAc;IAC9B,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;CAC1B;AAED;;;;GAIG;AACH,MAAM,WAAW,kBAAkB;IAClC,GAAG,EAAE,MAAM,CAAC;IACZ,mBAAmB,EAAE,OAAO,CAAC;CAC7B;AAED;;;;;GAKG;AACH,MAAM,WAAW,6BAA8B,SAAQ,aAAa;IACnE,aAAa,EAAE;QAAE,CAAC,IAAI,EAAE,MAAM,GAAG,eAAe,CAAA;KAAE,CAAC;IACnD,KAAK,EAAE;QAAE,CAAC,IAAI,EAAE,MAAM,GAAG,6BAA6B,CAAA;KAAE,CAAC;CACzD"}
|
package/dist/loader.js
CHANGED
|
@@ -11,7 +11,7 @@ exports.LoaderHeader = void 0;
|
|
|
11
11
|
var LoaderHeader;
|
|
12
12
|
(function (LoaderHeader) {
|
|
13
13
|
/**
|
|
14
|
-
* @deprecated
|
|
14
|
+
* @deprecated This header has been deprecated and will be removed in a future release
|
|
15
15
|
* Override the Loader's default caching behavior for this container.
|
|
16
16
|
*/
|
|
17
17
|
LoaderHeader["cache"] = "fluid-cache";
|
|
@@ -21,6 +21,10 @@ var LoaderHeader;
|
|
|
21
21
|
*/
|
|
22
22
|
LoaderHeader["loadMode"] = "loadMode";
|
|
23
23
|
LoaderHeader["reconnect"] = "fluid-reconnect";
|
|
24
|
+
/**
|
|
25
|
+
* Loads the container to at least the specified sequence number.
|
|
26
|
+
* If not defined, behavior will fall back to `IContainerLoadMode.opsBeforeReturn`.
|
|
27
|
+
*/
|
|
24
28
|
LoaderHeader["sequenceNumber"] = "fluid-sequence-number";
|
|
25
29
|
/**
|
|
26
30
|
* One of the following:
|