@probelabs/visor 0.1.160 → 0.1.161
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/index.js +4 -4
- package/dist/output/traces/{run-2026-03-05T18-38-19-897Z.ndjson → run-2026-03-05T18-29-54-862Z.ndjson} +84 -84
- package/dist/output/traces/{run-2026-03-05T18-39-04-213Z.ndjson → run-2026-03-05T18-30-40-487Z.ndjson} +1909 -1909
- package/dist/sdk/{check-provider-registry-KSXUR6EX.mjs → check-provider-registry-2MAOQF2B.mjs} +5 -5
- package/dist/sdk/{check-provider-registry-CZLHVHZZ.mjs → check-provider-registry-ZNIJMJWI.mjs} +5 -5
- package/dist/sdk/{chunk-A3B4LEGZ.mjs → chunk-2EZB4TRC.mjs} +111 -22
- package/dist/sdk/{chunk-A3B4LEGZ.mjs.map → chunk-2EZB4TRC.mjs.map} +1 -1
- package/dist/sdk/{chunk-CBCL664N.mjs → chunk-5KLQGCES.mjs} +15 -15
- package/dist/sdk/{chunk-ITZWA2RF.mjs → chunk-NAXSBNGB.mjs} +2 -2
- package/dist/sdk/{chunk-ZQ7T4YX7.mjs → chunk-TF2VJDNY.mjs} +2 -2
- package/dist/sdk/{chunk-ZQ7T4YX7.mjs.map → chunk-TF2VJDNY.mjs.map} +1 -1
- package/dist/sdk/{chunk-QSY3XLA3.mjs → chunk-VQS6XM3Q.mjs} +3 -3
- package/dist/sdk/{failure-condition-evaluator-5DJZEGYT.mjs → failure-condition-evaluator-KTWLQST4.mjs} +3 -3
- package/dist/sdk/{github-frontend-4FQRZSJN.mjs → github-frontend-3PR72CSI.mjs} +3 -3
- package/dist/sdk/{host-VJWSCD7X.mjs → host-KF5EPYKE.mjs} +2 -2
- package/dist/sdk/{routing-7JFYIXHU.mjs → routing-5LUAMF4E.mjs} +4 -4
- package/dist/sdk/{schedule-tool-2UDBXPLN.mjs → schedule-tool-5UX6KTFV.mjs} +5 -5
- package/dist/sdk/{schedule-tool-Y2R3YZL6.mjs → schedule-tool-6VZPH74P.mjs} +5 -5
- package/dist/sdk/{schedule-tool-handler-5FGL2VQ5.mjs → schedule-tool-handler-BUP7XMCC.mjs} +5 -5
- package/dist/sdk/{schedule-tool-handler-7RWPVVKD.mjs → schedule-tool-handler-VHPJ7DXR.mjs} +5 -5
- package/dist/sdk/sdk.js +1 -1
- package/dist/sdk/sdk.js.map +1 -1
- package/dist/sdk/sdk.mjs +4 -4
- package/dist/sdk/{trace-helpers-VPGAR5ZR.mjs → trace-helpers-2VPLZ4PY.mjs} +2 -2
- package/dist/sdk/{workflow-check-provider-23RPALNF.mjs → workflow-check-provider-QVLCGTVA.mjs} +5 -5
- package/dist/sdk/{workflow-check-provider-QSFEPL6Z.mjs → workflow-check-provider-ZZDIPHGY.mjs} +5 -5
- package/dist/traces/{run-2026-03-05T18-38-19-897Z.ndjson → run-2026-03-05T18-29-54-862Z.ndjson} +84 -84
- package/dist/traces/{run-2026-03-05T18-39-04-213Z.ndjson → run-2026-03-05T18-30-40-487Z.ndjson} +1909 -1909
- package/package.json +1 -1
- package/dist/sdk/chunk-5YC7JCOE.mjs +0 -739
- package/dist/sdk/chunk-HB2PBNBH.mjs +0 -1502
- package/dist/sdk/chunk-ITZWA2RF.mjs.map +0 -1
- package/dist/sdk/chunk-QSY3XLA3.mjs.map +0 -1
- package/dist/sdk/chunk-WYD5ISLQ.mjs +0 -443
- package/dist/sdk/chunk-WYD5ISLQ.mjs.map +0 -1
- package/dist/sdk/failure-condition-evaluator-MX6RHBVS.mjs +0 -17
- package/dist/sdk/github-frontend-TJ6TGLUW.mjs +0 -1368
- package/dist/sdk/github-frontend-TJ6TGLUW.mjs.map +0 -1
- package/dist/sdk/host-YZA5S2U2.mjs +0 -63
- package/dist/sdk/host-YZA5S2U2.mjs.map +0 -1
- package/dist/sdk/routing-WPBWIPF4.mjs +0 -25
- package/dist/sdk/trace-helpers-W572V66T.mjs +0 -25
- package/dist/sdk/trace-helpers-W572V66T.mjs.map +0 -1
- package/dist/sdk/workflow-check-provider-23RPALNF.mjs.map +0 -1
- package/dist/sdk/workflow-check-provider-QSFEPL6Z.mjs.map +0 -1
- /package/dist/sdk/{check-provider-registry-CZLHVHZZ.mjs.map → check-provider-registry-2MAOQF2B.mjs.map} +0 -0
- /package/dist/sdk/{check-provider-registry-KSXUR6EX.mjs.map → check-provider-registry-ZNIJMJWI.mjs.map} +0 -0
- /package/dist/sdk/{chunk-CBCL664N.mjs.map → chunk-5KLQGCES.mjs.map} +0 -0
- /package/dist/sdk/{chunk-5YC7JCOE.mjs.map → chunk-NAXSBNGB.mjs.map} +0 -0
- /package/dist/sdk/{chunk-HB2PBNBH.mjs.map → chunk-VQS6XM3Q.mjs.map} +0 -0
- /package/dist/sdk/{failure-condition-evaluator-5DJZEGYT.mjs.map → failure-condition-evaluator-KTWLQST4.mjs.map} +0 -0
- /package/dist/sdk/{github-frontend-4FQRZSJN.mjs.map → github-frontend-3PR72CSI.mjs.map} +0 -0
- /package/dist/sdk/{host-VJWSCD7X.mjs.map → host-KF5EPYKE.mjs.map} +0 -0
- /package/dist/sdk/{failure-condition-evaluator-MX6RHBVS.mjs.map → routing-5LUAMF4E.mjs.map} +0 -0
- /package/dist/sdk/{routing-7JFYIXHU.mjs.map → schedule-tool-5UX6KTFV.mjs.map} +0 -0
- /package/dist/sdk/{routing-WPBWIPF4.mjs.map → schedule-tool-6VZPH74P.mjs.map} +0 -0
- /package/dist/sdk/{schedule-tool-2UDBXPLN.mjs.map → schedule-tool-handler-BUP7XMCC.mjs.map} +0 -0
- /package/dist/sdk/{schedule-tool-Y2R3YZL6.mjs.map → schedule-tool-handler-VHPJ7DXR.mjs.map} +0 -0
- /package/dist/sdk/{schedule-tool-handler-5FGL2VQ5.mjs.map → trace-helpers-2VPLZ4PY.mjs.map} +0 -0
- /package/dist/sdk/{schedule-tool-handler-7RWPVVKD.mjs.map → workflow-check-provider-QVLCGTVA.mjs.map} +0 -0
- /package/dist/sdk/{trace-helpers-VPGAR5ZR.mjs.map → workflow-check-provider-ZZDIPHGY.mjs.map} +0 -0
package/dist/sdk/{check-provider-registry-KSXUR6EX.mjs → check-provider-registry-2MAOQF2B.mjs}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CheckProviderRegistry,
|
|
3
3
|
init_check_provider_registry
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-5KLQGCES.mjs";
|
|
5
5
|
import "./chunk-KFKHU6CM.mjs";
|
|
6
6
|
import "./chunk-AVMMKGLQ.mjs";
|
|
7
7
|
import "./chunk-LG4AUKHB.mjs";
|
|
@@ -11,9 +11,9 @@ import "./chunk-GEW6LS32.mjs";
|
|
|
11
11
|
import "./chunk-NZADFXHE.mjs";
|
|
12
12
|
import "./chunk-AS6LIEO4.mjs";
|
|
13
13
|
import "./chunk-NCWIZVOT.mjs";
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-VQS6XM3Q.mjs";
|
|
15
|
+
import "./chunk-NAXSBNGB.mjs";
|
|
16
|
+
import "./chunk-TF2VJDNY.mjs";
|
|
17
17
|
import "./chunk-JL7JXCET.mjs";
|
|
18
18
|
import "./chunk-ZUEQNCKB.mjs";
|
|
19
19
|
import "./chunk-25IC7KXZ.mjs";
|
|
@@ -26,4 +26,4 @@ init_check_provider_registry();
|
|
|
26
26
|
export {
|
|
27
27
|
CheckProviderRegistry
|
|
28
28
|
};
|
|
29
|
-
//# sourceMappingURL=check-provider-registry-
|
|
29
|
+
//# sourceMappingURL=check-provider-registry-2MAOQF2B.mjs.map
|
package/dist/sdk/{check-provider-registry-CZLHVHZZ.mjs → check-provider-registry-ZNIJMJWI.mjs}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CheckProviderRegistry,
|
|
3
3
|
init_check_provider_registry
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-2EZB4TRC.mjs";
|
|
5
5
|
import "./chunk-KFKHU6CM.mjs";
|
|
6
6
|
import "./chunk-AVMMKGLQ.mjs";
|
|
7
7
|
import "./chunk-LG4AUKHB.mjs";
|
|
@@ -11,9 +11,9 @@ import "./chunk-GEW6LS32.mjs";
|
|
|
11
11
|
import "./chunk-NZADFXHE.mjs";
|
|
12
12
|
import "./chunk-AS6LIEO4.mjs";
|
|
13
13
|
import "./chunk-NCWIZVOT.mjs";
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-2LL6GIEU.mjs";
|
|
15
|
+
import "./chunk-HT3EFZ75.mjs";
|
|
16
|
+
import "./chunk-CYIKOFJZ.mjs";
|
|
17
17
|
import "./chunk-JL7JXCET.mjs";
|
|
18
18
|
import "./chunk-ZUEQNCKB.mjs";
|
|
19
19
|
import "./chunk-25IC7KXZ.mjs";
|
|
@@ -26,4 +26,4 @@ init_check_provider_registry();
|
|
|
26
26
|
export {
|
|
27
27
|
CheckProviderRegistry
|
|
28
28
|
};
|
|
29
|
-
//# sourceMappingURL=check-provider-registry-
|
|
29
|
+
//# sourceMappingURL=check-provider-registry-ZNIJMJWI.mjs.map
|
|
@@ -42,11 +42,11 @@ import {
|
|
|
42
42
|
init_routing,
|
|
43
43
|
init_snapshot_store,
|
|
44
44
|
snapshot_store_exports
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-2LL6GIEU.mjs";
|
|
46
46
|
import {
|
|
47
47
|
FailureConditionEvaluator,
|
|
48
48
|
init_failure_condition_evaluator
|
|
49
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-HT3EFZ75.mjs";
|
|
50
50
|
import {
|
|
51
51
|
addEvent,
|
|
52
52
|
emitNdjsonFallback,
|
|
@@ -57,7 +57,7 @@ import {
|
|
|
57
57
|
setSpanAttributes,
|
|
58
58
|
trace_helpers_exports,
|
|
59
59
|
withActiveSpan
|
|
60
|
-
} from "./chunk-
|
|
60
|
+
} from "./chunk-CYIKOFJZ.mjs";
|
|
61
61
|
import {
|
|
62
62
|
addDiagramBlock,
|
|
63
63
|
init_metrics
|
|
@@ -3959,7 +3959,7 @@ async function executeWorkflowAsTool(workflowId, args, context2, argsOverrides)
|
|
|
3959
3959
|
...args,
|
|
3960
3960
|
...argsOverrides
|
|
3961
3961
|
};
|
|
3962
|
-
const { WorkflowCheckProvider: WorkflowCheckProvider2 } = await import("./workflow-check-provider-
|
|
3962
|
+
const { WorkflowCheckProvider: WorkflowCheckProvider2 } = await import("./workflow-check-provider-ZZDIPHGY.mjs");
|
|
3963
3963
|
const provider = new WorkflowCheckProvider2();
|
|
3964
3964
|
const checkConfig = {
|
|
3965
3965
|
type: "workflow",
|
|
@@ -9255,7 +9255,7 @@ async function executeCheckWithForEachItems2(checkId, forEachParent, forEachItem
|
|
|
9255
9255
|
}
|
|
9256
9256
|
}
|
|
9257
9257
|
try {
|
|
9258
|
-
const { evaluateTransitions } = await import("./routing-
|
|
9258
|
+
const { evaluateTransitions } = await import("./routing-GGZBWOLZ.mjs");
|
|
9259
9259
|
const transTarget = await evaluateTransitions(
|
|
9260
9260
|
onFinish.transitions,
|
|
9261
9261
|
forEachParent,
|
|
@@ -9315,7 +9315,7 @@ async function executeCheckWithForEachItems2(checkId, forEachParent, forEachItem
|
|
|
9315
9315
|
`[LevelDispatch] Error evaluating on_finish transitions for ${forEachParent}: ${e instanceof Error ? e.message : String(e)}`
|
|
9316
9316
|
);
|
|
9317
9317
|
}
|
|
9318
|
-
const { evaluateGoto: evaluateGoto2 } = await import("./routing-
|
|
9318
|
+
const { evaluateGoto: evaluateGoto2 } = await import("./routing-GGZBWOLZ.mjs");
|
|
9319
9319
|
if (context2.debug) {
|
|
9320
9320
|
logger.info(
|
|
9321
9321
|
`[LevelDispatch] Evaluating on_finish.goto_js for forEach parent: ${forEachParent}`
|
|
@@ -13027,7 +13027,7 @@ var init_state_machine_execution_engine = __esm({
|
|
|
13027
13027
|
try {
|
|
13028
13028
|
const map = options?.webhookContext?.webhookData;
|
|
13029
13029
|
if (map) {
|
|
13030
|
-
const { CheckProviderRegistry: CheckProviderRegistry2 } = await import("./check-provider-registry-
|
|
13030
|
+
const { CheckProviderRegistry: CheckProviderRegistry2 } = await import("./check-provider-registry-ZNIJMJWI.mjs");
|
|
13031
13031
|
const reg = CheckProviderRegistry2.getInstance();
|
|
13032
13032
|
const p = reg.getProvider("http_input");
|
|
13033
13033
|
if (p && typeof p.setWebhookContext === "function") p.setWebhookContext(map);
|
|
@@ -13150,7 +13150,7 @@ var init_state_machine_execution_engine = __esm({
|
|
|
13150
13150
|
tag_filter: tagFilter
|
|
13151
13151
|
} : config;
|
|
13152
13152
|
try {
|
|
13153
|
-
const { CheckProviderRegistry: CheckProviderRegistry2 } = await import("./check-provider-registry-
|
|
13153
|
+
const { CheckProviderRegistry: CheckProviderRegistry2 } = await import("./check-provider-registry-ZNIJMJWI.mjs");
|
|
13154
13154
|
const registry = CheckProviderRegistry2.getInstance();
|
|
13155
13155
|
registry.setCustomTools(configWithTagFilter.tools || {});
|
|
13156
13156
|
} catch (error) {
|
|
@@ -13214,7 +13214,7 @@ var init_state_machine_execution_engine = __esm({
|
|
|
13214
13214
|
try {
|
|
13215
13215
|
const webhookData = this.executionContext?.webhookContext?.webhookData;
|
|
13216
13216
|
if (webhookData instanceof Map) {
|
|
13217
|
-
const { extractSlackContext: extractSlackContext2 } = await import("./schedule-tool-handler-
|
|
13217
|
+
const { extractSlackContext: extractSlackContext2 } = await import("./schedule-tool-handler-BUP7XMCC.mjs");
|
|
13218
13218
|
const slackCtx = extractSlackContext2(webhookData);
|
|
13219
13219
|
if (slackCtx) {
|
|
13220
13220
|
const payload = Array.from(webhookData.values())[0];
|
|
@@ -13243,7 +13243,7 @@ var init_state_machine_execution_engine = __esm({
|
|
|
13243
13243
|
if (Array.isArray(configWithTagFilter.frontends) && configWithTagFilter.frontends.length > 0) {
|
|
13244
13244
|
try {
|
|
13245
13245
|
const { EventBus } = await import("./event-bus-5K3Y2FCS.mjs");
|
|
13246
|
-
const { FrontendsHost } = await import("./host-
|
|
13246
|
+
const { FrontendsHost } = await import("./host-FB2HG74L.mjs");
|
|
13247
13247
|
const bus = new EventBus();
|
|
13248
13248
|
context2.eventBus = bus;
|
|
13249
13249
|
frontendsHost = new FrontendsHost(bus, logger);
|
|
@@ -13593,9 +13593,9 @@ var init_state_machine_execution_engine = __esm({
|
|
|
13593
13593
|
* @returns Array of failure condition evaluation results
|
|
13594
13594
|
*/
|
|
13595
13595
|
async evaluateFailureConditions(checkName, reviewSummary, config, previousOutputs, authorAssociation) {
|
|
13596
|
-
const { FailureConditionEvaluator: FailureConditionEvaluator2 } = await import("./failure-condition-evaluator-
|
|
13596
|
+
const { FailureConditionEvaluator: FailureConditionEvaluator2 } = await import("./failure-condition-evaluator-3Q45T5EW.mjs");
|
|
13597
13597
|
const evaluator = new FailureConditionEvaluator2();
|
|
13598
|
-
const { addEvent: addEvent3 } = await import("./trace-helpers-
|
|
13598
|
+
const { addEvent: addEvent3 } = await import("./trace-helpers-AXJZLLWE.mjs");
|
|
13599
13599
|
const { addFailIfTriggered } = await import("./metrics-I6A7IHG4.mjs");
|
|
13600
13600
|
const checkConfig = config.checks?.[checkName];
|
|
13601
13601
|
if (!checkConfig) {
|
|
@@ -40728,8 +40728,8 @@ function buildBuiltinGlobals(opts) {
|
|
|
40728
40728
|
const asyncFunctionNames = /* @__PURE__ */ new Set();
|
|
40729
40729
|
const scheduleFn = async (args = {}) => {
|
|
40730
40730
|
try {
|
|
40731
|
-
const { handleScheduleAction: handleScheduleAction2, buildScheduleToolContext: buildScheduleToolContext2 } = await import("./schedule-tool-
|
|
40732
|
-
const { extractSlackContext: extractSlackContext2 } = await import("./schedule-tool-handler-
|
|
40731
|
+
const { handleScheduleAction: handleScheduleAction2, buildScheduleToolContext: buildScheduleToolContext2 } = await import("./schedule-tool-6VZPH74P.mjs");
|
|
40732
|
+
const { extractSlackContext: extractSlackContext2 } = await import("./schedule-tool-handler-BUP7XMCC.mjs");
|
|
40733
40733
|
const parentCtx = opts.sessionInfo?._parentContext;
|
|
40734
40734
|
const webhookData = parentCtx?.prInfo?.eventContext?.webhookData;
|
|
40735
40735
|
const visorCfg = parentCtx?.config;
|
|
@@ -43229,24 +43229,113 @@ var init_workflow_check_provider = __esm({
|
|
|
43229
43229
|
const parentInputs = config.workflowInputs || {};
|
|
43230
43230
|
const basePath = config.basePath || config._parentContext?.originalWorkingDirectory || config._parentContext?.workingDirectory || process.cwd();
|
|
43231
43231
|
const loadConfigLiquid = createExtendedLiquid();
|
|
43232
|
+
const deepMerge = (base, override) => {
|
|
43233
|
+
if (!base || !override || typeof base !== "object" || typeof override !== "object" || Array.isArray(base) || Array.isArray(override)) {
|
|
43234
|
+
return override;
|
|
43235
|
+
}
|
|
43236
|
+
const result = { ...base };
|
|
43237
|
+
for (const key of Object.keys(override)) {
|
|
43238
|
+
if (key in result && typeof result[key] === "object" && result[key] !== null && !Array.isArray(result[key]) && typeof override[key] === "object" && override[key] !== null && !Array.isArray(override[key])) {
|
|
43239
|
+
result[key] = deepMerge(result[key], override[key]);
|
|
43240
|
+
} else {
|
|
43241
|
+
result[key] = override[key];
|
|
43242
|
+
}
|
|
43243
|
+
}
|
|
43244
|
+
return result;
|
|
43245
|
+
};
|
|
43246
|
+
const resolveVisorPath = (filePath) => {
|
|
43247
|
+
if (!filePath.startsWith("visor://") && !filePath.startsWith("visor-ee://")) {
|
|
43248
|
+
return null;
|
|
43249
|
+
}
|
|
43250
|
+
const relativePath = filePath.replace(/^visor(?:-ee)?:\/\//, "");
|
|
43251
|
+
const candidates = [
|
|
43252
|
+
path14.resolve(__dirname, "..", "defaults"),
|
|
43253
|
+
path14.resolve(__dirname, "..", "..", "defaults")
|
|
43254
|
+
];
|
|
43255
|
+
let defaultsDir;
|
|
43256
|
+
for (const candidate of candidates) {
|
|
43257
|
+
if (__require("fs").existsSync(candidate)) {
|
|
43258
|
+
defaultsDir = candidate;
|
|
43259
|
+
break;
|
|
43260
|
+
}
|
|
43261
|
+
}
|
|
43262
|
+
if (!defaultsDir) {
|
|
43263
|
+
throw new Error(`loadConfig: cannot find defaults directory for visor:// paths`);
|
|
43264
|
+
}
|
|
43265
|
+
const resolved = path14.resolve(defaultsDir, relativePath);
|
|
43266
|
+
if (!resolved.startsWith(defaultsDir + path14.sep) && resolved !== defaultsDir) {
|
|
43267
|
+
throw new Error(`loadConfig: visor:// path escapes defaults directory`);
|
|
43268
|
+
}
|
|
43269
|
+
return { resolvedPath: resolved, configDir: path14.dirname(resolved) };
|
|
43270
|
+
};
|
|
43271
|
+
let loadConfigCallDepth = 0;
|
|
43272
|
+
const resolveExpressions = (value, depth) => {
|
|
43273
|
+
if (depth > 10) {
|
|
43274
|
+
throw new Error("loadConfig: maximum expression nesting depth (10) exceeded");
|
|
43275
|
+
}
|
|
43276
|
+
if (Array.isArray(value)) {
|
|
43277
|
+
return value.map((item) => resolveExpressions(item, depth + 1));
|
|
43278
|
+
}
|
|
43279
|
+
if (value && typeof value === "object" && !Array.isArray(value)) {
|
|
43280
|
+
const obj = value;
|
|
43281
|
+
const keys = Object.keys(obj);
|
|
43282
|
+
if (keys.length === 1 && keys[0] === "expression" && typeof obj.expression === "string") {
|
|
43283
|
+
const sandbox = createSecureSandbox();
|
|
43284
|
+
const result2 = compileAndRun(sandbox, obj.expression, templateContext, {
|
|
43285
|
+
injectLog: true,
|
|
43286
|
+
logPrefix: "loadConfig.expression"
|
|
43287
|
+
});
|
|
43288
|
+
return resolveExpressions(result2, depth + 1);
|
|
43289
|
+
}
|
|
43290
|
+
if ("extends" in obj && typeof obj.extends === "string") {
|
|
43291
|
+
const extendsPath = obj.extends;
|
|
43292
|
+
const overrideObj = { ...obj };
|
|
43293
|
+
delete overrideObj.extends;
|
|
43294
|
+
const resolvedOverride = resolveExpressions(overrideObj, depth + 1);
|
|
43295
|
+
const baseConfig = loadConfig(extendsPath);
|
|
43296
|
+
return deepMerge(baseConfig, resolvedOverride);
|
|
43297
|
+
}
|
|
43298
|
+
const result = {};
|
|
43299
|
+
for (const [k, v] of Object.entries(obj)) {
|
|
43300
|
+
result[k] = resolveExpressions(v, depth + 1);
|
|
43301
|
+
}
|
|
43302
|
+
return result;
|
|
43303
|
+
}
|
|
43304
|
+
return value;
|
|
43305
|
+
};
|
|
43232
43306
|
const loadConfig = (filePath) => {
|
|
43233
43307
|
try {
|
|
43234
|
-
|
|
43235
|
-
|
|
43236
|
-
|
|
43237
|
-
|
|
43238
|
-
|
|
43308
|
+
loadConfigCallDepth++;
|
|
43309
|
+
if (loadConfigCallDepth > 10) {
|
|
43310
|
+
throw new Error("maximum loadConfig nesting depth (10) exceeded");
|
|
43311
|
+
}
|
|
43312
|
+
let resolvedPath;
|
|
43313
|
+
let configDir;
|
|
43314
|
+
const visorResolved = resolveVisorPath(filePath);
|
|
43315
|
+
if (visorResolved) {
|
|
43316
|
+
resolvedPath = visorResolved.resolvedPath;
|
|
43317
|
+
configDir = visorResolved.configDir;
|
|
43318
|
+
} else {
|
|
43319
|
+
const normalizedBasePath = path14.normalize(basePath);
|
|
43320
|
+
resolvedPath = path14.isAbsolute(filePath) ? path14.normalize(filePath) : path14.normalize(path14.resolve(basePath, filePath));
|
|
43321
|
+
const basePathWithSep = normalizedBasePath.endsWith(path14.sep) ? normalizedBasePath : normalizedBasePath + path14.sep;
|
|
43322
|
+
if (!resolvedPath.startsWith(basePathWithSep) && resolvedPath !== normalizedBasePath) {
|
|
43323
|
+
throw new Error(`Path '${filePath}' escapes base directory`);
|
|
43324
|
+
}
|
|
43325
|
+
configDir = path14.dirname(resolvedPath);
|
|
43239
43326
|
}
|
|
43240
|
-
const configDir = path14.dirname(resolvedPath);
|
|
43241
43327
|
const rawContent = __require("fs").readFileSync(resolvedPath, "utf-8");
|
|
43242
43328
|
const renderedContent = loadConfigLiquid.parseAndRenderSync(rawContent, {
|
|
43243
43329
|
basePath: configDir
|
|
43244
43330
|
});
|
|
43245
|
-
|
|
43331
|
+
const parsed = yaml.load(renderedContent, { schema: yaml.JSON_SCHEMA });
|
|
43332
|
+
return resolveExpressions(parsed, 0);
|
|
43246
43333
|
} catch (error) {
|
|
43247
43334
|
const msg = error instanceof Error ? error.message : String(error);
|
|
43248
43335
|
logger.error(`[WorkflowProvider] loadConfig failed for '${filePath}': ${msg}`);
|
|
43249
43336
|
throw new Error(`loadConfig('${filePath}') failed: ${msg}`);
|
|
43337
|
+
} finally {
|
|
43338
|
+
loadConfigCallDepth--;
|
|
43250
43339
|
}
|
|
43251
43340
|
};
|
|
43252
43341
|
const templateContext = {
|
|
@@ -43777,4 +43866,4 @@ undici/lib/fetch/body.js:
|
|
|
43777
43866
|
undici/lib/websocket/frame.js:
|
|
43778
43867
|
(*! ws. MIT License. Einar Otto Stangvik <einaros@gmail.com> *)
|
|
43779
43868
|
*/
|
|
43780
|
-
//# sourceMappingURL=chunk-
|
|
43869
|
+
//# sourceMappingURL=chunk-2EZB4TRC.mjs.map
|