@probelabs/visor 0.1.92 → 0.1.94

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.
Files changed (39) hide show
  1. package/defaults/.visor.yaml +15 -16
  2. package/dist/check-execution-engine.d.ts +11 -0
  3. package/dist/check-execution-engine.d.ts.map +1 -1
  4. package/dist/config.d.ts +3 -1
  5. package/dist/config.d.ts.map +1 -1
  6. package/dist/defaults/.visor.yaml +15 -16
  7. package/dist/index.js +587 -646
  8. package/dist/liquid-extensions.d.ts +12 -0
  9. package/dist/liquid-extensions.d.ts.map +1 -1
  10. package/dist/output/issue-assistant/schema.json +14 -1
  11. package/dist/providers/command-check-provider.d.ts.map +1 -1
  12. package/dist/providers/log-check-provider.d.ts.map +1 -1
  13. package/dist/providers/memory-check-provider.d.ts.map +1 -1
  14. package/dist/reviewer.d.ts +8 -0
  15. package/dist/reviewer.d.ts.map +1 -1
  16. package/dist/sdk/{check-execution-engine-L73PFZQY.mjs → check-execution-engine-YBRPVUWD.mjs} +3 -3
  17. package/dist/sdk/{chunk-LJHRU3WQ.mjs → chunk-DQRFOQAP.mjs} +160 -41
  18. package/dist/sdk/chunk-DQRFOQAP.mjs.map +1 -0
  19. package/dist/sdk/{chunk-2U6BIWSY.mjs → chunk-I3GQJIR7.mjs} +14 -10
  20. package/dist/sdk/chunk-I3GQJIR7.mjs.map +1 -0
  21. package/dist/sdk/{liquid-extensions-AFKRYROF.mjs → liquid-extensions-GMEGEGC3.mjs} +6 -2
  22. package/dist/sdk/sdk.d.mts +11 -2
  23. package/dist/sdk/sdk.d.ts +11 -2
  24. package/dist/sdk/sdk.js +202 -50
  25. package/dist/sdk/sdk.js.map +1 -1
  26. package/dist/sdk/sdk.mjs +36 -7
  27. package/dist/sdk/sdk.mjs.map +1 -1
  28. package/dist/sdk.d.ts +11 -2
  29. package/dist/sdk.d.ts.map +1 -1
  30. package/dist/traces/{run-2025-10-15T07-21-47-696Z.ndjson → run-2025-10-16T11-33-32-682Z.ndjson} +19 -3
  31. package/dist/traces/{run-2025-10-15T07-21-58-106Z.ndjson → run-2025-10-16T11-33-43-618Z.ndjson} +19 -3
  32. package/dist/traces/{run-2025-10-15T07-21-58-693Z.ndjson → run-2025-10-16T11-33-44-157Z.ndjson} +19 -3
  33. package/dist/traces/{run-2025-10-15T07-21-59-167Z.ndjson → run-2025-10-16T11-33-44-647Z.ndjson} +19 -3
  34. package/dist/traces/{run-2025-10-15T07-21-59-629Z.ndjson → run-2025-10-16T11-33-45-128Z.ndjson} +4 -0
  35. package/package.json +2 -2
  36. package/dist/sdk/chunk-2U6BIWSY.mjs.map +0 -1
  37. package/dist/sdk/chunk-LJHRU3WQ.mjs.map +0 -1
  38. /package/dist/sdk/{check-execution-engine-L73PFZQY.mjs.map → check-execution-engine-YBRPVUWD.mjs.map} +0 -0
  39. /package/dist/sdk/{liquid-extensions-AFKRYROF.mjs.map → liquid-extensions-GMEGEGC3.mjs.map} +0 -0
package/dist/sdk/sdk.mjs CHANGED
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  CheckExecutionEngine
3
- } from "./chunk-LJHRU3WQ.mjs";
3
+ } from "./chunk-DQRFOQAP.mjs";
4
4
  import "./chunk-KVHVCGY6.mjs";
