@mestreyoda/fabrica 0.1.5 → 0.1.7

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/index.js CHANGED
@@ -5814,9 +5814,9 @@ var require_getMachineId_linux = __commonJS({
5814
5814
  var api_1 = (init_esm(), __toCommonJS(esm_exports));
5815
5815
  async function getMachineId() {
5816
5816
  const paths = ["/etc/machine-id", "/var/lib/dbus/machine-id"];
5817
- for (const path41 of paths) {
5817
+ for (const path42 of paths) {
5818
5818
  try {
5819
- const result = await fs_1.promises.readFile(path41, { encoding: "utf8" });
5819
+ const result = await fs_1.promises.readFile(path42, { encoding: "utf8" });
5820
5820
  return result.trim();
5821
5821
  } catch (e2) {
5822
5822
  api_1.diag.debug(`error reading machine id: ${e2}`);
@@ -14060,19 +14060,19 @@ var require_module_details_from_path = __commonJS({
14060
14060
  basedir += segments[i2] + sep2;
14061
14061
  }
14062
14062
  }
14063
- var path41 = "";
14063
+ var path42 = "";
14064
14064
  var lastSegmentIndex = segments.length - 1;
14065
14065
  for (var i22 = index + offset; i22 <= lastSegmentIndex; i22++) {
14066
14066
  if (i22 === lastSegmentIndex) {
14067
- path41 += segments[i22];
14067
+ path42 += segments[i22];
14068
14068
  } else {
14069
- path41 += segments[i22] + sep2;
14069
+ path42 += segments[i22] + sep2;
14070
14070
  }
14071
14071
  }
14072
14072
  return {
14073
14073
  name,
14074
14074
  basedir,
14075
- path: path41
14075
+ path: path42
14076
14076
  };
14077
14077
  };
14078
14078
  }
@@ -14082,7 +14082,7 @@ var require_module_details_from_path = __commonJS({
14082
14082
  var require_require_in_the_middle = __commonJS({
14083
14083
  "node_modules/require-in-the-middle/index.js"(exports2, module2) {
14084
14084
  "use strict";
14085
- var path41 = __require("path");
14085
+ var path42 = __require("path");
14086
14086
  var Module = __require("module");
14087
14087
  var debug = require_src9()("require-in-the-middle");
14088
14088
  var moduleDetailsFromPath = require_module_details_from_path();
@@ -14227,7 +14227,7 @@ var require_require_in_the_middle = __commonJS({
14227
14227
  }
14228
14228
  moduleName2 = filename;
14229
14229
  } else if (hasWhitelist === true && modules.includes(filename)) {
14230
- const parsedPath = path41.parse(filename);
14230
+ const parsedPath = path42.parse(filename);
14231
14231
  moduleName2 = parsedPath.name;
14232
14232
  basedir = parsedPath.dir;
14233
14233
  } else {
@@ -14265,7 +14265,7 @@ var require_require_in_the_middle = __commonJS({
14265
14265
  }
14266
14266
  if (res !== filename) {
14267
14267
  if (internals === true) {
14268
- moduleName2 = moduleName2 + path41.sep + path41.relative(basedir, filename);
14268
+ moduleName2 = moduleName2 + path42.sep + path42.relative(basedir, filename);
14269
14269
  debug("preparing to process require of internal file: %s", moduleName2);
14270
14270
  } else {
14271
14271
  debug("ignoring require of non-main module file: %s", res);
@@ -14301,8 +14301,8 @@ var require_require_in_the_middle = __commonJS({
14301
14301
  }
14302
14302
  };
14303
14303
  function resolveModuleName(stat2) {
14304
- const normalizedPath = path41.sep !== "/" ? stat2.path.split(path41.sep).join("/") : stat2.path;
14305
- return path41.posix.join(stat2.name, normalizedPath).replace(normalize, "");
14304
+ const normalizedPath = path42.sep !== "/" ? stat2.path.split(path42.sep).join("/") : stat2.path;
14305
+ return path42.posix.join(stat2.name, normalizedPath).replace(normalize, "");
14306
14306
  }
14307
14307
  }
14308
14308
  });
@@ -14387,7 +14387,7 @@ var require_RequireInTheMiddleSingleton = __commonJS({
14387
14387
  Object.defineProperty(exports2, "__esModule", { value: true });
14388
14388
  exports2.RequireInTheMiddleSingleton = void 0;
14389
14389
  var require_in_the_middle_1 = require_require_in_the_middle();
14390
- var path41 = __require("path");
14390
+ var path42 = __require("path");
14391
14391
  var ModuleNameTrie_1 = require_ModuleNameTrie();
14392
14392
  var isMocha = [
14393
14393
  "afterEach",
@@ -14451,7 +14451,7 @@ var require_RequireInTheMiddleSingleton = __commonJS({
14451
14451
  };
14452
14452
  exports2.RequireInTheMiddleSingleton = RequireInTheMiddleSingleton;
14453
14453
  function normalizePathSeparators(moduleNameOrPath) {
14454
- return path41.sep !== ModuleNameTrie_1.ModuleNameSeparator ? moduleNameOrPath.split(path41.sep).join(ModuleNameTrie_1.ModuleNameSeparator) : moduleNameOrPath;
14454
+ return path42.sep !== ModuleNameTrie_1.ModuleNameSeparator ? moduleNameOrPath.split(path42.sep).join(ModuleNameTrie_1.ModuleNameSeparator) : moduleNameOrPath;
14455
14455
  }
14456
14456
  }
14457
14457
  });
@@ -14512,7 +14512,7 @@ var require_register = __commonJS({
14512
14512
  // node_modules/import-in-the-middle/index.js
14513
14513
  var require_import_in_the_middle = __commonJS({
14514
14514
  "node_modules/import-in-the-middle/index.js"(exports2, module2) {
14515
- var path41 = __require("path");
14515
+ var path42 = __require("path");
14516
14516
  var moduleDetailsFromPath = require_module_details_from_path();
14517
14517
  var { fileURLToPath: fileURLToPath5 } = __require("url");
14518
14518
  var { MessageChannel } = __require("worker_threads");
@@ -14625,7 +14625,7 @@ var require_import_in_the_middle = __commonJS({
14625
14625
  } else if (baseDir.endsWith(specifiers.get(loadUrl))) {
14626
14626
  callHookFn(hookFn, namespace, name, baseDir);
14627
14627
  } else if (internals) {
14628
- const internalPath = name + path41.sep + path41.relative(baseDir, filePath);
14628
+ const internalPath = name + path42.sep + path42.relative(baseDir, filePath);
14629
14629
  callHookFn(hookFn, namespace, internalPath, baseDir);
14630
14630
  }
14631
14631
  } else if (matchArg === specifier) {
@@ -14700,7 +14700,7 @@ var require_instrumentation2 = __commonJS({
14700
14700
  "use strict";
14701
14701
  Object.defineProperty(exports2, "__esModule", { value: true });
14702
14702
  exports2.InstrumentationBase = void 0;
14703
- var path41 = __require("path");
14703
+ var path42 = __require("path");
14704
14704
  var util_1 = __require("util");
14705
14705
  var semver_1 = require_semver();
14706
14706
  var shimmer_1 = require_shimmer();
@@ -14798,7 +14798,7 @@ var require_instrumentation2 = __commonJS({
14798
14798
  }
14799
14799
  _extractPackageVersion(baseDir) {
14800
14800
  try {
14801
- const json2 = (0, fs_1.readFileSync)(path41.join(baseDir, "package.json"), {
14801
+ const json2 = (0, fs_1.readFileSync)(path42.join(baseDir, "package.json"), {
14802
14802
  encoding: "utf8"
14803
14803
  });
14804
14804
  const version2 = JSON.parse(json2).version;
@@ -14840,7 +14840,7 @@ var require_instrumentation2 = __commonJS({
14840
14840
  return exports3;
14841
14841
  }
14842
14842
  const files = module3.files ?? [];
14843
- const normalizedName = path41.normalize(name);
14843
+ const normalizedName = path42.normalize(name);
14844
14844
  const supportedFileInstrumentations = files.filter((f3) => f3.name === normalizedName && isSupported(f3.supportedVersions, version2, module3.includePrerelease));
14845
14845
  return supportedFileInstrumentations.reduce((patchedExports, file2) => {
14846
14846
  file2.moduleExports = patchedExports;
@@ -14886,8 +14886,8 @@ var require_instrumentation2 = __commonJS({
14886
14886
  this._warnOnPreloadedModules();
14887
14887
  for (const module3 of this._modules) {
14888
14888
  const hookFn = (exports3, name, baseDir) => {
14889
- if (!baseDir && path41.isAbsolute(name)) {
14890
- const parsedPath = path41.parse(name);
14889
+ if (!baseDir && path42.isAbsolute(name)) {
14890
+ const parsedPath = path42.parse(name);
14891
14891
  name = parsedPath.name;
14892
14892
  baseDir = parsedPath.dir;
14893
14893
  }
@@ -14896,7 +14896,7 @@ var require_instrumentation2 = __commonJS({
14896
14896
  const onRequire = (exports3, name, baseDir) => {
14897
14897
  return this._onRequire(module3, exports3, name, baseDir);
14898
14898
  };
14899
- const hook7 = path41.isAbsolute(module3.name) ? new require_in_the_middle_1.Hook([module3.name], { internals: true }, onRequire) : this._requireInTheMiddleSingleton.register(module3.name, onRequire);
14899
+ const hook7 = path42.isAbsolute(module3.name) ? new require_in_the_middle_1.Hook([module3.name], { internals: true }, onRequire) : this._requireInTheMiddleSingleton.register(module3.name, onRequire);
14900
14900
  this._hooks.push(hook7);
14901
14901
  const esmHook = new import_in_the_middle_1.Hook([module3.name], { internals: true }, hookFn);
14902
14902
  this._hooks.push(esmHook);
@@ -26088,7 +26088,7 @@ function appendRootPathToUrlIfNeeded(url2) {
26088
26088
  return void 0;
26089
26089
  }
26090
26090
  }
26091
- function appendResourcePathToUrl(url2, path41) {
26091
+ function appendResourcePathToUrl(url2, path42) {
26092
26092
  try {
26093
26093
  new URL(url2);
26094
26094
  } catch {
@@ -26098,11 +26098,11 @@ function appendResourcePathToUrl(url2, path41) {
26098
26098
  if (!url2.endsWith("/")) {
26099
26099
  url2 = url2 + "/";
26100
26100
  }
26101
- url2 += path41;
26101
+ url2 += path42;
26102
26102
  try {
26103
26103
  new URL(url2);
26104
26104
  } catch {
26105
- diag2.warn(`Configuration: Provided URL appended with '${path41}' is not a valid URL, using 'undefined' instead of '${url2}'`);
26105
+ diag2.warn(`Configuration: Provided URL appended with '${path42}' is not a valid URL, using 'undefined' instead of '${url2}'`);
26106
26106
  return void 0;
26107
26107
  }
26108
26108
  return url2;
@@ -26995,19 +26995,19 @@ var require_uri_parser = __commonJS({
26995
26995
  };
26996
26996
  }
26997
26997
  var NUMBER_REGEX = /^\d+$/;
26998
- function splitHostPort(path41) {
26999
- if (path41.startsWith("[")) {
27000
- const hostEnd = path41.indexOf("]");
26998
+ function splitHostPort(path42) {
26999
+ if (path42.startsWith("[")) {
27000
+ const hostEnd = path42.indexOf("]");
27001
27001
  if (hostEnd === -1) {
27002
27002
  return null;
27003
27003
  }
27004
- const host = path41.substring(1, hostEnd);
27004
+ const host = path42.substring(1, hostEnd);
27005
27005
  if (host.indexOf(":") === -1) {
27006
27006
  return null;
27007
27007
  }
27008
- if (path41.length > hostEnd + 1) {
27009
- if (path41[hostEnd + 1] === ":") {
27010
- const portString = path41.substring(hostEnd + 2);
27008
+ if (path42.length > hostEnd + 1) {
27009
+ if (path42[hostEnd + 1] === ":") {
27010
+ const portString = path42.substring(hostEnd + 2);
27011
27011
  if (NUMBER_REGEX.test(portString)) {
27012
27012
  return {
27013
27013
  host,
@@ -27025,7 +27025,7 @@ var require_uri_parser = __commonJS({
27025
27025
  };
27026
27026
  }
27027
27027
  } else {
27028
- const splitPath = path41.split(":");
27028
+ const splitPath = path42.split(":");
27029
27029
  if (splitPath.length === 2) {
27030
27030
  if (NUMBER_REGEX.test(splitPath[1])) {
27031
27031
  return {
@@ -27037,7 +27037,7 @@ var require_uri_parser = __commonJS({
27037
27037
  }
27038
27038
  } else {
27039
27039
  return {
27040
- host: path41
27040
+ host: path42
27041
27041
  };
27042
27042
  }
27043
27043
  }
@@ -30037,14 +30037,14 @@ var require_client_interceptors = __commonJS({
30037
30037
  }
30038
30038
  };
30039
30039
  exports2.InterceptingCall = InterceptingCall;
30040
- function getCall(channel, path41, options) {
30040
+ function getCall(channel, path42, options) {
30041
30041
  var _a2, _b;
30042
30042
  const deadline = (_a2 = options.deadline) !== null && _a2 !== void 0 ? _a2 : Infinity;
30043
30043
  const host = options.host;
30044
30044
  const parent = (_b = options.parent) !== null && _b !== void 0 ? _b : null;
30045
30045
  const propagateFlags = options.propagate_flags;
30046
30046
  const credentials = options.credentials;
30047
- const call = channel.createCall(path41, deadline, host, parent, propagateFlags);
30047
+ const call = channel.createCall(path42, deadline, host, parent, propagateFlags);
30048
30048
  if (credentials) {
30049
30049
  call.setCredentials(credentials);
30050
30050
  }
@@ -30614,9 +30614,9 @@ var require_make_client = __commonJS({
30614
30614
  ServiceClientImpl.serviceName = serviceName;
30615
30615
  return ServiceClientImpl;
30616
30616
  }
30617
- function partial2(fn, path41, serialize, deserialize) {
30617
+ function partial2(fn, path42, serialize, deserialize) {
30618
30618
  return function(...args) {
30619
- return fn.call(this, path41, serialize, deserialize, ...args);
30619
+ return fn.call(this, path42, serialize, deserialize, ...args);
30620
30620
  };
30621
30621
  }
30622
30622
  function isProtobufTypeDefinition(obj) {
@@ -31143,15 +31143,15 @@ var require_fetch = __commonJS({
31143
31143
  var require_path = __commonJS({
31144
31144
  "node_modules/@protobufjs/path/index.js"(exports2) {
31145
31145
  "use strict";
31146
- var path41 = exports2;
31146
+ var path42 = exports2;
31147
31147
  var isAbsolute = (
31148
31148
  /**
31149
31149
  * Tests if the specified path is absolute.
31150
31150
  * @param {string} path Path to test
31151
31151
  * @returns {boolean} `true` if path is absolute
31152
31152
  */
31153
- path41.isAbsolute = function isAbsolute2(path42) {
31154
- return /^(?:\/|\w+:)/.test(path42);
31153
+ path42.isAbsolute = function isAbsolute2(path43) {
31154
+ return /^(?:\/|\w+:)/.test(path43);
31155
31155
  }
31156
31156
  );
31157
31157
  var normalize = (
@@ -31160,9 +31160,9 @@ var require_path = __commonJS({
31160
31160
  * @param {string} path Path to normalize
31161
31161
  * @returns {string} Normalized path
31162
31162
  */
31163
- path41.normalize = function normalize2(path42) {
31164
- path42 = path42.replace(/\\/g, "/").replace(/\/{2,}/g, "/");
31165
- var parts = path42.split("/"), absolute = isAbsolute(path42), prefix = "";
31163
+ path42.normalize = function normalize2(path43) {
31164
+ path43 = path43.replace(/\\/g, "/").replace(/\/{2,}/g, "/");
31165
+ var parts = path43.split("/"), absolute = isAbsolute(path43), prefix = "";
31166
31166
  if (absolute)
31167
31167
  prefix = parts.shift() + "/";
31168
31168
  for (var i2 = 0; i2 < parts.length; ) {
@@ -31181,7 +31181,7 @@ var require_path = __commonJS({
31181
31181
  return prefix + parts.join("/");
31182
31182
  }
31183
31183
  );
31184
- path41.resolve = function resolve3(originPath, includePath, alreadyNormalized) {
31184
+ path42.resolve = function resolve3(originPath, includePath, alreadyNormalized) {
31185
31185
  if (!alreadyNormalized)
31186
31186
  includePath = normalize(includePath);
31187
31187
  if (isAbsolute(includePath))
@@ -31332,16 +31332,16 @@ var require_namespace = __commonJS({
31332
31332
  object2.onRemove(this);
31333
31333
  return clearCache(this);
31334
31334
  };
31335
- Namespace.prototype.define = function define2(path41, json2) {
31336
- if (util.isString(path41))
31337
- path41 = path41.split(".");
31338
- else if (!Array.isArray(path41))
31335
+ Namespace.prototype.define = function define2(path42, json2) {
31336
+ if (util.isString(path42))
31337
+ path42 = path42.split(".");
31338
+ else if (!Array.isArray(path42))
31339
31339
  throw TypeError("illegal path");
31340
- if (path41 && path41.length && path41[0] === "")
31340
+ if (path42 && path42.length && path42[0] === "")
31341
31341
  throw Error("path must be relative");
31342
31342
  var ptr = this;
31343
- while (path41.length > 0) {
31344
- var part = path41.shift();
31343
+ while (path42.length > 0) {
31344
+ var part = path42.shift();
31345
31345
  if (ptr.nested && ptr.nested[part]) {
31346
31346
  ptr = ptr.nested[part];
31347
31347
  if (!(ptr instanceof Namespace))
@@ -31376,26 +31376,26 @@ var require_namespace = __commonJS({
31376
31376
  });
31377
31377
  return this;
31378
31378
  };
31379
- Namespace.prototype.lookup = function lookup(path41, filterTypes, parentAlreadyChecked) {
31379
+ Namespace.prototype.lookup = function lookup(path42, filterTypes, parentAlreadyChecked) {
31380
31380
  if (typeof filterTypes === "boolean") {
31381
31381
  parentAlreadyChecked = filterTypes;
31382
31382
  filterTypes = void 0;
31383
31383
  } else if (filterTypes && !Array.isArray(filterTypes))
31384
31384
  filterTypes = [filterTypes];
31385
- if (util.isString(path41) && path41.length) {
31386
- if (path41 === ".")
31385
+ if (util.isString(path42) && path42.length) {
31386
+ if (path42 === ".")
31387
31387
  return this.root;
31388
- path41 = path41.split(".");
31389
- } else if (!path41.length)
31388
+ path42 = path42.split(".");
31389
+ } else if (!path42.length)
31390
31390
  return this;
31391
- var flatPath = path41.join(".");
31392
- if (path41[0] === "")
31393
- return this.root.lookup(path41.slice(1), filterTypes);
31391
+ var flatPath = path42.join(".");
31392
+ if (path42[0] === "")
31393
+ return this.root.lookup(path42.slice(1), filterTypes);
31394
31394
  var found = this.root._fullyQualifiedObjects && this.root._fullyQualifiedObjects["." + flatPath];
31395
31395
  if (found && (!filterTypes || filterTypes.indexOf(found.constructor) > -1)) {
31396
31396
  return found;
31397
31397
  }
31398
- found = this._lookupImpl(path41, flatPath);
31398
+ found = this._lookupImpl(path42, flatPath);
31399
31399
  if (found && (!filterTypes || filterTypes.indexOf(found.constructor) > -1)) {
31400
31400
  return found;
31401
31401
  }
@@ -31403,7 +31403,7 @@ var require_namespace = __commonJS({
31403
31403
  return null;
31404
31404
  var current = this;
31405
31405
  while (current.parent) {
31406
- found = current.parent._lookupImpl(path41, flatPath);
31406
+ found = current.parent._lookupImpl(path42, flatPath);
31407
31407
  if (found && (!filterTypes || filterTypes.indexOf(found.constructor) > -1)) {
31408
31408
  return found;
31409
31409
  }
@@ -31411,49 +31411,49 @@ var require_namespace = __commonJS({
31411
31411
  }
31412
31412
  return null;
31413
31413
  };
31414
- Namespace.prototype._lookupImpl = function lookup(path41, flatPath) {
31414
+ Namespace.prototype._lookupImpl = function lookup(path42, flatPath) {
31415
31415
  if (Object.prototype.hasOwnProperty.call(this._lookupCache, flatPath)) {
31416
31416
  return this._lookupCache[flatPath];
31417
31417
  }
31418
- var found = this.get(path41[0]);
31418
+ var found = this.get(path42[0]);
31419
31419
  var exact = null;
31420
31420
  if (found) {
31421
- if (path41.length === 1) {
31421
+ if (path42.length === 1) {
31422
31422
  exact = found;
31423
31423
  } else if (found instanceof Namespace) {
31424
- path41 = path41.slice(1);
31425
- exact = found._lookupImpl(path41, path41.join("."));
31424
+ path42 = path42.slice(1);
31425
+ exact = found._lookupImpl(path42, path42.join("."));
31426
31426
  }
31427
31427
  } else {
31428
31428
  for (var i2 = 0; i2 < this.nestedArray.length; ++i2)
31429
- if (this._nestedArray[i2] instanceof Namespace && (found = this._nestedArray[i2]._lookupImpl(path41, flatPath)))
31429
+ if (this._nestedArray[i2] instanceof Namespace && (found = this._nestedArray[i2]._lookupImpl(path42, flatPath)))
31430
31430
  exact = found;
31431
31431
  }
31432
31432
  this._lookupCache[flatPath] = exact;
31433
31433
  return exact;
31434
31434
  };
31435
- Namespace.prototype.lookupType = function lookupType(path41) {
31436
- var found = this.lookup(path41, [Type]);
31435
+ Namespace.prototype.lookupType = function lookupType(path42) {
31436
+ var found = this.lookup(path42, [Type]);
31437
31437
  if (!found)
31438
- throw Error("no such type: " + path41);
31438
+ throw Error("no such type: " + path42);
31439
31439
  return found;
31440
31440
  };
31441
- Namespace.prototype.lookupEnum = function lookupEnum(path41) {
31442
- var found = this.lookup(path41, [Enum]);
31441
+ Namespace.prototype.lookupEnum = function lookupEnum(path42) {
31442
+ var found = this.lookup(path42, [Enum]);
31443
31443
  if (!found)
31444
- throw Error("no such Enum '" + path41 + "' in " + this);
31444
+ throw Error("no such Enum '" + path42 + "' in " + this);
31445
31445
  return found;
31446
31446
  };
31447
- Namespace.prototype.lookupTypeOrEnum = function lookupTypeOrEnum(path41) {
31448
- var found = this.lookup(path41, [Type, Enum]);
31447
+ Namespace.prototype.lookupTypeOrEnum = function lookupTypeOrEnum(path42) {
31448
+ var found = this.lookup(path42, [Type, Enum]);
31449
31449
  if (!found)
31450
- throw Error("no such Type or Enum '" + path41 + "' in " + this);
31450
+ throw Error("no such Type or Enum '" + path42 + "' in " + this);
31451
31451
  return found;
31452
31452
  };
31453
- Namespace.prototype.lookupService = function lookupService(path41) {
31454
- var found = this.lookup(path41, [Service]);
31453
+ Namespace.prototype.lookupService = function lookupService(path42) {
31454
+ var found = this.lookup(path42, [Service]);
31455
31455
  if (!found)
31456
- throw Error("no such Service '" + path41 + "' in " + this);
31456
+ throw Error("no such Service '" + path42 + "' in " + this);
31457
31457
  return found;
31458
31458
  };
31459
31459
  Namespace._configure = function(Type_, Service_, Enum_) {
@@ -32816,14 +32816,14 @@ var require_util2 = __commonJS({
32816
32816
  Object.defineProperty(object2, "$type", { value: enm, enumerable: false });
32817
32817
  return enm;
32818
32818
  };
32819
- util.setProperty = function setProperty(dst, path41, value, ifNotSet) {
32820
- function setProp(dst2, path42, value2) {
32821
- var part = path42.shift();
32819
+ util.setProperty = function setProperty(dst, path42, value, ifNotSet) {
32820
+ function setProp(dst2, path43, value2) {
32821
+ var part = path43.shift();
32822
32822
  if (part === "__proto__" || part === "prototype") {
32823
32823
  return dst2;
32824
32824
  }
32825
- if (path42.length > 0) {
32826
- dst2[part] = setProp(dst2[part] || {}, path42, value2);
32825
+ if (path43.length > 0) {
32826
+ dst2[part] = setProp(dst2[part] || {}, path43, value2);
32827
32827
  } else {
32828
32828
  var prevValue = dst2[part];
32829
32829
  if (prevValue && ifNotSet)
@@ -32836,10 +32836,10 @@ var require_util2 = __commonJS({
32836
32836
  }
32837
32837
  if (typeof dst !== "object")
32838
32838
  throw TypeError("dst must be an object");
32839
- if (!path41)
32839
+ if (!path42)
32840
32840
  throw TypeError("path must be specified");
32841
- path41 = path41.split(".");
32842
- return setProp(dst, path41, value);
32841
+ path42 = path42.split(".");
32842
+ return setProp(dst, path42, value);
32843
32843
  };
32844
32844
  Object.defineProperty(util, "decorateRoot", {
32845
32845
  get: function() {
@@ -33385,12 +33385,12 @@ var require_object = __commonJS({
33385
33385
  */
33386
33386
  fullName: {
33387
33387
  get: function() {
33388
- var path41 = [this.name], ptr = this.parent;
33388
+ var path42 = [this.name], ptr = this.parent;
33389
33389
  while (ptr) {
33390
- path41.unshift(ptr.name);
33390
+ path42.unshift(ptr.name);
33391
33391
  ptr = ptr.parent;
33392
33392
  }
33393
- return path41.join(".");
33393
+ return path42.join(".");
33394
33394
  }
33395
33395
  }
33396
33396
  });
@@ -37380,16 +37380,16 @@ var require_util3 = __commonJS({
37380
37380
  Object.defineProperty(exports2, "__esModule", { value: true });
37381
37381
  exports2.addCommonProtos = exports2.loadProtosWithOptionsSync = exports2.loadProtosWithOptions = void 0;
37382
37382
  var fs39 = __require("fs");
37383
- var path41 = __require("path");
37383
+ var path42 = __require("path");
37384
37384
  var Protobuf = require_protobufjs();
37385
37385
  function addIncludePathResolver(root, includePaths) {
37386
37386
  const originalResolvePath = root.resolvePath;
37387
37387
  root.resolvePath = (origin, target) => {
37388
- if (path41.isAbsolute(target)) {
37388
+ if (path42.isAbsolute(target)) {
37389
37389
  return target;
37390
37390
  }
37391
37391
  for (const directory of includePaths) {
37392
- const fullPath = path41.join(directory, target);
37392
+ const fullPath = path42.join(directory, target);
37393
37393
  try {
37394
37394
  fs39.accessSync(fullPath, fs39.constants.R_OK);
37395
37395
  return fullPath;
@@ -43712,9 +43712,9 @@ var require_server_call = __commonJS({
43712
43712
  return status;
43713
43713
  }
43714
43714
  var ServerUnaryCallImpl = class extends events_1.EventEmitter {
43715
- constructor(path41, call, metadata, request2) {
43715
+ constructor(path42, call, metadata, request2) {
43716
43716
  super();
43717
- this.path = path41;
43717
+ this.path = path42;
43718
43718
  this.call = call;
43719
43719
  this.metadata = metadata;
43720
43720
  this.request = request2;
@@ -43744,9 +43744,9 @@ var require_server_call = __commonJS({
43744
43744
  };
43745
43745
  exports2.ServerUnaryCallImpl = ServerUnaryCallImpl;
43746
43746
  var ServerReadableStreamImpl = class extends stream_1.Readable {
43747
- constructor(path41, call, metadata) {
43747
+ constructor(path42, call, metadata) {
43748
43748
  super({ objectMode: true });
43749
- this.path = path41;
43749
+ this.path = path42;
43750
43750
  this.call = call;
43751
43751
  this.metadata = metadata;
43752
43752
  this.cancelled = false;
@@ -43778,9 +43778,9 @@ var require_server_call = __commonJS({
43778
43778
  };
43779
43779
  exports2.ServerReadableStreamImpl = ServerReadableStreamImpl;
43780
43780
  var ServerWritableStreamImpl = class extends stream_1.Writable {
43781
- constructor(path41, call, metadata, request2) {
43781
+ constructor(path42, call, metadata, request2) {
43782
43782
  super({ objectMode: true });
43783
- this.path = path41;
43783
+ this.path = path42;
43784
43784
  this.call = call;
43785
43785
  this.metadata = metadata;
43786
43786
  this.request = request2;
@@ -43834,9 +43834,9 @@ var require_server_call = __commonJS({
43834
43834
  };
43835
43835
  exports2.ServerWritableStreamImpl = ServerWritableStreamImpl;
43836
43836
  var ServerDuplexStreamImpl = class extends stream_1.Duplex {
43837
- constructor(path41, call, metadata) {
43837
+ constructor(path42, call, metadata) {
43838
43838
  super({ objectMode: true });
43839
- this.path = path41;
43839
+ this.path = path42;
43840
43840
  this.call = call;
43841
43841
  this.metadata = metadata;
43842
43842
  this.pendingStatus = {
@@ -46112,11 +46112,11 @@ var require_server = __commonJS({
46112
46112
  }
46113
46113
  return true;
46114
46114
  }
46115
- _retrieveHandler(path41) {
46116
- serverCallTrace("Received call to method " + path41 + " at address " + this.serverAddressString);
46117
- const handler = this.handlers.get(path41);
46115
+ _retrieveHandler(path42) {
46116
+ serverCallTrace("Received call to method " + path42 + " at address " + this.serverAddressString);
46117
+ const handler = this.handlers.get(path42);
46118
46118
  if (handler === void 0) {
46119
- serverCallTrace("No handler registered for method " + path41 + ". Sending UNIMPLEMENTED status.");
46119
+ serverCallTrace("No handler registered for method " + path42 + ". Sending UNIMPLEMENTED status.");
46120
46120
  return null;
46121
46121
  }
46122
46122
  return handler;
@@ -46138,10 +46138,10 @@ var require_server = __commonJS({
46138
46138
  channelzSessionInfo === null || channelzSessionInfo === void 0 ? void 0 : channelzSessionInfo.streamTracker.addCallFailed();
46139
46139
  return;
46140
46140
  }
46141
- const path41 = headers[HTTP2_HEADER_PATH];
46142
- const handler = this._retrieveHandler(path41);
46141
+ const path42 = headers[HTTP2_HEADER_PATH];
46142
+ const handler = this._retrieveHandler(path42);
46143
46143
  if (!handler) {
46144
- this._respondWithError(getUnimplementedStatusResponse(path41), stream, channelzSessionInfo);
46144
+ this._respondWithError(getUnimplementedStatusResponse(path42), stream, channelzSessionInfo);
46145
46145
  return;
46146
46146
  }
46147
46147
  const callEventTracker = {
@@ -46189,10 +46189,10 @@ var require_server = __commonJS({
46189
46189
  if (this._verifyContentType(stream, headers) !== true) {
46190
46190
  return;
46191
46191
  }
46192
- const path41 = headers[HTTP2_HEADER_PATH];
46193
- const handler = this._retrieveHandler(path41);
46192
+ const path42 = headers[HTTP2_HEADER_PATH];
46193
+ const handler = this._retrieveHandler(path42);
46194
46194
  if (!handler) {
46195
- this._respondWithError(getUnimplementedStatusResponse(path41), stream, null);
46195
+ this._respondWithError(getUnimplementedStatusResponse(path42), stream, null);
46196
46196
  return;
46197
46197
  }
46198
46198
  const call = (0, server_interceptors_1.getServerInterceptingCall)([...extraInterceptors, ...this.interceptors], stream, headers, null, handler, this.options);
@@ -47476,13 +47476,13 @@ var require_resolver_uds = __commonJS({
47476
47476
  this.listener = listener;
47477
47477
  this.hasReturnedResult = false;
47478
47478
  this.endpoints = [];
47479
- let path41;
47479
+ let path42;
47480
47480
  if (target.authority === "") {
47481
- path41 = "/" + target.path;
47481
+ path42 = "/" + target.path;
47482
47482
  } else {
47483
- path41 = target.path;
47483
+ path42 = target.path;
47484
47484
  }
47485
- this.endpoints = [{ addresses: [{ path: path41 }] }];
47485
+ this.endpoints = [{ addresses: [{ path: path42 }] }];
47486
47486
  }
47487
47487
  updateResolution() {
47488
47488
  if (!this.hasReturnedResult) {
@@ -47542,12 +47542,12 @@ var require_resolver_ip = __commonJS({
47542
47542
  return;
47543
47543
  }
47544
47544
  const pathList = target.path.split(",");
47545
- for (const path41 of pathList) {
47546
- const hostPort = (0, uri_parser_1.splitHostPort)(path41);
47545
+ for (const path42 of pathList) {
47546
+ const hostPort = (0, uri_parser_1.splitHostPort)(path42);
47547
47547
  if (hostPort === null) {
47548
47548
  this.error = {
47549
47549
  code: constants_1.Status.UNAVAILABLE,
47550
- details: `Failed to parse ${target.scheme} address ${path41}`,
47550
+ details: `Failed to parse ${target.scheme} address ${path42}`,
47551
47551
  metadata: new metadata_1.Metadata()
47552
47552
  };
47553
47553
  return;
@@ -47555,7 +47555,7 @@ var require_resolver_ip = __commonJS({
47555
47555
  if (target.scheme === IPV4_SCHEME && !(0, net_1.isIPv4)(hostPort.host) || target.scheme === IPV6_SCHEME && !(0, net_1.isIPv6)(hostPort.host)) {
47556
47556
  this.error = {
47557
47557
  code: constants_1.Status.UNAVAILABLE,
47558
- details: `Failed to parse ${target.scheme} address ${path41}`,
47558
+ details: `Failed to parse ${target.scheme} address ${path42}`,
47559
47559
  metadata: new metadata_1.Metadata()
47560
47560
  };
47561
47561
  return;
@@ -48911,10 +48911,10 @@ var require_create_service_client_constructor = __commonJS({
48911
48911
  Object.defineProperty(exports2, "__esModule", { value: true });
48912
48912
  exports2.createServiceClientConstructor = void 0;
48913
48913
  var grpc = require_src15();
48914
- function createServiceClientConstructor(path41, name) {
48914
+ function createServiceClientConstructor(path42, name) {
48915
48915
  const serviceDefinition = {
48916
48916
  export: {
48917
- path: path41,
48917
+ path: path42,
48918
48918
  requestStream: false,
48919
48919
  responseStream: false,
48920
48920
  requestSerialize: (arg) => {
@@ -49134,7 +49134,7 @@ var require_otlp_grpc_env_configuration = __commonJS({
49134
49134
  var grpc_exporter_transport_1 = require_grpc_exporter_transport();
49135
49135
  var node_http_1 = (init_index_node_http(), __toCommonJS(index_node_http_exports));
49136
49136
  var fs39 = __require("fs");
49137
- var path41 = __require("path");
49137
+ var path42 = __require("path");
49138
49138
  var api_1 = (init_esm(), __toCommonJS(esm_exports));
49139
49139
  function fallbackIfNullishOrBlank(signalSpecific, nonSignalSpecific) {
49140
49140
  if (signalSpecific != null && signalSpecific !== "") {
@@ -49183,7 +49183,7 @@ var require_otlp_grpc_env_configuration = __commonJS({
49183
49183
  const filePath = fallbackIfNullishOrBlank(signalSpecificPath, nonSignalSpecificPath);
49184
49184
  if (filePath != null) {
49185
49185
  try {
49186
- return fs39.readFileSync(path41.resolve(process.cwd(), filePath));
49186
+ return fs39.readFileSync(path42.resolve(process.cwd(), filePath));
49187
49187
  } catch {
49188
49188
  api_1.diag.warn(warningMessage);
49189
49189
  return void 0;
@@ -52480,17 +52480,17 @@ var require_visit = __commonJS({
52480
52480
  visit.BREAK = BREAK;
52481
52481
  visit.SKIP = SKIP;
52482
52482
  visit.REMOVE = REMOVE;
52483
- function visit_(key, node, visitor, path41) {
52484
- const ctrl = callVisitor(key, node, visitor, path41);
52483
+ function visit_(key, node, visitor, path42) {
52484
+ const ctrl = callVisitor(key, node, visitor, path42);
52485
52485
  if (identity.isNode(ctrl) || identity.isPair(ctrl)) {
52486
- replaceNode(key, path41, ctrl);
52487
- return visit_(key, ctrl, visitor, path41);
52486
+ replaceNode(key, path42, ctrl);
52487
+ return visit_(key, ctrl, visitor, path42);
52488
52488
  }
52489
52489
  if (typeof ctrl !== "symbol") {
52490
52490
  if (identity.isCollection(node)) {
52491
- path41 = Object.freeze(path41.concat(node));
52491
+ path42 = Object.freeze(path42.concat(node));
52492
52492
  for (let i2 = 0; i2 < node.items.length; ++i2) {
52493
- const ci = visit_(i2, node.items[i2], visitor, path41);
52493
+ const ci = visit_(i2, node.items[i2], visitor, path42);
52494
52494
  if (typeof ci === "number")
52495
52495
  i2 = ci - 1;
52496
52496
  else if (ci === BREAK)
@@ -52501,13 +52501,13 @@ var require_visit = __commonJS({
52501
52501
  }
52502
52502
  }
52503
52503
  } else if (identity.isPair(node)) {
52504
- path41 = Object.freeze(path41.concat(node));
52505
- const ck = visit_("key", node.key, visitor, path41);
52504
+ path42 = Object.freeze(path42.concat(node));
52505
+ const ck = visit_("key", node.key, visitor, path42);
52506
52506
  if (ck === BREAK)
52507
52507
  return BREAK;
52508
52508
  else if (ck === REMOVE)
52509
52509
  node.key = null;
52510
- const cv = visit_("value", node.value, visitor, path41);
52510
+ const cv = visit_("value", node.value, visitor, path42);
52511
52511
  if (cv === BREAK)
52512
52512
  return BREAK;
52513
52513
  else if (cv === REMOVE)
@@ -52528,17 +52528,17 @@ var require_visit = __commonJS({
52528
52528
  visitAsync.BREAK = BREAK;
52529
52529
  visitAsync.SKIP = SKIP;
52530
52530
  visitAsync.REMOVE = REMOVE;
52531
- async function visitAsync_(key, node, visitor, path41) {
52532
- const ctrl = await callVisitor(key, node, visitor, path41);
52531
+ async function visitAsync_(key, node, visitor, path42) {
52532
+ const ctrl = await callVisitor(key, node, visitor, path42);
52533
52533
  if (identity.isNode(ctrl) || identity.isPair(ctrl)) {
52534
- replaceNode(key, path41, ctrl);
52535
- return visitAsync_(key, ctrl, visitor, path41);
52534
+ replaceNode(key, path42, ctrl);
52535
+ return visitAsync_(key, ctrl, visitor, path42);
52536
52536
  }
52537
52537
  if (typeof ctrl !== "symbol") {
52538
52538
  if (identity.isCollection(node)) {
52539
- path41 = Object.freeze(path41.concat(node));
52539
+ path42 = Object.freeze(path42.concat(node));
52540
52540
  for (let i2 = 0; i2 < node.items.length; ++i2) {
52541
- const ci = await visitAsync_(i2, node.items[i2], visitor, path41);
52541
+ const ci = await visitAsync_(i2, node.items[i2], visitor, path42);
52542
52542
  if (typeof ci === "number")
52543
52543
  i2 = ci - 1;
52544
52544
  else if (ci === BREAK)
@@ -52549,13 +52549,13 @@ var require_visit = __commonJS({
52549
52549
  }
52550
52550
  }
52551
52551
  } else if (identity.isPair(node)) {
52552
- path41 = Object.freeze(path41.concat(node));
52553
- const ck = await visitAsync_("key", node.key, visitor, path41);
52552
+ path42 = Object.freeze(path42.concat(node));
52553
+ const ck = await visitAsync_("key", node.key, visitor, path42);
52554
52554
  if (ck === BREAK)
52555
52555
  return BREAK;
52556
52556
  else if (ck === REMOVE)
52557
52557
  node.key = null;
52558
- const cv = await visitAsync_("value", node.value, visitor, path41);
52558
+ const cv = await visitAsync_("value", node.value, visitor, path42);
52559
52559
  if (cv === BREAK)
52560
52560
  return BREAK;
52561
52561
  else if (cv === REMOVE)
@@ -52582,23 +52582,23 @@ var require_visit = __commonJS({
52582
52582
  }
52583
52583
  return visitor;
52584
52584
  }
52585
- function callVisitor(key, node, visitor, path41) {
52585
+ function callVisitor(key, node, visitor, path42) {
52586
52586
  if (typeof visitor === "function")
52587
- return visitor(key, node, path41);
52587
+ return visitor(key, node, path42);
52588
52588
  if (identity.isMap(node))
52589
- return visitor.Map?.(key, node, path41);
52589
+ return visitor.Map?.(key, node, path42);
52590
52590
  if (identity.isSeq(node))
52591
- return visitor.Seq?.(key, node, path41);
52591
+ return visitor.Seq?.(key, node, path42);
52592
52592
  if (identity.isPair(node))
52593
- return visitor.Pair?.(key, node, path41);
52593
+ return visitor.Pair?.(key, node, path42);
52594
52594
  if (identity.isScalar(node))
52595
- return visitor.Scalar?.(key, node, path41);
52595
+ return visitor.Scalar?.(key, node, path42);
52596
52596
  if (identity.isAlias(node))
52597
- return visitor.Alias?.(key, node, path41);
52597
+ return visitor.Alias?.(key, node, path42);
52598
52598
  return void 0;
52599
52599
  }
52600
- function replaceNode(key, path41, node) {
52601
- const parent = path41[path41.length - 1];
52600
+ function replaceNode(key, path42, node) {
52601
+ const parent = path42[path42.length - 1];
52602
52602
  if (identity.isCollection(parent)) {
52603
52603
  parent.items[key] = node;
52604
52604
  } else if (identity.isPair(parent)) {
@@ -53206,10 +53206,10 @@ var require_Collection = __commonJS({
53206
53206
  var createNode = require_createNode();
53207
53207
  var identity = require_identity();
53208
53208
  var Node = require_Node();
53209
- function collectionFromPath(schema, path41, value) {
53209
+ function collectionFromPath(schema, path42, value) {
53210
53210
  let v = value;
53211
- for (let i2 = path41.length - 1; i2 >= 0; --i2) {
53212
- const k = path41[i2];
53211
+ for (let i2 = path42.length - 1; i2 >= 0; --i2) {
53212
+ const k = path42[i2];
53213
53213
  if (typeof k === "number" && Number.isInteger(k) && k >= 0) {
53214
53214
  const a = [];
53215
53215
  a[k] = v;
@@ -53228,7 +53228,7 @@ var require_Collection = __commonJS({
53228
53228
  sourceObjects: /* @__PURE__ */ new Map()
53229
53229
  });
53230
53230
  }
53231
- var isEmptyPath = (path41) => path41 == null || typeof path41 === "object" && !!path41[Symbol.iterator]().next().done;
53231
+ var isEmptyPath = (path42) => path42 == null || typeof path42 === "object" && !!path42[Symbol.iterator]().next().done;
53232
53232
  var Collection2 = class extends Node.NodeBase {
53233
53233
  constructor(type, schema) {
53234
53234
  super(type);
@@ -53258,11 +53258,11 @@ var require_Collection = __commonJS({
53258
53258
  * be a Pair instance or a `{ key, value }` object, which may not have a key
53259
53259
  * that already exists in the map.
53260
53260
  */
53261
- addIn(path41, value) {
53262
- if (isEmptyPath(path41))
53261
+ addIn(path42, value) {
53262
+ if (isEmptyPath(path42))
53263
53263
  this.add(value);
53264
53264
  else {
53265
- const [key, ...rest] = path41;
53265
+ const [key, ...rest] = path42;
53266
53266
  const node = this.get(key, true);
53267
53267
  if (identity.isCollection(node))
53268
53268
  node.addIn(rest, value);
@@ -53276,8 +53276,8 @@ var require_Collection = __commonJS({
53276
53276
  * Removes a value from the collection.
53277
53277
  * @returns `true` if the item was found and removed.
53278
53278
  */
53279
- deleteIn(path41) {
53280
- const [key, ...rest] = path41;
53279
+ deleteIn(path42) {
53280
+ const [key, ...rest] = path42;
53281
53281
  if (rest.length === 0)
53282
53282
  return this.delete(key);
53283
53283
  const node = this.get(key, true);
@@ -53291,8 +53291,8 @@ var require_Collection = __commonJS({
53291
53291
  * scalar values from their surrounding node; to disable set `keepScalar` to
53292
53292
  * `true` (collections are always returned intact).
53293
53293
  */
53294
- getIn(path41, keepScalar) {
53295
- const [key, ...rest] = path41;
53294
+ getIn(path42, keepScalar) {
53295
+ const [key, ...rest] = path42;
53296
53296
  const node = this.get(key, true);
53297
53297
  if (rest.length === 0)
53298
53298
  return !keepScalar && identity.isScalar(node) ? node.value : node;
@@ -53310,8 +53310,8 @@ var require_Collection = __commonJS({
53310
53310
  /**
53311
53311
  * Checks if the collection includes a value with the key `key`.
53312
53312
  */
53313
- hasIn(path41) {
53314
- const [key, ...rest] = path41;
53313
+ hasIn(path42) {
53314
+ const [key, ...rest] = path42;
53315
53315
  if (rest.length === 0)
53316
53316
  return this.has(key);
53317
53317
  const node = this.get(key, true);
@@ -53321,8 +53321,8 @@ var require_Collection = __commonJS({
53321
53321
  * Sets a value in this collection. For `!!set`, `value` needs to be a
53322
53322
  * boolean to add/remove the item from the set.
53323
53323
  */
53324
- setIn(path41, value) {
53325
- const [key, ...rest] = path41;
53324
+ setIn(path42, value) {
53325
+ const [key, ...rest] = path42;
53326
53326
  if (rest.length === 0) {
53327
53327
  this.set(key, value);
53328
53328
  } else {
@@ -55826,9 +55826,9 @@ var require_Document = __commonJS({
55826
55826
  this.contents.add(value);
55827
55827
  }
55828
55828
  /** Adds a value to the document. */
55829
- addIn(path41, value) {
55829
+ addIn(path42, value) {
55830
55830
  if (assertCollection(this.contents))
55831
- this.contents.addIn(path41, value);
55831
+ this.contents.addIn(path42, value);
55832
55832
  }
55833
55833
  /**
55834
55834
  * Create a new `Alias` node, ensuring that the target `node` has the required anchor.
@@ -55903,14 +55903,14 @@ var require_Document = __commonJS({
55903
55903
  * Removes a value from the document.
55904
55904
  * @returns `true` if the item was found and removed.
55905
55905
  */
55906
- deleteIn(path41) {
55907
- if (Collection2.isEmptyPath(path41)) {
55906
+ deleteIn(path42) {
55907
+ if (Collection2.isEmptyPath(path42)) {
55908
55908
  if (this.contents == null)
55909
55909
  return false;
55910
55910
  this.contents = null;
55911
55911
  return true;
55912
55912
  }
55913
- return assertCollection(this.contents) ? this.contents.deleteIn(path41) : false;
55913
+ return assertCollection(this.contents) ? this.contents.deleteIn(path42) : false;
55914
55914
  }
55915
55915
  /**
55916
55916
  * Returns item at `key`, or `undefined` if not found. By default unwraps
@@ -55925,10 +55925,10 @@ var require_Document = __commonJS({
55925
55925
  * scalar values from their surrounding node; to disable set `keepScalar` to
55926
55926
  * `true` (collections are always returned intact).
55927
55927
  */
55928
- getIn(path41, keepScalar) {
55929
- if (Collection2.isEmptyPath(path41))
55928
+ getIn(path42, keepScalar) {
55929
+ if (Collection2.isEmptyPath(path42))
55930
55930
  return !keepScalar && identity.isScalar(this.contents) ? this.contents.value : this.contents;
55931
- return identity.isCollection(this.contents) ? this.contents.getIn(path41, keepScalar) : void 0;
55931
+ return identity.isCollection(this.contents) ? this.contents.getIn(path42, keepScalar) : void 0;
55932
55932
  }
55933
55933
  /**
55934
55934
  * Checks if the document includes a value with the key `key`.
@@ -55939,10 +55939,10 @@ var require_Document = __commonJS({
55939
55939
  /**
55940
55940
  * Checks if the document includes a value at `path`.
55941
55941
  */
55942
- hasIn(path41) {
55943
- if (Collection2.isEmptyPath(path41))
55942
+ hasIn(path42) {
55943
+ if (Collection2.isEmptyPath(path42))
55944
55944
  return this.contents !== void 0;
55945
- return identity.isCollection(this.contents) ? this.contents.hasIn(path41) : false;
55945
+ return identity.isCollection(this.contents) ? this.contents.hasIn(path42) : false;
55946
55946
  }
55947
55947
  /**
55948
55948
  * Sets a value in this document. For `!!set`, `value` needs to be a
@@ -55959,13 +55959,13 @@ var require_Document = __commonJS({
55959
55959
  * Sets a value in this document. For `!!set`, `value` needs to be a
55960
55960
  * boolean to add/remove the item from the set.
55961
55961
  */
55962
- setIn(path41, value) {
55963
- if (Collection2.isEmptyPath(path41)) {
55962
+ setIn(path42, value) {
55963
+ if (Collection2.isEmptyPath(path42)) {
55964
55964
  this.contents = value;
55965
55965
  } else if (this.contents == null) {
55966
- this.contents = Collection2.collectionFromPath(this.schema, Array.from(path41), value);
55966
+ this.contents = Collection2.collectionFromPath(this.schema, Array.from(path42), value);
55967
55967
  } else if (assertCollection(this.contents)) {
55968
- this.contents.setIn(path41, value);
55968
+ this.contents.setIn(path42, value);
55969
55969
  }
55970
55970
  }
55971
55971
  /**
@@ -57917,9 +57917,9 @@ var require_cst_visit = __commonJS({
57917
57917
  visit.BREAK = BREAK;
57918
57918
  visit.SKIP = SKIP;
57919
57919
  visit.REMOVE = REMOVE;
57920
- visit.itemAtPath = (cst, path41) => {
57920
+ visit.itemAtPath = (cst, path42) => {
57921
57921
  let item = cst;
57922
- for (const [field, index] of path41) {
57922
+ for (const [field, index] of path42) {
57923
57923
  const tok = item?.[field];
57924
57924
  if (tok && "items" in tok) {
57925
57925
  item = tok.items[index];
@@ -57928,23 +57928,23 @@ var require_cst_visit = __commonJS({
57928
57928
  }
57929
57929
  return item;
57930
57930
  };
57931
- visit.parentCollection = (cst, path41) => {
57932
- const parent = visit.itemAtPath(cst, path41.slice(0, -1));
57933
- const field = path41[path41.length - 1][0];
57931
+ visit.parentCollection = (cst, path42) => {
57932
+ const parent = visit.itemAtPath(cst, path42.slice(0, -1));
57933
+ const field = path42[path42.length - 1][0];
57934
57934
  const coll = parent?.[field];
57935
57935
  if (coll && "items" in coll)
57936
57936
  return coll;
57937
57937
  throw new Error("Parent collection not found");
57938
57938
  };
57939
- function _visit(path41, item, visitor) {
57940
- let ctrl = visitor(item, path41);
57939
+ function _visit(path42, item, visitor) {
57940
+ let ctrl = visitor(item, path42);
57941
57941
  if (typeof ctrl === "symbol")
57942
57942
  return ctrl;
57943
57943
  for (const field of ["key", "value"]) {
57944
57944
  const token = item[field];
57945
57945
  if (token && "items" in token) {
57946
57946
  for (let i2 = 0; i2 < token.items.length; ++i2) {
57947
- const ci = _visit(Object.freeze(path41.concat([[field, i2]])), token.items[i2], visitor);
57947
+ const ci = _visit(Object.freeze(path42.concat([[field, i2]])), token.items[i2], visitor);
57948
57948
  if (typeof ci === "number")
57949
57949
  i2 = ci - 1;
57950
57950
  else if (ci === BREAK)
@@ -57955,10 +57955,10 @@ var require_cst_visit = __commonJS({
57955
57955
  }
57956
57956
  }
57957
57957
  if (typeof ctrl === "function" && field === "key")
57958
- ctrl = ctrl(item, path41);
57958
+ ctrl = ctrl(item, path42);
57959
57959
  }
57960
57960
  }
57961
- return typeof ctrl === "function" ? ctrl(item, path41) : ctrl;
57961
+ return typeof ctrl === "function" ? ctrl(item, path42) : ctrl;
57962
57962
  }
57963
57963
  exports2.visit = visit;
57964
57964
  }
@@ -61444,7 +61444,7 @@ var require_instrumentation3 = __commonJS({
61444
61444
  "use strict";
61445
61445
  Object.defineProperty(exports2, "__esModule", { value: true });
61446
61446
  exports2.AwsLambdaInstrumentation = exports2.AWS_HANDLER_STREAMING_RESPONSE = exports2.AWS_HANDLER_STREAMING_SYMBOL = exports2.lambdaMaxInitInMilliseconds = void 0;
61447
- var path41 = __require("path");
61447
+ var path42 = __require("path");
61448
61448
  var fs39 = __require("fs");
61449
61449
  var instrumentation_1 = require_src10();
61450
61450
  var api_1 = (init_esm(), __toCommonJS(esm_exports));
@@ -61485,10 +61485,10 @@ var require_instrumentation3 = __commonJS({
61485
61485
  this._diag.debug("Skipping lambda instrumentation: no _HANDLER/lambdaHandler or LAMBDA_TASK_ROOT.", { taskRoot, handlerDef });
61486
61486
  return [];
61487
61487
  }
61488
- const handler = path41.basename(handlerDef);
61488
+ const handler = path42.basename(handlerDef);
61489
61489
  const moduleRoot = handlerDef.substring(0, handlerDef.length - handler.length);
61490
61490
  const [module3, functionName] = handler.split(".", 2);
61491
- let filename = path41.resolve(taskRoot, moduleRoot, module3);
61491
+ let filename = path42.resolve(taskRoot, moduleRoot, module3);
61492
61492
  if (!filename.endsWith(".js")) {
61493
61493
  try {
61494
61494
  fs39.statSync(`${filename}.js`);
@@ -65305,15 +65305,15 @@ var require_utils15 = __commonJS({
65305
65305
  return { isLayerPathStored: true };
65306
65306
  };
65307
65307
  exports2.storeLayerPath = storeLayerPath;
65308
- var getRouterPath = (path41, layer) => {
65308
+ var getRouterPath = (path42, layer) => {
65309
65309
  const stackLayer = layer.handle?.stack?.[0];
65310
65310
  if (stackLayer?.route?.path) {
65311
- return `${path41}${stackLayer.route.path}`;
65311
+ return `${path42}${stackLayer.route.path}`;
65312
65312
  }
65313
65313
  if (stackLayer?.handle?.stack) {
65314
- return (0, exports2.getRouterPath)(path41, stackLayer);
65314
+ return (0, exports2.getRouterPath)(path42, stackLayer);
65315
65315
  }
65316
- return path41;
65316
+ return path42;
65317
65317
  };
65318
65318
  exports2.getRouterPath = getRouterPath;
65319
65319
  var getLayerMetadata = (route, layer, layerPath) => {
@@ -65395,7 +65395,7 @@ var require_utils15 = __commonJS({
65395
65395
  };
65396
65396
  function getConstructedRoute(req) {
65397
65397
  const layersStore = Array.isArray(req[internal_types_1._LAYERS_STORE_PROPERTY]) ? req[internal_types_1._LAYERS_STORE_PROPERTY] : [];
65398
- const meaningfulPaths = layersStore.filter((path41) => path41 !== "/" && path41 !== "/*");
65398
+ const meaningfulPaths = layersStore.filter((path42) => path42 !== "/" && path42 !== "/*");
65399
65399
  if (meaningfulPaths.length === 1 && meaningfulPaths[0] === "*") {
65400
65400
  return "*";
65401
65401
  }
@@ -65407,7 +65407,7 @@ var require_utils15 = __commonJS({
65407
65407
  if (layersStore.length === 0) {
65408
65408
  return void 0;
65409
65409
  }
65410
- if (layersStore.every((path41) => path41 === "/")) {
65410
+ if (layersStore.every((path42) => path42 === "/")) {
65411
65411
  return req.originalUrl === "/" ? "/" : void 0;
65412
65412
  }
65413
65413
  const constructedRoute = getConstructedRoute(req);
@@ -66410,8 +66410,8 @@ var require_instrumentation12 = __commonJS({
66410
66410
  }
66411
66411
  };
66412
66412
  const functionWithOriginalProperties = patchedFunctionWithOriginalProperties(patchedFunction, original);
66413
- const promisified = function(path41) {
66414
- return new Promise((resolve3) => functionWithOriginalProperties(path41, resolve3));
66413
+ const promisified = function(path42) {
66414
+ return new Promise((resolve3) => functionWithOriginalProperties(path42, resolve3));
66415
66415
  };
66416
66416
  Object.defineProperty(promisified, "name", { value: functionName });
66417
66417
  Object.defineProperty(functionWithOriginalProperties, util_1.promisify.custom, {
@@ -66763,23 +66763,23 @@ var require_utils18 = __commonJS({
66763
66763
  span.setAttribute(AttributeNames_1.AttributeNames.SOURCE, source);
66764
66764
  }
66765
66765
  exports2.addSpanSource = addSpanSource;
66766
- function createFieldIfNotExists(tracer2, getConfig, contextValue, info, path41) {
66767
- let field = getField(contextValue, path41);
66766
+ function createFieldIfNotExists(tracer2, getConfig, contextValue, info, path42) {
66767
+ let field = getField(contextValue, path42);
66768
66768
  if (field) {
66769
66769
  return { field, spanAdded: false };
66770
66770
  }
66771
66771
  const config2 = getConfig();
66772
- const parentSpan = config2.flatResolveSpans ? getRootSpan(contextValue) : getParentFieldSpan(contextValue, path41);
66772
+ const parentSpan = config2.flatResolveSpans ? getRootSpan(contextValue) : getParentFieldSpan(contextValue, path42);
66773
66773
  field = {
66774
- span: createResolverSpan(tracer2, getConfig, contextValue, info, path41, parentSpan)
66774
+ span: createResolverSpan(tracer2, getConfig, contextValue, info, path42, parentSpan)
66775
66775
  };
66776
- addField(contextValue, path41, field);
66776
+ addField(contextValue, path42, field);
66777
66777
  return { field, spanAdded: true };
66778
66778
  }
66779
- function createResolverSpan(tracer2, getConfig, contextValue, info, path41, parentSpan) {
66779
+ function createResolverSpan(tracer2, getConfig, contextValue, info, path42, parentSpan) {
66780
66780
  const attributes = {
66781
66781
  [AttributeNames_1.AttributeNames.FIELD_NAME]: info.fieldName,
66782
- [AttributeNames_1.AttributeNames.FIELD_PATH]: path41.join("."),
66782
+ [AttributeNames_1.AttributeNames.FIELD_PATH]: path42.join("."),
66783
66783
  [AttributeNames_1.AttributeNames.FIELD_TYPE]: info.returnType.toString(),
66784
66784
  [AttributeNames_1.AttributeNames.PARENT_NAME]: info.parentType.name
66785
66785
  };
@@ -66811,15 +66811,15 @@ var require_utils18 = __commonJS({
66811
66811
  }
66812
66812
  }
66813
66813
  exports2.getOperation = getOperation;
66814
- function addField(contextValue, path41, field) {
66815
- return contextValue[symbols_1.OTEL_GRAPHQL_DATA_SYMBOL].fields[path41.join(".")] = field;
66814
+ function addField(contextValue, path42, field) {
66815
+ return contextValue[symbols_1.OTEL_GRAPHQL_DATA_SYMBOL].fields[path42.join(".")] = field;
66816
66816
  }
66817
- function getField(contextValue, path41) {
66818
- return contextValue[symbols_1.OTEL_GRAPHQL_DATA_SYMBOL].fields[path41.join(".")];
66817
+ function getField(contextValue, path42) {
66818
+ return contextValue[symbols_1.OTEL_GRAPHQL_DATA_SYMBOL].fields[path42.join(".")];
66819
66819
  }
66820
- function getParentFieldSpan(contextValue, path41) {
66821
- for (let i2 = path41.length - 1; i2 > 0; i2--) {
66822
- const field = getField(contextValue, path41.slice(0, i2));
66820
+ function getParentFieldSpan(contextValue, path42) {
66821
+ for (let i2 = path42.length - 1; i2 > 0; i2--) {
66822
+ const field = getField(contextValue, path42.slice(0, i2));
66823
66823
  if (field) {
66824
66824
  return field.span;
66825
66825
  }
@@ -66829,9 +66829,9 @@ var require_utils18 = __commonJS({
66829
66829
  function getRootSpan(contextValue) {
66830
66830
  return contextValue[symbols_1.OTEL_GRAPHQL_DATA_SYMBOL].span;
66831
66831
  }
66832
- function pathToArray(mergeItems, path41) {
66832
+ function pathToArray(mergeItems, path42) {
66833
66833
  const flattened = [];
66834
- let curr = path41;
66834
+ let curr = path42;
66835
66835
  while (curr) {
66836
66836
  let key = curr.key;
66837
66837
  if (mergeItems && typeof key === "number") {
@@ -66984,14 +66984,14 @@ var require_utils18 = __commonJS({
66984
66984
  if (!contextValue[symbols_1.OTEL_GRAPHQL_DATA_SYMBOL]) {
66985
66985
  return fieldResolver.call(this, source, args, contextValue, info);
66986
66986
  }
66987
- const path41 = pathToArray(config2.mergeItems, info && info.path);
66988
- const depth = path41.filter((item) => typeof item === "string").length;
66987
+ const path42 = pathToArray(config2.mergeItems, info && info.path);
66988
+ const depth = path42.filter((item) => typeof item === "string").length;
66989
66989
  let span;
66990
66990
  let shouldEndSpan = false;
66991
66991
  if (config2.depth >= 0 && config2.depth < depth) {
66992
- span = getParentFieldSpan(contextValue, path41);
66992
+ span = getParentFieldSpan(contextValue, path42);
66993
66993
  } else {
66994
- const { field, spanAdded } = createFieldIfNotExists(tracer2, getConfig, contextValue, info, path41);
66994
+ const { field, spanAdded } = createFieldIfNotExists(tracer2, getConfig, contextValue, info, path42);
66995
66995
  span = field.span;
66996
66996
  shouldEndSpan = spanAdded;
66997
66997
  }
@@ -68679,26 +68679,26 @@ var require_utils21 = __commonJS({
68679
68679
  const reqUrlObject = requestUrl || {};
68680
68680
  const protocol = reqUrlObject.protocol || fallbackProtocol;
68681
68681
  const port = (reqUrlObject.port || "").toString();
68682
- let path41 = reqUrlObject.path || "/";
68682
+ let path42 = reqUrlObject.path || "/";
68683
68683
  let host = reqUrlObject.host || reqUrlObject.hostname || headers.host || "localhost";
68684
68684
  if (host.indexOf(":") === -1 && port && port !== "80" && port !== "443") {
68685
68685
  host += `:${port}`;
68686
68686
  }
68687
- if (path41.includes("?")) {
68687
+ if (path42.includes("?")) {
68688
68688
  try {
68689
- const parsedUrl = new URL(path41, "http://localhost");
68689
+ const parsedUrl = new URL(path42, "http://localhost");
68690
68690
  const sensitiveParamsToRedact = redactedQueryParams || [];
68691
68691
  for (const sensitiveParam of sensitiveParamsToRedact) {
68692
68692
  if (parsedUrl.searchParams.get(sensitiveParam)) {
68693
68693
  parsedUrl.searchParams.set(sensitiveParam, internal_types_2.STR_REDACTED);
68694
68694
  }
68695
68695
  }
68696
- path41 = `${parsedUrl.pathname}${parsedUrl.search}`;
68696
+ path42 = `${parsedUrl.pathname}${parsedUrl.search}`;
68697
68697
  } catch {
68698
68698
  }
68699
68699
  }
68700
68700
  const authPart = reqUrlObject.auth ? `${internal_types_2.STR_REDACTED}:${internal_types_2.STR_REDACTED}@` : "";
68701
- return `${protocol}//${authPart}${host}${path41}`;
68701
+ return `${protocol}//${authPart}${host}${path42}`;
68702
68702
  };
68703
68703
  exports2.getAbsoluteUrl = getAbsoluteUrl;
68704
68704
  var parseResponseStatus = (kind, statusCode) => {
@@ -71108,11 +71108,11 @@ var require_instrumentation20 = __commonJS({
71108
71108
  const router = dispatchLayer.router;
71109
71109
  const routesStack = router?.stack ?? [];
71110
71110
  for (const pathLayer of routesStack) {
71111
- const path41 = pathLayer.path;
71111
+ const path42 = pathLayer.path;
71112
71112
  const pathStack = pathLayer.stack;
71113
71113
  for (let j = 0; j < pathStack.length; j++) {
71114
71114
  const routedMiddleware = pathStack[j];
71115
- pathStack[j] = this._patchLayer(routedMiddleware, true, path41);
71115
+ pathStack[j] = this._patchLayer(routedMiddleware, true, path42);
71116
71116
  }
71117
71117
  }
71118
71118
  return dispatchLayer;
@@ -76994,8 +76994,8 @@ var require_instrumentation34 = __commonJS({
76994
76994
  }
76995
76995
  _methodPatcher(original, methodName) {
76996
76996
  const instrumentation = this;
76997
- return function(path41, ...handler) {
76998
- return original.call(this, path41, ...instrumentation._handlerPatcher({ type: types_1.LayerType.REQUEST_HANDLER, path: path41, methodName }, handler));
76997
+ return function(path42, ...handler) {
76998
+ return original.call(this, path42, ...instrumentation._handlerPatcher({ type: types_1.LayerType.REQUEST_HANDLER, path: path42, methodName }, handler));
76999
76999
  };
77000
77000
  }
77001
77001
  // will return the same type as `handler`, but all functions recursively patched
@@ -86002,22 +86002,22 @@ var init_from = __esm({
86002
86002
  init_file();
86003
86003
  init_fetch_blob();
86004
86004
  ({ stat } = fs2);
86005
- blobFromSync = (path41, type) => fromBlob(statSync(path41), path41, type);
86006
- blobFrom = (path41, type) => stat(path41).then((stat2) => fromBlob(stat2, path41, type));
86007
- fileFrom = (path41, type) => stat(path41).then((stat2) => fromFile(stat2, path41, type));
86008
- fileFromSync = (path41, type) => fromFile(statSync(path41), path41, type);
86009
- fromBlob = (stat2, path41, type = "") => new fetch_blob_default([new BlobDataItem({
86010
- path: path41,
86005
+ blobFromSync = (path42, type) => fromBlob(statSync(path42), path42, type);
86006
+ blobFrom = (path42, type) => stat(path42).then((stat2) => fromBlob(stat2, path42, type));
86007
+ fileFrom = (path42, type) => stat(path42).then((stat2) => fromFile(stat2, path42, type));
86008
+ fileFromSync = (path42, type) => fromFile(statSync(path42), path42, type);
86009
+ fromBlob = (stat2, path42, type = "") => new fetch_blob_default([new BlobDataItem({
86010
+ path: path42,
86011
86011
  size: stat2.size,
86012
86012
  lastModified: stat2.mtimeMs,
86013
86013
  start: 0
86014
86014
  })], { type });
86015
- fromFile = (stat2, path41, type = "") => new file_default([new BlobDataItem({
86016
- path: path41,
86015
+ fromFile = (stat2, path42, type = "") => new file_default([new BlobDataItem({
86016
+ path: path42,
86017
86017
  size: stat2.size,
86018
86018
  lastModified: stat2.mtimeMs,
86019
86019
  start: 0
86020
- })], basename(path41), { type, lastModified: stat2.mtimeMs });
86020
+ })], basename(path42), { type, lastModified: stat2.mtimeMs });
86021
86021
  BlobDataItem = class _BlobDataItem {
86022
86022
  #path;
86023
86023
  #start;
@@ -92016,8 +92016,8 @@ var require_req = __commonJS({
92016
92016
  if (req.originalUrl) {
92017
92017
  _req.url = req.originalUrl;
92018
92018
  } else {
92019
- const path41 = req.path;
92020
- _req.url = typeof path41 === "string" ? path41 : req.url ? req.url.path || req.url : void 0;
92019
+ const path42 = req.path;
92020
+ _req.url = typeof path42 === "string" ? path42 : req.url ? req.url.path || req.url : void 0;
92021
92021
  }
92022
92022
  if (req.query) {
92023
92023
  _req.query = req.query;
@@ -92182,14 +92182,14 @@ var require_redact = __commonJS({
92182
92182
  }
92183
92183
  return obj;
92184
92184
  }
92185
- function parsePath(path41) {
92185
+ function parsePath(path42) {
92186
92186
  const parts = [];
92187
92187
  let current = "";
92188
92188
  let inBrackets = false;
92189
92189
  let inQuotes = false;
92190
92190
  let quoteChar = "";
92191
- for (let i2 = 0; i2 < path41.length; i2++) {
92192
- const char = path41[i2];
92191
+ for (let i2 = 0; i2 < path42.length; i2++) {
92192
+ const char = path42[i2];
92193
92193
  if (!inBrackets && char === ".") {
92194
92194
  if (current) {
92195
92195
  parts.push(current);
@@ -92320,10 +92320,10 @@ var require_redact = __commonJS({
92320
92320
  return current;
92321
92321
  }
92322
92322
  function redactPaths(obj, paths, censor, remove = false) {
92323
- for (const path41 of paths) {
92324
- const parts = parsePath(path41);
92323
+ for (const path42 of paths) {
92324
+ const parts = parsePath(path42);
92325
92325
  if (parts.includes("*")) {
92326
- redactWildcardPath(obj, parts, censor, path41, remove);
92326
+ redactWildcardPath(obj, parts, censor, path42, remove);
92327
92327
  } else {
92328
92328
  if (remove) {
92329
92329
  removeKey(obj, parts);
@@ -92408,8 +92408,8 @@ var require_redact = __commonJS({
92408
92408
  }
92409
92409
  } else {
92410
92410
  if (afterWildcard.includes("*")) {
92411
- const wrappedCensor = typeof censor === "function" ? (value, path41) => {
92412
- const fullPath = [...pathArray.slice(0, pathLength), ...path41];
92411
+ const wrappedCensor = typeof censor === "function" ? (value, path42) => {
92412
+ const fullPath = [...pathArray.slice(0, pathLength), ...path42];
92413
92413
  return censor(value, fullPath);
92414
92414
  } : censor;
92415
92415
  redactWildcardPath(current, afterWildcard, wrappedCensor, originalPath, remove);
@@ -92444,8 +92444,8 @@ var require_redact = __commonJS({
92444
92444
  return null;
92445
92445
  }
92446
92446
  const pathStructure = /* @__PURE__ */ new Map();
92447
- for (const path41 of pathsToClone) {
92448
- const parts = parsePath(path41);
92447
+ for (const path42 of pathsToClone) {
92448
+ const parts = parsePath(path42);
92449
92449
  let current = pathStructure;
92450
92450
  for (let i2 = 0; i2 < parts.length; i2++) {
92451
92451
  const part = parts[i2];
@@ -92497,24 +92497,24 @@ var require_redact = __commonJS({
92497
92497
  }
92498
92498
  return cloneSelectively(obj, pathStructure);
92499
92499
  }
92500
- function validatePath(path41) {
92501
- if (typeof path41 !== "string") {
92500
+ function validatePath(path42) {
92501
+ if (typeof path42 !== "string") {
92502
92502
  throw new Error("Paths must be (non-empty) strings");
92503
92503
  }
92504
- if (path41 === "") {
92504
+ if (path42 === "") {
92505
92505
  throw new Error("Invalid redaction path ()");
92506
92506
  }
92507
- if (path41.includes("..")) {
92508
- throw new Error(`Invalid redaction path (${path41})`);
92507
+ if (path42.includes("..")) {
92508
+ throw new Error(`Invalid redaction path (${path42})`);
92509
92509
  }
92510
- if (path41.includes(",")) {
92511
- throw new Error(`Invalid redaction path (${path41})`);
92510
+ if (path42.includes(",")) {
92511
+ throw new Error(`Invalid redaction path (${path42})`);
92512
92512
  }
92513
92513
  let bracketCount = 0;
92514
92514
  let inQuotes = false;
92515
92515
  let quoteChar = "";
92516
- for (let i2 = 0; i2 < path41.length; i2++) {
92517
- const char = path41[i2];
92516
+ for (let i2 = 0; i2 < path42.length; i2++) {
92517
+ const char = path42[i2];
92518
92518
  if ((char === '"' || char === "'") && bracketCount > 0) {
92519
92519
  if (!inQuotes) {
92520
92520
  inQuotes = true;
@@ -92528,20 +92528,20 @@ var require_redact = __commonJS({
92528
92528
  } else if (char === "]" && !inQuotes) {
92529
92529
  bracketCount--;
92530
92530
  if (bracketCount < 0) {
92531
- throw new Error(`Invalid redaction path (${path41})`);
92531
+ throw new Error(`Invalid redaction path (${path42})`);
92532
92532
  }
92533
92533
  }
92534
92534
  }
92535
92535
  if (bracketCount !== 0) {
92536
- throw new Error(`Invalid redaction path (${path41})`);
92536
+ throw new Error(`Invalid redaction path (${path42})`);
92537
92537
  }
92538
92538
  }
92539
92539
  function validatePaths(paths) {
92540
92540
  if (!Array.isArray(paths)) {
92541
92541
  throw new TypeError("paths must be an array");
92542
92542
  }
92543
- for (const path41 of paths) {
92544
- validatePath(path41);
92543
+ for (const path42 of paths) {
92544
+ validatePath(path42);
92545
92545
  }
92546
92546
  }
92547
92547
  function slowRedact(options = {}) {
@@ -92709,8 +92709,8 @@ var require_redaction = __commonJS({
92709
92709
  if (shape[k] === null) {
92710
92710
  o[k] = (value) => topCensor(value, [k]);
92711
92711
  } else {
92712
- const wrappedCensor = typeof censor === "function" ? (value, path41) => {
92713
- return censor(value, [k, ...path41]);
92712
+ const wrappedCensor = typeof censor === "function" ? (value, path42) => {
92713
+ return censor(value, [k, ...path42]);
92714
92714
  } : censor;
92715
92715
  o[k] = Redact({
92716
92716
  paths: shape[k],
@@ -92931,7 +92931,7 @@ var require_sonic_boom = __commonJS({
92931
92931
  var fs39 = __require("fs");
92932
92932
  var EventEmitter = __require("events");
92933
92933
  var inherits = __require("util").inherits;
92934
- var path41 = __require("path");
92934
+ var path42 = __require("path");
92935
92935
  var sleep3 = require_atomic_sleep();
92936
92936
  var assert2 = __require("assert");
92937
92937
  var BUSY_WRITE_TIMEOUT = 100;
@@ -92985,7 +92985,7 @@ var require_sonic_boom = __commonJS({
92985
92985
  const mode = sonic.mode;
92986
92986
  if (sonic.sync) {
92987
92987
  try {
92988
- if (sonic.mkdir) fs39.mkdirSync(path41.dirname(file2), { recursive: true });
92988
+ if (sonic.mkdir) fs39.mkdirSync(path42.dirname(file2), { recursive: true });
92989
92989
  const fd = fs39.openSync(file2, flags, mode);
92990
92990
  fileOpened(null, fd);
92991
92991
  } catch (err) {
@@ -92993,7 +92993,7 @@ var require_sonic_boom = __commonJS({
92993
92993
  throw err;
92994
92994
  }
92995
92995
  } else if (sonic.mkdir) {
92996
- fs39.mkdir(path41.dirname(file2), { recursive: true }, (err) => {
92996
+ fs39.mkdir(path42.dirname(file2), { recursive: true }, (err) => {
92997
92997
  if (err) return fileOpened(err);
92998
92998
  fs39.open(file2, flags, mode, fileOpened);
92999
92999
  });
@@ -94227,15 +94227,15 @@ var require_transport2 = __commonJS({
94227
94227
  if (!unquoted) {
94228
94228
  return false;
94229
94229
  }
94230
- let path41 = unquoted;
94231
- if (path41.startsWith("file://")) {
94230
+ let path42 = unquoted;
94231
+ if (path42.startsWith("file://")) {
94232
94232
  try {
94233
- path41 = fileURLToPath5(path41);
94233
+ path42 = fileURLToPath5(path42);
94234
94234
  } catch {
94235
94235
  return false;
94236
94236
  }
94237
94237
  }
94238
- return isAbsolute(path41) && !existsSync2(path41);
94238
+ return isAbsolute(path42) && !existsSync2(path42);
94239
94239
  }
94240
94240
  function stripQuotes(value) {
94241
94241
  const first = value[0];
@@ -96468,10 +96468,10 @@ function mergeDefs(...defs) {
96468
96468
  function cloneDef(schema) {
96469
96469
  return mergeDefs(schema._zod.def);
96470
96470
  }
96471
- function getElementAtPath(obj, path41) {
96472
- if (!path41)
96471
+ function getElementAtPath(obj, path42) {
96472
+ if (!path42)
96473
96473
  return obj;
96474
- return path41.reduce((acc, key) => acc?.[key], obj);
96474
+ return path42.reduce((acc, key) => acc?.[key], obj);
96475
96475
  }
96476
96476
  function promiseAllObject(promisesObj) {
96477
96477
  const keys = Object.keys(promisesObj);
@@ -96783,11 +96783,11 @@ function aborted(x2, startIndex = 0) {
96783
96783
  }
96784
96784
  return false;
96785
96785
  }
96786
- function prefixIssues(path41, issues) {
96786
+ function prefixIssues(path42, issues) {
96787
96787
  return issues.map((iss) => {
96788
96788
  var _a2;
96789
96789
  (_a2 = iss).path ?? (_a2.path = []);
96790
- iss.path.unshift(path41);
96790
+ iss.path.unshift(path42);
96791
96791
  return iss;
96792
96792
  });
96793
96793
  }
@@ -97029,7 +97029,7 @@ function formatError(error48, mapper = (issue2) => issue2.message) {
97029
97029
  }
97030
97030
  function treeifyError(error48, mapper = (issue2) => issue2.message) {
97031
97031
  const result = { errors: [] };
97032
- const processError = (error49, path41 = []) => {
97032
+ const processError = (error49, path42 = []) => {
97033
97033
  var _a2, _b;
97034
97034
  for (const issue2 of error49.issues) {
97035
97035
  if (issue2.code === "invalid_union" && issue2.errors.length) {
@@ -97039,7 +97039,7 @@ function treeifyError(error48, mapper = (issue2) => issue2.message) {
97039
97039
  } else if (issue2.code === "invalid_element") {
97040
97040
  processError({ issues: issue2.issues }, issue2.path);
97041
97041
  } else {
97042
- const fullpath = [...path41, ...issue2.path];
97042
+ const fullpath = [...path42, ...issue2.path];
97043
97043
  if (fullpath.length === 0) {
97044
97044
  result.errors.push(mapper(issue2));
97045
97045
  continue;
@@ -97071,8 +97071,8 @@ function treeifyError(error48, mapper = (issue2) => issue2.message) {
97071
97071
  }
97072
97072
  function toDotPath(_path) {
97073
97073
  const segs = [];
97074
- const path41 = _path.map((seg) => typeof seg === "object" ? seg.key : seg);
97075
- for (const seg of path41) {
97074
+ const path42 = _path.map((seg) => typeof seg === "object" ? seg.key : seg);
97075
+ for (const seg of path42) {
97076
97076
  if (typeof seg === "number")
97077
97077
  segs.push(`[${seg}]`);
97078
97078
  else if (typeof seg === "symbol")
@@ -109766,13 +109766,13 @@ function resolveRef(ref, ctx) {
109766
109766
  if (!ref.startsWith("#")) {
109767
109767
  throw new Error("External $ref is not supported, only local refs (#/...) are allowed");
109768
109768
  }
109769
- const path41 = ref.slice(1).split("/").filter(Boolean);
109770
- if (path41.length === 0) {
109769
+ const path42 = ref.slice(1).split("/").filter(Boolean);
109770
+ if (path42.length === 0) {
109771
109771
  return ctx.rootSchema;
109772
109772
  }
109773
109773
  const defsKey = ctx.version === "draft-2020-12" ? "$defs" : "definitions";
109774
- if (path41[0] === defsKey) {
109775
- const key = path41[1];
109774
+ if (path42[0] === defsKey) {
109775
+ const key = path42[1];
109776
109776
  if (!key || !ctx.defs[key]) {
109777
109777
  throw new Error(`Reference not found: ${ref}`);
109778
109778
  }
@@ -111329,8 +111329,8 @@ import fsSync from "node:fs";
111329
111329
  import path5 from "node:path";
111330
111330
  import { fileURLToPath as fileURLToPath3 } from "node:url";
111331
111331
  function getCurrentVersion() {
111332
- if ("0.1.5") {
111333
- return "0.1.5";
111332
+ if ("0.1.7") {
111333
+ return "0.1.7";
111334
111334
  }
111335
111335
  try {
111336
111336
  const pkgPath = path5.join(THIS_DIR, "..", "..", "package.json");
@@ -116096,6 +116096,7 @@ Produce a concise JSON spec. The title should be a SHORT name (3-5 words, suitab
116096
116096
 
116097
116097
  Return ONLY valid JSON (no markdown fences):
116098
116098
  {
116099
+ "project_slug": "<kebab-case repo name, 2-4 words, e.g. email-validator-cli>",
116099
116100
  "title": "<short project name, 3-5 words, max 60 chars>",
116100
116101
  "objective": "<1-2 sentence objective>",
116101
116102
  "scope_v1": ["<concrete deliverable 1>", "<concrete deliverable 2>"],
@@ -117819,9 +117820,9 @@ var GitLabProvider = class {
117819
117820
  if (!token) return null;
117820
117821
  const os5 = await import("node:os");
117821
117822
  const fs39 = await import("node:fs/promises");
117822
- const path41 = await import("node:path");
117823
- const tmpDir = await fs39.mkdtemp(path41.join(os5.tmpdir(), "devclaw-upload-"));
117824
- const tmpFile = path41.join(tmpDir, file2.filename);
117823
+ const path42 = await import("node:path");
117824
+ const tmpDir = await fs39.mkdtemp(path42.join(os5.tmpdir(), "devclaw-upload-"));
117825
+ const tmpFile = path42.join(tmpDir, file2.filename);
117825
117826
  await fs39.writeFile(tmpFile, file2.buffer);
117826
117827
  try {
117827
117828
  const apiBase = webUrl.replace(/\/[^/]+\/[^/]+\/?$/, "");
@@ -118017,6 +118018,7 @@ function deriveRepoName(payload, explicitRepoName) {
118017
118018
  return deriveRepoNameFromCandidates([
118018
118019
  { value: explicitRepoName, source: "metadata.repo_url" },
118019
118020
  { value: payload.metadata.project_name, source: "metadata.project_name" },
118021
+ { value: payload.spec_data?.project_slug, source: "spec_data.project_slug" },
118020
118022
  { value: payload.project_map?.project_slug, source: "project_map.project_slug" },
118021
118023
  { value: payload.project_map?.project, source: "project_map.project" },
118022
118024
  { value: payload.spec?.title, source: "spec.title" },
@@ -138170,6 +138172,10 @@ var impactStep = {
138170
138172
  }
138171
138173
  };
138172
138174
 
138175
+ // lib/intake/steps/scaffold.ts
138176
+ import fsNode from "node:fs/promises";
138177
+ import path36 from "node:path";
138178
+
138173
138179
  // lib/intake/lib/scaffold-service.ts
138174
138180
  init_zod();
138175
138181
  init_runtime_paths();
@@ -138359,89 +138365,36 @@ export PATH="$ROOT_DIR/node_modules/.bin:$PATH"
138359
138365
  }
138360
138366
  function buildPythonBootstrapPrelude() {
138361
138367
  return `${buildCommonScriptPrelude()}
138362
- PYTHON_FILES=()
138363
- for candidate in pyproject.toml requirements.txt uv.lock; do
138364
- if [[ -f "$candidate" ]]; then
138365
- PYTHON_FILES+=("$candidate")
138366
- fi
138367
- done
138368
138368
 
138369
- if [[ \${#PYTHON_FILES[@]} -eq 0 ]]; then
138370
- echo "Missing pyproject.toml/requirements.txt for Python QA bootstrap" >&2
138371
- exit 2
138369
+ # --- Shared toolchain (ruff, mypy, pip-audit) ---
138370
+ TOOLCHAIN="$HOME/.openclaw/toolchains/python"
138371
+ if [ ! -x "$TOOLCHAIN/bin/ruff" ]; then
138372
+ echo "[qa] Toolchain not found \u2014 provisioning..."
138373
+ command -v uv >/dev/null 2>&1 || {
138374
+ curl -LsSf https://astral.sh/uv/install.sh | sh
138375
+ export PATH="$HOME/.local/bin:$PATH"
138376
+ }
138377
+ uv venv "$TOOLCHAIN"
138378
+ uv pip install -p "$TOOLCHAIN/bin/python" ${PYTHON_TOOLCHAIN_PACKAGES.join(" ")}
138372
138379
  fi
138373
-
138374
- BOOTSTRAP_FINGERPRINT="$(hash_files "\${PYTHON_FILES[@]}")"
138375
- VENV_DIR="$ROOT_DIR/.venv"
138376
-
138377
- create_python_venv() {
138378
- if command -v python3 >/dev/null 2>&1; then
138379
- PYTHON_BIN="python3"
138380
- elif command -v python >/dev/null 2>&1; then
138381
- PYTHON_BIN="python"
138382
- else
138383
- echo "Python interpreter not found for QA bootstrap" >&2
138384
- exit 2
138385
- fi
138386
-
138387
- if "$PYTHON_BIN" -m venv "$VENV_DIR"; then
138388
- return 0
138389
- fi
138390
-
138391
- if ! "$PYTHON_BIN" -m pip --version >/dev/null 2>&1; then
138392
- echo "Python venv bootstrap failed and pip is unavailable for virtualenv fallback" >&2
138393
- exit 2
138394
- fi
138395
-
138396
- PY_BOOT_DIR="$ROOT_DIR/${BOOTSTRAP_STATE_DIR}/python-bootstrap"
138397
- mkdir -p "$PY_BOOT_DIR"
138398
- "$PYTHON_BIN" -m pip install --disable-pip-version-check --target "$PY_BOOT_DIR" "virtualenv>=20.26.0"
138399
- PYTHONPATH="$PY_BOOT_DIR\${PYTHONPATH:+:$PYTHONPATH}" "$PYTHON_BIN" -m virtualenv "$VENV_DIR"
138400
- }
138401
-
138402
- if [[ -x "$VENV_DIR/bin/python" && -f "$STATE_FILE" ]] && [[ "$(cat "$STATE_FILE")" == "$BOOTSTRAP_FINGERPRINT" ]]; then
138403
- echo "Python test environment already prepared"
138404
- else
138405
- if [[ -f uv.lock ]]; then
138406
- require_cmd uv "uv.lock detected but uv is not installed"
138407
- uv sync --locked
138408
- elif command -v uv >/dev/null 2>&1; then
138409
- uv venv .venv
138410
-
138411
- if [[ -f requirements.txt ]]; then
138412
- uv pip install --python .venv/bin/python -r requirements.txt
138413
- fi
138414
-
138415
- if [[ -f pyproject.toml ]]; then
138416
- if grep -Eq '^[[:space:]]*dev[[:space:]]*=' pyproject.toml; then
138417
- uv pip install --python .venv/bin/python -e '.[dev]'
138418
- else
138419
- uv pip install --python .venv/bin/python -e .
138420
- fi
138421
- fi
138422
- else
138423
- create_python_venv
138424
- "$VENV_DIR/bin/python" -m pip install --upgrade pip
138425
-
138426
- if [[ -f requirements.txt ]]; then
138427
- "$VENV_DIR/bin/python" -m pip install -r requirements.txt
138428
- fi
138429
-
138430
- if [[ -f pyproject.toml ]]; then
138431
- if grep -Eq '^[[:space:]]*dev[[:space:]]*=' pyproject.toml; then
138432
- "$VENV_DIR/bin/python" -m pip install -e '.[dev]'
138433
- else
138434
- "$VENV_DIR/bin/python" -m pip install -e .
138435
- fi
138380
+ export PATH="$TOOLCHAIN/bin:$PATH"
138381
+
138382
+ # --- Project venv (runtime deps + pytest) ---
138383
+ if [ ! -x ".venv/bin/python" ]; then
138384
+ echo "[qa] .venv not found \u2014 creating..."
138385
+ command -v uv >/dev/null 2>&1 || export PATH="$HOME/.local/bin:$PATH"
138386
+ uv venv .venv
138387
+ if [ -f "pyproject.toml" ]; then
138388
+ if python3 -c "import tomllib; t=tomllib.load(open('pyproject.toml','rb')); t['project']['optional-dependencies']['dev']" 2>/dev/null; then
138389
+ uv pip install -e '.[dev]' --python .venv/bin/python
138390
+ else
138391
+ uv pip install -e . --python .venv/bin/python
138436
138392
  fi
138393
+ elif [ -f "requirements.txt" ]; then
138394
+ uv pip install -r requirements.txt --python .venv/bin/python
138437
138395
  fi
138438
-
138439
- printf '%s' "$BOOTSTRAP_FINGERPRINT" > "$STATE_FILE"
138440
- fi
138441
-
138442
- if [[ -d "$VENV_DIR/bin" ]]; then
138443
- export PATH="$VENV_DIR/bin:$PATH"
138444
138396
  fi
138397
+ export PATH=".venv/bin:$PATH"
138445
138398
  `;
138446
138399
  }
138447
138400
  function buildQaBootstrapPrelude(stack) {
@@ -138504,6 +138457,92 @@ async function runAndAssert(runCommand, repoPath, commands, command) {
138504
138457
  );
138505
138458
  }
138506
138459
  }
138460
+ var UV_INSTALL_URL = "https://astral.sh/uv/install.sh";
138461
+ async function ensureUv(runCommand, log3) {
138462
+ const emit2 = log3 ?? (() => {
138463
+ });
138464
+ const check2 = await runCommand("uv", ["--version"], { timeout: 1e4 }).catch(() => ({
138465
+ stdout: "",
138466
+ stderr: "",
138467
+ exitCode: 1
138468
+ }));
138469
+ if (check2.exitCode === 0) {
138470
+ emit2(`[test-env] uv already available: ${check2.stdout.trim()}`);
138471
+ return "uv";
138472
+ }
138473
+ emit2("[test-env] uv not found \u2014 installing via official script...");
138474
+ const install = await runCommand("bash", [
138475
+ "-c",
138476
+ `curl -LsSf ${UV_INSTALL_URL} | sh`
138477
+ ], { timeout: 12e4 }).catch(() => ({ stdout: "", stderr: "", exitCode: 1 }));
138478
+ if (install.exitCode !== 0) {
138479
+ throw new Error(
138480
+ `Failed to install uv. Install manually: curl -LsSf ${UV_INSTALL_URL} | sh
138481
+ Details: ${(install.stderr || install.stdout || "unknown error").trim()}`
138482
+ );
138483
+ }
138484
+ const verify2 = await runCommand("uv", ["--version"], { timeout: 1e4 }).catch(() => ({
138485
+ stdout: "",
138486
+ stderr: "",
138487
+ exitCode: 1
138488
+ }));
138489
+ if (verify2.exitCode === 0) {
138490
+ emit2(`[test-env] uv installed successfully: ${verify2.stdout.trim()}`);
138491
+ return "uv";
138492
+ }
138493
+ const home = process.env.HOME ?? "";
138494
+ const fallbackPath = path34.join(home, ".local", "bin", "uv");
138495
+ try {
138496
+ await fs34.access(fallbackPath);
138497
+ emit2(`[test-env] uv installed at fallback path: ${fallbackPath}`);
138498
+ return fallbackPath;
138499
+ } catch {
138500
+ throw new Error(
138501
+ `uv installed but not found. Expected at: ${fallbackPath}
138502
+ Install manually: curl -LsSf ${UV_INSTALL_URL} | sh`
138503
+ );
138504
+ }
138505
+ }
138506
+ var PYTHON_TOOLCHAIN_PACKAGES = ["ruff", "mypy", "pip-audit"];
138507
+ var TOOLCHAIN_DIR = ".openclaw/toolchains/python";
138508
+ var TOOLCHAIN_FINGERPRINT_FILE = "toolchain.sha256";
138509
+ function toolchainFingerprint() {
138510
+ return createHash4("sha256").update(PYTHON_TOOLCHAIN_PACKAGES.join(",")).digest("hex");
138511
+ }
138512
+ async function ensurePythonToolchain(runCommand, homeDir) {
138513
+ const home = homeDir ?? process.env.HOME ?? "/tmp";
138514
+ const toolchainPath = path34.join(home, TOOLCHAIN_DIR);
138515
+ const ruffPath = path34.join(toolchainPath, "bin", "ruff");
138516
+ const fingerprintPath = path34.join(toolchainPath, TOOLCHAIN_FINGERPRINT_FILE);
138517
+ const expectedFp = toolchainFingerprint();
138518
+ if (await pathExists(ruffPath)) {
138519
+ try {
138520
+ const currentFp = (await fs34.readFile(fingerprintPath, "utf-8")).trim();
138521
+ if (currentFp === expectedFp) {
138522
+ return toolchainPath;
138523
+ }
138524
+ } catch {
138525
+ }
138526
+ await fs34.rm(toolchainPath, { recursive: true, force: true });
138527
+ }
138528
+ await fs34.mkdir(path34.dirname(toolchainPath), { recursive: true });
138529
+ const venvResult = await runCommand("uv", ["venv", toolchainPath], { timeout: 6e4 });
138530
+ if (venvResult.exitCode !== 0) {
138531
+ throw new Error(`Failed to create toolchain venv: ${venvResult.stderr}`);
138532
+ }
138533
+ const installResult = await runCommand("uv", [
138534
+ "pip",
138535
+ "install",
138536
+ "-p",
138537
+ path34.join(toolchainPath, "bin", "python"),
138538
+ ...PYTHON_TOOLCHAIN_PACKAGES
138539
+ ], { timeout: 12e4 });
138540
+ if (installResult.exitCode !== 0) {
138541
+ throw new Error(`Failed to install toolchain packages: ${installResult.stderr}`);
138542
+ }
138543
+ await fs34.writeFile(fingerprintPath, expectedFp, "utf-8");
138544
+ return toolchainPath;
138545
+ }
138507
138546
  async function hasPyprojectDevExtra(repoPath) {
138508
138547
  const pyprojectPath = path34.join(repoPath, "pyproject.toml");
138509
138548
  if (!await pathExists(pyprojectPath)) return false;
@@ -138739,11 +138778,6 @@ async function ensureNodeEnvironment(repoPath, stack, mode, runCommand) {
138739
138778
  fingerprint: newFingerprint
138740
138779
  };
138741
138780
  }
138742
- async function resolvePythonInterpreter(runCommand) {
138743
- if (await toolExists(runCommand, "python3")) return "python3";
138744
- if (await toolExists(runCommand, "python")) return "python";
138745
- return null;
138746
- }
138747
138781
  async function ensurePythonEnvironment(repoPath, stack, runCommand) {
138748
138782
  const commandsRun = [];
138749
138783
  const fingerprint = await computeFingerprint(repoPath, ["pyproject.toml", "requirements.txt", "uv.lock"]);
@@ -138756,18 +138790,18 @@ async function ensurePythonEnvironment(repoPath, stack, runCommand) {
138756
138790
  skipped: true,
138757
138791
  stack,
138758
138792
  family: "python",
138759
- toolchain: "python",
138760
- packageManager: "pip",
138793
+ toolchain: "uv",
138794
+ packageManager: "uv",
138761
138795
  lockfile: await pathExists(path34.join(repoPath, "uv.lock")) ? "uv.lock" : null,
138762
138796
  environmentPath: venvPath,
138763
138797
  commandsRun,
138764
138798
  fingerprint
138765
138799
  };
138766
138800
  }
138801
+ await ensureUv(runCommand);
138767
138802
  const uvLock = await pathExists(path34.join(repoPath, "uv.lock"));
138768
138803
  const pyproject = await pathExists(path34.join(repoPath, "pyproject.toml"));
138769
138804
  const requirements = await pathExists(path34.join(repoPath, "requirements.txt"));
138770
- const hasUv = await toolExists(runCommand, "uv");
138771
138805
  if (!uvLock && !pyproject && !requirements) {
138772
138806
  return {
138773
138807
  ready: false,
@@ -138783,22 +138817,8 @@ async function ensurePythonEnvironment(repoPath, stack, runCommand) {
138783
138817
  reason: "missing_pyproject_or_requirements"
138784
138818
  };
138785
138819
  }
138820
+ await ensurePythonToolchain(runCommand);
138786
138821
  if (uvLock) {
138787
- if (!hasUv) {
138788
- return {
138789
- ready: false,
138790
- skipped: false,
138791
- stack,
138792
- family: "python",
138793
- toolchain: "python",
138794
- packageManager: "uv",
138795
- lockfile: "uv.lock",
138796
- environmentPath: null,
138797
- commandsRun,
138798
- fingerprint,
138799
- reason: "uv_lock_without_uv"
138800
- };
138801
- }
138802
138822
  await runAndAssert(runCommand, repoPath, commandsRun, {
138803
138823
  cmd: "uv",
138804
138824
  args: ["sync", "--locked"],
@@ -138810,7 +138830,7 @@ async function ensurePythonEnvironment(repoPath, stack, runCommand) {
138810
138830
  skipped: false,
138811
138831
  stack,
138812
138832
  family: "python",
138813
- toolchain: "python",
138833
+ toolchain: "uv",
138814
138834
  packageManager: "uv",
138815
138835
  lockfile: "uv.lock",
138816
138836
  environmentPath: venvPath,
@@ -138818,95 +138838,24 @@ async function ensurePythonEnvironment(repoPath, stack, runCommand) {
138818
138838
  fingerprint
138819
138839
  };
138820
138840
  }
138821
- if (hasUv) {
138822
- await runAndAssert(runCommand, repoPath, commandsRun, {
138823
- cmd: "uv",
138824
- args: ["venv", ".venv"],
138825
- reason: "create project-local virtualenv with uv"
138826
- });
138827
- if (requirements) {
138828
- await runAndAssert(runCommand, repoPath, commandsRun, {
138829
- cmd: "uv",
138830
- args: ["pip", "install", "--python", ".venv/bin/python", "-r", "requirements.txt"],
138831
- reason: "install requirements.txt dependencies with uv"
138832
- });
138833
- }
138834
- if (pyproject) {
138835
- const hasDevExtra = await hasPyprojectDevExtra(repoPath);
138836
- await runAndAssert(runCommand, repoPath, commandsRun, {
138837
- cmd: "uv",
138838
- args: ["pip", "install", "--python", ".venv/bin/python", "-e", hasDevExtra ? ".[dev]" : "."],
138839
- reason: hasDevExtra ? "install editable project with dev extras via uv" : "install editable project via uv"
138840
- });
138841
- }
138842
- if (fingerprint) await writeBootstrapFingerprint(repoPath, fingerprint);
138843
- return {
138844
- ready: true,
138845
- skipped: false,
138846
- stack,
138847
- family: "python",
138848
- toolchain: "python",
138849
- packageManager: "uv",
138850
- lockfile: null,
138851
- environmentPath: venvPath,
138852
- commandsRun,
138853
- fingerprint
138854
- };
138855
- }
138856
- const pythonInterpreter = await resolvePythonInterpreter(runCommand);
138857
- if (!pythonInterpreter) {
138858
- return {
138859
- ready: false,
138860
- skipped: false,
138861
- stack,
138862
- family: "python",
138863
- toolchain: "python",
138864
- packageManager: "pip",
138865
- lockfile: null,
138866
- environmentPath: null,
138867
- commandsRun,
138868
- fingerprint,
138869
- reason: "python_not_available"
138870
- };
138871
- }
138872
- await runAndAssert(runCommand, repoPath, commandsRun, {
138873
- cmd: pythonInterpreter,
138874
- args: ["-m", "venv", ".venv"],
138875
- reason: "create project-local virtualenv"
138876
- }).catch(async () => {
138877
- const bootstrapDir = path34.join(repoPath, BOOTSTRAP_STATE_DIR, "python-bootstrap");
138878
- await runAndAssert(runCommand, repoPath, commandsRun, {
138879
- cmd: pythonInterpreter,
138880
- args: ["-m", "pip", "install", "--disable-pip-version-check", "--target", bootstrapDir, "virtualenv>=20.26.0"],
138881
- reason: "install local virtualenv fallback"
138882
- });
138883
- await runAndAssert(runCommand, repoPath, commandsRun, {
138884
- cmd: pythonInterpreter,
138885
- args: ["-m", "virtualenv", ".venv"],
138886
- env: {
138887
- PYTHONPATH: `${bootstrapDir}${process.env.PYTHONPATH ? `:${process.env.PYTHONPATH}` : ""}`
138888
- },
138889
- reason: "create project-local virtualenv with fallback"
138890
- });
138891
- });
138892
138841
  await runAndAssert(runCommand, repoPath, commandsRun, {
138893
- cmd: venvPython,
138894
- args: ["-m", "pip", "install", "--upgrade", "pip"],
138895
- reason: "upgrade pip in project-local virtualenv"
138842
+ cmd: "uv",
138843
+ args: ["venv", ".venv"],
138844
+ reason: "create project-local virtualenv with uv"
138896
138845
  });
138897
138846
  if (requirements) {
138898
138847
  await runAndAssert(runCommand, repoPath, commandsRun, {
138899
- cmd: venvPython,
138900
- args: ["-m", "pip", "install", "-r", "requirements.txt"],
138901
- reason: "install requirements.txt dependencies"
138848
+ cmd: "uv",
138849
+ args: ["pip", "install", "--python", ".venv/bin/python", "-r", "requirements.txt"],
138850
+ reason: "install requirements.txt dependencies with uv"
138902
138851
  });
138903
138852
  }
138904
138853
  if (pyproject) {
138905
138854
  const hasDevExtra = await hasPyprojectDevExtra(repoPath);
138906
138855
  await runAndAssert(runCommand, repoPath, commandsRun, {
138907
- cmd: venvPython,
138908
- args: ["-m", "pip", "install", "-e", hasDevExtra ? ".[dev]" : "."],
138909
- reason: hasDevExtra ? "install editable project with dev extras" : "install editable project"
138856
+ cmd: "uv",
138857
+ args: ["pip", "install", "--python", ".venv/bin/python", "-e", hasDevExtra ? ".[dev]" : "."],
138858
+ reason: hasDevExtra ? "install editable project with dev extras via uv" : "install editable project via uv"
138910
138859
  });
138911
138860
  }
138912
138861
  if (fingerprint) await writeBootstrapFingerprint(repoPath, fingerprint);
@@ -138915,8 +138864,8 @@ async function ensurePythonEnvironment(repoPath, stack, runCommand) {
138915
138864
  skipped: false,
138916
138865
  stack,
138917
138866
  family: "python",
138918
- toolchain: "python",
138919
- packageManager: "pip",
138867
+ toolchain: "uv",
138868
+ packageManager: "uv",
138920
138869
  lockfile: null,
138921
138870
  environmentPath: venvPath,
138922
138871
  commandsRun,
@@ -139062,6 +139011,80 @@ function parseScaffoldOutput(stdout) {
139062
139011
  return parsed.scaffold;
139063
139012
  }
139064
139013
 
139014
+ // lib/quality/qa-contracts.ts
139015
+ var GATE_NAMES = ["lint", "types", "security", "tests", "coverage"];
139016
+ var COVERAGE_THRESHOLD = 80;
139017
+ function generateQaContract(opts) {
139018
+ const { spec, stack, acceptanceCriteria } = opts;
139019
+ const cmds = getQaGateCommands(stack);
139020
+ const acs = acceptanceCriteria ?? spec.acceptance_criteria;
139021
+ const script = buildQaScript(cmds, stack, acs);
139022
+ return {
139023
+ gates: [...GATE_NAMES],
139024
+ acceptance_tests: acs,
139025
+ script_content: script
139026
+ };
139027
+ }
139028
+ function buildQaScript(cmds, stack, acs) {
139029
+ const acComments = acs.map((ac, i2) => `# AC${i2 + 1}: ${ac}`).join("\n");
139030
+ return `#!/usr/bin/env bash
139031
+ # qa.sh \u2014 Generated QA contract
139032
+ # Stack: ${stack}
139033
+ # Coverage threshold: ${COVERAGE_THRESHOLD}%
139034
+ #
139035
+ # Acceptance Criteria:
139036
+ ${acComments}
139037
+
139038
+ set -euo pipefail
139039
+
139040
+ ${buildQaBootstrapPrelude(stack)}
139041
+
139042
+ PASS=0
139043
+ FAIL=0
139044
+
139045
+ gate() {
139046
+ local name="$1"
139047
+ shift
139048
+ echo "=== Gate: $name ==="
139049
+ if "$@"; then
139050
+ echo "\u2705 $name PASSED"
139051
+ PASS=$((PASS + 1))
139052
+ else
139053
+ echo "\u274C $name FAILED"
139054
+ FAIL=$((FAIL + 1))
139055
+ fi
139056
+ echo ""
139057
+ }
139058
+
139059
+ # Gate 1: Lint
139060
+ gate "lint" ${cmds.lint}
139061
+
139062
+ # Gate 2: Type checking
139063
+ gate "types" ${cmds.types}
139064
+
139065
+ # Gate 3: Security audit
139066
+ gate "security" ${cmds.security}
139067
+
139068
+ # Gate 4: Tests
139069
+ gate "tests" ${cmds.tests}
139070
+
139071
+ # Gate 5: Coverage (>= ${COVERAGE_THRESHOLD}%)
139072
+ gate "coverage" ${cmds.coverage}
139073
+
139074
+ echo ""
139075
+ echo "=== QA Summary ==="
139076
+ echo "PASS: $PASS / FAIL: $FAIL / TOTAL: $((PASS + FAIL))"
139077
+
139078
+ if [ "$FAIL" -gt 0 ]; then
139079
+ echo "\u274C QA contract FAILED"
139080
+ exit 1
139081
+ else
139082
+ echo "\u2705 QA contract PASSED"
139083
+ exit 0
139084
+ fi
139085
+ `;
139086
+ }
139087
+
139065
139088
  // lib/intake/steps/scaffold.ts
139066
139089
  var scaffoldStep = {
139067
139090
  name: "scaffold",
@@ -139099,6 +139122,20 @@ var scaffoldStep = {
139099
139122
  ctx.log(
139100
139123
  bootstrap.skipped ? `Scaffold bootstrap already current (${bootstrap.packageManager})` : `Scaffold bootstrap completed (${bootstrap.packageManager})`
139101
139124
  );
139125
+ if (payload.spec) {
139126
+ try {
139127
+ const contract = generateQaContract({
139128
+ spec: payload.spec,
139129
+ stack: scaffold.stack,
139130
+ acceptanceCriteria: payload.spec.acceptance_criteria
139131
+ });
139132
+ const qaPath = path36.join(scaffold.repo_local, "scripts", "qa.sh");
139133
+ await fsNode.mkdir(path36.dirname(qaPath), { recursive: true });
139134
+ await fsNode.writeFile(qaPath, contract.script_content, { mode: 493 });
139135
+ } catch (err) {
139136
+ ctx.log(`Warning: could not write qa.sh: ${err instanceof Error ? err.message : String(err)}`);
139137
+ }
139138
+ }
139102
139139
  }
139103
139140
  return {
139104
139141
  ...result.plannedPayload,
@@ -139130,7 +139167,7 @@ var scaffoldPassthroughStep = {
139130
139167
 
139131
139168
  // lib/intake/lib/repository-provision-service.ts
139132
139169
  import fs35 from "node:fs/promises";
139133
- import path36 from "node:path";
139170
+ import path37 from "node:path";
139134
139171
  function normalizeText2(value) {
139135
139172
  if (typeof value !== "string") return null;
139136
139173
  const trimmed = value.trim();
@@ -139178,7 +139215,7 @@ async function pathExists2(candidate) {
139178
139215
  }
139179
139216
  async function isGitRepository(candidate) {
139180
139217
  if (!candidate) return false;
139181
- return pathExists2(path36.join(candidate, ".git"));
139218
+ return pathExists2(path37.join(candidate, ".git"));
139182
139219
  }
139183
139220
  async function resolveLocalRepoRemote(ctx, repoPath) {
139184
139221
  const result = await ctx.runCommand("git", ["remote", "get-url", "origin"], {
@@ -139225,7 +139262,7 @@ async function resolveRepositoryTarget(payload, ctx) {
139225
139262
  }
139226
139263
  if (repoUrl) {
139227
139264
  const remote = parseGitHubRemote(repoUrl);
139228
- const localPath = remote ? path36.join(ctx.homeDir, "git", remote.owner, remote.name) : null;
139265
+ const localPath = remote ? path37.join(ctx.homeDir, "git", remote.owner, remote.name) : null;
139229
139266
  return {
139230
139267
  mode: "remote_only",
139231
139268
  remote,
@@ -139420,80 +139457,6 @@ var registerStep = {
139420
139457
  }
139421
139458
  };
139422
139459
 
139423
- // lib/quality/qa-contracts.ts
139424
- var GATE_NAMES = ["lint", "types", "security", "tests", "coverage"];
139425
- var COVERAGE_THRESHOLD = 80;
139426
- function generateQaContract(opts) {
139427
- const { spec, stack, acceptanceCriteria } = opts;
139428
- const cmds = getQaGateCommands(stack);
139429
- const acs = acceptanceCriteria ?? spec.acceptance_criteria;
139430
- const script = buildQaScript(cmds, stack, acs);
139431
- return {
139432
- gates: [...GATE_NAMES],
139433
- acceptance_tests: acs,
139434
- script_content: script
139435
- };
139436
- }
139437
- function buildQaScript(cmds, stack, acs) {
139438
- const acComments = acs.map((ac, i2) => `# AC${i2 + 1}: ${ac}`).join("\n");
139439
- return `#!/usr/bin/env bash
139440
- # qa.sh \u2014 Generated QA contract
139441
- # Stack: ${stack}
139442
- # Coverage threshold: ${COVERAGE_THRESHOLD}%
139443
- #
139444
- # Acceptance Criteria:
139445
- ${acComments}
139446
-
139447
- set -euo pipefail
139448
-
139449
- ${buildQaBootstrapPrelude(stack)}
139450
-
139451
- PASS=0
139452
- FAIL=0
139453
-
139454
- gate() {
139455
- local name="$1"
139456
- shift
139457
- echo "=== Gate: $name ==="
139458
- if "$@"; then
139459
- echo "\u2705 $name PASSED"
139460
- PASS=$((PASS + 1))
139461
- else
139462
- echo "\u274C $name FAILED"
139463
- FAIL=$((FAIL + 1))
139464
- fi
139465
- echo ""
139466
- }
139467
-
139468
- # Gate 1: Lint
139469
- gate "lint" ${cmds.lint}
139470
-
139471
- # Gate 2: Type checking
139472
- gate "types" ${cmds.types}
139473
-
139474
- # Gate 3: Security audit
139475
- gate "security" ${cmds.security}
139476
-
139477
- # Gate 4: Tests
139478
- gate "tests" ${cmds.tests}
139479
-
139480
- # Gate 5: Coverage (>= ${COVERAGE_THRESHOLD}%)
139481
- gate "coverage" ${cmds.coverage}
139482
-
139483
- echo ""
139484
- echo "=== QA Summary ==="
139485
- echo "PASS: $PASS / FAIL: $FAIL / TOTAL: $((PASS + FAIL))"
139486
-
139487
- if [ "$FAIL" -gt 0 ]; then
139488
- echo "\u274C QA contract FAILED"
139489
- exit 1
139490
- else
139491
- echo "\u2705 QA contract PASSED"
139492
- exit 0
139493
- fi
139494
- `;
139495
- }
139496
-
139497
139460
  // lib/intake/steps/qa-contract.ts
139498
139461
  var qaContractStep = {
139499
139462
  name: "qa-contract",
@@ -140652,25 +140615,25 @@ function getPendingQuestions(payload, answers = payload.answers ?? {}) {
140652
140615
  var import_yaml4 = __toESM(require_dist(), 1);
140653
140616
  init_migrate_layout();
140654
140617
  import fs36 from "node:fs/promises";
140655
- import path37 from "node:path";
140618
+ import path38 from "node:path";
140656
140619
  init_roles();
140657
140620
  async function runDoctor(opts) {
140658
140621
  const checks = [];
140659
140622
  const { workspacePath, fix = false } = opts;
140660
140623
  await migrateWorkspaceLayout(workspacePath);
140661
- const dataDir = path37.join(workspacePath, DATA_DIR);
140624
+ const dataDir = path38.join(workspacePath, DATA_DIR);
140662
140625
  checks.push(await checkDirExists(dataDir, `Data directory (${DATA_DIR}/)`));
140663
- checks.push(await checkFileExists(path37.join(dataDir, "projects.json"), "projects.json"));
140664
- checks.push(await checkFileExists(path37.join(dataDir, "workflow.yaml"), "workflow.yaml"));
140665
- checks.push(await checkDirExists(path37.join(dataDir, "prompts"), "prompts/"));
140666
- checks.push(await checkDirExists(path37.join(dataDir, "projects"), "projects/"));
140667
- checks.push(await checkDirExists(path37.join(dataDir, "log"), "log/"));
140626
+ checks.push(await checkFileExists(path38.join(dataDir, "projects.json"), "projects.json"));
140627
+ checks.push(await checkFileExists(path38.join(dataDir, "workflow.yaml"), "workflow.yaml"));
140628
+ checks.push(await checkDirExists(path38.join(dataDir, "prompts"), "prompts/"));
140629
+ checks.push(await checkDirExists(path38.join(dataDir, "projects"), "projects/"));
140630
+ checks.push(await checkDirExists(path38.join(dataDir, "log"), "log/"));
140668
140631
  for (const file2 of ["AGENTS.md", "HEARTBEAT.md", "TOOLS.md"]) {
140669
- checks.push(await checkFileExists(path37.join(workspacePath, file2), file2));
140632
+ checks.push(await checkFileExists(path38.join(workspacePath, file2), file2));
140670
140633
  }
140671
140634
  for (const role of getAllRoleIds()) {
140672
140635
  checks.push(await checkFileExists(
140673
- path37.join(dataDir, "prompts", `${role}.md`),
140636
+ path38.join(dataDir, "prompts", `${role}.md`),
140674
140637
  `prompts/${role}.md`
140675
140638
  ));
140676
140639
  }
@@ -140750,7 +140713,7 @@ async function checkFileExists(filePath, label) {
140750
140713
  }
140751
140714
  }
140752
140715
  async function checkWorkflowYaml(dataDir) {
140753
- const filePath = path37.join(dataDir, "workflow.yaml");
140716
+ const filePath = path38.join(dataDir, "workflow.yaml");
140754
140717
  try {
140755
140718
  const content = await fs36.readFile(filePath, "utf-8");
140756
140719
  const parsed = import_yaml4.default.parse(content);
@@ -140769,7 +140732,7 @@ async function checkWorkflowYaml(dataDir) {
140769
140732
  }
140770
140733
  }
140771
140734
  async function checkProjectsJson(dataDir) {
140772
- const filePath = path37.join(dataDir, "projects.json");
140735
+ const filePath = path38.join(dataDir, "projects.json");
140773
140736
  try {
140774
140737
  const content = await fs36.readFile(filePath, "utf-8");
140775
140738
  const parsed = JSON.parse(content);
@@ -140844,7 +140807,7 @@ function checkGitHubWebhookMode(pluginConfig) {
140844
140807
  }
140845
140808
  async function checkProjects(dataDir) {
140846
140809
  const results = [];
140847
- const filePath = path37.join(dataDir, "projects.json");
140810
+ const filePath = path38.join(dataDir, "projects.json");
140848
140811
  let data;
140849
140812
  try {
140850
140813
  const content = await fs36.readFile(filePath, "utf-8");
@@ -140884,8 +140847,8 @@ async function checkProjects(dataDir) {
140884
140847
  message: `Project "${slug}" missing repo field`
140885
140848
  });
140886
140849
  }
140887
- if (project.repo && path37.isAbsolute(project.repo)) {
140888
- const qaPath = path37.join(project.repo, "scripts", "qa.sh");
140850
+ if (project.repo && path38.isAbsolute(project.repo)) {
140851
+ const qaPath = path38.join(project.repo, "scripts", "qa.sh");
140889
140852
  try {
140890
140853
  await fs36.access(qaPath);
140891
140854
  } catch {
@@ -141012,7 +140975,7 @@ function formatMetrics(metrics2) {
141012
140975
  // lib/setup/security-doctor.ts
141013
140976
  init_migrate_layout();
141014
140977
  import fs37 from "node:fs/promises";
141015
- import path38 from "node:path";
140978
+ import path39 from "node:path";
141016
140979
  var LEGACY_EXTENSION_PATH_PATTERNS = [
141017
140980
  "/extensions/secureclaw/",
141018
140981
  "/extensions/devclaw/",
@@ -141031,10 +140994,10 @@ function summarize(checks) {
141031
140994
  }
141032
140995
  async function runSecurityDoctor(openclawHome) {
141033
140996
  const checks = [];
141034
- const configPath = path38.join(openclawHome, "openclaw.json");
141035
- const jobsPath = path38.join(openclawHome, "cron", "jobs.json");
141036
- const workspacePath = path38.join(openclawHome, "workspace");
141037
- const checklistPath = path38.join(workspacePath, DATA_DIR, "prompts", "security-checklist.md");
140997
+ const configPath = path39.join(openclawHome, "openclaw.json");
140998
+ const jobsPath = path39.join(openclawHome, "cron", "jobs.json");
140999
+ const workspacePath = path39.join(openclawHome, "workspace");
141000
+ const checklistPath = path39.join(workspacePath, DATA_DIR, "prompts", "security-checklist.md");
141038
141001
  let config2 = null;
141039
141002
  try {
141040
141003
  config2 = JSON.parse(await fs37.readFile(configPath, "utf-8"));
@@ -142073,13 +142036,13 @@ import { homedir as homedir3 } from "node:os";
142073
142036
  init_migrate_layout();
142074
142037
  import { createHash as createHash6 } from "node:crypto";
142075
142038
  import fs38 from "node:fs/promises";
142076
- import path39 from "node:path";
142039
+ import path40 from "node:path";
142077
142040
  var SESSION_TTL_MS = 10 * 6e4;
142078
142041
  function sessionsDir(workspaceDir) {
142079
- return path39.join(workspaceDir, DATA_DIR, "bootstrap-sessions");
142042
+ return path40.join(workspaceDir, DATA_DIR, "bootstrap-sessions");
142080
142043
  }
142081
142044
  function sessionPath(workspaceDir, conversationId) {
142082
- return path39.join(sessionsDir(workspaceDir), `${conversationId}.json`);
142045
+ return path40.join(sessionsDir(workspaceDir), `${conversationId}.json`);
142083
142046
  }
142084
142047
  function stableHash(input) {
142085
142048
  return createHash6("sha256").update(input).digest("hex").slice(0, 16);
@@ -142264,9 +142227,12 @@ function parseClarificationResponse(text, session) {
142264
142227
  }
142265
142228
  function buildClarificationMessage(parsed, pendingClarification) {
142266
142229
  if (pendingClarification === "stack_and_name" || !parsed.stackHint && !parsed.projectName) {
142267
- return `Que ideia bacana! Para criar o projeto, qual stack voc\xEA quer usar? Por exemplo: Python, Node.js, Go, Java...`;
142230
+ return `Beleza! S\xF3 preciso de duas coisas pra criar:
142231
+
142232
+ 1. Qual stack? (Python, Node.js, Go, Java...)
142233
+ 2. Quer dar um nome pro projeto? Se n\xE3o, eu invento um.`;
142268
142234
  }
142269
- return `Qual stack voc\xEA quer usar para esse projeto? Por exemplo: Python, Node.js, Go, Java...`;
142235
+ return `Qual stack voc\xEA quer usar? (Python, Node.js, Go, Java...)`;
142270
142236
  }
142271
142237
  function buildFollowUpClarification(session) {
142272
142238
  if (!session.stackHint) {
@@ -142609,7 +142575,7 @@ function registerTelegramBootstrapHook(api, ctx) {
142609
142575
 
142610
142576
  // lib/github/register-webhook-route.ts
142611
142577
  init_store_factory();
142612
- import path40 from "node:path";
142578
+ import path41 from "node:path";
142613
142579
 
142614
142580
  // lib/github/webhook.ts
142615
142581
  init_zod();
@@ -142872,7 +142838,7 @@ function registerGitHubWebhookRoute(api, ctx) {
142872
142838
  }
142873
142839
  });
142874
142840
  if ("child" in routeLogger) {
142875
- routeLogger.child({ webhookPath: path40.posix.normalize(webhookPath), workspaceDir }).info("GitHub webhook route registered");
142841
+ routeLogger.child({ webhookPath: path41.posix.normalize(webhookPath), workspaceDir }).info("GitHub webhook route registered");
142876
142842
  }
142877
142843
  }
142878
142844