@fluidframework/container-loader 2.42.0 → 2.43.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +27 -0
- package/dist/container.d.ts +7 -0
- package/dist/container.d.ts.map +1 -1
- package/dist/container.js +27 -8
- package/dist/container.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -1
- package/dist/index.js.map +1 -1
- package/dist/loaderLayerCompatState.d.ts +10 -0
- package/dist/loaderLayerCompatState.d.ts.map +1 -1
- package/dist/loaderLayerCompatState.js +39 -1
- package/dist/loaderLayerCompatState.js.map +1 -1
- package/dist/packageVersion.d.ts +1 -1
- package/dist/packageVersion.js +1 -1
- package/dist/packageVersion.js.map +1 -1
- package/lib/container.d.ts +7 -0
- package/lib/container.d.ts.map +1 -1
- package/lib/container.js +28 -9
- package/lib/container.js.map +1 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/lib/loaderLayerCompatState.d.ts +10 -0
- package/lib/loaderLayerCompatState.d.ts.map +1 -1
- package/lib/loaderLayerCompatState.js +37 -0
- package/lib/loaderLayerCompatState.js.map +1 -1
- package/lib/packageVersion.d.ts +1 -1
- package/lib/packageVersion.js +1 -1
- package/lib/packageVersion.js.map +1 -1
- package/package.json +14 -14
- package/src/container.ts +51 -27
- package/src/index.ts +5 -0
- package/src/loaderLayerCompatState.ts +45 -0
- package/src/packageVersion.ts +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ export { ConnectionState } from "./connectionState.js";
|
|
|
6
6
|
export { IContainerExperimental, waitContainerToCatchUp } from "./container.js";
|
|
7
7
|
export { createDetachedContainer, loadExistingContainer, rehydrateDetachedContainer, ICreateAndLoadContainerProps, ICreateDetachedContainerProps, ILoadExistingContainerProps, IRehydrateDetachedContainerProps, } from "./createAndLoadContainerUtils.js";
|
|
8
8
|
export { ICodeDetailsLoader, IFluidModuleWithDetails, ILoaderProps, ILoaderServices, Loader, } from "./loader.js";
|
|
9
|
+
export { driverSupportRequirements, loaderCoreCompatDetails, runtimeSupportRequirements, } from "./loaderLayerCompatState.js";
|
|
9
10
|
export { loadContainerPaused } from "./loadPaused.js";
|
|
10
11
|
export { isLocationRedirectionError, resolveWithLocationRedirectionHandling, } from "./location-redirection-utilities/index.js";
|
|
11
12
|
export { IProtocolHandler, ProtocolHandlerBuilder } from "./protocol.js";
|
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,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AAChF,OAAO,EACN,uBAAuB,EACvB,qBAAqB,EACrB,0BAA0B,EAC1B,4BAA4B,EAC5B,6BAA6B,EAC7B,2BAA2B,EAC3B,gCAAgC,GAChC,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EACN,kBAAkB,EAClB,uBAAuB,EACvB,YAAY,EACZ,eAAe,EACf,MAAM,GACN,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EACN,0BAA0B,EAC1B,sCAAsC,GACtC,MAAM,2CAA2C,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AACzE,OAAO,EACN,6BAA6B,EAC7B,UAAU,GACV,MAAM,YAAY,CAAC;AACpB,OAAO,EACN,oBAAoB,EACpB,oBAAoB,EACpB,eAAe,EACf,qBAAqB,EACrB,uBAAuB,GACvB,MAAM,qBAAqB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AAChF,OAAO,EACN,uBAAuB,EACvB,qBAAqB,EACrB,0BAA0B,EAC1B,4BAA4B,EAC5B,6BAA6B,EAC7B,2BAA2B,EAC3B,gCAAgC,GAChC,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EACN,kBAAkB,EAClB,uBAAuB,EACvB,YAAY,EACZ,eAAe,EACf,MAAM,GACN,MAAM,aAAa,CAAC;AACrB,OAAO,EACN,yBAAyB,EACzB,uBAAuB,EACvB,0BAA0B,GAC1B,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EACN,0BAA0B,EAC1B,sCAAsC,GACtC,MAAM,2CAA2C,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AACzE,OAAO,EACN,6BAA6B,EAC7B,UAAU,GACV,MAAM,YAAY,CAAC;AACpB,OAAO,EACN,oBAAoB,EACpB,oBAAoB,EACpB,eAAe,EACf,qBAAqB,EACrB,uBAAuB,GACvB,MAAM,qBAAqB,CAAC"}
|
package/dist/index.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.tryParseCompatibleResolvedUrl = exports.resolveWithLocationRedirectionHandling = exports.isLocationRedirectionError = exports.loadContainerPaused = exports.Loader = exports.rehydrateDetachedContainer = exports.loadExistingContainer = exports.createDetachedContainer = exports.waitContainerToCatchUp = exports.ConnectionState = void 0;
|
|
7
|
+
exports.tryParseCompatibleResolvedUrl = exports.resolveWithLocationRedirectionHandling = exports.isLocationRedirectionError = exports.loadContainerPaused = exports.runtimeSupportRequirements = exports.loaderCoreCompatDetails = exports.driverSupportRequirements = exports.Loader = exports.rehydrateDetachedContainer = exports.loadExistingContainer = exports.createDetachedContainer = exports.waitContainerToCatchUp = exports.ConnectionState = void 0;
|
|
8
8
|
var connectionState_js_1 = require("./connectionState.js");
|
|
9
9
|
Object.defineProperty(exports, "ConnectionState", { enumerable: true, get: function () { return connectionState_js_1.ConnectionState; } });
|
|
10
10
|
var container_js_1 = require("./container.js");
|
|
@@ -15,6 +15,10 @@ Object.defineProperty(exports, "loadExistingContainer", { enumerable: true, get:
|
|
|
15
15
|
Object.defineProperty(exports, "rehydrateDetachedContainer", { enumerable: true, get: function () { return createAndLoadContainerUtils_js_1.rehydrateDetachedContainer; } });
|
|
16
16
|
var loader_js_1 = require("./loader.js");
|
|
17
17
|
Object.defineProperty(exports, "Loader", { enumerable: true, get: function () { return loader_js_1.Loader; } });
|
|
18
|
+
var loaderLayerCompatState_js_1 = require("./loaderLayerCompatState.js");
|
|
19
|
+
Object.defineProperty(exports, "driverSupportRequirements", { enumerable: true, get: function () { return loaderLayerCompatState_js_1.driverSupportRequirements; } });
|
|
20
|
+
Object.defineProperty(exports, "loaderCoreCompatDetails", { enumerable: true, get: function () { return loaderLayerCompatState_js_1.loaderCoreCompatDetails; } });
|
|
21
|
+
Object.defineProperty(exports, "runtimeSupportRequirements", { enumerable: true, get: function () { return loaderLayerCompatState_js_1.runtimeSupportRequirements; } });
|
|
18
22
|
var loadPaused_js_1 = require("./loadPaused.js");
|
|
19
23
|
Object.defineProperty(exports, "loadContainerPaused", { enumerable: true, get: function () { return loadPaused_js_1.loadContainerPaused; } });
|
|
20
24
|
var index_js_1 = require("./location-redirection-utilities/index.js");
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,2DAAuD;AAA9C,qHAAA,eAAe,OAAA;AACxB,+CAAgF;AAA/C,sHAAA,sBAAsB,OAAA;AACvD,mFAQ0C;AAPzC,yIAAA,uBAAuB,OAAA;AACvB,uIAAA,qBAAqB,OAAA;AACrB,4IAAA,0BAA0B,OAAA;AAM3B,yCAMqB;AADpB,mGAAA,MAAM,OAAA;AAEP,iDAAsD;AAA7C,oHAAA,mBAAmB,OAAA;AAC5B,sEAGmD;AAFlD,sHAAA,0BAA0B,OAAA;AAC1B,kIAAA,sCAAsC,OAAA;AAGvC,uCAGoB;AAFnB,yHAAA,6BAA6B,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport { ConnectionState } from \"./connectionState.js\";\nexport { IContainerExperimental, waitContainerToCatchUp } from \"./container.js\";\nexport {\n\tcreateDetachedContainer,\n\tloadExistingContainer,\n\trehydrateDetachedContainer,\n\tICreateAndLoadContainerProps,\n\tICreateDetachedContainerProps,\n\tILoadExistingContainerProps,\n\tIRehydrateDetachedContainerProps,\n} from \"./createAndLoadContainerUtils.js\";\nexport {\n\tICodeDetailsLoader,\n\tIFluidModuleWithDetails,\n\tILoaderProps,\n\tILoaderServices,\n\tLoader,\n} from \"./loader.js\";\nexport { loadContainerPaused } from \"./loadPaused.js\";\nexport {\n\tisLocationRedirectionError,\n\tresolveWithLocationRedirectionHandling,\n} from \"./location-redirection-utilities/index.js\";\nexport { IProtocolHandler, ProtocolHandlerBuilder } from \"./protocol.js\";\nexport {\n\ttryParseCompatibleResolvedUrl,\n\tIParsedUrl,\n} from \"./utils.js\";\nexport {\n\tIBaseProtocolHandler,\n\tIScribeProtocolState,\n\tIQuorumSnapshot,\n\tQuorumClientsSnapshot,\n\tQuorumProposalsSnapshot,\n} from \"./protocol/index.js\";\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,2DAAuD;AAA9C,qHAAA,eAAe,OAAA;AACxB,+CAAgF;AAA/C,sHAAA,sBAAsB,OAAA;AACvD,mFAQ0C;AAPzC,yIAAA,uBAAuB,OAAA;AACvB,uIAAA,qBAAqB,OAAA;AACrB,4IAAA,0BAA0B,OAAA;AAM3B,yCAMqB;AADpB,mGAAA,MAAM,OAAA;AAEP,yEAIqC;AAHpC,sIAAA,yBAAyB,OAAA;AACzB,oIAAA,uBAAuB,OAAA;AACvB,uIAAA,0BAA0B,OAAA;AAE3B,iDAAsD;AAA7C,oHAAA,mBAAmB,OAAA;AAC5B,sEAGmD;AAFlD,sHAAA,0BAA0B,OAAA;AAC1B,kIAAA,sCAAsC,OAAA;AAGvC,uCAGoB;AAFnB,yHAAA,6BAA6B,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport { ConnectionState } from \"./connectionState.js\";\nexport { IContainerExperimental, waitContainerToCatchUp } from \"./container.js\";\nexport {\n\tcreateDetachedContainer,\n\tloadExistingContainer,\n\trehydrateDetachedContainer,\n\tICreateAndLoadContainerProps,\n\tICreateDetachedContainerProps,\n\tILoadExistingContainerProps,\n\tIRehydrateDetachedContainerProps,\n} from \"./createAndLoadContainerUtils.js\";\nexport {\n\tICodeDetailsLoader,\n\tIFluidModuleWithDetails,\n\tILoaderProps,\n\tILoaderServices,\n\tLoader,\n} from \"./loader.js\";\nexport {\n\tdriverSupportRequirements,\n\tloaderCoreCompatDetails,\n\truntimeSupportRequirements,\n} from \"./loaderLayerCompatState.js\";\nexport { loadContainerPaused } from \"./loadPaused.js\";\nexport {\n\tisLocationRedirectionError,\n\tresolveWithLocationRedirectionHandling,\n} from \"./location-redirection-utilities/index.js\";\nexport { IProtocolHandler, ProtocolHandlerBuilder } from \"./protocol.js\";\nexport {\n\ttryParseCompatibleResolvedUrl,\n\tIParsedUrl,\n} from \"./utils.js\";\nexport {\n\tIBaseProtocolHandler,\n\tIScribeProtocolState,\n\tIQuorumSnapshot,\n\tQuorumClientsSnapshot,\n\tQuorumProposalsSnapshot,\n} from \"./protocol/index.js\";\n"]}
|
|
@@ -28,9 +28,19 @@ export declare const loaderCompatDetailsForRuntime: ILayerCompatDetails;
|
|
|
28
28
|
* @internal
|
|
29
29
|
*/
|
|
30
30
|
export declare const runtimeSupportRequirements: ILayerCompatSupportRequirements;
|
|
31
|
+
/**
|
|
32
|
+
* The requirements that the Driver layer must meet to be compatible with this Loader.
|
|
33
|
+
* @internal
|
|
34
|
+
*/
|
|
35
|
+
export declare const driverSupportRequirements: ILayerCompatSupportRequirements;
|
|
31
36
|
/**
|
|
32
37
|
* Validates that the Runtime layer is compatible with the Loader.
|
|
33
38
|
* @internal
|
|
34
39
|
*/
|
|
35
40
|
export declare function validateRuntimeCompatibility(maybeRuntimeCompatDetails: ILayerCompatDetails | undefined, disposeFn: (error?: ICriticalContainerError) => void): void;
|
|
41
|
+
/**
|
|
42
|
+
* Validates that the Driver layer is compatible with the Loader.
|
|
43
|
+
* @internal
|
|
44
|
+
*/
|
|
45
|
+
export declare function validateDriverCompatibility(maybeDriverCompatDetails: ILayerCompatDetails | undefined, disposeFn: (error?: ICriticalContainerError) => void): void;
|
|
36
46
|
//# sourceMappingURL=loaderLayerCompatState.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loaderLayerCompatState.d.ts","sourceRoot":"","sources":["../src/loaderLayerCompatState.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAEN,KAAK,mBAAmB,EACxB,KAAK,+BAA+B,EACpC,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AAKrF;;;GAGG;AACH,eAAO,MAAM,uBAAuB;IACnC;;OAEG;;IAEH;;OAEG;;CAEH,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,6BAA6B,EAAE,mBAM3C,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,0BAA0B,EAAE,+BAUxC,CAAC;AAEF;;;GAGG;AACH,wBAAgB,4BAA4B,CAC3C,yBAAyB,EAAE,mBAAmB,GAAG,SAAS,EAC1D,SAAS,EAAE,CAAC,KAAK,CAAC,EAAE,uBAAuB,KAAK,IAAI,GAClD,IAAI,CAoBN"}
|
|
1
|
+
{"version":3,"file":"loaderLayerCompatState.d.ts","sourceRoot":"","sources":["../src/loaderLayerCompatState.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAEN,KAAK,mBAAmB,EACxB,KAAK,+BAA+B,EACpC,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AAKrF;;;GAGG;AACH,eAAO,MAAM,uBAAuB;IACnC;;OAEG;;IAEH;;OAEG;;CAEH,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,6BAA6B,EAAE,mBAM3C,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,0BAA0B,EAAE,+BAUxC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,yBAAyB,EAAE,+BAUvC,CAAC;AAEF;;;GAGG;AACH,wBAAgB,4BAA4B,CAC3C,yBAAyB,EAAE,mBAAmB,GAAG,SAAS,EAC1D,SAAS,EAAE,CAAC,KAAK,CAAC,EAAE,uBAAuB,KAAK,IAAI,GAClD,IAAI,CAoBN;AAED;;;GAGG;AACH,wBAAgB,2BAA2B,CAC1C,wBAAwB,EAAE,mBAAmB,GAAG,SAAS,EACzD,SAAS,EAAE,CAAC,KAAK,CAAC,EAAE,uBAAuB,KAAK,IAAI,GAClD,IAAI,CAoBN"}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Licensed under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.validateRuntimeCompatibility = exports.runtimeSupportRequirements = exports.loaderCompatDetailsForRuntime = exports.loaderCoreCompatDetails = void 0;
|
|
7
|
+
exports.validateDriverCompatibility = exports.validateRuntimeCompatibility = exports.driverSupportRequirements = exports.runtimeSupportRequirements = exports.loaderCompatDetailsForRuntime = exports.loaderCoreCompatDetails = void 0;
|
|
8
8
|
const client_utils_1 = require("@fluid-internal/client-utils");
|
|
9
9
|
const internal_1 = require("@fluidframework/telemetry-utils/internal");
|
|
10
10
|
const packageVersion_js_1 = require("./packageVersion.js");
|
|
@@ -48,6 +48,21 @@ exports.runtimeSupportRequirements = {
|
|
|
48
48
|
*/
|
|
49
49
|
requiredFeatures: [],
|
|
50
50
|
};
|
|
51
|
+
/**
|
|
52
|
+
* The requirements that the Driver layer must meet to be compatible with this Loader.
|
|
53
|
+
* @internal
|
|
54
|
+
*/
|
|
55
|
+
exports.driverSupportRequirements = {
|
|
56
|
+
/**
|
|
57
|
+
* Minimum generation that Driver must be at to be compatible with Loader. Note that 0 is used here for
|
|
58
|
+
* Driver layers before the introduction of the layer compatibility enforcement.
|
|
59
|
+
*/
|
|
60
|
+
minSupportedGeneration: 0,
|
|
61
|
+
/**
|
|
62
|
+
* The features that the Driver must support to be compatible with Loader.
|
|
63
|
+
*/
|
|
64
|
+
requiredFeatures: [],
|
|
65
|
+
};
|
|
51
66
|
/**
|
|
52
67
|
* Validates that the Runtime layer is compatible with the Loader.
|
|
53
68
|
* @internal
|
|
@@ -71,4 +86,27 @@ function validateRuntimeCompatibility(maybeRuntimeCompatDetails, disposeFn) {
|
|
|
71
86
|
}
|
|
72
87
|
}
|
|
73
88
|
exports.validateRuntimeCompatibility = validateRuntimeCompatibility;
|
|
89
|
+
/**
|
|
90
|
+
* Validates that the Driver layer is compatible with the Loader.
|
|
91
|
+
* @internal
|
|
92
|
+
*/
|
|
93
|
+
function validateDriverCompatibility(maybeDriverCompatDetails, disposeFn) {
|
|
94
|
+
const layerCheckResult = (0, client_utils_1.checkLayerCompatibility)(exports.driverSupportRequirements, maybeDriverCompatDetails);
|
|
95
|
+
if (!layerCheckResult.isCompatible) {
|
|
96
|
+
const error = new internal_1.UsageError("Loader is not compatible with Driver", {
|
|
97
|
+
errorDetails: JSON.stringify({
|
|
98
|
+
loaderVersion: exports.loaderCoreCompatDetails.pkgVersion,
|
|
99
|
+
driverVersion: maybeDriverCompatDetails?.pkgVersion,
|
|
100
|
+
loaderGeneration: exports.loaderCoreCompatDetails.generation,
|
|
101
|
+
driverGeneration: maybeDriverCompatDetails?.generation,
|
|
102
|
+
minSupportedGeneration: exports.driverSupportRequirements.minSupportedGeneration,
|
|
103
|
+
isGenerationCompatible: layerCheckResult.isGenerationCompatible,
|
|
104
|
+
unsupportedFeatures: layerCheckResult.unsupportedFeatures,
|
|
105
|
+
}),
|
|
106
|
+
});
|
|
107
|
+
disposeFn(error);
|
|
108
|
+
throw error;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
exports.validateDriverCompatibility = validateDriverCompatibility;
|
|
74
112
|
//# sourceMappingURL=loaderLayerCompatState.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loaderLayerCompatState.js","sourceRoot":"","sources":["../src/loaderLayerCompatState.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,+DAIsC;AAEtC,uEAAsE;AAEtE,2DAAiD;AAEjD;;;GAGG;AACU,QAAA,uBAAuB,GAAG;IACtC;;OAEG;IACH,UAAU,EAAV,8BAAU;IACV;;OAEG;IACH,UAAU,EAAE,CAAC;CACb,CAAC;AAEF;;;GAGG;AACU,QAAA,6BAA6B,GAAwB;IACjE,GAAG,+BAAuB;IAC1B;;OAEG;IACH,iBAAiB,EAAE,IAAI,GAAG,EAAU;CACpC,CAAC;AAEF;;;GAGG;AACU,QAAA,0BAA0B,GAAoC;IAC1E;;;OAGG;IACH,sBAAsB,EAAE,CAAC;IACzB;;OAEG;IACH,gBAAgB,EAAE,EAAE;CACpB,CAAC;AAEF;;;GAGG;AACH,SAAgB,4BAA4B,CAC3C,yBAA0D,EAC1D,SAAoD;IAEpD,MAAM,gBAAgB,GAAG,IAAA,sCAAuB,EAC/C,kCAA0B,EAC1B,yBAAyB,CACzB,CAAC;IACF,IAAI,CAAC,gBAAgB,CAAC,YAAY,EAAE,CAAC;QACpC,MAAM,KAAK,GAAG,IAAI,qBAAU,CAAC,uCAAuC,EAAE;YACrE,YAAY,EAAE,IAAI,CAAC,SAAS,CAAC;gBAC5B,aAAa,EAAE,qCAA6B,CAAC,UAAU;gBACvD,cAAc,EAAE,yBAAyB,EAAE,UAAU;gBACrD,gBAAgB,EAAE,qCAA6B,CAAC,UAAU;gBAC1D,iBAAiB,EAAE,yBAAyB,EAAE,UAAU;gBACxD,sBAAsB,EAAE,kCAA0B,CAAC,sBAAsB;gBACzE,sBAAsB,EAAE,gBAAgB,CAAC,sBAAsB;gBAC/D,mBAAmB,EAAE,gBAAgB,CAAC,mBAAmB;aACzD,CAAC;SACF,CAAC,CAAC;QACH,SAAS,CAAC,KAAK,CAAC,CAAC;QACjB,MAAM,KAAK,CAAC;IACb,CAAC;AACF,CAAC;AAvBD,oEAuBC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport {\n\tcheckLayerCompatibility,\n\ttype ILayerCompatDetails,\n\ttype ILayerCompatSupportRequirements,\n} from \"@fluid-internal/client-utils\";\nimport type { ICriticalContainerError } from \"@fluidframework/container-definitions\";\nimport { UsageError } from \"@fluidframework/telemetry-utils/internal\";\n\nimport { pkgVersion } from \"./packageVersion.js\";\n\n/**\n * The core compatibility details of the Loader layer that is the same across all layer boundaries.\n * @internal\n */\nexport const loaderCoreCompatDetails = {\n\t/**\n\t * The package version of the Loader layer.\n\t */\n\tpkgVersion,\n\t/**\n\t * The current generation of the Loader layer.\n\t */\n\tgeneration: 1,\n};\n\n/**\n * Loader's compatibility details that is exposed to the Runtime layer.\n * @internal\n */\nexport const loaderCompatDetailsForRuntime: ILayerCompatDetails = {\n\t...loaderCoreCompatDetails,\n\t/**\n\t * The features supported by the Loader layer across the Loader / Runtime boundary.\n\t */\n\tsupportedFeatures: new Set<string>(),\n};\n\n/**\n * The requirements that the Runtime layer must meet to be compatible with this Loader.\n * @internal\n */\nexport const runtimeSupportRequirements: ILayerCompatSupportRequirements = {\n\t/**\n\t * Minimum generation that Runtime must be at to be compatible with Loader. Note that 0 is used here for\n\t * Runtime layers before the introduction of the layer compatibility enforcement.\n\t */\n\tminSupportedGeneration: 0,\n\t/**\n\t * The features that the Runtime must support to be compatible with Loader.\n\t */\n\trequiredFeatures: [],\n};\n\n/**\n * Validates that the Runtime layer is compatible with the Loader.\n * @internal\n */\nexport function validateRuntimeCompatibility(\n\tmaybeRuntimeCompatDetails: ILayerCompatDetails | undefined,\n\tdisposeFn: (error?: ICriticalContainerError) => void,\n): void {\n\tconst layerCheckResult = checkLayerCompatibility(\n\t\truntimeSupportRequirements,\n\t\tmaybeRuntimeCompatDetails,\n\t);\n\tif (!layerCheckResult.isCompatible) {\n\t\tconst error = new UsageError(\"Loader is not compatible with Runtime\", {\n\t\t\terrorDetails: JSON.stringify({\n\t\t\t\tloaderVersion: loaderCompatDetailsForRuntime.pkgVersion,\n\t\t\t\truntimeVersion: maybeRuntimeCompatDetails?.pkgVersion,\n\t\t\t\tloaderGeneration: loaderCompatDetailsForRuntime.generation,\n\t\t\t\truntimeGeneration: maybeRuntimeCompatDetails?.generation,\n\t\t\t\tminSupportedGeneration: runtimeSupportRequirements.minSupportedGeneration,\n\t\t\t\tisGenerationCompatible: layerCheckResult.isGenerationCompatible,\n\t\t\t\tunsupportedFeatures: layerCheckResult.unsupportedFeatures,\n\t\t\t}),\n\t\t});\n\t\tdisposeFn(error);\n\t\tthrow error;\n\t}\n}\n"]}
|
|
1
|
+
{"version":3,"file":"loaderLayerCompatState.js","sourceRoot":"","sources":["../src/loaderLayerCompatState.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,+DAIsC;AAEtC,uEAAsE;AAEtE,2DAAiD;AAEjD;;;GAGG;AACU,QAAA,uBAAuB,GAAG;IACtC;;OAEG;IACH,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D,SAAoD;IAEpD,MAAM,gBAAgB,GAAG,IAAA,sCAAuB,EAC/C,iCAAyB,EACzB,wBAAwB,CACxB,CAAC;IACF,IAAI,CAAC,gBAAgB,CAAC,YAAY,EAAE,CAAC;QACpC,MAAM,KAAK,GAAG,IAAI,qBAAU,CAAC,sCAAsC,EAAE;YACpE,YAAY,EAAE,IAAI,CAAC,SAAS,CAAC;gBAC5B,aAAa,EAAE,+BAAuB,CAAC,UAAU;gBACjD,aAAa,EAAE,wBAAwB,EAAE,UAAU;gBACnD,gBAAgB,EAAE,+BAAuB,CAAC,UAAU;gBACpD,gBAAgB,EAAE,wBAAwB,EAAE,UAAU;gBACtD,sBAAsB,EAAE,iCAAyB,CAAC,sBAAsB;gBACxE,sBAAsB,EAAE,gBAAgB,CAAC,sBAAsB;gBAC/D,mBAAmB,EAAE,gBAAgB,CAAC,mBAAmB;aACzD,CAAC;SACF,CAAC,CAAC;QACH,SAAS,CAAC,KAAK,CAAC,CAAC;QACjB,MAAM,KAAK,CAAC;IACb,CAAC;AACF,CAAC;AAvBD,kEAuBC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport {\n\tcheckLayerCompatibility,\n\ttype ILayerCompatDetails,\n\ttype ILayerCompatSupportRequirements,\n} from \"@fluid-internal/client-utils\";\nimport type { ICriticalContainerError } from \"@fluidframework/container-definitions\";\nimport { UsageError } from \"@fluidframework/telemetry-utils/internal\";\n\nimport { pkgVersion } from \"./packageVersion.js\";\n\n/**\n * The core compatibility details of the Loader layer that is the same across all layer boundaries.\n * @internal\n */\nexport const loaderCoreCompatDetails = {\n\t/**\n\t * The package version of the Loader layer.\n\t */\n\tpkgVersion,\n\t/**\n\t * The current generation of the Loader layer.\n\t */\n\tgeneration: 1,\n};\n\n/**\n * Loader's compatibility details that is exposed to the Runtime layer.\n * @internal\n */\nexport const loaderCompatDetailsForRuntime: ILayerCompatDetails = {\n\t...loaderCoreCompatDetails,\n\t/**\n\t * The features supported by the Loader layer across the Loader / Runtime boundary.\n\t */\n\tsupportedFeatures: new Set<string>(),\n};\n\n/**\n * The requirements that the Runtime layer must meet to be compatible with this Loader.\n * @internal\n */\nexport const runtimeSupportRequirements: ILayerCompatSupportRequirements = {\n\t/**\n\t * Minimum generation that Runtime must be at to be compatible with Loader. Note that 0 is used here for\n\t * Runtime layers before the introduction of the layer compatibility enforcement.\n\t */\n\tminSupportedGeneration: 0,\n\t/**\n\t * The features that the Runtime must support to be compatible with Loader.\n\t */\n\trequiredFeatures: [],\n};\n\n/**\n * The requirements that the Driver layer must meet to be compatible with this Loader.\n * @internal\n */\nexport const driverSupportRequirements: ILayerCompatSupportRequirements = {\n\t/**\n\t * Minimum generation that Driver must be at to be compatible with Loader. Note that 0 is used here for\n\t * Driver layers before the introduction of the layer compatibility enforcement.\n\t */\n\tminSupportedGeneration: 0,\n\t/**\n\t * The features that the Driver must support to be compatible with Loader.\n\t */\n\trequiredFeatures: [],\n};\n\n/**\n * Validates that the Runtime layer is compatible with the Loader.\n * @internal\n */\nexport function validateRuntimeCompatibility(\n\tmaybeRuntimeCompatDetails: ILayerCompatDetails | undefined,\n\tdisposeFn: (error?: ICriticalContainerError) => void,\n): void {\n\tconst layerCheckResult = checkLayerCompatibility(\n\t\truntimeSupportRequirements,\n\t\tmaybeRuntimeCompatDetails,\n\t);\n\tif (!layerCheckResult.isCompatible) {\n\t\tconst error = new UsageError(\"Loader is not compatible with Runtime\", {\n\t\t\terrorDetails: JSON.stringify({\n\t\t\t\tloaderVersion: loaderCompatDetailsForRuntime.pkgVersion,\n\t\t\t\truntimeVersion: maybeRuntimeCompatDetails?.pkgVersion,\n\t\t\t\tloaderGeneration: loaderCompatDetailsForRuntime.generation,\n\t\t\t\truntimeGeneration: maybeRuntimeCompatDetails?.generation,\n\t\t\t\tminSupportedGeneration: runtimeSupportRequirements.minSupportedGeneration,\n\t\t\t\tisGenerationCompatible: layerCheckResult.isGenerationCompatible,\n\t\t\t\tunsupportedFeatures: layerCheckResult.unsupportedFeatures,\n\t\t\t}),\n\t\t});\n\t\tdisposeFn(error);\n\t\tthrow error;\n\t}\n}\n\n/**\n * Validates that the Driver layer is compatible with the Loader.\n * @internal\n */\nexport function validateDriverCompatibility(\n\tmaybeDriverCompatDetails: ILayerCompatDetails | undefined,\n\tdisposeFn: (error?: ICriticalContainerError) => void,\n): void {\n\tconst layerCheckResult = checkLayerCompatibility(\n\t\tdriverSupportRequirements,\n\t\tmaybeDriverCompatDetails,\n\t);\n\tif (!layerCheckResult.isCompatible) {\n\t\tconst error = new UsageError(\"Loader is not compatible with Driver\", {\n\t\t\terrorDetails: JSON.stringify({\n\t\t\t\tloaderVersion: loaderCoreCompatDetails.pkgVersion,\n\t\t\t\tdriverVersion: maybeDriverCompatDetails?.pkgVersion,\n\t\t\t\tloaderGeneration: loaderCoreCompatDetails.generation,\n\t\t\t\tdriverGeneration: maybeDriverCompatDetails?.generation,\n\t\t\t\tminSupportedGeneration: driverSupportRequirements.minSupportedGeneration,\n\t\t\t\tisGenerationCompatible: layerCheckResult.isGenerationCompatible,\n\t\t\t\tunsupportedFeatures: layerCheckResult.unsupportedFeatures,\n\t\t\t}),\n\t\t});\n\t\tdisposeFn(error);\n\t\tthrow error;\n\t}\n}\n"]}
|
package/dist/packageVersion.d.ts
CHANGED
|
@@ -5,5 +5,5 @@
|
|
|
5
5
|
* THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY
|
|
6
6
|
*/
|
|
7
7
|
export declare const pkgName = "@fluidframework/container-loader";
|
|
8
|
-
export declare const pkgVersion = "2.
|
|
8
|
+
export declare const pkgVersion = "2.43.0";
|
|
9
9
|
//# sourceMappingURL=packageVersion.d.ts.map
|
package/dist/packageVersion.js
CHANGED
|
@@ -8,5 +8,5 @@
|
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
9
|
exports.pkgVersion = exports.pkgName = void 0;
|
|
10
10
|
exports.pkgName = "@fluidframework/container-loader";
|
|
11
|
-
exports.pkgVersion = "2.
|
|
11
|
+
exports.pkgVersion = "2.43.0";
|
|
12
12
|
//# sourceMappingURL=packageVersion.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEU,QAAA,OAAO,GAAG,kCAAkC,CAAC;AAC7C,QAAA,UAAU,GAAG,QAAQ,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n *\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY\n */\n\nexport const pkgName = \"@fluidframework/container-loader\";\nexport const pkgVersion = \"2.
|
|
1
|
+
{"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEU,QAAA,OAAO,GAAG,kCAAkC,CAAC;AAC7C,QAAA,UAAU,GAAG,QAAQ,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n *\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY\n */\n\nexport const pkgName = \"@fluidframework/container-loader\";\nexport const pkgVersion = \"2.43.0\";\n"]}
|
package/lib/container.d.ts
CHANGED
|
@@ -291,6 +291,13 @@ export declare class Container extends EventEmitterWithErrorHandling<IContainerE
|
|
|
291
291
|
private satisfies;
|
|
292
292
|
private connectToDeltaStream;
|
|
293
293
|
private readonly metadataUpdateHandler;
|
|
294
|
+
/**
|
|
295
|
+
* Creates a document service during container attachment or loading.
|
|
296
|
+
* @param resolvedUrl - The resolved URL of the container.
|
|
297
|
+
* @param props - Properties indicating whether to load or attach the container. For attaching,
|
|
298
|
+
* a summary tree can be provided.
|
|
299
|
+
* @remarks This method validates that the driver is compatible with the Loader.
|
|
300
|
+
*/
|
|
294
301
|
private createDocumentService;
|
|
295
302
|
/**
|
|
296
303
|
* Load container.
|
package/lib/container.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"container.d.ts","sourceRoot":"","sources":["../src/container.ts"],"names":[],"mappings":"AAAA;;;GAGG;AASH,OAAO,EACN,WAAW,EACX,SAAS,EACT,uBAAuB,EACvB,MAAM,uCAAuC,CAAC;AAC/C,OAAO,KAAK,EAGX,kBAAkB,EAClB,UAAU,EACV,gBAAgB,EAChB,kBAAkB,EAClB,aAAa,EACb,iBAAiB,EAOjB,YAAY,EAEZ,cAAc,EACd,MAAM,gDAAgD,CAAC;AAExD,OAAO,EACN,WAAW,EAEX,QAAQ,EACR,wBAAwB,EAExB,MAAM,iCAAiC,CAAC;AAGzC,OAAO,EAEN,cAAc,EACd,cAAc,EAId,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAEN,uBAAuB,EAEvB,YAAY,EAGZ,YAAY,EAGZ,gBAAgB,EAOhB,yBAAyB,EAGzB,MAAM,6CAA6C,CAAC;AAWrD,OAAO,EAEN,mBAAmB,EACnB,6BAA6B,EAe7B,MAAM,0CAA0C,CAAC;AAWlD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"container.d.ts","sourceRoot":"","sources":["../src/container.ts"],"names":[],"mappings":"AAAA;;;GAGG;AASH,OAAO,EACN,WAAW,EACX,SAAS,EACT,uBAAuB,EACvB,MAAM,uCAAuC,CAAC;AAC/C,OAAO,KAAK,EAGX,kBAAkB,EAClB,UAAU,EACV,gBAAgB,EAChB,kBAAkB,EAClB,aAAa,EACb,iBAAiB,EAOjB,YAAY,EAEZ,cAAc,EACd,MAAM,gDAAgD,CAAC;AAExD,OAAO,EACN,WAAW,EAEX,QAAQ,EACR,wBAAwB,EAExB,MAAM,iCAAiC,CAAC;AAGzC,OAAO,EAEN,cAAc,EACd,cAAc,EAId,MAAM,oCAAoC,CAA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aAAa;IAwBrB;;;OAGG;IACH,OAAO,CAAC,oBAAoB;IA+C5B,OAAO,CAAC,YAAY;IAIpB,OAAO,CAAC,aAAa;YAUP,kBAAkB;IAuFhC,OAAO,CAAC,QAAQ,CAAC,yBAAyB,CAMxC;IAEF;;;;;OAKG;IACH,OAAO,CAAC,wBAAwB;IAUhC,OAAO,CAAC,wBAAwB;CAuChC;AAED;;;GAGG;AACH,MAAM,WAAW,sBAAuB,SAAQ,UAAU;IACzD;;;;;OAKG;IACH,oBAAoB,CAAC,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IAEzC;;;OAGG;IACH,4BAA4B,CAAC,CAAC,uBAAuB,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;CACtF"}
|
package/lib/container.js
CHANGED
|
@@ -24,7 +24,7 @@ import { ContainerStorageAdapter } from "./containerStorageAdapter.js";
|
|
|
24
24
|
import { ReconnectMode, getPackageName, } from "./contracts.js";
|
|
25
25
|
import { DeltaManager } from "./deltaManager.js";
|
|
26
26
|
import { RelativeLoader } from "./loader.js";
|
|
27
|
-
import { validateRuntimeCompatibility } from "./loaderLayerCompatState.js";
|
|
27
|
+
import { validateDriverCompatibility, validateRuntimeCompatibility, } from "./loaderLayerCompatState.js";
|
|
28
28
|
import { createMemoryDetachedBlobStorage, tryInitializeMemoryDetachedBlobStorage, } from "./memoryBlobStorage.js";
|
|
29
29
|
import { NoopHeuristic } from "./noopHeuristic.js";
|
|
30
30
|
import { pkgVersion } from "./packageVersion.js";
|
|
@@ -449,8 +449,9 @@ export class Container extends EventEmitterWithErrorHandling {
|
|
|
449
449
|
const createNewResolvedUrl = await this.urlResolver.resolve(request);
|
|
450
450
|
assert(this.client.details.type !== summarizerClientType &&
|
|
451
451
|
createNewResolvedUrl !== undefined, 0x2c4 /* "client should not be summarizer before container is created" */);
|
|
452
|
-
this.service = await
|
|
453
|
-
|
|
452
|
+
this.service = await this.createDocumentService(createNewResolvedUrl, {
|
|
453
|
+
mode: "attach",
|
|
454
|
+
summary,
|
|
454
455
|
});
|
|
455
456
|
}
|
|
456
457
|
this.storageAdapter.connectToService(this.service);
|
|
@@ -971,12 +972,30 @@ export class Container extends EventEmitterWithErrorHandling {
|
|
|
971
972
|
}
|
|
972
973
|
this._deltaManager.connect(args);
|
|
973
974
|
}
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
975
|
+
/**
|
|
976
|
+
* Creates a document service during container attachment or loading.
|
|
977
|
+
* @param resolvedUrl - The resolved URL of the container.
|
|
978
|
+
* @param props - Properties indicating whether to load or attach the container. For attaching,
|
|
979
|
+
* a summary tree can be provided.
|
|
980
|
+
* @remarks This method validates that the driver is compatible with the Loader.
|
|
981
|
+
*/
|
|
982
|
+
async createDocumentService(resolvedUrl, props) {
|
|
983
|
+
let service;
|
|
984
|
+
if (props.mode === "load") {
|
|
985
|
+
service = await this.serviceFactory.createDocumentService(resolvedUrl, this.subLogger, this.client.details.type === summarizerClientType);
|
|
986
|
+
if (service.on !== undefined) {
|
|
987
|
+
// Back-compat for Old driver
|
|
988
|
+
service.on("metadataUpdate", this.metadataUpdateHandler);
|
|
989
|
+
}
|
|
990
|
+
}
|
|
991
|
+
else {
|
|
992
|
+
service = await runWithRetry(async () => this.serviceFactory.createContainer(props.summary, resolvedUrl, this.subLogger, false), "containerAttach", this.mc.logger, {
|
|
993
|
+
cancel: this._deltaManager.closeAbortController.signal,
|
|
994
|
+
});
|
|
979
995
|
}
|
|
996
|
+
// Validate that the Driver is compatible with this Loader.
|
|
997
|
+
const maybeDriverCompatDetails = service;
|
|
998
|
+
validateDriverCompatibility(maybeDriverCompatDetails.ILayerCompatDetails, (error) => this.dispose(error));
|
|
980
999
|
return service;
|
|
981
1000
|
}
|
|
982
1001
|
/**
|
|
@@ -986,7 +1005,7 @@ export class Container extends EventEmitterWithErrorHandling {
|
|
|
986
1005
|
*/
|
|
987
1006
|
async load(specifiedVersion, loadMode, resolvedUrl, pendingLocalState) {
|
|
988
1007
|
const timings = { phase1: performanceNow() };
|
|
989
|
-
this.service = await this.createDocumentService(
|
|
1008
|
+
this.service = await this.createDocumentService(resolvedUrl, { mode: "load" });
|
|
990
1009
|
// Except in cases where it has stashed ops or requested by feature gate, the container will connect in "read" mode
|
|
991
1010
|
const mode = this.mc.config.getBoolean("Fluid.Container.ForceWriteConnection") === true ||
|
|
992
1011
|
(pendingLocalState?.savedOps.length ?? 0) > 0
|