@probelabs/visor 0.1.97 → 0.1.98
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/README.md +14 -14
- package/defaults/.visor.yaml +3 -2
- package/dist/check-execution-engine.d.ts.map +1 -1
- package/dist/config.d.ts +5 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/defaults/.visor.yaml +3 -2
- package/dist/generated/config-schema.d.ts +6 -2
- package/dist/generated/config-schema.d.ts.map +1 -1
- package/dist/generated/config-schema.json +5 -2
- package/dist/index.js +69 -13
- package/dist/sdk/{check-execution-engine-S7BFPVWA.mjs → check-execution-engine-W5FLIWZL.mjs} +2 -2
- package/dist/sdk/{chunk-4VK6WTYU.mjs → chunk-POYXI3MQ.mjs} +2 -2
- package/dist/sdk/{chunk-4VK6WTYU.mjs.map → chunk-POYXI3MQ.mjs.map} +1 -1
- package/dist/sdk/sdk.d.mts +4 -2
- package/dist/sdk/sdk.d.ts +4 -2
- package/dist/sdk/sdk.js +48 -9
- package/dist/sdk/sdk.js.map +1 -1
- package/dist/sdk/sdk.mjs +49 -10
- package/dist/sdk/sdk.mjs.map +1 -1
- package/dist/types/config.d.ts +4 -2
- package/dist/types/config.d.ts.map +1 -1
- package/dist/utils/config-loader.d.ts +5 -0
- package/dist/utils/config-loader.d.ts.map +1 -1
- package/package.json +1 -1
- /package/dist/output/traces/{run-2025-10-19T14-24-36-341Z.ndjson → run-2025-10-19T19-05-29-328Z.ndjson} +0 -0
- /package/dist/output/traces/{run-2025-10-19T14-24-48-674Z.ndjson → run-2025-10-19T19-05-42-253Z.ndjson} +0 -0
- /package/dist/output/traces/{run-2025-10-19T14-24-49-238Z.ndjson → run-2025-10-19T19-05-42-805Z.ndjson} +0 -0
- /package/dist/output/traces/{run-2025-10-19T14-24-49-761Z.ndjson → run-2025-10-19T19-05-43-323Z.ndjson} +0 -0
- /package/dist/output/traces/{run-2025-10-19T14-24-50-279Z.ndjson → run-2025-10-19T19-05-43-841Z.ndjson} +0 -0
- /package/dist/sdk/{check-execution-engine-S7BFPVWA.mjs.map → check-execution-engine-W5FLIWZL.mjs.map} +0 -0
- /package/dist/traces/{run-2025-10-19T14-24-36-341Z.ndjson → run-2025-10-19T19-05-29-328Z.ndjson} +0 -0
- /package/dist/traces/{run-2025-10-19T14-24-48-674Z.ndjson → run-2025-10-19T19-05-42-253Z.ndjson} +0 -0
- /package/dist/traces/{run-2025-10-19T14-24-49-238Z.ndjson → run-2025-10-19T19-05-42-805Z.ndjson} +0 -0
- /package/dist/traces/{run-2025-10-19T14-24-49-761Z.ndjson → run-2025-10-19T19-05-43-323Z.ndjson} +0 -0
- /package/dist/traces/{run-2025-10-19T14-24-50-279Z.ndjson → run-2025-10-19T19-05-43-841Z.ndjson} +0 -0
package/dist/sdk/sdk.d.mts
CHANGED
|
@@ -538,8 +538,10 @@ interface VisorConfig {
|
|
|
538
538
|
version: string;
|
|
539
539
|
/** Extends from other configurations - can be file path, HTTP(S) URL, or "default" */
|
|
540
540
|
extends?: string | string[];
|
|
541
|
-
/**
|
|
542
|
-
|
|
541
|
+
/** Step configurations (recommended) */
|
|
542
|
+
steps?: Record<string, CheckConfig>;
|
|
543
|
+
/** Check configurations (legacy, use 'steps' instead) - always populated after normalization */
|
|
544
|
+
checks?: Record<string, CheckConfig>;
|
|
543
545
|
/** Output configuration */
|
|
544
546
|
output: OutputConfig;
|
|
545
547
|
/** HTTP server configuration for receiving webhooks */
|
package/dist/sdk/sdk.d.ts
CHANGED
|
@@ -538,8 +538,10 @@ interface VisorConfig {
|
|
|
538
538
|
version: string;
|
|
539
539
|
/** Extends from other configurations - can be file path, HTTP(S) URL, or "default" */
|
|
540
540
|
extends?: string | string[];
|
|
541
|
-
/**
|
|
542
|
-
|
|
541
|
+
/** Step configurations (recommended) */
|
|
542
|
+
steps?: Record<string, CheckConfig>;
|
|
543
|
+
/** Check configurations (legacy, use 'steps' instead) - always populated after normalization */
|
|
544
|
+
checks?: Record<string, CheckConfig>;
|
|
543
545
|
/** Output configuration */
|
|
544
546
|
output: OutputConfig;
|
|
545
547
|
/** HTTP server configuration for receiving webhooks */
|
package/dist/sdk/sdk.js
CHANGED
|
@@ -14834,9 +14834,13 @@ var init_config_schema = __esm({
|
|
|
14834
14834
|
],
|
|
14835
14835
|
description: 'Extends from other configurations - can be file path, HTTP(S) URL, or "default"'
|
|
14836
14836
|
},
|
|
14837
|
+
steps: {
|
|
14838
|
+
$ref: "#/definitions/Record%3Cstring%2CCheckConfig%3E",
|
|
14839
|
+
description: "Step configurations (recommended)"
|
|
14840
|
+
},
|
|
14837
14841
|
checks: {
|
|
14838
14842
|
$ref: "#/definitions/Record%3Cstring%2CCheckConfig%3E",
|
|
14839
|
-
description: "Check configurations"
|
|
14843
|
+
description: "Check configurations (legacy, use 'steps' instead) - always populated after normalization"
|
|
14840
14844
|
},
|
|
14841
14845
|
output: {
|
|
14842
14846
|
$ref: "#/definitions/OutputConfig",
|
|
@@ -14891,7 +14895,7 @@ var init_config_schema = __esm({
|
|
|
14891
14895
|
description: "Optional routing defaults for retry/goto/run policies"
|
|
14892
14896
|
}
|
|
14893
14897
|
},
|
|
14894
|
-
required: ["version", "
|
|
14898
|
+
required: ["version", "output"],
|
|
14895
14899
|
additionalProperties: false,
|
|
14896
14900
|
description: "Main Visor configuration",
|
|
14897
14901
|
patternProperties: {
|
|
@@ -16088,10 +16092,11 @@ var ConfigLoader = class {
|
|
|
16088
16092
|
if (defaultConfigPath && fs10.existsSync(defaultConfigPath)) {
|
|
16089
16093
|
console.error(`\u{1F4E6} Loading bundled default configuration from ${defaultConfigPath}`);
|
|
16090
16094
|
const content = fs10.readFileSync(defaultConfigPath, "utf8");
|
|
16091
|
-
|
|
16095
|
+
let config = yaml.load(content);
|
|
16092
16096
|
if (!config || typeof config !== "object") {
|
|
16093
16097
|
throw new Error("Invalid default configuration");
|
|
16094
16098
|
}
|
|
16099
|
+
config = this.normalizeStepsAndChecks(config);
|
|
16095
16100
|
if (config.extends) {
|
|
16096
16101
|
return await this.processExtends(config);
|
|
16097
16102
|
}
|
|
@@ -16222,6 +16227,20 @@ var ConfigLoader = class {
|
|
|
16222
16227
|
this.loadedConfigs.clear();
|
|
16223
16228
|
this.clearCache();
|
|
16224
16229
|
}
|
|
16230
|
+
/**
|
|
16231
|
+
* Normalize 'checks' and 'steps' keys for backward compatibility
|
|
16232
|
+
* Ensures both keys are present and contain the same data
|
|
16233
|
+
*/
|
|
16234
|
+
normalizeStepsAndChecks(config) {
|
|
16235
|
+
if (config.steps && config.checks) {
|
|
16236
|
+
config.checks = config.steps;
|
|
16237
|
+
} else if (config.steps && !config.checks) {
|
|
16238
|
+
config.checks = config.steps;
|
|
16239
|
+
} else if (config.checks && !config.steps) {
|
|
16240
|
+
config.steps = config.checks;
|
|
16241
|
+
}
|
|
16242
|
+
return config;
|
|
16243
|
+
}
|
|
16225
16244
|
};
|
|
16226
16245
|
|
|
16227
16246
|
// src/config.ts
|
|
@@ -16296,6 +16315,7 @@ var ConfigManager = class {
|
|
|
16296
16315
|
parsedConfig = merger.merge(mergedConfig, configWithoutExtends);
|
|
16297
16316
|
parsedConfig = merger.removeDisabledChecks(parsedConfig);
|
|
16298
16317
|
}
|
|
16318
|
+
parsedConfig = this.normalizeStepsAndChecks(parsedConfig);
|
|
16299
16319
|
if (validate) {
|
|
16300
16320
|
this.validateConfig(parsedConfig);
|
|
16301
16321
|
}
|
|
@@ -16362,7 +16382,9 @@ var ConfigManager = class {
|
|
|
16362
16382
|
async getDefaultConfig() {
|
|
16363
16383
|
return {
|
|
16364
16384
|
version: "1.0",
|
|
16385
|
+
steps: {},
|
|
16365
16386
|
checks: {},
|
|
16387
|
+
// Keep for backward compatibility
|
|
16366
16388
|
max_parallelism: 3,
|
|
16367
16389
|
output: {
|
|
16368
16390
|
pr_comment: {
|
|
@@ -16405,10 +16427,11 @@ var ConfigManager = class {
|
|
|
16405
16427
|
if (bundledConfigPath && fs11.existsSync(bundledConfigPath)) {
|
|
16406
16428
|
console.error(`\u{1F4E6} Loading bundled default configuration from ${bundledConfigPath}`);
|
|
16407
16429
|
const configContent = fs11.readFileSync(bundledConfigPath, "utf8");
|
|
16408
|
-
|
|
16430
|
+
let parsedConfig = yaml2.load(configContent);
|
|
16409
16431
|
if (!parsedConfig || typeof parsedConfig !== "object") {
|
|
16410
16432
|
return null;
|
|
16411
16433
|
}
|
|
16434
|
+
parsedConfig = this.normalizeStepsAndChecks(parsedConfig);
|
|
16412
16435
|
this.validateConfig(parsedConfig);
|
|
16413
16436
|
return this.mergeWithDefaults(parsedConfig);
|
|
16414
16437
|
}
|
|
@@ -16440,6 +16463,20 @@ var ConfigManager = class {
|
|
|
16440
16463
|
}
|
|
16441
16464
|
return null;
|
|
16442
16465
|
}
|
|
16466
|
+
/**
|
|
16467
|
+
* Normalize 'checks' and 'steps' keys for backward compatibility
|
|
16468
|
+
* Ensures both keys are present and contain the same data
|
|
16469
|
+
*/
|
|
16470
|
+
normalizeStepsAndChecks(config) {
|
|
16471
|
+
if (config.steps && config.checks) {
|
|
16472
|
+
config.checks = config.steps;
|
|
16473
|
+
} else if (config.steps && !config.checks) {
|
|
16474
|
+
config.checks = config.steps;
|
|
16475
|
+
} else if (config.checks && !config.steps) {
|
|
16476
|
+
config.steps = config.checks;
|
|
16477
|
+
}
|
|
16478
|
+
return config;
|
|
16479
|
+
}
|
|
16443
16480
|
/**
|
|
16444
16481
|
* Merge configuration with CLI options
|
|
16445
16482
|
*/
|
|
@@ -16495,13 +16532,15 @@ var ConfigManager = class {
|
|
|
16495
16532
|
message: "Missing required field: version"
|
|
16496
16533
|
});
|
|
16497
16534
|
}
|
|
16498
|
-
if (!config.checks) {
|
|
16535
|
+
if (!config.checks && !config.steps) {
|
|
16499
16536
|
errors.push({
|
|
16500
|
-
field: "checks",
|
|
16501
|
-
message:
|
|
16537
|
+
field: "checks/steps",
|
|
16538
|
+
message: 'Missing required field: either "checks" or "steps" must be defined. "steps" is recommended for new configurations.'
|
|
16502
16539
|
});
|
|
16503
|
-
}
|
|
16504
|
-
|
|
16540
|
+
}
|
|
16541
|
+
const checksToValidate = config.checks || config.steps;
|
|
16542
|
+
if (checksToValidate) {
|
|
16543
|
+
for (const [checkName, checkConfig] of Object.entries(checksToValidate)) {
|
|
16505
16544
|
if (!checkConfig.type) {
|
|
16506
16545
|
checkConfig.type = "ai";
|
|
16507
16546
|
}
|