norn-cli 1.13.1 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.js CHANGED
@@ -8881,11 +8881,11 @@ var require_mime_types = __commonJS({
8881
8881
  }
8882
8882
  return exts[0];
8883
8883
  }
8884
- function lookup(path18) {
8885
- if (!path18 || typeof path18 !== "string") {
8884
+ function lookup(path19) {
8885
+ if (!path19 || typeof path19 !== "string") {
8886
8886
  return false;
8887
8887
  }
8888
- var extension2 = extname3("x." + path18).toLowerCase().substr(1);
8888
+ var extension2 = extname3("x." + path19).toLowerCase().substr(1);
8889
8889
  if (!extension2) {
8890
8890
  return false;
8891
8891
  }
@@ -9990,11 +9990,11 @@ var require_form_data = __commonJS({
9990
9990
  "use strict";
9991
9991
  var CombinedStream = require_combined_stream();
9992
9992
  var util4 = require("util");
9993
- var path18 = require("path");
9993
+ var path19 = require("path");
9994
9994
  var http3 = require("http");
9995
9995
  var https3 = require("https");
9996
9996
  var parseUrl = require("url").parse;
9997
- var fs21 = require("fs");
9997
+ var fs20 = require("fs");
9998
9998
  var Stream = require("stream").Stream;
9999
9999
  var crypto8 = require("crypto");
10000
10000
  var mime = require_mime_types();
@@ -10061,7 +10061,7 @@ var require_form_data = __commonJS({
10061
10061
  if (value.end != void 0 && value.end != Infinity && value.start != void 0) {
10062
10062
  callback(null, value.end + 1 - (value.start ? value.start : 0));
10063
10063
  } else {
10064
- fs21.stat(value.path, function(err, stat) {
10064
+ fs20.stat(value.path, function(err, stat) {
10065
10065
  if (err) {
10066
10066
  callback(err);
10067
10067
  return;
@@ -10118,11 +10118,11 @@ var require_form_data = __commonJS({
10118
10118
  FormData3.prototype._getContentDisposition = function(value, options) {
10119
10119
  var filename;
10120
10120
  if (typeof options.filepath === "string") {
10121
- filename = path18.normalize(options.filepath).replace(/\\/g, "/");
10121
+ filename = path19.normalize(options.filepath).replace(/\\/g, "/");
10122
10122
  } else if (options.filename || value && (value.name || value.path)) {
10123
- filename = path18.basename(options.filename || value && (value.name || value.path));
10123
+ filename = path19.basename(options.filename || value && (value.name || value.path));
10124
10124
  } else if (value && value.readable && hasOwn(value, "httpVersion")) {
10125
- filename = path18.basename(value.client._httpMessage.path || "");
10125
+ filename = path19.basename(value.client._httpMessage.path || "");
10126
10126
  }
10127
10127
  if (filename) {
10128
10128
  return 'filename="' + filename + '"';
@@ -15089,7 +15089,7 @@ var require_compile = __commonJS({
15089
15089
  const schOrFunc = root.refs[ref];
15090
15090
  if (schOrFunc)
15091
15091
  return schOrFunc;
15092
- let _sch = resolve15.call(this, root, ref);
15092
+ let _sch = resolve16.call(this, root, ref);
15093
15093
  if (_sch === void 0) {
15094
15094
  const schema = (_a2 = root.localRefs) === null || _a2 === void 0 ? void 0 : _a2[ref];
15095
15095
  const { schemaId } = this.opts;
@@ -15116,7 +15116,7 @@ var require_compile = __commonJS({
15116
15116
  function sameSchemaEnv(s1, s2) {
15117
15117
  return s1.schema === s2.schema && s1.root === s2.root && s1.baseId === s2.baseId;
15118
15118
  }
15119
- function resolve15(root, ref) {
15119
+ function resolve16(root, ref) {
15120
15120
  let sch;
15121
15121
  while (typeof (sch = this.refs[ref]) == "string")
15122
15122
  ref = sch;
@@ -15331,8 +15331,8 @@ var require_utils = __commonJS({
15331
15331
  }
15332
15332
  return ind;
15333
15333
  }
15334
- function removeDotSegments(path18) {
15335
- let input2 = path18;
15334
+ function removeDotSegments(path19) {
15335
+ let input2 = path19;
15336
15336
  const output2 = [];
15337
15337
  let nextSlash = -1;
15338
15338
  let len = 0;
@@ -15531,8 +15531,8 @@ var require_schemes = __commonJS({
15531
15531
  wsComponent.secure = void 0;
15532
15532
  }
15533
15533
  if (wsComponent.resourceName) {
15534
- const [path18, query] = wsComponent.resourceName.split("?");
15535
- wsComponent.path = path18 && path18 !== "/" ? path18 : void 0;
15534
+ const [path19, query] = wsComponent.resourceName.split("?");
15535
+ wsComponent.path = path19 && path19 !== "/" ? path19 : void 0;
15536
15536
  wsComponent.query = query;
15537
15537
  wsComponent.resourceName = void 0;
15538
15538
  }
@@ -15691,7 +15691,7 @@ var require_fast_uri = __commonJS({
15691
15691
  }
15692
15692
  return uri;
15693
15693
  }
15694
- function resolve15(baseURI, relativeURI, options) {
15694
+ function resolve16(baseURI, relativeURI, options) {
15695
15695
  const schemelessOptions = options ? Object.assign({ scheme: "null" }, options) : { scheme: "null" };
15696
15696
  const resolved = resolveComponent(parse5(baseURI, schemelessOptions), parse5(relativeURI, schemelessOptions), schemelessOptions, true);
15697
15697
  schemelessOptions.skipEscape = true;
@@ -15918,7 +15918,7 @@ var require_fast_uri = __commonJS({
15918
15918
  var fastUri = {
15919
15919
  SCHEMES,
15920
15920
  normalize,
15921
- resolve: resolve15,
15921
+ resolve: resolve16,
15922
15922
  resolveComponent,
15923
15923
  equal,
15924
15924
  serialize,
@@ -20212,15 +20212,15 @@ var require_pg_connection_string = __commonJS({
20212
20212
  if (config2.sslcert || config2.sslkey || config2.sslrootcert || config2.sslmode) {
20213
20213
  config2.ssl = {};
20214
20214
  }
20215
- const fs21 = config2.sslcert || config2.sslkey || config2.sslrootcert ? require("fs") : null;
20215
+ const fs20 = config2.sslcert || config2.sslkey || config2.sslrootcert ? require("fs") : null;
20216
20216
  if (config2.sslcert) {
20217
- config2.ssl.cert = fs21.readFileSync(config2.sslcert).toString();
20217
+ config2.ssl.cert = fs20.readFileSync(config2.sslcert).toString();
20218
20218
  }
20219
20219
  if (config2.sslkey) {
20220
- config2.ssl.key = fs21.readFileSync(config2.sslkey).toString();
20220
+ config2.ssl.key = fs20.readFileSync(config2.sslkey).toString();
20221
20221
  }
20222
20222
  if (config2.sslrootcert) {
20223
- config2.ssl.ca = fs21.readFileSync(config2.sslrootcert).toString();
20223
+ config2.ssl.ca = fs20.readFileSync(config2.sslrootcert).toString();
20224
20224
  }
20225
20225
  if (options.useLibpqCompat && config2.uselibpqcompat) {
20226
20226
  throw new Error("Both useLibpqCompat and uselibpqcompat are set. Please use only one of them.");
@@ -21616,7 +21616,7 @@ var require_dist = __commonJS({
21616
21616
  function parse5(stream4, callback) {
21617
21617
  const parser = new parser_1.Parser();
21618
21618
  stream4.on("data", (buffer) => parser.parse(buffer, callback));
21619
- return new Promise((resolve15) => stream4.on("end", () => resolve15()));
21619
+ return new Promise((resolve16) => stream4.on("end", () => resolve16()));
21620
21620
  }
21621
21621
  exports2.parse = parse5;
21622
21622
  }
@@ -21985,7 +21985,7 @@ var require_split2 = __commonJS({
21985
21985
  var require_helper = __commonJS({
21986
21986
  "node_modules/pgpass/lib/helper.js"(exports2, module2) {
21987
21987
  "use strict";
21988
- var path18 = require("path");
21988
+ var path19 = require("path");
21989
21989
  var Stream = require("stream").Stream;
21990
21990
  var split = require_split2();
21991
21991
  var util4 = require("util");
@@ -22024,7 +22024,7 @@ var require_helper = __commonJS({
22024
22024
  };
22025
22025
  module2.exports.getFileName = function(rawEnv) {
22026
22026
  var env3 = rawEnv || process.env;
22027
- var file2 = env3.PGPASSFILE || (isWin ? path18.join(env3.APPDATA || "./", "postgresql", "pgpass.conf") : path18.join(env3.HOME || "./", ".pgpass"));
22027
+ var file2 = env3.PGPASSFILE || (isWin ? path19.join(env3.APPDATA || "./", "postgresql", "pgpass.conf") : path19.join(env3.HOME || "./", ".pgpass"));
22028
22028
  return file2;
22029
22029
  };
22030
22030
  module2.exports.usePgPass = function(stats, fname) {
@@ -22156,16 +22156,16 @@ var require_helper = __commonJS({
22156
22156
  var require_lib = __commonJS({
22157
22157
  "node_modules/pgpass/lib/index.js"(exports2, module2) {
22158
22158
  "use strict";
22159
- var path18 = require("path");
22160
- var fs21 = require("fs");
22159
+ var path19 = require("path");
22160
+ var fs20 = require("fs");
22161
22161
  var helper = require_helper();
22162
22162
  module2.exports = function(connInfo, cb) {
22163
22163
  var file2 = helper.getFileName();
22164
- fs21.stat(file2, function(err, stat) {
22164
+ fs20.stat(file2, function(err, stat) {
22165
22165
  if (err || !helper.usePgPass(stat, file2)) {
22166
22166
  return cb(void 0);
22167
22167
  }
22168
- var st = fs21.createReadStream(file2);
22168
+ var st = fs20.createReadStream(file2);
22169
22169
  helper.getPassword(connInfo, st, cb);
22170
22170
  });
22171
22171
  };
@@ -22347,12 +22347,12 @@ var require_client = __commonJS({
22347
22347
  this._connect(callback);
22348
22348
  return;
22349
22349
  }
22350
- return new this._Promise((resolve15, reject) => {
22350
+ return new this._Promise((resolve16, reject) => {
22351
22351
  this._connect((error2) => {
22352
22352
  if (error2) {
22353
22353
  reject(error2);
22354
22354
  } else {
22355
- resolve15(this);
22355
+ resolve16(this);
22356
22356
  }
22357
22357
  });
22358
22358
  });
@@ -22698,8 +22698,8 @@ var require_client = __commonJS({
22698
22698
  readTimeout = config2.query_timeout || this.connectionParameters.query_timeout;
22699
22699
  query = new Query2(config2, values, callback);
22700
22700
  if (!query.callback) {
22701
- result = new this._Promise((resolve15, reject) => {
22702
- query.callback = (err, res) => err ? reject(err) : resolve15(res);
22701
+ result = new this._Promise((resolve16, reject) => {
22702
+ query.callback = (err, res) => err ? reject(err) : resolve16(res);
22703
22703
  }).catch((err) => {
22704
22704
  Error.captureStackTrace(err);
22705
22705
  throw err;
@@ -22776,8 +22776,8 @@ var require_client = __commonJS({
22776
22776
  if (cb) {
22777
22777
  this.connection.once("end", cb);
22778
22778
  } else {
22779
- return new this._Promise((resolve15) => {
22780
- this.connection.once("end", resolve15);
22779
+ return new this._Promise((resolve16) => {
22780
+ this.connection.once("end", resolve16);
22781
22781
  });
22782
22782
  }
22783
22783
  }
@@ -22826,8 +22826,8 @@ var require_pg_pool = __commonJS({
22826
22826
  const cb = function(err, client) {
22827
22827
  err ? rej(err) : res(client);
22828
22828
  };
22829
- const result = new Promise2(function(resolve15, reject) {
22830
- res = resolve15;
22829
+ const result = new Promise2(function(resolve16, reject) {
22830
+ res = resolve16;
22831
22831
  rej = reject;
22832
22832
  }).catch((err) => {
22833
22833
  Error.captureStackTrace(err);
@@ -22888,7 +22888,7 @@ var require_pg_pool = __commonJS({
22888
22888
  if (typeof Promise2.try === "function") {
22889
22889
  return Promise2.try(f);
22890
22890
  }
22891
- return new Promise2((resolve15) => resolve15(f()));
22891
+ return new Promise2((resolve16) => resolve16(f()));
22892
22892
  }
22893
22893
  _isFull() {
22894
22894
  return this._clients.length >= this.options.max;
@@ -23281,8 +23281,8 @@ var require_query2 = __commonJS({
23281
23281
  NativeQuery.prototype._getPromise = function() {
23282
23282
  if (this._promise) return this._promise;
23283
23283
  this._promise = new Promise(
23284
- function(resolve15, reject) {
23285
- this._once("end", resolve15);
23284
+ function(resolve16, reject) {
23285
+ this._once("end", resolve16);
23286
23286
  this._once("error", reject);
23287
23287
  }.bind(this)
23288
23288
  );
@@ -23459,12 +23459,12 @@ var require_client2 = __commonJS({
23459
23459
  this._connect(callback);
23460
23460
  return;
23461
23461
  }
23462
- return new this._Promise((resolve15, reject) => {
23462
+ return new this._Promise((resolve16, reject) => {
23463
23463
  this._connect((error2) => {
23464
23464
  if (error2) {
23465
23465
  reject(error2);
23466
23466
  } else {
23467
- resolve15(this);
23467
+ resolve16(this);
23468
23468
  }
23469
23469
  });
23470
23470
  });
@@ -23488,8 +23488,8 @@ var require_client2 = __commonJS({
23488
23488
  query = new NativeQuery(config2, values, callback);
23489
23489
  if (!query.callback) {
23490
23490
  let resolveOut, rejectOut;
23491
- result = new this._Promise((resolve15, reject) => {
23492
- resolveOut = resolve15;
23491
+ result = new this._Promise((resolve16, reject) => {
23492
+ resolveOut = resolve16;
23493
23493
  rejectOut = reject;
23494
23494
  }).catch((err) => {
23495
23495
  Error.captureStackTrace(err);
@@ -23549,8 +23549,8 @@ var require_client2 = __commonJS({
23549
23549
  }
23550
23550
  let result;
23551
23551
  if (!cb) {
23552
- result = new this._Promise(function(resolve15, reject) {
23553
- cb = (err) => err ? reject(err) : resolve15();
23552
+ result = new this._Promise(function(resolve16, reject) {
23553
+ cb = (err) => err ? reject(err) : resolve16();
23554
23554
  });
23555
23555
  }
23556
23556
  this.native.end(function() {
@@ -24248,15 +24248,15 @@ var require_utils4 = __commonJS({
24248
24248
  Object.defineProperty(exports2, "__esModule", { value: true });
24249
24249
  var PromiseInspection_1 = require_PromiseInspection();
24250
24250
  function defer() {
24251
- let resolve15 = null;
24251
+ let resolve16 = null;
24252
24252
  let reject = null;
24253
24253
  const promise2 = new Promise((resolver, rejecter) => {
24254
- resolve15 = resolver;
24254
+ resolve16 = resolver;
24255
24255
  reject = rejecter;
24256
24256
  });
24257
24257
  return {
24258
24258
  promise: promise2,
24259
- resolve: resolve15,
24259
+ resolve: resolve16,
24260
24260
  reject
24261
24261
  };
24262
24262
  }
@@ -24281,7 +24281,7 @@ var require_utils4 = __commonJS({
24281
24281
  }
24282
24282
  exports2.checkRequiredTime = checkRequiredTime;
24283
24283
  function delay(millis) {
24284
- return new Promise((resolve15) => setTimeout(resolve15, millis));
24284
+ return new Promise((resolve16) => setTimeout(resolve16, millis));
24285
24285
  }
24286
24286
  exports2.delay = delay;
24287
24287
  function reflect(promise2) {
@@ -24341,11 +24341,11 @@ var require_PendingOperation = __commonJS({
24341
24341
  };
24342
24342
  exports2.PendingOperation = PendingOperation;
24343
24343
  function timeout(promise2, time3) {
24344
- return new Promise((resolve15, reject) => {
24344
+ return new Promise((resolve16, reject) => {
24345
24345
  const timeoutHandle = setTimeout(() => reject(new TimeoutError_1.TimeoutError()), time3);
24346
24346
  promise2.then((result) => {
24347
24347
  clearTimeout(timeoutHandle);
24348
- resolve15(result);
24348
+ resolve16(result);
24349
24349
  }).catch((err) => {
24350
24350
  clearTimeout(timeoutHandle);
24351
24351
  reject(err);
@@ -24553,15 +24553,15 @@ var require_Pool = __commonJS({
24553
24553
  this._stopReaping();
24554
24554
  this.destroyed = true;
24555
24555
  return utils_1.reflect(Promise.all(this.pendingCreates.map((create) => utils_1.reflect(create.promise))).then(() => {
24556
- return new Promise((resolve15, reject) => {
24556
+ return new Promise((resolve16, reject) => {
24557
24557
  if (this.numPendingValidations() === 0) {
24558
- resolve15();
24558
+ resolve16();
24559
24559
  return;
24560
24560
  }
24561
24561
  const interval = setInterval(() => {
24562
24562
  if (this.numPendingValidations() === 0) {
24563
24563
  timers_1.clearInterval(interval);
24564
- resolve15();
24564
+ resolve16();
24565
24565
  }
24566
24566
  }, 100);
24567
24567
  });
@@ -24785,17 +24785,17 @@ var require_Pool = __commonJS({
24785
24785
  }
24786
24786
  }
24787
24787
  function callbackOrPromise(func) {
24788
- return new Promise((resolve15, reject) => {
24788
+ return new Promise((resolve16, reject) => {
24789
24789
  const callback = (err, resource) => {
24790
24790
  if (err) {
24791
24791
  reject(err);
24792
24792
  } else {
24793
- resolve15(resource);
24793
+ resolve16(resource);
24794
24794
  }
24795
24795
  };
24796
24796
  utils_1.tryPromise(() => func(callback)).then((res) => {
24797
24797
  if (res) {
24798
- resolve15(res);
24798
+ resolve16(res);
24799
24799
  }
24800
24800
  }).catch((err) => {
24801
24801
  reject(err);
@@ -25229,7 +25229,7 @@ var require_table = __commonJS({
25229
25229
  let cursor = -1;
25230
25230
  let buffer = "";
25231
25231
  let escaped = false;
25232
- const path18 = [];
25232
+ const path19 = [];
25233
25233
  while (++cursor < length) {
25234
25234
  const char = name.charAt(cursor);
25235
25235
  if (char === "[") {
@@ -25248,7 +25248,7 @@ var require_table = __commonJS({
25248
25248
  if (escaped) {
25249
25249
  buffer += char;
25250
25250
  } else {
25251
- path18.push(buffer);
25251
+ path19.push(buffer);
25252
25252
  buffer = "";
25253
25253
  }
25254
25254
  } else {
@@ -25256,26 +25256,26 @@ var require_table = __commonJS({
25256
25256
  }
25257
25257
  }
25258
25258
  if (buffer) {
25259
- path18.push(buffer);
25259
+ path19.push(buffer);
25260
25260
  }
25261
- switch (path18.length) {
25261
+ switch (path19.length) {
25262
25262
  case 1:
25263
25263
  return {
25264
- name: path18[0],
25264
+ name: path19[0],
25265
25265
  schema: null,
25266
25266
  database: null
25267
25267
  };
25268
25268
  case 2:
25269
25269
  return {
25270
- name: path18[1],
25271
- schema: path18[0],
25270
+ name: path19[1],
25271
+ schema: path19[0],
25272
25272
  database: null
25273
25273
  };
25274
25274
  case 3:
25275
25275
  return {
25276
- name: path18[2],
25277
- schema: path18[1],
25278
- database: path18[0]
25276
+ name: path19[2],
25277
+ schema: path19[1],
25278
+ database: path19[0]
25279
25279
  };
25280
25280
  default:
25281
25281
  throw new Error("Invalid table name.");
@@ -25861,10 +25861,10 @@ var require_connection_pool = __commonJS({
25861
25861
  this._connect(callback);
25862
25862
  return this;
25863
25863
  }
25864
- return new shared.Promise((resolve15, reject) => {
25864
+ return new shared.Promise((resolve16, reject) => {
25865
25865
  return this._connect((err) => {
25866
25866
  if (err) return reject(err);
25867
- resolve15(this);
25867
+ resolve16(this);
25868
25868
  });
25869
25869
  });
25870
25870
  }
@@ -25945,10 +25945,10 @@ var require_connection_pool = __commonJS({
25945
25945
  this._close(callback);
25946
25946
  return this;
25947
25947
  }
25948
- return new shared.Promise((resolve15, reject) => {
25948
+ return new shared.Promise((resolve16, reject) => {
25949
25949
  this._close((err) => {
25950
25950
  if (err) return reject(err);
25951
- resolve15(this);
25951
+ resolve16(this);
25952
25952
  });
25953
25953
  });
25954
25954
  }
@@ -26109,8 +26109,8 @@ var require_global_connection = __commonJS({
26109
26109
  setImmediate(callback);
26110
26110
  return null;
26111
26111
  }
26112
- return new shared.Promise((resolve15) => {
26113
- resolve15(globalConnection);
26112
+ return new shared.Promise((resolve16) => {
26113
+ resolve16(globalConnection);
26114
26114
  });
26115
26115
  }
26116
26116
  function on(event, handler) {
@@ -26321,10 +26321,10 @@ var require_prepared_statement = __commonJS({
26321
26321
  this._prepare(statement, callback);
26322
26322
  return this;
26323
26323
  }
26324
- return new shared.Promise((resolve15, reject) => {
26324
+ return new shared.Promise((resolve16, reject) => {
26325
26325
  this._prepare(statement, (err) => {
26326
26326
  if (err) return reject(err);
26327
- resolve15(this);
26327
+ resolve16(this);
26328
26328
  });
26329
26329
  });
26330
26330
  }
@@ -26387,10 +26387,10 @@ var require_prepared_statement = __commonJS({
26387
26387
  if (this.stream || typeof callback === "function") {
26388
26388
  return this._execute(values, callback);
26389
26389
  }
26390
- return new shared.Promise((resolve15, reject) => {
26390
+ return new shared.Promise((resolve16, reject) => {
26391
26391
  this._execute(values, (err, recordset) => {
26392
26392
  if (err) return reject(err);
26393
- resolve15(recordset);
26393
+ resolve16(recordset);
26394
26394
  });
26395
26395
  });
26396
26396
  }
@@ -26436,10 +26436,10 @@ var require_prepared_statement = __commonJS({
26436
26436
  this._unprepare(callback);
26437
26437
  return this;
26438
26438
  }
26439
- return new shared.Promise((resolve15, reject) => {
26439
+ return new shared.Promise((resolve16, reject) => {
26440
26440
  this._unprepare((err) => {
26441
26441
  if (err) return reject(err);
26442
- resolve15();
26442
+ resolve16();
26443
26443
  });
26444
26444
  });
26445
26445
  }
@@ -26683,7 +26683,7 @@ var require_request = __commonJS({
26683
26683
  const strings = values.shift();
26684
26684
  batch = this._template(strings, values);
26685
26685
  }
26686
- return new shared.Promise((resolve15, reject) => {
26686
+ return new shared.Promise((resolve16, reject) => {
26687
26687
  this._batch(batch, (err, recordsets, output2, rowsAffected) => {
26688
26688
  if (this.stream) {
26689
26689
  if (err) this.emit("error", err);
@@ -26694,7 +26694,7 @@ var require_request = __commonJS({
26694
26694
  });
26695
26695
  }
26696
26696
  if (err) return reject(err);
26697
- resolve15({
26697
+ resolve16({
26698
26698
  recordsets,
26699
26699
  recordset: recordsets && recordsets[0],
26700
26700
  output: output2,
@@ -26750,10 +26750,10 @@ var require_request = __commonJS({
26750
26750
  });
26751
26751
  return this;
26752
26752
  }
26753
- return new shared.Promise((resolve15, reject) => {
26753
+ return new shared.Promise((resolve16, reject) => {
26754
26754
  this._bulk(table, options, (err, rowsAffected) => {
26755
26755
  if (err) return reject(err);
26756
- resolve15({
26756
+ resolve16({
26757
26757
  rowsAffected
26758
26758
  });
26759
26759
  });
@@ -26854,7 +26854,7 @@ var require_request = __commonJS({
26854
26854
  const strings = values.shift();
26855
26855
  command = this._template(strings, values);
26856
26856
  }
26857
- return new shared.Promise((resolve15, reject) => {
26857
+ return new shared.Promise((resolve16, reject) => {
26858
26858
  this._query(command, (err, recordsets, output2, rowsAffected, columns) => {
26859
26859
  if (this.stream) {
26860
26860
  if (err) this.emit("error", err);
@@ -26872,7 +26872,7 @@ var require_request = __commonJS({
26872
26872
  rowsAffected
26873
26873
  };
26874
26874
  if (this.arrayRowMode) result.columns = columns;
26875
- resolve15(result);
26875
+ resolve16(result);
26876
26876
  });
26877
26877
  });
26878
26878
  }
@@ -26926,7 +26926,7 @@ var require_request = __commonJS({
26926
26926
  });
26927
26927
  return this;
26928
26928
  }
26929
- return new shared.Promise((resolve15, reject) => {
26929
+ return new shared.Promise((resolve16, reject) => {
26930
26930
  this._execute(command, (err, recordsets, output2, returnValue, rowsAffected, columns) => {
26931
26931
  if (this.stream) {
26932
26932
  if (err) this.emit("error", err);
@@ -26946,7 +26946,7 @@ var require_request = __commonJS({
26946
26946
  returnValue
26947
26947
  };
26948
26948
  if (this.arrayRowMode) result.columns = columns;
26949
- resolve15(result);
26949
+ resolve16(result);
26950
26950
  });
26951
26951
  });
26952
26952
  }
@@ -27110,11 +27110,11 @@ var require_transaction = __commonJS({
27110
27110
  });
27111
27111
  return this;
27112
27112
  }
27113
- return new shared.Promise((resolve15, reject) => {
27113
+ return new shared.Promise((resolve16, reject) => {
27114
27114
  this._begin(isolationLevel, (err) => {
27115
27115
  if (err) return reject(err);
27116
27116
  this.emit("begin");
27117
- resolve15(this);
27117
+ resolve16(this);
27118
27118
  });
27119
27119
  });
27120
27120
  }
@@ -27157,11 +27157,11 @@ var require_transaction = __commonJS({
27157
27157
  });
27158
27158
  return this;
27159
27159
  }
27160
- return new shared.Promise((resolve15, reject) => {
27160
+ return new shared.Promise((resolve16, reject) => {
27161
27161
  this._commit((err) => {
27162
27162
  if (err) return reject(err);
27163
27163
  this.emit("commit");
27164
- resolve15();
27164
+ resolve16();
27165
27165
  });
27166
27166
  });
27167
27167
  }
@@ -27206,11 +27206,11 @@ var require_transaction = __commonJS({
27206
27206
  });
27207
27207
  return this;
27208
27208
  }
27209
- return new shared.Promise((resolve15, reject) => {
27209
+ return new shared.Promise((resolve16, reject) => {
27210
27210
  return this._rollback((err) => {
27211
27211
  if (err) return reject(err);
27212
27212
  this.emit("rollback", this._aborted);
27213
- resolve15();
27213
+ resolve16();
27214
27214
  });
27215
27215
  });
27216
27216
  }
@@ -28451,11 +28451,11 @@ function __metadata(metadataKey, metadataValue) {
28451
28451
  }
28452
28452
  function __awaiter(thisArg, _arguments, P, generator) {
28453
28453
  function adopt(value) {
28454
- return value instanceof P ? value : new P(function(resolve15) {
28455
- resolve15(value);
28454
+ return value instanceof P ? value : new P(function(resolve16) {
28455
+ resolve16(value);
28456
28456
  });
28457
28457
  }
28458
- return new (P || (P = Promise))(function(resolve15, reject) {
28458
+ return new (P || (P = Promise))(function(resolve16, reject) {
28459
28459
  function fulfilled(value) {
28460
28460
  try {
28461
28461
  step(generator.next(value));
@@ -28471,7 +28471,7 @@ function __awaiter(thisArg, _arguments, P, generator) {
28471
28471
  }
28472
28472
  }
28473
28473
  function step(result) {
28474
- result.done ? resolve15(result.value) : adopt(result.value).then(fulfilled, rejected);
28474
+ result.done ? resolve16(result.value) : adopt(result.value).then(fulfilled, rejected);
28475
28475
  }
28476
28476
  step((generator = generator.apply(thisArg, _arguments || [])).next());
28477
28477
  });
@@ -28662,14 +28662,14 @@ function __asyncValues(o) {
28662
28662
  }, i);
28663
28663
  function verb(n) {
28664
28664
  i[n] = o[n] && function(v) {
28665
- return new Promise(function(resolve15, reject) {
28666
- v = o[n](v), settle2(resolve15, reject, v.done, v.value);
28665
+ return new Promise(function(resolve16, reject) {
28666
+ v = o[n](v), settle2(resolve16, reject, v.done, v.value);
28667
28667
  });
28668
28668
  };
28669
28669
  }
28670
- function settle2(resolve15, reject, d, v) {
28670
+ function settle2(resolve16, reject, d, v) {
28671
28671
  Promise.resolve(v).then(function(v2) {
28672
- resolve15({ value: v2, done: d });
28672
+ resolve16({ value: v2, done: d });
28673
28673
  }, reject);
28674
28674
  }
28675
28675
  }
@@ -28761,13 +28761,13 @@ function __disposeResources(env3) {
28761
28761
  }
28762
28762
  return next();
28763
28763
  }
28764
- function __rewriteRelativeImportExtension(path18, preserveJsx) {
28765
- if (typeof path18 === "string" && /^\.\.?\//.test(path18)) {
28766
- return path18.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function(m, tsx, d, ext, cm) {
28764
+ function __rewriteRelativeImportExtension(path19, preserveJsx) {
28765
+ if (typeof path19 === "string" && /^\.\.?\//.test(path19)) {
28766
+ return path19.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function(m, tsx, d, ext, cm) {
28767
28767
  return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : d + ext + "." + cm.toLowerCase() + "js";
28768
28768
  });
28769
28769
  }
28770
- return path18;
28770
+ return path19;
28771
28771
  }
28772
28772
  var extendStatics, __assign, __createBinding, __setModuleDefault, ownKeys, _SuppressedError, tslib_es6_default;
28773
28773
  var init_tslib_es6 = __esm({
@@ -28914,8 +28914,8 @@ var require_msalPlugins = __commonJS({
28914
28914
  }
28915
28915
  };
28916
28916
  exports2.msalNodeFlowVSCodeCredentialControl = {
28917
- setVSCodeAuthRecordPath(path18) {
28918
- exports2.vsCodeAuthRecordPath = path18;
28917
+ setVSCodeAuthRecordPath(path19) {
28918
+ exports2.vsCodeAuthRecordPath = path19;
28919
28919
  },
28920
28920
  setVSCodeBroker(broker) {
28921
28921
  exports2.vsCodeBrokerInfo = {
@@ -32264,7 +32264,7 @@ var require_index_node_BtzY9XyU = __commonJS({
32264
32264
  return cachedAtSec > nowSeconds();
32265
32265
  }
32266
32266
  function delay(t, value) {
32267
- return new Promise((resolve15) => setTimeout(() => resolve15(value), t));
32267
+ return new Promise((resolve16) => setTimeout(() => resolve16(value), t));
32268
32268
  }
32269
32269
  var TimeUtils = /* @__PURE__ */ Object.freeze({
32270
32270
  __proto__: null,
@@ -41656,8 +41656,8 @@ var require_msal_node = __commonJS({
41656
41656
  var crypto8 = require("crypto");
41657
41657
  var msalCommon = require_lib4();
41658
41658
  var jwt2 = require_jsonwebtoken();
41659
- var fs21 = require("fs");
41660
- var path18 = require("path");
41659
+ var fs20 = require("fs");
41660
+ var path19 = require("path");
41661
41661
  var Serializer = class {
41662
41662
  /**
41663
41663
  * serialize the JSON blob
@@ -45450,7 +45450,7 @@ var require_msal_node = __commonJS({
45450
45450
  return cachedAtSec > nowSeconds();
45451
45451
  }
45452
45452
  function delay(t, value) {
45453
- return new Promise((resolve15) => setTimeout(() => resolve15(value), t));
45453
+ return new Promise((resolve16) => setTimeout(() => resolve16(value), t));
45454
45454
  }
45455
45455
  function createIdTokenEntity(homeAccountId, environment, idToken, clientId, tenantId) {
45456
45456
  const idTokenEntity = {
@@ -48153,7 +48153,7 @@ ${body}`;
48153
48153
  Host: ${destinationUrl.host}\r
48154
48154
  Connection: close\r
48155
48155
  ` + postRequestStringContent + "\r\n";
48156
- return new Promise((resolve15, reject) => {
48156
+ return new Promise((resolve16, reject) => {
48157
48157
  const request = http3.request(tunnelRequestOptions);
48158
48158
  if (timeout) {
48159
48159
  request.on("timeout", () => {
@@ -48202,7 +48202,7 @@ Connection: close\r
48202
48202
  if (this.shouldDestroyRequest(httpStatusCode, networkResponse)) {
48203
48203
  request.destroy();
48204
48204
  }
48205
- resolve15(networkResponse);
48205
+ resolve16(networkResponse);
48206
48206
  });
48207
48207
  socket.on("error", (chunk) => {
48208
48208
  request.destroy();
@@ -48244,7 +48244,7 @@ Connection: close\r
48244
48244
  customOptions.timeout = timeout;
48245
48245
  }
48246
48246
  }
48247
- return new Promise((resolve15, reject) => {
48247
+ return new Promise((resolve16, reject) => {
48248
48248
  let request;
48249
48249
  if (customOptions.protocol === "http:") {
48250
48250
  request = http3.request(customOptions);
@@ -48277,7 +48277,7 @@ Connection: close\r
48277
48277
  if (this.shouldDestroyRequest(statusCode, networkResponse)) {
48278
48278
  request.destroy();
48279
48279
  }
48280
- resolve15(networkResponse);
48280
+ resolve16(networkResponse);
48281
48281
  });
48282
48282
  });
48283
48283
  request.on("error", (chunk) => {
@@ -50047,7 +50047,7 @@ Headers: ${JSON.stringify(headers)}`
50047
50047
  if (this.server) {
50048
50048
  throw NodeAuthError.createLoopbackServerAlreadyExistsError();
50049
50049
  }
50050
- return new Promise((resolve15, reject) => {
50050
+ return new Promise((resolve16, reject) => {
50051
50051
  this.server = http3.createServer((req, res) => {
50052
50052
  const url3 = req.url;
50053
50053
  if (!url3) {
@@ -50070,7 +50070,7 @@ Headers: ${JSON.stringify(headers)}`
50070
50070
  if (authCodeResponse.error) {
50071
50071
  res.end(errorTemplate || `Error occurred: ${authCodeResponse.error}`);
50072
50072
  }
50073
- resolve15(authCodeResponse);
50073
+ resolve16(authCodeResponse);
50074
50074
  });
50075
50075
  this.server.listen(0, "127.0.0.1");
50076
50076
  });
@@ -50483,7 +50483,7 @@ Headers: ${JSON.stringify(headers)}`
50483
50483
  * @returns
50484
50484
  */
50485
50485
  async waitForRedirectUri(loopbackClient) {
50486
- return new Promise((resolve15, reject) => {
50486
+ return new Promise((resolve16, reject) => {
50487
50487
  let ticks = 0;
50488
50488
  const id = setInterval(() => {
50489
50489
  if (LOOPBACK_SERVER_CONSTANTS.TIMEOUT_MS / LOOPBACK_SERVER_CONSTANTS.INTERVAL_MS < ticks) {
@@ -50494,7 +50494,7 @@ Headers: ${JSON.stringify(headers)}`
50494
50494
  try {
50495
50495
  const r = loopbackClient.getRedirectUri();
50496
50496
  clearInterval(id);
50497
- resolve15(r);
50497
+ resolve16(r);
50498
50498
  return;
50499
50499
  } catch (e) {
50500
50500
  if (e instanceof AuthError && e.errorCode === NodeAuthErrorMessage.noLoopbackServerExists.code) {
@@ -51248,8 +51248,8 @@ Headers: ${JSON.stringify(headers)}`
51248
51248
  if (DEFAULT_MANAGED_IDENTITY_HTTP_STATUS_CODES_TO_RETRY_ON.includes(httpStatusCode) && currentRetry < DEFAULT_MANAGED_IDENTITY_MAX_RETRIES) {
51249
51249
  const retryAfterDelay = this.linearRetryStrategy.calculateDelay(retryAfterHeader, _DefaultManagedIdentityRetryPolicy.DEFAULT_MANAGED_IDENTITY_RETRY_DELAY_MS);
51250
51250
  logger.verbose(`Retrying request in ${retryAfterDelay}ms (retry attempt: ${currentRetry + 1})`);
51251
- await new Promise((resolve15) => {
51252
- return setTimeout(resolve15, retryAfterDelay);
51251
+ await new Promise((resolve16) => {
51252
+ return setTimeout(resolve16, retryAfterDelay);
51253
51253
  });
51254
51254
  return true;
51255
51255
  }
@@ -51405,7 +51405,7 @@ Headers: ${JSON.stringify(headers)}`
51405
51405
  if (!identityEndpoint || !imdsEndpoint) {
51406
51406
  const fileDetectionPath = AZURE_ARC_FILE_DETECTION[process.platform];
51407
51407
  try {
51408
- fs21.accessSync(fileDetectionPath, fs21.constants.F_OK | fs21.constants.R_OK);
51408
+ fs20.accessSync(fileDetectionPath, fs20.constants.F_OK | fs20.constants.R_OK);
51409
51409
  identityEndpoint = DEFAULT_AZURE_ARC_IDENTITY_ENDPOINT;
51410
51410
  imdsEndpoint = HIMDS_EXECUTABLE_HELPER_STRING;
51411
51411
  } catch (err) {
@@ -51508,7 +51508,7 @@ Headers: ${JSON.stringify(headers)}`
51508
51508
  throw createManagedIdentityError(platformNotSupported);
51509
51509
  }
51510
51510
  const expectedSecretFilePath = SUPPORTED_AZURE_ARC_PLATFORMS[process.platform];
51511
- const fileName = path18.basename(secretFilePath);
51511
+ const fileName = path19.basename(secretFilePath);
51512
51512
  if (!fileName.endsWith(".key")) {
51513
51513
  throw createManagedIdentityError(invalidFileExtension);
51514
51514
  }
@@ -51517,7 +51517,7 @@ Headers: ${JSON.stringify(headers)}`
51517
51517
  }
51518
51518
  let secretFileSize;
51519
51519
  try {
51520
- secretFileSize = await fs21.statSync(secretFilePath).size;
51520
+ secretFileSize = await fs20.statSync(secretFilePath).size;
51521
51521
  } catch (e) {
51522
51522
  throw createManagedIdentityError(unableToReadSecretFile);
51523
51523
  }
@@ -51526,7 +51526,7 @@ Headers: ${JSON.stringify(headers)}`
51526
51526
  }
51527
51527
  let secret;
51528
51528
  try {
51529
- secret = fs21.readFileSync(secretFilePath, EncodingTypes.UTF8);
51529
+ secret = fs20.readFileSync(secretFilePath, EncodingTypes.UTF8);
51530
51530
  } catch (e) {
51531
51531
  throw createManagedIdentityError(unableToReadSecretFile);
51532
51532
  }
@@ -51703,8 +51703,8 @@ Headers: ${JSON.stringify(headers)}`
51703
51703
  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) {
51704
51704
  const retryAfterDelay = httpStatusCode === msalCommon.HttpStatus.GONE ? _ImdsRetryPolicy.HTTP_STATUS_GONE_RETRY_AFTER_MS : this.exponentialRetryStrategy.calculateDelay(currentRetry);
51705
51705
  logger.verbose(`Retrying request in ${retryAfterDelay}ms (retry attempt: ${currentRetry + 1})`);
51706
- await new Promise((resolve15) => {
51707
- return setTimeout(resolve15, retryAfterDelay);
51706
+ await new Promise((resolve16) => {
51707
+ return setTimeout(resolve16, retryAfterDelay);
51708
51708
  });
51709
51709
  return true;
51710
51710
  }
@@ -52770,7 +52770,7 @@ var require_createAbortablePromise = __commonJS({
52770
52770
  var abort_controller_1 = require_commonjs3();
52771
52771
  function createAbortablePromise(buildPromise, options) {
52772
52772
  const { cleanupBeforeAbort, abortSignal, abortErrorMsg } = options ?? {};
52773
- return new Promise((resolve15, reject) => {
52773
+ return new Promise((resolve16, reject) => {
52774
52774
  function rejectOnAbort() {
52775
52775
  reject(new abort_controller_1.AbortError(abortErrorMsg ?? "The operation was aborted."));
52776
52776
  }
@@ -52788,7 +52788,7 @@ var require_createAbortablePromise = __commonJS({
52788
52788
  try {
52789
52789
  buildPromise((x) => {
52790
52790
  removeListeners();
52791
- resolve15(x);
52791
+ resolve16(x);
52792
52792
  }, (x) => {
52793
52793
  removeListeners();
52794
52794
  reject(x);
@@ -52815,8 +52815,8 @@ var require_delay2 = __commonJS({
52815
52815
  function delay(timeInMs, options) {
52816
52816
  let token;
52817
52817
  const { abortSignal, abortErrorMsg } = options ?? {};
52818
- return (0, createAbortablePromise_js_1.createAbortablePromise)((resolve15) => {
52819
- token = setTimeout(resolve15, timeInMs);
52818
+ return (0, createAbortablePromise_js_1.createAbortablePromise)((resolve16) => {
52819
+ token = setTimeout(resolve16, timeInMs);
52820
52820
  }, {
52821
52821
  cleanupBeforeAbort: () => clearTimeout(token),
52822
52822
  abortSignal,
@@ -54651,9 +54651,9 @@ var require_nodeHttpClient = __commonJS({
54651
54651
  if (stream4.readable === false) {
54652
54652
  return Promise.resolve();
54653
54653
  }
54654
- return new Promise((resolve15) => {
54654
+ return new Promise((resolve16) => {
54655
54655
  const handler = () => {
54656
- resolve15();
54656
+ resolve16();
54657
54657
  stream4.removeListener("close", handler);
54658
54658
  stream4.removeListener("end", handler);
54659
54659
  stream4.removeListener("error", handler);
@@ -54808,8 +54808,8 @@ var require_nodeHttpClient = __commonJS({
54808
54808
  headers: request.headers.toJSON({ preserveCase: true }),
54809
54809
  ...request.requestOverrides
54810
54810
  };
54811
- return new Promise((resolve15, reject) => {
54812
- const req = isInsecure ? import_node_http.default.request(options, resolve15) : import_node_https.default.request(options, resolve15);
54811
+ return new Promise((resolve16, reject) => {
54812
+ const req = isInsecure ? import_node_http.default.request(options, resolve16) : import_node_https.default.request(options, resolve16);
54813
54813
  req.once("error", (err) => {
54814
54814
  reject(
54815
54815
  new import_restError.RestError(err.message, { code: err.code ?? import_restError.RestError.REQUEST_SEND_ERROR, request })
@@ -54897,7 +54897,7 @@ var require_nodeHttpClient = __commonJS({
54897
54897
  return stream4;
54898
54898
  }
54899
54899
  function streamToText(stream4) {
54900
- return new Promise((resolve15, reject) => {
54900
+ return new Promise((resolve16, reject) => {
54901
54901
  const buffer = [];
54902
54902
  stream4.on("data", (chunk) => {
54903
54903
  if (Buffer.isBuffer(chunk)) {
@@ -54907,7 +54907,7 @@ var require_nodeHttpClient = __commonJS({
54907
54907
  }
54908
54908
  });
54909
54909
  stream4.on("end", () => {
54910
- resolve15(Buffer.concat(buffer).toString("utf8"));
54910
+ resolve16(Buffer.concat(buffer).toString("utf8"));
54911
54911
  });
54912
54912
  stream4.on("error", (e) => {
54913
54913
  if (e && e?.name === "AbortError") {
@@ -55347,7 +55347,7 @@ var require_helpers = __commonJS({
55347
55347
  var import_AbortError = require_AbortError2();
55348
55348
  var StandardAbortMessage = "The operation was aborted.";
55349
55349
  function delay(delayInMs, value, options) {
55350
- return new Promise((resolve15, reject) => {
55350
+ return new Promise((resolve16, reject) => {
55351
55351
  let timer = void 0;
55352
55352
  let onAborted = void 0;
55353
55353
  const rejectOnAbort = () => {
@@ -55372,7 +55372,7 @@ var require_helpers = __commonJS({
55372
55372
  }
55373
55373
  timer = setTimeout(() => {
55374
55374
  removeListeners();
55375
- resolve15(value);
55375
+ resolve16(value);
55376
55376
  }, delayInMs);
55377
55377
  if (options?.abortSignal) {
55378
55378
  options.abortSignal.addEventListener("abort", onAborted);
@@ -55867,8 +55867,8 @@ var require_helpers2 = __commonJS({
55867
55867
  function req(url3, opts = {}) {
55868
55868
  const href = typeof url3 === "string" ? url3 : url3.href;
55869
55869
  const req2 = (href.startsWith("https:") ? https3 : http3).request(url3, opts);
55870
- const promise2 = new Promise((resolve15, reject) => {
55871
- req2.once("response", resolve15).once("error", reject).end();
55870
+ const promise2 = new Promise((resolve16, reject) => {
55871
+ req2.once("response", resolve16).once("error", reject).end();
55872
55872
  });
55873
55873
  req2.then = promise2.then.bind(promise2);
55874
55874
  return req2;
@@ -56045,7 +56045,7 @@ var require_parse_proxy_response = __commonJS({
56045
56045
  var debug_1 = __importDefault2(require_src());
56046
56046
  var debug = (0, debug_1.default)("https-proxy-agent:parse-proxy-response");
56047
56047
  function parseProxyResponse(socket) {
56048
- return new Promise((resolve15, reject) => {
56048
+ return new Promise((resolve16, reject) => {
56049
56049
  let buffersLength = 0;
56050
56050
  const buffers = [];
56051
56051
  function read() {
@@ -56111,7 +56111,7 @@ var require_parse_proxy_response = __commonJS({
56111
56111
  }
56112
56112
  debug("got proxy server response: %o %o", firstLine, headers);
56113
56113
  cleanup();
56114
- resolve15({
56114
+ resolve16({
56115
56115
  connect: {
56116
56116
  statusCode,
56117
56117
  statusText,
@@ -57905,8 +57905,8 @@ var require_getClient = __commonJS({
57905
57905
  }
57906
57906
  const { allowInsecureConnection, httpClient } = clientOptions;
57907
57907
  const endpointUrl = clientOptions.endpoint ?? endpoint;
57908
- const client = (path18, ...args) => {
57909
- const getUrl = (requestOptions) => (0, import_urlHelpers.buildRequestUrl)(endpointUrl, path18, args, { allowInsecureConnection, ...requestOptions });
57908
+ const client = (path19, ...args) => {
57909
+ const getUrl = (requestOptions) => (0, import_urlHelpers.buildRequestUrl)(endpointUrl, path19, args, { allowInsecureConnection, ...requestOptions });
57910
57910
  return {
57911
57911
  get: (requestOptions = {}) => {
57912
57912
  return buildOperation(
@@ -60811,15 +60811,15 @@ var require_urlHelpers2 = __commonJS({
60811
60811
  let isAbsolutePath = false;
60812
60812
  let requestUrl = replaceAll(baseUri, urlReplacements);
60813
60813
  if (operationSpec.path) {
60814
- let path18 = replaceAll(operationSpec.path, urlReplacements);
60815
- if (operationSpec.path === "/{nextLink}" && path18.startsWith("/")) {
60816
- path18 = path18.substring(1);
60814
+ let path19 = replaceAll(operationSpec.path, urlReplacements);
60815
+ if (operationSpec.path === "/{nextLink}" && path19.startsWith("/")) {
60816
+ path19 = path19.substring(1);
60817
60817
  }
60818
- if (isAbsoluteUrl(path18)) {
60819
- requestUrl = path18;
60818
+ if (isAbsoluteUrl(path19)) {
60819
+ requestUrl = path19;
60820
60820
  isAbsolutePath = true;
60821
60821
  } else {
60822
- requestUrl = appendPath(requestUrl, path18);
60822
+ requestUrl = appendPath(requestUrl, path19);
60823
60823
  }
60824
60824
  }
60825
60825
  const { queryParams, sequenceParams } = calculateQueryParameters(operationSpec, operationArguments, fallbackObject);
@@ -60865,9 +60865,9 @@ var require_urlHelpers2 = __commonJS({
60865
60865
  }
60866
60866
  const searchStart = pathToAppend.indexOf("?");
60867
60867
  if (searchStart !== -1) {
60868
- const path18 = pathToAppend.substring(0, searchStart);
60868
+ const path19 = pathToAppend.substring(0, searchStart);
60869
60869
  const search = pathToAppend.substring(searchStart + 1);
60870
- newPath = newPath + path18;
60870
+ newPath = newPath + path19;
60871
60871
  if (search) {
60872
60872
  parsedUrl.search = parsedUrl.search ? `${parsedUrl.search}&${search}` : search;
60873
60873
  }
@@ -62342,14 +62342,14 @@ var init_open = __esm({
62342
62342
  }
62343
62343
  const subprocess = import_node_child_process5.default.spawn(command, cliArguments, childProcessOptions);
62344
62344
  if (options.wait) {
62345
- return new Promise((resolve15, reject) => {
62345
+ return new Promise((resolve16, reject) => {
62346
62346
  subprocess.once("error", reject);
62347
62347
  subprocess.once("close", (exitCode) => {
62348
62348
  if (!options.allowNonzeroExitCode && exitCode > 0) {
62349
62349
  reject(new Error(`Exited with code ${exitCode}`));
62350
62350
  return;
62351
62351
  }
62352
- resolve15(subprocess);
62352
+ resolve16(subprocess);
62353
62353
  });
62354
62354
  });
62355
62355
  }
@@ -63841,7 +63841,7 @@ var require_azureDeveloperCliCredential = __commonJS({
63841
63841
  const encodedClaims = btoa(claims);
63842
63842
  claimsSections = ["--claims", encodedClaims];
63843
63843
  }
63844
- return new Promise((resolve15, reject) => {
63844
+ return new Promise((resolve16, reject) => {
63845
63845
  try {
63846
63846
  const args = [
63847
63847
  "auth",
@@ -63858,7 +63858,7 @@ var require_azureDeveloperCliCredential = __commonJS({
63858
63858
  cwd: exports2.developerCliCredentialInternals.getSafeWorkingDir(),
63859
63859
  timeout
63860
63860
  }, (error2, stdout, stderr) => {
63861
- resolve15({ stdout, stderr, error: error2 });
63861
+ resolve16({ stdout, stderr, error: error2 });
63862
63862
  });
63863
63863
  } catch (err) {
63864
63864
  reject(err);
@@ -64027,7 +64027,7 @@ var require_azureCliCredential = __commonJS({
64027
64027
  if (subscription) {
64028
64028
  subscriptionSection = ["--subscription", `"${subscription}"`];
64029
64029
  }
64030
- return new Promise((resolve15, reject) => {
64030
+ return new Promise((resolve16, reject) => {
64031
64031
  try {
64032
64032
  const args = [
64033
64033
  "account",
@@ -64041,7 +64041,7 @@ var require_azureCliCredential = __commonJS({
64041
64041
  ];
64042
64042
  const command = ["az", ...args].join(" ");
64043
64043
  child_process_1.default.exec(command, { cwd: exports2.cliCredentialInternals.getSafeWorkingDir(), timeout }, (error2, stdout, stderr) => {
64044
- resolve15({ stdout, stderr, error: error2 });
64044
+ resolve16({ stdout, stderr, error: error2 });
64045
64045
  });
64046
64046
  } catch (err) {
64047
64047
  reject(err);
@@ -64191,7 +64191,7 @@ var require_processUtils = __commonJS({
64191
64191
  * @internal
64192
64192
  */
64193
64193
  execFile(file2, params, options) {
64194
- return new Promise((resolve15, reject) => {
64194
+ return new Promise((resolve16, reject) => {
64195
64195
  node_child_process_1.default.execFile(file2, params, options, (error2, stdout, stderr) => {
64196
64196
  if (Buffer.isBuffer(stdout)) {
64197
64197
  stdout = stdout.toString("utf8");
@@ -64202,7 +64202,7 @@ var require_processUtils = __commonJS({
64202
64202
  if (stderr || error2) {
64203
64203
  reject(stderr ? new Error(stderr) : error2);
64204
64204
  } else {
64205
- resolve15(stdout);
64205
+ resolve16(stdout);
64206
64206
  }
64207
64207
  });
64208
64208
  });
@@ -65880,7 +65880,7 @@ var require_sender = __commonJS({
65880
65880
  }
65881
65881
  async function sendInParallel(addresses, port, request, signal) {
65882
65882
  signal.throwIfAborted();
65883
- return await new Promise((resolve15, reject) => {
65883
+ return await new Promise((resolve16, reject) => {
65884
65884
  const sockets = [];
65885
65885
  let errorCount = 0;
65886
65886
  const onError = (err) => {
@@ -65894,7 +65894,7 @@ var require_sender = __commonJS({
65894
65894
  const onMessage = (message) => {
65895
65895
  signal.removeEventListener("abort", onAbort);
65896
65896
  clearSockets();
65897
- resolve15(message);
65897
+ resolve16(message);
65898
65898
  };
65899
65899
  const onAbort = () => {
65900
65900
  clearSockets();
@@ -65929,7 +65929,7 @@ var require_sender = __commonJS({
65929
65929
  family: _net.default.isIPv6(host) ? 6 : 4
65930
65930
  }];
65931
65931
  } else {
65932
- addresses = await new Promise((resolve15, reject) => {
65932
+ addresses = await new Promise((resolve16, reject) => {
65933
65933
  const onAbort = () => {
65934
65934
  reject(signal.reason);
65935
65935
  };
@@ -65938,7 +65938,7 @@ var require_sender = __commonJS({
65938
65938
  all: true
65939
65939
  }, (err, addresses2) => {
65940
65940
  signal.removeEventListener("abort", onAbort);
65941
- err ? reject(err) : resolve15(addresses2);
65941
+ err ? reject(err) : resolve16(addresses2);
65942
65942
  });
65943
65943
  });
65944
65944
  }
@@ -69413,25 +69413,25 @@ var require_util2 = __commonJS({
69413
69413
  };
69414
69414
  },
69415
69415
  createDeferredPromise: function() {
69416
- let resolve15;
69416
+ let resolve16;
69417
69417
  let reject;
69418
69418
  const promise2 = new Promise((res, rej) => {
69419
- resolve15 = res;
69419
+ resolve16 = res;
69420
69420
  reject = rej;
69421
69421
  });
69422
69422
  return {
69423
69423
  promise: promise2,
69424
- resolve: resolve15,
69424
+ resolve: resolve16,
69425
69425
  reject
69426
69426
  };
69427
69427
  },
69428
69428
  promisify(fn) {
69429
- return new Promise((resolve15, reject) => {
69429
+ return new Promise((resolve16, reject) => {
69430
69430
  fn((err, ...args) => {
69431
69431
  if (err) {
69432
69432
  return reject(err);
69433
69433
  }
69434
- return resolve15(...args);
69434
+ return resolve16(...args);
69435
69435
  });
69436
69436
  });
69437
69437
  },
@@ -70222,7 +70222,7 @@ var require_end_of_stream = __commonJS({
70222
70222
  validateBoolean(opts.cleanup, "cleanup");
70223
70223
  autoCleanup = opts.cleanup;
70224
70224
  }
70225
- return new Promise2((resolve15, reject) => {
70225
+ return new Promise2((resolve16, reject) => {
70226
70226
  const cleanup = eos(stream4, opts, (err) => {
70227
70227
  if (autoCleanup) {
70228
70228
  cleanup();
@@ -70230,7 +70230,7 @@ var require_end_of_stream = __commonJS({
70230
70230
  if (err) {
70231
70231
  reject(err);
70232
70232
  } else {
70233
- resolve15();
70233
+ resolve16();
70234
70234
  }
70235
70235
  });
70236
70236
  });
@@ -71396,7 +71396,7 @@ var require_readable = __commonJS({
71396
71396
  error2 = this.readableEnded ? null : new AbortError2();
71397
71397
  this.destroy(error2);
71398
71398
  }
71399
- return new Promise2((resolve15, reject) => eos(this, (err) => err && err !== error2 ? reject(err) : resolve15(null)));
71399
+ return new Promise2((resolve16, reject) => eos(this, (err) => err && err !== error2 ? reject(err) : resolve16(null)));
71400
71400
  };
71401
71401
  Readable2.prototype.push = function(chunk, encoding) {
71402
71402
  return readableAddChunk(this, chunk, encoding, false);
@@ -71940,12 +71940,12 @@ var require_readable = __commonJS({
71940
71940
  }
71941
71941
  async function* createAsyncIterator(stream4, options) {
71942
71942
  let callback = nop;
71943
- function next(resolve15) {
71943
+ function next(resolve16) {
71944
71944
  if (this === stream4) {
71945
71945
  callback();
71946
71946
  callback = nop;
71947
71947
  } else {
71948
- callback = resolve15;
71948
+ callback = resolve16;
71949
71949
  }
71950
71950
  }
71951
71951
  stream4.on("readable", next);
@@ -72997,7 +72997,7 @@ var require_duplexify = __commonJS({
72997
72997
  );
72998
72998
  };
72999
72999
  function fromAsyncGen(fn) {
73000
- let { promise: promise2, resolve: resolve15 } = createDeferredPromise();
73000
+ let { promise: promise2, resolve: resolve16 } = createDeferredPromise();
73001
73001
  const ac = new AbortController2();
73002
73002
  const signal = ac.signal;
73003
73003
  const value = fn(
@@ -73012,7 +73012,7 @@ var require_duplexify = __commonJS({
73012
73012
  throw new AbortError2(void 0, {
73013
73013
  cause: signal.reason
73014
73014
  });
73015
- ({ promise: promise2, resolve: resolve15 } = createDeferredPromise());
73015
+ ({ promise: promise2, resolve: resolve16 } = createDeferredPromise());
73016
73016
  yield chunk;
73017
73017
  }
73018
73018
  })(),
@@ -73023,8 +73023,8 @@ var require_duplexify = __commonJS({
73023
73023
  return {
73024
73024
  value,
73025
73025
  write(chunk, encoding, cb) {
73026
- const _resolve = resolve15;
73027
- resolve15 = null;
73026
+ const _resolve = resolve16;
73027
+ resolve16 = null;
73028
73028
  _resolve({
73029
73029
  chunk,
73030
73030
  done: false,
@@ -73032,8 +73032,8 @@ var require_duplexify = __commonJS({
73032
73032
  });
73033
73033
  },
73034
73034
  final(cb) {
73035
- const _resolve = resolve15;
73036
- resolve15 = null;
73035
+ const _resolve = resolve16;
73036
+ resolve16 = null;
73037
73037
  _resolve({
73038
73038
  done: true,
73039
73039
  cb
@@ -73484,7 +73484,7 @@ var require_pipeline4 = __commonJS({
73484
73484
  callback();
73485
73485
  }
73486
73486
  };
73487
- const wait = () => new Promise2((resolve15, reject) => {
73487
+ const wait = () => new Promise2((resolve16, reject) => {
73488
73488
  if (error2) {
73489
73489
  reject(error2);
73490
73490
  } else {
@@ -73492,7 +73492,7 @@ var require_pipeline4 = __commonJS({
73492
73492
  if (error2) {
73493
73493
  reject(error2);
73494
73494
  } else {
73495
- resolve15();
73495
+ resolve16();
73496
73496
  }
73497
73497
  };
73498
73498
  }
@@ -74136,8 +74136,8 @@ var require_operators = __commonJS({
74136
74136
  next = null;
74137
74137
  }
74138
74138
  if (!done && (queue.length >= highWaterMark || cnt >= concurrency)) {
74139
- await new Promise2((resolve15) => {
74140
- resume = resolve15;
74139
+ await new Promise2((resolve16) => {
74140
+ resume = resolve16;
74141
74141
  });
74142
74142
  }
74143
74143
  }
@@ -74171,8 +74171,8 @@ var require_operators = __commonJS({
74171
74171
  queue.shift();
74172
74172
  maybeResume();
74173
74173
  }
74174
- await new Promise2((resolve15) => {
74175
- next = resolve15;
74174
+ await new Promise2((resolve16) => {
74175
+ next = resolve16;
74176
74176
  });
74177
74177
  }
74178
74178
  } finally {
@@ -74430,7 +74430,7 @@ var require_promises = __commonJS({
74430
74430
  var { finished } = require_end_of_stream();
74431
74431
  require_stream2();
74432
74432
  function pipeline(...streams) {
74433
- return new Promise2((resolve15, reject) => {
74433
+ return new Promise2((resolve16, reject) => {
74434
74434
  let signal;
74435
74435
  let end;
74436
74436
  const lastArg = streams[streams.length - 1];
@@ -74445,7 +74445,7 @@ var require_promises = __commonJS({
74445
74445
  if (err) {
74446
74446
  reject(err);
74447
74447
  } else {
74448
- resolve15(value);
74448
+ resolve16(value);
74449
74449
  }
74450
74450
  },
74451
74451
  {
@@ -75312,7 +75312,7 @@ var require_message_io = __commonJS({
75312
75312
  credentialsDetails.maxVersion = "TLSv1.2";
75313
75313
  }
75314
75314
  const secureContext = tls.createSecureContext(credentialsDetails);
75315
- return new Promise((resolve15, reject) => {
75315
+ return new Promise((resolve16, reject) => {
75316
75316
  const duplexpair = new _nativeDuplexpair.default();
75317
75317
  const securePair = this.securePair = {
75318
75318
  cleartext: tls.connect({
@@ -75343,7 +75343,7 @@ var require_message_io = __commonJS({
75343
75343
  securePair.cleartext.pipe(this.incomingMessageStream);
75344
75344
  this.outgoingMessageStream.pipe(securePair.cleartext);
75345
75345
  this.tlsNegotiationComplete = true;
75346
- resolve15();
75346
+ resolve16();
75347
75347
  };
75348
75348
  const onError = (err) => {
75349
75349
  securePair.encrypted.removeListener("readable", onReadable);
@@ -78838,7 +78838,7 @@ var require_js_joda = __commonJS({
78838
78838
  this.fieldValues.put(field, value);
78839
78839
  return this;
78840
78840
  };
78841
- _proto.resolve = function resolve15(resolverStyle, resolverFields) {
78841
+ _proto.resolve = function resolve16(resolverStyle, resolverFields) {
78842
78842
  if (resolverFields != null) {
78843
78843
  this.fieldValues.retainAll(resolverFields);
78844
78844
  }
@@ -79442,7 +79442,7 @@ var require_js_joda = __commonJS({
79442
79442
  _proto.displayName = function displayName() {
79443
79443
  return this.toString();
79444
79444
  };
79445
- _proto.resolve = function resolve15() {
79445
+ _proto.resolve = function resolve16() {
79446
79446
  return null;
79447
79447
  };
79448
79448
  _proto.name = function name() {
@@ -79500,7 +79500,7 @@ var require_js_joda = __commonJS({
79500
79500
  this.range().checkValidValue(newValue, this);
79501
79501
  return temporal.with(ChronoField.DAY_OF_YEAR, temporal.getLong(ChronoField.DAY_OF_YEAR) + (newValue - curValue));
79502
79502
  };
79503
- _proto2.resolve = function resolve15(fieldValues, partialTemporal, resolverStyle) {
79503
+ _proto2.resolve = function resolve16(fieldValues, partialTemporal, resolverStyle) {
79504
79504
  var yearLong = fieldValues.get(ChronoField.YEAR);
79505
79505
  var qoyLong = fieldValues.get(QUARTER_OF_YEAR);
79506
79506
  if (yearLong == null || qoyLong == null) {
@@ -79611,7 +79611,7 @@ var require_js_joda = __commonJS({
79611
79611
  this.range().checkValidValue(newValue, this);
79612
79612
  return temporal.plus(MathUtil.safeSubtract(newValue, this.getFrom(temporal)), ChronoUnit.WEEKS);
79613
79613
  };
79614
- _proto4.resolve = function resolve15(fieldValues, partialTemporal, resolverStyle) {
79614
+ _proto4.resolve = function resolve16(fieldValues, partialTemporal, resolverStyle) {
79615
79615
  var wbyLong = fieldValues.get(WEEK_BASED_YEAR);
79616
79616
  var dowLong = fieldValues.get(ChronoField.DAY_OF_WEEK);
79617
79617
  if (wbyLong == null || dowLong == null) {
@@ -95683,7 +95683,7 @@ var require_connector = __commonJS({
95683
95683
  async function connectInParallel(options, lookup, signal) {
95684
95684
  signal.throwIfAborted();
95685
95685
  const addresses = await lookupAllAddresses(options.host, lookup, signal);
95686
- return await new Promise((resolve15, reject) => {
95686
+ return await new Promise((resolve16, reject) => {
95687
95687
  const sockets = new Array(addresses.length);
95688
95688
  const errors = [];
95689
95689
  function onError(err) {
@@ -95707,7 +95707,7 @@ var require_connector = __commonJS({
95707
95707
  socket.removeListener("connect", onConnect);
95708
95708
  socket.destroy();
95709
95709
  }
95710
- resolve15(this);
95710
+ resolve16(this);
95711
95711
  }
95712
95712
  const onAbort = () => {
95713
95713
  for (let j = 0; j < sockets.length; j++) {
@@ -95738,7 +95738,7 @@ var require_connector = __commonJS({
95738
95738
  const addresses = await lookupAllAddresses(options.host, lookup, signal);
95739
95739
  for (const address of addresses) {
95740
95740
  try {
95741
- return await new Promise((resolve15, reject) => {
95741
+ return await new Promise((resolve16, reject) => {
95742
95742
  const socket = _net.default.connect({
95743
95743
  ...options,
95744
95744
  host: address.address,
@@ -95761,7 +95761,7 @@ var require_connector = __commonJS({
95761
95761
  signal.removeEventListener("abort", onAbort);
95762
95762
  socket.removeListener("error", onError);
95763
95763
  socket.removeListener("connect", onConnect);
95764
- resolve15(socket);
95764
+ resolve16(socket);
95765
95765
  };
95766
95766
  signal.addEventListener("abort", onAbort, {
95767
95767
  once: true
@@ -95790,7 +95790,7 @@ var require_connector = __commonJS({
95790
95790
  family: 4
95791
95791
  }];
95792
95792
  } else {
95793
- return await new Promise((resolve15, reject) => {
95793
+ return await new Promise((resolve16, reject) => {
95794
95794
  const onAbort = () => {
95795
95795
  reject(signal.reason);
95796
95796
  };
@@ -95800,7 +95800,7 @@ var require_connector = __commonJS({
95800
95800
  all: true
95801
95801
  }, (err, addresses) => {
95802
95802
  signal.removeEventListener("abort", onAbort);
95803
- err ? reject(err) : resolve15(addresses);
95803
+ err ? reject(err) : resolve16(addresses);
95804
95804
  });
95805
95805
  });
95806
95806
  }
@@ -96586,15 +96586,15 @@ var require_connection2 = __commonJS({
96586
96586
  var DEFAULT_LANGUAGE = "us_english";
96587
96587
  var DEFAULT_DATEFORMAT = "mdy";
96588
96588
  function withResolvers() {
96589
- let resolve15;
96589
+ let resolve16;
96590
96590
  let reject;
96591
96591
  const promise2 = new Promise((res, rej) => {
96592
- resolve15 = res;
96592
+ resolve16 = res;
96593
96593
  reject = rej;
96594
96594
  });
96595
96595
  return {
96596
96596
  promise: promise2,
96597
- resolve: resolve15,
96597
+ resolve: resolve16,
96598
96598
  reject
96599
96599
  };
96600
96600
  }
@@ -97585,7 +97585,7 @@ var require_connection2 = __commonJS({
97585
97585
  };
97586
97586
  const {
97587
97587
  promise: promise2,
97588
- resolve: resolve15,
97588
+ resolve: resolve16,
97589
97589
  reject
97590
97590
  } = withResolvers();
97591
97591
  const encryptsocket = tls.connect(encryptOptions);
@@ -97599,7 +97599,7 @@ var require_connection2 = __commonJS({
97599
97599
  try {
97600
97600
  const onError = reject;
97601
97601
  const onConnect = () => {
97602
- resolve15(encryptsocket);
97602
+ resolve16(encryptsocket);
97603
97603
  };
97604
97604
  encryptsocket.once("error", onError);
97605
97605
  encryptsocket.once("secureConnect", onConnect);
@@ -98642,9 +98642,9 @@ var require_connection2 = __commonJS({
98642
98642
  this.debug.log("Retry after transient failure connecting to " + server + ":" + port);
98643
98643
  const {
98644
98644
  promise: promise2,
98645
- resolve: resolve15
98645
+ resolve: resolve16
98646
98646
  } = withResolvers();
98647
- setTimeout(resolve15, this.config.options.connectionRetryInterval);
98647
+ setTimeout(resolve16, this.config.options.connectionRetryInterval);
98648
98648
  await promise2;
98649
98649
  this.emit("retry");
98650
98650
  this.transitionTo(this.STATE.CONNECTING);
@@ -99154,15 +99154,15 @@ var require_connection_pool2 = __commonJS({
99154
99154
  return cfg;
99155
99155
  }
99156
99156
  _poolCreate() {
99157
- return new shared.Promise((resolve15, reject) => {
99157
+ return new shared.Promise((resolve16, reject) => {
99158
99158
  const resolveOnce = (v) => {
99159
- resolve15(v);
99160
- resolve15 = reject = () => {
99159
+ resolve16(v);
99160
+ resolve16 = reject = () => {
99161
99161
  };
99162
99162
  };
99163
99163
  const rejectOnce = (e) => {
99164
99164
  reject(e);
99165
- resolve15 = reject = () => {
99165
+ resolve16 = reject = () => {
99166
99166
  };
99167
99167
  };
99168
99168
  let tedious;
@@ -99206,9 +99206,9 @@ var require_connection_pool2 = __commonJS({
99206
99206
  }
99207
99207
  _poolValidate(tedious) {
99208
99208
  if (tedious && !tedious.closed && !tedious.hasError) {
99209
- return !this.config.validateConnection || new shared.Promise((resolve15) => {
99209
+ return !this.config.validateConnection || new shared.Promise((resolve16) => {
99210
99210
  const req = new tds.Request("SELECT 1;", (err) => {
99211
- resolve15(!err);
99211
+ resolve16(!err);
99212
99212
  });
99213
99213
  tedious.execSql(req);
99214
99214
  });
@@ -99216,19 +99216,19 @@ var require_connection_pool2 = __commonJS({
99216
99216
  return false;
99217
99217
  }
99218
99218
  _poolDestroy(tedious) {
99219
- return new shared.Promise((resolve15, reject) => {
99219
+ return new shared.Promise((resolve16, reject) => {
99220
99220
  if (!tedious) {
99221
- resolve15();
99221
+ resolve16();
99222
99222
  return;
99223
99223
  }
99224
99224
  debug("connection(%d): destroying", IDS.get(tedious));
99225
99225
  if (tedious.closed) {
99226
99226
  debug("connection(%d): already closed", IDS.get(tedious));
99227
- resolve15();
99227
+ resolve16();
99228
99228
  } else {
99229
99229
  tedious.once("end", () => {
99230
99230
  debug("connection(%d): destroyed", IDS.get(tedious));
99231
- resolve15();
99231
+ resolve16();
99232
99232
  });
99233
99233
  tedious.close();
99234
99234
  }
@@ -100776,12 +100776,12 @@ var require_dist5 = __commonJS({
100776
100776
  throw new Error(`Unknown format "${name}"`);
100777
100777
  return f;
100778
100778
  };
100779
- function addFormats(ajv2, list, fs21, exportName) {
100779
+ function addFormats(ajv2, list, fs20, exportName) {
100780
100780
  var _a2;
100781
100781
  var _b;
100782
100782
  (_a2 = (_b = ajv2.opts.code).formats) !== null && _a2 !== void 0 ? _a2 : _b.formats = (0, codegen_1._)`require("ajv-formats/dist/formats").${exportName}`;
100783
100783
  for (const f of list)
100784
- ajv2.addFormat(f, fs21[f]);
100784
+ ajv2.addFormat(f, fs20[f]);
100785
100785
  }
100786
100786
  module2.exports = exports2 = formatsPlugin;
100787
100787
  Object.defineProperty(exports2, "__esModule", { value: true });
@@ -100794,8 +100794,8 @@ var require_windows = __commonJS({
100794
100794
  "node_modules/isexe/windows.js"(exports2, module2) {
100795
100795
  module2.exports = isexe;
100796
100796
  isexe.sync = sync;
100797
- var fs21 = require("fs");
100798
- function checkPathExt(path18, options) {
100797
+ var fs20 = require("fs");
100798
+ function checkPathExt(path19, options) {
100799
100799
  var pathext = options.pathExt !== void 0 ? options.pathExt : process.env.PATHEXT;
100800
100800
  if (!pathext) {
100801
100801
  return true;
@@ -100806,25 +100806,25 @@ var require_windows = __commonJS({
100806
100806
  }
100807
100807
  for (var i = 0; i < pathext.length; i++) {
100808
100808
  var p = pathext[i].toLowerCase();
100809
- if (p && path18.substr(-p.length).toLowerCase() === p) {
100809
+ if (p && path19.substr(-p.length).toLowerCase() === p) {
100810
100810
  return true;
100811
100811
  }
100812
100812
  }
100813
100813
  return false;
100814
100814
  }
100815
- function checkStat(stat, path18, options) {
100815
+ function checkStat(stat, path19, options) {
100816
100816
  if (!stat.isSymbolicLink() && !stat.isFile()) {
100817
100817
  return false;
100818
100818
  }
100819
- return checkPathExt(path18, options);
100819
+ return checkPathExt(path19, options);
100820
100820
  }
100821
- function isexe(path18, options, cb) {
100822
- fs21.stat(path18, function(er, stat) {
100823
- cb(er, er ? false : checkStat(stat, path18, options));
100821
+ function isexe(path19, options, cb) {
100822
+ fs20.stat(path19, function(er, stat) {
100823
+ cb(er, er ? false : checkStat(stat, path19, options));
100824
100824
  });
100825
100825
  }
100826
- function sync(path18, options) {
100827
- return checkStat(fs21.statSync(path18), path18, options);
100826
+ function sync(path19, options) {
100827
+ return checkStat(fs20.statSync(path19), path19, options);
100828
100828
  }
100829
100829
  }
100830
100830
  });
@@ -100834,14 +100834,14 @@ var require_mode = __commonJS({
100834
100834
  "node_modules/isexe/mode.js"(exports2, module2) {
100835
100835
  module2.exports = isexe;
100836
100836
  isexe.sync = sync;
100837
- var fs21 = require("fs");
100838
- function isexe(path18, options, cb) {
100839
- fs21.stat(path18, function(er, stat) {
100837
+ var fs20 = require("fs");
100838
+ function isexe(path19, options, cb) {
100839
+ fs20.stat(path19, function(er, stat) {
100840
100840
  cb(er, er ? false : checkStat(stat, options));
100841
100841
  });
100842
100842
  }
100843
- function sync(path18, options) {
100844
- return checkStat(fs21.statSync(path18), options);
100843
+ function sync(path19, options) {
100844
+ return checkStat(fs20.statSync(path19), options);
100845
100845
  }
100846
100846
  function checkStat(stat, options) {
100847
100847
  return stat.isFile() && checkMode(stat, options);
@@ -100865,7 +100865,7 @@ var require_mode = __commonJS({
100865
100865
  // node_modules/isexe/index.js
100866
100866
  var require_isexe = __commonJS({
100867
100867
  "node_modules/isexe/index.js"(exports2, module2) {
100868
- var fs21 = require("fs");
100868
+ var fs20 = require("fs");
100869
100869
  var core;
100870
100870
  if (process.platform === "win32" || global.TESTING_WINDOWS) {
100871
100871
  core = require_windows();
@@ -100874,7 +100874,7 @@ var require_isexe = __commonJS({
100874
100874
  }
100875
100875
  module2.exports = isexe;
100876
100876
  isexe.sync = sync;
100877
- function isexe(path18, options, cb) {
100877
+ function isexe(path19, options, cb) {
100878
100878
  if (typeof options === "function") {
100879
100879
  cb = options;
100880
100880
  options = {};
@@ -100883,17 +100883,17 @@ var require_isexe = __commonJS({
100883
100883
  if (typeof Promise !== "function") {
100884
100884
  throw new TypeError("callback not provided");
100885
100885
  }
100886
- return new Promise(function(resolve15, reject) {
100887
- isexe(path18, options || {}, function(er, is) {
100886
+ return new Promise(function(resolve16, reject) {
100887
+ isexe(path19, options || {}, function(er, is) {
100888
100888
  if (er) {
100889
100889
  reject(er);
100890
100890
  } else {
100891
- resolve15(is);
100891
+ resolve16(is);
100892
100892
  }
100893
100893
  });
100894
100894
  });
100895
100895
  }
100896
- core(path18, options || {}, function(er, is) {
100896
+ core(path19, options || {}, function(er, is) {
100897
100897
  if (er) {
100898
100898
  if (er.code === "EACCES" || options && options.ignoreErrors) {
100899
100899
  er = null;
@@ -100903,9 +100903,9 @@ var require_isexe = __commonJS({
100903
100903
  cb(er, is);
100904
100904
  });
100905
100905
  }
100906
- function sync(path18, options) {
100906
+ function sync(path19, options) {
100907
100907
  try {
100908
- return core.sync(path18, options || {});
100908
+ return core.sync(path19, options || {});
100909
100909
  } catch (er) {
100910
100910
  if (options && options.ignoreErrors || er.code === "EACCES") {
100911
100911
  return false;
@@ -100921,7 +100921,7 @@ var require_isexe = __commonJS({
100921
100921
  var require_which = __commonJS({
100922
100922
  "node_modules/which/which.js"(exports2, module2) {
100923
100923
  var isWindows = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys";
100924
- var path18 = require("path");
100924
+ var path19 = require("path");
100925
100925
  var COLON = isWindows ? ";" : ":";
100926
100926
  var isexe = require_isexe();
100927
100927
  var getNotFoundError = (cmd) => Object.assign(new Error(`not found: ${cmd}`), { code: "ENOENT" });
@@ -100954,27 +100954,27 @@ var require_which = __commonJS({
100954
100954
  opt = {};
100955
100955
  const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt);
100956
100956
  const found = [];
100957
- const step = (i) => new Promise((resolve15, reject) => {
100957
+ const step = (i) => new Promise((resolve16, reject) => {
100958
100958
  if (i === pathEnv.length)
100959
- return opt.all && found.length ? resolve15(found) : reject(getNotFoundError(cmd));
100959
+ return opt.all && found.length ? resolve16(found) : reject(getNotFoundError(cmd));
100960
100960
  const ppRaw = pathEnv[i];
100961
100961
  const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
100962
- const pCmd = path18.join(pathPart, cmd);
100962
+ const pCmd = path19.join(pathPart, cmd);
100963
100963
  const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
100964
- resolve15(subStep(p, i, 0));
100964
+ resolve16(subStep(p, i, 0));
100965
100965
  });
100966
- const subStep = (p, i, ii) => new Promise((resolve15, reject) => {
100966
+ const subStep = (p, i, ii) => new Promise((resolve16, reject) => {
100967
100967
  if (ii === pathExt.length)
100968
- return resolve15(step(i + 1));
100968
+ return resolve16(step(i + 1));
100969
100969
  const ext = pathExt[ii];
100970
100970
  isexe(p + ext, { pathExt: pathExtExe }, (er, is) => {
100971
100971
  if (!er && is) {
100972
100972
  if (opt.all)
100973
100973
  found.push(p + ext);
100974
100974
  else
100975
- return resolve15(p + ext);
100975
+ return resolve16(p + ext);
100976
100976
  }
100977
- return resolve15(subStep(p, i, ii + 1));
100977
+ return resolve16(subStep(p, i, ii + 1));
100978
100978
  });
100979
100979
  });
100980
100980
  return cb ? step(0).then((res) => cb(null, res), cb) : step(0);
@@ -100986,7 +100986,7 @@ var require_which = __commonJS({
100986
100986
  for (let i = 0; i < pathEnv.length; i++) {
100987
100987
  const ppRaw = pathEnv[i];
100988
100988
  const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
100989
- const pCmd = path18.join(pathPart, cmd);
100989
+ const pCmd = path19.join(pathPart, cmd);
100990
100990
  const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
100991
100991
  for (let j = 0; j < pathExt.length; j++) {
100992
100992
  const cur = p + pathExt[j];
@@ -101034,7 +101034,7 @@ var require_path_key = __commonJS({
101034
101034
  var require_resolveCommand = __commonJS({
101035
101035
  "node_modules/cross-spawn/lib/util/resolveCommand.js"(exports2, module2) {
101036
101036
  "use strict";
101037
- var path18 = require("path");
101037
+ var path19 = require("path");
101038
101038
  var which = require_which();
101039
101039
  var getPathKey = require_path_key();
101040
101040
  function resolveCommandAttempt(parsed, withoutPathExt) {
@@ -101052,7 +101052,7 @@ var require_resolveCommand = __commonJS({
101052
101052
  try {
101053
101053
  resolved = which.sync(parsed.command, {
101054
101054
  path: env3[getPathKey({ env: env3 })],
101055
- pathExt: withoutPathExt ? path18.delimiter : void 0
101055
+ pathExt: withoutPathExt ? path19.delimiter : void 0
101056
101056
  });
101057
101057
  } catch (e) {
101058
101058
  } finally {
@@ -101061,7 +101061,7 @@ var require_resolveCommand = __commonJS({
101061
101061
  }
101062
101062
  }
101063
101063
  if (resolved) {
101064
- resolved = path18.resolve(hasCustomCwd ? parsed.options.cwd : "", resolved);
101064
+ resolved = path19.resolve(hasCustomCwd ? parsed.options.cwd : "", resolved);
101065
101065
  }
101066
101066
  return resolved;
101067
101067
  }
@@ -101115,8 +101115,8 @@ var require_shebang_command = __commonJS({
101115
101115
  if (!match) {
101116
101116
  return null;
101117
101117
  }
101118
- const [path18, argument] = match[0].replace(/#! ?/, "").split(" ");
101119
- const binary = path18.split("/").pop();
101118
+ const [path19, argument] = match[0].replace(/#! ?/, "").split(" ");
101119
+ const binary = path19.split("/").pop();
101120
101120
  if (binary === "env") {
101121
101121
  return argument;
101122
101122
  }
@@ -101129,16 +101129,16 @@ var require_shebang_command = __commonJS({
101129
101129
  var require_readShebang = __commonJS({
101130
101130
  "node_modules/cross-spawn/lib/util/readShebang.js"(exports2, module2) {
101131
101131
  "use strict";
101132
- var fs21 = require("fs");
101132
+ var fs20 = require("fs");
101133
101133
  var shebangCommand = require_shebang_command();
101134
101134
  function readShebang(command) {
101135
101135
  const size = 150;
101136
101136
  const buffer = Buffer.alloc(size);
101137
101137
  let fd;
101138
101138
  try {
101139
- fd = fs21.openSync(command, "r");
101140
- fs21.readSync(fd, buffer, 0, size, 0);
101141
- fs21.closeSync(fd);
101139
+ fd = fs20.openSync(command, "r");
101140
+ fs20.readSync(fd, buffer, 0, size, 0);
101141
+ fs20.closeSync(fd);
101142
101142
  } catch (e) {
101143
101143
  }
101144
101144
  return shebangCommand(buffer.toString());
@@ -101151,7 +101151,7 @@ var require_readShebang = __commonJS({
101151
101151
  var require_parse2 = __commonJS({
101152
101152
  "node_modules/cross-spawn/lib/parse.js"(exports2, module2) {
101153
101153
  "use strict";
101154
- var path18 = require("path");
101154
+ var path19 = require("path");
101155
101155
  var resolveCommand = require_resolveCommand();
101156
101156
  var escape2 = require_escape();
101157
101157
  var readShebang = require_readShebang();
@@ -101176,7 +101176,7 @@ var require_parse2 = __commonJS({
101176
101176
  const needsShell = !isExecutableRegExp.test(commandFile);
101177
101177
  if (parsed.options.forceShell || needsShell) {
101178
101178
  const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile);
101179
- parsed.command = path18.normalize(parsed.command);
101179
+ parsed.command = path19.normalize(parsed.command);
101180
101180
  parsed.command = escape2.command(parsed.command);
101181
101181
  parsed.args = parsed.args.map((arg) => escape2.argument(arg, needsDoubleEscapeMetaChars));
101182
101182
  const shellCommand = [parsed.command].concat(parsed.args).join(" ");
@@ -101825,19 +101825,19 @@ var init_source = __esm({
101825
101825
  });
101826
101826
 
101827
101827
  // src/cli.ts
101828
- var fs20 = __toESM(require("fs"));
101828
+ var fs19 = __toESM(require("fs"));
101829
101829
  var fsPromises = __toESM(require("fs/promises"));
101830
- var path17 = __toESM(require("path"));
101830
+ var path18 = __toESM(require("path"));
101831
101831
 
101832
101832
  // src/parser.ts
101833
101833
  var path = __toESM(require("path"));
101834
101834
 
101835
101835
  // src/nornapiParser.ts
101836
- function extractPathParameters(path18) {
101836
+ function extractPathParameters(path19) {
101837
101837
  const params = [];
101838
101838
  const regex = /(?<!\{)\{([a-zA-Z_][a-zA-Z0-9_]*)\}(?!\})/g;
101839
101839
  let match;
101840
- while ((match = regex.exec(path18)) !== null) {
101840
+ while ((match = regex.exec(path19)) !== null) {
101841
101841
  params.push(match[1]);
101842
101842
  }
101843
101843
  return params;
@@ -101887,12 +101887,12 @@ function parseNornApiFile(content) {
101887
101887
  if (inEndpointsBlock) {
101888
101888
  const endpointMatch = trimmed.match(/^([a-zA-Z_][a-zA-Z0-9_]*)\s*:\s*(GET|POST|PUT|DELETE|PATCH|HEAD|OPTIONS)\s+(.+)$/i);
101889
101889
  if (endpointMatch) {
101890
- const path18 = endpointMatch[3].trim();
101890
+ const path19 = endpointMatch[3].trim();
101891
101891
  endpoints.push({
101892
101892
  name: endpointMatch[1],
101893
101893
  method: endpointMatch[2].toUpperCase(),
101894
- path: path18,
101895
- parameters: extractPathParameters(path18)
101894
+ path: path19,
101895
+ parameters: extractPathParameters(path19)
101896
101896
  });
101897
101897
  }
101898
101898
  continue;
@@ -102340,8 +102340,8 @@ function parseNornSqlFile(text, sourcePath) {
102340
102340
  }
102341
102341
 
102342
102342
  // src/pathAccess.ts
102343
- function getPathSegments(path18) {
102344
- return path18.replace(/\[(\d+)\]/g, ".$1").split(".").filter((part) => part !== "");
102343
+ function getPathSegments(path19) {
102344
+ return path19.replace(/\[(\d+)\]/g, ".$1").split(".").filter((part) => part !== "");
102345
102345
  }
102346
102346
  function getPathPartValue(current, part) {
102347
102347
  if (Array.isArray(current) && part === "count") {
@@ -102349,12 +102349,12 @@ function getPathPartValue(current, part) {
102349
102349
  }
102350
102350
  return current[part];
102351
102351
  }
102352
- function getNestedPathValue(obj, path18) {
102353
- if (!path18 || obj === null || obj === void 0) {
102352
+ function getNestedPathValue(obj, path19) {
102353
+ if (!path19 || obj === null || obj === void 0) {
102354
102354
  return obj;
102355
102355
  }
102356
102356
  let current = obj;
102357
- for (const part of getPathSegments(path18)) {
102357
+ for (const part of getPathSegments(path19)) {
102358
102358
  if (current === null || current === void 0) {
102359
102359
  return void 0;
102360
102360
  }
@@ -102500,8 +102500,8 @@ function extractFileLevelVariables(text) {
102500
102500
  }
102501
102501
  return variables;
102502
102502
  }
102503
- function getNestedValue(obj, path18) {
102504
- return getNestedPathValue(obj, path18);
102503
+ function getNestedValue(obj, path19) {
102504
+ return getNestedPathValue(obj, path19);
102505
102505
  }
102506
102506
  function valueToString(value) {
102507
102507
  if (value === null) {
@@ -102545,8 +102545,8 @@ function substituteVariables(text, variables) {
102545
102545
  const value = variables[varName];
102546
102546
  if (typeof value === "object" && value !== null) {
102547
102547
  if (pathPart) {
102548
- const path18 = pathPart.replace(/^\./, "");
102549
- const nestedValue = getNestedValue(value, path18);
102548
+ const path19 = pathPart.replace(/^\./, "");
102549
+ const nestedValue = getNestedValue(value, path19);
102550
102550
  if (nestedValue === void 0 && varName === ENV_SCOPE_KEY) {
102551
102551
  return match;
102552
102552
  }
@@ -102560,8 +102560,8 @@ function substituteVariables(text, variables) {
102560
102560
  if (pathPart && typeof value === "string") {
102561
102561
  try {
102562
102562
  const parsed = JSON.parse(value);
102563
- const path18 = pathPart.replace(/^\./, "");
102564
- const nestedValue = getNestedValue(parsed, path18);
102563
+ const path19 = pathPart.replace(/^\./, "");
102564
+ const nestedValue = getNestedValue(parsed, path19);
102565
102565
  if (nestedValue === void 0 && varName === ENV_SCOPE_KEY) {
102566
102566
  return match;
102567
102567
  }
@@ -103410,9 +103410,9 @@ function isVisitable(thing) {
103410
103410
  function removeBrackets(key) {
103411
103411
  return utils_default.endsWith(key, "[]") ? key.slice(0, -2) : key;
103412
103412
  }
103413
- function renderKey(path18, key, dots) {
103414
- if (!path18) return key;
103415
- return path18.concat(key).map(function each(token, i) {
103413
+ function renderKey(path19, key, dots) {
103414
+ if (!path19) return key;
103415
+ return path19.concat(key).map(function each(token, i) {
103416
103416
  token = removeBrackets(token);
103417
103417
  return !dots && i ? "[" + token + "]" : token;
103418
103418
  }).join(dots ? "." : "");
@@ -103460,9 +103460,9 @@ function toFormData(obj, formData, options) {
103460
103460
  }
103461
103461
  return value;
103462
103462
  }
103463
- function defaultVisitor(value, key, path18) {
103463
+ function defaultVisitor(value, key, path19) {
103464
103464
  let arr = value;
103465
- if (value && !path18 && typeof value === "object") {
103465
+ if (value && !path19 && typeof value === "object") {
103466
103466
  if (utils_default.endsWith(key, "{}")) {
103467
103467
  key = metaTokens ? key : key.slice(0, -2);
103468
103468
  value = JSON.stringify(value);
@@ -103481,7 +103481,7 @@ function toFormData(obj, formData, options) {
103481
103481
  if (isVisitable(value)) {
103482
103482
  return true;
103483
103483
  }
103484
- formData.append(renderKey(path18, key, dots), convertValue(value));
103484
+ formData.append(renderKey(path19, key, dots), convertValue(value));
103485
103485
  return false;
103486
103486
  }
103487
103487
  const stack = [];
@@ -103490,10 +103490,10 @@ function toFormData(obj, formData, options) {
103490
103490
  convertValue,
103491
103491
  isVisitable
103492
103492
  });
103493
- function build(value, path18) {
103493
+ function build(value, path19) {
103494
103494
  if (utils_default.isUndefined(value)) return;
103495
103495
  if (stack.indexOf(value) !== -1) {
103496
- throw Error("Circular reference detected in " + path18.join("."));
103496
+ throw Error("Circular reference detected in " + path19.join("."));
103497
103497
  }
103498
103498
  stack.push(value);
103499
103499
  utils_default.forEach(value, function each(el, key) {
@@ -103501,11 +103501,11 @@ function toFormData(obj, formData, options) {
103501
103501
  formData,
103502
103502
  el,
103503
103503
  utils_default.isString(key) ? key.trim() : key,
103504
- path18,
103504
+ path19,
103505
103505
  exposedHelpers
103506
103506
  );
103507
103507
  if (result === true) {
103508
- build(el, path18 ? path18.concat(key) : [key]);
103508
+ build(el, path19 ? path19.concat(key) : [key]);
103509
103509
  }
103510
103510
  });
103511
103511
  stack.pop();
@@ -103717,7 +103717,7 @@ var platform_default = {
103717
103717
  // node_modules/axios/lib/helpers/toURLEncodedForm.js
103718
103718
  function toURLEncodedForm(data, options) {
103719
103719
  return toFormData_default(data, new platform_default.classes.URLSearchParams(), {
103720
- visitor: function(value, key, path18, helpers) {
103720
+ visitor: function(value, key, path19, helpers) {
103721
103721
  if (platform_default.isNode && utils_default.isBuffer(value)) {
103722
103722
  this.append(key, value.toString("base64"));
103723
103723
  return false;
@@ -103747,11 +103747,11 @@ function arrayToObject(arr) {
103747
103747
  return obj;
103748
103748
  }
103749
103749
  function formDataToJSON(formData) {
103750
- function buildPath(path18, value, target, index) {
103751
- let name = path18[index++];
103750
+ function buildPath(path19, value, target, index) {
103751
+ let name = path19[index++];
103752
103752
  if (name === "__proto__") return true;
103753
103753
  const isNumericKey = Number.isFinite(+name);
103754
- const isLast = index >= path18.length;
103754
+ const isLast = index >= path19.length;
103755
103755
  name = !name && utils_default.isArray(target) ? target.length : name;
103756
103756
  if (isLast) {
103757
103757
  if (utils_default.hasOwnProp(target, name)) {
@@ -103764,7 +103764,7 @@ function formDataToJSON(formData) {
103764
103764
  if (!target[name] || !utils_default.isObject(target[name])) {
103765
103765
  target[name] = [];
103766
103766
  }
103767
- const result = buildPath(path18, value, target[name], index);
103767
+ const result = buildPath(path19, value, target[name], index);
103768
103768
  if (result && utils_default.isArray(target[name])) {
103769
103769
  target[name] = arrayToObject(target[name]);
103770
103770
  }
@@ -104193,10 +104193,10 @@ utils_default.inherits(CanceledError, AxiosError_default, {
104193
104193
  var CanceledError_default = CanceledError;
104194
104194
 
104195
104195
  // node_modules/axios/lib/core/settle.js
104196
- function settle(resolve15, reject, response) {
104196
+ function settle(resolve16, reject, response) {
104197
104197
  const validateStatus2 = response.config.validateStatus;
104198
104198
  if (!response.status || !validateStatus2 || validateStatus2(response.status)) {
104199
- resolve15(response);
104199
+ resolve16(response);
104200
104200
  } else {
104201
104201
  reject(new AxiosError_default(
104202
104202
  "Request failed with status code " + response.status,
@@ -104819,7 +104819,7 @@ function setProxy(options, configProxy, location) {
104819
104819
  }
104820
104820
  var isHttpAdapterSupported = typeof process !== "undefined" && utils_default.kindOf(process) === "process";
104821
104821
  var wrapAsync = (asyncExecutor) => {
104822
- return new Promise((resolve15, reject) => {
104822
+ return new Promise((resolve16, reject) => {
104823
104823
  let onDone;
104824
104824
  let isDone;
104825
104825
  const done = (value, isRejected) => {
@@ -104829,7 +104829,7 @@ var wrapAsync = (asyncExecutor) => {
104829
104829
  };
104830
104830
  const _resolve = (value) => {
104831
104831
  done(value);
104832
- resolve15(value);
104832
+ resolve16(value);
104833
104833
  };
104834
104834
  const _reject = (reason) => {
104835
104835
  done(reason, true);
@@ -104881,7 +104881,7 @@ var http2Transport = {
104881
104881
  }
104882
104882
  };
104883
104883
  var http_default = isHttpAdapterSupported && function httpAdapter(config2) {
104884
- return wrapAsync(async function dispatchHttpRequest(resolve15, reject, onDone) {
104884
+ return wrapAsync(async function dispatchHttpRequest(resolve16, reject, onDone) {
104885
104885
  let { data, lookup, family, httpVersion = 1, http2Options } = config2;
104886
104886
  const { responseType, responseEncoding } = config2;
104887
104887
  const method = config2.method.toUpperCase();
@@ -104966,7 +104966,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config2) {
104966
104966
  }
104967
104967
  let convertedData;
104968
104968
  if (method !== "GET") {
104969
- return settle(resolve15, reject, {
104969
+ return settle(resolve16, reject, {
104970
104970
  status: 405,
104971
104971
  statusText: "method not allowed",
104972
104972
  headers: {},
@@ -104988,7 +104988,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config2) {
104988
104988
  } else if (responseType === "stream") {
104989
104989
  convertedData = import_stream4.default.Readable.from(convertedData);
104990
104990
  }
104991
- return settle(resolve15, reject, {
104991
+ return settle(resolve16, reject, {
104992
104992
  data: convertedData,
104993
104993
  status: 200,
104994
104994
  statusText: "OK",
@@ -105086,9 +105086,9 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config2) {
105086
105086
  auth2 = urlUsername + ":" + urlPassword;
105087
105087
  }
105088
105088
  auth2 && headers.delete("authorization");
105089
- let path18;
105089
+ let path19;
105090
105090
  try {
105091
- path18 = buildURL(
105091
+ path19 = buildURL(
105092
105092
  parsed.pathname + parsed.search,
105093
105093
  config2.params,
105094
105094
  config2.paramsSerializer
@@ -105106,7 +105106,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config2) {
105106
105106
  false
105107
105107
  );
105108
105108
  const options = {
105109
- path: path18,
105109
+ path: path19,
105110
105110
  method,
105111
105111
  headers: headers.toJSON(),
105112
105112
  agents: { http: config2.httpAgent, https: config2.httpsAgent },
@@ -105207,7 +105207,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config2) {
105207
105207
  };
105208
105208
  if (responseType === "stream") {
105209
105209
  response.data = responseStream;
105210
- settle(resolve15, reject, response);
105210
+ settle(resolve16, reject, response);
105211
105211
  } else {
105212
105212
  const responseBuffer = [];
105213
105213
  let totalResponseBytes = 0;
@@ -105255,7 +105255,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config2) {
105255
105255
  } catch (err) {
105256
105256
  return reject(AxiosError_default.from(err, null, config2, response.request, response));
105257
105257
  }
105258
- settle(resolve15, reject, response);
105258
+ settle(resolve16, reject, response);
105259
105259
  });
105260
105260
  }
105261
105261
  abortEmitter.once("abort", (err) => {
@@ -105342,14 +105342,14 @@ var isURLSameOrigin_default = platform_default.hasStandardBrowserEnv ? /* @__PUR
105342
105342
  var cookies_default = platform_default.hasStandardBrowserEnv ? (
105343
105343
  // Standard browser envs support document.cookie
105344
105344
  {
105345
- write(name, value, expires, path18, domain2, secure, sameSite) {
105345
+ write(name, value, expires, path19, domain2, secure, sameSite) {
105346
105346
  if (typeof document === "undefined") return;
105347
105347
  const cookie = [`${name}=${encodeURIComponent(value)}`];
105348
105348
  if (utils_default.isNumber(expires)) {
105349
105349
  cookie.push(`expires=${new Date(expires).toUTCString()}`);
105350
105350
  }
105351
- if (utils_default.isString(path18)) {
105352
- cookie.push(`path=${path18}`);
105351
+ if (utils_default.isString(path19)) {
105352
+ cookie.push(`path=${path19}`);
105353
105353
  }
105354
105354
  if (utils_default.isString(domain2)) {
105355
105355
  cookie.push(`domain=${domain2}`);
@@ -105504,7 +105504,7 @@ var resolveConfig_default = (config2) => {
105504
105504
  // node_modules/axios/lib/adapters/xhr.js
105505
105505
  var isXHRAdapterSupported = typeof XMLHttpRequest !== "undefined";
105506
105506
  var xhr_default = isXHRAdapterSupported && function(config2) {
105507
- return new Promise(function dispatchXhrRequest(resolve15, reject) {
105507
+ return new Promise(function dispatchXhrRequest(resolve16, reject) {
105508
105508
  const _config = resolveConfig_default(config2);
105509
105509
  let requestData = _config.data;
105510
105510
  const requestHeaders = AxiosHeaders_default.from(_config.headers).normalize();
@@ -105538,7 +105538,7 @@ var xhr_default = isXHRAdapterSupported && function(config2) {
105538
105538
  request
105539
105539
  };
105540
105540
  settle(function _resolve(value) {
105541
- resolve15(value);
105541
+ resolve16(value);
105542
105542
  done();
105543
105543
  }, function _reject(err) {
105544
105544
  reject(err);
@@ -105909,8 +105909,8 @@ var factory = (env3) => {
105909
105909
  responseType = responseType || "text";
105910
105910
  let responseData = await resolvers[utils_default.findKey(resolvers, responseType) || "text"](response, config2);
105911
105911
  !isStreamResponse && unsubscribe && unsubscribe();
105912
- return await new Promise((resolve15, reject) => {
105913
- settle(resolve15, reject, {
105912
+ return await new Promise((resolve16, reject) => {
105913
+ settle(resolve16, reject, {
105914
105914
  data: responseData,
105915
105915
  headers: AxiosHeaders_default.from(response.headers),
105916
105916
  status: response.status,
@@ -106306,8 +106306,8 @@ var CancelToken = class _CancelToken {
106306
106306
  throw new TypeError("executor must be a function.");
106307
106307
  }
106308
106308
  let resolvePromise;
106309
- this.promise = new Promise(function promiseExecutor(resolve15) {
106310
- resolvePromise = resolve15;
106309
+ this.promise = new Promise(function promiseExecutor(resolve16) {
106310
+ resolvePromise = resolve16;
106311
106311
  });
106312
106312
  const token = this;
106313
106313
  this.promise.then((cancel) => {
@@ -106320,9 +106320,9 @@ var CancelToken = class _CancelToken {
106320
106320
  });
106321
106321
  this.promise.then = (onfulfilled) => {
106322
106322
  let _resolve;
106323
- const promise2 = new Promise((resolve15) => {
106324
- token.subscribe(resolve15);
106325
- _resolve = resolve15;
106323
+ const promise2 = new Promise((resolve16) => {
106324
+ token.subscribe(resolve16);
106325
+ _resolve = resolve16;
106326
106326
  }).then(onfulfilled);
106327
106327
  promise2.cancel = function reject() {
106328
106328
  token.unsubscribe(_resolve);
@@ -106696,10 +106696,10 @@ var safeToStringImpl = (val, seenArrays = /* @__PURE__ */ new WeakSet()) => {
106696
106696
  var safeToString = (val) => safeToStringImpl(val);
106697
106697
  function createPromiseCallback(cb) {
106698
106698
  let callback;
106699
- let resolve15;
106699
+ let resolve16;
106700
106700
  let reject;
106701
106701
  const promise2 = new Promise((_resolve, _reject) => {
106702
- resolve15 = _resolve;
106702
+ resolve16 = _resolve;
106703
106703
  reject = _reject;
106704
106704
  });
106705
106705
  if (typeof cb === "function") {
@@ -106715,7 +106715,7 @@ function createPromiseCallback(cb) {
106715
106715
  callback = (err, result) => {
106716
106716
  try {
106717
106717
  if (err) reject(err);
106718
- else resolve15(result);
106718
+ else resolve16(result);
106719
106719
  } catch (e) {
106720
106720
  reject(e instanceof Error ? e : new Error());
106721
106721
  }
@@ -106749,18 +106749,18 @@ var MemoryCookieStore = class extends Store {
106749
106749
  /**
106750
106750
  * @internal No doc because this is an overload that supports the implementation
106751
106751
  */
106752
- findCookie(domain2, path18, key, callback) {
106752
+ findCookie(domain2, path19, key, callback) {
106753
106753
  const promiseCallback = createPromiseCallback(callback);
106754
- if (domain2 == null || path18 == null || key == null) {
106754
+ if (domain2 == null || path19 == null || key == null) {
106755
106755
  return promiseCallback.resolve(void 0);
106756
106756
  }
106757
- const result = this.idx[domain2]?.[path18]?.[key];
106757
+ const result = this.idx[domain2]?.[path19]?.[key];
106758
106758
  return promiseCallback.resolve(result);
106759
106759
  }
106760
106760
  /**
106761
106761
  * @internal No doc because this is an overload that supports the implementation
106762
106762
  */
106763
- findCookies(domain2, path18, allowSpecialUseDomain = false, callback) {
106763
+ findCookies(domain2, path19, allowSpecialUseDomain = false, callback) {
106764
106764
  if (typeof allowSpecialUseDomain === "function") {
106765
106765
  callback = allowSpecialUseDomain;
106766
106766
  allowSpecialUseDomain = true;
@@ -106771,7 +106771,7 @@ var MemoryCookieStore = class extends Store {
106771
106771
  return promiseCallback.resolve([]);
106772
106772
  }
106773
106773
  let pathMatcher;
106774
- if (!path18) {
106774
+ if (!path19) {
106775
106775
  pathMatcher = function matchAll2(domainIndex) {
106776
106776
  for (const curPath in domainIndex) {
106777
106777
  const pathIndex = domainIndex[curPath];
@@ -106786,7 +106786,7 @@ var MemoryCookieStore = class extends Store {
106786
106786
  } else {
106787
106787
  pathMatcher = function matchRFC(domainIndex) {
106788
106788
  for (const cookiePath in domainIndex) {
106789
- if (pathMatch(path18, cookiePath)) {
106789
+ if (pathMatch(path19, cookiePath)) {
106790
106790
  const pathIndex = domainIndex[cookiePath];
106791
106791
  for (const key in pathIndex) {
106792
106792
  const value = pathIndex[key];
@@ -106814,14 +106814,14 @@ var MemoryCookieStore = class extends Store {
106814
106814
  */
106815
106815
  putCookie(cookie, callback) {
106816
106816
  const promiseCallback = createPromiseCallback(callback);
106817
- const { domain: domain2, path: path18, key } = cookie;
106818
- if (domain2 == null || path18 == null || key == null) {
106817
+ const { domain: domain2, path: path19, key } = cookie;
106818
+ if (domain2 == null || path19 == null || key == null) {
106819
106819
  return promiseCallback.resolve(void 0);
106820
106820
  }
106821
106821
  const domainEntry = this.idx[domain2] ?? /* @__PURE__ */ Object.create(null);
106822
106822
  this.idx[domain2] = domainEntry;
106823
- const pathEntry = domainEntry[path18] ?? /* @__PURE__ */ Object.create(null);
106824
- domainEntry[path18] = pathEntry;
106823
+ const pathEntry = domainEntry[path19] ?? /* @__PURE__ */ Object.create(null);
106824
+ domainEntry[path19] = pathEntry;
106825
106825
  pathEntry[key] = cookie;
106826
106826
  return promiseCallback.resolve(void 0);
106827
106827
  }
@@ -106835,20 +106835,20 @@ var MemoryCookieStore = class extends Store {
106835
106835
  /**
106836
106836
  * @internal No doc because this is an overload that supports the implementation
106837
106837
  */
106838
- removeCookie(domain2, path18, key, callback) {
106838
+ removeCookie(domain2, path19, key, callback) {
106839
106839
  const promiseCallback = createPromiseCallback(callback);
106840
- delete this.idx[domain2]?.[path18]?.[key];
106840
+ delete this.idx[domain2]?.[path19]?.[key];
106841
106841
  return promiseCallback.resolve(void 0);
106842
106842
  }
106843
106843
  /**
106844
106844
  * @internal No doc because this is an overload that supports the implementation
106845
106845
  */
106846
- removeCookies(domain2, path18, callback) {
106846
+ removeCookies(domain2, path19, callback) {
106847
106847
  const promiseCallback = createPromiseCallback(callback);
106848
106848
  const domainEntry = this.idx[domain2];
106849
106849
  if (domainEntry) {
106850
- if (path18) {
106851
- delete domainEntry[path18];
106850
+ if (path19) {
106851
+ delete domainEntry[path19];
106852
106852
  } else {
106853
106853
  delete this.idx[domain2];
106854
106854
  }
@@ -106874,8 +106874,8 @@ var MemoryCookieStore = class extends Store {
106874
106874
  domains.forEach((domain2) => {
106875
106875
  const domainEntry = idx[domain2] ?? {};
106876
106876
  const paths = Object.keys(domainEntry);
106877
- paths.forEach((path18) => {
106878
- const pathEntry = domainEntry[path18] ?? {};
106877
+ paths.forEach((path19) => {
106878
+ const pathEntry = domainEntry[path19] ?? {};
106879
106879
  const keys = Object.keys(pathEntry);
106880
106880
  keys.forEach((key) => {
106881
106881
  const keyEntry = pathEntry[key];
@@ -107759,18 +107759,18 @@ function cookieCompare(a, b) {
107759
107759
  cmp = (a.creationIndex || 0) - (b.creationIndex || 0);
107760
107760
  return cmp;
107761
107761
  }
107762
- function defaultPath(path18) {
107763
- if (!path18 || path18.slice(0, 1) !== "/") {
107762
+ function defaultPath(path19) {
107763
+ if (!path19 || path19.slice(0, 1) !== "/") {
107764
107764
  return "/";
107765
107765
  }
107766
- if (path18 === "/") {
107767
- return path18;
107766
+ if (path19 === "/") {
107767
+ return path19;
107768
107768
  }
107769
- const rightSlash = path18.lastIndexOf("/");
107769
+ const rightSlash = path19.lastIndexOf("/");
107770
107770
  if (rightSlash === 0) {
107771
107771
  return "/";
107772
107772
  }
107773
- return path18.slice(0, rightSlash);
107773
+ return path19.slice(0, rightSlash);
107774
107774
  }
107775
107775
  var IP_REGEX_LOWERCASE = /(?:^(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}$)|(?:^(?:(?:[a-f\d]{1,4}:){7}(?:[a-f\d]{1,4}|:)|(?:[a-f\d]{1,4}:){6}(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|:[a-f\d]{1,4}|:)|(?:[a-f\d]{1,4}:){5}(?::(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-f\d]{1,4}){1,2}|:)|(?:[a-f\d]{1,4}:){4}(?:(?::[a-f\d]{1,4}){0,1}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-f\d]{1,4}){1,3}|:)|(?:[a-f\d]{1,4}:){3}(?:(?::[a-f\d]{1,4}){0,2}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-f\d]{1,4}){1,4}|:)|(?:[a-f\d]{1,4}:){2}(?:(?::[a-f\d]{1,4}){0,3}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-f\d]{1,4}){1,5}|:)|(?:[a-f\d]{1,4}:){1}(?:(?::[a-f\d]{1,4}){0,4}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-f\d]{1,4}){1,6}|:)|(?::(?:(?::[a-f\d]{1,4}){0,5}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-f\d]{1,4}){1,7}|:)))$)/;
107776
107776
  function domainMatch(domain2, cookieDomain, canonicalize) {
@@ -108172,7 +108172,7 @@ var CookieJar = class _CookieJar {
108172
108172
  return promiseCallback.reject(parameterError);
108173
108173
  }
108174
108174
  const host = canonicalDomain(context.hostname);
108175
- const path18 = context.pathname || "/";
108175
+ const path19 = context.pathname || "/";
108176
108176
  const potentiallyTrustworthy = isPotentiallyTrustworthy(
108177
108177
  url3,
108178
108178
  this.allowSecureOnLocal
@@ -108203,7 +108203,7 @@ var CookieJar = class _CookieJar {
108203
108203
  return false;
108204
108204
  }
108205
108205
  }
108206
- if (!allPaths && typeof c.path === "string" && !pathMatch(path18, c.path)) {
108206
+ if (!allPaths && typeof c.path === "string" && !pathMatch(path19, c.path)) {
108207
108207
  return false;
108208
108208
  }
108209
108209
  if (c.secure && !potentiallyTrustworthy) {
@@ -108235,7 +108235,7 @@ var CookieJar = class _CookieJar {
108235
108235
  }
108236
108236
  store.findCookies(
108237
108237
  host,
108238
- allPaths ? null : path18,
108238
+ allPaths ? null : path19,
108239
108239
  this.allowSpecialUseDomain,
108240
108240
  (err, cookies) => {
108241
108241
  if (err) {
@@ -108829,7 +108829,7 @@ async function sendRequest(request, retryOptions) {
108829
108829
  return sendRequestWithJar(request, sharedCookieJar, retryOptions);
108830
108830
  }
108831
108831
  function sleep(ms) {
108832
- return new Promise((resolve15) => setTimeout(resolve15, ms));
108832
+ return new Promise((resolve16) => setTimeout(resolve16, ms));
108833
108833
  }
108834
108834
  function shouldRetry(response, error2) {
108835
108835
  if (error2) {
@@ -109245,7 +109245,7 @@ async function runScript(type, scriptPath, args, workingDir, variables = {}, cap
109245
109245
  captureVar
109246
109246
  };
109247
109247
  }
109248
- return new Promise((resolve15) => {
109248
+ return new Promise((resolve16) => {
109249
109249
  const env3 = {
109250
109250
  ...process.env,
109251
109251
  // Pass variables as environment variables with NORN_ prefix
@@ -109269,7 +109269,7 @@ async function runScript(type, scriptPath, args, workingDir, variables = {}, cap
109269
109269
  stderr += data.toString();
109270
109270
  });
109271
109271
  child.on("error", (err) => {
109272
- resolve15({
109272
+ resolve16({
109273
109273
  success: false,
109274
109274
  output: cleanScriptOutput(stdout),
109275
109275
  error: `Failed to execute script: ${err.message}`,
@@ -109283,7 +109283,7 @@ async function runScript(type, scriptPath, args, workingDir, variables = {}, cap
109283
109283
  child.on("close", (code) => {
109284
109284
  const exitCode = code ?? 0;
109285
109285
  const cleanedOutput = cleanScriptOutput(stdout);
109286
- resolve15({
109286
+ resolve16({
109287
109287
  success: exitCode === 0,
109288
109288
  output: cleanedOutput,
109289
109289
  error: stderr.trim(),
@@ -109462,8 +109462,8 @@ function validateAgainstSchemaDetailed(value, schemaPath, basePath, workspaceRoo
109462
109462
  if (!valid && validate3.errors) {
109463
109463
  const errors = validate3.errors.map((err) => convertAjvError(err, value));
109464
109464
  const errorStrings = validate3.errors.map((err) => {
109465
- const path18 = err.instancePath || "(root)";
109466
- return `${path18}: ${err.message}`;
109465
+ const path19 = err.instancePath || "(root)";
109466
+ return `${path19}: ${err.message}`;
109467
109467
  });
109468
109468
  return {
109469
109469
  valid: false,
@@ -109501,8 +109501,8 @@ function validateAgainstSchemaObjectDetailed(value, schema) {
109501
109501
  if (!valid && validate3.errors) {
109502
109502
  const errors = validate3.errors.map((err) => convertAjvError(err, value));
109503
109503
  const errorStrings = validate3.errors.map((err) => {
109504
- const path18 = err.instancePath || "(root)";
109505
- return `${path18}: ${err.message}`;
109504
+ const path19 = err.instancePath || "(root)";
109505
+ return `${path19}: ${err.message}`;
109506
109506
  });
109507
109507
  return {
109508
109508
  valid: false,
@@ -109648,7 +109648,7 @@ function resolveValue(expr, responses, variables, getValueByPath2, responseIndex
109648
109648
  if (refMatch) {
109649
109649
  const responseIdx = parseInt(refMatch[1], 10);
109650
109650
  const responseIndex = responseIdx - 1;
109651
- const path18 = refMatch[2];
109651
+ const path19 = refMatch[2];
109652
109652
  if (responseIndex < 0 || responseIndex >= responses.length) {
109653
109653
  return {
109654
109654
  value: void 0,
@@ -109656,12 +109656,12 @@ function resolveValue(expr, responses, variables, getValueByPath2, responseIndex
109656
109656
  };
109657
109657
  }
109658
109658
  const response = responses[responseIndex];
109659
- const value = getValueByPath2(response, path18);
109659
+ const value = getValueByPath2(response, path19);
109660
109660
  return {
109661
109661
  value,
109662
109662
  responseIndex: responseIdx,
109663
109663
  response,
109664
- jsonPath: path18,
109664
+ jsonPath: path19,
109665
109665
  variableName: responseIndexToVariable?.get(responseIdx)
109666
109666
  };
109667
109667
  }
@@ -109678,22 +109678,22 @@ function resolveValue(expr, responses, variables, getValueByPath2, responseIndex
109678
109678
  if (varName in variables) {
109679
109679
  const varValue = variables[varName];
109680
109680
  if (typeof varValue === "object" && varValue !== null) {
109681
- const path18 = pathPart.replace(/^\./, "");
109682
- const value = getNestedValue2(varValue, path18);
109681
+ const path19 = pathPart.replace(/^\./, "");
109682
+ const value = getNestedValue2(varValue, path19);
109683
109683
  const isHttpResponse = "status" in varValue && "body" in varValue;
109684
109684
  return {
109685
109685
  value,
109686
109686
  variableName: varName,
109687
- jsonPath: path18,
109687
+ jsonPath: path19,
109688
109688
  response: isHttpResponse ? varValue : void 0
109689
109689
  };
109690
109690
  }
109691
109691
  if (typeof varValue === "string") {
109692
109692
  try {
109693
109693
  const parsed = JSON.parse(varValue);
109694
- const path18 = pathPart.replace(/^\./, "");
109695
- const value = getNestedValue2(parsed, path18);
109696
- return { value, variableName: varName, jsonPath: path18 };
109694
+ const path19 = pathPart.replace(/^\./, "");
109695
+ const value = getNestedValue2(parsed, path19);
109696
+ return { value, variableName: varName, jsonPath: path19 };
109697
109697
  } catch {
109698
109698
  return { value: void 0, error: `Cannot access path on non-object variable: ${varName}` };
109699
109699
  }
@@ -109722,14 +109722,14 @@ function resolveValue(expr, responses, variables, getValueByPath2, responseIndex
109722
109722
  const varValue = variables[varName];
109723
109723
  if (pathPart) {
109724
109724
  if (typeof varValue === "object" && varValue !== null) {
109725
- const path18 = pathPart.replace(/^\./, "");
109726
- return { value: getNestedValue2(varValue, path18) };
109725
+ const path19 = pathPart.replace(/^\./, "");
109726
+ return { value: getNestedValue2(varValue, path19) };
109727
109727
  }
109728
109728
  if (typeof varValue === "string") {
109729
109729
  try {
109730
109730
  const parsed = JSON.parse(varValue);
109731
- const path18 = pathPart.replace(/^\./, "");
109732
- return { value: getNestedValue2(parsed, path18) };
109731
+ const path19 = pathPart.replace(/^\./, "");
109732
+ return { value: getNestedValue2(parsed, path19) };
109733
109733
  } catch {
109734
109734
  return { value: void 0, error: `Cannot access path on non-object variable: ${varName}` };
109735
109735
  }
@@ -109766,8 +109766,8 @@ function resolveValue(expr, responses, variables, getValueByPath2, responseIndex
109766
109766
  }
109767
109767
  return { value: void 0, error: `Cannot resolve expression: ${trimmed}` };
109768
109768
  }
109769
- function getNestedValue2(obj, path18) {
109770
- return getNestedPathValue(obj, path18);
109769
+ function getNestedValue2(obj, path19) {
109770
+ return getNestedPathValue(obj, path19);
109771
109771
  }
109772
109772
  function areValuesEqual(leftValue, rightValue) {
109773
109773
  if (leftValue === rightValue) {
@@ -110058,11 +110058,11 @@ function readJsonFile(filePath, workingDir) {
110058
110058
  };
110059
110059
  }
110060
110060
  }
110061
- function setNestedValue(obj, path18, value) {
110062
- if (!path18 || obj === null || obj === void 0 || typeof obj !== "object") {
110061
+ function setNestedValue(obj, path19, value) {
110062
+ if (!path19 || obj === null || obj === void 0 || typeof obj !== "object") {
110063
110063
  return false;
110064
110064
  }
110065
- const parts = path18.replace(/\[(\d+)\]/g, ".$1").split(".").filter((p) => p !== "");
110065
+ const parts = path19.replace(/\[(\d+)\]/g, ".$1").split(".").filter((p) => p !== "");
110066
110066
  if (parts.length === 0) {
110067
110067
  return false;
110068
110068
  }
@@ -110333,12 +110333,99 @@ function validatePreparedRequest(parsed, context) {
110333
110333
  }
110334
110334
 
110335
110335
  // src/sqlConfig.ts
110336
- var fs9 = __toESM(require("fs"));
110337
- var path7 = __toESM(require("path"));
110336
+ var path8 = __toESM(require("path"));
110337
+
110338
+ // src/nornConfig.ts
110339
+ var fs3 = __toESM(require("fs"));
110340
+ var path5 = __toESM(require("path"));
110341
+ var NORN_CONFIG_FILENAME = "norn.config.json";
110342
+ function getSearchDirectory(startPath) {
110343
+ if (!startPath) {
110344
+ return process.cwd();
110345
+ }
110346
+ const absolute = path5.resolve(startPath);
110347
+ try {
110348
+ const stats = fs3.statSync(absolute);
110349
+ return stats.isDirectory() ? absolute : path5.dirname(absolute);
110350
+ } catch {
110351
+ return path5.extname(absolute) ? path5.dirname(absolute) : absolute;
110352
+ }
110353
+ }
110354
+ function findNearestConfigFile(startPath, fileName) {
110355
+ let currentDir = getSearchDirectory(startPath);
110356
+ while (true) {
110357
+ const candidate = path5.join(currentDir, fileName);
110358
+ if (fs3.existsSync(candidate)) {
110359
+ return candidate;
110360
+ }
110361
+ const parentDir = path5.dirname(currentDir);
110362
+ if (parentDir === currentDir) {
110363
+ return void 0;
110364
+ }
110365
+ currentDir = parentDir;
110366
+ }
110367
+ }
110368
+ function parseJsonFile(filePath, validator, label) {
110369
+ let raw;
110370
+ try {
110371
+ raw = fs3.readFileSync(filePath, "utf-8");
110372
+ } catch (error2) {
110373
+ throw new Error(`Failed to read ${label}: ${error2 instanceof Error ? error2.message : String(error2)}`);
110374
+ }
110375
+ let parsed;
110376
+ try {
110377
+ parsed = JSON.parse(raw);
110378
+ } catch (error2) {
110379
+ throw new Error(`Invalid JSON in ${label}: ${error2 instanceof Error ? error2.message : String(error2)}`);
110380
+ }
110381
+ if (!validator(parsed)) {
110382
+ throw new Error(`Invalid ${label} structure`);
110383
+ }
110384
+ return parsed;
110385
+ }
110386
+ function isObjectRecord(value) {
110387
+ return !!value && typeof value === "object" && !Array.isArray(value);
110388
+ }
110389
+ function isStringRecord(value) {
110390
+ return isObjectRecord(value) && Object.values(value).every((entry) => typeof entry === "string");
110391
+ }
110392
+ function isKnownSection(value) {
110393
+ return value === void 0 || isObjectRecord(value);
110394
+ }
110395
+ function isNornProjectConfig(value) {
110396
+ if (!isObjectRecord(value)) {
110397
+ return false;
110398
+ }
110399
+ if (value.version !== 1) {
110400
+ return false;
110401
+ }
110402
+ return isKnownSection(value.sql) && isKnownSection(value.mcp);
110403
+ }
110404
+ function loadNornConfig(startPath) {
110405
+ const filePath = findNearestConfigFile(startPath, NORN_CONFIG_FILENAME);
110406
+ if (!filePath) {
110407
+ throw new Error(`Could not find ${NORN_CONFIG_FILENAME}`);
110408
+ }
110409
+ return {
110410
+ filePath,
110411
+ config: parseJsonFile(filePath, isNornProjectConfig, NORN_CONFIG_FILENAME)
110412
+ };
110413
+ }
110414
+ function loadNornConfigSection(startPath, sectionName, validator) {
110415
+ const { filePath, config: config2 } = loadNornConfig(startPath);
110416
+ const section = config2[sectionName];
110417
+ if (section === void 0) {
110418
+ throw new Error(`Could not find ${sectionName} section in ${NORN_CONFIG_FILENAME}`);
110419
+ }
110420
+ if (!validator(section)) {
110421
+ throw new Error(`Invalid ${sectionName} section in ${NORN_CONFIG_FILENAME}`);
110422
+ }
110423
+ return { filePath, section };
110424
+ }
110338
110425
 
110339
110426
  // src/sqlBuiltInAdapters.ts
110340
- var fs8 = __toESM(require("fs"));
110341
- var path6 = __toESM(require("path"));
110427
+ var fs9 = __toESM(require("fs"));
110428
+ var path7 = __toESM(require("path"));
110342
110429
  var import_child_process2 = require("child_process");
110343
110430
 
110344
110431
  // node_modules/pg/esm/index.mjs
@@ -110406,12 +110493,12 @@ function buildMissingConnectionError(adapterLabel, profile) {
110406
110493
  return `Missing required ${adapterLabel} connection string. Expected 'connectionString ${profile} = ...' in .nornenv.`;
110407
110494
  }
110408
110495
  function getBundledSqlClientDirectory() {
110409
- return path6.resolve(__dirname, "..", "vendor", "microsoft.data.sqlclient", "windows-netfx");
110496
+ return path7.resolve(__dirname, "..", "vendor", "microsoft.data.sqlclient", "windows-netfx");
110410
110497
  }
110411
110498
  function ensureBundledSqlClientDirectory() {
110412
110499
  const sqlClientDir = getBundledSqlClientDirectory();
110413
- const mainAssemblyPath = path6.join(sqlClientDir, "Microsoft.Data.SqlClient.dll");
110414
- if (!fs8.existsSync(mainAssemblyPath)) {
110500
+ const mainAssemblyPath = path7.join(sqlClientDir, "Microsoft.Data.SqlClient.dll");
110501
+ if (!fs9.existsSync(mainAssemblyPath)) {
110415
110502
  fail(`Missing bundled Microsoft.Data.SqlClient runtime at '${mainAssemblyPath}'.`);
110416
110503
  }
110417
110504
  return sqlClientDir;
@@ -110673,7 +110760,7 @@ finally {
110673
110760
  const payload = JSON.stringify(request);
110674
110761
  const command = getIntegratedPowerShellCommand();
110675
110762
  const commandArgs = ["-NoProfile", "-NonInteractive", "-ExecutionPolicy", "Bypass", "-OutputFormat", "Text", "-EncodedCommand", encodePowerShellCommand(script)];
110676
- return new Promise((resolve15, reject) => {
110763
+ return new Promise((resolve16, reject) => {
110677
110764
  const child = (0, import_child_process2.spawn)(command, commandArgs, {
110678
110765
  cwd: request.context?.workingDir || process.cwd(),
110679
110766
  shell: false,
@@ -110700,7 +110787,7 @@ finally {
110700
110787
  }
110701
110788
  try {
110702
110789
  const parsed = JSON.parse(stdout.trim());
110703
- resolve15(parsed);
110790
+ resolve16(parsed);
110704
110791
  } catch (error2) {
110705
110792
  reject(new Error(`Invalid PowerShell SQL adapter response: ${error2 instanceof Error ? error2.message : String(error2)}`));
110706
110793
  }
@@ -110820,7 +110907,7 @@ async function runBuiltInSqlServerAdapter(request) {
110820
110907
  fail(buildMissingConnectionError("SQL Server", request.connection.profile));
110821
110908
  }
110822
110909
  if (usesWindowsIntegratedSqlServerAuth(connectionString)) {
110823
- fail("This SQL Server connection string uses Windows/Integrated authentication. Use adapter 'sqlserver-windows' in norn.sql.json.");
110910
+ fail("This SQL Server connection string uses Windows/Integrated authentication. Use adapter 'sqlserver-windows' in norn.config.json sql.connections.");
110824
110911
  }
110825
110912
  const pool = new mssql.ConnectionPool(connectionString);
110826
110913
  try {
@@ -110894,122 +110981,70 @@ async function runBuiltInSqlAdapter(adapterId, request) {
110894
110981
  }
110895
110982
 
110896
110983
  // src/sqlConfig.ts
110897
- var NORN_SQL_CONFIG_FILENAME = "norn.sql.json";
110898
- var NORN_SQL_ADAPTERS_FILENAME = "norn.adapters.json";
110899
- function getSearchDirectory(startPath) {
110900
- if (!startPath) {
110901
- return process.cwd();
110902
- }
110903
- const absolute = path7.resolve(startPath);
110904
- try {
110905
- const stats = fs9.statSync(absolute);
110906
- return stats.isDirectory() ? absolute : path7.dirname(absolute);
110907
- } catch {
110908
- return path7.extname(absolute) ? path7.dirname(absolute) : absolute;
110909
- }
110910
- }
110911
- function findNearestConfigFile(startPath, fileName) {
110912
- let currentDir = getSearchDirectory(startPath);
110913
- while (true) {
110914
- const candidate = path7.join(currentDir, fileName);
110915
- if (fs9.existsSync(candidate)) {
110916
- return candidate;
110917
- }
110918
- const parentDir = path7.dirname(currentDir);
110919
- if (parentDir === currentDir) {
110920
- return void 0;
110921
- }
110922
- currentDir = parentDir;
110923
- }
110924
- }
110925
- function parseJsonFile(filePath, validator, label) {
110926
- let raw;
110927
- try {
110928
- raw = fs9.readFileSync(filePath, "utf-8");
110929
- } catch (error2) {
110930
- throw new Error(`Failed to read ${label}: ${error2 instanceof Error ? error2.message : String(error2)}`);
110931
- }
110932
- let parsed;
110933
- try {
110934
- parsed = JSON.parse(raw);
110935
- } catch (error2) {
110936
- throw new Error(`Invalid JSON in ${label}: ${error2 instanceof Error ? error2.message : String(error2)}`);
110937
- }
110938
- if (!validator(parsed)) {
110939
- throw new Error(`Invalid ${label} structure`);
110940
- }
110941
- return parsed;
110942
- }
110943
- function isStringRecord(value) {
110944
- if (!value || typeof value !== "object" || Array.isArray(value)) {
110945
- return false;
110946
- }
110947
- return Object.values(value).every((entry) => typeof entry === "string");
110984
+ function isConnectionsConfig(value) {
110985
+ return isObjectRecord(value) && Object.values(value).every(
110986
+ (connection) => isStringRecord(connection) && typeof connection.adapter === "string" && typeof connection.profile === "string"
110987
+ );
110948
110988
  }
110949
- function isProjectConfig(value) {
110950
- if (!value || typeof value !== "object" || Array.isArray(value)) {
110951
- return false;
110952
- }
110953
- const candidate = value;
110954
- if (candidate.version !== 1) {
110955
- return false;
110956
- }
110957
- const connections = candidate.connections;
110958
- if (!connections || typeof connections !== "object" || Array.isArray(connections)) {
110959
- return false;
110960
- }
110961
- return Object.values(connections).every((connection) => {
110962
- if (!connection || typeof connection !== "object" || Array.isArray(connection)) {
110989
+ function isAdaptersConfig(value) {
110990
+ return isObjectRecord(value) && Object.values(value).every((adapter2) => {
110991
+ if (!isObjectRecord(adapter2)) {
110963
110992
  return false;
110964
110993
  }
110965
- return isStringRecord(connection) && typeof connection.adapter === "string" && typeof connection.profile === "string";
110994
+ const command = adapter2.command;
110995
+ return Array.isArray(command) && command.length > 0 && command.every((part) => typeof part === "string" && part.length > 0);
110966
110996
  });
110967
110997
  }
110968
- function isAdaptersConfig(value) {
110969
- if (!value || typeof value !== "object" || Array.isArray(value)) {
110998
+ function isSqlConfigSection(value) {
110999
+ if (!isObjectRecord(value)) {
110970
111000
  return false;
110971
111001
  }
110972
- const candidate = value;
110973
- if (candidate.version !== 1) {
111002
+ if (value.connections !== void 0 && !isConnectionsConfig(value.connections)) {
110974
111003
  return false;
110975
111004
  }
110976
- const adapters = candidate.adapters;
110977
- if (!adapters || typeof adapters !== "object" || Array.isArray(adapters)) {
111005
+ if (value.adapters !== void 0 && !isAdaptersConfig(value.adapters)) {
110978
111006
  return false;
110979
111007
  }
110980
- return Object.values(adapters).every((adapter2) => {
110981
- if (!adapter2 || typeof adapter2 !== "object" || Array.isArray(adapter2)) {
110982
- return false;
110983
- }
110984
- const command = adapter2.command;
110985
- return Array.isArray(command) && command.length > 0 && command.every((part) => typeof part === "string" && part.length > 0);
110986
- });
111008
+ return true;
111009
+ }
111010
+ function loadSqlConfigSection(startPath) {
111011
+ const { filePath, section } = loadNornConfigSection(startPath, "sql", isSqlConfigSection);
111012
+ return {
111013
+ filePath,
111014
+ config: section
111015
+ };
110987
111016
  }
110988
111017
  function loadNornSqlProjectConfig(startPath) {
110989
- const filePath = findNearestConfigFile(startPath, NORN_SQL_CONFIG_FILENAME);
110990
- if (!filePath) {
110991
- throw new Error(`Could not find ${NORN_SQL_CONFIG_FILENAME}`);
111018
+ const { filePath, config: config2 } = loadSqlConfigSection(startPath);
111019
+ if (!config2.connections) {
111020
+ throw new Error(`Could not find sql.connections in ${NORN_CONFIG_FILENAME}`);
110992
111021
  }
110993
111022
  return {
110994
111023
  filePath,
110995
- config: parseJsonFile(filePath, isProjectConfig, NORN_SQL_CONFIG_FILENAME)
111024
+ config: {
111025
+ version: 1,
111026
+ connections: config2.connections
111027
+ }
110996
111028
  };
110997
111029
  }
110998
111030
  function loadNornSqlAdaptersConfig(startPath) {
110999
- const filePath = findNearestConfigFile(startPath, NORN_SQL_ADAPTERS_FILENAME);
111000
- if (!filePath) {
111001
- throw new Error(`Could not find ${NORN_SQL_ADAPTERS_FILENAME}`);
111031
+ const { filePath, config: config2 } = loadSqlConfigSection(startPath);
111032
+ if (!config2.adapters) {
111033
+ throw new Error(`Could not find sql.adapters in ${NORN_CONFIG_FILENAME}`);
111002
111034
  }
111003
111035
  return {
111004
111036
  filePath,
111005
- config: parseJsonFile(filePath, isAdaptersConfig, NORN_SQL_ADAPTERS_FILENAME)
111037
+ config: {
111038
+ version: 1,
111039
+ adapters: config2.adapters
111040
+ }
111006
111041
  };
111007
111042
  }
111008
111043
  function resolveSqlConnection(startPath, alias) {
111009
111044
  const { filePath, config: config2 } = loadNornSqlProjectConfig(startPath);
111010
111045
  const connection = config2.connections[alias];
111011
111046
  if (!connection) {
111012
- throw new Error(`Connection alias '${alias}' was not found in ${NORN_SQL_CONFIG_FILENAME}`);
111047
+ throw new Error(`Connection alias '${alias}' was not found in ${NORN_CONFIG_FILENAME} sql.connections`);
111013
111048
  }
111014
111049
  return {
111015
111050
  alias,
@@ -111019,19 +111054,19 @@ function resolveSqlConnection(startPath, alias) {
111019
111054
  };
111020
111055
  }
111021
111056
  function resolveCommandParts(configPath, command) {
111022
- const configDir = path7.dirname(configPath);
111057
+ const configDir = path8.dirname(configPath);
111023
111058
  return command.map((part, index) => {
111024
111059
  if (!part) {
111025
111060
  return part;
111026
111061
  }
111027
111062
  if (index === 0) {
111028
- if (path7.isAbsolute(part) || !part.startsWith(".") && !part.includes(path7.sep) && !part.includes("/")) {
111063
+ if (path8.isAbsolute(part) || !part.startsWith(".") && !part.includes(path8.sep) && !part.includes("/")) {
111029
111064
  return part;
111030
111065
  }
111031
- return path7.resolve(configDir, part);
111066
+ return path8.resolve(configDir, part);
111032
111067
  }
111033
111068
  if (part.startsWith(".")) {
111034
- return path7.resolve(configDir, part);
111069
+ return path8.resolve(configDir, part);
111035
111070
  }
111036
111071
  return part;
111037
111072
  });
@@ -111040,7 +111075,7 @@ function resolveSqlAdapterCommand(startPath, adapterId) {
111040
111075
  const { filePath, config: config2 } = loadNornSqlAdaptersConfig(startPath);
111041
111076
  const adapter2 = config2.adapters[adapterId];
111042
111077
  if (!adapter2) {
111043
- throw new Error(`Adapter '${adapterId}' was not found in ${NORN_SQL_ADAPTERS_FILENAME}`);
111078
+ throw new Error(`Adapter '${adapterId}' was not found in ${NORN_CONFIG_FILENAME} sql.adapters`);
111044
111079
  }
111045
111080
  return {
111046
111081
  adapterId,
@@ -111104,7 +111139,7 @@ async function runExternalSqlAdapter(command, request, workingDir) {
111104
111139
  if (!command.length) {
111105
111140
  throw new Error("SQL adapter command is empty");
111106
111141
  }
111107
- return new Promise((resolve15, reject) => {
111142
+ return new Promise((resolve16, reject) => {
111108
111143
  const child = (0, import_child_process3.spawn)(command[0], command.slice(1), {
111109
111144
  cwd: workingDir,
111110
111145
  env: process.env,
@@ -111125,7 +111160,7 @@ async function runExternalSqlAdapter(command, request, workingDir) {
111125
111160
  return;
111126
111161
  }
111127
111162
  settled = true;
111128
- resolve15(response);
111163
+ resolve16(response);
111129
111164
  };
111130
111165
  child.stdout.on("data", (chunk) => {
111131
111166
  stdout += chunk.toString();
@@ -111190,8 +111225,8 @@ async function runSqlAdapter(target, request, workingDir) {
111190
111225
  }
111191
111226
 
111192
111227
  // src/mcpClient.ts
111193
- var fs12 = __toESM(require("fs"));
111194
- var path11 = __toESM(require("path"));
111228
+ var fs11 = __toESM(require("fs"));
111229
+ var path12 = __toESM(require("path"));
111195
111230
 
111196
111231
  // node_modules/zod/v3/helpers/util.js
111197
111232
  var util3;
@@ -111552,8 +111587,8 @@ function getErrorMap() {
111552
111587
 
111553
111588
  // node_modules/zod/v3/helpers/parseUtil.js
111554
111589
  var makeIssue = (params) => {
111555
- const { data, path: path18, errorMaps, issueData } = params;
111556
- const fullPath = [...path18, ...issueData.path || []];
111590
+ const { data, path: path19, errorMaps, issueData } = params;
111591
+ const fullPath = [...path19, ...issueData.path || []];
111557
111592
  const fullIssue = {
111558
111593
  ...issueData,
111559
111594
  path: fullPath
@@ -111668,11 +111703,11 @@ var errorUtil;
111668
111703
 
111669
111704
  // node_modules/zod/v3/types.js
111670
111705
  var ParseInputLazyPath = class {
111671
- constructor(parent, value, path18, key) {
111706
+ constructor(parent, value, path19, key) {
111672
111707
  this._cachedPath = [];
111673
111708
  this.parent = parent;
111674
111709
  this.data = value;
111675
- this._path = path18;
111710
+ this._path = path19;
111676
111711
  this._key = key;
111677
111712
  }
111678
111713
  get path() {
@@ -115316,10 +115351,10 @@ function mergeDefs(...defs) {
115316
115351
  function cloneDef(schema) {
115317
115352
  return mergeDefs(schema._zod.def);
115318
115353
  }
115319
- function getElementAtPath(obj, path18) {
115320
- if (!path18)
115354
+ function getElementAtPath(obj, path19) {
115355
+ if (!path19)
115321
115356
  return obj;
115322
- return path18.reduce((acc, key) => acc?.[key], obj);
115357
+ return path19.reduce((acc, key) => acc?.[key], obj);
115323
115358
  }
115324
115359
  function promiseAllObject(promisesObj) {
115325
115360
  const keys = Object.keys(promisesObj);
@@ -115702,11 +115737,11 @@ function aborted(x, startIndex = 0) {
115702
115737
  }
115703
115738
  return false;
115704
115739
  }
115705
- function prefixIssues(path18, issues) {
115740
+ function prefixIssues(path19, issues) {
115706
115741
  return issues.map((iss) => {
115707
115742
  var _a2;
115708
115743
  (_a2 = iss).path ?? (_a2.path = []);
115709
- iss.path.unshift(path18);
115744
+ iss.path.unshift(path19);
115710
115745
  return iss;
115711
115746
  });
115712
115747
  }
@@ -124059,7 +124094,7 @@ var Protocol = class {
124059
124094
  return;
124060
124095
  }
124061
124096
  const pollInterval = task2.pollInterval ?? this._options?.defaultTaskPollInterval ?? 1e3;
124062
- await new Promise((resolve15) => setTimeout(resolve15, pollInterval));
124097
+ await new Promise((resolve16) => setTimeout(resolve16, pollInterval));
124063
124098
  options?.signal?.throwIfAborted();
124064
124099
  }
124065
124100
  } catch (error2) {
@@ -124076,7 +124111,7 @@ var Protocol = class {
124076
124111
  */
124077
124112
  request(request, resultSchema, options) {
124078
124113
  const { relatedRequestId, resumptionToken, onresumptiontoken, task, relatedTask } = options ?? {};
124079
- return new Promise((resolve15, reject) => {
124114
+ return new Promise((resolve16, reject) => {
124080
124115
  const earlyReject = (error2) => {
124081
124116
  reject(error2);
124082
124117
  };
@@ -124154,7 +124189,7 @@ var Protocol = class {
124154
124189
  if (!parseResult.success) {
124155
124190
  reject(parseResult.error);
124156
124191
  } else {
124157
- resolve15(parseResult.data);
124192
+ resolve16(parseResult.data);
124158
124193
  }
124159
124194
  } catch (error2) {
124160
124195
  reject(error2);
@@ -124415,12 +124450,12 @@ var Protocol = class {
124415
124450
  }
124416
124451
  } catch {
124417
124452
  }
124418
- return new Promise((resolve15, reject) => {
124453
+ return new Promise((resolve16, reject) => {
124419
124454
  if (signal.aborted) {
124420
124455
  reject(new McpError(ErrorCode.InvalidRequest, "Request cancelled"));
124421
124456
  return;
124422
124457
  }
124423
- const timeoutId = setTimeout(resolve15, interval);
124458
+ const timeoutId = setTimeout(resolve16, interval);
124424
124459
  signal.addEventListener("abort", () => {
124425
124460
  clearTimeout(timeoutId);
124426
124461
  reject(new McpError(ErrorCode.InvalidRequest, "Request cancelled"));
@@ -125371,7 +125406,7 @@ var StdioClientTransport = class {
125371
125406
  if (this._process) {
125372
125407
  throw new Error("StdioClientTransport already started! If using Client class, note that connect() calls start() automatically.");
125373
125408
  }
125374
- return new Promise((resolve15, reject) => {
125409
+ return new Promise((resolve16, reject) => {
125375
125410
  this._process = (0, import_cross_spawn.default)(this._serverParams.command, this._serverParams.args ?? [], {
125376
125411
  // merge default env with server env because mcp server needs some env vars
125377
125412
  env: {
@@ -125388,7 +125423,7 @@ var StdioClientTransport = class {
125388
125423
  this.onerror?.(error2);
125389
125424
  });
125390
125425
  this._process.on("spawn", () => {
125391
- resolve15();
125426
+ resolve16();
125392
125427
  });
125393
125428
  this._process.on("close", (_code) => {
125394
125429
  this._process = void 0;
@@ -125447,22 +125482,22 @@ var StdioClientTransport = class {
125447
125482
  if (this._process) {
125448
125483
  const processToClose = this._process;
125449
125484
  this._process = void 0;
125450
- const closePromise = new Promise((resolve15) => {
125485
+ const closePromise = new Promise((resolve16) => {
125451
125486
  processToClose.once("close", () => {
125452
- resolve15();
125487
+ resolve16();
125453
125488
  });
125454
125489
  });
125455
125490
  try {
125456
125491
  processToClose.stdin?.end();
125457
125492
  } catch {
125458
125493
  }
125459
- await Promise.race([closePromise, new Promise((resolve15) => setTimeout(resolve15, 2e3).unref())]);
125494
+ await Promise.race([closePromise, new Promise((resolve16) => setTimeout(resolve16, 2e3).unref())]);
125460
125495
  if (processToClose.exitCode === null) {
125461
125496
  try {
125462
125497
  processToClose.kill("SIGTERM");
125463
125498
  } catch {
125464
125499
  }
125465
- await Promise.race([closePromise, new Promise((resolve15) => setTimeout(resolve15, 2e3).unref())]);
125500
+ await Promise.race([closePromise, new Promise((resolve16) => setTimeout(resolve16, 2e3).unref())]);
125466
125501
  }
125467
125502
  if (processToClose.exitCode === null) {
125468
125503
  try {
@@ -125474,15 +125509,15 @@ var StdioClientTransport = class {
125474
125509
  this._readBuffer.clear();
125475
125510
  }
125476
125511
  send(message) {
125477
- return new Promise((resolve15) => {
125512
+ return new Promise((resolve16) => {
125478
125513
  if (!this._process?.stdin) {
125479
125514
  throw new Error("Not connected");
125480
125515
  }
125481
125516
  const json2 = serializeMessage(message);
125482
125517
  if (this._process.stdin.write(json2)) {
125483
- resolve15();
125518
+ resolve16();
125484
125519
  } else {
125485
- this._process.stdin.once("drain", resolve15);
125520
+ this._process.stdin.once("drain", resolve16);
125486
125521
  }
125487
125522
  });
125488
125523
  }
@@ -126936,80 +126971,48 @@ var StreamableHTTPClientTransport = class {
126936
126971
  };
126937
126972
 
126938
126973
  // src/mcpConfig.ts
126939
- var fs10 = __toESM(require("fs"));
126940
- var path8 = __toESM(require("path"));
126941
- var NORN_MCP_CONFIG_FILENAME = "norn.mcp.json";
126942
- function parseJsonFile2(filePath, validator, label) {
126943
- let raw;
126944
- try {
126945
- raw = fs10.readFileSync(filePath, "utf-8");
126946
- } catch (error2) {
126947
- throw new Error(`Failed to read ${label}: ${error2 instanceof Error ? error2.message : String(error2)}`);
126948
- }
126949
- let parsed;
126950
- try {
126951
- parsed = JSON.parse(raw);
126952
- } catch (error2) {
126953
- throw new Error(`Invalid JSON in ${label}: ${error2 instanceof Error ? error2.message : String(error2)}`);
126954
- }
126955
- if (!validator(parsed)) {
126956
- throw new Error(`Invalid ${label} structure`);
126957
- }
126958
- return parsed;
126959
- }
126960
- function isStringRecord2(value) {
126961
- if (!value || typeof value !== "object" || Array.isArray(value)) {
126962
- return false;
126963
- }
126964
- return Object.values(value).every((entry) => typeof entry === "string");
126965
- }
126974
+ var path9 = __toESM(require("path"));
126966
126975
  function isRawMcpStdioServerConfig(value) {
126967
- if (!value || typeof value !== "object" || Array.isArray(value)) {
126976
+ if (!isObjectRecord(value)) {
126968
126977
  return false;
126969
126978
  }
126970
- const candidate = value;
126971
- if (candidate.transport !== "stdio") {
126979
+ if (value.transport !== "stdio") {
126972
126980
  return false;
126973
126981
  }
126974
- if (!Array.isArray(candidate.command) || candidate.command.length === 0) {
126982
+ if (!Array.isArray(value.command) || value.command.length === 0) {
126975
126983
  return false;
126976
126984
  }
126977
- if (!candidate.command.every((part) => typeof part === "string" && part.length > 0)) {
126985
+ if (!value.command.every((part) => typeof part === "string" && part.length > 0)) {
126978
126986
  return false;
126979
126987
  }
126980
- if (candidate.cwd !== void 0 && typeof candidate.cwd !== "string") {
126988
+ if (value.cwd !== void 0 && typeof value.cwd !== "string") {
126981
126989
  return false;
126982
126990
  }
126983
126991
  return true;
126984
126992
  }
126985
126993
  function isRawMcpHttpServerConfig(value) {
126986
- if (!value || typeof value !== "object" || Array.isArray(value)) {
126994
+ if (!isObjectRecord(value)) {
126987
126995
  return false;
126988
126996
  }
126989
- const candidate = value;
126990
- if (candidate.transport !== "http") {
126997
+ if (value.transport !== "http") {
126991
126998
  return false;
126992
126999
  }
126993
- if (typeof candidate.url !== "string" || candidate.url.length === 0) {
127000
+ if (typeof value.url !== "string" || value.url.length === 0) {
126994
127001
  return false;
126995
127002
  }
126996
- if (candidate.headers !== void 0 && !isStringRecord2(candidate.headers)) {
127003
+ if (value.headers !== void 0 && !isStringRecord(value.headers)) {
126997
127004
  return false;
126998
127005
  }
126999
- if (candidate.timeoutMs !== void 0 && (typeof candidate.timeoutMs !== "number" || !Number.isFinite(candidate.timeoutMs) || candidate.timeoutMs <= 0)) {
127006
+ if (value.timeoutMs !== void 0 && (typeof value.timeoutMs !== "number" || !Number.isFinite(value.timeoutMs) || value.timeoutMs <= 0)) {
127000
127007
  return false;
127001
127008
  }
127002
127009
  return true;
127003
127010
  }
127004
127011
  function isNornMcpProjectConfig(value) {
127005
- if (!value || typeof value !== "object" || Array.isArray(value)) {
127006
- return false;
127007
- }
127008
- const candidate = value;
127009
- if (candidate.version !== 1) {
127012
+ if (!isObjectRecord(value)) {
127010
127013
  return false;
127011
127014
  }
127012
- const servers = candidate.servers;
127015
+ const servers = value.servers;
127013
127016
  if (!servers || typeof servers !== "object" || Array.isArray(servers)) {
127014
127017
  return false;
127015
127018
  }
@@ -127023,20 +127026,20 @@ function resolveTemplateString(value, envVariables) {
127023
127026
  return substituteVariables(value, scopedVariables);
127024
127027
  }
127025
127028
  function resolveCommandParts2(configPath, command, envVariables) {
127026
- const configDir = path8.dirname(configPath);
127029
+ const configDir = path9.dirname(configPath);
127027
127030
  return command.map((part, index) => {
127028
127031
  const resolvedPart = resolveTemplateString(part, envVariables);
127029
127032
  if (!resolvedPart) {
127030
127033
  return resolvedPart;
127031
127034
  }
127032
127035
  if (index === 0) {
127033
- if (path8.isAbsolute(resolvedPart) || !resolvedPart.startsWith(".") && !resolvedPart.includes(path8.sep) && !resolvedPart.includes("/")) {
127036
+ if (path9.isAbsolute(resolvedPart) || !resolvedPart.startsWith(".") && !resolvedPart.includes(path9.sep) && !resolvedPart.includes("/")) {
127034
127037
  return resolvedPart;
127035
127038
  }
127036
- return path8.resolve(configDir, resolvedPart);
127039
+ return path9.resolve(configDir, resolvedPart);
127037
127040
  }
127038
127041
  if (resolvedPart.startsWith(".")) {
127039
- return path8.resolve(configDir, resolvedPart);
127042
+ return path9.resolve(configDir, resolvedPart);
127040
127043
  }
127041
127044
  return resolvedPart;
127042
127045
  });
@@ -127049,10 +127052,10 @@ function resolveRelativeDirectory(configPath, value, envVariables) {
127049
127052
  if (!resolvedValue) {
127050
127053
  return resolvedValue;
127051
127054
  }
127052
- if (path8.isAbsolute(resolvedValue)) {
127055
+ if (path9.isAbsolute(resolvedValue)) {
127053
127056
  return resolvedValue;
127054
127057
  }
127055
- return path8.resolve(path8.dirname(configPath), resolvedValue);
127058
+ return path9.resolve(path9.dirname(configPath), resolvedValue);
127056
127059
  }
127057
127060
  function resolveHeaders(headers, envVariables) {
127058
127061
  if (!headers) {
@@ -127080,13 +127083,13 @@ function resolveServerConfig(filePath, config2, envVariables) {
127080
127083
  };
127081
127084
  }
127082
127085
  function loadNornMcpProjectConfig(startPath) {
127083
- const filePath = findNearestConfigFile(startPath, NORN_MCP_CONFIG_FILENAME);
127084
- if (!filePath) {
127085
- throw new Error(`Could not find ${NORN_MCP_CONFIG_FILENAME}`);
127086
- }
127086
+ const { filePath, section } = loadNornConfigSection(startPath, "mcp", isNornMcpProjectConfig);
127087
127087
  return {
127088
127088
  filePath,
127089
- config: parseJsonFile2(filePath, isNornMcpProjectConfig, NORN_MCP_CONFIG_FILENAME)
127089
+ config: {
127090
+ ...section,
127091
+ version: 1
127092
+ }
127090
127093
  };
127091
127094
  }
127092
127095
  function loadResolvedNornMcpProjectConfig(startPath, envVariables) {
@@ -127107,38 +127110,38 @@ function resolveMcpServer(startPath, alias, envVariables) {
127107
127110
  const { filePath, config: config2 } = loadResolvedNornMcpProjectConfig(startPath, envVariables);
127108
127111
  const server = config2.servers[alias];
127109
127112
  if (!server) {
127110
- throw new Error(`Server alias '${alias}' was not found in ${NORN_MCP_CONFIG_FILENAME}`);
127113
+ throw new Error(`Server alias '${alias}' was not found in ${NORN_CONFIG_FILENAME} mcp.servers`);
127111
127114
  }
127112
127115
  return { filePath, server };
127113
127116
  }
127114
127117
 
127115
127118
  // src/mcpToolIntellisenseCache.ts
127116
- var path10 = __toESM(require("path"));
127119
+ var path11 = __toESM(require("path"));
127117
127120
 
127118
127121
  // src/cacheDir.ts
127119
- var fs11 = __toESM(require("fs"));
127120
- var path9 = __toESM(require("path"));
127122
+ var fs10 = __toESM(require("fs"));
127123
+ var path10 = __toESM(require("path"));
127121
127124
  var NORN_CACHE_DIR = ".norn-cache";
127122
127125
  var CACHE_GITIGNORE_FILE = ".gitignore";
127123
127126
  var CACHE_GITIGNORE_CONTENT = "*\n";
127124
127127
  var PROJECT_ROOT_MARKERS = [".git", "package.json", "pnpm-workspace.yaml", "package-lock.json", "yarn.lock", ".nornenv"];
127125
127128
  function getSearchStartDirectory(targetPath) {
127126
- const resolvedPath = path9.resolve(targetPath);
127129
+ const resolvedPath = path10.resolve(targetPath);
127127
127130
  try {
127128
- const stats = fs11.statSync(resolvedPath);
127129
- return stats.isDirectory() ? resolvedPath : path9.dirname(resolvedPath);
127131
+ const stats = fs10.statSync(resolvedPath);
127132
+ return stats.isDirectory() ? resolvedPath : path10.dirname(resolvedPath);
127130
127133
  } catch {
127131
- return path9.dirname(resolvedPath);
127134
+ return path10.dirname(resolvedPath);
127132
127135
  }
127133
127136
  }
127134
127137
  function findProjectRoot(targetPath) {
127135
127138
  let dir = getSearchStartDirectory(targetPath);
127136
127139
  let projectRoot;
127137
127140
  while (true) {
127138
- if (PROJECT_ROOT_MARKERS.some((marker) => fs11.existsSync(path9.join(dir, marker)))) {
127141
+ if (PROJECT_ROOT_MARKERS.some((marker) => fs10.existsSync(path10.join(dir, marker)))) {
127139
127142
  projectRoot = dir;
127140
127143
  }
127141
- const parent = path9.dirname(dir);
127144
+ const parent = path10.dirname(dir);
127142
127145
  if (parent === dir) {
127143
127146
  break;
127144
127147
  }
@@ -127147,21 +127150,21 @@ function findProjectRoot(targetPath) {
127147
127150
  return projectRoot ?? getSearchStartDirectory(targetPath);
127148
127151
  }
127149
127152
  function ensureNornCacheGitignore(cacheDir) {
127150
- const gitignorePath = path9.join(cacheDir, CACHE_GITIGNORE_FILE);
127153
+ const gitignorePath = path10.join(cacheDir, CACHE_GITIGNORE_FILE);
127151
127154
  try {
127152
- const hasDesiredContent = fs11.existsSync(gitignorePath) && fs11.readFileSync(gitignorePath, "utf8") === CACHE_GITIGNORE_CONTENT;
127155
+ const hasDesiredContent = fs10.existsSync(gitignorePath) && fs10.readFileSync(gitignorePath, "utf8") === CACHE_GITIGNORE_CONTENT;
127153
127156
  if (hasDesiredContent) {
127154
127157
  return;
127155
127158
  }
127156
- fs11.writeFileSync(gitignorePath, CACHE_GITIGNORE_CONTENT, "utf8");
127159
+ fs10.writeFileSync(gitignorePath, CACHE_GITIGNORE_CONTENT, "utf8");
127157
127160
  } catch {
127158
127161
  }
127159
127162
  }
127160
127163
  function ensureNornCacheDir(rootPath) {
127161
- const cacheDir = path9.join(rootPath, NORN_CACHE_DIR);
127164
+ const cacheDir = path10.join(rootPath, NORN_CACHE_DIR);
127162
127165
  try {
127163
- if (!fs11.existsSync(cacheDir)) {
127164
- fs11.mkdirSync(cacheDir, { recursive: true });
127166
+ if (!fs10.existsSync(cacheDir)) {
127167
+ fs10.mkdirSync(cacheDir, { recursive: true });
127165
127168
  }
127166
127169
  ensureNornCacheGitignore(cacheDir);
127167
127170
  return cacheDir;
@@ -127170,14 +127173,14 @@ function ensureNornCacheDir(rootPath) {
127170
127173
  }
127171
127174
  }
127172
127175
  function getNornCacheFilePath(rootPath, fileName) {
127173
- return path9.join(rootPath, NORN_CACHE_DIR, fileName);
127176
+ return path10.join(rootPath, NORN_CACHE_DIR, fileName);
127174
127177
  }
127175
127178
  function loadVersionedJsonCache(options) {
127176
- if (!options.cachePath || !fs11.existsSync(options.cachePath)) {
127179
+ if (!options.cachePath || !fs10.existsSync(options.cachePath)) {
127177
127180
  return options.createDefault();
127178
127181
  }
127179
127182
  try {
127180
- const content = fs11.readFileSync(options.cachePath, "utf-8");
127183
+ const content = fs10.readFileSync(options.cachePath, "utf-8");
127181
127184
  const parsed = JSON.parse(content);
127182
127185
  if (parsed.version !== options.version) {
127183
127186
  return options.createDefault();
@@ -127195,7 +127198,7 @@ function saveVersionedJsonCache(cachePath, cache, ensureDirectory) {
127195
127198
  return false;
127196
127199
  }
127197
127200
  try {
127198
- fs11.writeFileSync(cachePath, JSON.stringify(cache, null, 2), "utf-8");
127201
+ fs10.writeFileSync(cachePath, JSON.stringify(cache, null, 2), "utf-8");
127199
127202
  return true;
127200
127203
  } catch {
127201
127204
  return false;
@@ -127222,10 +127225,10 @@ function cloneSerializableValue(value) {
127222
127225
  var CACHE_VERSION = 1;
127223
127226
  var CACHE_FILE = "mcp-tool-intellisense.json";
127224
127227
  function getCachePathForConfig(configPath) {
127225
- return getNornCacheFilePath(path10.dirname(configPath), CACHE_FILE);
127228
+ return getNornCacheFilePath(path11.dirname(configPath), CACHE_FILE);
127226
127229
  }
127227
127230
  function ensureCacheDirForConfig(configPath) {
127228
- return !!ensureNornCacheDir(path10.dirname(configPath));
127231
+ return !!ensureNornCacheDir(path11.dirname(configPath));
127229
127232
  }
127230
127233
  function loadCacheForConfig(configPath) {
127231
127234
  return loadVersionedJsonCache({
@@ -127277,8 +127280,8 @@ var NornJsonSchemaValidator = class {
127277
127280
  };
127278
127281
  function getNornClientVersion() {
127279
127282
  try {
127280
- const packageJsonPath = path11.resolve(__dirname, "..", "package.json");
127281
- const packageJson = JSON.parse(fs12.readFileSync(packageJsonPath, "utf-8"));
127283
+ const packageJsonPath = path12.resolve(__dirname, "..", "package.json");
127284
+ const packageJson = JSON.parse(fs11.readFileSync(packageJsonPath, "utf-8"));
127282
127285
  return typeof packageJson.version === "string" ? packageJson.version : "0.0.0";
127283
127286
  } catch {
127284
127287
  return "0.0.0";
@@ -127572,6 +127575,144 @@ function prepareRequestFromContent(requestContent, variables, apiDefinitions) {
127572
127575
  };
127573
127576
  }
127574
127577
 
127578
+ // src/environmentTemplates.ts
127579
+ var TEMPLATE_TOKEN_REGEX = /\{\{([^{}]+)\}\}/g;
127580
+ var ENV_REFERENCE_REGEX = /^(?:\$env\.)?([a-zA-Z_][a-zA-Z0-9_]*)$/;
127581
+ var ENV_TEMPLATE_SCOPES_KEY = "$nornEnvTemplateScopes";
127582
+ function attachEnvironmentTemplateScopes(variables, commonVariables, environmentVariables) {
127583
+ Object.defineProperty(variables, ENV_TEMPLATE_SCOPES_KEY, {
127584
+ value: {
127585
+ commonNames: new Set(Object.keys(commonVariables)),
127586
+ environmentNames: new Set(Object.keys(environmentVariables ?? {}))
127587
+ },
127588
+ enumerable: false,
127589
+ configurable: true,
127590
+ writable: false
127591
+ });
127592
+ return variables;
127593
+ }
127594
+ function getEnvironmentTemplateScopes(variables) {
127595
+ const value = variables[ENV_TEMPLATE_SCOPES_KEY];
127596
+ if (!value || typeof value !== "object") {
127597
+ return void 0;
127598
+ }
127599
+ const candidate = value;
127600
+ if (!(candidate.commonNames instanceof Set) || !(candidate.environmentNames instanceof Set)) {
127601
+ return void 0;
127602
+ }
127603
+ return candidate;
127604
+ }
127605
+ function valueToTemplateString(value) {
127606
+ if (value === void 0 || value === null) {
127607
+ return "";
127608
+ }
127609
+ if (typeof value === "object") {
127610
+ return JSON.stringify(value);
127611
+ }
127612
+ return String(value);
127613
+ }
127614
+ function parseTemplateReference(rawReference) {
127615
+ const trimmed = rawReference.trim();
127616
+ const match = trimmed.match(ENV_REFERENCE_REGEX);
127617
+ return match?.[1];
127618
+ }
127619
+ function resolveEnvironmentTemplateValue(variableName, variables, secretNames = /* @__PURE__ */ new Set()) {
127620
+ const resolving = /* @__PURE__ */ new Set();
127621
+ const cache = /* @__PURE__ */ new Map();
127622
+ const scopes = getEnvironmentTemplateScopes(variables);
127623
+ const resolveVariable = (name) => {
127624
+ const cached2 = cache.get(name);
127625
+ if (cached2) {
127626
+ return cached2;
127627
+ }
127628
+ if (resolving.has(name)) {
127629
+ const cycle = [...resolving, name].join(" -> ");
127630
+ return {
127631
+ value: `{{${name}}}`,
127632
+ secret: secretNames.has(name),
127633
+ dependencies: /* @__PURE__ */ new Set([name]),
127634
+ errors: [{
127635
+ kind: "cycle",
127636
+ variableName: name,
127637
+ reference: name,
127638
+ message: `Circular .nornenv template reference detected: ${cycle}`
127639
+ }]
127640
+ };
127641
+ }
127642
+ if (!Object.prototype.hasOwnProperty.call(variables, name)) {
127643
+ return {
127644
+ value: `{{${name}}}`,
127645
+ secret: false,
127646
+ dependencies: /* @__PURE__ */ new Set([name]),
127647
+ errors: [{
127648
+ kind: "unresolved",
127649
+ variableName: name,
127650
+ reference: name,
127651
+ message: `.nornenv template reference '${name}' was not found in the active environment.`
127652
+ }]
127653
+ };
127654
+ }
127655
+ resolving.add(name);
127656
+ const rawValue = valueToTemplateString(variables[name]);
127657
+ const dependencies = /* @__PURE__ */ new Set();
127658
+ const errors = [];
127659
+ let secret = secretNames.has(name);
127660
+ const value = rawValue.replace(TEMPLATE_TOKEN_REGEX, (token, rawReference) => {
127661
+ const referenceName = parseTemplateReference(rawReference);
127662
+ if (!referenceName) {
127663
+ errors.push({
127664
+ kind: "unsupported",
127665
+ variableName: name,
127666
+ reference: rawReference.trim(),
127667
+ message: `.nornenv template reference '${rawReference.trim()}' is not supported. Use {{name}} or {{$env.name}}.`
127668
+ });
127669
+ return token;
127670
+ }
127671
+ const resolved = resolveVariable(referenceName);
127672
+ dependencies.add(referenceName);
127673
+ for (const dependency of resolved.dependencies) {
127674
+ dependencies.add(dependency);
127675
+ }
127676
+ if (scopes?.environmentNames.has(name) && scopes.environmentNames.has(referenceName)) {
127677
+ errors.push({
127678
+ kind: "scope",
127679
+ variableName: name,
127680
+ reference: referenceName,
127681
+ message: `.nornenv template reference '${referenceName}' is environment-specific. Values inside [env:...] sections can only reference common variables.`
127682
+ });
127683
+ }
127684
+ if (resolved.secret) {
127685
+ secret = true;
127686
+ }
127687
+ errors.push(...resolved.errors);
127688
+ return resolved.value;
127689
+ });
127690
+ resolving.delete(name);
127691
+ const resolution = {
127692
+ value,
127693
+ secret,
127694
+ dependencies,
127695
+ errors
127696
+ };
127697
+ cache.set(name, resolution);
127698
+ return resolution;
127699
+ };
127700
+ return resolveVariable(variableName);
127701
+ }
127702
+ function collectResolvedEnvironmentSecretValues(variables, secretNames) {
127703
+ const values = /* @__PURE__ */ new Map();
127704
+ for (const name of secretNames) {
127705
+ if (!Object.prototype.hasOwnProperty.call(variables, name)) {
127706
+ continue;
127707
+ }
127708
+ const resolved = resolveEnvironmentTemplateValue(name, variables, secretNames);
127709
+ if (resolved.errors.length === 0) {
127710
+ values.set(name, resolved.value);
127711
+ }
127712
+ }
127713
+ return values;
127714
+ }
127715
+
127575
127716
  // src/mcpToolSchema.ts
127576
127717
  function getInputSchemaObject(source) {
127577
127718
  if (!source.inputSchema || typeof source.inputSchema !== "object" || Array.isArray(source.inputSchema)) {
@@ -128136,8 +128277,8 @@ function parseJsonBackedValue(value) {
128136
128277
  return value;
128137
128278
  }
128138
128279
  }
128139
- function getVariableValueByPath(path18, variables) {
128140
- const parts = getPathSegments(path18);
128280
+ function getVariableValueByPath(path19, variables) {
128281
+ const parts = getPathSegments(path19);
128141
128282
  let current = variables;
128142
128283
  for (const part of parts) {
128143
128284
  if (current === null || current === void 0) {
@@ -128511,8 +128652,8 @@ function evaluateValueExpression(expr, runtimeVariables) {
128511
128652
  if (typeof dataToNavigate !== "object" || dataToNavigate === null) {
128512
128653
  return { value: String(varValue), error: `Cannot access path on non-object value` };
128513
128654
  }
128514
- const path18 = pathPart.replace(/^\./, "");
128515
- const parts = getPathSegments(path18);
128655
+ const path19 = pathPart.replace(/^\./, "");
128656
+ const parts = getPathSegments(path19);
128516
128657
  let current = dataToNavigate;
128517
128658
  for (const part of parts) {
128518
128659
  if (current === null || current === void 0) {
@@ -128558,7 +128699,10 @@ function evaluateSqlArgumentExpression(expr, runtimeVariables) {
128558
128699
  }
128559
128700
  function getSqlConnectionValues(profile, runtimeVariables) {
128560
128701
  const values = {};
128561
- const envScope = runtimeVariables.$env && typeof runtimeVariables.$env === "object" ? runtimeVariables.$env : runtimeVariables;
128702
+ const envScope = runtimeVariables.$env && typeof runtimeVariables.$env === "object" ? runtimeVariables.$env : void 0;
128703
+ if (!envScope) {
128704
+ return values;
128705
+ }
128562
128706
  const prefix = `${profile}_`;
128563
128707
  for (const [key, value] of Object.entries(envScope)) {
128564
128708
  if (!key.startsWith(prefix) || value === void 0 || value === null) {
@@ -128568,7 +128712,12 @@ function getSqlConnectionValues(profile, runtimeVariables) {
128568
128712
  if (!propertyName) {
128569
128713
  continue;
128570
128714
  }
128571
- values[propertyName] = typeof value === "string" ? value : JSON.stringify(value);
128715
+ const resolved = resolveEnvironmentTemplateValue(key, envScope);
128716
+ if (resolved.errors.length > 0) {
128717
+ const message = resolved.errors.map((error2) => error2.message).join("; ");
128718
+ throw new Error(`Failed to resolve SQL connection value '${key}': ${message}`);
128719
+ }
128720
+ values[propertyName] = resolved.value;
128572
128721
  }
128573
128722
  return values;
128574
128723
  }
@@ -128628,8 +128777,8 @@ function resolveBareVariables(text, variables) {
128628
128777
  if (varName in variables) {
128629
128778
  const value = variables[varName];
128630
128779
  if (pathPart) {
128631
- const path18 = pathPart.replace(/^\./, "");
128632
- const nestedValue = getNestedPathValue(value, path18);
128780
+ const path19 = pathPart.replace(/^\./, "");
128781
+ const nestedValue = getNestedPathValue(value, path19);
128633
128782
  return valueToString2(nestedValue);
128634
128783
  }
128635
128784
  return valueToString2(value);
@@ -128649,8 +128798,8 @@ function resolveBareVariables(text, variables) {
128649
128798
  if (varName in variables) {
128650
128799
  const value = variables[varName];
128651
128800
  if (pathPart) {
128652
- const path18 = pathPart.replace(/^\./, "");
128653
- return valueToString2(getNestedPathValue(value, path18));
128801
+ const path19 = pathPart.replace(/^\./, "");
128802
+ return valueToString2(getNestedPathValue(value, path19));
128654
128803
  }
128655
128804
  return valueToString2(value);
128656
128805
  }
@@ -128711,7 +128860,7 @@ function valueToString2(value) {
128711
128860
  return String(value);
128712
128861
  }
128713
128862
  function sleep2(ms) {
128714
- return new Promise((resolve15) => setTimeout(resolve15, ms));
128863
+ return new Promise((resolve16) => setTimeout(resolve16, ms));
128715
128864
  }
128716
128865
  function isIfCommand(line2) {
128717
128866
  return /^if\s+.+$/i.test(line2.trim());
@@ -129086,24 +129235,24 @@ function extractCaptureDirectives(content) {
129086
129235
  for (const line2 of content.split("\n")) {
129087
129236
  const match = line2.trim().match(captureRegex);
129088
129237
  if (match) {
129089
- let path18 = match[3] || "";
129090
- if (path18.startsWith(".")) {
129091
- path18 = path18.substring(1);
129238
+ let path19 = match[3] || "";
129239
+ if (path19.startsWith(".")) {
129240
+ path19 = path19.substring(1);
129092
129241
  }
129093
129242
  captures.push({
129094
129243
  varName: match[1],
129095
129244
  afterRequest: parseInt(match[2], 10),
129096
- path: path18
129245
+ path: path19
129097
129246
  });
129098
129247
  }
129099
129248
  }
129100
129249
  return captures;
129101
129250
  }
129102
- function getValueByPath(response, path18) {
129103
- if (!path18) {
129251
+ function getValueByPath(response, path19) {
129252
+ if (!path19) {
129104
129253
  return void 0;
129105
129254
  }
129106
- const parts = getPathSegments(path18);
129255
+ const parts = getPathSegments(path19);
129107
129256
  if (parts.length === 0) {
129108
129257
  return void 0;
129109
129258
  }
@@ -129472,8 +129621,8 @@ async function runSequenceWithJar(sequenceContent, fileVariables, cookieJar, wor
129472
129621
  }
129473
129622
  }
129474
129623
  if (pathPart) {
129475
- const path18 = pathPart.replace(/^\./, "");
129476
- newValue = getNestedPathValue(value, path18);
129624
+ const path19 = pathPart.replace(/^\./, "");
129625
+ newValue = getNestedPathValue(value, path19);
129477
129626
  } else {
129478
129627
  newValue = value;
129479
129628
  }
@@ -130108,8 +130257,8 @@ ${indentMultiline(userMessage)}`;
130108
130257
  if (sequenceSources) {
130109
130258
  const sourceFile = sequenceSources.get(targetName.toLowerCase());
130110
130259
  if (sourceFile) {
130111
- const path18 = await import("path");
130112
- subWorkingDir = path18.dirname(sourceFile);
130260
+ const path19 = await import("path");
130261
+ subWorkingDir = path19.dirname(sourceFile);
130113
130262
  }
130114
130263
  }
130115
130264
  const targetLocation = executionContext?.sequenceLocationIndex?.get(targetName.toLowerCase());
@@ -130417,8 +130566,8 @@ ${indentMultiline(userMessage)}`;
130417
130566
  if (sequenceSources) {
130418
130567
  const sourceFile = sequenceSources.get(sequenceName.toLowerCase());
130419
130568
  if (sourceFile) {
130420
- const path18 = await import("path");
130421
- subWorkingDir = path18.dirname(sourceFile);
130569
+ const path19 = await import("path");
130570
+ subWorkingDir = path19.dirname(sourceFile);
130422
130571
  }
130423
130572
  }
130424
130573
  const targetLocation = executionContext?.sequenceLocationIndex?.get(sequenceName.toLowerCase());
@@ -131179,7 +131328,7 @@ function formatRunSummary(results, totalDuration, colors) {
131179
131328
  }
131180
131329
 
131181
131330
  // src/cli/reporters/junit.ts
131182
- var fs13 = __toESM(require("fs"));
131331
+ var fs12 = __toESM(require("fs"));
131183
131332
  function escapeXml(text) {
131184
131333
  return text.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&apos;");
131185
131334
  }
@@ -131199,7 +131348,7 @@ function generateJUnitReport(results, options) {
131199
131348
  xml += generateTestSuite(result, redaction);
131200
131349
  }
131201
131350
  xml += "</testsuites>\n";
131202
- fs13.writeFileSync(outputPath, xml, "utf-8");
131351
+ fs12.writeFileSync(outputPath, xml, "utf-8");
131203
131352
  }
131204
131353
  function generateTestSuite(result, redaction) {
131205
131354
  const assertions = result.assertionResults || [];
@@ -131325,11 +131474,11 @@ Response: ${bodyStr}`;
131325
131474
  xml += " </testcase>\n";
131326
131475
  xml += " </testsuite>\n";
131327
131476
  xml += "</testsuites>\n";
131328
- fs13.writeFileSync(outputPath, xml, "utf-8");
131477
+ fs12.writeFileSync(outputPath, xml, "utf-8");
131329
131478
  }
131330
131479
 
131331
131480
  // src/cli/reporters/html.ts
131332
- var fs14 = __toESM(require("fs"));
131481
+ var fs13 = __toESM(require("fs"));
131333
131482
  function escapeHtml(text) {
131334
131483
  return text.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#039;");
131335
131484
  }
@@ -131443,7 +131592,7 @@ function generateHtmlReport(results, options) {
131443
131592
  </script>
131444
131593
  </body>
131445
131594
  </html>`;
131446
- fs14.writeFileSync(outputPath, html, "utf-8");
131595
+ fs13.writeFileSync(outputPath, html, "utf-8");
131447
131596
  }
131448
131597
  function generateSequenceHtml(result, index, redaction) {
131449
131598
  const statusClass = result.success ? "passed" : "failed";
@@ -131897,8 +132046,8 @@ function generateHtmlReportFromResponse(response, testName, options) {
131897
132046
  }
131898
132047
 
131899
132048
  // src/environmentParser.ts
131900
- var fs16 = __toESM(require("fs"));
131901
- var path13 = __toESM(require("path"));
132049
+ var fs15 = __toESM(require("fs"));
132050
+ var path14 = __toESM(require("path"));
131902
132051
 
131903
132052
  // src/secrets/crypto.ts
131904
132053
  var crypto7 = __toESM(require("crypto"));
@@ -131966,20 +132115,20 @@ function decryptSecretValue(encryptedValue, sharedKey) {
131966
132115
  }
131967
132116
 
131968
132117
  // src/secrets/keyStore.ts
131969
- var fs15 = __toESM(require("fs"));
131970
- var path12 = __toESM(require("path"));
132118
+ var fs14 = __toESM(require("fs"));
132119
+ var path13 = __toESM(require("path"));
131971
132120
  var CACHE_FILE2 = "secret-keys.json";
131972
132121
  var CACHE_VERSION2 = 1;
131973
132122
  var CACHE_SCAN_IGNORED_DIRS = /* @__PURE__ */ new Set(["node_modules", ".git", "dist", "out"]);
131974
132123
  var sessionKeys = /* @__PURE__ */ new Map();
131975
132124
  var projectSecretKeyCacheDirs = /* @__PURE__ */ new Map();
131976
132125
  function getCacheFilePath(cacheDir) {
131977
- return path12.join(cacheDir, CACHE_FILE2);
132126
+ return path13.join(cacheDir, CACHE_FILE2);
131978
132127
  }
131979
132128
  function cacheFileExists(cacheDir) {
131980
132129
  const cacheFilePath = getCacheFilePath(cacheDir);
131981
132130
  try {
131982
- return fs15.existsSync(cacheFilePath) && fs15.statSync(cacheFilePath).isFile();
132131
+ return fs14.existsSync(cacheFilePath) && fs14.statSync(cacheFilePath).isFile();
131983
132132
  } catch {
131984
132133
  return false;
131985
132134
  }
@@ -131996,13 +132145,13 @@ function getProjectSecretKeyCacheDirs(projectRoot) {
131996
132145
  if (!dir) {
131997
132146
  continue;
131998
132147
  }
131999
- const cacheDir = path12.join(dir, NORN_CACHE_DIR);
132148
+ const cacheDir = path13.join(dir, NORN_CACHE_DIR);
132000
132149
  if (cacheFileExists(cacheDir)) {
132001
132150
  results.push(cacheDir);
132002
132151
  }
132003
132152
  let entries;
132004
132153
  try {
132005
- entries = fs15.readdirSync(dir, { withFileTypes: true });
132154
+ entries = fs14.readdirSync(dir, { withFileTypes: true });
132006
132155
  } catch {
132007
132156
  continue;
132008
132157
  }
@@ -132013,7 +132162,7 @@ function getProjectSecretKeyCacheDirs(projectRoot) {
132013
132162
  if (entry.name === NORN_CACHE_DIR || CACHE_SCAN_IGNORED_DIRS.has(entry.name)) {
132014
132163
  continue;
132015
132164
  }
132016
- queue.push(path12.join(dir, entry.name));
132165
+ queue.push(path13.join(dir, entry.name));
132017
132166
  }
132018
132167
  }
132019
132168
  results.sort();
@@ -132021,11 +132170,11 @@ function getProjectSecretKeyCacheDirs(projectRoot) {
132021
132170
  return results;
132022
132171
  }
132023
132172
  function getCacheDistance(targetPath, cacheDir) {
132024
- const relative5 = path12.relative(getSearchStartDirectory(targetPath), cacheDir);
132173
+ const relative5 = path13.relative(getSearchStartDirectory(targetPath), cacheDir);
132025
132174
  if (!relative5 || relative5 === ".") {
132026
132175
  return 0;
132027
132176
  }
132028
- return relative5.split(path12.sep).filter((segment) => segment !== "").length;
132177
+ return relative5.split(path13.sep).filter((segment) => segment !== "").length;
132029
132178
  }
132030
132179
  function findExistingSecretKeyCacheDir(targetPath) {
132031
132180
  const projectRoot = findProjectRoot(targetPath);
@@ -132052,9 +132201,9 @@ function rememberSecretKeyCacheDir(targetPath, cacheDir) {
132052
132201
  function ensureCacheDir(targetPath) {
132053
132202
  const existing = findExistingSecretKeyCacheDir(targetPath);
132054
132203
  const projectRoot = findProjectRoot(targetPath);
132055
- const cacheDir = existing ?? path12.join(projectRoot, NORN_CACHE_DIR);
132056
- if (!fs15.existsSync(cacheDir)) {
132057
- fs15.mkdirSync(cacheDir, { recursive: true });
132204
+ const cacheDir = existing ?? path13.join(projectRoot, NORN_CACHE_DIR);
132205
+ if (!fs14.existsSync(cacheDir)) {
132206
+ fs14.mkdirSync(cacheDir, { recursive: true });
132058
132207
  }
132059
132208
  ensureNornCacheGitignore(cacheDir);
132060
132209
  rememberSecretKeyCacheDir(targetPath, cacheDir);
@@ -132066,8 +132215,8 @@ function getReadCachePath(targetPath) {
132066
132215
  return getCacheFilePath(existing);
132067
132216
  }
132068
132217
  const projectRoot = findProjectRoot(targetPath);
132069
- const projectCacheDir = path12.join(projectRoot, NORN_CACHE_DIR);
132070
- if (fs15.existsSync(projectCacheDir) && fs15.statSync(projectCacheDir).isDirectory()) {
132218
+ const projectCacheDir = path13.join(projectRoot, NORN_CACHE_DIR);
132219
+ if (fs14.existsSync(projectCacheDir) && fs14.statSync(projectCacheDir).isDirectory()) {
132071
132220
  return getCacheFilePath(projectCacheDir);
132072
132221
  }
132073
132222
  return void 0;
@@ -132077,11 +132226,11 @@ function getWriteCachePath(targetPath) {
132077
132226
  }
132078
132227
  function readCache(targetPath) {
132079
132228
  const cachePath = getReadCachePath(targetPath);
132080
- if (!cachePath || !fs15.existsSync(cachePath)) {
132229
+ if (!cachePath || !fs14.existsSync(cachePath)) {
132081
132230
  return { version: CACHE_VERSION2, keys: {} };
132082
132231
  }
132083
132232
  try {
132084
- const parsed = JSON.parse(fs15.readFileSync(cachePath, "utf8"));
132233
+ const parsed = JSON.parse(fs14.readFileSync(cachePath, "utf8"));
132085
132234
  if (parsed.version !== CACHE_VERSION2 || typeof parsed.keys !== "object" || parsed.keys === null) {
132086
132235
  return { version: CACHE_VERSION2, keys: {} };
132087
132236
  }
@@ -132092,9 +132241,9 @@ function readCache(targetPath) {
132092
132241
  }
132093
132242
  function writeCache(targetPath, cache) {
132094
132243
  const cachePath = getWriteCachePath(targetPath);
132095
- fs15.writeFileSync(cachePath, JSON.stringify(cache, null, 2), { encoding: "utf8", mode: 384 });
132244
+ fs14.writeFileSync(cachePath, JSON.stringify(cache, null, 2), { encoding: "utf8", mode: 384 });
132096
132245
  try {
132097
- fs15.chmodSync(cachePath, 384);
132246
+ fs14.chmodSync(cachePath, 384);
132098
132247
  } catch {
132099
132248
  }
132100
132249
  }
@@ -132285,22 +132434,22 @@ function parseEnvFile(content, sourceFilePath) {
132285
132434
  return config2;
132286
132435
  }
132287
132436
  function getEnvSearchStartDirectory(targetPath) {
132288
- const resolvedPath = path13.resolve(targetPath);
132437
+ const resolvedPath = path14.resolve(targetPath);
132289
132438
  try {
132290
- const stats = fs16.statSync(resolvedPath);
132291
- return stats.isDirectory() ? resolvedPath : path13.dirname(resolvedPath);
132439
+ const stats = fs15.statSync(resolvedPath);
132440
+ return stats.isDirectory() ? resolvedPath : path14.dirname(resolvedPath);
132292
132441
  } catch {
132293
- return path13.dirname(resolvedPath);
132442
+ return path14.dirname(resolvedPath);
132294
132443
  }
132295
132444
  }
132296
132445
  function findEnvFileFromPath(filePath) {
132297
132446
  let dir = getEnvSearchStartDirectory(filePath);
132298
132447
  while (true) {
132299
- const envPath = path13.join(dir, ENV_FILENAME);
132300
- if (fs16.existsSync(envPath)) {
132448
+ const envPath = path14.join(dir, ENV_FILENAME);
132449
+ if (fs15.existsSync(envPath)) {
132301
132450
  return envPath;
132302
132451
  }
132303
- const parentDir = path13.dirname(dir);
132452
+ const parentDir = path14.dirname(dir);
132304
132453
  if (parentDir === dir) {
132305
132454
  break;
132306
132455
  }
@@ -132309,9 +132458,9 @@ function findEnvFileFromPath(filePath) {
132309
132458
  return void 0;
132310
132459
  }
132311
132460
  function formatNornenvErrorLocation(rootEnvFilePath, errorFilePath, line2) {
132312
- const baseDir = path13.dirname(rootEnvFilePath);
132313
- const relativePath = path13.relative(baseDir, errorFilePath);
132314
- const fileLabel = relativePath && relativePath !== "" ? relativePath : path13.basename(errorFilePath);
132461
+ const baseDir = path14.dirname(rootEnvFilePath);
132462
+ const relativePath = path14.relative(baseDir, errorFilePath);
132463
+ const fileLabel = relativePath && relativePath !== "" ? relativePath : path14.basename(errorFilePath);
132315
132464
  return line2 >= 0 ? `${fileLabel}:${line2 + 1}` : fileLabel;
132316
132465
  }
132317
132466
  function resolveNornenvImports(config2, baseDir, entryFilePath, readFile3, importStack, alreadyImported) {
@@ -132331,7 +132480,7 @@ function resolveNornenvImports(config2, baseDir, entryFilePath, readFile3, impor
132331
132480
  }
132332
132481
  for (const imp of config2.imports) {
132333
132482
  const resolvedImportPath = resolveImportPath(imp.path, baseDir);
132334
- if (!resolvedImportPath || !fs16.existsSync(resolvedImportPath)) {
132483
+ if (!resolvedImportPath || !fs15.existsSync(resolvedImportPath)) {
132335
132484
  errors.push({
132336
132485
  message: `Imported file not found: '${imp.path}'`,
132337
132486
  filePath: entryFilePath,
@@ -132347,10 +132496,10 @@ function resolveNornenvImports(config2, baseDir, entryFilePath, readFile3, impor
132347
132496
  });
132348
132497
  continue;
132349
132498
  }
132350
- const normalizedPath = path13.resolve(resolvedImportPath);
132499
+ const normalizedPath = path14.resolve(resolvedImportPath);
132351
132500
  if (stack.includes(normalizedPath)) {
132352
- const entryDir = path13.dirname(stack[0]);
132353
- const cycle = [...stack, normalizedPath].map((p) => path13.relative(entryDir, p) || path13.basename(p)).join(" \u2192 ");
132501
+ const entryDir = path14.dirname(stack[0]);
132502
+ const cycle = [...stack, normalizedPath].map((p) => path14.relative(entryDir, p) || path14.basename(p)).join(" \u2192 ");
132354
132503
  errors.push({
132355
132504
  message: `Circular import detected: ${cycle}`,
132356
132505
  filePath: entryFilePath,
@@ -132379,7 +132528,7 @@ function resolveNornenvImports(config2, baseDir, entryFilePath, readFile3, impor
132379
132528
  if (importedConfig.imports.length > 0) {
132380
132529
  const childResult = resolveNornenvImports(
132381
132530
  importedConfig,
132382
- path13.dirname(normalizedPath),
132531
+ path14.dirname(normalizedPath),
132383
132532
  normalizedPath,
132384
132533
  readFile3,
132385
132534
  [...stack, normalizedPath],
@@ -132397,7 +132546,7 @@ function resolveNornenvImports(config2, baseDir, entryFilePath, readFile3, impor
132397
132546
  }
132398
132547
  function resolveImportPath(importPath, baseDir) {
132399
132548
  const cleaned = importPath.replace(/^["']|["']$/g, "");
132400
- return path13.resolve(baseDir, cleaned);
132549
+ return path14.resolve(baseDir, cleaned);
132401
132550
  }
132402
132551
  function registerVariableOrigins(config2, filePath, origins) {
132403
132552
  for (const varName of Object.keys(config2.common)) {
@@ -132461,12 +132610,12 @@ function mergeConfigs(target, source, targetFilePath, sourceFilePath, variableOr
132461
132610
  }
132462
132611
  }
132463
132612
  function toDisplayPath(filePath, entryFilePath) {
132464
- const entryDir = path13.dirname(entryFilePath);
132465
- const relative5 = path13.relative(entryDir, filePath);
132466
- return relative5 && relative5 !== "" ? relative5 : path13.basename(filePath);
132613
+ const entryDir = path14.dirname(entryFilePath);
132614
+ const relative5 = path14.relative(entryDir, filePath);
132615
+ return relative5 && relative5 !== "" ? relative5 : path14.basename(filePath);
132467
132616
  }
132468
132617
  function loadAndResolveEnvFile(filePath) {
132469
- const content = fs16.readFileSync(filePath, "utf-8");
132618
+ const content = fs15.readFileSync(filePath, "utf-8");
132470
132619
  const config2 = parseEnvFile(content, filePath);
132471
132620
  if (config2.imports.length === 0) {
132472
132621
  const secretErrors = resolveEncryptedSecretValues(config2, filePath);
@@ -132474,9 +132623,9 @@ function loadAndResolveEnvFile(filePath) {
132474
132623
  }
132475
132624
  const result = resolveNornenvImports(
132476
132625
  config2,
132477
- path13.dirname(filePath),
132626
+ path14.dirname(filePath),
132478
132627
  filePath,
132479
- (p) => fs16.readFileSync(p, "utf-8")
132628
+ (p) => fs15.readFileSync(p, "utf-8")
132480
132629
  );
132481
132630
  result.secretErrors.push(...resolveEncryptedSecretValues(result.config, filePath));
132482
132631
  return result;
@@ -132542,14 +132691,14 @@ function resolveEncryptedSecretValues(config2, entryFilePath) {
132542
132691
  }
132543
132692
 
132544
132693
  // src/secrets/cliSecrets.ts
132545
- var fs18 = __toESM(require("fs"));
132546
- var path15 = __toESM(require("path"));
132694
+ var fs17 = __toESM(require("fs"));
132695
+ var path16 = __toESM(require("path"));
132547
132696
  var readline = __toESM(require("readline"));
132548
132697
  var import_process = require("process");
132549
132698
 
132550
132699
  // src/secrets/envFileSecrets.ts
132551
- var fs17 = __toESM(require("fs"));
132552
- var path14 = __toESM(require("path"));
132700
+ var fs16 = __toESM(require("fs"));
132701
+ var path15 = __toESM(require("path"));
132553
132702
  var envRegex2 = /^\s*\[env:([a-zA-Z_][a-zA-Z0-9_-]*)\]\s*$/;
132554
132703
  var secretConnectionStringRegex2 = /^(\s*secret\s+connectionString\s+)([a-zA-Z_][a-zA-Z0-9_]*)(\s*=\s*)(.+)$/;
132555
132704
  var secretRegex2 = /^(\s*secret\s+)([a-zA-Z_][a-zA-Z0-9_]*)(\s*=\s*)(.+)$/;
@@ -132560,7 +132709,7 @@ function detectEol(content) {
132560
132709
  return content.includes("\r\n") ? "\r\n" : "\n";
132561
132710
  }
132562
132711
  function isNornenvFilePath(filePath) {
132563
- return path14.basename(filePath).toLowerCase() === ".nornenv";
132712
+ return path15.basename(filePath).toLowerCase() === ".nornenv";
132564
132713
  }
132565
132714
  function extractSecretLines(content, filePath) {
132566
132715
  const lines = splitContentLines(content);
@@ -132634,7 +132783,7 @@ function findSecretLine(content, variableName, envName) {
132634
132783
  return secretLines.find((secret) => secret.name === variableName);
132635
132784
  }
132636
132785
  function loadSecretLine(filePath, variableName, envName) {
132637
- const content = fs17.readFileSync(filePath, "utf8");
132786
+ const content = fs16.readFileSync(filePath, "utf8");
132638
132787
  const secret = findSecretLine(content, variableName, envName);
132639
132788
  if (!secret) {
132640
132789
  const envLabel = envName ? ` in [env:${envName}]` : "";
@@ -132643,22 +132792,22 @@ function loadSecretLine(filePath, variableName, envName) {
132643
132792
  return { content, secret };
132644
132793
  }
132645
132794
  function writeSecretLine(filePath, content) {
132646
- fs17.writeFileSync(filePath, content, "utf8");
132795
+ fs16.writeFileSync(filePath, content, "utf8");
132647
132796
  }
132648
132797
  function discoverNornenvFiles(targetPath) {
132649
- const resolved = path14.resolve(targetPath);
132650
- if (!fs17.existsSync(resolved)) {
132798
+ const resolved = path15.resolve(targetPath);
132799
+ if (!fs16.existsSync(resolved)) {
132651
132800
  return [];
132652
132801
  }
132653
- const stats = fs17.statSync(resolved);
132802
+ const stats = fs16.statSync(resolved);
132654
132803
  if (stats.isFile()) {
132655
132804
  return isNornenvFilePath(resolved) ? [resolved] : [];
132656
132805
  }
132657
132806
  const results = [];
132658
132807
  const walk = (dir) => {
132659
- const entries = fs17.readdirSync(dir, { withFileTypes: true });
132808
+ const entries = fs16.readdirSync(dir, { withFileTypes: true });
132660
132809
  for (const entry of entries) {
132661
- const fullPath = path14.join(dir, entry.name);
132810
+ const fullPath = path15.join(dir, entry.name);
132662
132811
  if (entry.isDirectory()) {
132663
132812
  if (entry.name === "node_modules" || entry.name === ".git" || entry.name === "dist" || entry.name === "out") {
132664
132813
  continue;
@@ -132695,8 +132844,8 @@ async function promptLine(question) {
132695
132844
  }
132696
132845
  const rl = readline.createInterface({ input: import_process.stdin, output: import_process.stdout });
132697
132846
  try {
132698
- const answer = await new Promise((resolve15) => {
132699
- rl.question(question, resolve15);
132847
+ const answer = await new Promise((resolve16) => {
132848
+ rl.question(question, resolve16);
132700
132849
  });
132701
132850
  const trimmed = answer.trim();
132702
132851
  return trimmed === "" ? void 0 : trimmed;
@@ -132717,8 +132866,8 @@ function formatSecretError(err, envFilePath) {
132717
132866
  if (!envFilePath) {
132718
132867
  return `${err.message}`;
132719
132868
  }
132720
- const relative5 = path15.relative(path15.dirname(envFilePath), err.filePath);
132721
- const fileLabel = relative5 && relative5 !== "" ? relative5 : path15.basename(err.filePath);
132869
+ const relative5 = path16.relative(path16.dirname(envFilePath), err.filePath);
132870
+ const fileLabel = relative5 && relative5 !== "" ? relative5 : path16.basename(err.filePath);
132722
132871
  const lineLabel = err.line >= 0 ? `${fileLabel}:${err.line + 1}` : fileLabel;
132723
132872
  return `${lineLabel} - ${err.message}`;
132724
132873
  }
@@ -132814,7 +132963,7 @@ async function handleEncrypt(args) {
132814
132963
  console.error(`Error: encrypt requires --file and --var.`);
132815
132964
  return 1;
132816
132965
  }
132817
- const absoluteFilePath = path15.resolve(filePath);
132966
+ const absoluteFilePath = path16.resolve(filePath);
132818
132967
  const { content, secret } = loadSecretLine(absoluteFilePath, variableName, envName);
132819
132968
  if (secret.encrypted) {
132820
132969
  console.error(`Error: Secret '${variableName}' is already encrypted. Use rotate instead.`);
@@ -132846,7 +132995,7 @@ async function handleRotate(args) {
132846
132995
  console.error(`Error: rotate requires --file and --var.`);
132847
132996
  return 1;
132848
132997
  }
132849
- const absoluteFilePath = path15.resolve(filePath);
132998
+ const absoluteFilePath = path16.resolve(filePath);
132850
132999
  const { content, secret } = loadSecretLine(absoluteFilePath, variableName, envName);
132851
133000
  let kid = explicitKid;
132852
133001
  if (!kid && secret.encrypted) {
@@ -132877,7 +133026,7 @@ async function handleRotate(args) {
132877
133026
  }
132878
133027
  async function handleRekey(args) {
132879
133028
  const positional = args.filter((arg) => !arg.startsWith("-"));
132880
- const targetPath = positional[0] ? path15.resolve(positional[0]) : process.cwd();
133029
+ const targetPath = positional[0] ? path16.resolve(positional[0]) : process.cwd();
132881
133030
  const targetKid = getFlagValue(args, "--kid");
132882
133031
  const files = discoverNornenvFiles(targetPath);
132883
133032
  if (files.length === 0) {
@@ -132887,7 +133036,7 @@ async function handleRekey(args) {
132887
133036
  let updatedFiles = 0;
132888
133037
  let updatedSecrets = 0;
132889
133038
  for (const filePath of files) {
132890
- const original = fs18.readFileSync(filePath, "utf8");
133039
+ const original = fs17.readFileSync(filePath, "utf8");
132891
133040
  const secretLines = extractSecretLines(original, filePath);
132892
133041
  if (secretLines.length === 0) {
132893
133042
  continue;
@@ -132938,7 +133087,7 @@ async function handleRekey(args) {
132938
133087
  updatedSecrets += 1;
132939
133088
  }
132940
133089
  if (updated !== original) {
132941
- fs18.writeFileSync(filePath, updated, "utf8");
133090
+ fs17.writeFileSync(filePath, updated, "utf8");
132942
133091
  updatedFiles += 1;
132943
133092
  }
132944
133093
  }
@@ -132947,7 +133096,7 @@ async function handleRekey(args) {
132947
133096
  }
132948
133097
  async function handleAudit(args) {
132949
133098
  const positional = args.filter((arg) => !arg.startsWith("-"));
132950
- const targetPath = positional[0] ? path15.resolve(positional[0]) : process.cwd();
133099
+ const targetPath = positional[0] ? path16.resolve(positional[0]) : process.cwd();
132951
133100
  const files = discoverNornenvFiles(targetPath);
132952
133101
  if (files.length === 0) {
132953
133102
  console.log(`No .nornenv files found under ${targetPath}`);
@@ -132955,7 +133104,7 @@ async function handleAudit(args) {
132955
133104
  }
132956
133105
  const issues = [];
132957
133106
  for (const filePath of files) {
132958
- const content = fs18.readFileSync(filePath, "utf8");
133107
+ const content = fs17.readFileSync(filePath, "utf8");
132959
133108
  const secrets = extractSecretLines(content, filePath);
132960
133109
  for (const secret of secrets) {
132961
133110
  if (!secret.encrypted) {
@@ -133041,8 +133190,8 @@ function printSecretResolutionErrors(errors, envFilePath) {
133041
133190
  }
133042
133191
 
133043
133192
  // src/theoryCaseLoader.ts
133044
- var fs19 = __toESM(require("fs/promises"));
133045
- var path16 = __toESM(require("path"));
133193
+ var fs18 = __toESM(require("fs/promises"));
133194
+ var path17 = __toESM(require("path"));
133046
133195
  function formatTheoryCaseLabel(params, index) {
133047
133196
  const entries = Object.entries(params);
133048
133197
  if (entries.length === 0) {
@@ -133066,8 +133215,8 @@ function normalizeTheoryCase(caseValue, sequenceParamNames) {
133066
133215
  return void 0;
133067
133216
  }
133068
133217
  async function loadTheoryCasesFromSource(sourcePath, workingDir, sequenceParamNames) {
133069
- const resolvedPath = path16.resolve(workingDir, sourcePath);
133070
- const content = await fs19.readFile(resolvedPath, "utf-8");
133218
+ const resolvedPath = path17.resolve(workingDir, sourcePath);
133219
+ const content = await fs18.readFile(resolvedPath, "utf-8");
133071
133220
  const parsed = JSON.parse(content);
133072
133221
  if (!Array.isArray(parsed)) {
133073
133222
  throw new Error(`Theory file "${sourcePath}" must contain a JSON array of test cases`);
@@ -133155,6 +133304,7 @@ function resolveEnvironmentForPath(targetPath, selectedEnv) {
133155
133304
  const secretNames = new Set(envConfig.secretNames);
133156
133305
  const secretValues = new Map(envConfig.secretValues);
133157
133306
  const availableEnvironments = envConfig.environments.map((e) => e.name);
133307
+ let targetEnvVariables;
133158
133308
  if (selectedEnv) {
133159
133309
  const targetEnv = envConfig.environments.find((e) => e.name === selectedEnv);
133160
133310
  if (!targetEnv) {
@@ -133168,13 +133318,18 @@ function resolveEnvironmentForPath(targetPath, selectedEnv) {
133168
133318
  envNotFound: selectedEnv
133169
133319
  };
133170
133320
  }
133171
- Object.assign(variables, targetEnv.variables);
133172
- for (const [name, value] of Object.entries(targetEnv.variables)) {
133321
+ targetEnvVariables = targetEnv.variables;
133322
+ Object.assign(variables, targetEnvVariables);
133323
+ for (const [name, value] of Object.entries(targetEnvVariables)) {
133173
133324
  if (secretNames.has(name)) {
133174
133325
  secretValues.set(name, value);
133175
133326
  }
133176
133327
  }
133177
133328
  }
133329
+ attachEnvironmentTemplateScopes(variables, envConfig.common, targetEnvVariables);
133330
+ for (const [name, value] of collectResolvedEnvironmentSecretValues(variables, secretNames)) {
133331
+ secretValues.set(name, value);
133332
+ }
133178
133333
  return {
133179
133334
  envFilePath,
133180
133335
  variables,
@@ -133210,10 +133365,10 @@ function generateTimestamp() {
133210
133365
  return `${year}-${month}-${day}-${hours}${minutes}${seconds}`;
133211
133366
  }
133212
133367
  function generateReportPaths(outputDir, inputFile, timestamp) {
133213
- const baseName = path17.basename(inputFile, path17.extname(inputFile));
133368
+ const baseName = path18.basename(inputFile, path18.extname(inputFile));
133214
133369
  return {
133215
- junitPath: path17.join(outputDir, `${baseName}-${timestamp}-results.xml`),
133216
- htmlPath: path17.join(outputDir, `${baseName}-${timestamp}-report.html`)
133370
+ junitPath: path18.join(outputDir, `${baseName}-${timestamp}-results.xml`),
133371
+ htmlPath: path18.join(outputDir, `${baseName}-${timestamp}-report.html`)
133217
133372
  };
133218
133373
  }
133219
133374
  function parseArgs(args) {
@@ -133378,9 +133533,9 @@ async function runSingleRequest(fileContent, variables, cookieJar, apiDefinition
133378
133533
  function discoverNornFiles(dirPath) {
133379
133534
  const files = [];
133380
133535
  function walkDir(currentPath) {
133381
- const entries = fs20.readdirSync(currentPath, { withFileTypes: true });
133536
+ const entries = fs19.readdirSync(currentPath, { withFileTypes: true });
133382
133537
  for (const entry of entries) {
133383
- const fullPath = path17.join(currentPath, entry.name);
133538
+ const fullPath = path18.join(currentPath, entry.name);
133384
133539
  if (entry.isDirectory()) {
133385
133540
  if (!entry.name.startsWith(".") && entry.name !== "node_modules") {
133386
133541
  walkDir(fullPath);
@@ -133504,12 +133659,12 @@ async function main() {
133504
133659
  if (options.insecure) {
133505
133660
  console.error(colors.warning("Warning: TLS certificate verification is disabled (--insecure). Use this only for local development."));
133506
133661
  }
133507
- const inputPath = path17.resolve(options.file);
133508
- if (!fs20.existsSync(inputPath)) {
133662
+ const inputPath = path18.resolve(options.file);
133663
+ if (!fs19.existsSync(inputPath)) {
133509
133664
  console.error(`Error: Path not found: ${inputPath}`);
133510
133665
  process.exit(1);
133511
133666
  }
133512
- const isDirectory = fs20.statSync(inputPath).isDirectory();
133667
+ const isDirectory = fs19.statSync(inputPath).isDirectory();
133513
133668
  let filesToRun;
133514
133669
  if (isDirectory) {
133515
133670
  filesToRun = discoverNornFiles(inputPath);
@@ -133576,11 +133731,11 @@ async function main() {
133576
133731
  }
133577
133732
  mergeSecrets(combinedSecretNames, combinedSecretValues, resolvedEnv.secretNames, resolvedEnv.secretValues);
133578
133733
  const redaction2 = createRedactionOptions(combinedSecretNames, combinedSecretValues, !options.noRedact);
133579
- const fileContent = fs20.readFileSync(filePath, "utf-8");
133734
+ const fileContent = fs19.readFileSync(filePath, "utf-8");
133580
133735
  const fileVariables = extractFileLevelVariables(fileContent);
133581
133736
  const variables = attachEnvironmentScope({ ...resolvedEnv.variables, ...fileVariables }, resolvedEnv.variables);
133582
133737
  const cookieJar = createCookieJar();
133583
- const workingDir = path17.dirname(filePath);
133738
+ const workingDir = path18.dirname(filePath);
133584
133739
  const importResult = await resolveImports(
133585
133740
  fileContent,
133586
133741
  workingDir,
@@ -133732,7 +133887,7 @@ ${fileContent}` : fileContent;
133732
133887
  let totalTestCount = 0;
133733
133888
  let filteredTestCount = 0;
133734
133889
  for (const filePath of filesToRun) {
133735
- const fileContent = fs20.readFileSync(filePath, "utf-8");
133890
+ const fileContent = fs19.readFileSync(filePath, "utf-8");
133736
133891
  const counts = countTestSequences(fileContent, tagFilterOptions);
133737
133892
  totalTestCount += counts.total;
133738
133893
  filteredTestCount += counts.filtered;
@@ -133774,16 +133929,16 @@ ${fileContent}` : fileContent;
133774
133929
  process.exit(1);
133775
133930
  }
133776
133931
  if (!resolvedEnv.envFilePath && options.env) {
133777
- const relPath = isDirectory ? path17.relative(inputPath, filePath) : path17.basename(filePath);
133932
+ const relPath = isDirectory ? path18.relative(inputPath, filePath) : path18.basename(filePath);
133778
133933
  console.error(colors.warning(`Warning: --env specified but no .nornenv file found for ${relPath}`));
133779
133934
  }
133780
133935
  mergeSecrets(combinedSecretNames, combinedSecretValues, resolvedEnv.secretNames, resolvedEnv.secretValues);
133781
133936
  const redaction2 = createRedactionOptions(combinedSecretNames, combinedSecretValues, !options.noRedact);
133782
- const fileContent = fs20.readFileSync(filePath, "utf-8");
133937
+ const fileContent = fs19.readFileSync(filePath, "utf-8");
133783
133938
  const fileVariables = extractFileLevelVariables(fileContent);
133784
133939
  const variables = attachEnvironmentScope({ ...resolvedEnv.variables, ...fileVariables }, resolvedEnv.variables);
133785
133940
  const cookieJar = createCookieJar();
133786
- const workingDir = path17.dirname(filePath);
133941
+ const workingDir = path18.dirname(filePath);
133787
133942
  const importResult = await resolveImports(
133788
133943
  fileContent,
133789
133944
  workingDir,
@@ -133803,7 +133958,7 @@ ${fileContent}` : fileContent;
133803
133958
  continue;
133804
133959
  }
133805
133960
  if (isDirectory && options.output !== "json") {
133806
- const relPath = path17.relative(inputPath, filePath);
133961
+ const relPath = path18.relative(inputPath, filePath);
133807
133962
  console.log(colors.info(`
133808
133963
  \u2501\u2501\u2501 ${relPath} \u2501\u2501\u2501`));
133809
133964
  }
@@ -133848,7 +134003,7 @@ ${fileContent}` : fileContent;
133848
134003
  let htmlOutputPath = options.htmlOutput;
133849
134004
  if (options.outputDir) {
133850
134005
  const timestamp = generateTimestamp();
133851
- const baseName = isDirectory ? path17.basename(inputPath) : path17.basename(inputPath, path17.extname(inputPath));
134006
+ const baseName = isDirectory ? path18.basename(inputPath) : path18.basename(inputPath, path18.extname(inputPath));
133852
134007
  const generatedPaths = generateReportPaths(options.outputDir, baseName + ".norn", timestamp);
133853
134008
  if (!junitOutputPath) {
133854
134009
  junitOutputPath = generatedPaths.junitPath;
@@ -133856,12 +134011,12 @@ ${fileContent}` : fileContent;
133856
134011
  if (!htmlOutputPath) {
133857
134012
  htmlOutputPath = generatedPaths.htmlPath;
133858
134013
  }
133859
- if (!fs20.existsSync(options.outputDir)) {
133860
- fs20.mkdirSync(options.outputDir, { recursive: true });
134014
+ if (!fs19.existsSync(options.outputDir)) {
134015
+ fs19.mkdirSync(options.outputDir, { recursive: true });
133861
134016
  }
133862
134017
  }
133863
134018
  if (junitOutputPath) {
133864
- const suiteName = isDirectory ? path17.basename(inputPath) : path17.basename(inputPath, path17.extname(inputPath));
134019
+ const suiteName = isDirectory ? path18.basename(inputPath) : path18.basename(inputPath, path18.extname(inputPath));
133865
134020
  if (result.type === "request") {
133866
134021
  generateJUnitReportFromResponse(
133867
134022
  result.results[0],
@@ -133877,11 +134032,11 @@ ${fileContent}` : fileContent;
133877
134032
  console.log(colors.info(`JUnit report written to: ${junitOutputPath}`));
133878
134033
  }
133879
134034
  if (htmlOutputPath) {
133880
- const title = `Norn Test Report - ${path17.basename(inputPath)}`;
134035
+ const title = `Norn Test Report - ${path18.basename(inputPath)}`;
133881
134036
  if (result.type === "request") {
133882
134037
  generateHtmlReportFromResponse(
133883
134038
  result.results[0],
133884
- options.request || path17.basename(inputPath),
134039
+ options.request || path18.basename(inputPath),
133885
134040
  { outputPath: htmlOutputPath, redaction, title }
133886
134041
  );
133887
134042
  } else {