5
5
  import {
6
6
  init_logger,
7
7
  logger
8
- } from "./chunk-2U6BIWSY.mjs";
8
+ } from "./chunk-I3GQJIR7.mjs";
9
9
  import "./chunk-TWJKAYT6.mjs";
10
10
  import {
11
11
  ConfigMerger
@@ -1667,8 +1667,10 @@ var ConfigManager = class {
1667
1667
  }
1668
1668
  /**
1669
1669
  * Validate configuration against schema
1670
+ * @param config The config to validate
1671
+ * @param strict If true, treat warnings as errors (default: false)
1670
1672
  */
1671
- validateConfig(config) {
1673
+ validateConfig(config, strict = false) {
1672
1674
  const errors = [];
1673
1675
  const warnings = [];
1674
1676
  this.validateWithAjvSchema(config, errors, warnings);
@@ -1776,10 +1778,13 @@ var ConfigManager = class {
1776
1778
  if (config.tag_filter) {
1777
1779
  this.validateTagFilter(config.tag_filter, errors);
1778
1780
  }
1781
+ if (strict && warnings.length > 0) {
1782
+ errors.push(...warnings);
1783
+ }
1779
1784
  if (errors.length > 0) {
1780
1785
  throw new Error(errors[0].message);
1781
1786
  }
1782
- if (warnings.length > 0) {
1787
+ if (!strict && warnings.length > 0) {
1783
1788
  for (const w of warnings) {
1784
1789
  logger.warn(`\u26A0\uFE0F Config warning [${w.field}]: ${w.message}`);
1785
1790
  }
@@ -2235,9 +2240,25 @@ var __ajvValidate = null;
2235
2240
  var __ajvErrors = null;
2236
2241
 
2237
2242
  // src/sdk.ts
2238
- async function loadConfig(configPath) {
2243
+ async function loadConfig(configOrPath, options) {
2239
2244
  const cm = new ConfigManager();
2240
- if (configPath) return cm.loadConfig(configPath);
2245
+ if (typeof configOrPath === "object" && configOrPath !== null) {
2246
+ cm.validateConfig(configOrPath, options?.strict ?? false);
2247
+ const defaultConfig = {
2248
+ version: "1.0",
2249
+ checks: {},
2250
+ max_parallelism: 3,
2251
+ fail_fast: false
2252
+ };
2253
+ return {
2254
+ ...defaultConfig,
2255
+ ...configOrPath,
2256
+ checks: configOrPath.checks || {}
2257
+ };
2258
+ }
2259
+ if (typeof configOrPath === "string") {
2260
+ return cm.loadConfig(configOrPath);
2261
+ }
2241
2262
  return cm.findAndLoadConfig();
2242
2263
  }
2243
2264
  function resolveChecks(checkIds, config) {
@@ -2263,7 +2284,15 @@ function resolveChecks(checkIds, config) {
2263
2284
  }
2264
2285
  async function runChecks(opts = {}) {
2265
2286
  const cm = new ConfigManager();
2266
- const config = opts.config ? opts.config : opts.configPath ? await cm.loadConfig(opts.configPath) : await cm.findAndLoadConfig();
2287
+ let config;
2288
+ if (opts.config) {
2289
+ cm.validateConfig(opts.config, opts.strictValidation ?? false);
2290
+ config = opts.config;
2291
+ } else if (opts.configPath) {
2292
+ config = await cm.loadConfig(opts.configPath);
2293
+ } else {
2294
+ config = await cm.findAndLoadConfig();
2295
+ }
2267
2296
  const checks = opts.checks && opts.checks.length > 0 ? resolveChecks(opts.checks, config) : Object.keys(config.checks || {});
2268
2297
  const engine = new CheckExecutionEngine(opts.cwd);
2269
2298
  const result = await engine.executeChecks({