norn-cli 2.0.1 → 2.2.0

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/cli.js CHANGED
@@ -8881,11 +8881,11 @@ var require_mime_types = __commonJS({
8881
8881
  }
8882
8882
  return exts[0];
8883
8883
  }
8884
- function lookup(path19) {
8885
- if (!path19 || typeof path19 !== "string") {
8884
+ function lookup(path20) {
8885
+ if (!path20 || typeof path20 !== "string") {
8886
8886
  return false;
8887
8887
  }
8888
- var extension2 = extname3("x." + path19).toLowerCase().substr(1);
8888
+ var extension2 = extname3("x." + path20).toLowerCase().substr(1);
8889
8889
  if (!extension2) {
8890
8890
  return false;
8891
8891
  }
@@ -9990,7 +9990,7 @@ var require_form_data = __commonJS({
9990
9990
  "use strict";
9991
9991
  var CombinedStream = require_combined_stream();
9992
9992
  var util4 = require("util");
9993
- var path19 = require("path");
9993
+ var path20 = require("path");
9994
9994
  var http3 = require("http");
9995
9995
  var https3 = require("https");
9996
9996
  var parseUrl = require("url").parse;
@@ -10118,11 +10118,11 @@ var require_form_data = __commonJS({
10118
10118
  FormData3.prototype._getContentDisposition = function(value, options) {
10119
10119
  var filename;
10120
10120
  if (typeof options.filepath === "string") {
10121
- filename = path19.normalize(options.filepath).replace(/\\/g, "/");
10121
+ filename = path20.normalize(options.filepath).replace(/\\/g, "/");
10122
10122
  } else if (options.filename || value && (value.name || value.path)) {
10123
- filename = path19.basename(options.filename || value && (value.name || value.path));
10123
+ filename = path20.basename(options.filename || value && (value.name || value.path));
10124
10124
  } else if (value && value.readable && hasOwn(value, "httpVersion")) {
10125
- filename = path19.basename(value.client._httpMessage.path || "");
10125
+ filename = path20.basename(value.client._httpMessage.path || "");
10126
10126
  }
10127
10127
  if (filename) {
10128
10128
  return 'filename="' + filename + '"';
@@ -15331,8 +15331,8 @@ var require_utils = __commonJS({
15331
15331
  }
15332
15332
  return ind;
15333
15333
  }
15334
- function removeDotSegments(path19) {
15335
- let input2 = path19;
15334
+ function removeDotSegments(path20) {
15335
+ let input2 = path20;
15336
15336
  const output2 = [];
15337
15337
  let nextSlash = -1;
15338
15338
  let len = 0;
@@ -15531,8 +15531,8 @@ var require_schemes = __commonJS({
15531
15531
  wsComponent.secure = void 0;
15532
15532
  }
15533
15533
  if (wsComponent.resourceName) {
15534
- const [path19, query] = wsComponent.resourceName.split("?");
15535
- wsComponent.path = path19 && path19 !== "/" ? path19 : void 0;
15534
+ const [path20, query] = wsComponent.resourceName.split("?");
15535
+ wsComponent.path = path20 && path20 !== "/" ? path20 : void 0;
15536
15536
  wsComponent.query = query;
15537
15537
  wsComponent.resourceName = void 0;
15538
15538
  }
@@ -21985,7 +21985,7 @@ var require_split2 = __commonJS({
21985
21985
  var require_helper = __commonJS({
21986
21986
  "node_modules/pgpass/lib/helper.js"(exports2, module2) {
21987
21987
  "use strict";
21988
- var path19 = require("path");
21988
+ var path20 = require("path");
21989
21989
  var Stream = require("stream").Stream;
21990
21990
  var split = require_split2();
21991
21991
  var util4 = require("util");
@@ -22024,7 +22024,7 @@ var require_helper = __commonJS({
22024
22024
  };
22025
22025
  module2.exports.getFileName = function(rawEnv) {
22026
22026
  var env3 = rawEnv || process.env;
22027
- var file2 = env3.PGPASSFILE || (isWin ? path19.join(env3.APPDATA || "./", "postgresql", "pgpass.conf") : path19.join(env3.HOME || "./", ".pgpass"));
22027
+ var file2 = env3.PGPASSFILE || (isWin ? path20.join(env3.APPDATA || "./", "postgresql", "pgpass.conf") : path20.join(env3.HOME || "./", ".pgpass"));
22028
22028
  return file2;
22029
22029
  };
22030
22030
  module2.exports.usePgPass = function(stats, fname) {
@@ -22156,7 +22156,7 @@ var require_helper = __commonJS({
22156
22156
  var require_lib = __commonJS({
22157
22157
  "node_modules/pgpass/lib/index.js"(exports2, module2) {
22158
22158
  "use strict";
22159
- var path19 = require("path");
22159
+ var path20 = require("path");
22160
22160
  var fs20 = require("fs");
22161
22161
  var helper = require_helper();
22162
22162
  module2.exports = function(connInfo, cb) {
@@ -25229,7 +25229,7 @@ var require_table = __commonJS({
25229
25229
  let cursor = -1;
25230
25230
  let buffer = "";
25231
25231
  let escaped = false;
25232
- const path19 = [];
25232
+ const path20 = [];
25233
25233
  while (++cursor < length) {
25234
25234
  const char = name.charAt(cursor);
25235
25235
  if (char === "[") {
@@ -25248,7 +25248,7 @@ var require_table = __commonJS({
25248
25248
  if (escaped) {
25249
25249
  buffer += char;
25250
25250
  } else {
25251
- path19.push(buffer);
25251
+ path20.push(buffer);
25252
25252
  buffer = "";
25253
25253
  }
25254
25254
  } else {
@@ -25256,26 +25256,26 @@ var require_table = __commonJS({
25256
25256
  }
25257
25257
  }
25258
25258
  if (buffer) {
25259
- path19.push(buffer);
25259
+ path20.push(buffer);
25260
25260
  }
25261
- switch (path19.length) {
25261
+ switch (path20.length) {
25262
25262
  case 1:
25263
25263
  return {
25264
- name: path19[0],
25264
+ name: path20[0],
25265
25265
  schema: null,
25266
25266
  database: null
25267
25267
  };
25268
25268
  case 2:
25269
25269
  return {
25270
- name: path19[1],
25271
- schema: path19[0],
25270
+ name: path20[1],
25271
+ schema: path20[0],
25272
25272
  database: null
25273
25273
  };
25274
25274
  case 3:
25275
25275
  return {
25276
- name: path19[2],
25277
- schema: path19[1],
25278
- database: path19[0]
25276
+ name: path20[2],
25277
+ schema: path20[1],
25278
+ database: path20[0]
25279
25279
  };
25280
25280
  default:
25281
25281
  throw new Error("Invalid table name.");
@@ -28761,13 +28761,13 @@ function __disposeResources(env3) {
28761
28761
  }
28762
28762
  return next();
28763
28763
  }
28764
- function __rewriteRelativeImportExtension(path19, preserveJsx) {
28765
- if (typeof path19 === "string" && /^\.\.?\//.test(path19)) {
28766
- return path19.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function(m, tsx, d, ext, cm) {
28764
+ function __rewriteRelativeImportExtension(path20, preserveJsx) {
28765
+ if (typeof path20 === "string" && /^\.\.?\//.test(path20)) {
28766
+ return path20.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function(m, tsx, d, ext, cm) {
28767
28767
  return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : d + ext + "." + cm.toLowerCase() + "js";
28768
28768
  });
28769
28769
  }
28770
- return path19;
28770
+ return path20;
28771
28771
  }
28772
28772
  var extendStatics, __assign, __createBinding, __setModuleDefault, ownKeys, _SuppressedError, tslib_es6_default;
28773
28773
  var init_tslib_es6 = __esm({
@@ -28914,8 +28914,8 @@ var require_msalPlugins = __commonJS({
28914
28914
  }
28915
28915
  };
28916
28916
  exports2.msalNodeFlowVSCodeCredentialControl = {
28917
- setVSCodeAuthRecordPath(path19) {
28918
- exports2.vsCodeAuthRecordPath = path19;
28917
+ setVSCodeAuthRecordPath(path20) {
28918
+ exports2.vsCodeAuthRecordPath = path20;
28919
28919
  },
28920
28920
  setVSCodeBroker(broker) {
28921
28921
  exports2.vsCodeBrokerInfo = {
@@ -41657,7 +41657,7 @@ var require_msal_node = __commonJS({
41657
41657
  var msalCommon = require_lib4();
41658
41658
  var jwt2 = require_jsonwebtoken();
41659
41659
  var fs20 = require("fs");
41660
- var path19 = require("path");
41660
+ var path20 = require("path");
41661
41661
  var Serializer = class {
41662
41662
  /**
41663
41663
  * serialize the JSON blob
@@ -51508,7 +51508,7 @@ Headers: ${JSON.stringify(headers)}`
51508
51508
  throw createManagedIdentityError(platformNotSupported);
51509
51509
  }
51510
51510
  const expectedSecretFilePath = SUPPORTED_AZURE_ARC_PLATFORMS[process.platform];
51511
- const fileName = path19.basename(secretFilePath);
51511
+ const fileName = path20.basename(secretFilePath);
51512
51512
  if (!fileName.endsWith(".key")) {
51513
51513
  throw createManagedIdentityError(invalidFileExtension);
51514
51514
  }
@@ -57905,8 +57905,8 @@ var require_getClient = __commonJS({
57905
57905
  }
57906
57906
  const { allowInsecureConnection, httpClient } = clientOptions;
57907
57907
  const endpointUrl = clientOptions.endpoint ?? endpoint;
57908
- const client = (path19, ...args) => {
57909
- const getUrl = (requestOptions) => (0, import_urlHelpers.buildRequestUrl)(endpointUrl, path19, args, { allowInsecureConnection, ...requestOptions });
57908
+ const client = (path20, ...args) => {
57909
+ const getUrl = (requestOptions) => (0, import_urlHelpers.buildRequestUrl)(endpointUrl, path20, args, { allowInsecureConnection, ...requestOptions });
57910
57910
  return {
57911
57911
  get: (requestOptions = {}) => {
57912
57912
  return buildOperation(
@@ -60811,15 +60811,15 @@ var require_urlHelpers2 = __commonJS({
60811
60811
  let isAbsolutePath = false;
60812
60812
  let requestUrl = replaceAll(baseUri, urlReplacements);
60813
60813
  if (operationSpec.path) {
60814
- let path19 = replaceAll(operationSpec.path, urlReplacements);
60815
- if (operationSpec.path === "/{nextLink}" && path19.startsWith("/")) {
60816
- path19 = path19.substring(1);
60814
+ let path20 = replaceAll(operationSpec.path, urlReplacements);
60815
+ if (operationSpec.path === "/{nextLink}" && path20.startsWith("/")) {
60816
+ path20 = path20.substring(1);
60817
60817
  }
60818
- if (isAbsoluteUrl(path19)) {
60819
- requestUrl = path19;
60818
+ if (isAbsoluteUrl(path20)) {
60819
+ requestUrl = path20;
60820
60820
  isAbsolutePath = true;
60821
60821
  } else {
60822
- requestUrl = appendPath(requestUrl, path19);
60822
+ requestUrl = appendPath(requestUrl, path20);
60823
60823
  }
60824
60824
  }
60825
60825
  const { queryParams, sequenceParams } = calculateQueryParameters(operationSpec, operationArguments, fallbackObject);
@@ -60865,9 +60865,9 @@ var require_urlHelpers2 = __commonJS({
60865
60865
  }
60866
60866
  const searchStart = pathToAppend.indexOf("?");
60867
60867
  if (searchStart !== -1) {
60868
- const path19 = pathToAppend.substring(0, searchStart);
60868
+ const path20 = pathToAppend.substring(0, searchStart);
60869
60869
  const search = pathToAppend.substring(searchStart + 1);
60870
- newPath = newPath + path19;
60870
+ newPath = newPath + path20;
60871
60871
  if (search) {
60872
60872
  parsedUrl.search = parsedUrl.search ? `${parsedUrl.search}&${search}` : search;
60873
60873
  }
@@ -100795,7 +100795,7 @@ var require_windows = __commonJS({
100795
100795
  module2.exports = isexe;
100796
100796
  isexe.sync = sync;
100797
100797
  var fs20 = require("fs");
100798
- function checkPathExt(path19, options) {
100798
+ function checkPathExt(path20, options) {
100799
100799
  var pathext = options.pathExt !== void 0 ? options.pathExt : process.env.PATHEXT;
100800
100800
  if (!pathext) {
100801
100801
  return true;
@@ -100806,25 +100806,25 @@ var require_windows = __commonJS({
100806
100806
  }
100807
100807
  for (var i = 0; i < pathext.length; i++) {
100808
100808
  var p = pathext[i].toLowerCase();
100809
- if (p && path19.substr(-p.length).toLowerCase() === p) {
100809
+ if (p && path20.substr(-p.length).toLowerCase() === p) {
100810
100810
  return true;
100811
100811
  }
100812
100812
  }
100813
100813
  return false;
100814
100814
  }
100815
- function checkStat(stat, path19, options) {
100815
+ function checkStat(stat, path20, options) {
100816
100816
  if (!stat.isSymbolicLink() && !stat.isFile()) {
100817
100817
  return false;
100818
100818
  }
100819
- return checkPathExt(path19, options);
100819
+ return checkPathExt(path20, options);
100820
100820
  }
100821
- function isexe(path19, options, cb) {
100822
- fs20.stat(path19, function(er, stat) {
100823
- cb(er, er ? false : checkStat(stat, path19, options));
100821
+ function isexe(path20, options, cb) {
100822
+ fs20.stat(path20, function(er, stat) {
100823
+ cb(er, er ? false : checkStat(stat, path20, options));
100824
100824
  });
100825
100825
  }
100826
- function sync(path19, options) {
100827
- return checkStat(fs20.statSync(path19), path19, options);
100826
+ function sync(path20, options) {
100827
+ return checkStat(fs20.statSync(path20), path20, options);
100828
100828
  }
100829
100829
  }
100830
100830
  });
@@ -100835,13 +100835,13 @@ var require_mode = __commonJS({
100835
100835
  module2.exports = isexe;
100836
100836
  isexe.sync = sync;
100837
100837
  var fs20 = require("fs");
100838
- function isexe(path19, options, cb) {
100839
- fs20.stat(path19, function(er, stat) {
100838
+ function isexe(path20, options, cb) {
100839
+ fs20.stat(path20, function(er, stat) {
100840
100840
  cb(er, er ? false : checkStat(stat, options));
100841
100841
  });
100842
100842
  }
100843
- function sync(path19, options) {
100844
- return checkStat(fs20.statSync(path19), options);
100843
+ function sync(path20, options) {
100844
+ return checkStat(fs20.statSync(path20), options);
100845
100845
  }
100846
100846
  function checkStat(stat, options) {
100847
100847
  return stat.isFile() && checkMode(stat, options);
@@ -100874,7 +100874,7 @@ var require_isexe = __commonJS({
100874
100874
  }
100875
100875
  module2.exports = isexe;
100876
100876
  isexe.sync = sync;
100877
- function isexe(path19, options, cb) {
100877
+ function isexe(path20, options, cb) {
100878
100878
  if (typeof options === "function") {
100879
100879
  cb = options;
100880
100880
  options = {};
@@ -100884,7 +100884,7 @@ var require_isexe = __commonJS({
100884
100884
  throw new TypeError("callback not provided");
100885
100885
  }
100886
100886
  return new Promise(function(resolve16, reject) {
100887
- isexe(path19, options || {}, function(er, is) {
100887
+ isexe(path20, options || {}, function(er, is) {
100888
100888
  if (er) {
100889
100889
  reject(er);
100890
100890
  } else {
@@ -100893,7 +100893,7 @@ var require_isexe = __commonJS({
100893
100893
  });
100894
100894
  });
100895
100895
  }
100896
- core(path19, options || {}, function(er, is) {
100896
+ core(path20, options || {}, function(er, is) {
100897
100897
  if (er) {
100898
100898
  if (er.code === "EACCES" || options && options.ignoreErrors) {
100899
100899
  er = null;
@@ -100903,9 +100903,9 @@ var require_isexe = __commonJS({
100903
100903
  cb(er, is);
100904
100904
  });
100905
100905
  }
100906
- function sync(path19, options) {
100906
+ function sync(path20, options) {
100907
100907
  try {
100908
- return core.sync(path19, options || {});
100908
+ return core.sync(path20, options || {});
100909
100909
  } catch (er) {
100910
100910
  if (options && options.ignoreErrors || er.code === "EACCES") {
100911
100911
  return false;
@@ -100921,7 +100921,7 @@ var require_isexe = __commonJS({
100921
100921
  var require_which = __commonJS({
100922
100922
  "node_modules/which/which.js"(exports2, module2) {
100923
100923
  var isWindows = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys";
100924
- var path19 = require("path");
100924
+ var path20 = require("path");
100925
100925
  var COLON = isWindows ? ";" : ":";
100926
100926
  var isexe = require_isexe();
100927
100927
  var getNotFoundError = (cmd) => Object.assign(new Error(`not found: ${cmd}`), { code: "ENOENT" });
@@ -100959,7 +100959,7 @@ var require_which = __commonJS({
100959
100959
  return opt.all && found.length ? resolve16(found) : reject(getNotFoundError(cmd));
100960
100960
  const ppRaw = pathEnv[i];
100961
100961
  const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
100962
- const pCmd = path19.join(pathPart, cmd);
100962
+ const pCmd = path20.join(pathPart, cmd);
100963
100963
  const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
100964
100964
  resolve16(subStep(p, i, 0));
100965
100965
  });
@@ -100986,7 +100986,7 @@ var require_which = __commonJS({
100986
100986
  for (let i = 0; i < pathEnv.length; i++) {
100987
100987
  const ppRaw = pathEnv[i];
100988
100988
  const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
100989
- const pCmd = path19.join(pathPart, cmd);
100989
+ const pCmd = path20.join(pathPart, cmd);
100990
100990
  const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
100991
100991
  for (let j = 0; j < pathExt.length; j++) {
100992
100992
  const cur = p + pathExt[j];
@@ -101034,7 +101034,7 @@ var require_path_key = __commonJS({
101034
101034
  var require_resolveCommand = __commonJS({
101035
101035
  "node_modules/cross-spawn/lib/util/resolveCommand.js"(exports2, module2) {
101036
101036
  "use strict";
101037
- var path19 = require("path");
101037
+ var path20 = require("path");
101038
101038
  var which = require_which();
101039
101039
  var getPathKey = require_path_key();
101040
101040
  function resolveCommandAttempt(parsed, withoutPathExt) {
@@ -101052,7 +101052,7 @@ var require_resolveCommand = __commonJS({
101052
101052
  try {
101053
101053
  resolved = which.sync(parsed.command, {
101054
101054
  path: env3[getPathKey({ env: env3 })],
101055
- pathExt: withoutPathExt ? path19.delimiter : void 0
101055
+ pathExt: withoutPathExt ? path20.delimiter : void 0
101056
101056
  });
101057
101057
  } catch (e) {
101058
101058
  } finally {
@@ -101061,7 +101061,7 @@ var require_resolveCommand = __commonJS({
101061
101061
  }
101062
101062
  }
101063
101063
  if (resolved) {
101064
- resolved = path19.resolve(hasCustomCwd ? parsed.options.cwd : "", resolved);
101064
+ resolved = path20.resolve(hasCustomCwd ? parsed.options.cwd : "", resolved);
101065
101065
  }
101066
101066
  return resolved;
101067
101067
  }
@@ -101115,8 +101115,8 @@ var require_shebang_command = __commonJS({
101115
101115
  if (!match) {
101116
101116
  return null;
101117
101117
  }
101118
- const [path19, argument] = match[0].replace(/#! ?/, "").split(" ");
101119
- const binary = path19.split("/").pop();
101118
+ const [path20, argument] = match[0].replace(/#! ?/, "").split(" ");
101119
+ const binary = path20.split("/").pop();
101120
101120
  if (binary === "env") {
101121
101121
  return argument;
101122
101122
  }
@@ -101151,7 +101151,7 @@ var require_readShebang = __commonJS({
101151
101151
  var require_parse2 = __commonJS({
101152
101152
  "node_modules/cross-spawn/lib/parse.js"(exports2, module2) {
101153
101153
  "use strict";
101154
- var path19 = require("path");
101154
+ var path20 = require("path");
101155
101155
  var resolveCommand = require_resolveCommand();
101156
101156
  var escape2 = require_escape();
101157
101157
  var readShebang = require_readShebang();
@@ -101176,7 +101176,7 @@ var require_parse2 = __commonJS({
101176
101176
  const needsShell = !isExecutableRegExp.test(commandFile);
101177
101177
  if (parsed.options.forceShell || needsShell) {
101178
101178
  const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile);
101179
- parsed.command = path19.normalize(parsed.command);
101179
+ parsed.command = path20.normalize(parsed.command);
101180
101180
  parsed.command = escape2.command(parsed.command);
101181
101181
  parsed.args = parsed.args.map((arg) => escape2.argument(arg, needsDoubleEscapeMetaChars));
101182
101182
  const shellCommand = [parsed.command].concat(parsed.args).join(" ");
@@ -101827,17 +101827,17 @@ var init_source = __esm({
101827
101827
  // src/cli.ts
101828
101828
  var fs19 = __toESM(require("fs"));
101829
101829
  var fsPromises = __toESM(require("fs/promises"));
101830
- var path18 = __toESM(require("path"));
101830
+ var path19 = __toESM(require("path"));
101831
101831
 
101832
101832
  // src/parser.ts
101833
101833
  var path = __toESM(require("path"));
101834
101834
 
101835
101835
  // src/nornapiParser.ts
101836
- function extractPathParameters(path19) {
101836
+ function extractPathParameters(path20) {
101837
101837
  const params = [];
101838
101838
  const regex = /(?<!\{)\{([a-zA-Z_][a-zA-Z0-9_]*)\}(?!\})/g;
101839
101839
  let match;
101840
- while ((match = regex.exec(path19)) !== null) {
101840
+ while ((match = regex.exec(path20)) !== null) {
101841
101841
  params.push(match[1]);
101842
101842
  }
101843
101843
  return params;
@@ -101887,12 +101887,12 @@ function parseNornApiFile(content) {
101887
101887
  if (inEndpointsBlock) {
101888
101888
  const endpointMatch = trimmed.match(/^([a-zA-Z_][a-zA-Z0-9_]*)\s*:\s*(GET|POST|PUT|DELETE|PATCH|HEAD|OPTIONS)\s+(.+)$/i);
101889
101889
  if (endpointMatch) {
101890
- const path19 = endpointMatch[3].trim();
101890
+ const path20 = endpointMatch[3].trim();
101891
101891
  endpoints.push({
101892
101892
  name: endpointMatch[1],
101893
101893
  method: endpointMatch[2].toUpperCase(),
101894
- path: path19,
101895
- parameters: extractPathParameters(path19)
101894
+ path: path20,
101895
+ parameters: extractPathParameters(path20)
101896
101896
  });
101897
101897
  }
101898
101898
  continue;
@@ -102340,8 +102340,8 @@ function parseNornSqlFile(text, sourcePath) {
102340
102340
  }
102341
102341
 
102342
102342
  // src/pathAccess.ts
102343
- function getPathSegments(path19) {
102344
- return path19.replace(/\[(\d+)\]/g, ".$1").split(".").filter((part) => part !== "");
102343
+ function getPathSegments(path20) {
102344
+ return path20.replace(/\[(\d+)\]/g, ".$1").split(".").filter((part) => part !== "");
102345
102345
  }
102346
102346
  function getPathPartValue(current, part) {
102347
102347
  if (Array.isArray(current) && part === "count") {
@@ -102349,12 +102349,12 @@ function getPathPartValue(current, part) {
102349
102349
  }
102350
102350
  return current[part];
102351
102351
  }
102352
- function getNestedPathValue(obj, path19) {
102353
- if (!path19 || obj === null || obj === void 0) {
102352
+ function getNestedPathValue(obj, path20) {
102353
+ if (!path20 || obj === null || obj === void 0) {
102354
102354
  return obj;
102355
102355
  }
102356
102356
  let current = obj;
102357
- for (const part of getPathSegments(path19)) {
102357
+ for (const part of getPathSegments(path20)) {
102358
102358
  if (current === null || current === void 0) {
102359
102359
  return void 0;
102360
102360
  }
@@ -102500,8 +102500,8 @@ function extractFileLevelVariables(text) {
102500
102500
  }
102501
102501
  return variables;
102502
102502
  }
102503
- function getNestedValue(obj, path19) {
102504
- return getNestedPathValue(obj, path19);
102503
+ function getNestedValue(obj, path20) {
102504
+ return getNestedPathValue(obj, path20);
102505
102505
  }
102506
102506
  function valueToString(value) {
102507
102507
  if (value === null) {
@@ -102545,8 +102545,8 @@ function substituteVariables(text, variables) {
102545
102545
  const value = variables[varName];
102546
102546
  if (typeof value === "object" && value !== null) {
102547
102547
  if (pathPart) {
102548
- const path19 = pathPart.replace(/^\./, "");
102549
- const nestedValue = getNestedValue(value, path19);
102548
+ const path20 = pathPart.replace(/^\./, "");
102549
+ const nestedValue = getNestedValue(value, path20);
102550
102550
  if (nestedValue === void 0 && varName === ENV_SCOPE_KEY) {
102551
102551
  return match;
102552
102552
  }
@@ -102560,8 +102560,8 @@ function substituteVariables(text, variables) {
102560
102560
  if (pathPart && typeof value === "string") {
102561
102561
  try {
102562
102562
  const parsed = JSON.parse(value);
102563
- const path19 = pathPart.replace(/^\./, "");
102564
- const nestedValue = getNestedValue(parsed, path19);
102563
+ const path20 = pathPart.replace(/^\./, "");
102564
+ const nestedValue = getNestedValue(parsed, path20);
102565
102565
  if (nestedValue === void 0 && varName === ENV_SCOPE_KEY) {
102566
102566
  return match;
102567
102567
  }
@@ -103410,9 +103410,9 @@ function isVisitable(thing) {
103410
103410
  function removeBrackets(key) {
103411
103411
  return utils_default.endsWith(key, "[]") ? key.slice(0, -2) : key;
103412
103412
  }
103413
- function renderKey(path19, key, dots) {
103414
- if (!path19) return key;
103415
- return path19.concat(key).map(function each(token, i) {
103413
+ function renderKey(path20, key, dots) {
103414
+ if (!path20) return key;
103415
+ return path20.concat(key).map(function each(token, i) {
103416
103416
  token = removeBrackets(token);
103417
103417
  return !dots && i ? "[" + token + "]" : token;
103418
103418
  }).join(dots ? "." : "");
@@ -103460,9 +103460,9 @@ function toFormData(obj, formData, options) {
103460
103460
  }
103461
103461
  return value;
103462
103462
  }
103463
- function defaultVisitor(value, key, path19) {
103463
+ function defaultVisitor(value, key, path20) {
103464
103464
  let arr = value;
103465
- if (value && !path19 && typeof value === "object") {
103465
+ if (value && !path20 && typeof value === "object") {
103466
103466
  if (utils_default.endsWith(key, "{}")) {
103467
103467
  key = metaTokens ? key : key.slice(0, -2);
103468
103468
  value = JSON.stringify(value);
@@ -103481,7 +103481,7 @@ function toFormData(obj, formData, options) {
103481
103481
  if (isVisitable(value)) {
103482
103482
  return true;
103483
103483
  }
103484
- formData.append(renderKey(path19, key, dots), convertValue(value));
103484
+ formData.append(renderKey(path20, key, dots), convertValue(value));
103485
103485
  return false;
103486
103486
  }
103487
103487
  const stack = [];
@@ -103490,10 +103490,10 @@ function toFormData(obj, formData, options) {
103490
103490
  convertValue,
103491
103491
  isVisitable
103492
103492
  });
103493
- function build(value, path19) {
103493
+ function build(value, path20) {
103494
103494
  if (utils_default.isUndefined(value)) return;
103495
103495
  if (stack.indexOf(value) !== -1) {
103496
- throw Error("Circular reference detected in " + path19.join("."));
103496
+ throw Error("Circular reference detected in " + path20.join("."));
103497
103497
  }
103498
103498
  stack.push(value);
103499
103499
  utils_default.forEach(value, function each(el, key) {
@@ -103501,11 +103501,11 @@ function toFormData(obj, formData, options) {
103501
103501
  formData,
103502
103502
  el,
103503
103503
  utils_default.isString(key) ? key.trim() : key,
103504
- path19,
103504
+ path20,
103505
103505
  exposedHelpers
103506
103506
  );
103507
103507
  if (result === true) {
103508
- build(el, path19 ? path19.concat(key) : [key]);
103508
+ build(el, path20 ? path20.concat(key) : [key]);
103509
103509
  }
103510
103510
  });
103511
103511
  stack.pop();
@@ -103717,7 +103717,7 @@ var platform_default = {
103717
103717
  // node_modules/axios/lib/helpers/toURLEncodedForm.js
103718
103718
  function toURLEncodedForm(data, options) {
103719
103719
  return toFormData_default(data, new platform_default.classes.URLSearchParams(), {
103720
- visitor: function(value, key, path19, helpers) {
103720
+ visitor: function(value, key, path20, helpers) {
103721
103721
  if (platform_default.isNode && utils_default.isBuffer(value)) {
103722
103722
  this.append(key, value.toString("base64"));
103723
103723
  return false;
@@ -103747,11 +103747,11 @@ function arrayToObject(arr) {
103747
103747
  return obj;
103748
103748
  }
103749
103749
  function formDataToJSON(formData) {
103750
- function buildPath(path19, value, target, index) {
103751
- let name = path19[index++];
103750
+ function buildPath(path20, value, target, index) {
103751
+ let name = path20[index++];
103752
103752
  if (name === "__proto__") return true;
103753
103753
  const isNumericKey = Number.isFinite(+name);
103754
- const isLast = index >= path19.length;
103754
+ const isLast = index >= path20.length;
103755
103755
  name = !name && utils_default.isArray(target) ? target.length : name;
103756
103756
  if (isLast) {
103757
103757
  if (utils_default.hasOwnProp(target, name)) {
@@ -103764,7 +103764,7 @@ function formDataToJSON(formData) {
103764
103764
  if (!target[name] || !utils_default.isObject(target[name])) {
103765
103765
  target[name] = [];
103766
103766
  }
103767
- const result = buildPath(path19, value, target[name], index);
103767
+ const result = buildPath(path20, value, target[name], index);
103768
103768
  if (result && utils_default.isArray(target[name])) {
103769
103769
  target[name] = arrayToObject(target[name]);
103770
103770
  }
@@ -105086,9 +105086,9 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config2) {
105086
105086
  auth2 = urlUsername + ":" + urlPassword;
105087
105087
  }
105088
105088
  auth2 && headers.delete("authorization");
105089
- let path19;
105089
+ let path20;
105090
105090
  try {
105091
- path19 = buildURL(
105091
+ path20 = buildURL(
105092
105092
  parsed.pathname + parsed.search,
105093
105093
  config2.params,
105094
105094
  config2.paramsSerializer
@@ -105106,7 +105106,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config2) {
105106
105106
  false
105107
105107
  );
105108
105108
  const options = {
105109
- path: path19,
105109
+ path: path20,
105110
105110
  method,
105111
105111
  headers: headers.toJSON(),
105112
105112
  agents: { http: config2.httpAgent, https: config2.httpsAgent },
@@ -105342,14 +105342,14 @@ var isURLSameOrigin_default = platform_default.hasStandardBrowserEnv ? /* @__PUR
105342
105342
  var cookies_default = platform_default.hasStandardBrowserEnv ? (
105343
105343
  // Standard browser envs support document.cookie
105344
105344
  {
105345
- write(name, value, expires, path19, domain2, secure, sameSite) {
105345
+ write(name, value, expires, path20, domain2, secure, sameSite) {
105346
105346
  if (typeof document === "undefined") return;
105347
105347
  const cookie = [`${name}=${encodeURIComponent(value)}`];
105348
105348
  if (utils_default.isNumber(expires)) {
105349
105349
  cookie.push(`expires=${new Date(expires).toUTCString()}`);
105350
105350
  }
105351
- if (utils_default.isString(path19)) {
105352
- cookie.push(`path=${path19}`);
105351
+ if (utils_default.isString(path20)) {
105352
+ cookie.push(`path=${path20}`);
105353
105353
  }
105354
105354
  if (utils_default.isString(domain2)) {
105355
105355
  cookie.push(`domain=${domain2}`);
@@ -106749,18 +106749,18 @@ var MemoryCookieStore = class extends Store {
106749
106749
  /**
106750
106750
  * @internal No doc because this is an overload that supports the implementation
106751
106751
  */
106752
- findCookie(domain2, path19, key, callback) {
106752
+ findCookie(domain2, path20, key, callback) {
106753
106753
  const promiseCallback = createPromiseCallback(callback);
106754
- if (domain2 == null || path19 == null || key == null) {
106754
+ if (domain2 == null || path20 == null || key == null) {
106755
106755
  return promiseCallback.resolve(void 0);
106756
106756
  }
106757
- const result = this.idx[domain2]?.[path19]?.[key];
106757
+ const result = this.idx[domain2]?.[path20]?.[key];
106758
106758
  return promiseCallback.resolve(result);
106759
106759
  }
106760
106760
  /**
106761
106761
  * @internal No doc because this is an overload that supports the implementation
106762
106762
  */
106763
- findCookies(domain2, path19, allowSpecialUseDomain = false, callback) {
106763
+ findCookies(domain2, path20, allowSpecialUseDomain = false, callback) {
106764
106764
  if (typeof allowSpecialUseDomain === "function") {
106765
106765
  callback = allowSpecialUseDomain;
106766
106766
  allowSpecialUseDomain = true;
@@ -106771,7 +106771,7 @@ var MemoryCookieStore = class extends Store {
106771
106771
  return promiseCallback.resolve([]);
106772
106772
  }
106773
106773
  let pathMatcher;
106774
- if (!path19) {
106774
+ if (!path20) {
106775
106775
  pathMatcher = function matchAll2(domainIndex) {
106776
106776
  for (const curPath in domainIndex) {
106777
106777
  const pathIndex = domainIndex[curPath];
@@ -106786,7 +106786,7 @@ var MemoryCookieStore = class extends Store {
106786
106786
  } else {
106787
106787
  pathMatcher = function matchRFC(domainIndex) {
106788
106788
  for (const cookiePath in domainIndex) {
106789
- if (pathMatch(path19, cookiePath)) {
106789
+ if (pathMatch(path20, cookiePath)) {
106790
106790
  const pathIndex = domainIndex[cookiePath];
106791
106791
  for (const key in pathIndex) {
106792
106792
  const value = pathIndex[key];
@@ -106814,14 +106814,14 @@ var MemoryCookieStore = class extends Store {
106814
106814
  */
106815
106815
  putCookie(cookie, callback) {
106816
106816
  const promiseCallback = createPromiseCallback(callback);
106817
- const { domain: domain2, path: path19, key } = cookie;
106818
- if (domain2 == null || path19 == null || key == null) {
106817
+ const { domain: domain2, path: path20, key } = cookie;
106818
+ if (domain2 == null || path20 == null || key == null) {
106819
106819
  return promiseCallback.resolve(void 0);
106820
106820
  }
106821
106821
  const domainEntry = this.idx[domain2] ?? /* @__PURE__ */ Object.create(null);
106822
106822
  this.idx[domain2] = domainEntry;
106823
- const pathEntry = domainEntry[path19] ?? /* @__PURE__ */ Object.create(null);
106824
- domainEntry[path19] = pathEntry;
106823
+ const pathEntry = domainEntry[path20] ?? /* @__PURE__ */ Object.create(null);
106824
+ domainEntry[path20] = pathEntry;
106825
106825
  pathEntry[key] = cookie;
106826
106826
  return promiseCallback.resolve(void 0);
106827
106827
  }
@@ -106835,20 +106835,20 @@ var MemoryCookieStore = class extends Store {
106835
106835
  /**
106836
106836
  * @internal No doc because this is an overload that supports the implementation
106837
106837
  */
106838
- removeCookie(domain2, path19, key, callback) {
106838
+ removeCookie(domain2, path20, key, callback) {
106839
106839
  const promiseCallback = createPromiseCallback(callback);
106840
- delete this.idx[domain2]?.[path19]?.[key];
106840
+ delete this.idx[domain2]?.[path20]?.[key];
106841
106841
  return promiseCallback.resolve(void 0);
106842
106842
  }
106843
106843
  /**
106844
106844
  * @internal No doc because this is an overload that supports the implementation
106845
106845
  */
106846
- removeCookies(domain2, path19, callback) {
106846
+ removeCookies(domain2, path20, callback) {
106847
106847
  const promiseCallback = createPromiseCallback(callback);
106848
106848
  const domainEntry = this.idx[domain2];
106849
106849
  if (domainEntry) {
106850
- if (path19) {
106851
- delete domainEntry[path19];
106850
+ if (path20) {
106851
+ delete domainEntry[path20];
106852
106852
  } else {
106853
106853
  delete this.idx[domain2];
106854
106854
  }
@@ -106874,8 +106874,8 @@ var MemoryCookieStore = class extends Store {
106874
106874
  domains.forEach((domain2) => {
106875
106875
  const domainEntry = idx[domain2] ?? {};
106876
106876
  const paths = Object.keys(domainEntry);
106877
- paths.forEach((path19) => {
106878
- const pathEntry = domainEntry[path19] ?? {};
106877
+ paths.forEach((path20) => {
106878
+ const pathEntry = domainEntry[path20] ?? {};
106879
106879
  const keys = Object.keys(pathEntry);
106880
106880
  keys.forEach((key) => {
106881
106881
  const keyEntry = pathEntry[key];
@@ -107759,18 +107759,18 @@ function cookieCompare(a, b) {
107759
107759
  cmp = (a.creationIndex || 0) - (b.creationIndex || 0);
107760
107760
  return cmp;
107761
107761
  }
107762
- function defaultPath(path19) {
107763
- if (!path19 || path19.slice(0, 1) !== "/") {
107762
+ function defaultPath(path20) {
107763
+ if (!path20 || path20.slice(0, 1) !== "/") {
107764
107764
  return "/";
107765
107765
  }
107766
- if (path19 === "/") {
107767
- return path19;
107766
+ if (path20 === "/") {
107767
+ return path20;
107768
107768
  }
107769
- const rightSlash = path19.lastIndexOf("/");
107769
+ const rightSlash = path20.lastIndexOf("/");
107770
107770
  if (rightSlash === 0) {
107771
107771
  return "/";
107772
107772
  }
107773
- return path19.slice(0, rightSlash);
107773
+ return path20.slice(0, rightSlash);
107774
107774
  }
107775
107775
  var IP_REGEX_LOWERCASE = /(?:^(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}$)|(?:^(?:(?:[a-f\d]{1,4}:){7}(?:[a-f\d]{1,4}|:)|(?:[a-f\d]{1,4}:){6}(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|:[a-f\d]{1,4}|:)|(?:[a-f\d]{1,4}:){5}(?::(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-f\d]{1,4}){1,2}|:)|(?:[a-f\d]{1,4}:){4}(?:(?::[a-f\d]{1,4}){0,1}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-f\d]{1,4}){1,3}|:)|(?:[a-f\d]{1,4}:){3}(?:(?::[a-f\d]{1,4}){0,2}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-f\d]{1,4}){1,4}|:)|(?:[a-f\d]{1,4}:){2}(?:(?::[a-f\d]{1,4}){0,3}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-f\d]{1,4}){1,5}|:)|(?:[a-f\d]{1,4}:){1}(?:(?::[a-f\d]{1,4}){0,4}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-f\d]{1,4}){1,6}|:)|(?::(?:(?::[a-f\d]{1,4}){0,5}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-f\d]{1,4}){1,7}|:)))$)/;
107776
107776
  function domainMatch(domain2, cookieDomain, canonicalize) {
@@ -108172,7 +108172,7 @@ var CookieJar = class _CookieJar {
108172
108172
  return promiseCallback.reject(parameterError);
108173
108173
  }
108174
108174
  const host = canonicalDomain(context.hostname);
108175
- const path19 = context.pathname || "/";
108175
+ const path20 = context.pathname || "/";
108176
108176
  const potentiallyTrustworthy = isPotentiallyTrustworthy(
108177
108177
  url3,
108178
108178
  this.allowSecureOnLocal
@@ -108203,7 +108203,7 @@ var CookieJar = class _CookieJar {
108203
108203
  return false;
108204
108204
  }
108205
108205
  }
108206
- if (!allPaths && typeof c.path === "string" && !pathMatch(path19, c.path)) {
108206
+ if (!allPaths && typeof c.path === "string" && !pathMatch(path20, c.path)) {
108207
108207
  return false;
108208
108208
  }
108209
108209
  if (c.secure && !potentiallyTrustworthy) {
@@ -108235,7 +108235,7 @@ var CookieJar = class _CookieJar {
108235
108235
  }
108236
108236
  store.findCookies(
108237
108237
  host,
108238
- allPaths ? null : path19,
108238
+ allPaths ? null : path20,
108239
108239
  this.allowSpecialUseDomain,
108240
108240
  (err, cookies) => {
108241
108241
  if (err) {
@@ -109302,6 +109302,12 @@ var import_ajv = __toESM(require_ajv());
109302
109302
  var fs = __toESM(require("fs"));
109303
109303
  var path3 = __toESM(require("path"));
109304
109304
  var ajv = new import_ajv.default({ allErrors: true, strict: false });
109305
+ for (const formatName of ["int32", "int64", "float", "double"]) {
109306
+ ajv.addFormat(formatName, {
109307
+ type: "number",
109308
+ validate: () => true
109309
+ });
109310
+ }
109305
109311
  var PATH_ALIAS_PREFIX = "@/";
109306
109312
  var DEFAULT_CONTRACTS_FOLDER = "contracts";
109307
109313
  function resolveSchemaPath(schemaPath, basePath, workspaceRoot) {
@@ -109340,7 +109346,7 @@ function resolveSchemaPath(schemaPath, basePath, workspaceRoot) {
109340
109346
  return schemaPath;
109341
109347
  }
109342
109348
  function convertAjvError(err, value) {
109343
- const instancePath = err.instancePath || "(root)";
109349
+ let instancePath = err.instancePath || "(root)";
109344
109350
  let expected;
109345
109351
  let actual = void 0;
109346
109352
  switch (err.keyword) {
@@ -109350,6 +109356,9 @@ function convertAjvError(err, value) {
109350
109356
  break;
109351
109357
  case "required":
109352
109358
  expected = `property "${err.params.missingProperty}" to exist`;
109359
+ if (typeof err.params.missingProperty === "string") {
109360
+ instancePath = appendJsonPointerPath(instancePath, err.params.missingProperty);
109361
+ }
109353
109362
  break;
109354
109363
  case "enum":
109355
109364
  expected = `one of: ${err.params.allowedValues?.join(", ")}`;
@@ -109379,6 +109388,10 @@ function convertAjvError(err, value) {
109379
109388
  break;
109380
109389
  case "additionalProperties":
109381
109390
  expected = `no additional property "${err.params.additionalProperty}"`;
109391
+ if (typeof err.params.additionalProperty === "string") {
109392
+ instancePath = appendJsonPointerPath(instancePath, err.params.additionalProperty);
109393
+ actual = getValueAtPath(value, instancePath);
109394
+ }
109382
109395
  break;
109383
109396
  case "format":
109384
109397
  expected = `format "${err.params.format}"`;
@@ -109405,6 +109418,11 @@ function convertAjvError(err, value) {
109405
109418
  severity
109406
109419
  };
109407
109420
  }
109421
+ function appendJsonPointerPath(basePath, propertyName) {
109422
+ const normalizedBasePath = !basePath || basePath === "(root)" ? "" : basePath;
109423
+ const escapedPropertyName = propertyName.replace(/~/g, "~0").replace(/\//g, "~1");
109424
+ return `${normalizedBasePath}/${escapedPropertyName}`;
109425
+ }
109408
109426
  function getValueAtPath(obj, jsonPointer) {
109409
109427
  if (jsonPointer === "(root)" || jsonPointer === "" || jsonPointer === "/") {
109410
109428
  return obj;
@@ -109420,22 +109438,122 @@ function getValueAtPath(obj, jsonPointer) {
109420
109438
  }
109421
109439
  return current;
109422
109440
  }
109441
+ var SCHEMA_RULE_KEYWORDS = /* @__PURE__ */ new Set([
109442
+ "type",
109443
+ "enum",
109444
+ "const",
109445
+ "multipleOf",
109446
+ "maximum",
109447
+ "exclusiveMaximum",
109448
+ "minimum",
109449
+ "exclusiveMinimum",
109450
+ "maxLength",
109451
+ "minLength",
109452
+ "pattern",
109453
+ "format",
109454
+ "maxItems",
109455
+ "minItems",
109456
+ "uniqueItems",
109457
+ "maxContains",
109458
+ "minContains",
109459
+ "maxProperties",
109460
+ "minProperties",
109461
+ "propertyNames",
109462
+ "dependentRequired"
109463
+ ]);
109464
+ var SCHEMA_MAP_KEYWORDS = /* @__PURE__ */ new Set([
109465
+ "properties",
109466
+ "patternProperties",
109467
+ "dependentSchemas",
109468
+ "$defs",
109469
+ "definitions"
109470
+ ]);
109471
+ var SCHEMA_ARRAY_KEYWORDS = /* @__PURE__ */ new Set(["allOf", "anyOf", "oneOf"]);
109472
+ var SCHEMA_NESTED_SCHEMA_KEYWORDS = /* @__PURE__ */ new Set(["items", "prefixItems", "additionalItems", "contains", "not", "if", "then", "else"]);
109473
+ function isRecord(value) {
109474
+ return typeof value === "object" && value !== null && !Array.isArray(value);
109475
+ }
109476
+ function countSchemaRules(schema) {
109477
+ if (Array.isArray(schema)) {
109478
+ return schema.reduce((sum, item) => sum + countSchemaRules(item), 0);
109479
+ }
109480
+ if (!isRecord(schema)) {
109481
+ return 0;
109482
+ }
109483
+ let count = 0;
109484
+ for (const [key, value] of Object.entries(schema)) {
109485
+ if (key === "required" && Array.isArray(value)) {
109486
+ count += value.length;
109487
+ continue;
109488
+ }
109489
+ if (SCHEMA_MAP_KEYWORDS.has(key)) {
109490
+ if (isRecord(value)) {
109491
+ for (const childSchema of Object.values(value)) {
109492
+ count += countSchemaRules(childSchema);
109493
+ }
109494
+ }
109495
+ continue;
109496
+ }
109497
+ if (SCHEMA_ARRAY_KEYWORDS.has(key)) {
109498
+ count += 1;
109499
+ count += countSchemaRules(value);
109500
+ continue;
109501
+ }
109502
+ if (key === "additionalProperties" || key === "unevaluatedProperties") {
109503
+ if (value !== true) {
109504
+ count += 1;
109505
+ }
109506
+ if (isRecord(value)) {
109507
+ count += countSchemaRules(value);
109508
+ }
109509
+ continue;
109510
+ }
109511
+ if (SCHEMA_NESTED_SCHEMA_KEYWORDS.has(key)) {
109512
+ if (key !== "items" && key !== "prefixItems") {
109513
+ count += 1;
109514
+ }
109515
+ count += countSchemaRules(value);
109516
+ continue;
109517
+ }
109518
+ if (SCHEMA_RULE_KEYWORDS.has(key)) {
109519
+ count += 1;
109520
+ }
109521
+ }
109522
+ return count;
109523
+ }
109524
+ function buildValidationSummary(schema, errors, valid) {
109525
+ const issueCount = errors?.length || 0;
109526
+ const errorCount = errors?.filter((error2) => error2.severity === "error").length || 0;
109527
+ const warningCount = errors?.filter((error2) => error2.severity === "warning").length || 0;
109528
+ const totalRules = Math.max(schema ? countSchemaRules(schema) : 0, issueCount);
109529
+ const failedRules = valid ? 0 : issueCount;
109530
+ return {
109531
+ totalRules,
109532
+ passedRules: Math.max(totalRules - failedRules, 0),
109533
+ failedRules,
109534
+ issueCount,
109535
+ errorCount,
109536
+ warningCount
109537
+ };
109538
+ }
109423
109539
  function validateAgainstSchemaDetailed(value, schemaPath, basePath, workspaceRoot) {
109424
109540
  try {
109425
109541
  const resolvedPath = resolveSchemaPath(schemaPath, basePath, workspaceRoot);
109426
109542
  if (!fs.existsSync(resolvedPath)) {
109543
+ const errors = [{
109544
+ instancePath: "(root)",
109545
+ schemaPath: "",
109546
+ keyword: "file",
109547
+ message: `Schema file not found: ${schemaPath}`,
109548
+ params: { path: schemaPath },
109549
+ severity: "error"
109550
+ }];
109427
109551
  return {
109428
109552
  valid: false,
109429
- errors: [{
109430
- instancePath: "(root)",
109431
- schemaPath: "",
109432
- keyword: "file",
109433
- message: `Schema file not found: ${schemaPath}`,
109434
- params: { path: schemaPath },
109435
- severity: "error"
109436
- }],
109553
+ errors,
109437
109554
  errorStrings: [`Schema file not found: ${schemaPath}`],
109438
- resolvedSchemaPath: resolvedPath
109555
+ resolvedSchemaPath: resolvedPath,
109556
+ summary: buildValidationSummary(void 0, errors, false)
109439
109557
  };
109440
109558
  }
109441
109559
  const schemaContent = fs.readFileSync(resolvedPath, "utf-8");
@@ -109443,18 +109561,20 @@ function validateAgainstSchemaDetailed(value, schemaPath, basePath, workspaceRoo
109443
109561
  try {
109444
109562
  schema = JSON.parse(schemaContent);
109445
109563
  } catch (e) {
109564
+ const errors = [{
109565
+ instancePath: "(root)",
109566
+ schemaPath: "",
109567
+ keyword: "parse",
109568
+ message: `Invalid JSON in schema file: ${schemaPath}`,
109569
+ params: { path: schemaPath },
109570
+ severity: "error"
109571
+ }];
109446
109572
  return {
109447
109573
  valid: false,
109448
- errors: [{
109449
- instancePath: "(root)",
109450
- schemaPath: "",
109451
- keyword: "parse",
109452
- message: `Invalid JSON in schema file: ${schemaPath}`,
109453
- params: { path: schemaPath },
109454
- severity: "error"
109455
- }],
109574
+ errors,
109456
109575
  errorStrings: [`Invalid JSON in schema file: ${schemaPath}`],
109457
- resolvedSchemaPath: resolvedPath
109576
+ resolvedSchemaPath: resolvedPath,
109577
+ summary: buildValidationSummary(void 0, errors, false)
109458
109578
  };
109459
109579
  }
109460
109580
  const validate3 = ajv.compile(schema);
@@ -109462,35 +109582,39 @@ function validateAgainstSchemaDetailed(value, schemaPath, basePath, workspaceRoo
109462
109582
  if (!valid && validate3.errors) {
109463
109583
  const errors = validate3.errors.map((err) => convertAjvError(err, value));
109464
109584
  const errorStrings = validate3.errors.map((err) => {
109465
- const path19 = err.instancePath || "(root)";
109466
- return `${path19}: ${err.message}`;
109585
+ const path20 = err.instancePath || "(root)";
109586
+ return `${path20}: ${err.message}`;
109467
109587
  });
109468
109588
  return {
109469
109589
  valid: false,
109470
109590
  errors,
109471
109591
  errorStrings,
109472
109592
  resolvedSchemaPath: resolvedPath,
109473
- schema
109593
+ schema,
109594
+ summary: buildValidationSummary(schema, errors, false)
109474
109595
  };
109475
109596
  }
109476
109597
  return {
109477
109598
  valid: true,
109478
109599
  resolvedSchemaPath: resolvedPath,
109479
- schema
109600
+ schema,
109601
+ summary: buildValidationSummary(schema, void 0, true)
109480
109602
  };
109481
109603
  } catch (e) {
109482
109604
  const error2 = e instanceof Error ? e.message : String(e);
109605
+ const errors = [{
109606
+ instancePath: "(root)",
109607
+ schemaPath: "",
109608
+ keyword: "exception",
109609
+ message: `Schema validation error: ${error2}`,
109610
+ params: {},
109611
+ severity: "error"
109612
+ }];
109483
109613
  return {
109484
109614
  valid: false,
109485
- errors: [{
109486
- instancePath: "(root)",
109487
- schemaPath: "",
109488
- keyword: "exception",
109489
- message: `Schema validation error: ${error2}`,
109490
- params: {},
109491
- severity: "error"
109492
- }],
109493
- errorStrings: [`Schema validation error: ${error2}`]
109615
+ errors,
109616
+ errorStrings: [`Schema validation error: ${error2}`],
109617
+ summary: buildValidationSummary(void 0, errors, false)
109494
109618
  };
109495
109619
  }
109496
109620
  }
@@ -109501,34 +109625,38 @@ function validateAgainstSchemaObjectDetailed(value, schema) {
109501
109625
  if (!valid && validate3.errors) {
109502
109626
  const errors = validate3.errors.map((err) => convertAjvError(err, value));
109503
109627
  const errorStrings = validate3.errors.map((err) => {
109504
- const path19 = err.instancePath || "(root)";
109505
- return `${path19}: ${err.message}`;
109628
+ const path20 = err.instancePath || "(root)";
109629
+ return `${path20}: ${err.message}`;
109506
109630
  });
109507
109631
  return {
109508
109632
  valid: false,
109509
109633
  errors,
109510
109634
  errorStrings,
109511
- schema
109635
+ schema,
109636
+ summary: buildValidationSummary(schema, errors, false)
109512
109637
  };
109513
109638
  }
109514
109639
  return {
109515
109640
  valid: true,
109516
- schema
109641
+ schema,
109642
+ summary: buildValidationSummary(schema, void 0, true)
109517
109643
  };
109518
109644
  } catch (e) {
109519
109645
  const error2 = e instanceof Error ? e.message : String(e);
109646
+ const errors = [{
109647
+ instancePath: "(root)",
109648
+ schemaPath: "",
109649
+ keyword: "exception",
109650
+ message: `Schema validation error: ${error2}`,
109651
+ params: {},
109652
+ severity: "error"
109653
+ }];
109520
109654
  return {
109521
109655
  valid: false,
109522
- errors: [{
109523
- instancePath: "(root)",
109524
- schemaPath: "",
109525
- keyword: "exception",
109526
- message: `Schema validation error: ${error2}`,
109527
- params: {},
109528
- severity: "error"
109529
- }],
109656
+ errors,
109530
109657
  errorStrings: [`Schema validation error: ${error2}`],
109531
- schema
109658
+ schema,
109659
+ summary: buildValidationSummary(schema, errors, false)
109532
109660
  };
109533
109661
  }
109534
109662
  }
@@ -109644,11 +109772,15 @@ function findUnquotedPipe(str) {
109644
109772
  }
109645
109773
  function resolveValue(expr, responses, variables, getValueByPath2, responseIndexToVariable) {
109646
109774
  const trimmed = expr.trim();
109775
+ const wrappedResponseRefMatch = trimmed.match(/^\{\{(\$\d+(?:\..+)?)\}\}$/);
109776
+ if (wrappedResponseRefMatch) {
109777
+ return resolveValue(wrappedResponseRefMatch[1], responses, variables, getValueByPath2, responseIndexToVariable);
109778
+ }
109647
109779
  const refMatch = trimmed.match(/^\$(\d+)\.(.+)$/);
109648
109780
  if (refMatch) {
109649
109781
  const responseIdx = parseInt(refMatch[1], 10);
109650
109782
  const responseIndex = responseIdx - 1;
109651
- const path19 = refMatch[2];
109783
+ const path20 = refMatch[2];
109652
109784
  if (responseIndex < 0 || responseIndex >= responses.length) {
109653
109785
  return {
109654
109786
  value: void 0,
@@ -109656,12 +109788,12 @@ function resolveValue(expr, responses, variables, getValueByPath2, responseIndex
109656
109788
  };
109657
109789
  }
109658
109790
  const response = responses[responseIndex];
109659
- const value = getValueByPath2(response, path19);
109791
+ const value = getValueByPath2(response, path20);
109660
109792
  return {
109661
109793
  value,
109662
109794
  responseIndex: responseIdx,
109663
109795
  response,
109664
- jsonPath: path19,
109796
+ jsonPath: path20,
109665
109797
  variableName: responseIndexToVariable?.get(responseIdx)
109666
109798
  };
109667
109799
  }
@@ -109678,22 +109810,22 @@ function resolveValue(expr, responses, variables, getValueByPath2, responseIndex
109678
109810
  if (varName in variables) {
109679
109811
  const varValue = variables[varName];
109680
109812
  if (typeof varValue === "object" && varValue !== null) {
109681
- const path19 = pathPart.replace(/^\./, "");
109682
- const value = getNestedValue2(varValue, path19);
109813
+ const path20 = pathPart.replace(/^\./, "");
109814
+ const value = getNestedValue2(varValue, path20);
109683
109815
  const isHttpResponse = "status" in varValue && "body" in varValue;
109684
109816
  return {
109685
109817
  value,
109686
109818
  variableName: varName,
109687
- jsonPath: path19,
109819
+ jsonPath: path20,
109688
109820
  response: isHttpResponse ? varValue : void 0
109689
109821
  };
109690
109822
  }
109691
109823
  if (typeof varValue === "string") {
109692
109824
  try {
109693
109825
  const parsed = JSON.parse(varValue);
109694
- const path19 = pathPart.replace(/^\./, "");
109695
- const value = getNestedValue2(parsed, path19);
109696
- return { value, variableName: varName, jsonPath: path19 };
109826
+ const path20 = pathPart.replace(/^\./, "");
109827
+ const value = getNestedValue2(parsed, path20);
109828
+ return { value, variableName: varName, jsonPath: path20 };
109697
109829
  } catch {
109698
109830
  return { value: void 0, error: `Cannot access path on non-object variable: ${varName}` };
109699
109831
  }
@@ -109722,14 +109854,14 @@ function resolveValue(expr, responses, variables, getValueByPath2, responseIndex
109722
109854
  const varValue = variables[varName];
109723
109855
  if (pathPart) {
109724
109856
  if (typeof varValue === "object" && varValue !== null) {
109725
- const path19 = pathPart.replace(/^\./, "");
109726
- return { value: getNestedValue2(varValue, path19) };
109857
+ const path20 = pathPart.replace(/^\./, "");
109858
+ return { value: getNestedValue2(varValue, path20) };
109727
109859
  }
109728
109860
  if (typeof varValue === "string") {
109729
109861
  try {
109730
109862
  const parsed = JSON.parse(varValue);
109731
- const path19 = pathPart.replace(/^\./, "");
109732
- return { value: getNestedValue2(parsed, path19) };
109863
+ const path20 = pathPart.replace(/^\./, "");
109864
+ return { value: getNestedValue2(parsed, path20) };
109733
109865
  } catch {
109734
109866
  return { value: void 0, error: `Cannot access path on non-object variable: ${varName}` };
109735
109867
  }
@@ -109744,7 +109876,7 @@ function resolveValue(expr, responses, variables, getValueByPath2, responseIndex
109744
109876
  return { value: void 0, error: `Variable {{${varName}}} is not defined` };
109745
109877
  }
109746
109878
  if (trimmed.startsWith('"') && trimmed.endsWith('"') || trimmed.startsWith("'") && trimmed.endsWith("'")) {
109747
- return { value: decodeQuotedStringLiteral(trimmed) };
109879
+ return { value: substituteVariables(decodeQuotedStringLiteral(trimmed), variables) };
109748
109880
  }
109749
109881
  if (/^-?\d+(\.\d+)?$/.test(trimmed)) {
109750
109882
  return { value: parseFloat(trimmed) };
@@ -109766,8 +109898,8 @@ function resolveValue(expr, responses, variables, getValueByPath2, responseIndex
109766
109898
  }
109767
109899
  return { value: void 0, error: `Cannot resolve expression: ${trimmed}` };
109768
109900
  }
109769
- function getNestedValue2(obj, path19) {
109770
- return getNestedPathValue(obj, path19);
109901
+ function getNestedValue2(obj, path20) {
109902
+ return getNestedPathValue(obj, path20);
109771
109903
  }
109772
109904
  function areValuesEqual(leftValue, rightValue) {
109773
109905
  if (leftValue === rightValue) {
@@ -109817,6 +109949,8 @@ function areValuesEqual(leftValue, rightValue) {
109817
109949
  }
109818
109950
  function evaluateAssertion(assertion, responses, variables, getValueByPath2, responseIndexToVariable, basePath) {
109819
109951
  const leftResult = resolveValue(assertion.leftExpr, responses, variables, getValueByPath2, responseIndexToVariable);
109952
+ const message = assertion.message === void 0 ? void 0 : substituteVariables(assertion.message, variables);
109953
+ const expression = formatExpression(assertion, variables);
109820
109954
  const buildFailureContext = () => ({
109821
109955
  responseIndex: leftResult.responseIndex,
109822
109956
  friendlyName: leftResult.variableName,
@@ -109826,8 +109960,8 @@ function evaluateAssertion(assertion, responses, variables, getValueByPath2, res
109826
109960
  if (leftResult.error) {
109827
109961
  return {
109828
109962
  passed: false,
109829
- expression: formatExpression(assertion),
109830
- message: assertion.message,
109963
+ expression,
109964
+ message,
109831
109965
  operator: assertion.operator,
109832
109966
  leftValue: void 0,
109833
109967
  leftExpression: assertion.leftExpr,
@@ -109841,8 +109975,8 @@ function evaluateAssertion(assertion, responses, variables, getValueByPath2, res
109841
109975
  const passed2 = leftValue !== void 0 && leftValue !== null;
109842
109976
  return {
109843
109977
  passed: passed2,
109844
- expression: formatExpression(assertion),
109845
- message: assertion.message,
109978
+ expression,
109979
+ message,
109846
109980
  operator: assertion.operator,
109847
109981
  leftValue,
109848
109982
  leftExpression: assertion.leftExpr,
@@ -109853,8 +109987,8 @@ function evaluateAssertion(assertion, responses, variables, getValueByPath2, res
109853
109987
  const passed2 = leftValue === void 0 || leftValue === null;
109854
109988
  return {
109855
109989
  passed: passed2,
109856
- expression: formatExpression(assertion),
109857
- message: assertion.message,
109990
+ expression,
109991
+ message,
109858
109992
  operator: assertion.operator,
109859
109993
  leftValue,
109860
109994
  leftExpression: assertion.leftExpr,
@@ -109864,8 +109998,8 @@ function evaluateAssertion(assertion, responses, variables, getValueByPath2, res
109864
109998
  if (!assertion.rightExpr) {
109865
109999
  return {
109866
110000
  passed: false,
109867
- expression: formatExpression(assertion),
109868
- message: assertion.message,
110001
+ expression,
110002
+ message,
109869
110003
  operator: assertion.operator,
109870
110004
  leftValue,
109871
110005
  leftExpression: assertion.leftExpr,
@@ -109886,8 +110020,8 @@ function evaluateAssertion(assertion, responses, variables, getValueByPath2, res
109886
110020
  const passed2 = actualType === expectedType;
109887
110021
  return {
109888
110022
  passed: passed2,
109889
- expression: formatExpression(assertion),
109890
- message: assertion.message,
110023
+ expression,
110024
+ message,
109891
110025
  operator: assertion.operator,
109892
110026
  leftValue,
109893
110027
  rightValue: expectedType,
@@ -109901,12 +110035,13 @@ function evaluateAssertion(assertion, responses, variables, getValueByPath2, res
109901
110035
  if (schemaPath.startsWith('"') && schemaPath.endsWith('"') || schemaPath.startsWith("'") && schemaPath.endsWith("'")) {
109902
110036
  schemaPath = schemaPath.slice(1, -1);
109903
110037
  }
110038
+ schemaPath = substituteVariables(schemaPath, variables);
109904
110039
  const validationResult = validateAgainstSchemaDetailed(leftValue, schemaPath, basePath);
109905
110040
  const passed2 = validationResult.valid;
109906
110041
  return {
109907
110042
  passed: passed2,
109908
- expression: formatExpression(assertion),
109909
- message: assertion.message,
110043
+ expression,
110044
+ message,
109910
110045
  operator: assertion.operator,
109911
110046
  leftValue,
109912
110047
  rightValue: schemaPath,
@@ -109916,6 +110051,7 @@ function evaluateAssertion(assertion, responses, variables, getValueByPath2, res
109916
110051
  schemaErrors: validationResult.errors,
109917
110052
  schemaPath: validationResult.resolvedSchemaPath,
109918
110053
  schema: validationResult.schema,
110054
+ schemaSummary: validationResult.summary,
109919
110055
  ...!passed2 ? buildFailureContext() : {}
109920
110056
  };
109921
110057
  }
@@ -109923,8 +110059,8 @@ function evaluateAssertion(assertion, responses, variables, getValueByPath2, res
109923
110059
  if (rightResult.error) {
109924
110060
  return {
109925
110061
  passed: false,
109926
- expression: formatExpression(assertion),
109927
- message: assertion.message,
110062
+ expression,
110063
+ message,
109928
110064
  operator: assertion.operator,
109929
110065
  leftValue,
109930
110066
  rightValue: void 0,
@@ -109978,8 +110114,8 @@ function evaluateAssertion(assertion, responses, variables, getValueByPath2, res
109978
110114
  } catch (e) {
109979
110115
  return {
109980
110116
  passed: false,
109981
- expression: formatExpression(assertion),
109982
- message: assertion.message,
110117
+ expression,
110118
+ message,
109983
110119
  operator: assertion.operator,
109984
110120
  leftValue,
109985
110121
  rightValue,
@@ -109993,8 +110129,8 @@ function evaluateAssertion(assertion, responses, variables, getValueByPath2, res
109993
110129
  }
109994
110130
  return {
109995
110131
  passed,
109996
- expression: formatExpression(assertion),
109997
- message: assertion.message,
110132
+ expression,
110133
+ message,
109998
110134
  operator: assertion.operator,
109999
110135
  leftValue,
110000
110136
  rightValue,
@@ -110003,11 +110139,14 @@ function evaluateAssertion(assertion, responses, variables, getValueByPath2, res
110003
110139
  ...!passed ? buildFailureContext() : {}
110004
110140
  };
110005
110141
  }
110006
- function formatExpression(assertion) {
110142
+ function formatExpression(assertion, variables) {
110007
110143
  if (assertion.rightExpr) {
110008
- return `${assertion.leftExpr} ${assertion.operator} ${assertion.rightExpr}`;
110144
+ return substituteAssertionDisplayTemplates(`${assertion.leftExpr} ${assertion.operator} ${assertion.rightExpr}`, variables);
110009
110145
  }
110010
- return `${assertion.leftExpr} ${assertion.operator}`;
110146
+ return substituteAssertionDisplayTemplates(`${assertion.leftExpr} ${assertion.operator}`, variables);
110147
+ }
110148
+ function substituteAssertionDisplayTemplates(expression, variables) {
110149
+ return variables ? substituteVariables(expression, variables) : expression;
110011
110150
  }
110012
110151
 
110013
110152
  // src/jsonFileReader.ts
@@ -110058,11 +110197,11 @@ function readJsonFile(filePath, workingDir) {
110058
110197
  };
110059
110198
  }
110060
110199
  }
110061
- function setNestedValue(obj, path19, value) {
110062
- if (!path19 || obj === null || obj === void 0 || typeof obj !== "object") {
110200
+ function setNestedValue(obj, path20, value) {
110201
+ if (!path20 || obj === null || obj === void 0 || typeof obj !== "object") {
110063
110202
  return false;
110064
110203
  }
110065
- const parts = path19.replace(/\[(\d+)\]/g, ".$1").split(".").filter((p) => p !== "");
110204
+ const parts = path20.replace(/\[(\d+)\]/g, ".$1").split(".").filter((p) => p !== "");
110066
110205
  if (parts.length === 0) {
110067
110206
  return false;
110068
110207
  }
@@ -110214,15 +110353,30 @@ function formatUserFacingError(error2, context) {
110214
110353
 
110215
110354
  // src/requestValidation.ts
110216
110355
  var PLACEHOLDER_REGEX = /\{\{(\$env|\$[0-9]+|[a-zA-Z_][a-zA-Z0-9_]*)((?:\.[a-zA-Z_][a-zA-Z0-9_-]*|\[\d+\])*)\}\}/g;
110217
- function collectUnresolvedPlaceholders(text) {
110356
+ function findPlaceholderReferences(text) {
110218
110357
  if (!text) {
110219
110358
  return [];
110220
110359
  }
110221
- const names = /* @__PURE__ */ new Set();
110360
+ const references = [];
110222
110361
  let match;
110223
110362
  PLACEHOLDER_REGEX.lastIndex = 0;
110224
110363
  while ((match = PLACEHOLDER_REGEX.exec(text)) !== null) {
110225
- names.add(match[0]);
110364
+ references.push({
110365
+ text: match[0],
110366
+ name: match[1],
110367
+ pathPart: match[2] || "",
110368
+ index: match.index
110369
+ });
110370
+ }
110371
+ return references;
110372
+ }
110373
+ function collectUnresolvedPlaceholders(text) {
110374
+ if (!text) {
110375
+ return [];
110376
+ }
110377
+ const names = /* @__PURE__ */ new Set();
110378
+ for (const reference of findPlaceholderReferences(text)) {
110379
+ names.add(reference.text);
110226
110380
  }
110227
110381
  return [...names];
110228
110382
  }
@@ -111587,8 +111741,8 @@ function getErrorMap() {
111587
111741
 
111588
111742
  // node_modules/zod/v3/helpers/parseUtil.js
111589
111743
  var makeIssue = (params) => {
111590
- const { data, path: path19, errorMaps, issueData } = params;
111591
- const fullPath = [...path19, ...issueData.path || []];
111744
+ const { data, path: path20, errorMaps, issueData } = params;
111745
+ const fullPath = [...path20, ...issueData.path || []];
111592
111746
  const fullIssue = {
111593
111747
  ...issueData,
111594
111748
  path: fullPath
@@ -111703,11 +111857,11 @@ var errorUtil;
111703
111857
 
111704
111858
  // node_modules/zod/v3/types.js
111705
111859
  var ParseInputLazyPath = class {
111706
- constructor(parent, value, path19, key) {
111860
+ constructor(parent, value, path20, key) {
111707
111861
  this._cachedPath = [];
111708
111862
  this.parent = parent;
111709
111863
  this.data = value;
111710
- this._path = path19;
111864
+ this._path = path20;
111711
111865
  this._key = key;
111712
111866
  }
111713
111867
  get path() {
@@ -115351,10 +115505,10 @@ function mergeDefs(...defs) {
115351
115505
  function cloneDef(schema) {
115352
115506
  return mergeDefs(schema._zod.def);
115353
115507
  }
115354
- function getElementAtPath(obj, path19) {
115355
- if (!path19)
115508
+ function getElementAtPath(obj, path20) {
115509
+ if (!path20)
115356
115510
  return obj;
115357
- return path19.reduce((acc, key) => acc?.[key], obj);
115511
+ return path20.reduce((acc, key) => acc?.[key], obj);
115358
115512
  }
115359
115513
  function promiseAllObject(promisesObj) {
115360
115514
  const keys = Object.keys(promisesObj);
@@ -115737,11 +115891,11 @@ function aborted(x, startIndex = 0) {
115737
115891
  }
115738
115892
  return false;
115739
115893
  }
115740
- function prefixIssues(path19, issues) {
115894
+ function prefixIssues(path20, issues) {
115741
115895
  return issues.map((iss) => {
115742
115896
  var _a2;
115743
115897
  (_a2 = iss).path ?? (_a2.path = []);
115744
- iss.path.unshift(path19);
115898
+ iss.path.unshift(path20);
115745
115899
  return iss;
115746
115900
  });
115747
115901
  }
@@ -128227,13 +128381,7 @@ function bindSequenceArguments(params, args, runtimeVariables) {
128227
128381
  if (boundParams.has(arg.name)) {
128228
128382
  return { error: `Parameter "${arg.name}" provided multiple times` };
128229
128383
  }
128230
- let value = arg.value;
128231
- if (value.startsWith("{{") && value.endsWith("}}")) {
128232
- const varName = value.slice(2, -2);
128233
- value = getVariableValueByPath(varName, runtimeVariables);
128234
- } else if (runtimeVariables[value] !== void 0) {
128235
- value = runtimeVariables[value];
128236
- }
128384
+ const value = resolveSequenceArgumentValue(arg.value, runtimeVariables);
128237
128385
  result[arg.name] = value;
128238
128386
  boundParams.add(arg.name);
128239
128387
  } else {
@@ -128244,13 +128392,7 @@ function bindSequenceArguments(params, args, runtimeVariables) {
128244
128392
  return { error: `Too many arguments: expected ${params.length}, got more` };
128245
128393
  }
128246
128394
  const param = params[positionalIndex];
128247
- let value = arg.value;
128248
- if (value.startsWith("{{") && value.endsWith("}}")) {
128249
- const varName = value.slice(2, -2);
128250
- value = getVariableValueByPath(varName, runtimeVariables);
128251
- } else if (runtimeVariables[value] !== void 0) {
128252
- value = runtimeVariables[value];
128253
- }
128395
+ const value = resolveSequenceArgumentValue(arg.value, runtimeVariables);
128254
128396
  result[param.name] = value;
128255
128397
  boundParams.add(param.name);
128256
128398
  positionalIndex++;
@@ -128277,8 +128419,8 @@ function parseJsonBackedValue(value) {
128277
128419
  return value;
128278
128420
  }
128279
128421
  }
128280
- function getVariableValueByPath(path19, variables) {
128281
- const parts = getPathSegments(path19);
128422
+ function getVariableValueByPath(path20, variables) {
128423
+ const parts = getPathSegments(path20);
128282
128424
  let current = variables;
128283
128425
  for (const part of parts) {
128284
128426
  if (current === null || current === void 0) {
@@ -128297,6 +128439,20 @@ function getVariableValueByPath(path19, variables) {
128297
128439
  }
128298
128440
  return current;
128299
128441
  }
128442
+ function resolveSequenceArgumentValue(value, runtimeVariables) {
128443
+ const trimmed = value.trim();
128444
+ if (trimmed.startsWith("{{") && trimmed.endsWith("}}")) {
128445
+ return getVariableValueByPath(trimmed.slice(2, -2).trim(), runtimeVariables);
128446
+ }
128447
+ if (trimmed in runtimeVariables) {
128448
+ return runtimeVariables[trimmed];
128449
+ }
128450
+ const pathMatch2 = trimmed.match(/^([a-zA-Z_][a-zA-Z0-9_]*)((?:\.[a-zA-Z_][a-zA-Z0-9_]*|\[\d+\])+)$/);
128451
+ if (pathMatch2 && pathMatch2[1] in runtimeVariables) {
128452
+ return getVariableValueByPath(trimmed, runtimeVariables);
128453
+ }
128454
+ return value;
128455
+ }
128300
128456
  function createPrintStepResult(stepIndex, stepStartTime, sequenceStartTime, title, body) {
128301
128457
  const now = Date.now();
128302
128458
  return {
@@ -128652,8 +128808,8 @@ function evaluateValueExpression(expr, runtimeVariables) {
128652
128808
  if (typeof dataToNavigate !== "object" || dataToNavigate === null) {
128653
128809
  return { value: String(varValue), error: `Cannot access path on non-object value` };
128654
128810
  }
128655
- const path19 = pathPart.replace(/^\./, "");
128656
- const parts = getPathSegments(path19);
128811
+ const path20 = pathPart.replace(/^\./, "");
128812
+ const parts = getPathSegments(path20);
128657
128813
  let current = dataToNavigate;
128658
128814
  for (const part of parts) {
128659
128815
  if (current === null || current === void 0) {
@@ -128777,8 +128933,8 @@ function resolveBareVariables(text, variables) {
128777
128933
  if (varName in variables) {
128778
128934
  const value = variables[varName];
128779
128935
  if (pathPart) {
128780
- const path19 = pathPart.replace(/^\./, "");
128781
- const nestedValue = getNestedPathValue(value, path19);
128936
+ const path20 = pathPart.replace(/^\./, "");
128937
+ const nestedValue = getNestedPathValue(value, path20);
128782
128938
  return valueToString2(nestedValue);
128783
128939
  }
128784
128940
  return valueToString2(value);
@@ -128798,8 +128954,8 @@ function resolveBareVariables(text, variables) {
128798
128954
  if (varName in variables) {
128799
128955
  const value = variables[varName];
128800
128956
  if (pathPart) {
128801
- const path19 = pathPart.replace(/^\./, "");
128802
- return valueToString2(getNestedPathValue(value, path19));
128957
+ const path20 = pathPart.replace(/^\./, "");
128958
+ return valueToString2(getNestedPathValue(value, path20));
128803
128959
  }
128804
128960
  return valueToString2(value);
128805
128961
  }
@@ -129235,24 +129391,24 @@ function extractCaptureDirectives(content) {
129235
129391
  for (const line2 of content.split("\n")) {
129236
129392
  const match = line2.trim().match(captureRegex);
129237
129393
  if (match) {
129238
- let path19 = match[3] || "";
129239
- if (path19.startsWith(".")) {
129240
- path19 = path19.substring(1);
129394
+ let path20 = match[3] || "";
129395
+ if (path20.startsWith(".")) {
129396
+ path20 = path20.substring(1);
129241
129397
  }
129242
129398
  captures.push({
129243
129399
  varName: match[1],
129244
129400
  afterRequest: parseInt(match[2], 10),
129245
- path: path19
129401
+ path: path20
129246
129402
  });
129247
129403
  }
129248
129404
  }
129249
129405
  return captures;
129250
129406
  }
129251
- function getValueByPath(response, path19) {
129252
- if (!path19) {
129407
+ function getValueByPath(response, path20) {
129408
+ if (!path20) {
129253
129409
  return void 0;
129254
129410
  }
129255
- const parts = getPathSegments(path19);
129411
+ const parts = getPathSegments(path20);
129256
129412
  if (parts.length === 0) {
129257
129413
  return void 0;
129258
129414
  }
@@ -129446,7 +129602,7 @@ async function runSequenceWithJar(sequenceContent, fileVariables, cookieJar, wor
129446
129602
  continue;
129447
129603
  }
129448
129604
  if (step.type === "assertion") {
129449
- const parsed = parseAssertCommand(substituteVariables(step.content, runtimeVariables));
129605
+ const parsed = parseAssertCommand(step.content);
129450
129606
  if (!parsed) {
129451
129607
  const invalidAssertMessage = `Step ${stepIdx + 1}: Invalid assert command: ${step.content}`;
129452
129608
  errors.push(invalidAssertMessage);
@@ -129621,8 +129777,8 @@ async function runSequenceWithJar(sequenceContent, fileVariables, cookieJar, wor
129621
129777
  }
129622
129778
  }
129623
129779
  if (pathPart) {
129624
- const path19 = pathPart.replace(/^\./, "");
129625
- newValue = getNestedPathValue(value, path19);
129780
+ const path20 = pathPart.replace(/^\./, "");
129781
+ newValue = getNestedPathValue(value, path20);
129626
129782
  } else {
129627
129783
  newValue = value;
129628
129784
  }
@@ -130257,8 +130413,8 @@ ${indentMultiline(userMessage)}`;
130257
130413
  if (sequenceSources) {
130258
130414
  const sourceFile = sequenceSources.get(targetName.toLowerCase());
130259
130415
  if (sourceFile) {
130260
- const path19 = await import("path");
130261
- subWorkingDir = path19.dirname(sourceFile);
130416
+ const path20 = await import("path");
130417
+ subWorkingDir = path20.dirname(sourceFile);
130262
130418
  }
130263
130419
  }
130264
130420
  const targetLocation = executionContext?.sequenceLocationIndex?.get(targetName.toLowerCase());
@@ -130566,8 +130722,8 @@ ${indentMultiline(userMessage)}`;
130566
130722
  if (sequenceSources) {
130567
130723
  const sourceFile = sequenceSources.get(sequenceName.toLowerCase());
130568
130724
  if (sourceFile) {
130569
- const path19 = await import("path");
130570
- subWorkingDir = path19.dirname(sourceFile);
130725
+ const path20 = await import("path");
130726
+ subWorkingDir = path20.dirname(sourceFile);
130571
130727
  }
130572
130728
  }
130573
130729
  const targetLocation = executionContext?.sequenceLocationIndex?.get(sequenceName.toLowerCase());
@@ -131068,6 +131224,178 @@ function formatResponseCompact(response, options) {
131068
131224
  return `${prefix}${icon} ${statusColor(`${response.status} ${response.statusText}`)} ${colors.duration(formatDuration(response.duration))}${retryInfo}`;
131069
131225
  }
131070
131226
 
131227
+ // src/contractAssertionSummary.ts
131228
+ var path13 = __toESM(require("path"));
131229
+ function buildContractAssertionDisplay(assertion, maxIssues = 3, maxValidatedItems = 24) {
131230
+ if (assertion.operator !== "matchesSchema") {
131231
+ return void 0;
131232
+ }
131233
+ const issueCount = assertion.schemaSummary?.issueCount ?? assertion.schemaErrors?.length ?? (assertion.error ? 1 : 0);
131234
+ const schemaPath = assertion.schemaPath || (typeof assertion.rightValue === "string" ? assertion.rightValue : void 0);
131235
+ const schemaName = schemaPath ? path13.basename(schemaPath) : void 0;
131236
+ const issueTexts = (assertion.schemaErrors || []).slice(0, maxIssues).map(formatSchemaIssue);
131237
+ const validationList = buildContractValidationList(
131238
+ assertion.schema,
131239
+ assertion.schemaErrors || [],
131240
+ maxValidatedItems
131241
+ );
131242
+ const failedValidationCount = validationList.failedCount || (!assertion.passed && issueCount > 0 ? 1 : 0);
131243
+ const totalValidations = validationList.totalCount + failedValidationCount;
131244
+ const passedValidations = assertion.passed ? totalValidations : validationList.totalCount;
131245
+ let summaryText;
131246
+ if (totalValidations > 0) {
131247
+ summaryText = `${passedValidations}/${totalValidations} validations passed`;
131248
+ } else {
131249
+ summaryText = assertion.passed ? "contract passed" : "contract validation failed";
131250
+ }
131251
+ if (issueCount > 0) {
131252
+ summaryText += `, ${issueCount} issue${issueCount === 1 ? "" : "s"}`;
131253
+ }
131254
+ const titleText = schemaName ? `${schemaName}: ${summaryText}` : `Contract: ${summaryText}`;
131255
+ const validationText = totalValidations > 0 ? `${passedValidations}/${totalValidations} validations` : assertion.passed ? "validated" : `${issueCount} issue${issueCount === 1 ? "" : "s"}`;
131256
+ const severity = getContractDisplaySeverity(assertion);
131257
+ return {
131258
+ titleText,
131259
+ summaryText,
131260
+ validationText,
131261
+ severity,
131262
+ schemaPath,
131263
+ schemaName,
131264
+ issueTexts,
131265
+ remainingIssueCount: Math.max(issueCount - issueTexts.length, 0),
131266
+ validatedItems: validationList.items,
131267
+ remainingValidatedCount: validationList.remainingCount,
131268
+ totalValidatedCount: validationList.totalCount
131269
+ };
131270
+ }
131271
+ function buildContractValidationList(schema, errors = [], maxItems = 24) {
131272
+ const failedPaths = new Set(errors.map(getComparableErrorPath));
131273
+ const allItems = collectContractValidationItems(schema).filter((item) => !isFailedValidationPath(item.comparablePath, failedPaths));
131274
+ const items = allItems.slice(0, maxItems).map(({ comparablePath: _comparablePath, ...item }) => item);
131275
+ return {
131276
+ items,
131277
+ totalCount: allItems.length,
131278
+ remainingCount: Math.max(allItems.length - items.length, 0),
131279
+ failedCount: failedPaths.size
131280
+ };
131281
+ }
131282
+ var RULE_LABELS = {
131283
+ type: (value) => `type: ${Array.isArray(value) ? value.join(" | ") : String(value)}`,
131284
+ format: (value) => `format: ${String(value)}`,
131285
+ enum: () => "enum",
131286
+ const: () => "const",
131287
+ pattern: () => "pattern",
131288
+ minimum: (value) => `min: ${String(value)}`,
131289
+ exclusiveMinimum: (value) => `exclusive min: ${String(value)}`,
131290
+ maximum: (value) => `max: ${String(value)}`,
131291
+ exclusiveMaximum: (value) => `exclusive max: ${String(value)}`,
131292
+ minLength: (value) => `min length: ${String(value)}`,
131293
+ maxLength: (value) => `max length: ${String(value)}`,
131294
+ minItems: (value) => `min items: ${String(value)}`,
131295
+ maxItems: (value) => `max items: ${String(value)}`,
131296
+ uniqueItems: () => "unique items",
131297
+ minProperties: (value) => `min properties: ${String(value)}`,
131298
+ maxProperties: (value) => `max properties: ${String(value)}`,
131299
+ multipleOf: (value) => `multiple of: ${String(value)}`
131300
+ };
131301
+ function collectContractValidationItems(schema, comparablePath = "", inheritedRules = []) {
131302
+ if (!isRecord2(schema)) {
131303
+ return [];
131304
+ }
131305
+ const items = [];
131306
+ const ownRules = getSchemaRuleLabels(schema);
131307
+ const rules = [...inheritedRules, ...ownRules];
131308
+ if (comparablePath && rules.length > 0) {
131309
+ items.push({
131310
+ comparablePath,
131311
+ path: formatComparablePath(comparablePath),
131312
+ rules
131313
+ });
131314
+ } else if (!comparablePath && rules.length > 0 && !schema.properties && !schema.items) {
131315
+ items.push({
131316
+ comparablePath: "/",
131317
+ path: "(root)",
131318
+ rules
131319
+ });
131320
+ }
131321
+ if (isRecord2(schema.properties)) {
131322
+ const required2 = Array.isArray(schema.required) ? new Set(schema.required.map(String)) : /* @__PURE__ */ new Set();
131323
+ for (const [propertyName, propertySchema] of Object.entries(schema.properties)) {
131324
+ const childPath = appendPropertyPath(comparablePath, propertyName);
131325
+ const childRules = required2.has(propertyName) ? ["required"] : [];
131326
+ items.push(...collectContractValidationItems(propertySchema, childPath, childRules));
131327
+ }
131328
+ }
131329
+ if (isRecord2(schema.items)) {
131330
+ items.push(...collectContractValidationItems(schema.items, appendArrayPath(comparablePath), []));
131331
+ }
131332
+ return items;
131333
+ }
131334
+ function getSchemaRuleLabels(schema) {
131335
+ const rules = [];
131336
+ for (const [keyword, formatter] of Object.entries(RULE_LABELS)) {
131337
+ if (schema[keyword] !== void 0) {
131338
+ rules.push(formatter(schema[keyword]));
131339
+ }
131340
+ }
131341
+ if (schema.additionalProperties === false) {
131342
+ rules.push("no extra properties");
131343
+ }
131344
+ return rules;
131345
+ }
131346
+ function appendPropertyPath(basePath, propertyName) {
131347
+ return `${basePath || ""}/${propertyName.replace(/~/g, "~0").replace(/\//g, "~1")}`;
131348
+ }
131349
+ function appendArrayPath(basePath) {
131350
+ return `${basePath || ""}/[]`;
131351
+ }
131352
+ function formatComparablePath(comparablePath) {
131353
+ return comparablePath.replace(/\/\[\]/g, "[]").replace(/~1/g, "/").replace(/~0/g, "~");
131354
+ }
131355
+ function getComparableErrorPath(error2) {
131356
+ let instancePath = error2.instancePath && error2.instancePath !== "(root)" ? error2.instancePath : "";
131357
+ if (error2.keyword === "required" && typeof error2.params?.missingProperty === "string") {
131358
+ instancePath = appendErrorPropertyPath(instancePath, error2.params.missingProperty);
131359
+ } else if (error2.keyword === "additionalProperties" && typeof error2.params?.additionalProperty === "string") {
131360
+ instancePath = appendErrorPropertyPath(instancePath, error2.params.additionalProperty);
131361
+ }
131362
+ return normalizeComparablePath(instancePath || "/");
131363
+ }
131364
+ function appendErrorPropertyPath(instancePath, propertyName) {
131365
+ const normalizedPath = instancePath && instancePath !== "(root)" && instancePath !== "/" ? instancePath : "";
131366
+ const escapedPropertyName = propertyName.replace(/~/g, "~0").replace(/\//g, "~1");
131367
+ const lastSegment = normalizedPath.split("/").pop();
131368
+ return lastSegment === escapedPropertyName ? normalizedPath : `${normalizedPath}/${escapedPropertyName}`;
131369
+ }
131370
+ function normalizeComparablePath(instancePath) {
131371
+ if (!instancePath || instancePath === "(root)" || instancePath === "/") {
131372
+ return "/";
131373
+ }
131374
+ return instancePath.split("/").map((segment) => /^\d+$/.test(segment) ? "[]" : segment).join("/");
131375
+ }
131376
+ function isFailedValidationPath(comparablePath, failedPaths) {
131377
+ for (const failedPath of failedPaths) {
131378
+ if (comparablePath === failedPath || comparablePath.startsWith(`${failedPath}/`)) {
131379
+ return true;
131380
+ }
131381
+ }
131382
+ return false;
131383
+ }
131384
+ function isRecord2(value) {
131385
+ return typeof value === "object" && value !== null && !Array.isArray(value);
131386
+ }
131387
+ function formatSchemaIssue(error2) {
131388
+ const location = error2.instancePath && error2.instancePath !== "(root)" ? error2.instancePath : "";
131389
+ return location ? `${location}: ${error2.message}` : error2.message;
131390
+ }
131391
+ function getContractDisplaySeverity(assertion) {
131392
+ if (assertion.passed) {
131393
+ return "success";
131394
+ }
131395
+ const schemaErrors = assertion.schemaErrors || [];
131396
+ return schemaErrors.length > 0 && schemaErrors.every((error2) => error2.severity === "warning") ? "warning" : "error";
131397
+ }
131398
+
131071
131399
  // src/cli/formatters/assertion.ts
131072
131400
  function formatAssertion(assertion, options) {
131073
131401
  const { colors, verbose } = options;
@@ -131078,6 +131406,31 @@ function formatAssertion(assertion, options) {
131078
131406
  displayExpr = displayExpr.replace("$" + assertion.responseIndex, assertion.friendlyName);
131079
131407
  }
131080
131408
  const displayMessage = assertion.message || displayExpr;
131409
+ const contractDisplay = buildContractAssertionDisplay(assertion);
131410
+ if (contractDisplay) {
131411
+ const summaryColor = assertion.passed ? colors.success : colors.warning;
131412
+ lines.push(`${icon} ${summaryColor(contractDisplay.titleText)}`);
131413
+ if (assertion.message) {
131414
+ lines.push(` ${colors.dim("Note:")} ${assertion.message}`);
131415
+ }
131416
+ if (verbose && contractDisplay.schemaPath && contractDisplay.schemaPath !== contractDisplay.schemaName) {
131417
+ lines.push(` ${colors.dim("Schema path:")} ${contractDisplay.schemaPath}`);
131418
+ }
131419
+ if (!assertion.passed) {
131420
+ if (contractDisplay.issueTexts.length > 0) {
131421
+ lines.push(` ${colors.dim("Issues:")}`);
131422
+ for (const issue2 of contractDisplay.issueTexts) {
131423
+ lines.push(` ${colors.cross} ${colors.error(issue2)}`);
131424
+ }
131425
+ if (contractDisplay.remainingIssueCount > 0) {
131426
+ lines.push(` ${colors.dim(`+${contractDisplay.remainingIssueCount} more`)}`);
131427
+ }
131428
+ } else if (assertion.error) {
131429
+ lines.push(` ${colors.error(`Error: ${assertion.error}`)}`);
131430
+ }
131431
+ }
131432
+ return lines;
131433
+ }
131081
131434
  lines.push(`${icon} assert ${displayMessage}`);
131082
131435
  if (!assertion.passed || verbose) {
131083
131436
  if (assertion.error) {
@@ -132047,7 +132400,7 @@ function generateHtmlReportFromResponse(response, testName, options) {
132047
132400
 
132048
132401
  // src/environmentParser.ts
132049
132402
  var fs15 = __toESM(require("fs"));
132050
- var path14 = __toESM(require("path"));
132403
+ var path15 = __toESM(require("path"));
132051
132404
 
132052
132405
  // src/secrets/crypto.ts
132053
132406
  var crypto7 = __toESM(require("crypto"));
@@ -132116,14 +132469,14 @@ function decryptSecretValue(encryptedValue, sharedKey) {
132116
132469
 
132117
132470
  // src/secrets/keyStore.ts
132118
132471
  var fs14 = __toESM(require("fs"));
132119
- var path13 = __toESM(require("path"));
132472
+ var path14 = __toESM(require("path"));
132120
132473
  var CACHE_FILE2 = "secret-keys.json";
132121
132474
  var CACHE_VERSION2 = 1;
132122
132475
  var CACHE_SCAN_IGNORED_DIRS = /* @__PURE__ */ new Set(["node_modules", ".git", "dist", "out"]);
132123
132476
  var sessionKeys = /* @__PURE__ */ new Map();
132124
132477
  var projectSecretKeyCacheDirs = /* @__PURE__ */ new Map();
132125
132478
  function getCacheFilePath(cacheDir) {
132126
- return path13.join(cacheDir, CACHE_FILE2);
132479
+ return path14.join(cacheDir, CACHE_FILE2);
132127
132480
  }
132128
132481
  function cacheFileExists(cacheDir) {
132129
132482
  const cacheFilePath = getCacheFilePath(cacheDir);
@@ -132145,7 +132498,7 @@ function getProjectSecretKeyCacheDirs(projectRoot) {
132145
132498
  if (!dir) {
132146
132499
  continue;
132147
132500
  }
132148
- const cacheDir = path13.join(dir, NORN_CACHE_DIR);
132501
+ const cacheDir = path14.join(dir, NORN_CACHE_DIR);
132149
132502
  if (cacheFileExists(cacheDir)) {
132150
132503
  results.push(cacheDir);
132151
132504
  }
@@ -132162,7 +132515,7 @@ function getProjectSecretKeyCacheDirs(projectRoot) {
132162
132515
  if (entry.name === NORN_CACHE_DIR || CACHE_SCAN_IGNORED_DIRS.has(entry.name)) {
132163
132516
  continue;
132164
132517
  }
132165
- queue.push(path13.join(dir, entry.name));
132518
+ queue.push(path14.join(dir, entry.name));
132166
132519
  }
132167
132520
  }
132168
132521
  results.sort();
@@ -132170,11 +132523,11 @@ function getProjectSecretKeyCacheDirs(projectRoot) {
132170
132523
  return results;
132171
132524
  }
132172
132525
  function getCacheDistance(targetPath, cacheDir) {
132173
- const relative5 = path13.relative(getSearchStartDirectory(targetPath), cacheDir);
132526
+ const relative5 = path14.relative(getSearchStartDirectory(targetPath), cacheDir);
132174
132527
  if (!relative5 || relative5 === ".") {
132175
132528
  return 0;
132176
132529
  }
132177
- return relative5.split(path13.sep).filter((segment) => segment !== "").length;
132530
+ return relative5.split(path14.sep).filter((segment) => segment !== "").length;
132178
132531
  }
132179
132532
  function findExistingSecretKeyCacheDir(targetPath) {
132180
132533
  const projectRoot = findProjectRoot(targetPath);
@@ -132201,7 +132554,7 @@ function rememberSecretKeyCacheDir(targetPath, cacheDir) {
132201
132554
  function ensureCacheDir(targetPath) {
132202
132555
  const existing = findExistingSecretKeyCacheDir(targetPath);
132203
132556
  const projectRoot = findProjectRoot(targetPath);
132204
- const cacheDir = existing ?? path13.join(projectRoot, NORN_CACHE_DIR);
132557
+ const cacheDir = existing ?? path14.join(projectRoot, NORN_CACHE_DIR);
132205
132558
  if (!fs14.existsSync(cacheDir)) {
132206
132559
  fs14.mkdirSync(cacheDir, { recursive: true });
132207
132560
  }
@@ -132215,7 +132568,7 @@ function getReadCachePath(targetPath) {
132215
132568
  return getCacheFilePath(existing);
132216
132569
  }
132217
132570
  const projectRoot = findProjectRoot(targetPath);
132218
- const projectCacheDir = path13.join(projectRoot, NORN_CACHE_DIR);
132571
+ const projectCacheDir = path14.join(projectRoot, NORN_CACHE_DIR);
132219
132572
  if (fs14.existsSync(projectCacheDir) && fs14.statSync(projectCacheDir).isDirectory()) {
132220
132573
  return getCacheFilePath(projectCacheDir);
132221
132574
  }
@@ -132434,22 +132787,22 @@ function parseEnvFile(content, sourceFilePath) {
132434
132787
  return config2;
132435
132788
  }
132436
132789
  function getEnvSearchStartDirectory(targetPath) {
132437
- const resolvedPath = path14.resolve(targetPath);
132790
+ const resolvedPath = path15.resolve(targetPath);
132438
132791
  try {
132439
132792
  const stats = fs15.statSync(resolvedPath);
132440
- return stats.isDirectory() ? resolvedPath : path14.dirname(resolvedPath);
132793
+ return stats.isDirectory() ? resolvedPath : path15.dirname(resolvedPath);
132441
132794
  } catch {
132442
- return path14.dirname(resolvedPath);
132795
+ return path15.dirname(resolvedPath);
132443
132796
  }
132444
132797
  }
132445
132798
  function findEnvFileFromPath(filePath) {
132446
132799
  let dir = getEnvSearchStartDirectory(filePath);
132447
132800
  while (true) {
132448
- const envPath = path14.join(dir, ENV_FILENAME);
132801
+ const envPath = path15.join(dir, ENV_FILENAME);
132449
132802
  if (fs15.existsSync(envPath)) {
132450
132803
  return envPath;
132451
132804
  }
132452
- const parentDir = path14.dirname(dir);
132805
+ const parentDir = path15.dirname(dir);
132453
132806
  if (parentDir === dir) {
132454
132807
  break;
132455
132808
  }
@@ -132458,9 +132811,9 @@ function findEnvFileFromPath(filePath) {
132458
132811
  return void 0;
132459
132812
  }
132460
132813
  function formatNornenvErrorLocation(rootEnvFilePath, errorFilePath, line2) {
132461
- const baseDir = path14.dirname(rootEnvFilePath);
132462
- const relativePath = path14.relative(baseDir, errorFilePath);
132463
- const fileLabel = relativePath && relativePath !== "" ? relativePath : path14.basename(errorFilePath);
132814
+ const baseDir = path15.dirname(rootEnvFilePath);
132815
+ const relativePath = path15.relative(baseDir, errorFilePath);
132816
+ const fileLabel = relativePath && relativePath !== "" ? relativePath : path15.basename(errorFilePath);
132464
132817
  return line2 >= 0 ? `${fileLabel}:${line2 + 1}` : fileLabel;
132465
132818
  }
132466
132819
  function resolveNornenvImports(config2, baseDir, entryFilePath, readFile3, importStack, alreadyImported) {
@@ -132496,10 +132849,10 @@ function resolveNornenvImports(config2, baseDir, entryFilePath, readFile3, impor
132496
132849
  });
132497
132850
  continue;
132498
132851
  }
132499
- const normalizedPath = path14.resolve(resolvedImportPath);
132852
+ const normalizedPath = path15.resolve(resolvedImportPath);
132500
132853
  if (stack.includes(normalizedPath)) {
132501
- const entryDir = path14.dirname(stack[0]);
132502
- const cycle = [...stack, normalizedPath].map((p) => path14.relative(entryDir, p) || path14.basename(p)).join(" \u2192 ");
132854
+ const entryDir = path15.dirname(stack[0]);
132855
+ const cycle = [...stack, normalizedPath].map((p) => path15.relative(entryDir, p) || path15.basename(p)).join(" \u2192 ");
132503
132856
  errors.push({
132504
132857
  message: `Circular import detected: ${cycle}`,
132505
132858
  filePath: entryFilePath,
@@ -132528,7 +132881,7 @@ function resolveNornenvImports(config2, baseDir, entryFilePath, readFile3, impor
132528
132881
  if (importedConfig.imports.length > 0) {
132529
132882
  const childResult = resolveNornenvImports(
132530
132883
  importedConfig,
132531
- path14.dirname(normalizedPath),
132884
+ path15.dirname(normalizedPath),
132532
132885
  normalizedPath,
132533
132886
  readFile3,
132534
132887
  [...stack, normalizedPath],
@@ -132546,7 +132899,7 @@ function resolveNornenvImports(config2, baseDir, entryFilePath, readFile3, impor
132546
132899
  }
132547
132900
  function resolveImportPath(importPath, baseDir) {
132548
132901
  const cleaned = importPath.replace(/^["']|["']$/g, "");
132549
- return path14.resolve(baseDir, cleaned);
132902
+ return path15.resolve(baseDir, cleaned);
132550
132903
  }
132551
132904
  function registerVariableOrigins(config2, filePath, origins) {
132552
132905
  for (const varName of Object.keys(config2.common)) {
@@ -132610,9 +132963,9 @@ function mergeConfigs(target, source, targetFilePath, sourceFilePath, variableOr
132610
132963
  }
132611
132964
  }
132612
132965
  function toDisplayPath(filePath, entryFilePath) {
132613
- const entryDir = path14.dirname(entryFilePath);
132614
- const relative5 = path14.relative(entryDir, filePath);
132615
- return relative5 && relative5 !== "" ? relative5 : path14.basename(filePath);
132966
+ const entryDir = path15.dirname(entryFilePath);
132967
+ const relative5 = path15.relative(entryDir, filePath);
132968
+ return relative5 && relative5 !== "" ? relative5 : path15.basename(filePath);
132616
132969
  }
132617
132970
  function loadAndResolveEnvFile(filePath) {
132618
132971
  const content = fs15.readFileSync(filePath, "utf-8");
@@ -132623,7 +132976,7 @@ function loadAndResolveEnvFile(filePath) {
132623
132976
  }
132624
132977
  const result = resolveNornenvImports(
132625
132978
  config2,
132626
- path14.dirname(filePath),
132979
+ path15.dirname(filePath),
132627
132980
  filePath,
132628
132981
  (p) => fs15.readFileSync(p, "utf-8")
132629
132982
  );
@@ -132692,13 +133045,13 @@ function resolveEncryptedSecretValues(config2, entryFilePath) {
132692
133045
 
132693
133046
  // src/secrets/cliSecrets.ts
132694
133047
  var fs17 = __toESM(require("fs"));
132695
- var path16 = __toESM(require("path"));
133048
+ var path17 = __toESM(require("path"));
132696
133049
  var readline = __toESM(require("readline"));
132697
133050
  var import_process = require("process");
132698
133051
 
132699
133052
  // src/secrets/envFileSecrets.ts
132700
133053
  var fs16 = __toESM(require("fs"));
132701
- var path15 = __toESM(require("path"));
133054
+ var path16 = __toESM(require("path"));
132702
133055
  var envRegex2 = /^\s*\[env:([a-zA-Z_][a-zA-Z0-9_-]*)\]\s*$/;
132703
133056
  var secretConnectionStringRegex2 = /^(\s*secret\s+connectionString\s+)([a-zA-Z_][a-zA-Z0-9_]*)(\s*=\s*)(.+)$/;
132704
133057
  var secretRegex2 = /^(\s*secret\s+)([a-zA-Z_][a-zA-Z0-9_]*)(\s*=\s*)(.+)$/;
@@ -132709,7 +133062,7 @@ function detectEol(content) {
132709
133062
  return content.includes("\r\n") ? "\r\n" : "\n";
132710
133063
  }
132711
133064
  function isNornenvFilePath(filePath) {
132712
- return path15.basename(filePath).toLowerCase() === ".nornenv";
133065
+ return path16.basename(filePath).toLowerCase() === ".nornenv";
132713
133066
  }
132714
133067
  function extractSecretLines(content, filePath) {
132715
133068
  const lines = splitContentLines(content);
@@ -132795,7 +133148,7 @@ function writeSecretLine(filePath, content) {
132795
133148
  fs16.writeFileSync(filePath, content, "utf8");
132796
133149
  }
132797
133150
  function discoverNornenvFiles(targetPath) {
132798
- const resolved = path15.resolve(targetPath);
133151
+ const resolved = path16.resolve(targetPath);
132799
133152
  if (!fs16.existsSync(resolved)) {
132800
133153
  return [];
132801
133154
  }
@@ -132807,7 +133160,7 @@ function discoverNornenvFiles(targetPath) {
132807
133160
  const walk = (dir) => {
132808
133161
  const entries = fs16.readdirSync(dir, { withFileTypes: true });
132809
133162
  for (const entry of entries) {
132810
- const fullPath = path15.join(dir, entry.name);
133163
+ const fullPath = path16.join(dir, entry.name);
132811
133164
  if (entry.isDirectory()) {
132812
133165
  if (entry.name === "node_modules" || entry.name === ".git" || entry.name === "dist" || entry.name === "out") {
132813
133166
  continue;
@@ -132866,8 +133219,8 @@ function formatSecretError(err, envFilePath) {
132866
133219
  if (!envFilePath) {
132867
133220
  return `${err.message}`;
132868
133221
  }
132869
- const relative5 = path16.relative(path16.dirname(envFilePath), err.filePath);
132870
- const fileLabel = relative5 && relative5 !== "" ? relative5 : path16.basename(err.filePath);
133222
+ const relative5 = path17.relative(path17.dirname(envFilePath), err.filePath);
133223
+ const fileLabel = relative5 && relative5 !== "" ? relative5 : path17.basename(err.filePath);
132871
133224
  const lineLabel = err.line >= 0 ? `${fileLabel}:${err.line + 1}` : fileLabel;
132872
133225
  return `${lineLabel} - ${err.message}`;
132873
133226
  }
@@ -132963,7 +133316,7 @@ async function handleEncrypt(args) {
132963
133316
  console.error(`Error: encrypt requires --file and --var.`);
132964
133317
  return 1;
132965
133318
  }
132966
- const absoluteFilePath = path16.resolve(filePath);
133319
+ const absoluteFilePath = path17.resolve(filePath);
132967
133320
  const { content, secret } = loadSecretLine(absoluteFilePath, variableName, envName);
132968
133321
  if (secret.encrypted) {
132969
133322
  console.error(`Error: Secret '${variableName}' is already encrypted. Use rotate instead.`);
@@ -132995,7 +133348,7 @@ async function handleRotate(args) {
132995
133348
  console.error(`Error: rotate requires --file and --var.`);
132996
133349
  return 1;
132997
133350
  }
132998
- const absoluteFilePath = path16.resolve(filePath);
133351
+ const absoluteFilePath = path17.resolve(filePath);
132999
133352
  const { content, secret } = loadSecretLine(absoluteFilePath, variableName, envName);
133000
133353
  let kid = explicitKid;
133001
133354
  if (!kid && secret.encrypted) {
@@ -133026,7 +133379,7 @@ async function handleRotate(args) {
133026
133379
  }
133027
133380
  async function handleRekey(args) {
133028
133381
  const positional = args.filter((arg) => !arg.startsWith("-"));
133029
- const targetPath = positional[0] ? path16.resolve(positional[0]) : process.cwd();
133382
+ const targetPath = positional[0] ? path17.resolve(positional[0]) : process.cwd();
133030
133383
  const targetKid = getFlagValue(args, "--kid");
133031
133384
  const files = discoverNornenvFiles(targetPath);
133032
133385
  if (files.length === 0) {
@@ -133096,7 +133449,7 @@ async function handleRekey(args) {
133096
133449
  }
133097
133450
  async function handleAudit(args) {
133098
133451
  const positional = args.filter((arg) => !arg.startsWith("-"));
133099
- const targetPath = positional[0] ? path16.resolve(positional[0]) : process.cwd();
133452
+ const targetPath = positional[0] ? path17.resolve(positional[0]) : process.cwd();
133100
133453
  const files = discoverNornenvFiles(targetPath);
133101
133454
  if (files.length === 0) {
133102
133455
  console.log(`No .nornenv files found under ${targetPath}`);
@@ -133191,7 +133544,7 @@ function printSecretResolutionErrors(errors, envFilePath) {
133191
133544
 
133192
133545
  // src/theoryCaseLoader.ts
133193
133546
  var fs18 = __toESM(require("fs/promises"));
133194
- var path17 = __toESM(require("path"));
133547
+ var path18 = __toESM(require("path"));
133195
133548
  function formatTheoryCaseLabel(params, index) {
133196
133549
  const entries = Object.entries(params);
133197
133550
  if (entries.length === 0) {
@@ -133215,7 +133568,7 @@ function normalizeTheoryCase(caseValue, sequenceParamNames) {
133215
133568
  return void 0;
133216
133569
  }
133217
133570
  async function loadTheoryCasesFromSource(sourcePath, workingDir, sequenceParamNames) {
133218
- const resolvedPath = path17.resolve(workingDir, sourcePath);
133571
+ const resolvedPath = path18.resolve(workingDir, sourcePath);
133219
133572
  const content = await fs18.readFile(resolvedPath, "utf-8");
133220
133573
  const parsed = JSON.parse(content);
133221
133574
  if (!Array.isArray(parsed)) {
@@ -133365,10 +133718,10 @@ function generateTimestamp() {
133365
133718
  return `${year}-${month}-${day}-${hours}${minutes}${seconds}`;
133366
133719
  }
133367
133720
  function generateReportPaths(outputDir, inputFile, timestamp) {
133368
- const baseName = path18.basename(inputFile, path18.extname(inputFile));
133721
+ const baseName = path19.basename(inputFile, path19.extname(inputFile));
133369
133722
  return {
133370
- junitPath: path18.join(outputDir, `${baseName}-${timestamp}-results.xml`),
133371
- htmlPath: path18.join(outputDir, `${baseName}-${timestamp}-report.html`)
133723
+ junitPath: path19.join(outputDir, `${baseName}-${timestamp}-results.xml`),
133724
+ htmlPath: path19.join(outputDir, `${baseName}-${timestamp}-report.html`)
133372
133725
  };
133373
133726
  }
133374
133727
  function parseArgs(args) {
@@ -133535,7 +133888,7 @@ function discoverNornFiles(dirPath) {
133535
133888
  function walkDir(currentPath) {
133536
133889
  const entries = fs19.readdirSync(currentPath, { withFileTypes: true });
133537
133890
  for (const entry of entries) {
133538
- const fullPath = path18.join(currentPath, entry.name);
133891
+ const fullPath = path19.join(currentPath, entry.name);
133539
133892
  if (entry.isDirectory()) {
133540
133893
  if (!entry.name.startsWith(".") && entry.name !== "node_modules") {
133541
133894
  walkDir(fullPath);
@@ -133659,7 +134012,7 @@ async function main() {
133659
134012
  if (options.insecure) {
133660
134013
  console.error(colors.warning("Warning: TLS certificate verification is disabled (--insecure). Use this only for local development."));
133661
134014
  }
133662
- const inputPath = path18.resolve(options.file);
134015
+ const inputPath = path19.resolve(options.file);
133663
134016
  if (!fs19.existsSync(inputPath)) {
133664
134017
  console.error(`Error: Path not found: ${inputPath}`);
133665
134018
  process.exit(1);
@@ -133735,7 +134088,7 @@ async function main() {
133735
134088
  const fileVariables = extractFileLevelVariables(fileContent);
133736
134089
  const variables = attachEnvironmentScope({ ...resolvedEnv.variables, ...fileVariables }, resolvedEnv.variables);
133737
134090
  const cookieJar = createCookieJar();
133738
- const workingDir = path18.dirname(filePath);
134091
+ const workingDir = path19.dirname(filePath);
133739
134092
  const importResult = await resolveImports(
133740
134093
  fileContent,
133741
134094
  workingDir,
@@ -133929,7 +134282,7 @@ ${fileContent}` : fileContent;
133929
134282
  process.exit(1);
133930
134283
  }
133931
134284
  if (!resolvedEnv.envFilePath && options.env) {
133932
- const relPath = isDirectory ? path18.relative(inputPath, filePath) : path18.basename(filePath);
134285
+ const relPath = isDirectory ? path19.relative(inputPath, filePath) : path19.basename(filePath);
133933
134286
  console.error(colors.warning(`Warning: --env specified but no .nornenv file found for ${relPath}`));
133934
134287
  }
133935
134288
  mergeSecrets(combinedSecretNames, combinedSecretValues, resolvedEnv.secretNames, resolvedEnv.secretValues);
@@ -133938,7 +134291,7 @@ ${fileContent}` : fileContent;
133938
134291
  const fileVariables = extractFileLevelVariables(fileContent);
133939
134292
  const variables = attachEnvironmentScope({ ...resolvedEnv.variables, ...fileVariables }, resolvedEnv.variables);
133940
134293
  const cookieJar = createCookieJar();
133941
- const workingDir = path18.dirname(filePath);
134294
+ const workingDir = path19.dirname(filePath);
133942
134295
  const importResult = await resolveImports(
133943
134296
  fileContent,
133944
134297
  workingDir,
@@ -133958,7 +134311,7 @@ ${fileContent}` : fileContent;
133958
134311
  continue;
133959
134312
  }
133960
134313
  if (isDirectory && options.output !== "json") {
133961
- const relPath = path18.relative(inputPath, filePath);
134314
+ const relPath = path19.relative(inputPath, filePath);
133962
134315
  console.log(colors.info(`
133963
134316
  \u2501\u2501\u2501 ${relPath} \u2501\u2501\u2501`));
133964
134317
  }
@@ -134003,7 +134356,7 @@ ${fileContent}` : fileContent;
134003
134356
  let htmlOutputPath = options.htmlOutput;
134004
134357
  if (options.outputDir) {
134005
134358
  const timestamp = generateTimestamp();
134006
- const baseName = isDirectory ? path18.basename(inputPath) : path18.basename(inputPath, path18.extname(inputPath));
134359
+ const baseName = isDirectory ? path19.basename(inputPath) : path19.basename(inputPath, path19.extname(inputPath));
134007
134360
  const generatedPaths = generateReportPaths(options.outputDir, baseName + ".norn", timestamp);
134008
134361
  if (!junitOutputPath) {
134009
134362
  junitOutputPath = generatedPaths.junitPath;
@@ -134016,7 +134369,7 @@ ${fileContent}` : fileContent;
134016
134369
  }
134017
134370
  }
134018
134371
  if (junitOutputPath) {
134019
- const suiteName = isDirectory ? path18.basename(inputPath) : path18.basename(inputPath, path18.extname(inputPath));
134372
+ const suiteName = isDirectory ? path19.basename(inputPath) : path19.basename(inputPath, path19.extname(inputPath));
134020
134373
  if (result.type === "request") {
134021
134374
  generateJUnitReportFromResponse(
134022
134375
  result.results[0],
@@ -134032,11 +134385,11 @@ ${fileContent}` : fileContent;
134032
134385
  console.log(colors.info(`JUnit report written to: ${junitOutputPath}`));
134033
134386
  }
134034
134387
  if (htmlOutputPath) {
134035
- const title = `Norn Test Report - ${path18.basename(inputPath)}`;
134388
+ const title = `Norn Test Report - ${path19.basename(inputPath)}`;
134036
134389
  if (result.type === "request") {
134037
134390
  generateHtmlReportFromResponse(
134038
134391
  result.results[0],
134039
- options.request || path18.basename(inputPath),
134392
+ options.request || path19.basename(inputPath),
134040
134393
  { outputPath: htmlOutputPath, redaction, title }
134041
134394
  );
134042
134395
  } else {