norn-cli 1.11.0 → 1.13.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
@@ -35,8 +35,8 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
35
35
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
36
36
 
37
37
  // src/pathAccess.ts
38
- function getPathSegments(path15) {
39
- return path15.replace(/\[(\d+)\]/g, ".$1").split(".").filter((part) => part !== "");
38
+ function getPathSegments(path17) {
39
+ return path17.replace(/\[(\d+)\]/g, ".$1").split(".").filter((part) => part !== "");
40
40
  }
41
41
  function getPathPartValue(current, part) {
42
42
  if (Array.isArray(current) && part === "count") {
@@ -44,12 +44,12 @@ function getPathPartValue(current, part) {
44
44
  }
45
45
  return current[part];
46
46
  }
47
- function getNestedPathValue(obj, path15) {
48
- if (!path15 || obj === null || obj === void 0) {
47
+ function getNestedPathValue(obj, path17) {
48
+ if (!path17 || obj === null || obj === void 0) {
49
49
  return obj;
50
50
  }
51
51
  let current = obj;
52
- for (const part of getPathSegments(path15)) {
52
+ for (const part of getPathSegments(path17)) {
53
53
  if (current === null || current === void 0) {
54
54
  return void 0;
55
55
  }
@@ -8910,11 +8910,11 @@ var require_mime_types = __commonJS({
8910
8910
  }
8911
8911
  return exts[0];
8912
8912
  }
8913
- function lookup(path15) {
8914
- if (!path15 || typeof path15 !== "string") {
8913
+ function lookup(path17) {
8914
+ if (!path17 || typeof path17 !== "string") {
8915
8915
  return false;
8916
8916
  }
8917
- var extension2 = extname3("x." + path15).toLowerCase().substr(1);
8917
+ var extension2 = extname3("x." + path17).toLowerCase().substr(1);
8918
8918
  if (!extension2) {
8919
8919
  return false;
8920
8920
  }
@@ -10019,11 +10019,11 @@ var require_form_data = __commonJS({
10019
10019
  "use strict";
10020
10020
  var CombinedStream = require_combined_stream();
10021
10021
  var util4 = require("util");
10022
- var path15 = require("path");
10022
+ var path17 = require("path");
10023
10023
  var http3 = require("http");
10024
10024
  var https3 = require("https");
10025
10025
  var parseUrl = require("url").parse;
10026
- var fs19 = require("fs");
10026
+ var fs21 = require("fs");
10027
10027
  var Stream = require("stream").Stream;
10028
10028
  var crypto8 = require("crypto");
10029
10029
  var mime = require_mime_types();
@@ -10090,7 +10090,7 @@ var require_form_data = __commonJS({
10090
10090
  if (value.end != void 0 && value.end != Infinity && value.start != void 0) {
10091
10091
  callback(null, value.end + 1 - (value.start ? value.start : 0));
10092
10092
  } else {
10093
- fs19.stat(value.path, function(err, stat) {
10093
+ fs21.stat(value.path, function(err, stat) {
10094
10094
  if (err) {
10095
10095
  callback(err);
10096
10096
  return;
@@ -10147,11 +10147,11 @@ var require_form_data = __commonJS({
10147
10147
  FormData3.prototype._getContentDisposition = function(value, options) {
10148
10148
  var filename;
10149
10149
  if (typeof options.filepath === "string") {
10150
- filename = path15.normalize(options.filepath).replace(/\\/g, "/");
10150
+ filename = path17.normalize(options.filepath).replace(/\\/g, "/");
10151
10151
  } else if (options.filename || value && (value.name || value.path)) {
10152
- filename = path15.basename(options.filename || value && (value.name || value.path));
10152
+ filename = path17.basename(options.filename || value && (value.name || value.path));
10153
10153
  } else if (value && value.readable && hasOwn(value, "httpVersion")) {
10154
- filename = path15.basename(value.client._httpMessage.path || "");
10154
+ filename = path17.basename(value.client._httpMessage.path || "");
10155
10155
  }
10156
10156
  if (filename) {
10157
10157
  return 'filename="' + filename + '"';
@@ -15118,7 +15118,7 @@ var require_compile = __commonJS({
15118
15118
  const schOrFunc = root.refs[ref];
15119
15119
  if (schOrFunc)
15120
15120
  return schOrFunc;
15121
- let _sch = resolve13.call(this, root, ref);
15121
+ let _sch = resolve14.call(this, root, ref);
15122
15122
  if (_sch === void 0) {
15123
15123
  const schema = (_a2 = root.localRefs) === null || _a2 === void 0 ? void 0 : _a2[ref];
15124
15124
  const { schemaId } = this.opts;
@@ -15145,7 +15145,7 @@ var require_compile = __commonJS({
15145
15145
  function sameSchemaEnv(s1, s2) {
15146
15146
  return s1.schema === s2.schema && s1.root === s2.root && s1.baseId === s2.baseId;
15147
15147
  }
15148
- function resolve13(root, ref) {
15148
+ function resolve14(root, ref) {
15149
15149
  let sch;
15150
15150
  while (typeof (sch = this.refs[ref]) == "string")
15151
15151
  ref = sch;
@@ -15360,8 +15360,8 @@ var require_utils = __commonJS({
15360
15360
  }
15361
15361
  return ind;
15362
15362
  }
15363
- function removeDotSegments(path15) {
15364
- let input2 = path15;
15363
+ function removeDotSegments(path17) {
15364
+ let input2 = path17;
15365
15365
  const output2 = [];
15366
15366
  let nextSlash = -1;
15367
15367
  let len = 0;
@@ -15560,8 +15560,8 @@ var require_schemes = __commonJS({
15560
15560
  wsComponent.secure = void 0;
15561
15561
  }
15562
15562
  if (wsComponent.resourceName) {
15563
- const [path15, query] = wsComponent.resourceName.split("?");
15564
- wsComponent.path = path15 && path15 !== "/" ? path15 : void 0;
15563
+ const [path17, query] = wsComponent.resourceName.split("?");
15564
+ wsComponent.path = path17 && path17 !== "/" ? path17 : void 0;
15565
15565
  wsComponent.query = query;
15566
15566
  wsComponent.resourceName = void 0;
15567
15567
  }
@@ -15720,7 +15720,7 @@ var require_fast_uri = __commonJS({
15720
15720
  }
15721
15721
  return uri;
15722
15722
  }
15723
- function resolve13(baseURI, relativeURI, options) {
15723
+ function resolve14(baseURI, relativeURI, options) {
15724
15724
  const schemelessOptions = options ? Object.assign({ scheme: "null" }, options) : { scheme: "null" };
15725
15725
  const resolved = resolveComponent(parse5(baseURI, schemelessOptions), parse5(relativeURI, schemelessOptions), schemelessOptions, true);
15726
15726
  schemelessOptions.skipEscape = true;
@@ -15947,7 +15947,7 @@ var require_fast_uri = __commonJS({
15947
15947
  var fastUri = {
15948
15948
  SCHEMES,
15949
15949
  normalize,
15950
- resolve: resolve13,
15950
+ resolve: resolve14,
15951
15951
  resolveComponent,
15952
15952
  equal,
15953
15953
  serialize,
@@ -18767,8 +18767,8 @@ function validateAgainstSchemaDetailed(value, schemaPath, basePath, workspaceRoo
18767
18767
  if (!valid && validate3.errors) {
18768
18768
  const errors = validate3.errors.map((err) => convertAjvError(err, value));
18769
18769
  const errorStrings = validate3.errors.map((err) => {
18770
- const path15 = err.instancePath || "(root)";
18771
- return `${path15}: ${err.message}`;
18770
+ const path17 = err.instancePath || "(root)";
18771
+ return `${path17}: ${err.message}`;
18772
18772
  });
18773
18773
  return {
18774
18774
  valid: false,
@@ -18806,8 +18806,8 @@ function validateAgainstSchemaObjectDetailed(value, schema) {
18806
18806
  if (!valid && validate3.errors) {
18807
18807
  const errors = validate3.errors.map((err) => convertAjvError(err, value));
18808
18808
  const errorStrings = validate3.errors.map((err) => {
18809
- const path15 = err.instancePath || "(root)";
18810
- return `${path15}: ${err.message}`;
18809
+ const path17 = err.instancePath || "(root)";
18810
+ return `${path17}: ${err.message}`;
18811
18811
  });
18812
18812
  return {
18813
18813
  valid: false,
@@ -18977,7 +18977,7 @@ function resolveValue(expr, responses, variables, getValueByPath2, responseIndex
18977
18977
  if (refMatch) {
18978
18978
  const responseIdx = parseInt(refMatch[1], 10);
18979
18979
  const responseIndex = responseIdx - 1;
18980
- const path15 = refMatch[2];
18980
+ const path17 = refMatch[2];
18981
18981
  if (responseIndex < 0 || responseIndex >= responses.length) {
18982
18982
  return {
18983
18983
  value: void 0,
@@ -18985,12 +18985,12 @@ function resolveValue(expr, responses, variables, getValueByPath2, responseIndex
18985
18985
  };
18986
18986
  }
18987
18987
  const response = responses[responseIndex];
18988
- const value = getValueByPath2(response, path15);
18988
+ const value = getValueByPath2(response, path17);
18989
18989
  return {
18990
18990
  value,
18991
18991
  responseIndex: responseIdx,
18992
18992
  response,
18993
- jsonPath: path15,
18993
+ jsonPath: path17,
18994
18994
  variableName: responseIndexToVariable?.get(responseIdx)
18995
18995
  };
18996
18996
  }
@@ -19007,22 +19007,22 @@ function resolveValue(expr, responses, variables, getValueByPath2, responseIndex
19007
19007
  if (varName in variables) {
19008
19008
  const varValue = variables[varName];
19009
19009
  if (typeof varValue === "object" && varValue !== null) {
19010
- const path15 = pathPart.replace(/^\./, "");
19011
- const value = getNestedValue2(varValue, path15);
19010
+ const path17 = pathPart.replace(/^\./, "");
19011
+ const value = getNestedValue2(varValue, path17);
19012
19012
  const isHttpResponse = "status" in varValue && "body" in varValue;
19013
19013
  return {
19014
19014
  value,
19015
19015
  variableName: varName,
19016
- jsonPath: path15,
19016
+ jsonPath: path17,
19017
19017
  response: isHttpResponse ? varValue : void 0
19018
19018
  };
19019
19019
  }
19020
19020
  if (typeof varValue === "string") {
19021
19021
  try {
19022
19022
  const parsed = JSON.parse(varValue);
19023
- const path15 = pathPart.replace(/^\./, "");
19024
- const value = getNestedValue2(parsed, path15);
19025
- return { value, variableName: varName, jsonPath: path15 };
19023
+ const path17 = pathPart.replace(/^\./, "");
19024
+ const value = getNestedValue2(parsed, path17);
19025
+ return { value, variableName: varName, jsonPath: path17 };
19026
19026
  } catch {
19027
19027
  return { value: void 0, error: `Cannot access path on non-object variable: ${varName}` };
19028
19028
  }
@@ -19051,14 +19051,14 @@ function resolveValue(expr, responses, variables, getValueByPath2, responseIndex
19051
19051
  const varValue = variables[varName];
19052
19052
  if (pathPart) {
19053
19053
  if (typeof varValue === "object" && varValue !== null) {
19054
- const path15 = pathPart.replace(/^\./, "");
19055
- return { value: getNestedValue2(varValue, path15) };
19054
+ const path17 = pathPart.replace(/^\./, "");
19055
+ return { value: getNestedValue2(varValue, path17) };
19056
19056
  }
19057
19057
  if (typeof varValue === "string") {
19058
19058
  try {
19059
19059
  const parsed = JSON.parse(varValue);
19060
- const path15 = pathPart.replace(/^\./, "");
19061
- return { value: getNestedValue2(parsed, path15) };
19060
+ const path17 = pathPart.replace(/^\./, "");
19061
+ return { value: getNestedValue2(parsed, path17) };
19062
19062
  } catch {
19063
19063
  return { value: void 0, error: `Cannot access path on non-object variable: ${varName}` };
19064
19064
  }
@@ -19095,8 +19095,8 @@ function resolveValue(expr, responses, variables, getValueByPath2, responseIndex
19095
19095
  }
19096
19096
  return { value: void 0, error: `Cannot resolve expression: ${trimmed}` };
19097
19097
  }
19098
- function getNestedValue2(obj, path15) {
19099
- return getNestedPathValue(obj, path15);
19098
+ function getNestedValue2(obj, path17) {
19099
+ return getNestedPathValue(obj, path17);
19100
19100
  }
19101
19101
  function areValuesEqual(leftValue, rightValue) {
19102
19102
  if (leftValue === rightValue) {
@@ -20978,15 +20978,15 @@ var require_pg_connection_string = __commonJS({
20978
20978
  if (config2.sslcert || config2.sslkey || config2.sslrootcert || config2.sslmode) {
20979
20979
  config2.ssl = {};
20980
20980
  }
20981
- const fs19 = config2.sslcert || config2.sslkey || config2.sslrootcert ? require("fs") : null;
20981
+ const fs21 = config2.sslcert || config2.sslkey || config2.sslrootcert ? require("fs") : null;
20982
20982
  if (config2.sslcert) {
20983
- config2.ssl.cert = fs19.readFileSync(config2.sslcert).toString();
20983
+ config2.ssl.cert = fs21.readFileSync(config2.sslcert).toString();
20984
20984
  }
20985
20985
  if (config2.sslkey) {
20986
- config2.ssl.key = fs19.readFileSync(config2.sslkey).toString();
20986
+ config2.ssl.key = fs21.readFileSync(config2.sslkey).toString();
20987
20987
  }
20988
20988
  if (config2.sslrootcert) {
20989
- config2.ssl.ca = fs19.readFileSync(config2.sslrootcert).toString();
20989
+ config2.ssl.ca = fs21.readFileSync(config2.sslrootcert).toString();
20990
20990
  }
20991
20991
  if (options.useLibpqCompat && config2.uselibpqcompat) {
20992
20992
  throw new Error("Both useLibpqCompat and uselibpqcompat are set. Please use only one of them.");
@@ -22382,7 +22382,7 @@ var require_dist = __commonJS({
22382
22382
  function parse5(stream4, callback) {
22383
22383
  const parser = new parser_1.Parser();
22384
22384
  stream4.on("data", (buffer) => parser.parse(buffer, callback));
22385
- return new Promise((resolve13) => stream4.on("end", () => resolve13()));
22385
+ return new Promise((resolve14) => stream4.on("end", () => resolve14()));
22386
22386
  }
22387
22387
  exports2.parse = parse5;
22388
22388
  }
@@ -22751,7 +22751,7 @@ var require_split2 = __commonJS({
22751
22751
  var require_helper = __commonJS({
22752
22752
  "node_modules/pgpass/lib/helper.js"(exports2, module2) {
22753
22753
  "use strict";
22754
- var path15 = require("path");
22754
+ var path17 = require("path");
22755
22755
  var Stream = require("stream").Stream;
22756
22756
  var split = require_split2();
22757
22757
  var util4 = require("util");
@@ -22790,7 +22790,7 @@ var require_helper = __commonJS({
22790
22790
  };
22791
22791
  module2.exports.getFileName = function(rawEnv) {
22792
22792
  var env3 = rawEnv || process.env;
22793
- var file2 = env3.PGPASSFILE || (isWin ? path15.join(env3.APPDATA || "./", "postgresql", "pgpass.conf") : path15.join(env3.HOME || "./", ".pgpass"));
22793
+ var file2 = env3.PGPASSFILE || (isWin ? path17.join(env3.APPDATA || "./", "postgresql", "pgpass.conf") : path17.join(env3.HOME || "./", ".pgpass"));
22794
22794
  return file2;
22795
22795
  };
22796
22796
  module2.exports.usePgPass = function(stats, fname) {
@@ -22922,16 +22922,16 @@ var require_helper = __commonJS({
22922
22922
  var require_lib = __commonJS({
22923
22923
  "node_modules/pgpass/lib/index.js"(exports2, module2) {
22924
22924
  "use strict";
22925
- var path15 = require("path");
22926
- var fs19 = require("fs");
22925
+ var path17 = require("path");
22926
+ var fs21 = require("fs");
22927
22927
  var helper = require_helper();
22928
22928
  module2.exports = function(connInfo, cb) {
22929
22929
  var file2 = helper.getFileName();
22930
- fs19.stat(file2, function(err, stat) {
22930
+ fs21.stat(file2, function(err, stat) {
22931
22931
  if (err || !helper.usePgPass(stat, file2)) {
22932
22932
  return cb(void 0);
22933
22933
  }
22934
- var st = fs19.createReadStream(file2);
22934
+ var st = fs21.createReadStream(file2);
22935
22935
  helper.getPassword(connInfo, st, cb);
22936
22936
  });
22937
22937
  };
@@ -23113,12 +23113,12 @@ var require_client = __commonJS({
23113
23113
  this._connect(callback);
23114
23114
  return;
23115
23115
  }
23116
- return new this._Promise((resolve13, reject) => {
23116
+ return new this._Promise((resolve14, reject) => {
23117
23117
  this._connect((error2) => {
23118
23118
  if (error2) {
23119
23119
  reject(error2);
23120
23120
  } else {
23121
- resolve13(this);
23121
+ resolve14(this);
23122
23122
  }
23123
23123
  });
23124
23124
  });
@@ -23464,8 +23464,8 @@ var require_client = __commonJS({
23464
23464
  readTimeout = config2.query_timeout || this.connectionParameters.query_timeout;
23465
23465
  query = new Query2(config2, values, callback);
23466
23466
  if (!query.callback) {
23467
- result = new this._Promise((resolve13, reject) => {
23468
- query.callback = (err, res) => err ? reject(err) : resolve13(res);
23467
+ result = new this._Promise((resolve14, reject) => {
23468
+ query.callback = (err, res) => err ? reject(err) : resolve14(res);
23469
23469
  }).catch((err) => {
23470
23470
  Error.captureStackTrace(err);
23471
23471
  throw err;
@@ -23542,8 +23542,8 @@ var require_client = __commonJS({
23542
23542
  if (cb) {
23543
23543
  this.connection.once("end", cb);
23544
23544
  } else {
23545
- return new this._Promise((resolve13) => {
23546
- this.connection.once("end", resolve13);
23545
+ return new this._Promise((resolve14) => {
23546
+ this.connection.once("end", resolve14);
23547
23547
  });
23548
23548
  }
23549
23549
  }
@@ -23592,8 +23592,8 @@ var require_pg_pool = __commonJS({
23592
23592
  const cb = function(err, client) {
23593
23593
  err ? rej(err) : res(client);
23594
23594
  };
23595
- const result = new Promise2(function(resolve13, reject) {
23596
- res = resolve13;
23595
+ const result = new Promise2(function(resolve14, reject) {
23596
+ res = resolve14;
23597
23597
  rej = reject;
23598
23598
  }).catch((err) => {
23599
23599
  Error.captureStackTrace(err);
@@ -23654,7 +23654,7 @@ var require_pg_pool = __commonJS({
23654
23654
  if (typeof Promise2.try === "function") {
23655
23655
  return Promise2.try(f);
23656
23656
  }
23657
- return new Promise2((resolve13) => resolve13(f()));
23657
+ return new Promise2((resolve14) => resolve14(f()));
23658
23658
  }
23659
23659
  _isFull() {
23660
23660
  return this._clients.length >= this.options.max;
@@ -24047,8 +24047,8 @@ var require_query2 = __commonJS({
24047
24047
  NativeQuery.prototype._getPromise = function() {
24048
24048
  if (this._promise) return this._promise;
24049
24049
  this._promise = new Promise(
24050
- function(resolve13, reject) {
24051
- this._once("end", resolve13);
24050
+ function(resolve14, reject) {
24051
+ this._once("end", resolve14);
24052
24052
  this._once("error", reject);
24053
24053
  }.bind(this)
24054
24054
  );
@@ -24225,12 +24225,12 @@ var require_client2 = __commonJS({
24225
24225
  this._connect(callback);
24226
24226
  return;
24227
24227
  }
24228
- return new this._Promise((resolve13, reject) => {
24228
+ return new this._Promise((resolve14, reject) => {
24229
24229
  this._connect((error2) => {
24230
24230
  if (error2) {
24231
24231
  reject(error2);
24232
24232
  } else {
24233
- resolve13(this);
24233
+ resolve14(this);
24234
24234
  }
24235
24235
  });
24236
24236
  });
@@ -24254,8 +24254,8 @@ var require_client2 = __commonJS({
24254
24254
  query = new NativeQuery(config2, values, callback);
24255
24255
  if (!query.callback) {
24256
24256
  let resolveOut, rejectOut;
24257
- result = new this._Promise((resolve13, reject) => {
24258
- resolveOut = resolve13;
24257
+ result = new this._Promise((resolve14, reject) => {
24258
+ resolveOut = resolve14;
24259
24259
  rejectOut = reject;
24260
24260
  }).catch((err) => {
24261
24261
  Error.captureStackTrace(err);
@@ -24315,8 +24315,8 @@ var require_client2 = __commonJS({
24315
24315
  }
24316
24316
  let result;
24317
24317
  if (!cb) {
24318
- result = new this._Promise(function(resolve13, reject) {
24319
- cb = (err) => err ? reject(err) : resolve13();
24318
+ result = new this._Promise(function(resolve14, reject) {
24319
+ cb = (err) => err ? reject(err) : resolve14();
24320
24320
  });
24321
24321
  }
24322
24322
  this.native.end(function() {
@@ -25014,15 +25014,15 @@ var require_utils4 = __commonJS({
25014
25014
  Object.defineProperty(exports2, "__esModule", { value: true });
25015
25015
  var PromiseInspection_1 = require_PromiseInspection();
25016
25016
  function defer() {
25017
- let resolve13 = null;
25017
+ let resolve14 = null;
25018
25018
  let reject = null;
25019
25019
  const promise2 = new Promise((resolver, rejecter) => {
25020
- resolve13 = resolver;
25020
+ resolve14 = resolver;
25021
25021
  reject = rejecter;
25022
25022
  });
25023
25023
  return {
25024
25024
  promise: promise2,
25025
- resolve: resolve13,
25025
+ resolve: resolve14,
25026
25026
  reject
25027
25027
  };
25028
25028
  }
@@ -25047,7 +25047,7 @@ var require_utils4 = __commonJS({
25047
25047
  }
25048
25048
  exports2.checkRequiredTime = checkRequiredTime;
25049
25049
  function delay(millis) {
25050
- return new Promise((resolve13) => setTimeout(resolve13, millis));
25050
+ return new Promise((resolve14) => setTimeout(resolve14, millis));
25051
25051
  }
25052
25052
  exports2.delay = delay;
25053
25053
  function reflect(promise2) {
@@ -25107,11 +25107,11 @@ var require_PendingOperation = __commonJS({
25107
25107
  };
25108
25108
  exports2.PendingOperation = PendingOperation;
25109
25109
  function timeout(promise2, time3) {
25110
- return new Promise((resolve13, reject) => {
25110
+ return new Promise((resolve14, reject) => {
25111
25111
  const timeoutHandle = setTimeout(() => reject(new TimeoutError_1.TimeoutError()), time3);
25112
25112
  promise2.then((result) => {
25113
25113
  clearTimeout(timeoutHandle);
25114
- resolve13(result);
25114
+ resolve14(result);
25115
25115
  }).catch((err) => {
25116
25116
  clearTimeout(timeoutHandle);
25117
25117
  reject(err);
@@ -25319,15 +25319,15 @@ var require_Pool = __commonJS({
25319
25319
  this._stopReaping();
25320
25320
  this.destroyed = true;
25321
25321
  return utils_1.reflect(Promise.all(this.pendingCreates.map((create) => utils_1.reflect(create.promise))).then(() => {
25322
- return new Promise((resolve13, reject) => {
25322
+ return new Promise((resolve14, reject) => {
25323
25323
  if (this.numPendingValidations() === 0) {
25324
- resolve13();
25324
+ resolve14();
25325
25325
  return;
25326
25326
  }
25327
25327
  const interval = setInterval(() => {
25328
25328
  if (this.numPendingValidations() === 0) {
25329
25329
  timers_1.clearInterval(interval);
25330
- resolve13();
25330
+ resolve14();
25331
25331
  }
25332
25332
  }, 100);
25333
25333
  });
@@ -25551,17 +25551,17 @@ var require_Pool = __commonJS({
25551
25551
  }
25552
25552
  }
25553
25553
  function callbackOrPromise(func) {
25554
- return new Promise((resolve13, reject) => {
25554
+ return new Promise((resolve14, reject) => {
25555
25555
  const callback = (err, resource) => {
25556
25556
  if (err) {
25557
25557
  reject(err);
25558
25558
  } else {
25559
- resolve13(resource);
25559
+ resolve14(resource);
25560
25560
  }
25561
25561
  };
25562
25562
  utils_1.tryPromise(() => func(callback)).then((res) => {
25563
25563
  if (res) {
25564
- resolve13(res);
25564
+ resolve14(res);
25565
25565
  }
25566
25566
  }).catch((err) => {
25567
25567
  reject(err);
@@ -25995,7 +25995,7 @@ var require_table = __commonJS({
25995
25995
  let cursor = -1;
25996
25996
  let buffer = "";
25997
25997
  let escaped = false;
25998
- const path15 = [];
25998
+ const path17 = [];
25999
25999
  while (++cursor < length) {
26000
26000
  const char = name.charAt(cursor);
26001
26001
  if (char === "[") {
@@ -26014,7 +26014,7 @@ var require_table = __commonJS({
26014
26014
  if (escaped) {
26015
26015
  buffer += char;
26016
26016
  } else {
26017
- path15.push(buffer);
26017
+ path17.push(buffer);
26018
26018
  buffer = "";
26019
26019
  }
26020
26020
  } else {
@@ -26022,26 +26022,26 @@ var require_table = __commonJS({
26022
26022
  }
26023
26023
  }
26024
26024
  if (buffer) {
26025
- path15.push(buffer);
26025
+ path17.push(buffer);
26026
26026
  }
26027
- switch (path15.length) {
26027
+ switch (path17.length) {
26028
26028
  case 1:
26029
26029
  return {
26030
- name: path15[0],
26030
+ name: path17[0],
26031
26031
  schema: null,
26032
26032
  database: null
26033
26033
  };
26034
26034
  case 2:
26035
26035
  return {
26036
- name: path15[1],
26037
- schema: path15[0],
26036
+ name: path17[1],
26037
+ schema: path17[0],
26038
26038
  database: null
26039
26039
  };
26040
26040
  case 3:
26041
26041
  return {
26042
- name: path15[2],
26043
- schema: path15[1],
26044
- database: path15[0]
26042
+ name: path17[2],
26043
+ schema: path17[1],
26044
+ database: path17[0]
26045
26045
  };
26046
26046
  default:
26047
26047
  throw new Error("Invalid table name.");
@@ -26627,10 +26627,10 @@ var require_connection_pool = __commonJS({
26627
26627
  this._connect(callback);
26628
26628
  return this;
26629
26629
  }
26630
- return new shared.Promise((resolve13, reject) => {
26630
+ return new shared.Promise((resolve14, reject) => {
26631
26631
  return this._connect((err) => {
26632
26632
  if (err) return reject(err);
26633
- resolve13(this);
26633
+ resolve14(this);
26634
26634
  });
26635
26635
  });
26636
26636
  }
@@ -26711,10 +26711,10 @@ var require_connection_pool = __commonJS({
26711
26711
  this._close(callback);
26712
26712
  return this;
26713
26713
  }
26714
- return new shared.Promise((resolve13, reject) => {
26714
+ return new shared.Promise((resolve14, reject) => {
26715
26715
  this._close((err) => {
26716
26716
  if (err) return reject(err);
26717
- resolve13(this);
26717
+ resolve14(this);
26718
26718
  });
26719
26719
  });
26720
26720
  }
@@ -26875,8 +26875,8 @@ var require_global_connection = __commonJS({
26875
26875
  setImmediate(callback);
26876
26876
  return null;
26877
26877
  }
26878
- return new shared.Promise((resolve13) => {
26879
- resolve13(globalConnection);
26878
+ return new shared.Promise((resolve14) => {
26879
+ resolve14(globalConnection);
26880
26880
  });
26881
26881
  }
26882
26882
  function on(event, handler) {
@@ -27087,10 +27087,10 @@ var require_prepared_statement = __commonJS({
27087
27087
  this._prepare(statement, callback);
27088
27088
  return this;
27089
27089
  }
27090
- return new shared.Promise((resolve13, reject) => {
27090
+ return new shared.Promise((resolve14, reject) => {
27091
27091
  this._prepare(statement, (err) => {
27092
27092
  if (err) return reject(err);
27093
- resolve13(this);
27093
+ resolve14(this);
27094
27094
  });
27095
27095
  });
27096
27096
  }
@@ -27153,10 +27153,10 @@ var require_prepared_statement = __commonJS({
27153
27153
  if (this.stream || typeof callback === "function") {
27154
27154
  return this._execute(values, callback);
27155
27155
  }
27156
- return new shared.Promise((resolve13, reject) => {
27156
+ return new shared.Promise((resolve14, reject) => {
27157
27157
  this._execute(values, (err, recordset) => {
27158
27158
  if (err) return reject(err);
27159
- resolve13(recordset);
27159
+ resolve14(recordset);
27160
27160
  });
27161
27161
  });
27162
27162
  }
@@ -27202,10 +27202,10 @@ var require_prepared_statement = __commonJS({
27202
27202
  this._unprepare(callback);
27203
27203
  return this;
27204
27204
  }
27205
- return new shared.Promise((resolve13, reject) => {
27205
+ return new shared.Promise((resolve14, reject) => {
27206
27206
  this._unprepare((err) => {
27207
27207
  if (err) return reject(err);
27208
- resolve13();
27208
+ resolve14();
27209
27209
  });
27210
27210
  });
27211
27211
  }
@@ -27449,7 +27449,7 @@ var require_request = __commonJS({
27449
27449
  const strings = values.shift();
27450
27450
  batch = this._template(strings, values);
27451
27451
  }
27452
- return new shared.Promise((resolve13, reject) => {
27452
+ return new shared.Promise((resolve14, reject) => {
27453
27453
  this._batch(batch, (err, recordsets, output2, rowsAffected) => {
27454
27454
  if (this.stream) {
27455
27455
  if (err) this.emit("error", err);
@@ -27460,7 +27460,7 @@ var require_request = __commonJS({
27460
27460
  });
27461
27461
  }
27462
27462
  if (err) return reject(err);
27463
- resolve13({
27463
+ resolve14({
27464
27464
  recordsets,
27465
27465
  recordset: recordsets && recordsets[0],
27466
27466
  output: output2,
@@ -27516,10 +27516,10 @@ var require_request = __commonJS({
27516
27516
  });
27517
27517
  return this;
27518
27518
  }
27519
- return new shared.Promise((resolve13, reject) => {
27519
+ return new shared.Promise((resolve14, reject) => {
27520
27520
  this._bulk(table, options, (err, rowsAffected) => {
27521
27521
  if (err) return reject(err);
27522
- resolve13({
27522
+ resolve14({
27523
27523
  rowsAffected
27524
27524
  });
27525
27525
  });
@@ -27620,7 +27620,7 @@ var require_request = __commonJS({
27620
27620
  const strings = values.shift();
27621
27621
  command = this._template(strings, values);
27622
27622
  }
27623
- return new shared.Promise((resolve13, reject) => {
27623
+ return new shared.Promise((resolve14, reject) => {
27624
27624
  this._query(command, (err, recordsets, output2, rowsAffected, columns) => {
27625
27625
  if (this.stream) {
27626
27626
  if (err) this.emit("error", err);
@@ -27638,7 +27638,7 @@ var require_request = __commonJS({
27638
27638
  rowsAffected
27639
27639
  };
27640
27640
  if (this.arrayRowMode) result.columns = columns;
27641
- resolve13(result);
27641
+ resolve14(result);
27642
27642
  });
27643
27643
  });
27644
27644
  }
@@ -27692,7 +27692,7 @@ var require_request = __commonJS({
27692
27692
  });
27693
27693
  return this;
27694
27694
  }
27695
- return new shared.Promise((resolve13, reject) => {
27695
+ return new shared.Promise((resolve14, reject) => {
27696
27696
  this._execute(command, (err, recordsets, output2, returnValue, rowsAffected, columns) => {
27697
27697
  if (this.stream) {
27698
27698
  if (err) this.emit("error", err);
@@ -27712,7 +27712,7 @@ var require_request = __commonJS({
27712
27712
  returnValue
27713
27713
  };
27714
27714
  if (this.arrayRowMode) result.columns = columns;
27715
- resolve13(result);
27715
+ resolve14(result);
27716
27716
  });
27717
27717
  });
27718
27718
  }
@@ -27876,11 +27876,11 @@ var require_transaction = __commonJS({
27876
27876
  });
27877
27877
  return this;
27878
27878
  }
27879
- return new shared.Promise((resolve13, reject) => {
27879
+ return new shared.Promise((resolve14, reject) => {
27880
27880
  this._begin(isolationLevel, (err) => {
27881
27881
  if (err) return reject(err);
27882
27882
  this.emit("begin");
27883
- resolve13(this);
27883
+ resolve14(this);
27884
27884
  });
27885
27885
  });
27886
27886
  }
@@ -27923,11 +27923,11 @@ var require_transaction = __commonJS({
27923
27923
  });
27924
27924
  return this;
27925
27925
  }
27926
- return new shared.Promise((resolve13, reject) => {
27926
+ return new shared.Promise((resolve14, reject) => {
27927
27927
  this._commit((err) => {
27928
27928
  if (err) return reject(err);
27929
27929
  this.emit("commit");
27930
- resolve13();
27930
+ resolve14();
27931
27931
  });
27932
27932
  });
27933
27933
  }
@@ -27972,11 +27972,11 @@ var require_transaction = __commonJS({
27972
27972
  });
27973
27973
  return this;
27974
27974
  }
27975
- return new shared.Promise((resolve13, reject) => {
27975
+ return new shared.Promise((resolve14, reject) => {
27976
27976
  return this._rollback((err) => {
27977
27977
  if (err) return reject(err);
27978
27978
  this.emit("rollback", this._aborted);
27979
- resolve13();
27979
+ resolve14();
27980
27980
  });
27981
27981
  });
27982
27982
  }
@@ -29217,11 +29217,11 @@ function __metadata(metadataKey, metadataValue) {
29217
29217
  }
29218
29218
  function __awaiter(thisArg, _arguments, P, generator) {
29219
29219
  function adopt(value) {
29220
- return value instanceof P ? value : new P(function(resolve13) {
29221
- resolve13(value);
29220
+ return value instanceof P ? value : new P(function(resolve14) {
29221
+ resolve14(value);
29222
29222
  });
29223
29223
  }
29224
- return new (P || (P = Promise))(function(resolve13, reject) {
29224
+ return new (P || (P = Promise))(function(resolve14, reject) {
29225
29225
  function fulfilled(value) {
29226
29226
  try {
29227
29227
  step(generator.next(value));
@@ -29237,7 +29237,7 @@ function __awaiter(thisArg, _arguments, P, generator) {
29237
29237
  }
29238
29238
  }
29239
29239
  function step(result) {
29240
- result.done ? resolve13(result.value) : adopt(result.value).then(fulfilled, rejected);
29240
+ result.done ? resolve14(result.value) : adopt(result.value).then(fulfilled, rejected);
29241
29241
  }
29242
29242
  step((generator = generator.apply(thisArg, _arguments || [])).next());
29243
29243
  });
@@ -29428,14 +29428,14 @@ function __asyncValues(o) {
29428
29428
  }, i);
29429
29429
  function verb(n) {
29430
29430
  i[n] = o[n] && function(v) {
29431
- return new Promise(function(resolve13, reject) {
29432
- v = o[n](v), settle2(resolve13, reject, v.done, v.value);
29431
+ return new Promise(function(resolve14, reject) {
29432
+ v = o[n](v), settle2(resolve14, reject, v.done, v.value);
29433
29433
  });
29434
29434
  };
29435
29435
  }
29436
- function settle2(resolve13, reject, d, v) {
29436
+ function settle2(resolve14, reject, d, v) {
29437
29437
  Promise.resolve(v).then(function(v2) {
29438
- resolve13({ value: v2, done: d });
29438
+ resolve14({ value: v2, done: d });
29439
29439
  }, reject);
29440
29440
  }
29441
29441
  }
@@ -29527,13 +29527,13 @@ function __disposeResources(env3) {
29527
29527
  }
29528
29528
  return next();
29529
29529
  }
29530
- function __rewriteRelativeImportExtension(path15, preserveJsx) {
29531
- if (typeof path15 === "string" && /^\.\.?\//.test(path15)) {
29532
- return path15.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function(m, tsx, d, ext, cm) {
29530
+ function __rewriteRelativeImportExtension(path17, preserveJsx) {
29531
+ if (typeof path17 === "string" && /^\.\.?\//.test(path17)) {
29532
+ return path17.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function(m, tsx, d, ext, cm) {
29533
29533
  return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : d + ext + "." + cm.toLowerCase() + "js";
29534
29534
  });
29535
29535
  }
29536
- return path15;
29536
+ return path17;
29537
29537
  }
29538
29538
  var extendStatics, __assign, __createBinding, __setModuleDefault, ownKeys, _SuppressedError, tslib_es6_default;
29539
29539
  var init_tslib_es6 = __esm({
@@ -29680,8 +29680,8 @@ var require_msalPlugins = __commonJS({
29680
29680
  }
29681
29681
  };
29682
29682
  exports2.msalNodeFlowVSCodeCredentialControl = {
29683
- setVSCodeAuthRecordPath(path15) {
29684
- exports2.vsCodeAuthRecordPath = path15;
29683
+ setVSCodeAuthRecordPath(path17) {
29684
+ exports2.vsCodeAuthRecordPath = path17;
29685
29685
  },
29686
29686
  setVSCodeBroker(broker) {
29687
29687
  exports2.vsCodeBrokerInfo = {
@@ -33030,7 +33030,7 @@ var require_index_node_BtzY9XyU = __commonJS({
33030
33030
  return cachedAtSec > nowSeconds();
33031
33031
  }
33032
33032
  function delay(t, value) {
33033
- return new Promise((resolve13) => setTimeout(() => resolve13(value), t));
33033
+ return new Promise((resolve14) => setTimeout(() => resolve14(value), t));
33034
33034
  }
33035
33035
  var TimeUtils = /* @__PURE__ */ Object.freeze({
33036
33036
  __proto__: null,
@@ -42422,8 +42422,8 @@ var require_msal_node = __commonJS({
42422
42422
  var crypto8 = require("crypto");
42423
42423
  var msalCommon = require_lib4();
42424
42424
  var jwt2 = require_jsonwebtoken();
42425
- var fs19 = require("fs");
42426
- var path15 = require("path");
42425
+ var fs21 = require("fs");
42426
+ var path17 = require("path");
42427
42427
  var Serializer = class {
42428
42428
  /**
42429
42429
  * serialize the JSON blob
@@ -46216,7 +46216,7 @@ var require_msal_node = __commonJS({
46216
46216
  return cachedAtSec > nowSeconds();
46217
46217
  }
46218
46218
  function delay(t, value) {
46219
- return new Promise((resolve13) => setTimeout(() => resolve13(value), t));
46219
+ return new Promise((resolve14) => setTimeout(() => resolve14(value), t));
46220
46220
  }
46221
46221
  function createIdTokenEntity(homeAccountId, environment, idToken, clientId, tenantId) {
46222
46222
  const idTokenEntity = {
@@ -48919,7 +48919,7 @@ ${body}`;
48919
48919
  Host: ${destinationUrl.host}\r
48920
48920
  Connection: close\r
48921
48921
  ` + postRequestStringContent + "\r\n";
48922
- return new Promise((resolve13, reject) => {
48922
+ return new Promise((resolve14, reject) => {
48923
48923
  const request = http3.request(tunnelRequestOptions);
48924
48924
  if (timeout) {
48925
48925
  request.on("timeout", () => {
@@ -48968,7 +48968,7 @@ Connection: close\r
48968
48968
  if (this.shouldDestroyRequest(httpStatusCode, networkResponse)) {
48969
48969
  request.destroy();
48970
48970
  }
48971
- resolve13(networkResponse);
48971
+ resolve14(networkResponse);
48972
48972
  });
48973
48973
  socket.on("error", (chunk) => {
48974
48974
  request.destroy();
@@ -49010,7 +49010,7 @@ Connection: close\r
49010
49010
  customOptions.timeout = timeout;
49011
49011
  }
49012
49012
  }
49013
- return new Promise((resolve13, reject) => {
49013
+ return new Promise((resolve14, reject) => {
49014
49014
  let request;
49015
49015
  if (customOptions.protocol === "http:") {
49016
49016
  request = http3.request(customOptions);
@@ -49043,7 +49043,7 @@ Connection: close\r
49043
49043
  if (this.shouldDestroyRequest(statusCode, networkResponse)) {
49044
49044
  request.destroy();
49045
49045
  }
49046
- resolve13(networkResponse);
49046
+ resolve14(networkResponse);
49047
49047
  });
49048
49048
  });
49049
49049
  request.on("error", (chunk) => {
@@ -50813,7 +50813,7 @@ Headers: ${JSON.stringify(headers)}`
50813
50813
  if (this.server) {
50814
50814
  throw NodeAuthError.createLoopbackServerAlreadyExistsError();
50815
50815
  }
50816
- return new Promise((resolve13, reject) => {
50816
+ return new Promise((resolve14, reject) => {
50817
50817
  this.server = http3.createServer((req, res) => {
50818
50818
  const url3 = req.url;
50819
50819
  if (!url3) {
@@ -50836,7 +50836,7 @@ Headers: ${JSON.stringify(headers)}`
50836
50836
  if (authCodeResponse.error) {
50837
50837
  res.end(errorTemplate || `Error occurred: ${authCodeResponse.error}`);
50838
50838
  }
50839
- resolve13(authCodeResponse);
50839
+ resolve14(authCodeResponse);
50840
50840
  });
50841
50841
  this.server.listen(0, "127.0.0.1");
50842
50842
  });
@@ -51249,7 +51249,7 @@ Headers: ${JSON.stringify(headers)}`
51249
51249
  * @returns
51250
51250
  */
51251
51251
  async waitForRedirectUri(loopbackClient) {
51252
- return new Promise((resolve13, reject) => {
51252
+ return new Promise((resolve14, reject) => {
51253
51253
  let ticks = 0;
51254
51254
  const id = setInterval(() => {
51255
51255
  if (LOOPBACK_SERVER_CONSTANTS.TIMEOUT_MS / LOOPBACK_SERVER_CONSTANTS.INTERVAL_MS < ticks) {
@@ -51260,7 +51260,7 @@ Headers: ${JSON.stringify(headers)}`
51260
51260
  try {
51261
51261
  const r = loopbackClient.getRedirectUri();
51262
51262
  clearInterval(id);
51263
- resolve13(r);
51263
+ resolve14(r);
51264
51264
  return;
51265
51265
  } catch (e) {
51266
51266
  if (e instanceof AuthError && e.errorCode === NodeAuthErrorMessage.noLoopbackServerExists.code) {
@@ -52014,8 +52014,8 @@ Headers: ${JSON.stringify(headers)}`
52014
52014
  if (DEFAULT_MANAGED_IDENTITY_HTTP_STATUS_CODES_TO_RETRY_ON.includes(httpStatusCode) && currentRetry < DEFAULT_MANAGED_IDENTITY_MAX_RETRIES) {
52015
52015
  const retryAfterDelay = this.linearRetryStrategy.calculateDelay(retryAfterHeader, _DefaultManagedIdentityRetryPolicy.DEFAULT_MANAGED_IDENTITY_RETRY_DELAY_MS);
52016
52016
  logger.verbose(`Retrying request in ${retryAfterDelay}ms (retry attempt: ${currentRetry + 1})`);
52017
- await new Promise((resolve13) => {
52018
- return setTimeout(resolve13, retryAfterDelay);
52017
+ await new Promise((resolve14) => {
52018
+ return setTimeout(resolve14, retryAfterDelay);
52019
52019
  });
52020
52020
  return true;
52021
52021
  }
@@ -52171,7 +52171,7 @@ Headers: ${JSON.stringify(headers)}`
52171
52171
  if (!identityEndpoint || !imdsEndpoint) {
52172
52172
  const fileDetectionPath = AZURE_ARC_FILE_DETECTION[process.platform];
52173
52173
  try {
52174
- fs19.accessSync(fileDetectionPath, fs19.constants.F_OK | fs19.constants.R_OK);
52174
+ fs21.accessSync(fileDetectionPath, fs21.constants.F_OK | fs21.constants.R_OK);
52175
52175
  identityEndpoint = DEFAULT_AZURE_ARC_IDENTITY_ENDPOINT;
52176
52176
  imdsEndpoint = HIMDS_EXECUTABLE_HELPER_STRING;
52177
52177
  } catch (err) {
@@ -52274,7 +52274,7 @@ Headers: ${JSON.stringify(headers)}`
52274
52274
  throw createManagedIdentityError(platformNotSupported);
52275
52275
  }
52276
52276
  const expectedSecretFilePath = SUPPORTED_AZURE_ARC_PLATFORMS[process.platform];
52277
- const fileName = path15.basename(secretFilePath);
52277
+ const fileName = path17.basename(secretFilePath);
52278
52278
  if (!fileName.endsWith(".key")) {
52279
52279
  throw createManagedIdentityError(invalidFileExtension);
52280
52280
  }
@@ -52283,7 +52283,7 @@ Headers: ${JSON.stringify(headers)}`
52283
52283
  }
52284
52284
  let secretFileSize;
52285
52285
  try {
52286
- secretFileSize = await fs19.statSync(secretFilePath).size;
52286
+ secretFileSize = await fs21.statSync(secretFilePath).size;
52287
52287
  } catch (e) {
52288
52288
  throw createManagedIdentityError(unableToReadSecretFile);
52289
52289
  }
@@ -52292,7 +52292,7 @@ Headers: ${JSON.stringify(headers)}`
52292
52292
  }
52293
52293
  let secret;
52294
52294
  try {
52295
- secret = fs19.readFileSync(secretFilePath, EncodingTypes.UTF8);
52295
+ secret = fs21.readFileSync(secretFilePath, EncodingTypes.UTF8);
52296
52296
  } catch (e) {
52297
52297
  throw createManagedIdentityError(unableToReadSecretFile);
52298
52298
  }
@@ -52469,8 +52469,8 @@ Headers: ${JSON.stringify(headers)}`
52469
52469
  if ((HTTP_STATUS_400_CODES_FOR_EXPONENTIAL_STRATEGY.includes(httpStatusCode) || httpStatusCode >= msalCommon.HttpStatus.SERVER_ERROR_RANGE_START && httpStatusCode <= msalCommon.HttpStatus.SERVER_ERROR_RANGE_END && currentRetry < this.maxRetries) && currentRetry < this.maxRetries) {
52470
52470
  const retryAfterDelay = httpStatusCode === msalCommon.HttpStatus.GONE ? _ImdsRetryPolicy.HTTP_STATUS_GONE_RETRY_AFTER_MS : this.exponentialRetryStrategy.calculateDelay(currentRetry);
52471
52471
  logger.verbose(`Retrying request in ${retryAfterDelay}ms (retry attempt: ${currentRetry + 1})`);
52472
- await new Promise((resolve13) => {
52473
- return setTimeout(resolve13, retryAfterDelay);
52472
+ await new Promise((resolve14) => {
52473
+ return setTimeout(resolve14, retryAfterDelay);
52474
52474
  });
52475
52475
  return true;
52476
52476
  }
@@ -53536,7 +53536,7 @@ var require_createAbortablePromise = __commonJS({
53536
53536
  var abort_controller_1 = require_commonjs3();
53537
53537
  function createAbortablePromise(buildPromise, options) {
53538
53538
  const { cleanupBeforeAbort, abortSignal, abortErrorMsg } = options ?? {};
53539
- return new Promise((resolve13, reject) => {
53539
+ return new Promise((resolve14, reject) => {
53540
53540
  function rejectOnAbort() {
53541
53541
  reject(new abort_controller_1.AbortError(abortErrorMsg ?? "The operation was aborted."));
53542
53542
  }
@@ -53554,7 +53554,7 @@ var require_createAbortablePromise = __commonJS({
53554
53554
  try {
53555
53555
  buildPromise((x) => {
53556
53556
  removeListeners();
53557
- resolve13(x);
53557
+ resolve14(x);
53558
53558
  }, (x) => {
53559
53559
  removeListeners();
53560
53560
  reject(x);
@@ -53581,8 +53581,8 @@ var require_delay2 = __commonJS({
53581
53581
  function delay(timeInMs, options) {
53582
53582
  let token;
53583
53583
  const { abortSignal, abortErrorMsg } = options ?? {};
53584
- return (0, createAbortablePromise_js_1.createAbortablePromise)((resolve13) => {
53585
- token = setTimeout(resolve13, timeInMs);
53584
+ return (0, createAbortablePromise_js_1.createAbortablePromise)((resolve14) => {
53585
+ token = setTimeout(resolve14, timeInMs);
53586
53586
  }, {
53587
53587
  cleanupBeforeAbort: () => clearTimeout(token),
53588
53588
  abortSignal,
@@ -55417,9 +55417,9 @@ var require_nodeHttpClient = __commonJS({
55417
55417
  if (stream4.readable === false) {
55418
55418
  return Promise.resolve();
55419
55419
  }
55420
- return new Promise((resolve13) => {
55420
+ return new Promise((resolve14) => {
55421
55421
  const handler = () => {
55422
- resolve13();
55422
+ resolve14();
55423
55423
  stream4.removeListener("close", handler);
55424
55424
  stream4.removeListener("end", handler);
55425
55425
  stream4.removeListener("error", handler);
@@ -55574,8 +55574,8 @@ var require_nodeHttpClient = __commonJS({
55574
55574
  headers: request.headers.toJSON({ preserveCase: true }),
55575
55575
  ...request.requestOverrides
55576
55576
  };
55577
- return new Promise((resolve13, reject) => {
55578
- const req = isInsecure ? import_node_http.default.request(options, resolve13) : import_node_https.default.request(options, resolve13);
55577
+ return new Promise((resolve14, reject) => {
55578
+ const req = isInsecure ? import_node_http.default.request(options, resolve14) : import_node_https.default.request(options, resolve14);
55579
55579
  req.once("error", (err) => {
55580
55580
  reject(
55581
55581
  new import_restError.RestError(err.message, { code: err.code ?? import_restError.RestError.REQUEST_SEND_ERROR, request })
@@ -55663,7 +55663,7 @@ var require_nodeHttpClient = __commonJS({
55663
55663
  return stream4;
55664
55664
  }
55665
55665
  function streamToText(stream4) {
55666
- return new Promise((resolve13, reject) => {
55666
+ return new Promise((resolve14, reject) => {
55667
55667
  const buffer = [];
55668
55668
  stream4.on("data", (chunk) => {
55669
55669
  if (Buffer.isBuffer(chunk)) {
@@ -55673,7 +55673,7 @@ var require_nodeHttpClient = __commonJS({
55673
55673
  }
55674
55674
  });
55675
55675
  stream4.on("end", () => {
55676
- resolve13(Buffer.concat(buffer).toString("utf8"));
55676
+ resolve14(Buffer.concat(buffer).toString("utf8"));
55677
55677
  });
55678
55678
  stream4.on("error", (e) => {
55679
55679
  if (e && e?.name === "AbortError") {
@@ -56113,7 +56113,7 @@ var require_helpers = __commonJS({
56113
56113
  var import_AbortError = require_AbortError2();
56114
56114
  var StandardAbortMessage = "The operation was aborted.";
56115
56115
  function delay(delayInMs, value, options) {
56116
- return new Promise((resolve13, reject) => {
56116
+ return new Promise((resolve14, reject) => {
56117
56117
  let timer = void 0;
56118
56118
  let onAborted = void 0;
56119
56119
  const rejectOnAbort = () => {
@@ -56138,7 +56138,7 @@ var require_helpers = __commonJS({
56138
56138
  }
56139
56139
  timer = setTimeout(() => {
56140
56140
  removeListeners();
56141
- resolve13(value);
56141
+ resolve14(value);
56142
56142
  }, delayInMs);
56143
56143
  if (options?.abortSignal) {
56144
56144
  options.abortSignal.addEventListener("abort", onAborted);
@@ -56633,8 +56633,8 @@ var require_helpers2 = __commonJS({
56633
56633
  function req(url3, opts = {}) {
56634
56634
  const href = typeof url3 === "string" ? url3 : url3.href;
56635
56635
  const req2 = (href.startsWith("https:") ? https3 : http3).request(url3, opts);
56636
- const promise2 = new Promise((resolve13, reject) => {
56637
- req2.once("response", resolve13).once("error", reject).end();
56636
+ const promise2 = new Promise((resolve14, reject) => {
56637
+ req2.once("response", resolve14).once("error", reject).end();
56638
56638
  });
56639
56639
  req2.then = promise2.then.bind(promise2);
56640
56640
  return req2;
@@ -56811,7 +56811,7 @@ var require_parse_proxy_response = __commonJS({
56811
56811
  var debug_1 = __importDefault2(require_src());
56812
56812
  var debug = (0, debug_1.default)("https-proxy-agent:parse-proxy-response");
56813
56813
  function parseProxyResponse(socket) {
56814
- return new Promise((resolve13, reject) => {
56814
+ return new Promise((resolve14, reject) => {
56815
56815
  let buffersLength = 0;
56816
56816
  const buffers = [];
56817
56817
  function read() {
@@ -56877,7 +56877,7 @@ var require_parse_proxy_response = __commonJS({
56877
56877
  }
56878
56878
  debug("got proxy server response: %o %o", firstLine, headers);
56879
56879
  cleanup();
56880
- resolve13({
56880
+ resolve14({
56881
56881
  connect: {
56882
56882
  statusCode,
56883
56883
  statusText,
@@ -58671,8 +58671,8 @@ var require_getClient = __commonJS({
58671
58671
  }
58672
58672
  const { allowInsecureConnection, httpClient } = clientOptions;
58673
58673
  const endpointUrl = clientOptions.endpoint ?? endpoint;
58674
- const client = (path15, ...args) => {
58675
- const getUrl = (requestOptions) => (0, import_urlHelpers.buildRequestUrl)(endpointUrl, path15, args, { allowInsecureConnection, ...requestOptions });
58674
+ const client = (path17, ...args) => {
58675
+ const getUrl = (requestOptions) => (0, import_urlHelpers.buildRequestUrl)(endpointUrl, path17, args, { allowInsecureConnection, ...requestOptions });
58676
58676
  return {
58677
58677
  get: (requestOptions = {}) => {
58678
58678
  return buildOperation(
@@ -61577,15 +61577,15 @@ var require_urlHelpers2 = __commonJS({
61577
61577
  let isAbsolutePath = false;
61578
61578
  let requestUrl = replaceAll(baseUri, urlReplacements);
61579
61579
  if (operationSpec.path) {
61580
- let path15 = replaceAll(operationSpec.path, urlReplacements);
61581
- if (operationSpec.path === "/{nextLink}" && path15.startsWith("/")) {
61582
- path15 = path15.substring(1);
61580
+ let path17 = replaceAll(operationSpec.path, urlReplacements);
61581
+ if (operationSpec.path === "/{nextLink}" && path17.startsWith("/")) {
61582
+ path17 = path17.substring(1);
61583
61583
  }
61584
- if (isAbsoluteUrl(path15)) {
61585
- requestUrl = path15;
61584
+ if (isAbsoluteUrl(path17)) {
61585
+ requestUrl = path17;
61586
61586
  isAbsolutePath = true;
61587
61587
  } else {
61588
- requestUrl = appendPath(requestUrl, path15);
61588
+ requestUrl = appendPath(requestUrl, path17);
61589
61589
  }
61590
61590
  }
61591
61591
  const { queryParams, sequenceParams } = calculateQueryParameters(operationSpec, operationArguments, fallbackObject);
@@ -61631,9 +61631,9 @@ var require_urlHelpers2 = __commonJS({
61631
61631
  }
61632
61632
  const searchStart = pathToAppend.indexOf("?");
61633
61633
  if (searchStart !== -1) {
61634
- const path15 = pathToAppend.substring(0, searchStart);
61634
+ const path17 = pathToAppend.substring(0, searchStart);
61635
61635
  const search = pathToAppend.substring(searchStart + 1);
61636
- newPath = newPath + path15;
61636
+ newPath = newPath + path17;
61637
61637
  if (search) {
61638
61638
  parsedUrl.search = parsedUrl.search ? `${parsedUrl.search}&${search}` : search;
61639
61639
  }
@@ -63108,14 +63108,14 @@ var init_open = __esm({
63108
63108
  }
63109
63109
  const subprocess = import_node_child_process5.default.spawn(command, cliArguments, childProcessOptions);
63110
63110
  if (options.wait) {
63111
- return new Promise((resolve13, reject) => {
63111
+ return new Promise((resolve14, reject) => {
63112
63112
  subprocess.once("error", reject);
63113
63113
  subprocess.once("close", (exitCode) => {
63114
63114
  if (!options.allowNonzeroExitCode && exitCode > 0) {
63115
63115
  reject(new Error(`Exited with code ${exitCode}`));
63116
63116
  return;
63117
63117
  }
63118
- resolve13(subprocess);
63118
+ resolve14(subprocess);
63119
63119
  });
63120
63120
  });
63121
63121
  }
@@ -64607,7 +64607,7 @@ var require_azureDeveloperCliCredential = __commonJS({
64607
64607
  const encodedClaims = btoa(claims);
64608
64608
  claimsSections = ["--claims", encodedClaims];
64609
64609
  }
64610
- return new Promise((resolve13, reject) => {
64610
+ return new Promise((resolve14, reject) => {
64611
64611
  try {
64612
64612
  const args = [
64613
64613
  "auth",
@@ -64624,7 +64624,7 @@ var require_azureDeveloperCliCredential = __commonJS({
64624
64624
  cwd: exports2.developerCliCredentialInternals.getSafeWorkingDir(),
64625
64625
  timeout
64626
64626
  }, (error2, stdout, stderr) => {
64627
- resolve13({ stdout, stderr, error: error2 });
64627
+ resolve14({ stdout, stderr, error: error2 });
64628
64628
  });
64629
64629
  } catch (err) {
64630
64630
  reject(err);
@@ -64793,7 +64793,7 @@ var require_azureCliCredential = __commonJS({
64793
64793
  if (subscription) {
64794
64794
  subscriptionSection = ["--subscription", `"${subscription}"`];
64795
64795
  }
64796
- return new Promise((resolve13, reject) => {
64796
+ return new Promise((resolve14, reject) => {
64797
64797
  try {
64798
64798
  const args = [
64799
64799
  "account",
@@ -64807,7 +64807,7 @@ var require_azureCliCredential = __commonJS({
64807
64807
  ];
64808
64808
  const command = ["az", ...args].join(" ");
64809
64809
  child_process_1.default.exec(command, { cwd: exports2.cliCredentialInternals.getSafeWorkingDir(), timeout }, (error2, stdout, stderr) => {
64810
- resolve13({ stdout, stderr, error: error2 });
64810
+ resolve14({ stdout, stderr, error: error2 });
64811
64811
  });
64812
64812
  } catch (err) {
64813
64813
  reject(err);
@@ -64957,7 +64957,7 @@ var require_processUtils = __commonJS({
64957
64957
  * @internal
64958
64958
  */
64959
64959
  execFile(file2, params, options) {
64960
- return new Promise((resolve13, reject) => {
64960
+ return new Promise((resolve14, reject) => {
64961
64961
  node_child_process_1.default.execFile(file2, params, options, (error2, stdout, stderr) => {
64962
64962
  if (Buffer.isBuffer(stdout)) {
64963
64963
  stdout = stdout.toString("utf8");
@@ -64968,7 +64968,7 @@ var require_processUtils = __commonJS({
64968
64968
  if (stderr || error2) {
64969
64969
  reject(stderr ? new Error(stderr) : error2);
64970
64970
  } else {
64971
- resolve13(stdout);
64971
+ resolve14(stdout);
64972
64972
  }
64973
64973
  });
64974
64974
  });
@@ -66646,7 +66646,7 @@ var require_sender = __commonJS({
66646
66646
  }
66647
66647
  async function sendInParallel(addresses, port, request, signal) {
66648
66648
  signal.throwIfAborted();
66649
- return await new Promise((resolve13, reject) => {
66649
+ return await new Promise((resolve14, reject) => {
66650
66650
  const sockets = [];
66651
66651
  let errorCount = 0;
66652
66652
  const onError = (err) => {
@@ -66660,7 +66660,7 @@ var require_sender = __commonJS({
66660
66660
  const onMessage = (message) => {
66661
66661
  signal.removeEventListener("abort", onAbort);
66662
66662
  clearSockets();
66663
- resolve13(message);
66663
+ resolve14(message);
66664
66664
  };
66665
66665
  const onAbort = () => {
66666
66666
  clearSockets();
@@ -66695,7 +66695,7 @@ var require_sender = __commonJS({
66695
66695
  family: _net.default.isIPv6(host) ? 6 : 4
66696
66696
  }];
66697
66697
  } else {
66698
- addresses = await new Promise((resolve13, reject) => {
66698
+ addresses = await new Promise((resolve14, reject) => {
66699
66699
  const onAbort = () => {
66700
66700
  reject(signal.reason);
66701
66701
  };
@@ -66704,7 +66704,7 @@ var require_sender = __commonJS({
66704
66704
  all: true
66705
66705
  }, (err, addresses2) => {
66706
66706
  signal.removeEventListener("abort", onAbort);
66707
- err ? reject(err) : resolve13(addresses2);
66707
+ err ? reject(err) : resolve14(addresses2);
66708
66708
  });
66709
66709
  });
66710
66710
  }
@@ -70179,25 +70179,25 @@ var require_util2 = __commonJS({
70179
70179
  };
70180
70180
  },
70181
70181
  createDeferredPromise: function() {
70182
- let resolve13;
70182
+ let resolve14;
70183
70183
  let reject;
70184
70184
  const promise2 = new Promise((res, rej) => {
70185
- resolve13 = res;
70185
+ resolve14 = res;
70186
70186
  reject = rej;
70187
70187
  });
70188
70188
  return {
70189
70189
  promise: promise2,
70190
- resolve: resolve13,
70190
+ resolve: resolve14,
70191
70191
  reject
70192
70192
  };
70193
70193
  },
70194
70194
  promisify(fn) {
70195
- return new Promise((resolve13, reject) => {
70195
+ return new Promise((resolve14, reject) => {
70196
70196
  fn((err, ...args) => {
70197
70197
  if (err) {
70198
70198
  return reject(err);
70199
70199
  }
70200
- return resolve13(...args);
70200
+ return resolve14(...args);
70201
70201
  });
70202
70202
  });
70203
70203
  },
@@ -70988,7 +70988,7 @@ var require_end_of_stream = __commonJS({
70988
70988
  validateBoolean(opts.cleanup, "cleanup");
70989
70989
  autoCleanup = opts.cleanup;
70990
70990
  }
70991
- return new Promise2((resolve13, reject) => {
70991
+ return new Promise2((resolve14, reject) => {
70992
70992
  const cleanup = eos(stream4, opts, (err) => {
70993
70993
  if (autoCleanup) {
70994
70994
  cleanup();
@@ -70996,7 +70996,7 @@ var require_end_of_stream = __commonJS({
70996
70996
  if (err) {
70997
70997
  reject(err);
70998
70998
  } else {
70999
- resolve13();
70999
+ resolve14();
71000
71000
  }
71001
71001
  });
71002
71002
  });
@@ -72162,7 +72162,7 @@ var require_readable = __commonJS({
72162
72162
  error2 = this.readableEnded ? null : new AbortError2();
72163
72163
  this.destroy(error2);
72164
72164
  }
72165
- return new Promise2((resolve13, reject) => eos(this, (err) => err && err !== error2 ? reject(err) : resolve13(null)));
72165
+ return new Promise2((resolve14, reject) => eos(this, (err) => err && err !== error2 ? reject(err) : resolve14(null)));
72166
72166
  };
72167
72167
  Readable2.prototype.push = function(chunk, encoding) {
72168
72168
  return readableAddChunk(this, chunk, encoding, false);
@@ -72706,12 +72706,12 @@ var require_readable = __commonJS({
72706
72706
  }
72707
72707
  async function* createAsyncIterator(stream4, options) {
72708
72708
  let callback = nop;
72709
- function next(resolve13) {
72709
+ function next(resolve14) {
72710
72710
  if (this === stream4) {
72711
72711
  callback();
72712
72712
  callback = nop;
72713
72713
  } else {
72714
- callback = resolve13;
72714
+ callback = resolve14;
72715
72715
  }
72716
72716
  }
72717
72717
  stream4.on("readable", next);
@@ -73763,7 +73763,7 @@ var require_duplexify = __commonJS({
73763
73763
  );
73764
73764
  };
73765
73765
  function fromAsyncGen(fn) {
73766
- let { promise: promise2, resolve: resolve13 } = createDeferredPromise();
73766
+ let { promise: promise2, resolve: resolve14 } = createDeferredPromise();
73767
73767
  const ac = new AbortController2();
73768
73768
  const signal = ac.signal;
73769
73769
  const value = fn(
@@ -73778,7 +73778,7 @@ var require_duplexify = __commonJS({
73778
73778
  throw new AbortError2(void 0, {
73779
73779
  cause: signal.reason
73780
73780
  });
73781
- ({ promise: promise2, resolve: resolve13 } = createDeferredPromise());
73781
+ ({ promise: promise2, resolve: resolve14 } = createDeferredPromise());
73782
73782
  yield chunk;
73783
73783
  }
73784
73784
  })(),
@@ -73789,8 +73789,8 @@ var require_duplexify = __commonJS({
73789
73789
  return {
73790
73790
  value,
73791
73791
  write(chunk, encoding, cb) {
73792
- const _resolve = resolve13;
73793
- resolve13 = null;
73792
+ const _resolve = resolve14;
73793
+ resolve14 = null;
73794
73794
  _resolve({
73795
73795
  chunk,
73796
73796
  done: false,
@@ -73798,8 +73798,8 @@ var require_duplexify = __commonJS({
73798
73798
  });
73799
73799
  },
73800
73800
  final(cb) {
73801
- const _resolve = resolve13;
73802
- resolve13 = null;
73801
+ const _resolve = resolve14;
73802
+ resolve14 = null;
73803
73803
  _resolve({
73804
73804
  done: true,
73805
73805
  cb
@@ -74250,7 +74250,7 @@ var require_pipeline4 = __commonJS({
74250
74250
  callback();
74251
74251
  }
74252
74252
  };
74253
- const wait = () => new Promise2((resolve13, reject) => {
74253
+ const wait = () => new Promise2((resolve14, reject) => {
74254
74254
  if (error2) {
74255
74255
  reject(error2);
74256
74256
  } else {
@@ -74258,7 +74258,7 @@ var require_pipeline4 = __commonJS({
74258
74258
  if (error2) {
74259
74259
  reject(error2);
74260
74260
  } else {
74261
- resolve13();
74261
+ resolve14();
74262
74262
  }
74263
74263
  };
74264
74264
  }
@@ -74902,8 +74902,8 @@ var require_operators = __commonJS({
74902
74902
  next = null;
74903
74903
  }
74904
74904
  if (!done && (queue.length >= highWaterMark || cnt >= concurrency)) {
74905
- await new Promise2((resolve13) => {
74906
- resume = resolve13;
74905
+ await new Promise2((resolve14) => {
74906
+ resume = resolve14;
74907
74907
  });
74908
74908
  }
74909
74909
  }
@@ -74937,8 +74937,8 @@ var require_operators = __commonJS({
74937
74937
  queue.shift();
74938
74938
  maybeResume();
74939
74939
  }
74940
- await new Promise2((resolve13) => {
74941
- next = resolve13;
74940
+ await new Promise2((resolve14) => {
74941
+ next = resolve14;
74942
74942
  });
74943
74943
  }
74944
74944
  } finally {
@@ -75196,7 +75196,7 @@ var require_promises = __commonJS({
75196
75196
  var { finished } = require_end_of_stream();
75197
75197
  require_stream2();
75198
75198
  function pipeline(...streams) {
75199
- return new Promise2((resolve13, reject) => {
75199
+ return new Promise2((resolve14, reject) => {
75200
75200
  let signal;
75201
75201
  let end;
75202
75202
  const lastArg = streams[streams.length - 1];
@@ -75211,7 +75211,7 @@ var require_promises = __commonJS({
75211
75211
  if (err) {
75212
75212
  reject(err);
75213
75213
  } else {
75214
- resolve13(value);
75214
+ resolve14(value);
75215
75215
  }
75216
75216
  },
75217
75217
  {
@@ -76078,7 +76078,7 @@ var require_message_io = __commonJS({
76078
76078
  credentialsDetails.maxVersion = "TLSv1.2";
76079
76079
  }
76080
76080
  const secureContext = tls.createSecureContext(credentialsDetails);
76081
- return new Promise((resolve13, reject) => {
76081
+ return new Promise((resolve14, reject) => {
76082
76082
  const duplexpair = new _nativeDuplexpair.default();
76083
76083
  const securePair = this.securePair = {
76084
76084
  cleartext: tls.connect({
@@ -76109,7 +76109,7 @@ var require_message_io = __commonJS({
76109
76109
  securePair.cleartext.pipe(this.incomingMessageStream);
76110
76110
  this.outgoingMessageStream.pipe(securePair.cleartext);
76111
76111
  this.tlsNegotiationComplete = true;
76112
- resolve13();
76112
+ resolve14();
76113
76113
  };
76114
76114
  const onError = (err) => {
76115
76115
  securePair.encrypted.removeListener("readable", onReadable);
@@ -79604,7 +79604,7 @@ var require_js_joda = __commonJS({
79604
79604
  this.fieldValues.put(field, value);
79605
79605
  return this;
79606
79606
  };
79607
- _proto.resolve = function resolve13(resolverStyle, resolverFields) {
79607
+ _proto.resolve = function resolve14(resolverStyle, resolverFields) {
79608
79608
  if (resolverFields != null) {
79609
79609
  this.fieldValues.retainAll(resolverFields);
79610
79610
  }
@@ -80208,7 +80208,7 @@ var require_js_joda = __commonJS({
80208
80208
  _proto.displayName = function displayName() {
80209
80209
  return this.toString();
80210
80210
  };
80211
- _proto.resolve = function resolve13() {
80211
+ _proto.resolve = function resolve14() {
80212
80212
  return null;
80213
80213
  };
80214
80214
  _proto.name = function name() {
@@ -80266,7 +80266,7 @@ var require_js_joda = __commonJS({
80266
80266
  this.range().checkValidValue(newValue, this);
80267
80267
  return temporal.with(ChronoField.DAY_OF_YEAR, temporal.getLong(ChronoField.DAY_OF_YEAR) + (newValue - curValue));
80268
80268
  };
80269
- _proto2.resolve = function resolve13(fieldValues, partialTemporal, resolverStyle) {
80269
+ _proto2.resolve = function resolve14(fieldValues, partialTemporal, resolverStyle) {
80270
80270
  var yearLong = fieldValues.get(ChronoField.YEAR);
80271
80271
  var qoyLong = fieldValues.get(QUARTER_OF_YEAR);
80272
80272
  if (yearLong == null || qoyLong == null) {
@@ -80377,7 +80377,7 @@ var require_js_joda = __commonJS({
80377
80377
  this.range().checkValidValue(newValue, this);
80378
80378
  return temporal.plus(MathUtil.safeSubtract(newValue, this.getFrom(temporal)), ChronoUnit.WEEKS);
80379
80379
  };
80380
- _proto4.resolve = function resolve13(fieldValues, partialTemporal, resolverStyle) {
80380
+ _proto4.resolve = function resolve14(fieldValues, partialTemporal, resolverStyle) {
80381
80381
  var wbyLong = fieldValues.get(WEEK_BASED_YEAR);
80382
80382
  var dowLong = fieldValues.get(ChronoField.DAY_OF_WEEK);
80383
80383
  if (wbyLong == null || dowLong == null) {
@@ -96449,7 +96449,7 @@ var require_connector = __commonJS({
96449
96449
  async function connectInParallel(options, lookup, signal) {
96450
96450
  signal.throwIfAborted();
96451
96451
  const addresses = await lookupAllAddresses(options.host, lookup, signal);
96452
- return await new Promise((resolve13, reject) => {
96452
+ return await new Promise((resolve14, reject) => {
96453
96453
  const sockets = new Array(addresses.length);
96454
96454
  const errors = [];
96455
96455
  function onError(err) {
@@ -96473,7 +96473,7 @@ var require_connector = __commonJS({
96473
96473
  socket.removeListener("connect", onConnect);
96474
96474
  socket.destroy();
96475
96475
  }
96476
- resolve13(this);
96476
+ resolve14(this);
96477
96477
  }
96478
96478
  const onAbort = () => {
96479
96479
  for (let j = 0; j < sockets.length; j++) {
@@ -96504,7 +96504,7 @@ var require_connector = __commonJS({
96504
96504
  const addresses = await lookupAllAddresses(options.host, lookup, signal);
96505
96505
  for (const address of addresses) {
96506
96506
  try {
96507
- return await new Promise((resolve13, reject) => {
96507
+ return await new Promise((resolve14, reject) => {
96508
96508
  const socket = _net.default.connect({
96509
96509
  ...options,
96510
96510
  host: address.address,
@@ -96527,7 +96527,7 @@ var require_connector = __commonJS({
96527
96527
  signal.removeEventListener("abort", onAbort);
96528
96528
  socket.removeListener("error", onError);
96529
96529
  socket.removeListener("connect", onConnect);
96530
- resolve13(socket);
96530
+ resolve14(socket);
96531
96531
  };
96532
96532
  signal.addEventListener("abort", onAbort, {
96533
96533
  once: true
@@ -96556,7 +96556,7 @@ var require_connector = __commonJS({
96556
96556
  family: 4
96557
96557
  }];
96558
96558
  } else {
96559
- return await new Promise((resolve13, reject) => {
96559
+ return await new Promise((resolve14, reject) => {
96560
96560
  const onAbort = () => {
96561
96561
  reject(signal.reason);
96562
96562
  };
@@ -96566,7 +96566,7 @@ var require_connector = __commonJS({
96566
96566
  all: true
96567
96567
  }, (err, addresses) => {
96568
96568
  signal.removeEventListener("abort", onAbort);
96569
- err ? reject(err) : resolve13(addresses);
96569
+ err ? reject(err) : resolve14(addresses);
96570
96570
  });
96571
96571
  });
96572
96572
  }
@@ -97352,15 +97352,15 @@ var require_connection2 = __commonJS({
97352
97352
  var DEFAULT_LANGUAGE = "us_english";
97353
97353
  var DEFAULT_DATEFORMAT = "mdy";
97354
97354
  function withResolvers() {
97355
- let resolve13;
97355
+ let resolve14;
97356
97356
  let reject;
97357
97357
  const promise2 = new Promise((res, rej) => {
97358
- resolve13 = res;
97358
+ resolve14 = res;
97359
97359
  reject = rej;
97360
97360
  });
97361
97361
  return {
97362
97362
  promise: promise2,
97363
- resolve: resolve13,
97363
+ resolve: resolve14,
97364
97364
  reject
97365
97365
  };
97366
97366
  }
@@ -98351,7 +98351,7 @@ var require_connection2 = __commonJS({
98351
98351
  };
98352
98352
  const {
98353
98353
  promise: promise2,
98354
- resolve: resolve13,
98354
+ resolve: resolve14,
98355
98355
  reject
98356
98356
  } = withResolvers();
98357
98357
  const encryptsocket = tls.connect(encryptOptions);
@@ -98365,7 +98365,7 @@ var require_connection2 = __commonJS({
98365
98365
  try {
98366
98366
  const onError = reject;
98367
98367
  const onConnect = () => {
98368
- resolve13(encryptsocket);
98368
+ resolve14(encryptsocket);
98369
98369
  };
98370
98370
  encryptsocket.once("error", onError);
98371
98371
  encryptsocket.once("secureConnect", onConnect);
@@ -99408,9 +99408,9 @@ var require_connection2 = __commonJS({
99408
99408
  this.debug.log("Retry after transient failure connecting to " + server + ":" + port);
99409
99409
  const {
99410
99410
  promise: promise2,
99411
- resolve: resolve13
99411
+ resolve: resolve14
99412
99412
  } = withResolvers();
99413
- setTimeout(resolve13, this.config.options.connectionRetryInterval);
99413
+ setTimeout(resolve14, this.config.options.connectionRetryInterval);
99414
99414
  await promise2;
99415
99415
  this.emit("retry");
99416
99416
  this.transitionTo(this.STATE.CONNECTING);
@@ -99920,15 +99920,15 @@ var require_connection_pool2 = __commonJS({
99920
99920
  return cfg;
99921
99921
  }
99922
99922
  _poolCreate() {
99923
- return new shared.Promise((resolve13, reject) => {
99923
+ return new shared.Promise((resolve14, reject) => {
99924
99924
  const resolveOnce = (v) => {
99925
- resolve13(v);
99926
- resolve13 = reject = () => {
99925
+ resolve14(v);
99926
+ resolve14 = reject = () => {
99927
99927
  };
99928
99928
  };
99929
99929
  const rejectOnce = (e) => {
99930
99930
  reject(e);
99931
- resolve13 = reject = () => {
99931
+ resolve14 = reject = () => {
99932
99932
  };
99933
99933
  };
99934
99934
  let tedious;
@@ -99972,9 +99972,9 @@ var require_connection_pool2 = __commonJS({
99972
99972
  }
99973
99973
  _poolValidate(tedious) {
99974
99974
  if (tedious && !tedious.closed && !tedious.hasError) {
99975
- return !this.config.validateConnection || new shared.Promise((resolve13) => {
99975
+ return !this.config.validateConnection || new shared.Promise((resolve14) => {
99976
99976
  const req = new tds.Request("SELECT 1;", (err) => {
99977
- resolve13(!err);
99977
+ resolve14(!err);
99978
99978
  });
99979
99979
  tedious.execSql(req);
99980
99980
  });
@@ -99982,19 +99982,19 @@ var require_connection_pool2 = __commonJS({
99982
99982
  return false;
99983
99983
  }
99984
99984
  _poolDestroy(tedious) {
99985
- return new shared.Promise((resolve13, reject) => {
99985
+ return new shared.Promise((resolve14, reject) => {
99986
99986
  if (!tedious) {
99987
- resolve13();
99987
+ resolve14();
99988
99988
  return;
99989
99989
  }
99990
99990
  debug("connection(%d): destroying", IDS.get(tedious));
99991
99991
  if (tedious.closed) {
99992
99992
  debug("connection(%d): already closed", IDS.get(tedious));
99993
- resolve13();
99993
+ resolve14();
99994
99994
  } else {
99995
99995
  tedious.once("end", () => {
99996
99996
  debug("connection(%d): destroyed", IDS.get(tedious));
99997
- resolve13();
99997
+ resolve14();
99998
99998
  });
99999
99999
  tedious.close();
100000
100000
  }
@@ -101542,12 +101542,12 @@ var require_dist5 = __commonJS({
101542
101542
  throw new Error(`Unknown format "${name}"`);
101543
101543
  return f;
101544
101544
  };
101545
- function addFormats(ajv2, list, fs19, exportName) {
101545
+ function addFormats(ajv2, list, fs21, exportName) {
101546
101546
  var _a2;
101547
101547
  var _b;
101548
101548
  (_a2 = (_b = ajv2.opts.code).formats) !== null && _a2 !== void 0 ? _a2 : _b.formats = (0, codegen_1._)`require("ajv-formats/dist/formats").${exportName}`;
101549
101549
  for (const f of list)
101550
- ajv2.addFormat(f, fs19[f]);
101550
+ ajv2.addFormat(f, fs21[f]);
101551
101551
  }
101552
101552
  module2.exports = exports2 = formatsPlugin;
101553
101553
  Object.defineProperty(exports2, "__esModule", { value: true });
@@ -101560,8 +101560,8 @@ var require_windows = __commonJS({
101560
101560
  "node_modules/isexe/windows.js"(exports2, module2) {
101561
101561
  module2.exports = isexe;
101562
101562
  isexe.sync = sync;
101563
- var fs19 = require("fs");
101564
- function checkPathExt(path15, options) {
101563
+ var fs21 = require("fs");
101564
+ function checkPathExt(path17, options) {
101565
101565
  var pathext = options.pathExt !== void 0 ? options.pathExt : process.env.PATHEXT;
101566
101566
  if (!pathext) {
101567
101567
  return true;
@@ -101572,25 +101572,25 @@ var require_windows = __commonJS({
101572
101572
  }
101573
101573
  for (var i = 0; i < pathext.length; i++) {
101574
101574
  var p = pathext[i].toLowerCase();
101575
- if (p && path15.substr(-p.length).toLowerCase() === p) {
101575
+ if (p && path17.substr(-p.length).toLowerCase() === p) {
101576
101576
  return true;
101577
101577
  }
101578
101578
  }
101579
101579
  return false;
101580
101580
  }
101581
- function checkStat(stat, path15, options) {
101581
+ function checkStat(stat, path17, options) {
101582
101582
  if (!stat.isSymbolicLink() && !stat.isFile()) {
101583
101583
  return false;
101584
101584
  }
101585
- return checkPathExt(path15, options);
101585
+ return checkPathExt(path17, options);
101586
101586
  }
101587
- function isexe(path15, options, cb) {
101588
- fs19.stat(path15, function(er, stat) {
101589
- cb(er, er ? false : checkStat(stat, path15, options));
101587
+ function isexe(path17, options, cb) {
101588
+ fs21.stat(path17, function(er, stat) {
101589
+ cb(er, er ? false : checkStat(stat, path17, options));
101590
101590
  });
101591
101591
  }
101592
- function sync(path15, options) {
101593
- return checkStat(fs19.statSync(path15), path15, options);
101592
+ function sync(path17, options) {
101593
+ return checkStat(fs21.statSync(path17), path17, options);
101594
101594
  }
101595
101595
  }
101596
101596
  });
@@ -101600,14 +101600,14 @@ var require_mode = __commonJS({
101600
101600
  "node_modules/isexe/mode.js"(exports2, module2) {
101601
101601
  module2.exports = isexe;
101602
101602
  isexe.sync = sync;
101603
- var fs19 = require("fs");
101604
- function isexe(path15, options, cb) {
101605
- fs19.stat(path15, function(er, stat) {
101603
+ var fs21 = require("fs");
101604
+ function isexe(path17, options, cb) {
101605
+ fs21.stat(path17, function(er, stat) {
101606
101606
  cb(er, er ? false : checkStat(stat, options));
101607
101607
  });
101608
101608
  }
101609
- function sync(path15, options) {
101610
- return checkStat(fs19.statSync(path15), options);
101609
+ function sync(path17, options) {
101610
+ return checkStat(fs21.statSync(path17), options);
101611
101611
  }
101612
101612
  function checkStat(stat, options) {
101613
101613
  return stat.isFile() && checkMode(stat, options);
@@ -101631,7 +101631,7 @@ var require_mode = __commonJS({
101631
101631
  // node_modules/isexe/index.js
101632
101632
  var require_isexe = __commonJS({
101633
101633
  "node_modules/isexe/index.js"(exports2, module2) {
101634
- var fs19 = require("fs");
101634
+ var fs21 = require("fs");
101635
101635
  var core;
101636
101636
  if (process.platform === "win32" || global.TESTING_WINDOWS) {
101637
101637
  core = require_windows();
@@ -101640,7 +101640,7 @@ var require_isexe = __commonJS({
101640
101640
  }
101641
101641
  module2.exports = isexe;
101642
101642
  isexe.sync = sync;
101643
- function isexe(path15, options, cb) {
101643
+ function isexe(path17, options, cb) {
101644
101644
  if (typeof options === "function") {
101645
101645
  cb = options;
101646
101646
  options = {};
@@ -101649,17 +101649,17 @@ var require_isexe = __commonJS({
101649
101649
  if (typeof Promise !== "function") {
101650
101650
  throw new TypeError("callback not provided");
101651
101651
  }
101652
- return new Promise(function(resolve13, reject) {
101653
- isexe(path15, options || {}, function(er, is) {
101652
+ return new Promise(function(resolve14, reject) {
101653
+ isexe(path17, options || {}, function(er, is) {
101654
101654
  if (er) {
101655
101655
  reject(er);
101656
101656
  } else {
101657
- resolve13(is);
101657
+ resolve14(is);
101658
101658
  }
101659
101659
  });
101660
101660
  });
101661
101661
  }
101662
- core(path15, options || {}, function(er, is) {
101662
+ core(path17, options || {}, function(er, is) {
101663
101663
  if (er) {
101664
101664
  if (er.code === "EACCES" || options && options.ignoreErrors) {
101665
101665
  er = null;
@@ -101669,9 +101669,9 @@ var require_isexe = __commonJS({
101669
101669
  cb(er, is);
101670
101670
  });
101671
101671
  }
101672
- function sync(path15, options) {
101672
+ function sync(path17, options) {
101673
101673
  try {
101674
- return core.sync(path15, options || {});
101674
+ return core.sync(path17, options || {});
101675
101675
  } catch (er) {
101676
101676
  if (options && options.ignoreErrors || er.code === "EACCES") {
101677
101677
  return false;
@@ -101687,7 +101687,7 @@ var require_isexe = __commonJS({
101687
101687
  var require_which = __commonJS({
101688
101688
  "node_modules/which/which.js"(exports2, module2) {
101689
101689
  var isWindows = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys";
101690
- var path15 = require("path");
101690
+ var path17 = require("path");
101691
101691
  var COLON = isWindows ? ";" : ":";
101692
101692
  var isexe = require_isexe();
101693
101693
  var getNotFoundError = (cmd) => Object.assign(new Error(`not found: ${cmd}`), { code: "ENOENT" });
@@ -101720,27 +101720,27 @@ var require_which = __commonJS({
101720
101720
  opt = {};
101721
101721
  const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt);
101722
101722
  const found = [];
101723
- const step = (i) => new Promise((resolve13, reject) => {
101723
+ const step = (i) => new Promise((resolve14, reject) => {
101724
101724
  if (i === pathEnv.length)
101725
- return opt.all && found.length ? resolve13(found) : reject(getNotFoundError(cmd));
101725
+ return opt.all && found.length ? resolve14(found) : reject(getNotFoundError(cmd));
101726
101726
  const ppRaw = pathEnv[i];
101727
101727
  const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
101728
- const pCmd = path15.join(pathPart, cmd);
101728
+ const pCmd = path17.join(pathPart, cmd);
101729
101729
  const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
101730
- resolve13(subStep(p, i, 0));
101730
+ resolve14(subStep(p, i, 0));
101731
101731
  });
101732
- const subStep = (p, i, ii) => new Promise((resolve13, reject) => {
101732
+ const subStep = (p, i, ii) => new Promise((resolve14, reject) => {
101733
101733
  if (ii === pathExt.length)
101734
- return resolve13(step(i + 1));
101734
+ return resolve14(step(i + 1));
101735
101735
  const ext = pathExt[ii];
101736
101736
  isexe(p + ext, { pathExt: pathExtExe }, (er, is) => {
101737
101737
  if (!er && is) {
101738
101738
  if (opt.all)
101739
101739
  found.push(p + ext);
101740
101740
  else
101741
- return resolve13(p + ext);
101741
+ return resolve14(p + ext);
101742
101742
  }
101743
- return resolve13(subStep(p, i, ii + 1));
101743
+ return resolve14(subStep(p, i, ii + 1));
101744
101744
  });
101745
101745
  });
101746
101746
  return cb ? step(0).then((res) => cb(null, res), cb) : step(0);
@@ -101752,7 +101752,7 @@ var require_which = __commonJS({
101752
101752
  for (let i = 0; i < pathEnv.length; i++) {
101753
101753
  const ppRaw = pathEnv[i];
101754
101754
  const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
101755
- const pCmd = path15.join(pathPart, cmd);
101755
+ const pCmd = path17.join(pathPart, cmd);
101756
101756
  const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
101757
101757
  for (let j = 0; j < pathExt.length; j++) {
101758
101758
  const cur = p + pathExt[j];
@@ -101800,7 +101800,7 @@ var require_path_key = __commonJS({
101800
101800
  var require_resolveCommand = __commonJS({
101801
101801
  "node_modules/cross-spawn/lib/util/resolveCommand.js"(exports2, module2) {
101802
101802
  "use strict";
101803
- var path15 = require("path");
101803
+ var path17 = require("path");
101804
101804
  var which = require_which();
101805
101805
  var getPathKey = require_path_key();
101806
101806
  function resolveCommandAttempt(parsed, withoutPathExt) {
@@ -101818,7 +101818,7 @@ var require_resolveCommand = __commonJS({
101818
101818
  try {
101819
101819
  resolved = which.sync(parsed.command, {
101820
101820
  path: env3[getPathKey({ env: env3 })],
101821
- pathExt: withoutPathExt ? path15.delimiter : void 0
101821
+ pathExt: withoutPathExt ? path17.delimiter : void 0
101822
101822
  });
101823
101823
  } catch (e) {
101824
101824
  } finally {
@@ -101827,7 +101827,7 @@ var require_resolveCommand = __commonJS({
101827
101827
  }
101828
101828
  }
101829
101829
  if (resolved) {
101830
- resolved = path15.resolve(hasCustomCwd ? parsed.options.cwd : "", resolved);
101830
+ resolved = path17.resolve(hasCustomCwd ? parsed.options.cwd : "", resolved);
101831
101831
  }
101832
101832
  return resolved;
101833
101833
  }
@@ -101881,8 +101881,8 @@ var require_shebang_command = __commonJS({
101881
101881
  if (!match) {
101882
101882
  return null;
101883
101883
  }
101884
- const [path15, argument] = match[0].replace(/#! ?/, "").split(" ");
101885
- const binary = path15.split("/").pop();
101884
+ const [path17, argument] = match[0].replace(/#! ?/, "").split(" ");
101885
+ const binary = path17.split("/").pop();
101886
101886
  if (binary === "env") {
101887
101887
  return argument;
101888
101888
  }
@@ -101895,16 +101895,16 @@ var require_shebang_command = __commonJS({
101895
101895
  var require_readShebang = __commonJS({
101896
101896
  "node_modules/cross-spawn/lib/util/readShebang.js"(exports2, module2) {
101897
101897
  "use strict";
101898
- var fs19 = require("fs");
101898
+ var fs21 = require("fs");
101899
101899
  var shebangCommand = require_shebang_command();
101900
101900
  function readShebang(command) {
101901
101901
  const size = 150;
101902
101902
  const buffer = Buffer.alloc(size);
101903
101903
  let fd;
101904
101904
  try {
101905
- fd = fs19.openSync(command, "r");
101906
- fs19.readSync(fd, buffer, 0, size, 0);
101907
- fs19.closeSync(fd);
101905
+ fd = fs21.openSync(command, "r");
101906
+ fs21.readSync(fd, buffer, 0, size, 0);
101907
+ fs21.closeSync(fd);
101908
101908
  } catch (e) {
101909
101909
  }
101910
101910
  return shebangCommand(buffer.toString());
@@ -101917,7 +101917,7 @@ var require_readShebang = __commonJS({
101917
101917
  var require_parse2 = __commonJS({
101918
101918
  "node_modules/cross-spawn/lib/parse.js"(exports2, module2) {
101919
101919
  "use strict";
101920
- var path15 = require("path");
101920
+ var path17 = require("path");
101921
101921
  var resolveCommand = require_resolveCommand();
101922
101922
  var escape2 = require_escape();
101923
101923
  var readShebang = require_readShebang();
@@ -101942,7 +101942,7 @@ var require_parse2 = __commonJS({
101942
101942
  const needsShell = !isExecutableRegExp.test(commandFile);
101943
101943
  if (parsed.options.forceShell || needsShell) {
101944
101944
  const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile);
101945
- parsed.command = path15.normalize(parsed.command);
101945
+ parsed.command = path17.normalize(parsed.command);
101946
101946
  parsed.command = escape2.command(parsed.command);
101947
101947
  parsed.args = parsed.args.map((arg) => escape2.argument(arg, needsDoubleEscapeMetaChars));
101948
101948
  const shellCommand = [parsed.command].concat(parsed.args).join(" ");
@@ -102591,19 +102591,19 @@ var init_source = __esm({
102591
102591
  });
102592
102592
 
102593
102593
  // src/cli.ts
102594
- var fs18 = __toESM(require("fs"));
102594
+ var fs20 = __toESM(require("fs"));
102595
102595
  var fsPromises = __toESM(require("fs/promises"));
102596
- var path14 = __toESM(require("path"));
102596
+ var path16 = __toESM(require("path"));
102597
102597
 
102598
102598
  // src/parser.ts
102599
102599
  var path = __toESM(require("path"));
102600
102600
 
102601
102601
  // src/nornapiParser.ts
102602
- function extractPathParameters(path15) {
102602
+ function extractPathParameters(path17) {
102603
102603
  const params = [];
102604
102604
  const regex = /(?<!\{)\{([a-zA-Z_][a-zA-Z0-9_]*)\}(?!\})/g;
102605
102605
  let match;
102606
- while ((match = regex.exec(path15)) !== null) {
102606
+ while ((match = regex.exec(path17)) !== null) {
102607
102607
  params.push(match[1]);
102608
102608
  }
102609
102609
  return params;
@@ -102653,12 +102653,12 @@ function parseNornApiFile(content) {
102653
102653
  if (inEndpointsBlock) {
102654
102654
  const endpointMatch = trimmed.match(/^([a-zA-Z_][a-zA-Z0-9_]*)\s*:\s*(GET|POST|PUT|DELETE|PATCH|HEAD|OPTIONS)\s+(.+)$/i);
102655
102655
  if (endpointMatch) {
102656
- const path15 = endpointMatch[3].trim();
102656
+ const path17 = endpointMatch[3].trim();
102657
102657
  endpoints.push({
102658
102658
  name: endpointMatch[1],
102659
102659
  method: endpointMatch[2].toUpperCase(),
102660
- path: path15,
102661
- parameters: extractPathParameters(path15)
102660
+ path: path17,
102661
+ parameters: extractPathParameters(path17)
102662
102662
  });
102663
102663
  }
102664
102664
  continue;
@@ -103241,8 +103241,8 @@ function extractFileLevelVariables(text) {
103241
103241
  }
103242
103242
  return variables;
103243
103243
  }
103244
- function getNestedValue(obj, path15) {
103245
- return getNestedPathValue(obj, path15);
103244
+ function getNestedValue(obj, path17) {
103245
+ return getNestedPathValue(obj, path17);
103246
103246
  }
103247
103247
  function valueToString(value) {
103248
103248
  if (value === null) {
@@ -103286,8 +103286,8 @@ function substituteVariables(text, variables) {
103286
103286
  const value = variables[varName];
103287
103287
  if (typeof value === "object" && value !== null) {
103288
103288
  if (pathPart) {
103289
- const path15 = pathPart.replace(/^\./, "");
103290
- const nestedValue = getNestedValue(value, path15);
103289
+ const path17 = pathPart.replace(/^\./, "");
103290
+ const nestedValue = getNestedValue(value, path17);
103291
103291
  if (nestedValue === void 0 && varName === ENV_SCOPE_KEY) {
103292
103292
  return match;
103293
103293
  }
@@ -103301,8 +103301,8 @@ function substituteVariables(text, variables) {
103301
103301
  if (pathPart && typeof value === "string") {
103302
103302
  try {
103303
103303
  const parsed = JSON.parse(value);
103304
- const path15 = pathPart.replace(/^\./, "");
103305
- const nestedValue = getNestedValue(parsed, path15);
103304
+ const path17 = pathPart.replace(/^\./, "");
103305
+ const nestedValue = getNestedValue(parsed, path17);
103306
103306
  if (nestedValue === void 0 && varName === ENV_SCOPE_KEY) {
103307
103307
  return match;
103308
103308
  }
@@ -104151,9 +104151,9 @@ function isVisitable(thing) {
104151
104151
  function removeBrackets(key) {
104152
104152
  return utils_default.endsWith(key, "[]") ? key.slice(0, -2) : key;
104153
104153
  }
104154
- function renderKey(path15, key, dots) {
104155
- if (!path15) return key;
104156
- return path15.concat(key).map(function each(token, i) {
104154
+ function renderKey(path17, key, dots) {
104155
+ if (!path17) return key;
104156
+ return path17.concat(key).map(function each(token, i) {
104157
104157
  token = removeBrackets(token);
104158
104158
  return !dots && i ? "[" + token + "]" : token;
104159
104159
  }).join(dots ? "." : "");
@@ -104201,9 +104201,9 @@ function toFormData(obj, formData, options) {
104201
104201
  }
104202
104202
  return value;
104203
104203
  }
104204
- function defaultVisitor(value, key, path15) {
104204
+ function defaultVisitor(value, key, path17) {
104205
104205
  let arr = value;
104206
- if (value && !path15 && typeof value === "object") {
104206
+ if (value && !path17 && typeof value === "object") {
104207
104207
  if (utils_default.endsWith(key, "{}")) {
104208
104208
  key = metaTokens ? key : key.slice(0, -2);
104209
104209
  value = JSON.stringify(value);
@@ -104222,7 +104222,7 @@ function toFormData(obj, formData, options) {
104222
104222
  if (isVisitable(value)) {
104223
104223
  return true;
104224
104224
  }
104225
- formData.append(renderKey(path15, key, dots), convertValue(value));
104225
+ formData.append(renderKey(path17, key, dots), convertValue(value));
104226
104226
  return false;
104227
104227
  }
104228
104228
  const stack = [];
@@ -104231,10 +104231,10 @@ function toFormData(obj, formData, options) {
104231
104231
  convertValue,
104232
104232
  isVisitable
104233
104233
  });
104234
- function build(value, path15) {
104234
+ function build(value, path17) {
104235
104235
  if (utils_default.isUndefined(value)) return;
104236
104236
  if (stack.indexOf(value) !== -1) {
104237
- throw Error("Circular reference detected in " + path15.join("."));
104237
+ throw Error("Circular reference detected in " + path17.join("."));
104238
104238
  }
104239
104239
  stack.push(value);
104240
104240
  utils_default.forEach(value, function each(el, key) {
@@ -104242,11 +104242,11 @@ function toFormData(obj, formData, options) {
104242
104242
  formData,
104243
104243
  el,
104244
104244
  utils_default.isString(key) ? key.trim() : key,
104245
- path15,
104245
+ path17,
104246
104246
  exposedHelpers
104247
104247
  );
104248
104248
  if (result === true) {
104249
- build(el, path15 ? path15.concat(key) : [key]);
104249
+ build(el, path17 ? path17.concat(key) : [key]);
104250
104250
  }
104251
104251
  });
104252
104252
  stack.pop();
@@ -104458,7 +104458,7 @@ var platform_default = {
104458
104458
  // node_modules/axios/lib/helpers/toURLEncodedForm.js
104459
104459
  function toURLEncodedForm(data, options) {
104460
104460
  return toFormData_default(data, new platform_default.classes.URLSearchParams(), {
104461
- visitor: function(value, key, path15, helpers) {
104461
+ visitor: function(value, key, path17, helpers) {
104462
104462
  if (platform_default.isNode && utils_default.isBuffer(value)) {
104463
104463
  this.append(key, value.toString("base64"));
104464
104464
  return false;
@@ -104488,11 +104488,11 @@ function arrayToObject(arr) {
104488
104488
  return obj;
104489
104489
  }
104490
104490
  function formDataToJSON(formData) {
104491
- function buildPath(path15, value, target, index) {
104492
- let name = path15[index++];
104491
+ function buildPath(path17, value, target, index) {
104492
+ let name = path17[index++];
104493
104493
  if (name === "__proto__") return true;
104494
104494
  const isNumericKey = Number.isFinite(+name);
104495
- const isLast = index >= path15.length;
104495
+ const isLast = index >= path17.length;
104496
104496
  name = !name && utils_default.isArray(target) ? target.length : name;
104497
104497
  if (isLast) {
104498
104498
  if (utils_default.hasOwnProp(target, name)) {
@@ -104505,7 +104505,7 @@ function formDataToJSON(formData) {
104505
104505
  if (!target[name] || !utils_default.isObject(target[name])) {
104506
104506
  target[name] = [];
104507
104507
  }
104508
- const result = buildPath(path15, value, target[name], index);
104508
+ const result = buildPath(path17, value, target[name], index);
104509
104509
  if (result && utils_default.isArray(target[name])) {
104510
104510
  target[name] = arrayToObject(target[name]);
104511
104511
  }
@@ -104934,10 +104934,10 @@ utils_default.inherits(CanceledError, AxiosError_default, {
104934
104934
  var CanceledError_default = CanceledError;
104935
104935
 
104936
104936
  // node_modules/axios/lib/core/settle.js
104937
- function settle(resolve13, reject, response) {
104937
+ function settle(resolve14, reject, response) {
104938
104938
  const validateStatus2 = response.config.validateStatus;
104939
104939
  if (!response.status || !validateStatus2 || validateStatus2(response.status)) {
104940
- resolve13(response);
104940
+ resolve14(response);
104941
104941
  } else {
104942
104942
  reject(new AxiosError_default(
104943
104943
  "Request failed with status code " + response.status,
@@ -105560,7 +105560,7 @@ function setProxy(options, configProxy, location) {
105560
105560
  }
105561
105561
  var isHttpAdapterSupported = typeof process !== "undefined" && utils_default.kindOf(process) === "process";
105562
105562
  var wrapAsync = (asyncExecutor) => {
105563
- return new Promise((resolve13, reject) => {
105563
+ return new Promise((resolve14, reject) => {
105564
105564
  let onDone;
105565
105565
  let isDone;
105566
105566
  const done = (value, isRejected) => {
@@ -105570,7 +105570,7 @@ var wrapAsync = (asyncExecutor) => {
105570
105570
  };
105571
105571
  const _resolve = (value) => {
105572
105572
  done(value);
105573
- resolve13(value);
105573
+ resolve14(value);
105574
105574
  };
105575
105575
  const _reject = (reason) => {
105576
105576
  done(reason, true);
@@ -105622,7 +105622,7 @@ var http2Transport = {
105622
105622
  }
105623
105623
  };
105624
105624
  var http_default = isHttpAdapterSupported && function httpAdapter(config2) {
105625
- return wrapAsync(async function dispatchHttpRequest(resolve13, reject, onDone) {
105625
+ return wrapAsync(async function dispatchHttpRequest(resolve14, reject, onDone) {
105626
105626
  let { data, lookup, family, httpVersion = 1, http2Options } = config2;
105627
105627
  const { responseType, responseEncoding } = config2;
105628
105628
  const method = config2.method.toUpperCase();
@@ -105707,7 +105707,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config2) {
105707
105707
  }
105708
105708
  let convertedData;
105709
105709
  if (method !== "GET") {
105710
- return settle(resolve13, reject, {
105710
+ return settle(resolve14, reject, {
105711
105711
  status: 405,
105712
105712
  statusText: "method not allowed",
105713
105713
  headers: {},
@@ -105729,7 +105729,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config2) {
105729
105729
  } else if (responseType === "stream") {
105730
105730
  convertedData = import_stream4.default.Readable.from(convertedData);
105731
105731
  }
105732
- return settle(resolve13, reject, {
105732
+ return settle(resolve14, reject, {
105733
105733
  data: convertedData,
105734
105734
  status: 200,
105735
105735
  statusText: "OK",
@@ -105827,9 +105827,9 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config2) {
105827
105827
  auth2 = urlUsername + ":" + urlPassword;
105828
105828
  }
105829
105829
  auth2 && headers.delete("authorization");
105830
- let path15;
105830
+ let path17;
105831
105831
  try {
105832
- path15 = buildURL(
105832
+ path17 = buildURL(
105833
105833
  parsed.pathname + parsed.search,
105834
105834
  config2.params,
105835
105835
  config2.paramsSerializer
@@ -105847,7 +105847,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config2) {
105847
105847
  false
105848
105848
  );
105849
105849
  const options = {
105850
- path: path15,
105850
+ path: path17,
105851
105851
  method,
105852
105852
  headers: headers.toJSON(),
105853
105853
  agents: { http: config2.httpAgent, https: config2.httpsAgent },
@@ -105948,7 +105948,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config2) {
105948
105948
  };
105949
105949
  if (responseType === "stream") {
105950
105950
  response.data = responseStream;
105951
- settle(resolve13, reject, response);
105951
+ settle(resolve14, reject, response);
105952
105952
  } else {
105953
105953
  const responseBuffer = [];
105954
105954
  let totalResponseBytes = 0;
@@ -105996,7 +105996,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config2) {
105996
105996
  } catch (err) {
105997
105997
  return reject(AxiosError_default.from(err, null, config2, response.request, response));
105998
105998
  }
105999
- settle(resolve13, reject, response);
105999
+ settle(resolve14, reject, response);
106000
106000
  });
106001
106001
  }
106002
106002
  abortEmitter.once("abort", (err) => {
@@ -106083,14 +106083,14 @@ var isURLSameOrigin_default = platform_default.hasStandardBrowserEnv ? /* @__PUR
106083
106083
  var cookies_default = platform_default.hasStandardBrowserEnv ? (
106084
106084
  // Standard browser envs support document.cookie
106085
106085
  {
106086
- write(name, value, expires, path15, domain2, secure, sameSite) {
106086
+ write(name, value, expires, path17, domain2, secure, sameSite) {
106087
106087
  if (typeof document === "undefined") return;
106088
106088
  const cookie = [`${name}=${encodeURIComponent(value)}`];
106089
106089
  if (utils_default.isNumber(expires)) {
106090
106090
  cookie.push(`expires=${new Date(expires).toUTCString()}`);
106091
106091
  }
106092
- if (utils_default.isString(path15)) {
106093
- cookie.push(`path=${path15}`);
106092
+ if (utils_default.isString(path17)) {
106093
+ cookie.push(`path=${path17}`);
106094
106094
  }
106095
106095
  if (utils_default.isString(domain2)) {
106096
106096
  cookie.push(`domain=${domain2}`);
@@ -106245,7 +106245,7 @@ var resolveConfig_default = (config2) => {
106245
106245
  // node_modules/axios/lib/adapters/xhr.js
106246
106246
  var isXHRAdapterSupported = typeof XMLHttpRequest !== "undefined";
106247
106247
  var xhr_default = isXHRAdapterSupported && function(config2) {
106248
- return new Promise(function dispatchXhrRequest(resolve13, reject) {
106248
+ return new Promise(function dispatchXhrRequest(resolve14, reject) {
106249
106249
  const _config = resolveConfig_default(config2);
106250
106250
  let requestData = _config.data;
106251
106251
  const requestHeaders = AxiosHeaders_default.from(_config.headers).normalize();
@@ -106279,7 +106279,7 @@ var xhr_default = isXHRAdapterSupported && function(config2) {
106279
106279
  request
106280
106280
  };
106281
106281
  settle(function _resolve(value) {
106282
- resolve13(value);
106282
+ resolve14(value);
106283
106283
  done();
106284
106284
  }, function _reject(err) {
106285
106285
  reject(err);
@@ -106650,8 +106650,8 @@ var factory = (env3) => {
106650
106650
  responseType = responseType || "text";
106651
106651
  let responseData = await resolvers[utils_default.findKey(resolvers, responseType) || "text"](response, config2);
106652
106652
  !isStreamResponse && unsubscribe && unsubscribe();
106653
- return await new Promise((resolve13, reject) => {
106654
- settle(resolve13, reject, {
106653
+ return await new Promise((resolve14, reject) => {
106654
+ settle(resolve14, reject, {
106655
106655
  data: responseData,
106656
106656
  headers: AxiosHeaders_default.from(response.headers),
106657
106657
  status: response.status,
@@ -107047,8 +107047,8 @@ var CancelToken = class _CancelToken {
107047
107047
  throw new TypeError("executor must be a function.");
107048
107048
  }
107049
107049
  let resolvePromise;
107050
- this.promise = new Promise(function promiseExecutor(resolve13) {
107051
- resolvePromise = resolve13;
107050
+ this.promise = new Promise(function promiseExecutor(resolve14) {
107051
+ resolvePromise = resolve14;
107052
107052
  });
107053
107053
  const token = this;
107054
107054
  this.promise.then((cancel) => {
@@ -107061,9 +107061,9 @@ var CancelToken = class _CancelToken {
107061
107061
  });
107062
107062
  this.promise.then = (onfulfilled) => {
107063
107063
  let _resolve;
107064
- const promise2 = new Promise((resolve13) => {
107065
- token.subscribe(resolve13);
107066
- _resolve = resolve13;
107064
+ const promise2 = new Promise((resolve14) => {
107065
+ token.subscribe(resolve14);
107066
+ _resolve = resolve14;
107067
107067
  }).then(onfulfilled);
107068
107068
  promise2.cancel = function reject() {
107069
107069
  token.unsubscribe(_resolve);
@@ -107437,10 +107437,10 @@ var safeToStringImpl = (val, seenArrays = /* @__PURE__ */ new WeakSet()) => {
107437
107437
  var safeToString = (val) => safeToStringImpl(val);
107438
107438
  function createPromiseCallback(cb) {
107439
107439
  let callback;
107440
- let resolve13;
107440
+ let resolve14;
107441
107441
  let reject;
107442
107442
  const promise2 = new Promise((_resolve, _reject) => {
107443
- resolve13 = _resolve;
107443
+ resolve14 = _resolve;
107444
107444
  reject = _reject;
107445
107445
  });
107446
107446
  if (typeof cb === "function") {
@@ -107456,7 +107456,7 @@ function createPromiseCallback(cb) {
107456
107456
  callback = (err, result) => {
107457
107457
  try {
107458
107458
  if (err) reject(err);
107459
- else resolve13(result);
107459
+ else resolve14(result);
107460
107460
  } catch (e) {
107461
107461
  reject(e instanceof Error ? e : new Error());
107462
107462
  }
@@ -107490,18 +107490,18 @@ var MemoryCookieStore = class extends Store {
107490
107490
  /**
107491
107491
  * @internal No doc because this is an overload that supports the implementation
107492
107492
  */
107493
- findCookie(domain2, path15, key, callback) {
107493
+ findCookie(domain2, path17, key, callback) {
107494
107494
  const promiseCallback = createPromiseCallback(callback);
107495
- if (domain2 == null || path15 == null || key == null) {
107495
+ if (domain2 == null || path17 == null || key == null) {
107496
107496
  return promiseCallback.resolve(void 0);
107497
107497
  }
107498
- const result = this.idx[domain2]?.[path15]?.[key];
107498
+ const result = this.idx[domain2]?.[path17]?.[key];
107499
107499
  return promiseCallback.resolve(result);
107500
107500
  }
107501
107501
  /**
107502
107502
  * @internal No doc because this is an overload that supports the implementation
107503
107503
  */
107504
- findCookies(domain2, path15, allowSpecialUseDomain = false, callback) {
107504
+ findCookies(domain2, path17, allowSpecialUseDomain = false, callback) {
107505
107505
  if (typeof allowSpecialUseDomain === "function") {
107506
107506
  callback = allowSpecialUseDomain;
107507
107507
  allowSpecialUseDomain = true;
@@ -107512,7 +107512,7 @@ var MemoryCookieStore = class extends Store {
107512
107512
  return promiseCallback.resolve([]);
107513
107513
  }
107514
107514
  let pathMatcher;
107515
- if (!path15) {
107515
+ if (!path17) {
107516
107516
  pathMatcher = function matchAll2(domainIndex) {
107517
107517
  for (const curPath in domainIndex) {
107518
107518
  const pathIndex = domainIndex[curPath];
@@ -107527,7 +107527,7 @@ var MemoryCookieStore = class extends Store {
107527
107527
  } else {
107528
107528
  pathMatcher = function matchRFC(domainIndex) {
107529
107529
  for (const cookiePath in domainIndex) {
107530
- if (pathMatch(path15, cookiePath)) {
107530
+ if (pathMatch(path17, cookiePath)) {
107531
107531
  const pathIndex = domainIndex[cookiePath];
107532
107532
  for (const key in pathIndex) {
107533
107533
  const value = pathIndex[key];
@@ -107555,14 +107555,14 @@ var MemoryCookieStore = class extends Store {
107555
107555
  */
107556
107556
  putCookie(cookie, callback) {
107557
107557
  const promiseCallback = createPromiseCallback(callback);
107558
- const { domain: domain2, path: path15, key } = cookie;
107559
- if (domain2 == null || path15 == null || key == null) {
107558
+ const { domain: domain2, path: path17, key } = cookie;
107559
+ if (domain2 == null || path17 == null || key == null) {
107560
107560
  return promiseCallback.resolve(void 0);
107561
107561
  }
107562
107562
  const domainEntry = this.idx[domain2] ?? /* @__PURE__ */ Object.create(null);
107563
107563
  this.idx[domain2] = domainEntry;
107564
- const pathEntry = domainEntry[path15] ?? /* @__PURE__ */ Object.create(null);
107565
- domainEntry[path15] = pathEntry;
107564
+ const pathEntry = domainEntry[path17] ?? /* @__PURE__ */ Object.create(null);
107565
+ domainEntry[path17] = pathEntry;
107566
107566
  pathEntry[key] = cookie;
107567
107567
  return promiseCallback.resolve(void 0);
107568
107568
  }
@@ -107576,20 +107576,20 @@ var MemoryCookieStore = class extends Store {
107576
107576
  /**
107577
107577
  * @internal No doc because this is an overload that supports the implementation
107578
107578
  */
107579
- removeCookie(domain2, path15, key, callback) {
107579
+ removeCookie(domain2, path17, key, callback) {
107580
107580
  const promiseCallback = createPromiseCallback(callback);
107581
- delete this.idx[domain2]?.[path15]?.[key];
107581
+ delete this.idx[domain2]?.[path17]?.[key];
107582
107582
  return promiseCallback.resolve(void 0);
107583
107583
  }
107584
107584
  /**
107585
107585
  * @internal No doc because this is an overload that supports the implementation
107586
107586
  */
107587
- removeCookies(domain2, path15, callback) {
107587
+ removeCookies(domain2, path17, callback) {
107588
107588
  const promiseCallback = createPromiseCallback(callback);
107589
107589
  const domainEntry = this.idx[domain2];
107590
107590
  if (domainEntry) {
107591
- if (path15) {
107592
- delete domainEntry[path15];
107591
+ if (path17) {
107592
+ delete domainEntry[path17];
107593
107593
  } else {
107594
107594
  delete this.idx[domain2];
107595
107595
  }
@@ -107615,8 +107615,8 @@ var MemoryCookieStore = class extends Store {
107615
107615
  domains.forEach((domain2) => {
107616
107616
  const domainEntry = idx[domain2] ?? {};
107617
107617
  const paths = Object.keys(domainEntry);
107618
- paths.forEach((path15) => {
107619
- const pathEntry = domainEntry[path15] ?? {};
107618
+ paths.forEach((path17) => {
107619
+ const pathEntry = domainEntry[path17] ?? {};
107620
107620
  const keys = Object.keys(pathEntry);
107621
107621
  keys.forEach((key) => {
107622
107622
  const keyEntry = pathEntry[key];
@@ -108500,18 +108500,18 @@ function cookieCompare(a, b) {
108500
108500
  cmp = (a.creationIndex || 0) - (b.creationIndex || 0);
108501
108501
  return cmp;
108502
108502
  }
108503
- function defaultPath(path15) {
108504
- if (!path15 || path15.slice(0, 1) !== "/") {
108503
+ function defaultPath(path17) {
108504
+ if (!path17 || path17.slice(0, 1) !== "/") {
108505
108505
  return "/";
108506
108506
  }
108507
- if (path15 === "/") {
108508
- return path15;
108507
+ if (path17 === "/") {
108508
+ return path17;
108509
108509
  }
108510
- const rightSlash = path15.lastIndexOf("/");
108510
+ const rightSlash = path17.lastIndexOf("/");
108511
108511
  if (rightSlash === 0) {
108512
108512
  return "/";
108513
108513
  }
108514
- return path15.slice(0, rightSlash);
108514
+ return path17.slice(0, rightSlash);
108515
108515
  }
108516
108516
  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}|:)))$)/;
108517
108517
  function domainMatch(domain2, cookieDomain, canonicalize) {
@@ -108913,7 +108913,7 @@ var CookieJar = class _CookieJar {
108913
108913
  return promiseCallback.reject(parameterError);
108914
108914
  }
108915
108915
  const host = canonicalDomain(context.hostname);
108916
- const path15 = context.pathname || "/";
108916
+ const path17 = context.pathname || "/";
108917
108917
  const potentiallyTrustworthy = isPotentiallyTrustworthy(
108918
108918
  url3,
108919
108919
  this.allowSecureOnLocal
@@ -108944,7 +108944,7 @@ var CookieJar = class _CookieJar {
108944
108944
  return false;
108945
108945
  }
108946
108946
  }
108947
- if (!allPaths && typeof c.path === "string" && !pathMatch(path15, c.path)) {
108947
+ if (!allPaths && typeof c.path === "string" && !pathMatch(path17, c.path)) {
108948
108948
  return false;
108949
108949
  }
108950
108950
  if (c.secure && !potentiallyTrustworthy) {
@@ -108976,7 +108976,7 @@ var CookieJar = class _CookieJar {
108976
108976
  }
108977
108977
  store.findCookies(
108978
108978
  host,
108979
- allPaths ? null : path15,
108979
+ allPaths ? null : path17,
108980
108980
  this.allowSpecialUseDomain,
108981
108981
  (err, cookies) => {
108982
108982
  if (err) {
@@ -109570,7 +109570,7 @@ async function sendRequest(request, retryOptions) {
109570
109570
  return sendRequestWithJar(request, sharedCookieJar, retryOptions);
109571
109571
  }
109572
109572
  function sleep(ms) {
109573
- return new Promise((resolve13) => setTimeout(resolve13, ms));
109573
+ return new Promise((resolve14) => setTimeout(resolve14, ms));
109574
109574
  }
109575
109575
  function shouldRetry(response, error2) {
109576
109576
  if (error2) return true;
@@ -109982,7 +109982,7 @@ async function runScript(type, scriptPath, args, workingDir, variables = {}, cap
109982
109982
  captureVar
109983
109983
  };
109984
109984
  }
109985
- return new Promise((resolve13) => {
109985
+ return new Promise((resolve14) => {
109986
109986
  const env3 = {
109987
109987
  ...process.env,
109988
109988
  // Pass variables as environment variables with NORN_ prefix
@@ -110006,7 +110006,7 @@ async function runScript(type, scriptPath, args, workingDir, variables = {}, cap
110006
110006
  stderr += data.toString();
110007
110007
  });
110008
110008
  child.on("error", (err) => {
110009
- resolve13({
110009
+ resolve14({
110010
110010
  success: false,
110011
110011
  output: cleanScriptOutput(stdout),
110012
110012
  error: `Failed to execute script: ${err.message}`,
@@ -110020,7 +110020,7 @@ async function runScript(type, scriptPath, args, workingDir, variables = {}, cap
110020
110020
  child.on("close", (code) => {
110021
110021
  const exitCode = code ?? 0;
110022
110022
  const cleanedOutput = cleanScriptOutput(stdout);
110023
- resolve13({
110023
+ resolve14({
110024
110024
  success: exitCode === 0,
110025
110025
  output: cleanedOutput,
110026
110026
  error: stderr.trim(),
@@ -110086,11 +110086,11 @@ function readJsonFile(filePath, workingDir) {
110086
110086
  };
110087
110087
  }
110088
110088
  }
110089
- function setNestedValue(obj, path15, value) {
110090
- if (!path15 || obj === null || obj === void 0 || typeof obj !== "object") {
110089
+ function setNestedValue(obj, path17, value) {
110090
+ if (!path17 || obj === null || obj === void 0 || typeof obj !== "object") {
110091
110091
  return false;
110092
110092
  }
110093
- const parts = path15.replace(/\[(\d+)\]/g, ".$1").split(".").filter((p) => p !== "");
110093
+ const parts = path17.replace(/\[(\d+)\]/g, ".$1").split(".").filter((p) => p !== "");
110094
110094
  if (parts.length === 0) {
110095
110095
  return false;
110096
110096
  }
@@ -110705,7 +110705,7 @@ finally {
110705
110705
  const payload = JSON.stringify(request);
110706
110706
  const command = getIntegratedPowerShellCommand();
110707
110707
  const commandArgs = ["-NoProfile", "-NonInteractive", "-ExecutionPolicy", "Bypass", "-OutputFormat", "Text", "-EncodedCommand", encodePowerShellCommand(script)];
110708
- return new Promise((resolve13, reject) => {
110708
+ return new Promise((resolve14, reject) => {
110709
110709
  const child = (0, import_child_process2.spawn)(command, commandArgs, {
110710
110710
  cwd: request.context?.workingDir || process.cwd(),
110711
110711
  shell: false,
@@ -110732,7 +110732,7 @@ finally {
110732
110732
  }
110733
110733
  try {
110734
110734
  const parsed = JSON.parse(stdout.trim());
110735
- resolve13(parsed);
110735
+ resolve14(parsed);
110736
110736
  } catch (error2) {
110737
110737
  reject(new Error(`Invalid PowerShell SQL adapter response: ${error2 instanceof Error ? error2.message : String(error2)}`));
110738
110738
  }
@@ -111136,7 +111136,7 @@ async function runExternalSqlAdapter(command, request, workingDir) {
111136
111136
  if (!command.length) {
111137
111137
  throw new Error("SQL adapter command is empty");
111138
111138
  }
111139
- return new Promise((resolve13, reject) => {
111139
+ return new Promise((resolve14, reject) => {
111140
111140
  const child = (0, import_child_process3.spawn)(command[0], command.slice(1), {
111141
111141
  cwd: workingDir,
111142
111142
  env: process.env,
@@ -111157,7 +111157,7 @@ async function runExternalSqlAdapter(command, request, workingDir) {
111157
111157
  return;
111158
111158
  }
111159
111159
  settled = true;
111160
- resolve13(response);
111160
+ resolve14(response);
111161
111161
  };
111162
111162
  child.stdout.on("data", (chunk) => {
111163
111163
  stdout += chunk.toString();
@@ -111221,6 +111221,10 @@ async function runSqlAdapter(target, request, workingDir) {
111221
111221
  return runExternalSqlAdapter(target.command, request, workingDir);
111222
111222
  }
111223
111223
 
111224
+ // src/mcpClient.ts
111225
+ var fs13 = __toESM(require("fs"));
111226
+ var path11 = __toESM(require("path"));
111227
+
111224
111228
  // node_modules/zod/v3/helpers/util.js
111225
111229
  var util3;
111226
111230
  (function(util4) {
@@ -111580,8 +111584,8 @@ function getErrorMap() {
111580
111584
 
111581
111585
  // node_modules/zod/v3/helpers/parseUtil.js
111582
111586
  var makeIssue = (params) => {
111583
- const { data, path: path15, errorMaps, issueData } = params;
111584
- const fullPath = [...path15, ...issueData.path || []];
111587
+ const { data, path: path17, errorMaps, issueData } = params;
111588
+ const fullPath = [...path17, ...issueData.path || []];
111585
111589
  const fullIssue = {
111586
111590
  ...issueData,
111587
111591
  path: fullPath
@@ -111696,11 +111700,11 @@ var errorUtil;
111696
111700
 
111697
111701
  // node_modules/zod/v3/types.js
111698
111702
  var ParseInputLazyPath = class {
111699
- constructor(parent, value, path15, key) {
111703
+ constructor(parent, value, path17, key) {
111700
111704
  this._cachedPath = [];
111701
111705
  this.parent = parent;
111702
111706
  this.data = value;
111703
- this._path = path15;
111707
+ this._path = path17;
111704
111708
  this._key = key;
111705
111709
  }
111706
111710
  get path() {
@@ -115344,10 +115348,10 @@ function mergeDefs(...defs) {
115344
115348
  function cloneDef(schema) {
115345
115349
  return mergeDefs(schema._zod.def);
115346
115350
  }
115347
- function getElementAtPath(obj, path15) {
115348
- if (!path15)
115351
+ function getElementAtPath(obj, path17) {
115352
+ if (!path17)
115349
115353
  return obj;
115350
- return path15.reduce((acc, key) => acc?.[key], obj);
115354
+ return path17.reduce((acc, key) => acc?.[key], obj);
115351
115355
  }
115352
115356
  function promiseAllObject(promisesObj) {
115353
115357
  const keys = Object.keys(promisesObj);
@@ -115730,11 +115734,11 @@ function aborted(x, startIndex = 0) {
115730
115734
  }
115731
115735
  return false;
115732
115736
  }
115733
- function prefixIssues(path15, issues) {
115737
+ function prefixIssues(path17, issues) {
115734
115738
  return issues.map((iss) => {
115735
115739
  var _a2;
115736
115740
  (_a2 = iss).path ?? (_a2.path = []);
115737
- iss.path.unshift(path15);
115741
+ iss.path.unshift(path17);
115738
115742
  return iss;
115739
115743
  });
115740
115744
  }
@@ -124087,7 +124091,7 @@ var Protocol = class {
124087
124091
  return;
124088
124092
  }
124089
124093
  const pollInterval = task2.pollInterval ?? this._options?.defaultTaskPollInterval ?? 1e3;
124090
- await new Promise((resolve13) => setTimeout(resolve13, pollInterval));
124094
+ await new Promise((resolve14) => setTimeout(resolve14, pollInterval));
124091
124095
  options?.signal?.throwIfAborted();
124092
124096
  }
124093
124097
  } catch (error2) {
@@ -124104,7 +124108,7 @@ var Protocol = class {
124104
124108
  */
124105
124109
  request(request, resultSchema, options) {
124106
124110
  const { relatedRequestId, resumptionToken, onresumptiontoken, task, relatedTask } = options ?? {};
124107
- return new Promise((resolve13, reject) => {
124111
+ return new Promise((resolve14, reject) => {
124108
124112
  const earlyReject = (error2) => {
124109
124113
  reject(error2);
124110
124114
  };
@@ -124182,7 +124186,7 @@ var Protocol = class {
124182
124186
  if (!parseResult.success) {
124183
124187
  reject(parseResult.error);
124184
124188
  } else {
124185
- resolve13(parseResult.data);
124189
+ resolve14(parseResult.data);
124186
124190
  }
124187
124191
  } catch (error2) {
124188
124192
  reject(error2);
@@ -124443,12 +124447,12 @@ var Protocol = class {
124443
124447
  }
124444
124448
  } catch {
124445
124449
  }
124446
- return new Promise((resolve13, reject) => {
124450
+ return new Promise((resolve14, reject) => {
124447
124451
  if (signal.aborted) {
124448
124452
  reject(new McpError(ErrorCode.InvalidRequest, "Request cancelled"));
124449
124453
  return;
124450
124454
  }
124451
- const timeoutId = setTimeout(resolve13, interval);
124455
+ const timeoutId = setTimeout(resolve14, interval);
124452
124456
  signal.addEventListener("abort", () => {
124453
124457
  clearTimeout(timeoutId);
124454
124458
  reject(new McpError(ErrorCode.InvalidRequest, "Request cancelled"));
@@ -125399,7 +125403,7 @@ var StdioClientTransport = class {
125399
125403
  if (this._process) {
125400
125404
  throw new Error("StdioClientTransport already started! If using Client class, note that connect() calls start() automatically.");
125401
125405
  }
125402
- return new Promise((resolve13, reject) => {
125406
+ return new Promise((resolve14, reject) => {
125403
125407
  this._process = (0, import_cross_spawn.default)(this._serverParams.command, this._serverParams.args ?? [], {
125404
125408
  // merge default env with server env because mcp server needs some env vars
125405
125409
  env: {
@@ -125416,7 +125420,7 @@ var StdioClientTransport = class {
125416
125420
  this.onerror?.(error2);
125417
125421
  });
125418
125422
  this._process.on("spawn", () => {
125419
- resolve13();
125423
+ resolve14();
125420
125424
  });
125421
125425
  this._process.on("close", (_code) => {
125422
125426
  this._process = void 0;
@@ -125475,22 +125479,22 @@ var StdioClientTransport = class {
125475
125479
  if (this._process) {
125476
125480
  const processToClose = this._process;
125477
125481
  this._process = void 0;
125478
- const closePromise = new Promise((resolve13) => {
125482
+ const closePromise = new Promise((resolve14) => {
125479
125483
  processToClose.once("close", () => {
125480
- resolve13();
125484
+ resolve14();
125481
125485
  });
125482
125486
  });
125483
125487
  try {
125484
125488
  processToClose.stdin?.end();
125485
125489
  } catch {
125486
125490
  }
125487
- await Promise.race([closePromise, new Promise((resolve13) => setTimeout(resolve13, 2e3).unref())]);
125491
+ await Promise.race([closePromise, new Promise((resolve14) => setTimeout(resolve14, 2e3).unref())]);
125488
125492
  if (processToClose.exitCode === null) {
125489
125493
  try {
125490
125494
  processToClose.kill("SIGTERM");
125491
125495
  } catch {
125492
125496
  }
125493
- await Promise.race([closePromise, new Promise((resolve13) => setTimeout(resolve13, 2e3).unref())]);
125497
+ await Promise.race([closePromise, new Promise((resolve14) => setTimeout(resolve14, 2e3).unref())]);
125494
125498
  }
125495
125499
  if (processToClose.exitCode === null) {
125496
125500
  try {
@@ -125502,15 +125506,15 @@ var StdioClientTransport = class {
125502
125506
  this._readBuffer.clear();
125503
125507
  }
125504
125508
  send(message) {
125505
- return new Promise((resolve13) => {
125509
+ return new Promise((resolve14) => {
125506
125510
  if (!this._process?.stdin) {
125507
125511
  throw new Error("Not connected");
125508
125512
  }
125509
125513
  const json2 = serializeMessage(message);
125510
125514
  if (this._process.stdin.write(json2)) {
125511
- resolve13();
125515
+ resolve14();
125512
125516
  } else {
125513
- this._process.stdin.once("drain", resolve13);
125517
+ this._process.stdin.once("drain", resolve14);
125514
125518
  }
125515
125519
  });
125516
125520
  }
@@ -127140,6 +127144,129 @@ function resolveMcpServer(startPath, alias, envVariables) {
127140
127144
  return { filePath, server };
127141
127145
  }
127142
127146
 
127147
+ // src/mcpToolIntellisenseCache.ts
127148
+ var fs12 = __toESM(require("fs"));
127149
+ var path10 = __toESM(require("path"));
127150
+
127151
+ // src/cacheDir.ts
127152
+ var fs11 = __toESM(require("fs"));
127153
+ var path9 = __toESM(require("path"));
127154
+ var NORN_CACHE_DIR = ".norn-cache";
127155
+ var CACHE_GITIGNORE_FILE = ".gitignore";
127156
+ var CACHE_GITIGNORE_CONTENT = "*\n";
127157
+ var PROJECT_ROOT_MARKERS = [".git", "package.json", "pnpm-workspace.yaml", "package-lock.json", "yarn.lock", ".nornenv"];
127158
+ function getSearchStartDirectory(targetPath) {
127159
+ const resolvedPath = path9.resolve(targetPath);
127160
+ try {
127161
+ const stats = fs11.statSync(resolvedPath);
127162
+ return stats.isDirectory() ? resolvedPath : path9.dirname(resolvedPath);
127163
+ } catch {
127164
+ return path9.dirname(resolvedPath);
127165
+ }
127166
+ }
127167
+ function findProjectRoot(targetPath) {
127168
+ let dir = getSearchStartDirectory(targetPath);
127169
+ let projectRoot;
127170
+ while (true) {
127171
+ if (PROJECT_ROOT_MARKERS.some((marker) => fs11.existsSync(path9.join(dir, marker)))) {
127172
+ projectRoot = dir;
127173
+ }
127174
+ const parent = path9.dirname(dir);
127175
+ if (parent === dir) {
127176
+ break;
127177
+ }
127178
+ dir = parent;
127179
+ }
127180
+ return projectRoot ?? getSearchStartDirectory(targetPath);
127181
+ }
127182
+ function ensureNornCacheGitignore(cacheDir) {
127183
+ const gitignorePath = path9.join(cacheDir, CACHE_GITIGNORE_FILE);
127184
+ try {
127185
+ const hasDesiredContent = fs11.existsSync(gitignorePath) && fs11.readFileSync(gitignorePath, "utf8") === CACHE_GITIGNORE_CONTENT;
127186
+ if (hasDesiredContent) {
127187
+ return;
127188
+ }
127189
+ fs11.writeFileSync(gitignorePath, CACHE_GITIGNORE_CONTENT, "utf8");
127190
+ } catch {
127191
+ }
127192
+ }
127193
+ function ensureNornCacheDir(rootPath) {
127194
+ const cacheDir = path9.join(rootPath, NORN_CACHE_DIR);
127195
+ try {
127196
+ if (!fs11.existsSync(cacheDir)) {
127197
+ fs11.mkdirSync(cacheDir, { recursive: true });
127198
+ }
127199
+ ensureNornCacheGitignore(cacheDir);
127200
+ return cacheDir;
127201
+ } catch {
127202
+ return void 0;
127203
+ }
127204
+ }
127205
+
127206
+ // src/mcpToolIntellisenseCache.ts
127207
+ var CACHE_VERSION = 1;
127208
+ var CACHE_FILE = "mcp-tool-intellisense.json";
127209
+ function getCachePathForConfig(configPath) {
127210
+ return path10.join(path10.dirname(configPath), NORN_CACHE_DIR, CACHE_FILE);
127211
+ }
127212
+ function ensureCacheDirForConfig(configPath) {
127213
+ return !!ensureNornCacheDir(path10.dirname(configPath));
127214
+ }
127215
+ function loadCacheForConfig(configPath) {
127216
+ const cachePath = getCachePathForConfig(configPath);
127217
+ if (!fs12.existsSync(cachePath)) {
127218
+ return { version: CACHE_VERSION, servers: {} };
127219
+ }
127220
+ try {
127221
+ const content = fs12.readFileSync(cachePath, "utf-8");
127222
+ const parsed = JSON.parse(content);
127223
+ if (parsed.version !== CACHE_VERSION || !parsed.servers || typeof parsed.servers !== "object") {
127224
+ return { version: CACHE_VERSION, servers: {} };
127225
+ }
127226
+ return parsed;
127227
+ } catch {
127228
+ return { version: CACHE_VERSION, servers: {} };
127229
+ }
127230
+ }
127231
+ function saveCacheForConfig(configPath, cache) {
127232
+ if (!ensureCacheDirForConfig(configPath)) {
127233
+ return false;
127234
+ }
127235
+ const cachePath = getCachePathForConfig(configPath);
127236
+ try {
127237
+ fs12.writeFileSync(cachePath, JSON.stringify(cache, null, 2), "utf-8");
127238
+ return true;
127239
+ } catch {
127240
+ return false;
127241
+ }
127242
+ }
127243
+ function cloneJsonValue(value) {
127244
+ if (value === void 0) {
127245
+ return void 0;
127246
+ }
127247
+ try {
127248
+ return JSON.parse(JSON.stringify(value));
127249
+ } catch {
127250
+ return void 0;
127251
+ }
127252
+ }
127253
+ function toCachedMcpTool(tool) {
127254
+ return {
127255
+ name: tool.name,
127256
+ description: typeof tool.description === "string" ? tool.description : void 0,
127257
+ inputSchema: cloneJsonValue(tool.inputSchema)
127258
+ };
127259
+ }
127260
+ function saveMcpToolsForAlias(configPath, alias, tools) {
127261
+ const cache = loadCacheForConfig(configPath);
127262
+ cache.servers[alias.toLowerCase()] = {
127263
+ alias,
127264
+ cachedAt: (/* @__PURE__ */ new Date()).toISOString(),
127265
+ tools: tools.map((tool) => toCachedMcpTool(tool))
127266
+ };
127267
+ saveCacheForConfig(configPath, cache);
127268
+ }
127269
+
127143
127270
  // src/mcpClient.ts
127144
127271
  init_schemaGenerator();
127145
127272
  var NornJsonSchemaValidator = class {
@@ -127161,9 +127288,19 @@ var NornJsonSchemaValidator = class {
127161
127288
  };
127162
127289
  }
127163
127290
  };
127291
+ function getNornClientVersion() {
127292
+ try {
127293
+ const packageJsonPath = path11.resolve(__dirname, "..", "package.json");
127294
+ const packageJson = JSON.parse(fs13.readFileSync(packageJsonPath, "utf-8"));
127295
+ return typeof packageJson.version === "string" ? packageJson.version : "0.0.0";
127296
+ } catch {
127297
+ return "0.0.0";
127298
+ }
127299
+ }
127300
+ var NORN_CLIENT_VERSION = getNornClientVersion();
127164
127301
  function createClient() {
127165
127302
  return new Client2(
127166
- { name: "norn", version: "1.11.0" },
127303
+ { name: "norn", version: NORN_CLIENT_VERSION },
127167
127304
  {
127168
127305
  capabilities: {},
127169
127306
  jsonSchemaValidator: new NornJsonSchemaValidator()
@@ -127235,16 +127372,27 @@ var McpSessionManager = class {
127235
127372
  }
127236
127373
  cursor = response.nextCursor;
127237
127374
  } while (cursor);
127375
+ const { filePath } = resolveMcpServer(startPath, alias, envVariables);
127376
+ saveMcpToolsForAlias(filePath, alias, tools);
127238
127377
  return { tools };
127239
127378
  }
127240
- async callTool(startPath, alias, toolName, args, envVariables) {
127379
+ async getToolDefinition(startPath, alias, toolName, envVariables) {
127241
127380
  const session = await this.getSession(startPath, alias, envVariables);
127242
- if (!session.toolsByName.has(toolName.toLowerCase())) {
127243
- const listed = await this.listTools(startPath, alias, envVariables);
127244
- for (const tool of listed.tools) {
127245
- session.toolsByName.set(tool.name.toLowerCase(), tool);
127246
- }
127381
+ const normalizedToolName = toolName.toLowerCase();
127382
+ const cached2 = session.toolsByName.get(normalizedToolName);
127383
+ if (cached2) {
127384
+ return cached2;
127385
+ }
127386
+ const listed = await this.listTools(startPath, alias, envVariables);
127387
+ const resolved = listed.tools.find((tool) => tool.name.toLowerCase() === normalizedToolName);
127388
+ if (!resolved) {
127389
+ throw new Error(`Tool '${toolName}' was not found on MCP server '${alias}'.`);
127247
127390
  }
127391
+ return resolved;
127392
+ }
127393
+ async callTool(startPath, alias, toolName, args, envVariables) {
127394
+ const session = await this.getSession(startPath, alias, envVariables);
127395
+ await this.getToolDefinition(startPath, alias, toolName, envVariables);
127248
127396
  const result = await session.client.callTool(
127249
127397
  {
127250
127398
  name: toolName,
@@ -127270,6 +127418,51 @@ var McpSessionManager = class {
127270
127418
  }
127271
127419
  };
127272
127420
 
127421
+ // src/mcpToolSchema.ts
127422
+ function getInputSchemaObject(source) {
127423
+ if (!source.inputSchema || typeof source.inputSchema !== "object" || Array.isArray(source.inputSchema)) {
127424
+ return void 0;
127425
+ }
127426
+ return source.inputSchema;
127427
+ }
127428
+ function getMcpToolInputPropertyMap(source) {
127429
+ const schema = getInputSchemaObject(source);
127430
+ if (!schema) {
127431
+ return {};
127432
+ }
127433
+ const properties = schema.properties;
127434
+ if (!properties || typeof properties !== "object" || Array.isArray(properties)) {
127435
+ return {};
127436
+ }
127437
+ return properties;
127438
+ }
127439
+ function getMcpToolInputParameterNames(source) {
127440
+ const propertyMap = getMcpToolInputPropertyMap(source);
127441
+ const propertyNames = Object.keys(propertyMap);
127442
+ if (propertyNames.length > 0) {
127443
+ return propertyNames;
127444
+ }
127445
+ const schema = getInputSchemaObject(source);
127446
+ if (!schema || !Array.isArray(schema.required)) {
127447
+ return [];
127448
+ }
127449
+ return schema.required.filter((entry) => typeof entry === "string");
127450
+ }
127451
+ function getMcpToolRequiredParameterNames(source) {
127452
+ const schema = getInputSchemaObject(source);
127453
+ if (!schema || !Array.isArray(schema.required)) {
127454
+ return [];
127455
+ }
127456
+ return schema.required.filter((entry) => typeof entry === "string");
127457
+ }
127458
+ function mcpToolAllowsAdditionalProperties(source) {
127459
+ const schema = getInputSchemaObject(source);
127460
+ if (!schema) {
127461
+ return true;
127462
+ }
127463
+ return schema.additionalProperties !== false;
127464
+ }
127465
+
127273
127466
  // src/sequenceRunner.ts
127274
127467
  init_assertionRunner();
127275
127468
  function applyHeaderGroupsToRequest(parsed, requestText, headerGroups, variables) {
@@ -127613,21 +127806,29 @@ function parseMcpArguments(argsStr) {
127613
127806
  }
127614
127807
  const parts = splitNamedArgumentList(argsStr);
127615
127808
  const args = [];
127809
+ let sawNamedArgument = false;
127616
127810
  for (const part of parts) {
127617
127811
  const trimmed = part.trim();
127618
127812
  if (!trimmed) {
127619
127813
  continue;
127620
127814
  }
127621
127815
  const match = trimmed.match(/^([a-zA-Z_][a-zA-Z0-9_]*)\s*:\s*(.+)$/);
127622
- if (!match) {
127816
+ if (match) {
127817
+ sawNamedArgument = true;
127818
+ args.push({
127819
+ name: match[1],
127820
+ valueExpression: match[2].trim()
127821
+ });
127822
+ continue;
127823
+ }
127824
+ if (sawNamedArgument) {
127623
127825
  return {
127624
127826
  args: [],
127625
- error: "MCP tool arguments must use named syntax like name: value."
127827
+ error: "Positional MCP arguments cannot follow named arguments."
127626
127828
  };
127627
127829
  }
127628
127830
  args.push({
127629
- name: match[1],
127630
- valueExpression: match[2].trim()
127831
+ valueExpression: trimmed
127631
127832
  });
127632
127833
  }
127633
127834
  return { args };
@@ -127745,20 +127946,56 @@ function evaluateMcpArgumentExpression(expr, runtimeVariables) {
127745
127946
  }
127746
127947
  return evaluateSqlArgumentExpression(expr, runtimeVariables);
127747
127948
  }
127748
- function bindMcpArguments(args, runtimeVariables) {
127949
+ function bindMcpArguments(tool, args, runtimeVariables) {
127950
+ const parameterNames = getMcpToolInputParameterNames(tool);
127951
+ const requiredParameterNames = getMcpToolRequiredParameterNames(tool);
127952
+ const allowsAdditionalProperties = mcpToolAllowsAdditionalProperties(tool);
127749
127953
  const resolvedParams = {};
127750
127954
  const boundNames = /* @__PURE__ */ new Set();
127955
+ let positionalIndex = 0;
127956
+ let sawNamedArgument = false;
127751
127957
  for (const arg of args) {
127752
- const normalizedName = arg.name.toLowerCase();
127753
- if (boundNames.has(normalizedName)) {
127754
- return { error: `Duplicate MCP parameter '${arg.name}' in tool call.` };
127958
+ if (arg.name) {
127959
+ sawNamedArgument = true;
127960
+ const declaredParam = parameterNames.find((param) => param.toLowerCase() === arg.name.toLowerCase());
127961
+ const resolvedName2 = declaredParam ?? arg.name;
127962
+ const normalizedName = resolvedName2.toLowerCase();
127963
+ if (!declaredParam && !allowsAdditionalProperties) {
127964
+ return { error: `Unknown MCP parameter '${arg.name}' for tool '${tool.name}'.` };
127965
+ }
127966
+ if (boundNames.has(normalizedName)) {
127967
+ return { error: `Duplicate MCP parameter '${resolvedName2}' in tool call.` };
127968
+ }
127969
+ const valueResult2 = evaluateMcpArgumentExpression(arg.valueExpression, runtimeVariables);
127970
+ if (valueResult2.error) {
127971
+ return { error: valueResult2.error };
127972
+ }
127973
+ resolvedParams[resolvedName2] = valueResult2.value;
127974
+ boundNames.add(normalizedName);
127975
+ continue;
127976
+ }
127977
+ if (sawNamedArgument) {
127978
+ return { error: "Positional MCP arguments cannot follow named arguments." };
127979
+ }
127980
+ if (positionalIndex >= parameterNames.length) {
127981
+ if (parameterNames.length === 0) {
127982
+ return { error: `Tool '${tool.name}' does not declare positional parameters.` };
127983
+ }
127984
+ return { error: `Too many MCP arguments for tool '${tool.name}': expected at most ${parameterNames.length}.` };
127755
127985
  }
127756
127986
  const valueResult = evaluateMcpArgumentExpression(arg.valueExpression, runtimeVariables);
127757
127987
  if (valueResult.error) {
127758
127988
  return { error: valueResult.error };
127759
127989
  }
127760
- resolvedParams[arg.name] = valueResult.value;
127761
- boundNames.add(normalizedName);
127990
+ const resolvedName = parameterNames[positionalIndex];
127991
+ resolvedParams[resolvedName] = valueResult.value;
127992
+ boundNames.add(resolvedName.toLowerCase());
127993
+ positionalIndex++;
127994
+ }
127995
+ for (const requiredName of requiredParameterNames) {
127996
+ if (!boundNames.has(requiredName.toLowerCase())) {
127997
+ return { error: `Missing required MCP parameter '${requiredName}' for tool '${tool.name}'.` };
127998
+ }
127762
127999
  }
127763
128000
  return { params: resolvedParams };
127764
128001
  }
@@ -127856,8 +128093,8 @@ function parseJsonBackedValue(value) {
127856
128093
  return value;
127857
128094
  }
127858
128095
  }
127859
- function getVariableValueByPath(path15, variables) {
127860
- const parts = getPathSegments(path15);
128096
+ function getVariableValueByPath(path17, variables) {
128097
+ const parts = getPathSegments(path17);
127861
128098
  let current = variables;
127862
128099
  for (const part of parts) {
127863
128100
  if (current === null || current === void 0) {
@@ -128210,8 +128447,8 @@ function evaluateValueExpression(expr, runtimeVariables) {
128210
128447
  if (typeof dataToNavigate !== "object" || dataToNavigate === null) {
128211
128448
  return { value: String(varValue), error: `Cannot access path on non-object value` };
128212
128449
  }
128213
- const path15 = pathPart.replace(/^\./, "");
128214
- const parts = getPathSegments(path15);
128450
+ const path17 = pathPart.replace(/^\./, "");
128451
+ const parts = getPathSegments(path17);
128215
128452
  let current = dataToNavigate;
128216
128453
  for (const part of parts) {
128217
128454
  if (current === null || current === void 0) {
@@ -128346,8 +128583,8 @@ function resolveBareVariables(text, variables) {
128346
128583
  if (varName in variables) {
128347
128584
  const value = variables[varName];
128348
128585
  if (pathPart) {
128349
- const path15 = pathPart.replace(/^\./, "");
128350
- const nestedValue = getNestedValueFromObject(value, path15);
128586
+ const path17 = pathPart.replace(/^\./, "");
128587
+ const nestedValue = getNestedValueFromObject(value, path17);
128351
128588
  return valueToString2(nestedValue);
128352
128589
  }
128353
128590
  return valueToString2(value);
@@ -128367,8 +128604,8 @@ function resolveBareVariables(text, variables) {
128367
128604
  if (varName in variables) {
128368
128605
  const value = variables[varName];
128369
128606
  if (pathPart) {
128370
- const path15 = pathPart.replace(/^\./, "");
128371
- return valueToString2(getNestedValueFromObject(value, path15));
128607
+ const path17 = pathPart.replace(/^\./, "");
128608
+ return valueToString2(getNestedValueFromObject(value, path17));
128372
128609
  }
128373
128610
  return valueToString2(value);
128374
128611
  }
@@ -128416,11 +128653,11 @@ function splitExpressionParts(expr) {
128416
128653
  }
128417
128654
  return parts;
128418
128655
  }
128419
- function getNestedValueFromObject(obj, path15) {
128420
- if (!path15) {
128656
+ function getNestedValueFromObject(obj, path17) {
128657
+ if (!path17) {
128421
128658
  return obj;
128422
128659
  }
128423
- const parts = path15.split(/\.|\[(\d+)\]/).filter((p) => p !== "" && p !== void 0);
128660
+ const parts = path17.split(/\.|\[(\d+)\]/).filter((p) => p !== "" && p !== void 0);
128424
128661
  let current = obj;
128425
128662
  for (const part of parts) {
128426
128663
  if (current === null || current === void 0) {
@@ -128443,7 +128680,7 @@ function valueToString2(value) {
128443
128680
  return String(value);
128444
128681
  }
128445
128682
  function sleep2(ms) {
128446
- return new Promise((resolve13) => setTimeout(resolve13, ms));
128683
+ return new Promise((resolve14) => setTimeout(resolve14, ms));
128447
128684
  }
128448
128685
  function isIfCommand(line2) {
128449
128686
  return /^if\s+.+$/i.test(line2.trim());
@@ -128819,24 +129056,24 @@ function extractCaptureDirectives(content) {
128819
129056
  for (const line2 of content.split("\n")) {
128820
129057
  const match = line2.trim().match(captureRegex);
128821
129058
  if (match) {
128822
- let path15 = match[3] || "";
128823
- if (path15.startsWith(".")) {
128824
- path15 = path15.substring(1);
129059
+ let path17 = match[3] || "";
129060
+ if (path17.startsWith(".")) {
129061
+ path17 = path17.substring(1);
128825
129062
  }
128826
129063
  captures.push({
128827
129064
  varName: match[1],
128828
129065
  afterRequest: parseInt(match[2], 10),
128829
- path: path15
129066
+ path: path17
128830
129067
  });
128831
129068
  }
128832
129069
  }
128833
129070
  return captures;
128834
129071
  }
128835
- function getValueByPath(response, path15) {
128836
- if (!path15) {
129072
+ function getValueByPath(response, path17) {
129073
+ if (!path17) {
128837
129074
  return void 0;
128838
129075
  }
128839
- const parts = getPathSegments(path15);
129076
+ const parts = getPathSegments(path17);
128840
129077
  if (parts.length === 0) {
128841
129078
  return void 0;
128842
129079
  }
@@ -129215,8 +129452,8 @@ async function runSequenceWithJar(sequenceContent, fileVariables, cookieJar, wor
129215
129452
  }
129216
129453
  }
129217
129454
  if (pathPart) {
129218
- const path15 = pathPart.replace(/^\./, "");
129219
- newValue = getNestedValueFromObject(value, path15);
129455
+ const path17 = pathPart.replace(/^\./, "");
129456
+ newValue = getNestedValueFromObject(value, path17);
129220
129457
  } else {
129221
129458
  newValue = value;
129222
129459
  }
@@ -129513,7 +129750,30 @@ async function runSequenceWithJar(sequenceContent, fileVariables, cookieJar, wor
129513
129750
  duration: Date.now() - startTime
129514
129751
  };
129515
129752
  }
129516
- const boundArgs = bindMcpArguments(parsed.args, runtimeVariables);
129753
+ let toolDefinition;
129754
+ try {
129755
+ toolDefinition = await mcpSessionManager.getToolDefinition(
129756
+ getCurrentMcpStartPath(),
129757
+ parsed.serverAlias,
129758
+ parsed.toolName,
129759
+ getRuntimeEnvironmentVariables(runtimeVariables)
129760
+ );
129761
+ } catch (error2) {
129762
+ const message = `MCP call failed for '${parsed.serverAlias}.${parsed.toolName}': ${error2?.message || String(error2)}`;
129763
+ errors.push(message);
129764
+ await emitFailure(message, step, stepIdx);
129765
+ return {
129766
+ name: "",
129767
+ success: false,
129768
+ responses,
129769
+ scriptResults,
129770
+ assertionResults,
129771
+ steps: orderedSteps,
129772
+ errors,
129773
+ duration: Date.now() - startTime
129774
+ };
129775
+ }
129776
+ const boundArgs = bindMcpArguments(toolDefinition, parsed.args, runtimeVariables);
129517
129777
  if ("error" in boundArgs) {
129518
129778
  errors.push(`Step ${stepIdx + 1}: ${boundArgs.error}`);
129519
129779
  return {
@@ -129700,7 +129960,8 @@ async function runSequenceWithJar(sequenceContent, fileVariables, cookieJar, wor
129700
129960
  response,
129701
129961
  requestMethod: parsed.method,
129702
129962
  requestUrl: resolvedUrl,
129703
- variableName: parsed.varName
129963
+ variableName: parsed.varName,
129964
+ lineNumber: step.lineNumber
129704
129965
  };
129705
129966
  orderedSteps.push(stepResult);
129706
129967
  reportProgress(stepIdx, "request", `var ${parsed.varName} = ${requestDescription}`, stepResult);
@@ -129885,8 +130146,8 @@ ${indentMultiline(userMessage)}`;
129885
130146
  if (sequenceSources) {
129886
130147
  const sourceFile = sequenceSources.get(targetName.toLowerCase());
129887
130148
  if (sourceFile) {
129888
- const path15 = await import("path");
129889
- subWorkingDir = path15.dirname(sourceFile);
130149
+ const path17 = await import("path");
130150
+ subWorkingDir = path17.dirname(sourceFile);
129890
130151
  }
129891
130152
  }
129892
130153
  const targetLocation = executionContext?.sequenceLocationIndex?.get(targetName.toLowerCase());
@@ -129992,7 +130253,8 @@ ${indentMultiline(userMessage)}`;
129992
130253
  stepIndex: stepIdx,
129993
130254
  response,
129994
130255
  requestMethod: requestParsed.method,
129995
- requestUrl: requestParsed.url
130256
+ requestUrl: requestParsed.url,
130257
+ lineNumber: step.lineNumber
129996
130258
  };
129997
130259
  orderedSteps.push(stepResult);
129998
130260
  reportProgress(stepIdx, "namedRequest", `run ${targetName} \u2192 ${requestParsed.method} ${requestParsed.url}`, stepResult);
@@ -130104,7 +130366,8 @@ ${indentMultiline(userMessage)}`;
130104
130366
  response,
130105
130367
  requestMethod: requestParsed.method,
130106
130368
  requestUrl: requestParsed.url,
130107
- variableName: varName
130369
+ variableName: varName,
130370
+ lineNumber: step.lineNumber
130108
130371
  };
130109
130372
  orderedSteps.push(stepResult);
130110
130373
  reportProgress(stepIdx, "namedRequest", `var ${varName} = run ${sequenceName} \u2192 ${requestParsed.method} ${requestParsed.url}`, stepResult);
@@ -130192,8 +130455,8 @@ ${indentMultiline(userMessage)}`;
130192
130455
  if (sequenceSources) {
130193
130456
  const sourceFile = sequenceSources.get(sequenceName.toLowerCase());
130194
130457
  if (sourceFile) {
130195
- const path15 = await import("path");
130196
- subWorkingDir = path15.dirname(sourceFile);
130458
+ const path17 = await import("path");
130459
+ subWorkingDir = path17.dirname(sourceFile);
130197
130460
  }
130198
130461
  }
130199
130462
  const targetLocation = executionContext?.sequenceLocationIndex?.get(sequenceName.toLowerCase());
@@ -130375,7 +130638,8 @@ ${indentMultiline(userMessage)}`;
130375
130638
  stepIndex: stepIdx,
130376
130639
  response,
130377
130640
  requestMethod: parsed.method,
130378
- requestUrl: parsed.url
130641
+ requestUrl: parsed.url,
130642
+ lineNumber: step.lineNumber
130379
130643
  };
130380
130644
  orderedSteps.push(stepResult);
130381
130645
  reportProgress(stepIdx, "request", requestDescription, stepResult);
@@ -131030,7 +131294,7 @@ function formatRunSummary(results, totalDuration, colors) {
131030
131294
  }
131031
131295
 
131032
131296
  // src/cli/reporters/junit.ts
131033
- var fs11 = __toESM(require("fs"));
131297
+ var fs14 = __toESM(require("fs"));
131034
131298
  function escapeXml(text) {
131035
131299
  return text.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&apos;");
131036
131300
  }
@@ -131050,7 +131314,7 @@ function generateJUnitReport(results, options) {
131050
131314
  xml += generateTestSuite(result, redaction);
131051
131315
  }
131052
131316
  xml += "</testsuites>\n";
131053
- fs11.writeFileSync(outputPath, xml, "utf-8");
131317
+ fs14.writeFileSync(outputPath, xml, "utf-8");
131054
131318
  }
131055
131319
  function generateTestSuite(result, redaction) {
131056
131320
  const assertions = result.assertionResults || [];
@@ -131176,11 +131440,11 @@ Response: ${bodyStr}`;
131176
131440
  xml += " </testcase>\n";
131177
131441
  xml += " </testsuite>\n";
131178
131442
  xml += "</testsuites>\n";
131179
- fs11.writeFileSync(outputPath, xml, "utf-8");
131443
+ fs14.writeFileSync(outputPath, xml, "utf-8");
131180
131444
  }
131181
131445
 
131182
131446
  // src/cli/reporters/html.ts
131183
- var fs12 = __toESM(require("fs"));
131447
+ var fs15 = __toESM(require("fs"));
131184
131448
  function escapeHtml(text) {
131185
131449
  return text.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#039;");
131186
131450
  }
@@ -131292,7 +131556,7 @@ function generateHtmlReport(results, options) {
131292
131556
  </script>
131293
131557
  </body>
131294
131558
  </html>`;
131295
- fs12.writeFileSync(outputPath, html, "utf-8");
131559
+ fs15.writeFileSync(outputPath, html, "utf-8");
131296
131560
  }
131297
131561
  function generateSequenceHtml(result, index, redaction) {
131298
131562
  const statusClass = result.success ? "passed" : "failed";
@@ -131734,8 +131998,8 @@ function generateHtmlReportFromResponse(response, testName, options) {
131734
131998
  }
131735
131999
 
131736
132000
  // src/environmentParser.ts
131737
- var fs15 = __toESM(require("fs"));
131738
- var path11 = __toESM(require("path"));
132001
+ var fs17 = __toESM(require("fs"));
132002
+ var path13 = __toESM(require("path"));
131739
132003
 
131740
132004
  // src/secrets/crypto.ts
131741
132005
  var crypto7 = __toESM(require("crypto"));
@@ -131803,65 +132067,20 @@ function decryptSecretValue(encryptedValue, sharedKey) {
131803
132067
  }
131804
132068
 
131805
132069
  // src/secrets/keyStore.ts
131806
- var fs14 = __toESM(require("fs"));
131807
- var path10 = __toESM(require("path"));
131808
-
131809
- // src/cacheDir.ts
131810
- var fs13 = __toESM(require("fs"));
131811
- var path9 = __toESM(require("path"));
131812
- var NORN_CACHE_DIR = ".norn-cache";
131813
- var CACHE_GITIGNORE_FILE = ".gitignore";
131814
- var CACHE_GITIGNORE_CONTENT = "*\n";
131815
- var PROJECT_ROOT_MARKERS = [".git", "package.json", "pnpm-workspace.yaml", "package-lock.json", "yarn.lock", ".nornenv"];
131816
- function getSearchStartDirectory(targetPath) {
131817
- const resolvedPath = path9.resolve(targetPath);
131818
- try {
131819
- const stats = fs13.statSync(resolvedPath);
131820
- return stats.isDirectory() ? resolvedPath : path9.dirname(resolvedPath);
131821
- } catch {
131822
- return path9.dirname(resolvedPath);
131823
- }
131824
- }
131825
- function findProjectRoot(targetPath) {
131826
- let dir = getSearchStartDirectory(targetPath);
131827
- let projectRoot;
131828
- while (true) {
131829
- if (PROJECT_ROOT_MARKERS.some((marker) => fs13.existsSync(path9.join(dir, marker)))) {
131830
- projectRoot = dir;
131831
- }
131832
- const parent = path9.dirname(dir);
131833
- if (parent === dir) {
131834
- break;
131835
- }
131836
- dir = parent;
131837
- }
131838
- return projectRoot ?? getSearchStartDirectory(targetPath);
131839
- }
131840
- function ensureNornCacheGitignore(cacheDir) {
131841
- const gitignorePath = path9.join(cacheDir, CACHE_GITIGNORE_FILE);
131842
- try {
131843
- const hasDesiredContent = fs13.existsSync(gitignorePath) && fs13.readFileSync(gitignorePath, "utf8") === CACHE_GITIGNORE_CONTENT;
131844
- if (hasDesiredContent) {
131845
- return;
131846
- }
131847
- fs13.writeFileSync(gitignorePath, CACHE_GITIGNORE_CONTENT, "utf8");
131848
- } catch {
131849
- }
131850
- }
131851
-
131852
- // src/secrets/keyStore.ts
131853
- var CACHE_FILE = "secret-keys.json";
131854
- var CACHE_VERSION = 1;
132070
+ var fs16 = __toESM(require("fs"));
132071
+ var path12 = __toESM(require("path"));
132072
+ var CACHE_FILE2 = "secret-keys.json";
132073
+ var CACHE_VERSION2 = 1;
131855
132074
  var CACHE_SCAN_IGNORED_DIRS = /* @__PURE__ */ new Set(["node_modules", ".git", "dist", "out"]);
131856
132075
  var sessionKeys = /* @__PURE__ */ new Map();
131857
132076
  var projectSecretKeyCacheDirs = /* @__PURE__ */ new Map();
131858
132077
  function getCacheFilePath(cacheDir) {
131859
- return path10.join(cacheDir, CACHE_FILE);
132078
+ return path12.join(cacheDir, CACHE_FILE2);
131860
132079
  }
131861
132080
  function cacheFileExists(cacheDir) {
131862
132081
  const cacheFilePath = getCacheFilePath(cacheDir);
131863
132082
  try {
131864
- return fs14.existsSync(cacheFilePath) && fs14.statSync(cacheFilePath).isFile();
132083
+ return fs16.existsSync(cacheFilePath) && fs16.statSync(cacheFilePath).isFile();
131865
132084
  } catch {
131866
132085
  return false;
131867
132086
  }
@@ -131878,13 +132097,13 @@ function getProjectSecretKeyCacheDirs(projectRoot) {
131878
132097
  if (!dir) {
131879
132098
  continue;
131880
132099
  }
131881
- const cacheDir = path10.join(dir, NORN_CACHE_DIR);
132100
+ const cacheDir = path12.join(dir, NORN_CACHE_DIR);
131882
132101
  if (cacheFileExists(cacheDir)) {
131883
132102
  results.push(cacheDir);
131884
132103
  }
131885
132104
  let entries;
131886
132105
  try {
131887
- entries = fs14.readdirSync(dir, { withFileTypes: true });
132106
+ entries = fs16.readdirSync(dir, { withFileTypes: true });
131888
132107
  } catch {
131889
132108
  continue;
131890
132109
  }
@@ -131895,7 +132114,7 @@ function getProjectSecretKeyCacheDirs(projectRoot) {
131895
132114
  if (entry.name === NORN_CACHE_DIR || CACHE_SCAN_IGNORED_DIRS.has(entry.name)) {
131896
132115
  continue;
131897
132116
  }
131898
- queue.push(path10.join(dir, entry.name));
132117
+ queue.push(path12.join(dir, entry.name));
131899
132118
  }
131900
132119
  }
131901
132120
  results.sort();
@@ -131903,11 +132122,11 @@ function getProjectSecretKeyCacheDirs(projectRoot) {
131903
132122
  return results;
131904
132123
  }
131905
132124
  function getCacheDistance(targetPath, cacheDir) {
131906
- const relative5 = path10.relative(getSearchStartDirectory(targetPath), cacheDir);
132125
+ const relative5 = path12.relative(getSearchStartDirectory(targetPath), cacheDir);
131907
132126
  if (!relative5 || relative5 === ".") {
131908
132127
  return 0;
131909
132128
  }
131910
- return relative5.split(path10.sep).filter((segment) => segment !== "").length;
132129
+ return relative5.split(path12.sep).filter((segment) => segment !== "").length;
131911
132130
  }
131912
132131
  function findExistingSecretKeyCacheDir(targetPath) {
131913
132132
  const projectRoot = findProjectRoot(targetPath);
@@ -131934,9 +132153,9 @@ function rememberSecretKeyCacheDir(targetPath, cacheDir) {
131934
132153
  function ensureCacheDir(targetPath) {
131935
132154
  const existing = findExistingSecretKeyCacheDir(targetPath);
131936
132155
  const projectRoot = findProjectRoot(targetPath);
131937
- const cacheDir = existing ?? path10.join(projectRoot, NORN_CACHE_DIR);
131938
- if (!fs14.existsSync(cacheDir)) {
131939
- fs14.mkdirSync(cacheDir, { recursive: true });
132156
+ const cacheDir = existing ?? path12.join(projectRoot, NORN_CACHE_DIR);
132157
+ if (!fs16.existsSync(cacheDir)) {
132158
+ fs16.mkdirSync(cacheDir, { recursive: true });
131940
132159
  }
131941
132160
  ensureNornCacheGitignore(cacheDir);
131942
132161
  rememberSecretKeyCacheDir(targetPath, cacheDir);
@@ -131948,8 +132167,8 @@ function getReadCachePath(targetPath) {
131948
132167
  return getCacheFilePath(existing);
131949
132168
  }
131950
132169
  const projectRoot = findProjectRoot(targetPath);
131951
- const projectCacheDir = path10.join(projectRoot, NORN_CACHE_DIR);
131952
- if (fs14.existsSync(projectCacheDir) && fs14.statSync(projectCacheDir).isDirectory()) {
132170
+ const projectCacheDir = path12.join(projectRoot, NORN_CACHE_DIR);
132171
+ if (fs16.existsSync(projectCacheDir) && fs16.statSync(projectCacheDir).isDirectory()) {
131953
132172
  return getCacheFilePath(projectCacheDir);
131954
132173
  }
131955
132174
  return void 0;
@@ -131959,24 +132178,24 @@ function getWriteCachePath(targetPath) {
131959
132178
  }
131960
132179
  function readCache(targetPath) {
131961
132180
  const cachePath = getReadCachePath(targetPath);
131962
- if (!cachePath || !fs14.existsSync(cachePath)) {
131963
- return { version: CACHE_VERSION, keys: {} };
132181
+ if (!cachePath || !fs16.existsSync(cachePath)) {
132182
+ return { version: CACHE_VERSION2, keys: {} };
131964
132183
  }
131965
132184
  try {
131966
- const parsed = JSON.parse(fs14.readFileSync(cachePath, "utf8"));
131967
- if (parsed.version !== CACHE_VERSION || typeof parsed.keys !== "object" || parsed.keys === null) {
131968
- return { version: CACHE_VERSION, keys: {} };
132185
+ const parsed = JSON.parse(fs16.readFileSync(cachePath, "utf8"));
132186
+ if (parsed.version !== CACHE_VERSION2 || typeof parsed.keys !== "object" || parsed.keys === null) {
132187
+ return { version: CACHE_VERSION2, keys: {} };
131969
132188
  }
131970
132189
  return parsed;
131971
132190
  } catch {
131972
- return { version: CACHE_VERSION, keys: {} };
132191
+ return { version: CACHE_VERSION2, keys: {} };
131973
132192
  }
131974
132193
  }
131975
132194
  function writeCache(targetPath, cache) {
131976
132195
  const cachePath = getWriteCachePath(targetPath);
131977
- fs14.writeFileSync(cachePath, JSON.stringify(cache, null, 2), { encoding: "utf8", mode: 384 });
132196
+ fs16.writeFileSync(cachePath, JSON.stringify(cache, null, 2), { encoding: "utf8", mode: 384 });
131978
132197
  try {
131979
- fs14.chmodSync(cachePath, 384);
132198
+ fs16.chmodSync(cachePath, 384);
131980
132199
  } catch {
131981
132200
  }
131982
132201
  }
@@ -132167,22 +132386,22 @@ function parseEnvFile(content, sourceFilePath) {
132167
132386
  return config2;
132168
132387
  }
132169
132388
  function getEnvSearchStartDirectory(targetPath) {
132170
- const resolvedPath = path11.resolve(targetPath);
132389
+ const resolvedPath = path13.resolve(targetPath);
132171
132390
  try {
132172
- const stats = fs15.statSync(resolvedPath);
132173
- return stats.isDirectory() ? resolvedPath : path11.dirname(resolvedPath);
132391
+ const stats = fs17.statSync(resolvedPath);
132392
+ return stats.isDirectory() ? resolvedPath : path13.dirname(resolvedPath);
132174
132393
  } catch {
132175
- return path11.dirname(resolvedPath);
132394
+ return path13.dirname(resolvedPath);
132176
132395
  }
132177
132396
  }
132178
132397
  function findEnvFileFromPath(filePath) {
132179
132398
  let dir = getEnvSearchStartDirectory(filePath);
132180
132399
  while (true) {
132181
- const envPath = path11.join(dir, ENV_FILENAME);
132182
- if (fs15.existsSync(envPath)) {
132400
+ const envPath = path13.join(dir, ENV_FILENAME);
132401
+ if (fs17.existsSync(envPath)) {
132183
132402
  return envPath;
132184
132403
  }
132185
- const parentDir = path11.dirname(dir);
132404
+ const parentDir = path13.dirname(dir);
132186
132405
  if (parentDir === dir) {
132187
132406
  break;
132188
132407
  }
@@ -132207,7 +132426,7 @@ function resolveNornenvImports(config2, baseDir, entryFilePath, readFile2, impor
132207
132426
  }
132208
132427
  for (const imp of config2.imports) {
132209
132428
  const resolvedImportPath = resolveImportPath(imp.path, baseDir);
132210
- if (!resolvedImportPath || !fs15.existsSync(resolvedImportPath)) {
132429
+ if (!resolvedImportPath || !fs17.existsSync(resolvedImportPath)) {
132211
132430
  errors.push({
132212
132431
  message: `Imported file not found: '${imp.path}'`,
132213
132432
  filePath: entryFilePath,
@@ -132223,10 +132442,10 @@ function resolveNornenvImports(config2, baseDir, entryFilePath, readFile2, impor
132223
132442
  });
132224
132443
  continue;
132225
132444
  }
132226
- const normalizedPath = path11.resolve(resolvedImportPath);
132445
+ const normalizedPath = path13.resolve(resolvedImportPath);
132227
132446
  if (stack.includes(normalizedPath)) {
132228
- const entryDir = path11.dirname(stack[0]);
132229
- const cycle = [...stack, normalizedPath].map((p) => path11.relative(entryDir, p) || path11.basename(p)).join(" \u2192 ");
132447
+ const entryDir = path13.dirname(stack[0]);
132448
+ const cycle = [...stack, normalizedPath].map((p) => path13.relative(entryDir, p) || path13.basename(p)).join(" \u2192 ");
132230
132449
  errors.push({
132231
132450
  message: `Circular import detected: ${cycle}`,
132232
132451
  filePath: entryFilePath,
@@ -132255,7 +132474,7 @@ function resolveNornenvImports(config2, baseDir, entryFilePath, readFile2, impor
132255
132474
  if (importedConfig.imports.length > 0) {
132256
132475
  const childResult = resolveNornenvImports(
132257
132476
  importedConfig,
132258
- path11.dirname(normalizedPath),
132477
+ path13.dirname(normalizedPath),
132259
132478
  normalizedPath,
132260
132479
  readFile2,
132261
132480
  [...stack, normalizedPath],
@@ -132273,7 +132492,7 @@ function resolveNornenvImports(config2, baseDir, entryFilePath, readFile2, impor
132273
132492
  }
132274
132493
  function resolveImportPath(importPath, baseDir) {
132275
132494
  const cleaned = importPath.replace(/^["']|["']$/g, "");
132276
- return path11.resolve(baseDir, cleaned);
132495
+ return path13.resolve(baseDir, cleaned);
132277
132496
  }
132278
132497
  function registerVariableOrigins(config2, filePath, origins) {
132279
132498
  for (const varName of Object.keys(config2.common)) {
@@ -132337,12 +132556,12 @@ function mergeConfigs(target, source, targetFilePath, sourceFilePath, variableOr
132337
132556
  }
132338
132557
  }
132339
132558
  function toDisplayPath(filePath, entryFilePath) {
132340
- const entryDir = path11.dirname(entryFilePath);
132341
- const relative5 = path11.relative(entryDir, filePath);
132342
- return relative5 && relative5 !== "" ? relative5 : path11.basename(filePath);
132559
+ const entryDir = path13.dirname(entryFilePath);
132560
+ const relative5 = path13.relative(entryDir, filePath);
132561
+ return relative5 && relative5 !== "" ? relative5 : path13.basename(filePath);
132343
132562
  }
132344
132563
  function loadAndResolveEnvFile(filePath) {
132345
- const content = fs15.readFileSync(filePath, "utf-8");
132564
+ const content = fs17.readFileSync(filePath, "utf-8");
132346
132565
  const config2 = parseEnvFile(content, filePath);
132347
132566
  if (config2.imports.length === 0) {
132348
132567
  const secretErrors = resolveEncryptedSecretValues(config2, filePath);
@@ -132350,9 +132569,9 @@ function loadAndResolveEnvFile(filePath) {
132350
132569
  }
132351
132570
  const result = resolveNornenvImports(
132352
132571
  config2,
132353
- path11.dirname(filePath),
132572
+ path13.dirname(filePath),
132354
132573
  filePath,
132355
- (p) => fs15.readFileSync(p, "utf-8")
132574
+ (p) => fs17.readFileSync(p, "utf-8")
132356
132575
  );
132357
132576
  result.secretErrors.push(...resolveEncryptedSecretValues(result.config, filePath));
132358
132577
  return result;
@@ -132418,14 +132637,14 @@ function resolveEncryptedSecretValues(config2, entryFilePath) {
132418
132637
  }
132419
132638
 
132420
132639
  // src/secrets/cliSecrets.ts
132421
- var fs17 = __toESM(require("fs"));
132422
- var path13 = __toESM(require("path"));
132640
+ var fs19 = __toESM(require("fs"));
132641
+ var path15 = __toESM(require("path"));
132423
132642
  var readline = __toESM(require("readline"));
132424
132643
  var import_process = require("process");
132425
132644
 
132426
132645
  // src/secrets/envFileSecrets.ts
132427
- var fs16 = __toESM(require("fs"));
132428
- var path12 = __toESM(require("path"));
132646
+ var fs18 = __toESM(require("fs"));
132647
+ var path14 = __toESM(require("path"));
132429
132648
  var envRegex2 = /^\s*\[env:([a-zA-Z_][a-zA-Z0-9_-]*)\]\s*$/;
132430
132649
  var secretConnectionStringRegex2 = /^(\s*secret\s+connectionString\s+)([a-zA-Z_][a-zA-Z0-9_]*)(\s*=\s*)(.+)$/;
132431
132650
  var secretRegex2 = /^(\s*secret\s+)([a-zA-Z_][a-zA-Z0-9_]*)(\s*=\s*)(.+)$/;
@@ -132436,7 +132655,7 @@ function detectEol(content) {
132436
132655
  return content.includes("\r\n") ? "\r\n" : "\n";
132437
132656
  }
132438
132657
  function isNornenvFilePath(filePath) {
132439
- return path12.basename(filePath).toLowerCase() === ".nornenv";
132658
+ return path14.basename(filePath).toLowerCase() === ".nornenv";
132440
132659
  }
132441
132660
  function extractSecretLines(content, filePath) {
132442
132661
  const lines = splitContentLines(content);
@@ -132510,7 +132729,7 @@ function findSecretLine(content, variableName, envName) {
132510
132729
  return secretLines.find((secret) => secret.name === variableName);
132511
132730
  }
132512
132731
  function loadSecretLine(filePath, variableName, envName) {
132513
- const content = fs16.readFileSync(filePath, "utf8");
132732
+ const content = fs18.readFileSync(filePath, "utf8");
132514
132733
  const secret = findSecretLine(content, variableName, envName);
132515
132734
  if (!secret) {
132516
132735
  const envLabel = envName ? ` in [env:${envName}]` : "";
@@ -132519,22 +132738,22 @@ function loadSecretLine(filePath, variableName, envName) {
132519
132738
  return { content, secret };
132520
132739
  }
132521
132740
  function writeSecretLine(filePath, content) {
132522
- fs16.writeFileSync(filePath, content, "utf8");
132741
+ fs18.writeFileSync(filePath, content, "utf8");
132523
132742
  }
132524
132743
  function discoverNornenvFiles(targetPath) {
132525
- const resolved = path12.resolve(targetPath);
132526
- if (!fs16.existsSync(resolved)) {
132744
+ const resolved = path14.resolve(targetPath);
132745
+ if (!fs18.existsSync(resolved)) {
132527
132746
  return [];
132528
132747
  }
132529
- const stats = fs16.statSync(resolved);
132748
+ const stats = fs18.statSync(resolved);
132530
132749
  if (stats.isFile()) {
132531
132750
  return isNornenvFilePath(resolved) ? [resolved] : [];
132532
132751
  }
132533
132752
  const results = [];
132534
132753
  const walk = (dir) => {
132535
- const entries = fs16.readdirSync(dir, { withFileTypes: true });
132754
+ const entries = fs18.readdirSync(dir, { withFileTypes: true });
132536
132755
  for (const entry of entries) {
132537
- const fullPath = path12.join(dir, entry.name);
132756
+ const fullPath = path14.join(dir, entry.name);
132538
132757
  if (entry.isDirectory()) {
132539
132758
  if (entry.name === "node_modules" || entry.name === ".git" || entry.name === "dist" || entry.name === "out") {
132540
132759
  continue;
@@ -132571,8 +132790,8 @@ async function promptLine(question) {
132571
132790
  }
132572
132791
  const rl = readline.createInterface({ input: import_process.stdin, output: import_process.stdout });
132573
132792
  try {
132574
- const answer = await new Promise((resolve13) => {
132575
- rl.question(question, resolve13);
132793
+ const answer = await new Promise((resolve14) => {
132794
+ rl.question(question, resolve14);
132576
132795
  });
132577
132796
  const trimmed = answer.trim();
132578
132797
  return trimmed === "" ? void 0 : trimmed;
@@ -132593,8 +132812,8 @@ function formatSecretError(err, envFilePath) {
132593
132812
  if (!envFilePath) {
132594
132813
  return `${err.message}`;
132595
132814
  }
132596
- const relative5 = path13.relative(path13.dirname(envFilePath), err.filePath);
132597
- const fileLabel = relative5 && relative5 !== "" ? relative5 : path13.basename(err.filePath);
132815
+ const relative5 = path15.relative(path15.dirname(envFilePath), err.filePath);
132816
+ const fileLabel = relative5 && relative5 !== "" ? relative5 : path15.basename(err.filePath);
132598
132817
  const lineLabel = err.line >= 0 ? `${fileLabel}:${err.line + 1}` : fileLabel;
132599
132818
  return `${lineLabel} - ${err.message}`;
132600
132819
  }
@@ -132690,7 +132909,7 @@ async function handleEncrypt(args) {
132690
132909
  console.error(`Error: encrypt requires --file and --var.`);
132691
132910
  return 1;
132692
132911
  }
132693
- const absoluteFilePath = path13.resolve(filePath);
132912
+ const absoluteFilePath = path15.resolve(filePath);
132694
132913
  const { content, secret } = loadSecretLine(absoluteFilePath, variableName, envName);
132695
132914
  if (secret.encrypted) {
132696
132915
  console.error(`Error: Secret '${variableName}' is already encrypted. Use rotate instead.`);
@@ -132722,7 +132941,7 @@ async function handleRotate(args) {
132722
132941
  console.error(`Error: rotate requires --file and --var.`);
132723
132942
  return 1;
132724
132943
  }
132725
- const absoluteFilePath = path13.resolve(filePath);
132944
+ const absoluteFilePath = path15.resolve(filePath);
132726
132945
  const { content, secret } = loadSecretLine(absoluteFilePath, variableName, envName);
132727
132946
  let kid = explicitKid;
132728
132947
  if (!kid && secret.encrypted) {
@@ -132753,7 +132972,7 @@ async function handleRotate(args) {
132753
132972
  }
132754
132973
  async function handleRekey(args) {
132755
132974
  const positional = args.filter((arg) => !arg.startsWith("-"));
132756
- const targetPath = positional[0] ? path13.resolve(positional[0]) : process.cwd();
132975
+ const targetPath = positional[0] ? path15.resolve(positional[0]) : process.cwd();
132757
132976
  const targetKid = getFlagValue(args, "--kid");
132758
132977
  const files = discoverNornenvFiles(targetPath);
132759
132978
  if (files.length === 0) {
@@ -132763,7 +132982,7 @@ async function handleRekey(args) {
132763
132982
  let updatedFiles = 0;
132764
132983
  let updatedSecrets = 0;
132765
132984
  for (const filePath of files) {
132766
- const original = fs17.readFileSync(filePath, "utf8");
132985
+ const original = fs19.readFileSync(filePath, "utf8");
132767
132986
  const secretLines = extractSecretLines(original, filePath);
132768
132987
  if (secretLines.length === 0) {
132769
132988
  continue;
@@ -132814,7 +133033,7 @@ async function handleRekey(args) {
132814
133033
  updatedSecrets += 1;
132815
133034
  }
132816
133035
  if (updated !== original) {
132817
- fs17.writeFileSync(filePath, updated, "utf8");
133036
+ fs19.writeFileSync(filePath, updated, "utf8");
132818
133037
  updatedFiles += 1;
132819
133038
  }
132820
133039
  }
@@ -132823,7 +133042,7 @@ async function handleRekey(args) {
132823
133042
  }
132824
133043
  async function handleAudit(args) {
132825
133044
  const positional = args.filter((arg) => !arg.startsWith("-"));
132826
- const targetPath = positional[0] ? path13.resolve(positional[0]) : process.cwd();
133045
+ const targetPath = positional[0] ? path15.resolve(positional[0]) : process.cwd();
132827
133046
  const files = discoverNornenvFiles(targetPath);
132828
133047
  if (files.length === 0) {
132829
133048
  console.log(`No .nornenv files found under ${targetPath}`);
@@ -132831,7 +133050,7 @@ async function handleAudit(args) {
132831
133050
  }
132832
133051
  const issues = [];
132833
133052
  for (const filePath of files) {
132834
- const content = fs17.readFileSync(filePath, "utf8");
133053
+ const content = fs19.readFileSync(filePath, "utf8");
132835
133054
  const secrets = extractSecretLines(content, filePath);
132836
133055
  for (const secret of secrets) {
132837
133056
  if (!secret.encrypted) {
@@ -132918,9 +133137,9 @@ function printSecretResolutionErrors(errors, envFilePath) {
132918
133137
 
132919
133138
  // src/cli.ts
132920
133139
  function formatNornenvErrorLocation(rootEnvFilePath, errorFilePath, line2) {
132921
- const baseDir = path14.dirname(rootEnvFilePath);
132922
- const relativePath = path14.relative(baseDir, errorFilePath);
132923
- const fileLabel = relativePath && relativePath !== "" ? relativePath : path14.basename(errorFilePath);
133140
+ const baseDir = path16.dirname(rootEnvFilePath);
133141
+ const relativePath = path16.relative(baseDir, errorFilePath);
133142
+ const fileLabel = relativePath && relativePath !== "" ? relativePath : path16.basename(errorFilePath);
132924
133143
  return line2 >= 0 ? `${fileLabel}:${line2 + 1}` : fileLabel;
132925
133144
  }
132926
133145
  function resolveEnvironmentForPath(targetPath, selectedEnv) {
@@ -133002,10 +133221,10 @@ function generateTimestamp() {
133002
133221
  return `${year}-${month}-${day}-${hours}${minutes}${seconds}`;
133003
133222
  }
133004
133223
  function generateReportPaths(outputDir, inputFile, timestamp) {
133005
- const baseName = path14.basename(inputFile, path14.extname(inputFile));
133224
+ const baseName = path16.basename(inputFile, path16.extname(inputFile));
133006
133225
  return {
133007
- junitPath: path14.join(outputDir, `${baseName}-${timestamp}-results.xml`),
133008
- htmlPath: path14.join(outputDir, `${baseName}-${timestamp}-report.html`)
133226
+ junitPath: path16.join(outputDir, `${baseName}-${timestamp}-results.xml`),
133227
+ htmlPath: path16.join(outputDir, `${baseName}-${timestamp}-report.html`)
133009
133228
  };
133010
133229
  }
133011
133230
  function parseArgs(args) {
@@ -133270,9 +133489,9 @@ async function runSingleRequest(fileContent, variables, cookieJar, apiDefinition
133270
133489
  function discoverNornFiles(dirPath) {
133271
133490
  const files = [];
133272
133491
  function walkDir(currentPath) {
133273
- const entries = fs18.readdirSync(currentPath, { withFileTypes: true });
133492
+ const entries = fs20.readdirSync(currentPath, { withFileTypes: true });
133274
133493
  for (const entry of entries) {
133275
- const fullPath = path14.join(currentPath, entry.name);
133494
+ const fullPath = path16.join(currentPath, entry.name);
133276
133495
  if (entry.isDirectory()) {
133277
133496
  if (!entry.name.startsWith(".") && entry.name !== "node_modules") {
133278
133497
  walkDir(fullPath);
@@ -133292,7 +133511,7 @@ function countTestSequences(fileContent, tagFilterOptions) {
133292
133511
  return { total: testSequences.length, filtered };
133293
133512
  }
133294
133513
  async function loadTheoryFile(theoryPath, workingDir) {
133295
- const absolutePath = path14.resolve(workingDir, theoryPath);
133514
+ const absolutePath = path16.resolve(workingDir, theoryPath);
133296
133515
  const content = await fsPromises.readFile(absolutePath, "utf-8");
133297
133516
  return JSON.parse(content);
133298
133517
  }
@@ -133413,12 +133632,12 @@ async function main() {
133413
133632
  if (options.insecure) {
133414
133633
  console.error(colors.warning("Warning: TLS certificate verification is disabled (--insecure). Use this only for local development."));
133415
133634
  }
133416
- const inputPath = path14.resolve(options.file);
133417
- if (!fs18.existsSync(inputPath)) {
133635
+ const inputPath = path16.resolve(options.file);
133636
+ if (!fs20.existsSync(inputPath)) {
133418
133637
  console.error(`Error: Path not found: ${inputPath}`);
133419
133638
  process.exit(1);
133420
133639
  }
133421
- const isDirectory = fs18.statSync(inputPath).isDirectory();
133640
+ const isDirectory = fs20.statSync(inputPath).isDirectory();
133422
133641
  let filesToRun;
133423
133642
  if (isDirectory) {
133424
133643
  filesToRun = discoverNornFiles(inputPath);
@@ -133485,11 +133704,11 @@ async function main() {
133485
133704
  }
133486
133705
  mergeSecrets(combinedSecretNames, combinedSecretValues, resolvedEnv.secretNames, resolvedEnv.secretValues);
133487
133706
  const redaction2 = createRedactionOptions(combinedSecretNames, combinedSecretValues, !options.noRedact);
133488
- const fileContent = fs18.readFileSync(filePath, "utf-8");
133707
+ const fileContent = fs20.readFileSync(filePath, "utf-8");
133489
133708
  const fileVariables = extractFileLevelVariables(fileContent);
133490
133709
  const variables = attachEnvironmentScope({ ...resolvedEnv.variables, ...fileVariables }, resolvedEnv.variables);
133491
133710
  const cookieJar = createCookieJar();
133492
- const workingDir = path14.dirname(filePath);
133711
+ const workingDir = path16.dirname(filePath);
133493
133712
  const importResult = await resolveImports(
133494
133713
  fileContent,
133495
133714
  workingDir,
@@ -133657,7 +133876,7 @@ ${fileContent}` : fileContent;
133657
133876
  let totalTestCount = 0;
133658
133877
  let filteredTestCount = 0;
133659
133878
  for (const filePath of filesToRun) {
133660
- const fileContent = fs18.readFileSync(filePath, "utf-8");
133879
+ const fileContent = fs20.readFileSync(filePath, "utf-8");
133661
133880
  const counts = countTestSequences(fileContent, tagFilterOptions);
133662
133881
  totalTestCount += counts.total;
133663
133882
  filteredTestCount += counts.filtered;
@@ -133699,16 +133918,16 @@ ${fileContent}` : fileContent;
133699
133918
  process.exit(1);
133700
133919
  }
133701
133920
  if (!resolvedEnv.envFilePath && options.env) {
133702
- const relPath = isDirectory ? path14.relative(inputPath, filePath) : path14.basename(filePath);
133921
+ const relPath = isDirectory ? path16.relative(inputPath, filePath) : path16.basename(filePath);
133703
133922
  console.error(colors.warning(`Warning: --env specified but no .nornenv file found for ${relPath}`));
133704
133923
  }
133705
133924
  mergeSecrets(combinedSecretNames, combinedSecretValues, resolvedEnv.secretNames, resolvedEnv.secretValues);
133706
133925
  const redaction2 = createRedactionOptions(combinedSecretNames, combinedSecretValues, !options.noRedact);
133707
- const fileContent = fs18.readFileSync(filePath, "utf-8");
133926
+ const fileContent = fs20.readFileSync(filePath, "utf-8");
133708
133927
  const fileVariables = extractFileLevelVariables(fileContent);
133709
133928
  const variables = attachEnvironmentScope({ ...resolvedEnv.variables, ...fileVariables }, resolvedEnv.variables);
133710
133929
  const cookieJar = createCookieJar();
133711
- const workingDir = path14.dirname(filePath);
133930
+ const workingDir = path16.dirname(filePath);
133712
133931
  const importResult = await resolveImports(
133713
133932
  fileContent,
133714
133933
  workingDir,
@@ -133741,7 +133960,7 @@ ${fileContent}` : fileContent;
133741
133960
  continue;
133742
133961
  }
133743
133962
  if (isDirectory && options.output !== "json") {
133744
- const relPath = path14.relative(inputPath, filePath);
133963
+ const relPath = path16.relative(inputPath, filePath);
133745
133964
  console.log(colors.info(`
133746
133965
  \u2501\u2501\u2501 ${relPath} \u2501\u2501\u2501`));
133747
133966
  }
@@ -133786,7 +134005,7 @@ ${fileContent}` : fileContent;
133786
134005
  let htmlOutputPath = options.htmlOutput;
133787
134006
  if (options.outputDir) {
133788
134007
  const timestamp = generateTimestamp();
133789
- const baseName = isDirectory ? path14.basename(inputPath) : path14.basename(inputPath, path14.extname(inputPath));
134008
+ const baseName = isDirectory ? path16.basename(inputPath) : path16.basename(inputPath, path16.extname(inputPath));
133790
134009
  const generatedPaths = generateReportPaths(options.outputDir, baseName + ".norn", timestamp);
133791
134010
  if (!junitOutputPath) {
133792
134011
  junitOutputPath = generatedPaths.junitPath;
@@ -133794,12 +134013,12 @@ ${fileContent}` : fileContent;
133794
134013
  if (!htmlOutputPath) {
133795
134014
  htmlOutputPath = generatedPaths.htmlPath;
133796
134015
  }
133797
- if (!fs18.existsSync(options.outputDir)) {
133798
- fs18.mkdirSync(options.outputDir, { recursive: true });
134016
+ if (!fs20.existsSync(options.outputDir)) {
134017
+ fs20.mkdirSync(options.outputDir, { recursive: true });
133799
134018
  }
133800
134019
  }
133801
134020
  if (junitOutputPath) {
133802
- const suiteName = isDirectory ? path14.basename(inputPath) : path14.basename(inputPath, path14.extname(inputPath));
134021
+ const suiteName = isDirectory ? path16.basename(inputPath) : path16.basename(inputPath, path16.extname(inputPath));
133803
134022
  if (result.type === "request") {
133804
134023
  generateJUnitReportFromResponse(
133805
134024
  result.results[0],
@@ -133815,11 +134034,11 @@ ${fileContent}` : fileContent;
133815
134034
  console.log(colors.info(`JUnit report written to: ${junitOutputPath}`));
133816
134035
  }
133817
134036
  if (htmlOutputPath) {
133818
- const title = `Norn Test Report - ${path14.basename(inputPath)}`;
134037
+ const title = `Norn Test Report - ${path16.basename(inputPath)}`;
133819
134038
  if (result.type === "request") {
133820
134039
  generateHtmlReportFromResponse(
133821
134040
  result.results[0],
133822
- options.request || path14.basename(inputPath),
134041
+ options.request || path16.basename(inputPath),
133823
134042
  { outputPath: htmlOutputPath, redaction, title }
133824
134043
  );
133825
134044
  } else {