@bleedingdev/modern-js-server-runtime-extensions 3.5.0-ultramodern.35 → 3.5.0-ultramodern.37
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/dist/cjs/contract-gate-snapshot-normalization.js +122 -0
- package/dist/cjs/contract-gate-snapshot-store/file-store.js +13 -13
- package/dist/cjs/contract-gate-snapshot-store/http-store.js +2 -11
- package/dist/cjs/contract-gate-snapshot-store/resolve.js +8 -6
- package/dist/cjs/contractGateAutopilot.js +8 -77
- package/dist/cjs/index.js +6 -25
- package/dist/cjs/module-federation-css/manifest.js +3 -18
- package/dist/cjs/runtime-fallback-signal/index.js +21 -27
- package/dist/cjs/runtime-fallback-signal/model.js +157 -0
- package/dist/cjs/runtime-fallback-signal/resolver.js +163 -0
- package/dist/cjs/runtime-fallback-signal/{contract-gate.js → store.js} +19 -0
- package/dist/cjs/telemetry/envelope.js +74 -0
- package/dist/cjs/telemetry/registry.js +20 -72
- package/dist/esm/contract-gate-snapshot-normalization.mjs +81 -0
- package/dist/esm/contract-gate-snapshot-store/file-store.mjs +7 -7
- package/dist/esm/contract-gate-snapshot-store/http-store.mjs +1 -1
- package/dist/esm/contract-gate-snapshot-store/resolve.mjs +7 -5
- package/dist/esm/contractGateAutopilot.mjs +7 -76
- package/dist/esm/index.mjs +0 -1
- package/dist/esm/module-federation-css/manifest.mjs +3 -3
- package/dist/esm/runtime-fallback-signal/index.mjs +3 -9
- package/dist/esm/runtime-fallback-signal/model.mjs +73 -0
- package/dist/esm/runtime-fallback-signal/resolver.mjs +107 -0
- package/dist/esm/runtime-fallback-signal/{contract-gate.mjs → store.mjs} +14 -1
- package/dist/esm/telemetry/envelope.mjs +63 -1
- package/dist/esm/telemetry/registry.mjs +21 -73
- package/dist/esm-node/contract-gate-snapshot-normalization.mjs +82 -0
- package/dist/esm-node/contract-gate-snapshot-store/file-store.mjs +7 -7
- package/dist/esm-node/contract-gate-snapshot-store/http-store.mjs +1 -1
- package/dist/esm-node/contract-gate-snapshot-store/resolve.mjs +8 -7
- package/dist/esm-node/contractGateAutopilot.mjs +7 -76
- package/dist/esm-node/index.mjs +0 -1
- package/dist/esm-node/module-federation-css/manifest.mjs +3 -3
- package/dist/esm-node/runtime-fallback-signal/index.mjs +3 -9
- package/dist/esm-node/runtime-fallback-signal/model.mjs +74 -0
- package/dist/esm-node/runtime-fallback-signal/resolver.mjs +108 -0
- package/dist/esm-node/runtime-fallback-signal/{contract-gate.mjs → store.mjs} +14 -1
- package/dist/esm-node/telemetry/envelope.mjs +63 -1
- package/dist/esm-node/telemetry/registry.mjs +21 -73
- package/dist/types/contract-gate-snapshot-normalization.d.ts +15 -0
- package/dist/types/contract-gate-snapshot-store/http-store.d.ts +0 -6
- package/dist/types/contractGateAutopilot.d.ts +1 -6
- package/dist/types/index.d.ts +0 -1
- package/dist/types/module-federation-css/manifest.d.ts +0 -5
- package/dist/types/runtime-fallback-signal/index.d.ts +4 -10
- package/dist/types/runtime-fallback-signal/model.d.ts +70 -0
- package/dist/types/runtime-fallback-signal/resolver.d.ts +29 -0
- package/dist/types/runtime-fallback-signal/store.d.ts +4 -0
- package/dist/types/telemetry/canaryEvaluation.d.ts +3 -2
- package/dist/types/telemetry/envelope.d.ts +10 -0
- package/dist/types/telemetry/registry.d.ts +1 -4
- package/package.json +9 -9
- package/src/contract-gate-snapshot-normalization.ts +155 -0
- package/src/contract-gate-snapshot-store/file-store.ts +2 -4
- package/src/contract-gate-snapshot-store/http-store.ts +3 -3
- package/src/contract-gate-snapshot-store/resolve.ts +8 -4
- package/src/contractGateAutopilot.ts +13 -141
- package/src/index.ts +0 -16
- package/src/module-federation-css/manifest.ts +6 -9
- package/src/runtime-fallback-signal/index.ts +23 -25
- package/src/runtime-fallback-signal/model.ts +230 -0
- package/src/runtime-fallback-signal/resolver.ts +304 -0
- package/src/runtime-fallback-signal/{contract-gate.ts → store.ts} +38 -3
- package/src/telemetry/canaryEvaluation.ts +2 -2
- package/src/telemetry/envelope.ts +84 -0
- package/src/telemetry/registry.ts +31 -74
- package/tests/telemetryAutopilot.test.ts +141 -0
- package/tests/telemetryRegistryQueueMatrix.test.ts +227 -0
- package/dist/cjs/runtime-fallback-signal/auth.js +0 -87
- package/dist/cjs/runtime-fallback-signal/constants.js +0 -72
- package/dist/cjs/runtime-fallback-signal/endpoint.js +0 -50
- package/dist/cjs/runtime-fallback-signal/errors.js +0 -44
- package/dist/cjs/runtime-fallback-signal/payload.js +0 -72
- package/dist/cjs/runtime-fallback-signal/source.js +0 -66
- package/dist/cjs/runtime-fallback-signal/state.js +0 -57
- package/dist/cjs/runtime-fallback-signal/status.js +0 -47
- package/dist/cjs/runtime-fallback-signal/trust-policy.js +0 -108
- package/dist/cjs/runtime-fallback-signal/types.js +0 -18
- package/dist/esm/runtime-fallback-signal/auth.mjs +0 -40
- package/dist/esm/runtime-fallback-signal/constants.mjs +0 -10
- package/dist/esm/runtime-fallback-signal/endpoint.mjs +0 -12
- package/dist/esm/runtime-fallback-signal/errors.mjs +0 -6
- package/dist/esm/runtime-fallback-signal/payload.mjs +0 -31
- package/dist/esm/runtime-fallback-signal/source.mjs +0 -22
- package/dist/esm/runtime-fallback-signal/state.mjs +0 -16
- package/dist/esm/runtime-fallback-signal/status.mjs +0 -9
- package/dist/esm/runtime-fallback-signal/trust-policy.mjs +0 -67
- package/dist/esm/runtime-fallback-signal/types.mjs +0 -0
- package/dist/esm-node/runtime-fallback-signal/auth.mjs +0 -41
- package/dist/esm-node/runtime-fallback-signal/constants.mjs +0 -11
- package/dist/esm-node/runtime-fallback-signal/endpoint.mjs +0 -13
- package/dist/esm-node/runtime-fallback-signal/errors.mjs +0 -7
- package/dist/esm-node/runtime-fallback-signal/payload.mjs +0 -32
- package/dist/esm-node/runtime-fallback-signal/source.mjs +0 -23
- package/dist/esm-node/runtime-fallback-signal/state.mjs +0 -17
- package/dist/esm-node/runtime-fallback-signal/status.mjs +0 -10
- package/dist/esm-node/runtime-fallback-signal/trust-policy.mjs +0 -68
- package/dist/esm-node/runtime-fallback-signal/types.mjs +0 -1
- package/dist/types/runtime-fallback-signal/auth.d.ts +0 -18
- package/dist/types/runtime-fallback-signal/constants.d.ts +0 -9
- package/dist/types/runtime-fallback-signal/contract-gate.d.ts +0 -2
- package/dist/types/runtime-fallback-signal/endpoint.d.ts +0 -1
- package/dist/types/runtime-fallback-signal/errors.d.ts +0 -2
- package/dist/types/runtime-fallback-signal/payload.d.ts +0 -6
- package/dist/types/runtime-fallback-signal/source.d.ts +0 -3
- package/dist/types/runtime-fallback-signal/state.d.ts +0 -3
- package/dist/types/runtime-fallback-signal/status.d.ts +0 -2
- package/dist/types/runtime-fallback-signal/trust-policy.d.ts +0 -13
- package/dist/types/runtime-fallback-signal/types.d.ts +0 -50
- package/src/runtime-fallback-signal/auth.ts +0 -117
- package/src/runtime-fallback-signal/constants.ts +0 -19
- package/src/runtime-fallback-signal/endpoint.ts +0 -22
- package/src/runtime-fallback-signal/errors.ts +0 -10
- package/src/runtime-fallback-signal/payload.ts +0 -79
- package/src/runtime-fallback-signal/source.ts +0 -49
- package/src/runtime-fallback-signal/state.ts +0 -34
- package/src/runtime-fallback-signal/status.ts +0 -22
- package/src/runtime-fallback-signal/trust-policy.ts +0 -179
- package/src/runtime-fallback-signal/types.ts +0 -66
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.d = (exports1, getters, values)=>{
|
|
5
|
+
var define = (defs, kind)=>{
|
|
6
|
+
for(var key in defs)if (__webpack_require__.o(defs, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
[kind]: defs[key]
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
define(getters, "get");
|
|
12
|
+
define(values, "value");
|
|
13
|
+
};
|
|
14
|
+
})();
|
|
15
|
+
(()=>{
|
|
16
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
17
|
+
})();
|
|
18
|
+
(()=>{
|
|
19
|
+
__webpack_require__.r = (exports1)=>{
|
|
20
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
21
|
+
value: 'Module'
|
|
22
|
+
});
|
|
23
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
24
|
+
value: true
|
|
25
|
+
});
|
|
26
|
+
};
|
|
27
|
+
})();
|
|
28
|
+
var __webpack_exports__ = {};
|
|
29
|
+
__webpack_require__.r(__webpack_exports__);
|
|
30
|
+
const getSnapshotGateEntries = (snapshot)=>{
|
|
31
|
+
const gates = snapshot.gates;
|
|
32
|
+
if (!gates || 'object' != typeof gates) return;
|
|
33
|
+
const entries = [];
|
|
34
|
+
for (const [name, value] of Object.entries(gates)){
|
|
35
|
+
const normalizedName = name.trim();
|
|
36
|
+
if (normalizedName) entries.push([
|
|
37
|
+
normalizedName,
|
|
38
|
+
value
|
|
39
|
+
]);
|
|
40
|
+
}
|
|
41
|
+
return entries;
|
|
42
|
+
};
|
|
43
|
+
const getSnapshotGateNames = (snapshot)=>{
|
|
44
|
+
const entries = getSnapshotGateEntries(snapshot);
|
|
45
|
+
if (!entries) return;
|
|
46
|
+
const names = new Set();
|
|
47
|
+
for (const [name] of entries)names.add(name);
|
|
48
|
+
return names;
|
|
49
|
+
};
|
|
50
|
+
const normalizeSnapshot = (snapshot, { now, gateStaleAfterMs })=>{
|
|
51
|
+
const output = [];
|
|
52
|
+
const entries = getSnapshotGateEntries(snapshot);
|
|
53
|
+
if (!entries) return output;
|
|
54
|
+
for (const [normalizedName, value] of entries){
|
|
55
|
+
const gate = normalizeGateValue(value, snapshot.updatedAt, now);
|
|
56
|
+
if (!gate) continue;
|
|
57
|
+
if ('number' == typeof gate.expiresAt && Number.isFinite(gate.expiresAt) && gate.expiresAt > 0 && now >= gate.expiresAt) {
|
|
58
|
+
output.push({
|
|
59
|
+
name: normalizedName,
|
|
60
|
+
passed: true,
|
|
61
|
+
reason: void 0,
|
|
62
|
+
updatedAt: gate.updatedAt,
|
|
63
|
+
expiresAt: gate.expiresAt
|
|
64
|
+
});
|
|
65
|
+
continue;
|
|
66
|
+
}
|
|
67
|
+
const isStale = gateStaleAfterMs > 0 && now - gate.updatedAt > gateStaleAfterMs;
|
|
68
|
+
if (isStale) {
|
|
69
|
+
output.push({
|
|
70
|
+
name: normalizedName,
|
|
71
|
+
passed: false,
|
|
72
|
+
reason: gate.reason || 'Gate snapshot is stale',
|
|
73
|
+
updatedAt: gate.updatedAt
|
|
74
|
+
});
|
|
75
|
+
continue;
|
|
76
|
+
}
|
|
77
|
+
output.push({
|
|
78
|
+
name: normalizedName,
|
|
79
|
+
passed: gate.passed,
|
|
80
|
+
reason: gate.reason,
|
|
81
|
+
updatedAt: gate.updatedAt
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
return output;
|
|
85
|
+
};
|
|
86
|
+
const normalizeGateValue = (value, snapshotUpdatedAt, now)=>{
|
|
87
|
+
if ('boolean' == typeof value) return {
|
|
88
|
+
passed: value,
|
|
89
|
+
updatedAt: normalizeUpdatedAt(snapshotUpdatedAt, now)
|
|
90
|
+
};
|
|
91
|
+
if (!value || 'object' != typeof value) return;
|
|
92
|
+
const hasPassed = 'boolean' == typeof value.passed;
|
|
93
|
+
const passed = true === value.passed;
|
|
94
|
+
let reason = 'string' == typeof value.reason && value.reason.trim().length > 0 ? value.reason : void 0;
|
|
95
|
+
if (!hasPassed) reason = reason || 'Gate snapshot record missing "passed" boolean';
|
|
96
|
+
return {
|
|
97
|
+
passed,
|
|
98
|
+
reason,
|
|
99
|
+
updatedAt: normalizeUpdatedAt(value.updatedAt ?? snapshotUpdatedAt, now),
|
|
100
|
+
expiresAt: normalizeExpiresAt(value.expiresAt)
|
|
101
|
+
};
|
|
102
|
+
};
|
|
103
|
+
const normalizeUpdatedAt = (value, fallback)=>{
|
|
104
|
+
if ('number' == typeof value && Number.isFinite(value) && value > 0) return value;
|
|
105
|
+
return fallback;
|
|
106
|
+
};
|
|
107
|
+
const normalizeExpiresAt = (value)=>{
|
|
108
|
+
if ('number' == typeof value && Number.isFinite(value) && value > 0) return value;
|
|
109
|
+
};
|
|
110
|
+
__webpack_require__.d(__webpack_exports__, {}, {
|
|
111
|
+
getSnapshotGateNames: getSnapshotGateNames,
|
|
112
|
+
normalizeSnapshot: normalizeSnapshot
|
|
113
|
+
});
|
|
114
|
+
exports.getSnapshotGateNames = __webpack_exports__.getSnapshotGateNames;
|
|
115
|
+
exports.normalizeSnapshot = __webpack_exports__.normalizeSnapshot;
|
|
116
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
117
|
+
"getSnapshotGateNames",
|
|
118
|
+
"normalizeSnapshot"
|
|
119
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
120
|
+
Object.defineProperty(exports, '__esModule', {
|
|
121
|
+
value: true
|
|
122
|
+
});
|
|
@@ -40,42 +40,42 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
40
40
|
createFileContractGateSnapshotStore: ()=>createFileContractGateSnapshotStore,
|
|
41
41
|
resolveContractGateSnapshotPath: ()=>resolveContractGateSnapshotPath
|
|
42
42
|
});
|
|
43
|
+
const external_node_fs_namespaceObject = require("node:fs");
|
|
44
|
+
const external_node_path_namespaceObject = require("node:path");
|
|
45
|
+
var external_node_path_default = /*#__PURE__*/ __webpack_require__.n(external_node_path_namespaceObject);
|
|
43
46
|
const utils_namespaceObject = require("@modern-js/utils");
|
|
44
|
-
const external_fs_namespaceObject = require("fs");
|
|
45
|
-
const external_path_namespaceObject = require("path");
|
|
46
|
-
var external_path_default = /*#__PURE__*/ __webpack_require__.n(external_path_namespaceObject);
|
|
47
47
|
const external_env_js_namespaceObject = require("../env.js");
|
|
48
48
|
const external_resolve_js_namespaceObject = require("./resolve.js");
|
|
49
49
|
const external_types_js_namespaceObject = require("./types.js");
|
|
50
50
|
const resolveContractGateSnapshotPath = (appDirectory, configuredPath)=>{
|
|
51
51
|
const rawPath = configuredPath || (0, external_env_js_namespaceObject.parseServerRuntimeExtensionsEnv)().contractGatesFile || external_types_js_namespaceObject.DEFAULT_CONTRACT_GATE_SNAPSHOT_PATH;
|
|
52
|
-
if (
|
|
53
|
-
return
|
|
52
|
+
if (external_node_path_default().isAbsolute(rawPath)) return rawPath;
|
|
53
|
+
return external_node_path_default().resolve(appDirectory, rawPath);
|
|
54
54
|
};
|
|
55
55
|
const writeSnapshotFileAtomically = async (resolvedPath, contents)=>{
|
|
56
|
-
const directory =
|
|
57
|
-
await
|
|
56
|
+
const directory = external_node_path_default().dirname(resolvedPath);
|
|
57
|
+
await external_node_fs_namespaceObject.promises.mkdir(directory, {
|
|
58
58
|
recursive: true
|
|
59
59
|
});
|
|
60
|
-
const temporaryPath =
|
|
60
|
+
const temporaryPath = external_node_path_default().join(directory, `.${external_node_path_default().basename(resolvedPath)}.${process.pid}.${Date.now()}.${Math.random().toString(36).slice(2)}.tmp`);
|
|
61
61
|
try {
|
|
62
|
-
await
|
|
63
|
-
await
|
|
62
|
+
await external_node_fs_namespaceObject.promises.writeFile(temporaryPath, contents);
|
|
63
|
+
await external_node_fs_namespaceObject.promises.rename(temporaryPath, resolvedPath);
|
|
64
64
|
} catch (error) {
|
|
65
|
-
await
|
|
65
|
+
await external_node_fs_namespaceObject.promises.rm(temporaryPath, {
|
|
66
66
|
force: true
|
|
67
67
|
}).catch(()=>{});
|
|
68
68
|
throw error;
|
|
69
69
|
}
|
|
70
70
|
};
|
|
71
71
|
const createFileContractGateSnapshotStore = (gateSnapshotPath)=>{
|
|
72
|
-
const resolvedPath =
|
|
72
|
+
const resolvedPath = external_node_path_default().resolve(gateSnapshotPath);
|
|
73
73
|
return {
|
|
74
74
|
name: `file:${resolvedPath}`,
|
|
75
75
|
async readSnapshot () {
|
|
76
76
|
if (!await utils_namespaceObject.fs.pathExists(resolvedPath)) return;
|
|
77
77
|
try {
|
|
78
|
-
const raw = await
|
|
78
|
+
const raw = await external_node_fs_namespaceObject.promises.readFile(resolvedPath, 'utf8');
|
|
79
79
|
return (0, external_resolve_js_namespaceObject.normalizeSnapshot)(JSON.parse(raw));
|
|
80
80
|
} catch (_error) {
|
|
81
81
|
return;
|
|
@@ -28,11 +28,8 @@ var __webpack_require__ = {};
|
|
|
28
28
|
var __webpack_exports__ = {};
|
|
29
29
|
__webpack_require__.r(__webpack_exports__);
|
|
30
30
|
__webpack_require__.d(__webpack_exports__, {
|
|
31
|
-
BUILTIN_HTTP_STATE_STORE_MODULES: ()=>BUILTIN_HTTP_STATE_STORE_MODULES,
|
|
32
31
|
createHttpContractGateSnapshotStore: ()=>createHttpContractGateSnapshotStore,
|
|
33
|
-
|
|
34
|
-
tryResolveBuiltinSnapshotStore: ()=>tryResolveBuiltinSnapshotStore,
|
|
35
|
-
withTimeoutAbort: ()=>withTimeoutAbort
|
|
32
|
+
tryResolveBuiltinSnapshotStore: ()=>tryResolveBuiltinSnapshotStore
|
|
36
33
|
});
|
|
37
34
|
const external_resolve_js_namespaceObject = require("./resolve.js");
|
|
38
35
|
const external_types_js_namespaceObject = require("./types.js");
|
|
@@ -125,17 +122,11 @@ const tryResolveBuiltinSnapshotStore = (input)=>{
|
|
|
125
122
|
if (!BUILTIN_HTTP_STATE_STORE_MODULES.has(moduleName)) return;
|
|
126
123
|
return createHttpContractGateSnapshotStore(input.stateStore.options || {});
|
|
127
124
|
};
|
|
128
|
-
exports.BUILTIN_HTTP_STATE_STORE_MODULES = __webpack_exports__.BUILTIN_HTTP_STATE_STORE_MODULES;
|
|
129
125
|
exports.createHttpContractGateSnapshotStore = __webpack_exports__.createHttpContractGateSnapshotStore;
|
|
130
|
-
exports.normalizeHttpStoreOptions = __webpack_exports__.normalizeHttpStoreOptions;
|
|
131
126
|
exports.tryResolveBuiltinSnapshotStore = __webpack_exports__.tryResolveBuiltinSnapshotStore;
|
|
132
|
-
exports.withTimeoutAbort = __webpack_exports__.withTimeoutAbort;
|
|
133
127
|
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
134
|
-
"BUILTIN_HTTP_STATE_STORE_MODULES",
|
|
135
128
|
"createHttpContractGateSnapshotStore",
|
|
136
|
-
"
|
|
137
|
-
"tryResolveBuiltinSnapshotStore",
|
|
138
|
-
"withTimeoutAbort"
|
|
129
|
+
"tryResolveBuiltinSnapshotStore"
|
|
139
130
|
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
140
131
|
Object.defineProperty(exports, '__esModule', {
|
|
141
132
|
value: true
|
|
@@ -42,8 +42,9 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
42
42
|
resolveContractGateSnapshotStore: ()=>resolveContractGateSnapshotStore
|
|
43
43
|
});
|
|
44
44
|
const external_node_module_namespaceObject = require("node:module");
|
|
45
|
-
const
|
|
46
|
-
var
|
|
45
|
+
const external_node_path_namespaceObject = require("node:path");
|
|
46
|
+
var external_node_path_default = /*#__PURE__*/ __webpack_require__.n(external_node_path_namespaceObject);
|
|
47
|
+
const external_node_url_namespaceObject = require("node:url");
|
|
47
48
|
const external_file_store_js_namespaceObject = require("./file-store.js");
|
|
48
49
|
const external_http_store_js_namespaceObject = require("./http-store.js");
|
|
49
50
|
const external_types_js_namespaceObject = require("./types.js");
|
|
@@ -71,15 +72,16 @@ const ensureStoreShape = (store, modulePath)=>{
|
|
|
71
72
|
const resolveStoreModulePath = (appDirectory, modulePath)=>{
|
|
72
73
|
const normalized = modulePath.trim();
|
|
73
74
|
if (!normalized) throw new Error('Contract gate snapshot stateStore.module must be non-empty');
|
|
74
|
-
if (
|
|
75
|
-
if (normalized.startsWith('.')) return
|
|
76
|
-
const appRequire = (0, external_node_module_namespaceObject.createRequire)(
|
|
75
|
+
if (external_node_path_default().isAbsolute(normalized)) return normalized;
|
|
76
|
+
if (normalized.startsWith('.')) return external_node_path_default().resolve(appDirectory, normalized);
|
|
77
|
+
const appRequire = (0, external_node_module_namespaceObject.createRequire)(external_node_path_default().join(appDirectory, 'package.json'));
|
|
77
78
|
try {
|
|
78
79
|
return appRequire.resolve(normalized);
|
|
79
80
|
} catch (_error) {
|
|
80
81
|
return normalized;
|
|
81
82
|
}
|
|
82
83
|
};
|
|
84
|
+
const toStoreModuleImportSpecifier = (modulePath)=>external_node_path_default().isAbsolute(modulePath) ? (0, external_node_url_namespaceObject.pathToFileURL)(modulePath).href : modulePath;
|
|
83
85
|
const resolveContractGateSnapshotStore = async (input)=>{
|
|
84
86
|
const { appDirectory, gateSnapshotPath, stateStore, logger } = input;
|
|
85
87
|
if (!stateStore?.module) return (0, external_file_store_js_namespaceObject.createFileContractGateSnapshotStore)(gateSnapshotPath);
|
|
@@ -93,7 +95,7 @@ const resolveContractGateSnapshotStore = async (input)=>{
|
|
|
93
95
|
const modulePath = resolveStoreModulePath(appDirectory, stateStore.module);
|
|
94
96
|
let mod;
|
|
95
97
|
try {
|
|
96
|
-
mod =
|
|
98
|
+
mod = await import(toStoreModuleImportSpecifier(modulePath));
|
|
97
99
|
} catch (error) {
|
|
98
100
|
throw new Error(`[telemetry.canary.autopilot] Failed to load stateStore.module "${stateStore.module}" (${modulePath}): ${error instanceof Error ? error.message : String(error)}`);
|
|
99
101
|
}
|
|
@@ -30,7 +30,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
30
30
|
__webpack_require__.d(__webpack_exports__, {
|
|
31
31
|
ContractGateAutopilot: ()=>ContractGateAutopilot
|
|
32
32
|
});
|
|
33
|
-
const
|
|
33
|
+
const external_contract_gate_snapshot_normalization_js_namespaceObject = require("./contract-gate-snapshot-normalization.js");
|
|
34
|
+
const file_store_js_namespaceObject = require("./contract-gate-snapshot-store/file-store.js");
|
|
34
35
|
const DEFAULT_POLL_INTERVAL_MS = 15000;
|
|
35
36
|
const DEFAULT_GATE_STALE_AFTER_MS = 600000;
|
|
36
37
|
class ContractGateAutopilot {
|
|
@@ -53,8 +54,11 @@ class ContractGateAutopilot {
|
|
|
53
54
|
const snapshot = await this.loadSnapshot();
|
|
54
55
|
if (syncGeneration !== this.syncGeneration) return 0;
|
|
55
56
|
if (!snapshot) return 0;
|
|
56
|
-
const snapshotGateNames =
|
|
57
|
-
const gates =
|
|
57
|
+
const snapshotGateNames = (0, external_contract_gate_snapshot_normalization_js_namespaceObject.getSnapshotGateNames)(snapshot);
|
|
58
|
+
const gates = (0, external_contract_gate_snapshot_normalization_js_namespaceObject.normalizeSnapshot)(snapshot, {
|
|
59
|
+
now: Date.now(),
|
|
60
|
+
gateStaleAfterMs: this.gateStaleAfterMs
|
|
61
|
+
});
|
|
58
62
|
let updatedCount = snapshotGateNames ? this.clearOmittedGates(snapshotGateNames) : 0;
|
|
59
63
|
for (const gate of gates){
|
|
60
64
|
this.orchestrator.addRequiredContractGate(gate.name);
|
|
@@ -68,16 +72,6 @@ class ContractGateAutopilot {
|
|
|
68
72
|
}
|
|
69
73
|
return updatedCount;
|
|
70
74
|
}
|
|
71
|
-
getSnapshotGateNames(snapshot) {
|
|
72
|
-
const gates = snapshot.gates;
|
|
73
|
-
if (!gates || 'object' != typeof gates) return;
|
|
74
|
-
const names = new Set();
|
|
75
|
-
for (const name of Object.keys(gates)){
|
|
76
|
-
const normalizedName = name.trim();
|
|
77
|
-
if (normalizedName) names.add(normalizedName);
|
|
78
|
-
}
|
|
79
|
-
return names;
|
|
80
|
-
}
|
|
81
75
|
clearOmittedGates(snapshotGateNames) {
|
|
82
76
|
let updatedCount = 0;
|
|
83
77
|
for (const gateName of Array.from(this.appliedGateFingerprints.keys()))if (!snapshotGateNames.has(gateName)) {
|
|
@@ -99,76 +93,13 @@ class ContractGateAutopilot {
|
|
|
99
93
|
return;
|
|
100
94
|
}
|
|
101
95
|
}
|
|
102
|
-
normalizeSnapshot(snapshot) {
|
|
103
|
-
const now = Date.now();
|
|
104
|
-
const output = [];
|
|
105
|
-
const gates = snapshot.gates;
|
|
106
|
-
if (!gates || 'object' != typeof gates) return output;
|
|
107
|
-
for (const [name, value] of Object.entries(gates)){
|
|
108
|
-
const normalizedName = name.trim();
|
|
109
|
-
if (!normalizedName) continue;
|
|
110
|
-
const gate = this.normalizeGateValue(value, snapshot.updatedAt, now);
|
|
111
|
-
if (!gate) continue;
|
|
112
|
-
if ('number' == typeof gate.expiresAt && Number.isFinite(gate.expiresAt) && gate.expiresAt > 0 && now >= gate.expiresAt) {
|
|
113
|
-
output.push({
|
|
114
|
-
name: normalizedName,
|
|
115
|
-
passed: true,
|
|
116
|
-
reason: void 0,
|
|
117
|
-
updatedAt: gate.updatedAt,
|
|
118
|
-
expiresAt: gate.expiresAt
|
|
119
|
-
});
|
|
120
|
-
continue;
|
|
121
|
-
}
|
|
122
|
-
const isStale = this.gateStaleAfterMs > 0 && now - gate.updatedAt > this.gateStaleAfterMs;
|
|
123
|
-
if (isStale) {
|
|
124
|
-
output.push({
|
|
125
|
-
name: normalizedName,
|
|
126
|
-
passed: false,
|
|
127
|
-
reason: gate.reason || 'Gate snapshot is stale',
|
|
128
|
-
updatedAt: gate.updatedAt
|
|
129
|
-
});
|
|
130
|
-
continue;
|
|
131
|
-
}
|
|
132
|
-
output.push({
|
|
133
|
-
name: normalizedName,
|
|
134
|
-
passed: gate.passed,
|
|
135
|
-
reason: gate.reason,
|
|
136
|
-
updatedAt: gate.updatedAt
|
|
137
|
-
});
|
|
138
|
-
}
|
|
139
|
-
return output;
|
|
140
|
-
}
|
|
141
|
-
normalizeGateValue(value, snapshotUpdatedAt, now) {
|
|
142
|
-
if ('boolean' == typeof value) return {
|
|
143
|
-
passed: value,
|
|
144
|
-
updatedAt: this.normalizeUpdatedAt(snapshotUpdatedAt, now)
|
|
145
|
-
};
|
|
146
|
-
if (!value || 'object' != typeof value) return;
|
|
147
|
-
const hasPassed = 'boolean' == typeof value.passed;
|
|
148
|
-
const passed = true === value.passed;
|
|
149
|
-
let reason = 'string' == typeof value.reason && value.reason.trim().length > 0 ? value.reason : void 0;
|
|
150
|
-
if (!hasPassed) reason = reason || 'Gate snapshot record is missing "passed" boolean';
|
|
151
|
-
return {
|
|
152
|
-
passed,
|
|
153
|
-
reason,
|
|
154
|
-
updatedAt: this.normalizeUpdatedAt(value.updatedAt ?? snapshotUpdatedAt, now),
|
|
155
|
-
expiresAt: this.normalizeExpiresAt(value.expiresAt)
|
|
156
|
-
};
|
|
157
|
-
}
|
|
158
|
-
normalizeUpdatedAt(value, fallback) {
|
|
159
|
-
if ('number' == typeof value && Number.isFinite(value) && value > 0) return value;
|
|
160
|
-
return fallback;
|
|
161
|
-
}
|
|
162
|
-
normalizeExpiresAt(value) {
|
|
163
|
-
if ('number' == typeof value && Number.isFinite(value) && value > 0) return value;
|
|
164
|
-
}
|
|
165
96
|
constructor(options){
|
|
166
97
|
this.syncGeneration = 0;
|
|
167
98
|
this.appliedGateFingerprints = new Map();
|
|
168
99
|
this.orchestrator = options.orchestrator;
|
|
169
100
|
if (!options.gateSnapshotStore && !options.gateSnapshotPath) throw new Error('ContractGateAutopilot requires gateSnapshotPath or gateSnapshotStore');
|
|
170
101
|
this.gateSnapshotPath = options.gateSnapshotPath;
|
|
171
|
-
this.gateSnapshotStore = options.gateSnapshotStore || (0,
|
|
102
|
+
this.gateSnapshotStore = options.gateSnapshotStore || (0, file_store_js_namespaceObject.createFileContractGateSnapshotStore)(options.gateSnapshotPath);
|
|
172
103
|
this.pollIntervalMs = Math.max(250, options.pollIntervalMs ?? DEFAULT_POLL_INTERVAL_MS);
|
|
173
104
|
this.gateStaleAfterMs = Math.max(0, options.gateStaleAfterMs ?? DEFAULT_GATE_STALE_AFTER_MS);
|
|
174
105
|
this.logger = options.logger;
|
package/dist/cjs/index.js
CHANGED
|
@@ -28,21 +28,17 @@ var __webpack_require__ = {};
|
|
|
28
28
|
var __webpack_exports__ = {};
|
|
29
29
|
__webpack_require__.r(__webpack_exports__);
|
|
30
30
|
__webpack_require__.d(__webpack_exports__, {
|
|
31
|
-
CONTRACT_GATE_SNAPSHOT_SCHEMA_VERSION: ()=>index_js_namespaceObject.CONTRACT_GATE_SNAPSHOT_SCHEMA_VERSION,
|
|
32
31
|
ContractGateAutopilot: ()=>external_contractGateAutopilot_js_namespaceObject.ContractGateAutopilot,
|
|
33
|
-
DEFAULT_CONTRACT_GATE_SNAPSHOT_PATH: ()=>index_js_namespaceObject.DEFAULT_CONTRACT_GATE_SNAPSHOT_PATH,
|
|
34
32
|
DEFAULT_ENVIRONMENT_NAME: ()=>external_env_js_namespaceObject.DEFAULT_ENVIRONMENT_NAME,
|
|
35
33
|
DEFAULT_RUNTIME_FALLBACK_SIGNAL_ENDPOINT: ()=>external_telemetry_js_namespaceObject.DEFAULT_RUNTIME_FALLBACK_SIGNAL_ENDPOINT,
|
|
36
34
|
DEFAULT_RUNTIME_STATUS_ENDPOINT: ()=>external_telemetry_js_namespaceObject.DEFAULT_RUNTIME_STATUS_ENDPOINT,
|
|
37
35
|
TelemetryCanaryOrchestrator: ()=>external_telemetry_js_namespaceObject.TelemetryCanaryOrchestrator,
|
|
38
36
|
TelemetryRegistry: ()=>external_telemetry_js_namespaceObject.TelemetryRegistry,
|
|
39
37
|
TelemetryStartupHealthError: ()=>external_telemetry_js_namespaceObject.TelemetryStartupHealthError,
|
|
40
|
-
collectDirectRemoteModuleFederationCss: ()=>
|
|
41
|
-
collectDirectRemoteModuleFederationCssWithMeta: ()=>
|
|
42
|
-
collectModuleFederationManifestCss: ()=>
|
|
43
|
-
|
|
44
|
-
createHttpContractGateSnapshotStore: ()=>index_js_namespaceObject.createHttpContractGateSnapshotStore,
|
|
45
|
-
createModuleFederationCssCollector: ()=>external_module_federation_css_index_js_namespaceObject.createModuleFederationCssCollector,
|
|
38
|
+
collectDirectRemoteModuleFederationCss: ()=>index_js_namespaceObject.collectDirectRemoteModuleFederationCss,
|
|
39
|
+
collectDirectRemoteModuleFederationCssWithMeta: ()=>index_js_namespaceObject.collectDirectRemoteModuleFederationCssWithMeta,
|
|
40
|
+
collectModuleFederationManifestCss: ()=>index_js_namespaceObject.collectModuleFederationManifestCss,
|
|
41
|
+
createModuleFederationCssCollector: ()=>index_js_namespaceObject.createModuleFederationCssCollector,
|
|
46
42
|
createOtlpTelemetryExporter: ()=>external_telemetry_js_namespaceObject.createOtlpTelemetryExporter,
|
|
47
43
|
createRuntimeFallbackSignalRuntimeState: ()=>external_telemetry_js_namespaceObject.createRuntimeFallbackSignalRuntimeState,
|
|
48
44
|
createRuntimeSignalError: ()=>external_telemetry_js_namespaceObject.createRuntimeSignalError,
|
|
@@ -54,7 +50,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
54
50
|
getRuntimeSignalErrorStatusCode: ()=>external_telemetry_js_namespaceObject.getRuntimeSignalErrorStatusCode,
|
|
55
51
|
hasEnabledTelemetryExporters: ()=>external_telemetry_js_namespaceObject.hasEnabledTelemetryExporters,
|
|
56
52
|
injectMfAssetCacheHeadersPlugin: ()=>external_mfCache_js_namespaceObject.injectMfAssetCacheHeadersPlugin,
|
|
57
|
-
injectModuleFederationCssPlugin: ()=>
|
|
53
|
+
injectModuleFederationCssPlugin: ()=>index_js_namespaceObject.injectModuleFederationCssPlugin,
|
|
58
54
|
injectTelemetryPlugin: ()=>external_telemetry_js_namespaceObject.injectTelemetryPlugin,
|
|
59
55
|
isMfManifestAsset: ()=>external_mfCache_js_namespaceObject.isMfManifestAsset,
|
|
60
56
|
isMfRemoteEntryAsset: ()=>external_mfCache_js_namespaceObject.isMfRemoteEntryAsset,
|
|
@@ -63,21 +59,16 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
63
59
|
normalizeRuntimeFallbackTrustPolicy: ()=>external_telemetry_js_namespaceObject.normalizeRuntimeFallbackTrustPolicy,
|
|
64
60
|
parseRuntimeFallbackSignalPayloadFromRawBody: ()=>external_telemetry_js_namespaceObject.parseRuntimeFallbackSignalPayloadFromRawBody,
|
|
65
61
|
parseServerRuntimeExtensionsEnv: ()=>external_env_js_namespaceObject.parseServerRuntimeExtensionsEnv,
|
|
66
|
-
resolveContractGateSnapshotPath: ()=>index_js_namespaceObject.resolveContractGateSnapshotPath,
|
|
67
|
-
resolveContractGateSnapshotStore: ()=>index_js_namespaceObject.resolveContractGateSnapshotStore,
|
|
68
62
|
resolveMfAssetCacheHeaders: ()=>external_mfCache_js_namespaceObject.resolveMfAssetCacheHeaders,
|
|
69
63
|
resolveRuntimeFallbackSignalEndpoint: ()=>external_telemetry_js_namespaceObject.resolveRuntimeFallbackSignalEndpoint,
|
|
70
64
|
resolveTelemetrySloOptions: ()=>external_telemetry_js_namespaceObject.resolveTelemetrySloOptions
|
|
71
65
|
});
|
|
72
|
-
const index_js_namespaceObject = require("./contract-gate-snapshot-store/index.js");
|
|
73
66
|
const external_contractGateAutopilot_js_namespaceObject = require("./contractGateAutopilot.js");
|
|
74
67
|
const external_env_js_namespaceObject = require("./env.js");
|
|
75
68
|
const external_mfCache_js_namespaceObject = require("./mfCache.js");
|
|
76
|
-
const
|
|
69
|
+
const index_js_namespaceObject = require("./module-federation-css/index.js");
|
|
77
70
|
const external_telemetry_js_namespaceObject = require("./telemetry.js");
|
|
78
|
-
exports.CONTRACT_GATE_SNAPSHOT_SCHEMA_VERSION = __webpack_exports__.CONTRACT_GATE_SNAPSHOT_SCHEMA_VERSION;
|
|
79
71
|
exports.ContractGateAutopilot = __webpack_exports__.ContractGateAutopilot;
|
|
80
|
-
exports.DEFAULT_CONTRACT_GATE_SNAPSHOT_PATH = __webpack_exports__.DEFAULT_CONTRACT_GATE_SNAPSHOT_PATH;
|
|
81
72
|
exports.DEFAULT_ENVIRONMENT_NAME = __webpack_exports__.DEFAULT_ENVIRONMENT_NAME;
|
|
82
73
|
exports.DEFAULT_RUNTIME_FALLBACK_SIGNAL_ENDPOINT = __webpack_exports__.DEFAULT_RUNTIME_FALLBACK_SIGNAL_ENDPOINT;
|
|
83
74
|
exports.DEFAULT_RUNTIME_STATUS_ENDPOINT = __webpack_exports__.DEFAULT_RUNTIME_STATUS_ENDPOINT;
|
|
@@ -87,8 +78,6 @@ exports.TelemetryStartupHealthError = __webpack_exports__.TelemetryStartupHealth
|
|
|
87
78
|
exports.collectDirectRemoteModuleFederationCss = __webpack_exports__.collectDirectRemoteModuleFederationCss;
|
|
88
79
|
exports.collectDirectRemoteModuleFederationCssWithMeta = __webpack_exports__.collectDirectRemoteModuleFederationCssWithMeta;
|
|
89
80
|
exports.collectModuleFederationManifestCss = __webpack_exports__.collectModuleFederationManifestCss;
|
|
90
|
-
exports.createFileContractGateSnapshotStore = __webpack_exports__.createFileContractGateSnapshotStore;
|
|
91
|
-
exports.createHttpContractGateSnapshotStore = __webpack_exports__.createHttpContractGateSnapshotStore;
|
|
92
81
|
exports.createModuleFederationCssCollector = __webpack_exports__.createModuleFederationCssCollector;
|
|
93
82
|
exports.createOtlpTelemetryExporter = __webpack_exports__.createOtlpTelemetryExporter;
|
|
94
83
|
exports.createRuntimeFallbackSignalRuntimeState = __webpack_exports__.createRuntimeFallbackSignalRuntimeState;
|
|
@@ -110,15 +99,11 @@ exports.normalizeRuntimeFallbackSignalAuthConfig = __webpack_exports__.normalize
|
|
|
110
99
|
exports.normalizeRuntimeFallbackTrustPolicy = __webpack_exports__.normalizeRuntimeFallbackTrustPolicy;
|
|
111
100
|
exports.parseRuntimeFallbackSignalPayloadFromRawBody = __webpack_exports__.parseRuntimeFallbackSignalPayloadFromRawBody;
|
|
112
101
|
exports.parseServerRuntimeExtensionsEnv = __webpack_exports__.parseServerRuntimeExtensionsEnv;
|
|
113
|
-
exports.resolveContractGateSnapshotPath = __webpack_exports__.resolveContractGateSnapshotPath;
|
|
114
|
-
exports.resolveContractGateSnapshotStore = __webpack_exports__.resolveContractGateSnapshotStore;
|
|
115
102
|
exports.resolveMfAssetCacheHeaders = __webpack_exports__.resolveMfAssetCacheHeaders;
|
|
116
103
|
exports.resolveRuntimeFallbackSignalEndpoint = __webpack_exports__.resolveRuntimeFallbackSignalEndpoint;
|
|
117
104
|
exports.resolveTelemetrySloOptions = __webpack_exports__.resolveTelemetrySloOptions;
|
|
118
105
|
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
119
|
-
"CONTRACT_GATE_SNAPSHOT_SCHEMA_VERSION",
|
|
120
106
|
"ContractGateAutopilot",
|
|
121
|
-
"DEFAULT_CONTRACT_GATE_SNAPSHOT_PATH",
|
|
122
107
|
"DEFAULT_ENVIRONMENT_NAME",
|
|
123
108
|
"DEFAULT_RUNTIME_FALLBACK_SIGNAL_ENDPOINT",
|
|
124
109
|
"DEFAULT_RUNTIME_STATUS_ENDPOINT",
|
|
@@ -128,8 +113,6 @@ for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
|
128
113
|
"collectDirectRemoteModuleFederationCss",
|
|
129
114
|
"collectDirectRemoteModuleFederationCssWithMeta",
|
|
130
115
|
"collectModuleFederationManifestCss",
|
|
131
|
-
"createFileContractGateSnapshotStore",
|
|
132
|
-
"createHttpContractGateSnapshotStore",
|
|
133
116
|
"createModuleFederationCssCollector",
|
|
134
117
|
"createOtlpTelemetryExporter",
|
|
135
118
|
"createRuntimeFallbackSignalRuntimeState",
|
|
@@ -151,8 +134,6 @@ for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
|
151
134
|
"normalizeRuntimeFallbackTrustPolicy",
|
|
152
135
|
"parseRuntimeFallbackSignalPayloadFromRawBody",
|
|
153
136
|
"parseServerRuntimeExtensionsEnv",
|
|
154
|
-
"resolveContractGateSnapshotPath",
|
|
155
|
-
"resolveContractGateSnapshotStore",
|
|
156
137
|
"resolveMfAssetCacheHeaders",
|
|
157
138
|
"resolveRuntimeFallbackSignalEndpoint",
|
|
158
139
|
"resolveTelemetrySloOptions"
|
|
@@ -37,21 +37,16 @@ var __webpack_require__ = {};
|
|
|
37
37
|
var __webpack_exports__ = {};
|
|
38
38
|
__webpack_require__.r(__webpack_exports__);
|
|
39
39
|
__webpack_require__.d(__webpack_exports__, {
|
|
40
|
-
appendResolvedCssAssets: ()=>appendResolvedCssAssets,
|
|
41
40
|
collectModuleFederationManifestCss: ()=>collectModuleFederationManifestCss,
|
|
42
41
|
ensureTrailingSlash: ()=>ensureTrailingSlash,
|
|
43
|
-
getCssAssets: ()=>getCssAssets,
|
|
44
42
|
getHostManifest: ()=>getHostManifest,
|
|
45
|
-
getManifestFallbackBase: ()=>getManifestFallbackBase,
|
|
46
|
-
getManifestPublicPathBase: ()=>getManifestPublicPathBase,
|
|
47
43
|
normalizeRemoteEntry: ()=>normalizeRemoteEntry,
|
|
48
|
-
tryResolveUrl: ()=>tryResolveUrl,
|
|
49
44
|
warn: ()=>warn
|
|
50
45
|
});
|
|
46
|
+
const external_node_path_namespaceObject = require("node:path");
|
|
47
|
+
var external_node_path_default = /*#__PURE__*/ __webpack_require__.n(external_node_path_namespaceObject);
|
|
51
48
|
const fileReader_namespaceObject = require("@modern-js/runtime-utils/fileReader");
|
|
52
49
|
const utils_namespaceObject = require("@modern-js/utils");
|
|
53
|
-
const external_path_namespaceObject = require("path");
|
|
54
|
-
var external_path_default = /*#__PURE__*/ __webpack_require__.n(external_path_namespaceObject);
|
|
55
50
|
const MODULE_FEDERATION_MANIFEST_FILE = 'mf-manifest.json';
|
|
56
51
|
const warn = (monitors, message, ...args)=>{
|
|
57
52
|
if (monitors) return void monitors.warn(message, ...args);
|
|
@@ -106,7 +101,7 @@ const collectModuleFederationManifestCss = (manifest, manifestUrl)=>{
|
|
|
106
101
|
return result;
|
|
107
102
|
};
|
|
108
103
|
const getHostManifest = async (pwd, monitors)=>{
|
|
109
|
-
const manifestPath =
|
|
104
|
+
const manifestPath = external_node_path_default().join(pwd, MODULE_FEDERATION_MANIFEST_FILE);
|
|
110
105
|
if (!await utils_namespaceObject.fs.pathExists(manifestPath)) return;
|
|
111
106
|
const manifestBuffer = await fileReader_namespaceObject.fileReader.readFileFromSystem(manifestPath, 'buffer');
|
|
112
107
|
if (null === manifestBuffer) return;
|
|
@@ -117,26 +112,16 @@ const getHostManifest = async (pwd, monitors)=>{
|
|
|
117
112
|
return;
|
|
118
113
|
}
|
|
119
114
|
};
|
|
120
|
-
exports.appendResolvedCssAssets = __webpack_exports__.appendResolvedCssAssets;
|
|
121
115
|
exports.collectModuleFederationManifestCss = __webpack_exports__.collectModuleFederationManifestCss;
|
|
122
116
|
exports.ensureTrailingSlash = __webpack_exports__.ensureTrailingSlash;
|
|
123
|
-
exports.getCssAssets = __webpack_exports__.getCssAssets;
|
|
124
117
|
exports.getHostManifest = __webpack_exports__.getHostManifest;
|
|
125
|
-
exports.getManifestFallbackBase = __webpack_exports__.getManifestFallbackBase;
|
|
126
|
-
exports.getManifestPublicPathBase = __webpack_exports__.getManifestPublicPathBase;
|
|
127
118
|
exports.normalizeRemoteEntry = __webpack_exports__.normalizeRemoteEntry;
|
|
128
|
-
exports.tryResolveUrl = __webpack_exports__.tryResolveUrl;
|
|
129
119
|
exports.warn = __webpack_exports__.warn;
|
|
130
120
|
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
131
|
-
"appendResolvedCssAssets",
|
|
132
121
|
"collectModuleFederationManifestCss",
|
|
133
122
|
"ensureTrailingSlash",
|
|
134
|
-
"getCssAssets",
|
|
135
123
|
"getHostManifest",
|
|
136
|
-
"getManifestFallbackBase",
|
|
137
|
-
"getManifestPublicPathBase",
|
|
138
124
|
"normalizeRemoteEntry",
|
|
139
|
-
"tryResolveUrl",
|
|
140
125
|
"warn"
|
|
141
126
|
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
142
127
|
Object.defineProperty(exports, '__esModule', {
|
|
@@ -28,34 +28,28 @@ var __webpack_require__ = {};
|
|
|
28
28
|
var __webpack_exports__ = {};
|
|
29
29
|
__webpack_require__.r(__webpack_exports__);
|
|
30
30
|
__webpack_require__.d(__webpack_exports__, {
|
|
31
|
-
DEFAULT_RUNTIME_FALLBACK_FAILURE_HOLD_MS: ()=>
|
|
32
|
-
DEFAULT_RUNTIME_FALLBACK_GATE_NAME: ()=>
|
|
33
|
-
DEFAULT_RUNTIME_FALLBACK_MAX_BODY_BYTES: ()=>
|
|
34
|
-
DEFAULT_RUNTIME_FALLBACK_SIGNAL_ENDPOINT: ()=>
|
|
35
|
-
DEFAULT_RUNTIME_STATUS_ENDPOINT: ()=>
|
|
36
|
-
createRuntimeFallbackSignalRuntimeState: ()=>
|
|
37
|
-
createRuntimeSignalError: ()=>
|
|
38
|
-
enforceRuntimeFallbackSignalAuth: ()=>
|
|
39
|
-
enforceRuntimeFallbackSignalAuthToken: ()=>
|
|
40
|
-
enforceRuntimeFallbackSignalTrustPolicy: ()=>
|
|
41
|
-
getRuntimeSignalErrorStatusCode: ()=>
|
|
42
|
-
normalizeRequiredRuntimeFallbackSignalAuthConfig: ()=>
|
|
43
|
-
normalizeRuntimeFallbackSignalAuthConfig: ()=>
|
|
44
|
-
normalizeRuntimeFallbackTrustPolicy: ()=>
|
|
45
|
-
parseRuntimeFallbackSignalPayload: ()=>
|
|
46
|
-
parseRuntimeFallbackSignalPayloadFromRawBody: ()=>
|
|
47
|
-
persistRuntimeFallbackContractGate: ()=>
|
|
48
|
-
resolveRuntimeFallbackSignalEndpoint: ()=>
|
|
31
|
+
DEFAULT_RUNTIME_FALLBACK_FAILURE_HOLD_MS: ()=>external_model_js_namespaceObject.DEFAULT_RUNTIME_FALLBACK_FAILURE_HOLD_MS,
|
|
32
|
+
DEFAULT_RUNTIME_FALLBACK_GATE_NAME: ()=>external_model_js_namespaceObject.DEFAULT_RUNTIME_FALLBACK_GATE_NAME,
|
|
33
|
+
DEFAULT_RUNTIME_FALLBACK_MAX_BODY_BYTES: ()=>external_model_js_namespaceObject.DEFAULT_RUNTIME_FALLBACK_MAX_BODY_BYTES,
|
|
34
|
+
DEFAULT_RUNTIME_FALLBACK_SIGNAL_ENDPOINT: ()=>external_model_js_namespaceObject.DEFAULT_RUNTIME_FALLBACK_SIGNAL_ENDPOINT,
|
|
35
|
+
DEFAULT_RUNTIME_STATUS_ENDPOINT: ()=>external_model_js_namespaceObject.DEFAULT_RUNTIME_STATUS_ENDPOINT,
|
|
36
|
+
createRuntimeFallbackSignalRuntimeState: ()=>external_store_js_namespaceObject.createRuntimeFallbackSignalRuntimeState,
|
|
37
|
+
createRuntimeSignalError: ()=>external_model_js_namespaceObject.createRuntimeSignalError,
|
|
38
|
+
enforceRuntimeFallbackSignalAuth: ()=>external_resolver_js_namespaceObject.enforceRuntimeFallbackSignalAuth,
|
|
39
|
+
enforceRuntimeFallbackSignalAuthToken: ()=>external_resolver_js_namespaceObject.enforceRuntimeFallbackSignalAuthToken,
|
|
40
|
+
enforceRuntimeFallbackSignalTrustPolicy: ()=>external_resolver_js_namespaceObject.enforceRuntimeFallbackSignalTrustPolicy,
|
|
41
|
+
getRuntimeSignalErrorStatusCode: ()=>external_model_js_namespaceObject.getRuntimeSignalErrorStatusCode,
|
|
42
|
+
normalizeRequiredRuntimeFallbackSignalAuthConfig: ()=>external_resolver_js_namespaceObject.normalizeRequiredRuntimeFallbackSignalAuthConfig,
|
|
43
|
+
normalizeRuntimeFallbackSignalAuthConfig: ()=>external_resolver_js_namespaceObject.normalizeRuntimeFallbackSignalAuthConfig,
|
|
44
|
+
normalizeRuntimeFallbackTrustPolicy: ()=>external_resolver_js_namespaceObject.normalizeRuntimeFallbackTrustPolicy,
|
|
45
|
+
parseRuntimeFallbackSignalPayload: ()=>external_model_js_namespaceObject.parseRuntimeFallbackSignalPayload,
|
|
46
|
+
parseRuntimeFallbackSignalPayloadFromRawBody: ()=>external_model_js_namespaceObject.parseRuntimeFallbackSignalPayloadFromRawBody,
|
|
47
|
+
persistRuntimeFallbackContractGate: ()=>external_store_js_namespaceObject.persistRuntimeFallbackContractGate,
|
|
48
|
+
resolveRuntimeFallbackSignalEndpoint: ()=>external_resolver_js_namespaceObject.resolveRuntimeFallbackSignalEndpoint
|
|
49
49
|
});
|
|
50
|
-
const
|
|
51
|
-
const
|
|
52
|
-
const
|
|
53
|
-
const external_endpoint_js_namespaceObject = require("./endpoint.js");
|
|
54
|
-
const external_errors_js_namespaceObject = require("./errors.js");
|
|
55
|
-
const external_payload_js_namespaceObject = require("./payload.js");
|
|
56
|
-
const external_state_js_namespaceObject = require("./state.js");
|
|
57
|
-
const external_status_js_namespaceObject = require("./status.js");
|
|
58
|
-
const external_trust_policy_js_namespaceObject = require("./trust-policy.js");
|
|
50
|
+
const external_model_js_namespaceObject = require("./model.js");
|
|
51
|
+
const external_resolver_js_namespaceObject = require("./resolver.js");
|
|
52
|
+
const external_store_js_namespaceObject = require("./store.js");
|
|
59
53
|
exports.DEFAULT_RUNTIME_FALLBACK_FAILURE_HOLD_MS = __webpack_exports__.DEFAULT_RUNTIME_FALLBACK_FAILURE_HOLD_MS;
|
|
60
54
|
exports.DEFAULT_RUNTIME_FALLBACK_GATE_NAME = __webpack_exports__.DEFAULT_RUNTIME_FALLBACK_GATE_NAME;
|
|
61
55
|
exports.DEFAULT_RUNTIME_FALLBACK_MAX_BODY_BYTES = __webpack_exports__.DEFAULT_RUNTIME_FALLBACK_MAX_BODY_BYTES;
|