@bleedingdev/modern-js-server-runtime-extensions 3.5.0-ultramodern.6 → 3.5.0-ultramodern.76
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 +102 -0
- package/dist/cjs/contract-gate-snapshot-store/http-store.js +133 -0
- package/dist/cjs/contract-gate-snapshot-store/index.js +58 -0
- package/dist/cjs/contract-gate-snapshot-store/resolve.js +124 -0
- package/dist/cjs/contract-gate-snapshot-store/types.js +44 -0
- package/dist/cjs/contractGateAutopilot.js +22 -70
- package/dist/cjs/index.js +6 -25
- package/dist/cjs/mfCache.js +2 -2
- package/dist/cjs/module-federation-css/collector.js +79 -0
- package/dist/cjs/module-federation-css/index.js +55 -0
- package/dist/cjs/module-federation-css/manifest.js +129 -0
- package/dist/cjs/module-federation-css/plugin.js +71 -0
- package/dist/cjs/module-federation-css/remote.js +133 -0
- package/dist/cjs/runtime-fallback-signal/index.js +93 -0
- 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/store.js +83 -0
- package/dist/cjs/runtimeFallbackSignal.js +32 -281
- package/dist/cjs/telemetry/canary.js +180 -0
- package/dist/cjs/telemetry/canaryEvaluation.js +79 -0
- package/dist/cjs/telemetry/canarySetup.js +107 -0
- package/dist/cjs/telemetry/envelope.js +223 -0
- package/dist/cjs/telemetry/exporters.js +148 -0
- package/dist/cjs/telemetry/lifecycle.js +98 -0
- package/dist/cjs/telemetry/metrics.js +115 -0
- package/dist/cjs/telemetry/plugin.js +185 -0
- package/dist/cjs/telemetry/registry.js +296 -0
- package/dist/cjs/telemetry/registryTypes.js +46 -0
- package/dist/cjs/telemetry/runtimeEndpoints.js +135 -0
- package/dist/cjs/telemetry.js +32 -343
- package/dist/cjs/telemetryCore.js +14 -767
- package/dist/esm/contract-gate-snapshot-normalization.mjs +81 -0
- package/dist/esm/contract-gate-snapshot-store/file-store.mjs +51 -0
- package/dist/esm/contract-gate-snapshot-store/http-store.mjs +92 -0
- package/dist/esm/contract-gate-snapshot-store/index.mjs +4 -0
- package/dist/esm/contract-gate-snapshot-store/resolve.mjs +70 -0
- package/dist/esm/contract-gate-snapshot-store/types.mjs +3 -0
- package/dist/esm/contractGateAutopilot.mjs +21 -69
- package/dist/esm/index.mjs +1 -2
- package/dist/esm/mfCache.mjs +2 -2
- package/dist/esm/module-federation-css/collector.mjs +38 -0
- package/dist/esm/module-federation-css/index.mjs +4 -0
- package/dist/esm/module-federation-css/manifest.mjs +69 -0
- package/dist/esm/module-federation-css/plugin.mjs +33 -0
- package/dist/esm/module-federation-css/remote.mjs +92 -0
- package/dist/esm/runtime-fallback-signal/index.mjs +3 -0
- 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/store.mjs +39 -0
- package/dist/esm/runtimeFallbackSignal.mjs +1 -222
- package/dist/esm/telemetry/canary.mjs +142 -0
- package/dist/esm/telemetry/canaryEvaluation.mjs +41 -0
- package/dist/esm/telemetry/canarySetup.mjs +69 -0
- package/dist/esm/telemetry/envelope.mjs +164 -0
- package/dist/esm/telemetry/exporters.mjs +104 -0
- package/dist/esm/telemetry/lifecycle.mjs +60 -0
- package/dist/esm/telemetry/metrics.mjs +77 -0
- package/dist/esm/telemetry/plugin.mjs +87 -0
- package/dist/esm/telemetry/registry.mjs +258 -0
- package/dist/esm/telemetry/registryTypes.mjs +8 -0
- package/dist/esm/telemetry/runtimeEndpoints.mjs +94 -0
- package/dist/esm/telemetry.mjs +1 -275
- package/dist/esm/telemetryCore.mjs +6 -759
- package/dist/esm-node/contract-gate-snapshot-normalization.mjs +82 -0
- package/dist/esm-node/contract-gate-snapshot-store/file-store.mjs +52 -0
- package/dist/esm-node/contract-gate-snapshot-store/http-store.mjs +93 -0
- package/dist/esm-node/contract-gate-snapshot-store/index.mjs +5 -0
- package/dist/esm-node/contract-gate-snapshot-store/resolve.mjs +71 -0
- package/dist/esm-node/contract-gate-snapshot-store/types.mjs +4 -0
- package/dist/esm-node/contractGateAutopilot.mjs +21 -69
- package/dist/esm-node/index.mjs +1 -2
- package/dist/esm-node/mfCache.mjs +2 -2
- package/dist/esm-node/module-federation-css/collector.mjs +39 -0
- package/dist/esm-node/module-federation-css/index.mjs +5 -0
- package/dist/esm-node/module-federation-css/manifest.mjs +70 -0
- package/dist/esm-node/module-federation-css/plugin.mjs +34 -0
- package/dist/esm-node/module-federation-css/remote.mjs +93 -0
- package/dist/esm-node/runtime-fallback-signal/index.mjs +4 -0
- 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/store.mjs +40 -0
- package/dist/esm-node/runtimeFallbackSignal.mjs +1 -222
- package/dist/esm-node/telemetry/canary.mjs +143 -0
- package/dist/esm-node/telemetry/canaryEvaluation.mjs +42 -0
- package/dist/esm-node/telemetry/canarySetup.mjs +70 -0
- package/dist/esm-node/telemetry/envelope.mjs +165 -0
- package/dist/esm-node/telemetry/exporters.mjs +105 -0
- package/dist/esm-node/telemetry/lifecycle.mjs +61 -0
- package/dist/esm-node/telemetry/metrics.mjs +78 -0
- package/dist/esm-node/telemetry/plugin.mjs +88 -0
- package/dist/esm-node/telemetry/registry.mjs +259 -0
- package/dist/esm-node/telemetry/registryTypes.mjs +9 -0
- package/dist/esm-node/telemetry/runtimeEndpoints.mjs +95 -0
- package/dist/esm-node/telemetry.mjs +1 -275
- package/dist/esm-node/telemetryCore.mjs +6 -759
- package/dist/types/contract-gate-snapshot-normalization.d.ts +15 -0
- package/dist/types/contract-gate-snapshot-store/file-store.d.ts +3 -0
- package/dist/types/contract-gate-snapshot-store/http-store.d.ts +5 -0
- package/dist/types/contract-gate-snapshot-store/index.d.ts +5 -0
- package/dist/types/contract-gate-snapshot-store/resolve.d.ts +9 -0
- package/dist/types/{contractGateSnapshotStore.d.ts → contract-gate-snapshot-store/types.d.ts} +1 -11
- package/dist/types/contractGateAutopilot.d.ts +3 -6
- package/dist/types/index.d.ts +1 -2
- package/dist/types/module-federation-css/collector.d.ts +25 -0
- package/dist/types/module-federation-css/index.d.ts +8 -0
- package/dist/types/module-federation-css/manifest.d.ts +28 -0
- package/dist/types/module-federation-css/plugin.d.ts +23 -0
- package/dist/types/module-federation-css/remote.d.ts +20 -0
- package/dist/types/runtime-fallback-signal/index.d.ts +4 -0
- 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/runtimeFallbackSignal.d.ts +1 -94
- package/dist/types/telemetry/canary.d.ts +85 -0
- package/dist/types/telemetry/canaryEvaluation.d.ts +20 -0
- package/dist/types/telemetry/canarySetup.d.ts +17 -0
- package/dist/types/telemetry/envelope.d.ts +55 -0
- package/dist/types/telemetry/exporters.d.ts +12 -0
- package/dist/types/telemetry/lifecycle.d.ts +18 -0
- package/dist/types/telemetry/metrics.d.ts +3 -0
- package/dist/types/telemetry/plugin.d.ts +12 -0
- package/dist/types/telemetry/registry.d.ts +69 -0
- package/dist/types/telemetry/registryTypes.d.ts +50 -0
- package/dist/types/telemetry/runtimeEndpoints.d.ts +35 -0
- package/dist/types/telemetry.d.ts +1 -12
- package/dist/types/telemetryCore.d.ts +6 -257
- package/package.json +11 -13
- package/src/contract-gate-snapshot-normalization.ts +155 -0
- package/src/contract-gate-snapshot-store/file-store.ts +83 -0
- package/src/contract-gate-snapshot-store/http-store.ts +159 -0
- package/src/contract-gate-snapshot-store/index.ts +20 -0
- package/src/contract-gate-snapshot-store/resolve.ts +179 -0
- package/src/contract-gate-snapshot-store/types.ts +64 -0
- package/src/contractGateAutopilot.ts +39 -131
- package/src/index.ts +1 -17
- package/src/mfCache.ts +3 -1
- package/src/module-federation-css/collector.ts +82 -0
- package/src/module-federation-css/index.ts +14 -0
- package/src/module-federation-css/manifest.ts +163 -0
- package/src/module-federation-css/plugin.ts +86 -0
- package/src/module-federation-css/remote.ts +165 -0
- package/src/runtime-fallback-signal/index.ts +34 -0
- package/src/runtime-fallback-signal/model.ts +230 -0
- package/src/runtime-fallback-signal/resolver.ts +304 -0
- package/src/runtime-fallback-signal/store.ts +78 -0
- package/src/runtimeFallbackSignal.ts +1 -584
- package/src/telemetry/canary.ts +291 -0
- package/src/telemetry/canaryEvaluation.ts +83 -0
- package/src/telemetry/canarySetup.ts +160 -0
- package/src/telemetry/envelope.ts +277 -0
- package/src/telemetry/exporters.ts +165 -0
- package/src/telemetry/lifecycle.ts +138 -0
- package/src/telemetry/metrics.ts +141 -0
- package/src/telemetry/plugin.ts +197 -0
- package/src/telemetry/registry.ts +424 -0
- package/src/telemetry/registryTypes.ts +63 -0
- package/src/telemetry/runtimeEndpoints.ts +172 -0
- package/src/telemetry.ts +1 -554
- package/src/telemetryCore.ts +34 -1332
- package/tests/contractGateAutopilot.test.ts +205 -0
- package/tests/contractGateSnapshotStore.test.ts +54 -1
- package/tests/helpers.ts +1 -0
- package/tests/moduleFederationCss.test.ts +1 -1
- package/tests/registration.test.ts +1 -1
- package/tests/telemetry.test.ts +51 -0
- package/tests/telemetryAutopilot.test.ts +141 -0
- package/tests/telemetryCanaryOrchestrator.test.ts +225 -0
- package/tests/telemetryLifecycle.test.ts +253 -2
- package/tests/telemetryRegistryQueueMatrix.test.ts +227 -0
- package/dist/cjs/contractGateSnapshotStore.js +0 -253
- package/dist/cjs/moduleFederationCss.js +0 -285
- package/dist/esm/contractGateSnapshotStore.mjs +0 -190
- package/dist/esm/moduleFederationCss.mjs +0 -225
- package/dist/esm-node/contractGateSnapshotStore.mjs +0 -192
- package/dist/esm-node/moduleFederationCss.mjs +0 -226
- package/dist/types/moduleFederationCss.d.ts +0 -87
- package/src/contractGateSnapshotStore.ts +0 -420
- package/src/moduleFederationCss.ts +0 -473
|
@@ -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
|
+
});
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.n = (module)=>{
|
|
5
|
+
var getter = module && module.__esModule ? ()=>module['default'] : ()=>module;
|
|
6
|
+
__webpack_require__.d(getter, {
|
|
7
|
+
a: getter
|
|
8
|
+
});
|
|
9
|
+
return getter;
|
|
10
|
+
};
|
|
11
|
+
})();
|
|
12
|
+
(()=>{
|
|
13
|
+
__webpack_require__.d = (exports1, getters, values)=>{
|
|
14
|
+
var define = (defs, kind)=>{
|
|
15
|
+
for(var key in defs)if (__webpack_require__.o(defs, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
16
|
+
enumerable: true,
|
|
17
|
+
[kind]: defs[key]
|
|
18
|
+
});
|
|
19
|
+
};
|
|
20
|
+
define(getters, "get");
|
|
21
|
+
define(values, "value");
|
|
22
|
+
};
|
|
23
|
+
})();
|
|
24
|
+
(()=>{
|
|
25
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
26
|
+
})();
|
|
27
|
+
(()=>{
|
|
28
|
+
__webpack_require__.r = (exports1)=>{
|
|
29
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
30
|
+
value: 'Module'
|
|
31
|
+
});
|
|
32
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
33
|
+
value: true
|
|
34
|
+
});
|
|
35
|
+
};
|
|
36
|
+
})();
|
|
37
|
+
var __webpack_exports__ = {};
|
|
38
|
+
__webpack_require__.r(__webpack_exports__);
|
|
39
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
40
|
+
createFileContractGateSnapshotStore: ()=>createFileContractGateSnapshotStore,
|
|
41
|
+
resolveContractGateSnapshotPath: ()=>resolveContractGateSnapshotPath
|
|
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);
|
|
46
|
+
const utils_namespaceObject = require("@modern-js/utils");
|
|
47
|
+
const external_env_js_namespaceObject = require("../env.js");
|
|
48
|
+
const external_resolve_js_namespaceObject = require("./resolve.js");
|
|
49
|
+
const external_types_js_namespaceObject = require("./types.js");
|
|
50
|
+
const resolveContractGateSnapshotPath = (appDirectory, configuredPath)=>{
|
|
51
|
+
const rawPath = configuredPath || (0, external_env_js_namespaceObject.parseServerRuntimeExtensionsEnv)().contractGatesFile || external_types_js_namespaceObject.DEFAULT_CONTRACT_GATE_SNAPSHOT_PATH;
|
|
52
|
+
if (external_node_path_default().isAbsolute(rawPath)) return rawPath;
|
|
53
|
+
return external_node_path_default().resolve(appDirectory, rawPath);
|
|
54
|
+
};
|
|
55
|
+
const writeSnapshotFileAtomically = async (resolvedPath, contents)=>{
|
|
56
|
+
const directory = external_node_path_default().dirname(resolvedPath);
|
|
57
|
+
await external_node_fs_namespaceObject.promises.mkdir(directory, {
|
|
58
|
+
recursive: true
|
|
59
|
+
});
|
|
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
|
+
try {
|
|
62
|
+
await external_node_fs_namespaceObject.promises.writeFile(temporaryPath, contents);
|
|
63
|
+
await external_node_fs_namespaceObject.promises.rename(temporaryPath, resolvedPath);
|
|
64
|
+
} catch (error) {
|
|
65
|
+
await external_node_fs_namespaceObject.promises.rm(temporaryPath, {
|
|
66
|
+
force: true
|
|
67
|
+
}).catch(()=>{});
|
|
68
|
+
throw error;
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
const createFileContractGateSnapshotStore = (gateSnapshotPath)=>{
|
|
72
|
+
const resolvedPath = external_node_path_default().resolve(gateSnapshotPath);
|
|
73
|
+
return {
|
|
74
|
+
name: `file:${resolvedPath}`,
|
|
75
|
+
async readSnapshot () {
|
|
76
|
+
if (!await utils_namespaceObject.fs.pathExists(resolvedPath)) return;
|
|
77
|
+
try {
|
|
78
|
+
const raw = await external_node_fs_namespaceObject.promises.readFile(resolvedPath, 'utf8');
|
|
79
|
+
return (0, external_resolve_js_namespaceObject.normalizeSnapshot)(JSON.parse(raw));
|
|
80
|
+
} catch (_error) {
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
async writeSnapshot (snapshot) {
|
|
85
|
+
const normalized = (0, external_resolve_js_namespaceObject.normalizeSnapshot)(snapshot) || {
|
|
86
|
+
schemaVersion: external_types_js_namespaceObject.CONTRACT_GATE_SNAPSHOT_SCHEMA_VERSION,
|
|
87
|
+
updatedAt: Date.now(),
|
|
88
|
+
gates: {}
|
|
89
|
+
};
|
|
90
|
+
await writeSnapshotFileAtomically(resolvedPath, `${JSON.stringify(normalized, null, 2)}\n`);
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
};
|
|
94
|
+
exports.createFileContractGateSnapshotStore = __webpack_exports__.createFileContractGateSnapshotStore;
|
|
95
|
+
exports.resolveContractGateSnapshotPath = __webpack_exports__.resolveContractGateSnapshotPath;
|
|
96
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
97
|
+
"createFileContractGateSnapshotStore",
|
|
98
|
+
"resolveContractGateSnapshotPath"
|
|
99
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
100
|
+
Object.defineProperty(exports, '__esModule', {
|
|
101
|
+
value: true
|
|
102
|
+
});
|
|
@@ -0,0 +1,133 @@
|
|
|
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
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
31
|
+
createHttpContractGateSnapshotStore: ()=>createHttpContractGateSnapshotStore,
|
|
32
|
+
tryResolveBuiltinSnapshotStore: ()=>tryResolveBuiltinSnapshotStore
|
|
33
|
+
});
|
|
34
|
+
const external_resolve_js_namespaceObject = require("./resolve.js");
|
|
35
|
+
const external_types_js_namespaceObject = require("./types.js");
|
|
36
|
+
const DEFAULT_HTTP_STORE_TIMEOUT_MS = 5000;
|
|
37
|
+
const BUILTIN_HTTP_STATE_STORE_MODULES = new Set([
|
|
38
|
+
'http',
|
|
39
|
+
'@modern-js/server-core/http',
|
|
40
|
+
'@modern-js/server-core/contract-gate-http-store',
|
|
41
|
+
'@modern-js/server-runtime-extensions/http',
|
|
42
|
+
'@modern-js/server-runtime-extensions/contract-gate-http-store'
|
|
43
|
+
]);
|
|
44
|
+
const normalizeHttpStoreOptions = (options)=>{
|
|
45
|
+
const endpoint = 'string' == typeof options?.endpoint ? options.endpoint.trim() : '';
|
|
46
|
+
if (!endpoint) throw new Error('[telemetry.canary.autopilot] HTTP stateStore requires options.endpoint');
|
|
47
|
+
const readMethod = 'string' == typeof options?.readMethod && options.readMethod.trim() ? options.readMethod.trim().toUpperCase() : 'GET';
|
|
48
|
+
const writeMethod = 'string' == typeof options?.writeMethod && options.writeMethod.trim() ? options.writeMethod.trim().toUpperCase() : 'PUT';
|
|
49
|
+
const timeoutMsRaw = Number(options?.timeoutMs);
|
|
50
|
+
const timeoutMs = Number.isFinite(timeoutMsRaw) && timeoutMsRaw > 0 ? Math.floor(timeoutMsRaw) : DEFAULT_HTTP_STORE_TIMEOUT_MS;
|
|
51
|
+
const headersRaw = options?.headers;
|
|
52
|
+
const headers = {};
|
|
53
|
+
if (headersRaw && 'object' == typeof headersRaw && !Array.isArray(headersRaw)) Object.entries(headersRaw).forEach(([key, value])=>{
|
|
54
|
+
if ('string' == typeof key && key.trim().length > 0 && null != value) headers[key] = String(value);
|
|
55
|
+
});
|
|
56
|
+
return {
|
|
57
|
+
endpoint,
|
|
58
|
+
readMethod,
|
|
59
|
+
writeMethod,
|
|
60
|
+
headers,
|
|
61
|
+
timeoutMs
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
const withTimeoutAbort = (timeoutMs)=>{
|
|
65
|
+
const controller = new AbortController();
|
|
66
|
+
const timer = setTimeout(()=>controller.abort(), timeoutMs);
|
|
67
|
+
return {
|
|
68
|
+
signal: controller.signal,
|
|
69
|
+
clear: ()=>clearTimeout(timer)
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
const createHttpContractGateSnapshotStore = (options)=>{
|
|
73
|
+
const normalized = normalizeHttpStoreOptions(options);
|
|
74
|
+
const endpoint = normalized.endpoint;
|
|
75
|
+
return {
|
|
76
|
+
name: `http:${endpoint}`,
|
|
77
|
+
async readSnapshot () {
|
|
78
|
+
const { signal, clear } = withTimeoutAbort(normalized.timeoutMs || 5000);
|
|
79
|
+
try {
|
|
80
|
+
const response = await fetch(endpoint, {
|
|
81
|
+
method: normalized.readMethod || 'GET',
|
|
82
|
+
headers: {
|
|
83
|
+
accept: 'application/json',
|
|
84
|
+
...normalized.headers || {}
|
|
85
|
+
},
|
|
86
|
+
signal
|
|
87
|
+
});
|
|
88
|
+
if (404 === response.status) return;
|
|
89
|
+
if (!response.ok) throw new Error(`HTTP stateStore read failed with status ${String(response.status)}`);
|
|
90
|
+
const payload = await response.json();
|
|
91
|
+
return (0, external_resolve_js_namespaceObject.normalizeSnapshot)(payload);
|
|
92
|
+
} finally{
|
|
93
|
+
clear();
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
async writeSnapshot (snapshot) {
|
|
97
|
+
const body = JSON.stringify((0, external_resolve_js_namespaceObject.normalizeSnapshot)(snapshot) || {
|
|
98
|
+
schemaVersion: external_types_js_namespaceObject.CONTRACT_GATE_SNAPSHOT_SCHEMA_VERSION,
|
|
99
|
+
updatedAt: Date.now(),
|
|
100
|
+
gates: {}
|
|
101
|
+
});
|
|
102
|
+
const { signal, clear } = withTimeoutAbort(normalized.timeoutMs || 5000);
|
|
103
|
+
try {
|
|
104
|
+
const response = await fetch(endpoint, {
|
|
105
|
+
method: normalized.writeMethod || 'PUT',
|
|
106
|
+
headers: {
|
|
107
|
+
'content-type': 'application/json',
|
|
108
|
+
...normalized.headers || {}
|
|
109
|
+
},
|
|
110
|
+
body,
|
|
111
|
+
signal
|
|
112
|
+
});
|
|
113
|
+
if (!response.ok) throw new Error(`HTTP stateStore write failed with status ${String(response.status)}`);
|
|
114
|
+
} finally{
|
|
115
|
+
clear();
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
};
|
|
119
|
+
};
|
|
120
|
+
const tryResolveBuiltinSnapshotStore = (input)=>{
|
|
121
|
+
const moduleName = input.stateStore.module.trim();
|
|
122
|
+
if (!BUILTIN_HTTP_STATE_STORE_MODULES.has(moduleName)) return;
|
|
123
|
+
return createHttpContractGateSnapshotStore(input.stateStore.options || {});
|
|
124
|
+
};
|
|
125
|
+
exports.createHttpContractGateSnapshotStore = __webpack_exports__.createHttpContractGateSnapshotStore;
|
|
126
|
+
exports.tryResolveBuiltinSnapshotStore = __webpack_exports__.tryResolveBuiltinSnapshotStore;
|
|
127
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
128
|
+
"createHttpContractGateSnapshotStore",
|
|
129
|
+
"tryResolveBuiltinSnapshotStore"
|
|
130
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
131
|
+
Object.defineProperty(exports, '__esModule', {
|
|
132
|
+
value: true
|
|
133
|
+
});
|
|
@@ -0,0 +1,58 @@
|
|
|
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
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
31
|
+
CONTRACT_GATE_SNAPSHOT_SCHEMA_VERSION: ()=>external_types_js_namespaceObject.CONTRACT_GATE_SNAPSHOT_SCHEMA_VERSION,
|
|
32
|
+
DEFAULT_CONTRACT_GATE_SNAPSHOT_PATH: ()=>external_types_js_namespaceObject.DEFAULT_CONTRACT_GATE_SNAPSHOT_PATH,
|
|
33
|
+
createFileContractGateSnapshotStore: ()=>external_file_store_js_namespaceObject.createFileContractGateSnapshotStore,
|
|
34
|
+
createHttpContractGateSnapshotStore: ()=>external_http_store_js_namespaceObject.createHttpContractGateSnapshotStore,
|
|
35
|
+
resolveContractGateSnapshotPath: ()=>external_file_store_js_namespaceObject.resolveContractGateSnapshotPath,
|
|
36
|
+
resolveContractGateSnapshotStore: ()=>external_resolve_js_namespaceObject.resolveContractGateSnapshotStore
|
|
37
|
+
});
|
|
38
|
+
const external_file_store_js_namespaceObject = require("./file-store.js");
|
|
39
|
+
const external_http_store_js_namespaceObject = require("./http-store.js");
|
|
40
|
+
const external_resolve_js_namespaceObject = require("./resolve.js");
|
|
41
|
+
const external_types_js_namespaceObject = require("./types.js");
|
|
42
|
+
exports.CONTRACT_GATE_SNAPSHOT_SCHEMA_VERSION = __webpack_exports__.CONTRACT_GATE_SNAPSHOT_SCHEMA_VERSION;
|
|
43
|
+
exports.DEFAULT_CONTRACT_GATE_SNAPSHOT_PATH = __webpack_exports__.DEFAULT_CONTRACT_GATE_SNAPSHOT_PATH;
|
|
44
|
+
exports.createFileContractGateSnapshotStore = __webpack_exports__.createFileContractGateSnapshotStore;
|
|
45
|
+
exports.createHttpContractGateSnapshotStore = __webpack_exports__.createHttpContractGateSnapshotStore;
|
|
46
|
+
exports.resolveContractGateSnapshotPath = __webpack_exports__.resolveContractGateSnapshotPath;
|
|
47
|
+
exports.resolveContractGateSnapshotStore = __webpack_exports__.resolveContractGateSnapshotStore;
|
|
48
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
49
|
+
"CONTRACT_GATE_SNAPSHOT_SCHEMA_VERSION",
|
|
50
|
+
"DEFAULT_CONTRACT_GATE_SNAPSHOT_PATH",
|
|
51
|
+
"createFileContractGateSnapshotStore",
|
|
52
|
+
"createHttpContractGateSnapshotStore",
|
|
53
|
+
"resolveContractGateSnapshotPath",
|
|
54
|
+
"resolveContractGateSnapshotStore"
|
|
55
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
56
|
+
Object.defineProperty(exports, '__esModule', {
|
|
57
|
+
value: true
|
|
58
|
+
});
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.n = (module)=>{
|
|
5
|
+
var getter = module && module.__esModule ? ()=>module['default'] : ()=>module;
|
|
6
|
+
__webpack_require__.d(getter, {
|
|
7
|
+
a: getter
|
|
8
|
+
});
|
|
9
|
+
return getter;
|
|
10
|
+
};
|
|
11
|
+
})();
|
|
12
|
+
(()=>{
|
|
13
|
+
__webpack_require__.d = (exports1, getters, values)=>{
|
|
14
|
+
var define = (defs, kind)=>{
|
|
15
|
+
for(var key in defs)if (__webpack_require__.o(defs, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
16
|
+
enumerable: true,
|
|
17
|
+
[kind]: defs[key]
|
|
18
|
+
});
|
|
19
|
+
};
|
|
20
|
+
define(getters, "get");
|
|
21
|
+
define(values, "value");
|
|
22
|
+
};
|
|
23
|
+
})();
|
|
24
|
+
(()=>{
|
|
25
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
26
|
+
})();
|
|
27
|
+
(()=>{
|
|
28
|
+
__webpack_require__.r = (exports1)=>{
|
|
29
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
30
|
+
value: 'Module'
|
|
31
|
+
});
|
|
32
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
33
|
+
value: true
|
|
34
|
+
});
|
|
35
|
+
};
|
|
36
|
+
})();
|
|
37
|
+
var __webpack_exports__ = {};
|
|
38
|
+
__webpack_require__.r(__webpack_exports__);
|
|
39
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
40
|
+
isRecord: ()=>isRecord,
|
|
41
|
+
normalizeSnapshot: ()=>normalizeSnapshot,
|
|
42
|
+
resolveContractGateSnapshotStore: ()=>resolveContractGateSnapshotStore
|
|
43
|
+
});
|
|
44
|
+
const external_node_module_namespaceObject = require("node:module");
|
|
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");
|
|
48
|
+
const external_file_store_js_namespaceObject = require("./file-store.js");
|
|
49
|
+
const external_http_store_js_namespaceObject = require("./http-store.js");
|
|
50
|
+
const external_types_js_namespaceObject = require("./types.js");
|
|
51
|
+
const isRecord = (value)=>'object' == typeof value && null !== value && !Array.isArray(value);
|
|
52
|
+
const normalizeSnapshot = (snapshot)=>{
|
|
53
|
+
if (!isRecord(snapshot)) return;
|
|
54
|
+
const schemaVersion = 'number' == typeof snapshot.schemaVersion ? snapshot.schemaVersion : external_types_js_namespaceObject.CONTRACT_GATE_SNAPSHOT_SCHEMA_VERSION;
|
|
55
|
+
const updatedAt = 'number' == typeof snapshot.updatedAt ? snapshot.updatedAt : Date.now();
|
|
56
|
+
const gates = isRecord(snapshot.gates) ? snapshot.gates : {};
|
|
57
|
+
return {
|
|
58
|
+
schemaVersion,
|
|
59
|
+
updatedAt,
|
|
60
|
+
gates
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
const pickStoreFactory = (mod)=>{
|
|
64
|
+
if ('function' == typeof mod) return mod;
|
|
65
|
+
if ('function' == typeof mod.createContractGateSnapshotStore) return mod.createContractGateSnapshotStore;
|
|
66
|
+
if ('function' == typeof mod.default) return mod.default;
|
|
67
|
+
if (mod.default && 'object' == typeof mod.default && 'function' == typeof mod.default.createContractGateSnapshotStore) return mod.default.createContractGateSnapshotStore;
|
|
68
|
+
};
|
|
69
|
+
const ensureStoreShape = (store, modulePath)=>{
|
|
70
|
+
if (!store || 'object' != typeof store || 'function' != typeof store.readSnapshot || 'function' != typeof store.writeSnapshot) throw new Error(`Invalid contract gate snapshot store from "${modulePath}". Expected { readSnapshot(), writeSnapshot() }.`);
|
|
71
|
+
};
|
|
72
|
+
const resolveStoreModulePath = (appDirectory, modulePath)=>{
|
|
73
|
+
const normalized = modulePath.trim();
|
|
74
|
+
if (!normalized) throw new Error('Contract gate snapshot stateStore.module must be non-empty');
|
|
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'));
|
|
78
|
+
try {
|
|
79
|
+
return appRequire.resolve(normalized);
|
|
80
|
+
} catch (_error) {
|
|
81
|
+
return normalized;
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
const toStoreModuleImportSpecifier = (modulePath)=>external_node_path_default().isAbsolute(modulePath) ? (0, external_node_url_namespaceObject.pathToFileURL)(modulePath).href : modulePath;
|
|
85
|
+
const resolveContractGateSnapshotStore = async (input)=>{
|
|
86
|
+
const { appDirectory, gateSnapshotPath, stateStore, logger } = input;
|
|
87
|
+
if (!stateStore?.module) return (0, external_file_store_js_namespaceObject.createFileContractGateSnapshotStore)(gateSnapshotPath);
|
|
88
|
+
const builtinStore = (0, external_http_store_js_namespaceObject.tryResolveBuiltinSnapshotStore)({
|
|
89
|
+
stateStore
|
|
90
|
+
});
|
|
91
|
+
if (builtinStore) {
|
|
92
|
+
logger?.info?.(`[telemetry.canary.autopilot] using built-in contract gate snapshot store "${builtinStore.name}"`);
|
|
93
|
+
return builtinStore;
|
|
94
|
+
}
|
|
95
|
+
const modulePath = resolveStoreModulePath(appDirectory, stateStore.module);
|
|
96
|
+
let mod;
|
|
97
|
+
try {
|
|
98
|
+
mod = await import(toStoreModuleImportSpecifier(modulePath));
|
|
99
|
+
} catch (error) {
|
|
100
|
+
throw new Error(`[telemetry.canary.autopilot] Failed to load stateStore.module "${stateStore.module}" (${modulePath}): ${error instanceof Error ? error.message : String(error)}`);
|
|
101
|
+
}
|
|
102
|
+
const factory = pickStoreFactory(mod);
|
|
103
|
+
if (!factory) throw new Error(`[telemetry.canary.autopilot] stateStore.module "${stateStore.module}" does not export createContractGateSnapshotStore()`);
|
|
104
|
+
const store = await factory({
|
|
105
|
+
appDirectory,
|
|
106
|
+
gateSnapshotPath,
|
|
107
|
+
options: stateStore.options,
|
|
108
|
+
logger
|
|
109
|
+
});
|
|
110
|
+
ensureStoreShape(store, modulePath);
|
|
111
|
+
logger?.info?.(`[telemetry.canary.autopilot] using contract gate snapshot store "${store.name || modulePath}"`);
|
|
112
|
+
return store;
|
|
113
|
+
};
|
|
114
|
+
exports.isRecord = __webpack_exports__.isRecord;
|
|
115
|
+
exports.normalizeSnapshot = __webpack_exports__.normalizeSnapshot;
|
|
116
|
+
exports.resolveContractGateSnapshotStore = __webpack_exports__.resolveContractGateSnapshotStore;
|
|
117
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
118
|
+
"isRecord",
|
|
119
|
+
"normalizeSnapshot",
|
|
120
|
+
"resolveContractGateSnapshotStore"
|
|
121
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
122
|
+
Object.defineProperty(exports, '__esModule', {
|
|
123
|
+
value: true
|
|
124
|
+
});
|
|
@@ -0,0 +1,44 @@
|
|
|
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 CONTRACT_GATE_SNAPSHOT_SCHEMA_VERSION = 1;
|
|
31
|
+
const DEFAULT_CONTRACT_GATE_SNAPSHOT_PATH = '.modern/contract-gates.json';
|
|
32
|
+
__webpack_require__.d(__webpack_exports__, {}, {
|
|
33
|
+
CONTRACT_GATE_SNAPSHOT_SCHEMA_VERSION: CONTRACT_GATE_SNAPSHOT_SCHEMA_VERSION,
|
|
34
|
+
DEFAULT_CONTRACT_GATE_SNAPSHOT_PATH: DEFAULT_CONTRACT_GATE_SNAPSHOT_PATH
|
|
35
|
+
});
|
|
36
|
+
exports.CONTRACT_GATE_SNAPSHOT_SCHEMA_VERSION = __webpack_exports__.CONTRACT_GATE_SNAPSHOT_SCHEMA_VERSION;
|
|
37
|
+
exports.DEFAULT_CONTRACT_GATE_SNAPSHOT_PATH = __webpack_exports__.DEFAULT_CONTRACT_GATE_SNAPSHOT_PATH;
|
|
38
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
39
|
+
"CONTRACT_GATE_SNAPSHOT_SCHEMA_VERSION",
|
|
40
|
+
"DEFAULT_CONTRACT_GATE_SNAPSHOT_PATH"
|
|
41
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
42
|
+
Object.defineProperty(exports, '__esModule', {
|
|
43
|
+
value: true
|
|
44
|
+
});
|