@sentry/craft 3.4.1 → 3.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/craft +1161 -667
  2. package/package.json +1 -1
package/dist/craft CHANGED
@@ -5606,8 +5606,8 @@ var init_envelope3 = __esm({
5606
5606
 
5607
5607
  // node_modules/.pnpm/@sentry+core@11.8.0/node_modules/@sentry/core/build/esm/utils/syncpromise.js
5608
5608
  function resolvedSyncPromise(value) {
5609
- return new SyncPromise((resolve10) => {
5610
- resolve10(value);
5609
+ return new SyncPromise((resolve11) => {
5610
+ resolve11(value);
5611
5611
  });
5612
5612
  }
5613
5613
  function rejectedSyncPromise(reason) {
@@ -5631,15 +5631,15 @@ var init_syncpromise = __esm({
5631
5631
  }
5632
5632
  /** @inheritdoc */
5633
5633
  then(onfulfilled, onrejected) {
5634
- return new _SyncPromise((resolve10, reject) => {
5634
+ return new _SyncPromise((resolve11, reject) => {
5635
5635
  this._handlers.push([
5636
5636
  false,
5637
5637
  (result) => {
5638
5638
  if (!onfulfilled) {
5639
- resolve10(result);
5639
+ resolve11(result);
5640
5640
  } else {
5641
5641
  try {
5642
- resolve10(onfulfilled(result));
5642
+ resolve11(onfulfilled(result));
5643
5643
  } catch (e5) {
5644
5644
  reject(e5);
5645
5645
  }
@@ -5650,7 +5650,7 @@ var init_syncpromise = __esm({
5650
5650
  reject(reason);
5651
5651
  } else {
5652
5652
  try {
5653
- resolve10(onrejected(reason));
5653
+ resolve11(onrejected(reason));
5654
5654
  } catch (e5) {
5655
5655
  reject(e5);
5656
5656
  }
@@ -5666,7 +5666,7 @@ var init_syncpromise = __esm({
5666
5666
  }
5667
5667
  /** @inheritdoc */
5668
5668
  finally(onfinally) {
5669
- return new _SyncPromise((resolve10, reject) => {
5669
+ return new _SyncPromise((resolve11, reject) => {
5670
5670
  let val;
5671
5671
  let isRejected;
5672
5672
  return this.then(
@@ -5689,7 +5689,7 @@ var init_syncpromise = __esm({
5689
5689
  reject(val);
5690
5690
  return;
5691
5691
  }
5692
- resolve10(val);
5692
+ resolve11(val);
5693
5693
  });
5694
5694
  });
5695
5695
  }
@@ -5720,21 +5720,21 @@ var init_syncpromise = __esm({
5720
5720
  return;
5721
5721
  }
5722
5722
  if (isThenable(value)) {
5723
- void value.then(resolve10, reject);
5723
+ void value.then(resolve11, reject);
5724
5724
  return;
5725
5725
  }
5726
5726
  this._state = state2;
5727
5727
  this._value = value;
5728
5728
  this._executeHandlers();
5729
5729
  };
5730
- const resolve10 = (value) => {
5730
+ const resolve11 = (value) => {
5731
5731
  setResult(STATE_RESOLVED, value);
5732
5732
  };
5733
5733
  const reject = (reason) => {
5734
5734
  setResult(STATE_REJECTED, reason);
5735
5735
  };
5736
5736
  try {
5737
- executor(resolve10, reject);
5737
+ executor(resolve11, reject);
5738
5738
  } catch (e5) {
5739
5739
  reject(e5);
5740
5740
  }
@@ -6471,7 +6471,7 @@ function makePromiseBuffer(limit = 100) {
6471
6471
  }
6472
6472
  const promises3 = [
6473
6473
  drainPromise,
6474
- new Promise((resolve10) => safeUnref(setTimeout(() => resolve10(false), timeout)))
6474
+ new Promise((resolve11) => safeUnref(setTimeout(() => resolve11(false), timeout)))
6475
6475
  ];
6476
6476
  return Promise.race(promises3);
6477
6477
  }
@@ -7400,7 +7400,7 @@ var init_client = __esm({
7400
7400
  async _isClientDoneProcessing(timeout) {
7401
7401
  let ticked = 0;
7402
7402
  while (!timeout || ticked < timeout) {
7403
- await new Promise((resolve10) => setTimeout(resolve10, 1));
7403
+ await new Promise((resolve11) => setTimeout(resolve11, 1));
7404
7404
  if (!this._numProcessing) {
7405
7405
  return true;
7406
7406
  }
@@ -24738,17 +24738,17 @@ function startProducerSpan(topic, message) {
24738
24738
  return span;
24739
24739
  }
24740
24740
  function applyErrorToSpans(spans, reason) {
24741
- let errorMessage;
24741
+ let errorMessage2;
24742
24742
  let errorType = ERROR_TYPE_VALUE_OTHER;
24743
24743
  if (typeof reason === "string" || reason === void 0) {
24744
- errorMessage = reason;
24744
+ errorMessage2 = reason;
24745
24745
  } else if (isObjectLike(reason) && Object.prototype.hasOwnProperty.call(reason, "message")) {
24746
- errorMessage = reason.message;
24746
+ errorMessage2 = reason.message;
24747
24747
  errorType = reason.constructor.name;
24748
24748
  }
24749
24749
  spans.forEach((span) => {
24750
24750
  span.setAttribute(Ps, errorType);
24751
- span.setStatus({ code: SPAN_STATUS_ERROR, message: errorMessage });
24751
+ span.setStatus({ code: SPAN_STATUS_ERROR, message: errorMessage2 });
24752
24752
  });
24753
24753
  }
24754
24754
  function endSpansOnPromise(spans, promise) {
@@ -31307,13 +31307,13 @@ async function getDarwinInfo() {
31307
31307
  version: `10.${Number(os.release().split(".")[0]) - 4}`
31308
31308
  };
31309
31309
  try {
31310
- const output = await new Promise((resolve10, reject) => {
31310
+ const output = await new Promise((resolve11, reject) => {
31311
31311
  (0, import_node_child_process.execFile)("/usr/bin/sw_vers", (error3, stdout) => {
31312
31312
  if (error3) {
31313
31313
  reject(error3);
31314
31314
  return;
31315
31315
  }
31316
- resolve10(stdout);
31316
+ resolve11(stdout);
31317
31317
  });
31318
31318
  });
31319
31319
  darwinInfo.name = matchFirst(/^ProductName:\s+(.*)$/m, output);
@@ -31585,14 +31585,14 @@ function makeLineReaderRanges(lines, linecontext) {
31585
31585
  return out;
31586
31586
  }
31587
31587
  function getContextLinesFromFile(path20, ranges, output) {
31588
- return new Promise((resolve10, _reject) => {
31588
+ return new Promise((resolve11, _reject) => {
31589
31589
  const stream2 = (0, import_node_fs2.createReadStream)(path20);
31590
31590
  const lineReaded = (0, import_node_readline.createInterface)({
31591
31591
  input: stream2
31592
31592
  });
31593
31593
  function destroyStreamAndResolve() {
31594
31594
  stream2.destroy();
31595
- resolve10();
31595
+ resolve11();
31596
31596
  }
31597
31597
  let lineNumber = 0;
31598
31598
  let currentRangeIndex = 0;
@@ -32501,7 +32501,7 @@ function debugLog(...args) {
32501
32501
  debug.log("[https-proxy-agent:parse-proxy-response]", ...args);
32502
32502
  }
32503
32503
  function parseProxyResponse(socket) {
32504
- return new Promise((resolve10, reject) => {
32504
+ return new Promise((resolve11, reject) => {
32505
32505
  let buffersLength = 0;
32506
32506
  const buffers = [];
32507
32507
  function read() {
@@ -32564,7 +32564,7 @@ function parseProxyResponse(socket) {
32564
32564
  }
32565
32565
  debugLog("got proxy server response: %o %o", firstLine, headers);
32566
32566
  cleanup();
32567
- resolve10({
32567
+ resolve11({
32568
32568
  connect: {
32569
32569
  statusCode,
32570
32570
  statusText,
@@ -32745,7 +32745,7 @@ function applyNoProxyOption(transportUrlSegments, proxy) {
32745
32745
  function createRequestExecutor(options, httpModule, agent) {
32746
32746
  const { hostname: hostname3, pathname, port, protocol, search } = new URL(options.url);
32747
32747
  return function makeRequest(request3) {
32748
- const sendRequest = (canRetry) => new Promise((resolve10, reject) => {
32748
+ const sendRequest = (canRetry) => new Promise((resolve11, reject) => {
32749
32749
  suppressTracing(() => {
32750
32750
  let body = streamFromBody(request3.body);
32751
32751
  const headers = { ...options.headers };
@@ -32774,7 +32774,7 @@ function createRequestExecutor(options, httpModule, agent) {
32774
32774
  res.setEncoding("utf8");
32775
32775
  const retryAfterHeader = res.headers["retry-after"] ?? null;
32776
32776
  const rateLimitsHeader = res.headers["x-sentry-rate-limits"] ?? null;
32777
- resolve10({
32777
+ resolve11({
32778
32778
  statusCode: res.statusCode,
32779
32779
  headers: {
32780
32780
  "retry-after": retryAfterHeader,
@@ -32785,7 +32785,7 @@ function createRequestExecutor(options, httpModule, agent) {
32785
32785
  );
32786
32786
  req.on("error", (error3) => {
32787
32787
  if (canRetry && req.reusedSocket && error3.code === "ECONNRESET") {
32788
- resolve10(sendRequest(false));
32788
+ resolve11(sendRequest(false));
32789
32789
  } else {
32790
32790
  reject(error3);
32791
32791
  }
@@ -36714,13 +36714,13 @@ function setupVercelKeepAlive(client) {
36714
36714
  });
36715
36715
  }
36716
36716
  function waitForRequestEnd(client, response, rootSpan, timeout) {
36717
- return new Promise((resolve10) => {
36717
+ return new Promise((resolve11) => {
36718
36718
  let responseClosed = false;
36719
36719
  let rootSpanEnded = !rootSpan?.isRecording();
36720
36720
  const done = () => {
36721
36721
  clearTimeout(timer);
36722
36722
  unsubscribe();
36723
- resolve10();
36723
+ resolve11();
36724
36724
  };
36725
36725
  const doneIfRequestEnded = () => {
36726
36726
  if (responseClosed && rootSpanEnded) {
@@ -41250,10 +41250,10 @@ var init_esm10 = __esm({
41250
41250
  * Return a void Promise that resolves once the stream ends.
41251
41251
  */
41252
41252
  async promise() {
41253
- return new Promise((resolve10, reject) => {
41253
+ return new Promise((resolve11, reject) => {
41254
41254
  this.on(DESTROYED, () => reject(new Error("stream destroyed")));
41255
41255
  this.on("error", (er3) => reject(er3));
41256
- this.on("end", () => resolve10());
41256
+ this.on("end", () => resolve11());
41257
41257
  });
41258
41258
  }
41259
41259
  /**
@@ -41277,7 +41277,7 @@ var init_esm10 = __esm({
41277
41277
  return Promise.resolve({ done: false, value: res });
41278
41278
  if (this[EOF])
41279
41279
  return stop();
41280
- let resolve10;
41280
+ let resolve11;
41281
41281
  let reject;
41282
41282
  const onerr = (er3) => {
41283
41283
  this.off("data", ondata);
@@ -41291,19 +41291,19 @@ var init_esm10 = __esm({
41291
41291
  this.off("end", onend);
41292
41292
  this.off(DESTROYED, ondestroy);
41293
41293
  this.pause();
41294
- resolve10({ value, done: !!this[EOF] });
41294
+ resolve11({ value, done: !!this[EOF] });
41295
41295
  };
41296
41296
  const onend = () => {
41297
41297
  this.off("error", onerr);
41298
41298
  this.off("data", ondata);
41299
41299
  this.off(DESTROYED, ondestroy);
41300
41300
  stop();
41301
- resolve10({ done: true, value: void 0 });
41301
+ resolve11({ done: true, value: void 0 });
41302
41302
  };
41303
41303
  const ondestroy = () => onerr(new Error("stream destroyed"));
41304
41304
  return new Promise((res2, rej) => {
41305
41305
  reject = rej;
41306
- resolve10 = res2;
41306
+ resolve11 = res2;
41307
41307
  this.once(DESTROYED, ondestroy);
41308
41308
  this.once("error", onerr);
41309
41309
  this.once("end", onend);
@@ -42292,9 +42292,9 @@ var init_esm11 = __esm({
42292
42292
  if (this.#asyncReaddirInFlight) {
42293
42293
  await this.#asyncReaddirInFlight;
42294
42294
  } else {
42295
- let resolve10 = () => {
42295
+ let resolve11 = () => {
42296
42296
  };
42297
- this.#asyncReaddirInFlight = new Promise((res) => resolve10 = res);
42297
+ this.#asyncReaddirInFlight = new Promise((res) => resolve11 = res);
42298
42298
  try {
42299
42299
  for (const e5 of await this.#fs.promises.readdir(fullpath, {
42300
42300
  withFileTypes: true
@@ -42307,7 +42307,7 @@ var init_esm11 = __esm({
42307
42307
  children.provisional = 0;
42308
42308
  }
42309
42309
  this.#asyncReaddirInFlight = void 0;
42310
- resolve10();
42310
+ resolve11();
42311
42311
  }
42312
42312
  return children.slice(0, children.provisional);
42313
42313
  }
@@ -44051,10 +44051,10 @@ var init_esm12 = __esm({
44051
44051
  * Return a void Promise that resolves once the stream ends.
44052
44052
  */
44053
44053
  async promise() {
44054
- return new Promise((resolve10, reject) => {
44054
+ return new Promise((resolve11, reject) => {
44055
44055
  this.on(DESTROYED2, () => reject(new Error("stream destroyed")));
44056
44056
  this.on("error", (er3) => reject(er3));
44057
- this.on("end", () => resolve10());
44057
+ this.on("end", () => resolve11());
44058
44058
  });
44059
44059
  }
44060
44060
  /**
@@ -44078,7 +44078,7 @@ var init_esm12 = __esm({
44078
44078
  return Promise.resolve({ done: false, value: res });
44079
44079
  if (this[EOF2])
44080
44080
  return stop();
44081
- let resolve10;
44081
+ let resolve11;
44082
44082
  let reject;
44083
44083
  const onerr = (er3) => {
44084
44084
  this.off("data", ondata);
@@ -44092,19 +44092,19 @@ var init_esm12 = __esm({
44092
44092
  this.off("end", onend);
44093
44093
  this.off(DESTROYED2, ondestroy);
44094
44094
  this.pause();
44095
- resolve10({ value, done: !!this[EOF2] });
44095
+ resolve11({ value, done: !!this[EOF2] });
44096
44096
  };
44097
44097
  const onend = () => {
44098
44098
  this.off("error", onerr);
44099
44099
  this.off("data", ondata);
44100
44100
  this.off(DESTROYED2, ondestroy);
44101
44101
  stop();
44102
- resolve10({ done: true, value: void 0 });
44102
+ resolve11({ done: true, value: void 0 });
44103
44103
  };
44104
44104
  const ondestroy = () => onerr(new Error("stream destroyed"));
44105
44105
  return new Promise((res2, rej) => {
44106
44106
  reject = rej;
44107
- resolve10 = res2;
44107
+ resolve11 = res2;
44108
44108
  this.once(DESTROYED2, ondestroy);
44109
44109
  this.once("error", onerr);
44110
44110
  this.once("end", onend);
@@ -55574,7 +55574,7 @@ var require_text = __commonJS({
55574
55574
  "node_modules/.pnpm/prompts@2.4.1/node_modules/prompts/dist/elements/text.js"(exports2, module2) {
55575
55575
  "use strict";
55576
55576
  init_import_meta_url();
55577
- function asyncGeneratorStep(gen, resolve10, reject, _next, _throw, key, arg) {
55577
+ function asyncGeneratorStep(gen, resolve11, reject, _next, _throw, key, arg) {
55578
55578
  try {
55579
55579
  var info = gen[key](arg);
55580
55580
  var value = info.value;
@@ -55583,7 +55583,7 @@ var require_text = __commonJS({
55583
55583
  return;
55584
55584
  }
55585
55585
  if (info.done) {
55586
- resolve10(value);
55586
+ resolve11(value);
55587
55587
  } else {
55588
55588
  Promise.resolve(value).then(_next, _throw);
55589
55589
  }
@@ -55591,13 +55591,13 @@ var require_text = __commonJS({
55591
55591
  function _asyncToGenerator(fn2) {
55592
55592
  return function() {
55593
55593
  var self2 = this, args = arguments;
55594
- return new Promise(function(resolve10, reject) {
55594
+ return new Promise(function(resolve11, reject) {
55595
55595
  var gen = fn2.apply(self2, args);
55596
55596
  function _next(value) {
55597
- asyncGeneratorStep(gen, resolve10, reject, _next, _throw, "next", value);
55597
+ asyncGeneratorStep(gen, resolve11, reject, _next, _throw, "next", value);
55598
55598
  }
55599
55599
  function _throw(err) {
55600
- asyncGeneratorStep(gen, resolve10, reject, _next, _throw, "throw", err);
55600
+ asyncGeneratorStep(gen, resolve11, reject, _next, _throw, "throw", err);
55601
55601
  }
55602
55602
  _next(void 0);
55603
55603
  });
@@ -55665,12 +55665,12 @@ var require_text = __commonJS({
55665
55665
  validate() {
55666
55666
  var _this = this;
55667
55667
  return _asyncToGenerator(function* () {
55668
- let valid = yield _this.validator(_this.value);
55669
- if (typeof valid === `string`) {
55670
- _this.errorMsg = valid;
55671
- valid = false;
55668
+ let valid2 = yield _this.validator(_this.value);
55669
+ if (typeof valid2 === `string`) {
55670
+ _this.errorMsg = valid2;
55671
+ valid2 = false;
55672
55672
  }
55673
- _this.error = !valid;
55673
+ _this.error = !valid2;
55674
55674
  })();
55675
55675
  }
55676
55676
  submit() {
@@ -56326,7 +56326,7 @@ var require_date = __commonJS({
56326
56326
  "node_modules/.pnpm/prompts@2.4.1/node_modules/prompts/dist/elements/date.js"(exports2, module2) {
56327
56327
  "use strict";
56328
56328
  init_import_meta_url();
56329
- function asyncGeneratorStep(gen, resolve10, reject, _next, _throw, key, arg) {
56329
+ function asyncGeneratorStep(gen, resolve11, reject, _next, _throw, key, arg) {
56330
56330
  try {
56331
56331
  var info = gen[key](arg);
56332
56332
  var value = info.value;
@@ -56335,7 +56335,7 @@ var require_date = __commonJS({
56335
56335
  return;
56336
56336
  }
56337
56337
  if (info.done) {
56338
- resolve10(value);
56338
+ resolve11(value);
56339
56339
  } else {
56340
56340
  Promise.resolve(value).then(_next, _throw);
56341
56341
  }
@@ -56343,13 +56343,13 @@ var require_date = __commonJS({
56343
56343
  function _asyncToGenerator(fn2) {
56344
56344
  return function() {
56345
56345
  var self2 = this, args = arguments;
56346
- return new Promise(function(resolve10, reject) {
56346
+ return new Promise(function(resolve11, reject) {
56347
56347
  var gen = fn2.apply(self2, args);
56348
56348
  function _next(value) {
56349
- asyncGeneratorStep(gen, resolve10, reject, _next, _throw, "next", value);
56349
+ asyncGeneratorStep(gen, resolve11, reject, _next, _throw, "next", value);
56350
56350
  }
56351
56351
  function _throw(err) {
56352
- asyncGeneratorStep(gen, resolve10, reject, _next, _throw, "throw", err);
56352
+ asyncGeneratorStep(gen, resolve11, reject, _next, _throw, "throw", err);
56353
56353
  }
56354
56354
  _next(void 0);
56355
56355
  });
@@ -56471,12 +56471,12 @@ var require_date = __commonJS({
56471
56471
  validate() {
56472
56472
  var _this = this;
56473
56473
  return _asyncToGenerator(function* () {
56474
- let valid = yield _this.validator(_this.value);
56475
- if (typeof valid === "string") {
56476
- _this.errorMsg = valid;
56477
- valid = false;
56474
+ let valid2 = yield _this.validator(_this.value);
56475
+ if (typeof valid2 === "string") {
56476
+ _this.errorMsg = valid2;
56477
+ valid2 = false;
56478
56478
  }
56479
- _this.error = !valid;
56479
+ _this.error = !valid2;
56480
56480
  })();
56481
56481
  }
56482
56482
  submit() {
@@ -56553,7 +56553,7 @@ var require_number = __commonJS({
56553
56553
  "node_modules/.pnpm/prompts@2.4.1/node_modules/prompts/dist/elements/number.js"(exports2, module2) {
56554
56554
  "use strict";
56555
56555
  init_import_meta_url();
56556
- function asyncGeneratorStep(gen, resolve10, reject, _next, _throw, key, arg) {
56556
+ function asyncGeneratorStep(gen, resolve11, reject, _next, _throw, key, arg) {
56557
56557
  try {
56558
56558
  var info = gen[key](arg);
56559
56559
  var value = info.value;
@@ -56562,7 +56562,7 @@ var require_number = __commonJS({
56562
56562
  return;
56563
56563
  }
56564
56564
  if (info.done) {
56565
- resolve10(value);
56565
+ resolve11(value);
56566
56566
  } else {
56567
56567
  Promise.resolve(value).then(_next, _throw);
56568
56568
  }
@@ -56570,13 +56570,13 @@ var require_number = __commonJS({
56570
56570
  function _asyncToGenerator(fn2) {
56571
56571
  return function() {
56572
56572
  var self2 = this, args = arguments;
56573
- return new Promise(function(resolve10, reject) {
56573
+ return new Promise(function(resolve11, reject) {
56574
56574
  var gen = fn2.apply(self2, args);
56575
56575
  function _next(value) {
56576
- asyncGeneratorStep(gen, resolve10, reject, _next, _throw, "next", value);
56576
+ asyncGeneratorStep(gen, resolve11, reject, _next, _throw, "next", value);
56577
56577
  }
56578
56578
  function _throw(err) {
56579
- asyncGeneratorStep(gen, resolve10, reject, _next, _throw, "throw", err);
56579
+ asyncGeneratorStep(gen, resolve11, reject, _next, _throw, "throw", err);
56580
56580
  }
56581
56581
  _next(void 0);
56582
56582
  });
@@ -56661,12 +56661,12 @@ var require_number = __commonJS({
56661
56661
  validate() {
56662
56662
  var _this = this;
56663
56663
  return _asyncToGenerator(function* () {
56664
- let valid = yield _this.validator(_this.value);
56665
- if (typeof valid === `string`) {
56666
- _this.errorMsg = valid;
56667
- valid = false;
56664
+ let valid2 = yield _this.validator(_this.value);
56665
+ if (typeof valid2 === `string`) {
56666
+ _this.errorMsg = valid2;
56667
+ valid2 = false;
56668
56668
  }
56669
- _this.error = !valid;
56669
+ _this.error = !valid2;
56670
56670
  })();
56671
56671
  }
56672
56672
  submit() {
@@ -57001,7 +57001,7 @@ var require_autocomplete = __commonJS({
57001
57001
  "node_modules/.pnpm/prompts@2.4.1/node_modules/prompts/dist/elements/autocomplete.js"(exports2, module2) {
57002
57002
  "use strict";
57003
57003
  init_import_meta_url();
57004
- function asyncGeneratorStep(gen, resolve10, reject, _next, _throw, key, arg) {
57004
+ function asyncGeneratorStep(gen, resolve11, reject, _next, _throw, key, arg) {
57005
57005
  try {
57006
57006
  var info = gen[key](arg);
57007
57007
  var value = info.value;
@@ -57010,7 +57010,7 @@ var require_autocomplete = __commonJS({
57010
57010
  return;
57011
57011
  }
57012
57012
  if (info.done) {
57013
- resolve10(value);
57013
+ resolve11(value);
57014
57014
  } else {
57015
57015
  Promise.resolve(value).then(_next, _throw);
57016
57016
  }
@@ -57018,13 +57018,13 @@ var require_autocomplete = __commonJS({
57018
57018
  function _asyncToGenerator(fn2) {
57019
57019
  return function() {
57020
57020
  var self2 = this, args = arguments;
57021
- return new Promise(function(resolve10, reject) {
57021
+ return new Promise(function(resolve11, reject) {
57022
57022
  var gen = fn2.apply(self2, args);
57023
57023
  function _next(value) {
57024
- asyncGeneratorStep(gen, resolve10, reject, _next, _throw, "next", value);
57024
+ asyncGeneratorStep(gen, resolve11, reject, _next, _throw, "next", value);
57025
57025
  }
57026
57026
  function _throw(err) {
57027
- asyncGeneratorStep(gen, resolve10, reject, _next, _throw, "throw", err);
57027
+ asyncGeneratorStep(gen, resolve11, reject, _next, _throw, "throw", err);
57028
57028
  }
57029
57029
  _next(void 0);
57030
57030
  });
@@ -57658,7 +57658,7 @@ var require_dist4 = __commonJS({
57658
57658
  for (var i5 = 0, arr2 = new Array(len); i5 < len; i5++) arr2[i5] = arr[i5];
57659
57659
  return arr2;
57660
57660
  }
57661
- function asyncGeneratorStep(gen, resolve10, reject, _next, _throw, key, arg) {
57661
+ function asyncGeneratorStep(gen, resolve11, reject, _next, _throw, key, arg) {
57662
57662
  try {
57663
57663
  var info = gen[key](arg);
57664
57664
  var value = info.value;
@@ -57667,7 +57667,7 @@ var require_dist4 = __commonJS({
57667
57667
  return;
57668
57668
  }
57669
57669
  if (info.done) {
57670
- resolve10(value);
57670
+ resolve11(value);
57671
57671
  } else {
57672
57672
  Promise.resolve(value).then(_next, _throw);
57673
57673
  }
@@ -57675,13 +57675,13 @@ var require_dist4 = __commonJS({
57675
57675
  function _asyncToGenerator(fn2) {
57676
57676
  return function() {
57677
57677
  var self2 = this, args = arguments;
57678
- return new Promise(function(resolve10, reject) {
57678
+ return new Promise(function(resolve11, reject) {
57679
57679
  var gen = fn2.apply(self2, args);
57680
57680
  function _next(value) {
57681
- asyncGeneratorStep(gen, resolve10, reject, _next, _throw, "next", value);
57681
+ asyncGeneratorStep(gen, resolve11, reject, _next, _throw, "next", value);
57682
57682
  }
57683
57683
  function _throw(err) {
57684
- asyncGeneratorStep(gen, resolve10, reject, _next, _throw, "throw", err);
57684
+ asyncGeneratorStep(gen, resolve11, reject, _next, _throw, "throw", err);
57685
57685
  }
57686
57686
  _next(void 0);
57687
57687
  });
@@ -58117,12 +58117,12 @@ var require_text2 = __commonJS({
58117
58117
  this.close();
58118
58118
  }
58119
58119
  async validate() {
58120
- let valid = await this.validator(this.value);
58121
- if (typeof valid === `string`) {
58122
- this.errorMsg = valid;
58123
- valid = false;
58120
+ let valid2 = await this.validator(this.value);
58121
+ if (typeof valid2 === `string`) {
58122
+ this.errorMsg = valid2;
58123
+ valid2 = false;
58124
58124
  }
58125
- this.error = !valid;
58125
+ this.error = !valid2;
58126
58126
  }
58127
58127
  async submit() {
58128
58128
  this.value = this.value || this.initial;
@@ -58867,12 +58867,12 @@ var require_date2 = __commonJS({
58867
58867
  this.close();
58868
58868
  }
58869
58869
  async validate() {
58870
- let valid = await this.validator(this.value);
58871
- if (typeof valid === "string") {
58872
- this.errorMsg = valid;
58873
- valid = false;
58870
+ let valid2 = await this.validator(this.value);
58871
+ if (typeof valid2 === "string") {
58872
+ this.errorMsg = valid2;
58873
+ valid2 = false;
58874
58874
  }
58875
- this.error = !valid;
58875
+ this.error = !valid2;
58876
58876
  }
58877
58877
  async submit() {
58878
58878
  await this.validate();
@@ -59023,12 +59023,12 @@ var require_number2 = __commonJS({
59023
59023
  this.close();
59024
59024
  }
59025
59025
  async validate() {
59026
- let valid = await this.validator(this.value);
59027
- if (typeof valid === `string`) {
59028
- this.errorMsg = valid;
59029
- valid = false;
59026
+ let valid2 = await this.validator(this.value);
59027
+ if (typeof valid2 === `string`) {
59028
+ this.errorMsg = valid2;
59029
+ valid2 = false;
59030
59030
  }
59031
- this.error = !valid;
59031
+ this.error = !valid2;
59032
59032
  }
59033
59033
  async submit() {
59034
59034
  await this.validate();
@@ -64511,7 +64511,7 @@ var require_lib9 = __commonJS({
64511
64511
  let accum = [];
64512
64512
  let accumBytes = 0;
64513
64513
  let abort = false;
64514
- return new Body.Promise(function(resolve10, reject) {
64514
+ return new Body.Promise(function(resolve11, reject) {
64515
64515
  let resTimeout;
64516
64516
  if (_this4.timeout) {
64517
64517
  resTimeout = setTimeout(function() {
@@ -64545,7 +64545,7 @@ var require_lib9 = __commonJS({
64545
64545
  }
64546
64546
  clearTimeout(resTimeout);
64547
64547
  try {
64548
- resolve10(Buffer.concat(accum, accumBytes));
64548
+ resolve11(Buffer.concat(accum, accumBytes));
64549
64549
  } catch (err) {
64550
64550
  reject(new FetchError(`Could not create Buffer from response body for ${_this4.url}: ${err.message}`, "system", err));
64551
64551
  }
@@ -65220,7 +65220,7 @@ var require_lib9 = __commonJS({
65220
65220
  throw new Error("native promise missing, set fetch.Promise to your favorite alternative");
65221
65221
  }
65222
65222
  Body.Promise = fetch5.Promise;
65223
- return new fetch5.Promise(function(resolve10, reject) {
65223
+ return new fetch5.Promise(function(resolve11, reject) {
65224
65224
  const request3 = new Request2(url3, opts);
65225
65225
  const options = getNodeRequestOptions(request3);
65226
65226
  const send = (options.protocol === "https:" ? https2 : http5).request;
@@ -65353,7 +65353,7 @@ var require_lib9 = __commonJS({
65353
65353
  requestOpts.body = void 0;
65354
65354
  requestOpts.headers.delete("content-length");
65355
65355
  }
65356
- resolve10(fetch5(new Request2(locationURL, requestOpts)));
65356
+ resolve11(fetch5(new Request2(locationURL, requestOpts)));
65357
65357
  finalize();
65358
65358
  return;
65359
65359
  }
@@ -65374,7 +65374,7 @@ var require_lib9 = __commonJS({
65374
65374
  const codings = headers.get("Content-Encoding");
65375
65375
  if (!request3.compress || request3.method === "HEAD" || codings === null || res.statusCode === 204 || res.statusCode === 304) {
65376
65376
  response = new Response(body, response_options);
65377
- resolve10(response);
65377
+ resolve11(response);
65378
65378
  return;
65379
65379
  }
65380
65380
  const zlibOptions = {
@@ -65384,7 +65384,7 @@ var require_lib9 = __commonJS({
65384
65384
  if (codings == "gzip" || codings == "x-gzip") {
65385
65385
  body = body.pipe(zlib2.createGunzip(zlibOptions));
65386
65386
  response = new Response(body, response_options);
65387
- resolve10(response);
65387
+ resolve11(response);
65388
65388
  return;
65389
65389
  }
65390
65390
  if (codings == "deflate" || codings == "x-deflate") {
@@ -65396,12 +65396,12 @@ var require_lib9 = __commonJS({
65396
65396
  body = body.pipe(zlib2.createInflateRaw());
65397
65397
  }
65398
65398
  response = new Response(body, response_options);
65399
- resolve10(response);
65399
+ resolve11(response);
65400
65400
  });
65401
65401
  raw.on("end", function() {
65402
65402
  if (!response) {
65403
65403
  response = new Response(body, response_options);
65404
- resolve10(response);
65404
+ resolve11(response);
65405
65405
  }
65406
65406
  });
65407
65407
  return;
@@ -65409,11 +65409,11 @@ var require_lib9 = __commonJS({
65409
65409
  if (codings == "br" && typeof zlib2.createBrotliDecompress === "function") {
65410
65410
  body = body.pipe(zlib2.createBrotliDecompress());
65411
65411
  response = new Response(body, response_options);
65412
- resolve10(response);
65412
+ resolve11(response);
65413
65413
  return;
65414
65414
  }
65415
65415
  response = new Response(body, response_options);
65416
- resolve10(response);
65416
+ resolve11(response);
65417
65417
  });
65418
65418
  writeToStream(req, request3);
65419
65419
  });
@@ -65547,20 +65547,20 @@ function pLimit(concurrency) {
65547
65547
  activeCount--;
65548
65548
  resumeNext();
65549
65549
  };
65550
- const run = async (function_, resolve10, arguments_) => {
65550
+ const run = async (function_, resolve11, arguments_) => {
65551
65551
  const result = (async () => function_(...arguments_))();
65552
- resolve10(result);
65552
+ resolve11(result);
65553
65553
  try {
65554
65554
  await result;
65555
65555
  } catch {
65556
65556
  }
65557
65557
  next();
65558
65558
  };
65559
- const enqueue = (function_, resolve10, arguments_) => {
65559
+ const enqueue = (function_, resolve11, arguments_) => {
65560
65560
  new Promise((internalResolve) => {
65561
65561
  queue.enqueue(internalResolve);
65562
65562
  }).then(
65563
- run.bind(void 0, function_, resolve10, arguments_)
65563
+ run.bind(void 0, function_, resolve11, arguments_)
65564
65564
  );
65565
65565
  (async () => {
65566
65566
  await Promise.resolve();
@@ -65569,8 +65569,8 @@ function pLimit(concurrency) {
65569
65569
  }
65570
65570
  })();
65571
65571
  };
65572
- const generator = (function_, ...arguments_) => new Promise((resolve10) => {
65573
- enqueue(function_, resolve10, arguments_);
65572
+ const generator = (function_, ...arguments_) => new Promise((resolve11) => {
65573
+ enqueue(function_, resolve11, arguments_);
65574
65574
  });
65575
65575
  Object.defineProperties(generator, {
65576
65576
  activeCount: {
@@ -69408,10 +69408,10 @@ var require_node_stream_zip = __commonJS({
69408
69408
  const zip = new StreamZip3(config);
69409
69409
  zip.on("entry", (entry) => this.emit("entry", entry));
69410
69410
  zip.on("extract", (entry, outPath) => this.emit("extract", entry, outPath));
69411
- this[propZip] = new Promise((resolve10, reject) => {
69411
+ this[propZip] = new Promise((resolve11, reject) => {
69412
69412
  zip.on("ready", () => {
69413
69413
  zip.removeListener("error", reject);
69414
- resolve10(zip);
69414
+ resolve11(zip);
69415
69415
  });
69416
69416
  zip.on("error", reject);
69417
69417
  });
@@ -69432,23 +69432,23 @@ var require_node_stream_zip = __commonJS({
69432
69432
  }
69433
69433
  async stream(entry) {
69434
69434
  const zip = await this[propZip];
69435
- return new Promise((resolve10, reject) => {
69435
+ return new Promise((resolve11, reject) => {
69436
69436
  zip.stream(entry, (err, stm) => {
69437
69437
  if (err) {
69438
69438
  reject(err);
69439
69439
  } else {
69440
- resolve10(stm);
69440
+ resolve11(stm);
69441
69441
  }
69442
69442
  });
69443
69443
  });
69444
69444
  }
69445
69445
  async entryData(entry) {
69446
69446
  const stm = await this.stream(entry);
69447
- return new Promise((resolve10, reject) => {
69447
+ return new Promise((resolve11, reject) => {
69448
69448
  const data2 = [];
69449
69449
  stm.on("data", (chunk) => data2.push(chunk));
69450
69450
  stm.on("end", () => {
69451
- resolve10(Buffer.concat(data2));
69451
+ resolve11(Buffer.concat(data2));
69452
69452
  });
69453
69453
  stm.on("error", (err) => {
69454
69454
  stm.removeAllListeners("end");
@@ -69458,24 +69458,24 @@ var require_node_stream_zip = __commonJS({
69458
69458
  }
69459
69459
  async extract(entry, outPath) {
69460
69460
  const zip = await this[propZip];
69461
- return new Promise((resolve10, reject) => {
69461
+ return new Promise((resolve11, reject) => {
69462
69462
  zip.extract(entry, outPath, (err, res) => {
69463
69463
  if (err) {
69464
69464
  reject(err);
69465
69465
  } else {
69466
- resolve10(res);
69466
+ resolve11(res);
69467
69467
  }
69468
69468
  });
69469
69469
  });
69470
69470
  }
69471
69471
  async close() {
69472
69472
  const zip = await this[propZip];
69473
- return new Promise((resolve10, reject) => {
69473
+ return new Promise((resolve11, reject) => {
69474
69474
  zip.close((err) => {
69475
69475
  if (err) {
69476
69476
  reject(err);
69477
69477
  } else {
69478
- resolve10();
69478
+ resolve11();
69479
69479
  }
69480
69480
  });
69481
69481
  });
@@ -69964,12 +69964,12 @@ async function spawnProcess(command15, args = [], options = {}, spawnProcessOpti
69964
69964
  logger.info("[dry-run] Not spawning process:", `${command15} ${argsString}`);
69965
69965
  return void 0;
69966
69966
  }
69967
- return new Promise((resolve10, reject) => {
69967
+ return new Promise((resolve11, reject) => {
69968
69968
  const stdoutChunks = [];
69969
69969
  let stdout = "";
69970
69970
  let stderr = "";
69971
69971
  let child;
69972
- const succeed = () => setTimeout(() => resolve10(Buffer.concat(stdoutChunks)), 0);
69972
+ const succeed = () => setTimeout(() => resolve11(Buffer.concat(stdoutChunks)), 0);
69973
69973
  const fail = (e5) => reject(processError(e5.code, command15, args, options, stdout, stderr));
69974
69974
  try {
69975
69975
  logger.trace("Spawning process:", `${command15} ${argsString}`);
@@ -70023,9 +70023,9 @@ async function calculateChecksum(filePath, options) {
70023
70023
  logger.debug(`Calculating "${algorithm}" hashsum for file: ${filePath}`);
70024
70024
  const stream2 = fs4.createReadStream(filePath);
70025
70025
  const hash = (0, import_crypto2.createHash)(algorithm);
70026
- return new Promise((resolve10, reject) => {
70026
+ return new Promise((resolve11, reject) => {
70027
70027
  stream2.on("data", (data2) => hash.update(data2));
70028
- stream2.on("end", () => resolve10(formatDigest(hash, format7)));
70028
+ stream2.on("end", () => resolve11(formatDigest(hash, format7)));
70029
70029
  stream2.on("error", reject);
70030
70030
  });
70031
70031
  }
@@ -74721,8 +74721,8 @@ var require_light = __commonJS({
74721
74721
  return this.Promise.resolve();
74722
74722
  }
74723
74723
  yieldLoop(t6 = 0) {
74724
- return new this.Promise(function(resolve10, reject) {
74725
- return setTimeout(resolve10, t6);
74724
+ return new this.Promise(function(resolve11, reject) {
74725
+ return setTimeout(resolve11, t6);
74726
74726
  });
74727
74727
  }
74728
74728
  computePenalty() {
@@ -74933,15 +74933,15 @@ var require_light = __commonJS({
74933
74933
  return this._queue.length === 0;
74934
74934
  }
74935
74935
  async _tryToRun() {
74936
- var args, cb, error3, reject, resolve10, returned, task;
74936
+ var args, cb, error3, reject, resolve11, returned, task;
74937
74937
  if (this._running < 1 && this._queue.length > 0) {
74938
74938
  this._running++;
74939
- ({ task, args, resolve: resolve10, reject } = this._queue.shift());
74939
+ ({ task, args, resolve: resolve11, reject } = this._queue.shift());
74940
74940
  cb = await (async function() {
74941
74941
  try {
74942
74942
  returned = await task(...args);
74943
74943
  return function() {
74944
- return resolve10(returned);
74944
+ return resolve11(returned);
74945
74945
  };
74946
74946
  } catch (error1) {
74947
74947
  error3 = error1;
@@ -74956,13 +74956,13 @@ var require_light = __commonJS({
74956
74956
  }
74957
74957
  }
74958
74958
  schedule(task, ...args) {
74959
- var promise, reject, resolve10;
74960
- resolve10 = reject = null;
74959
+ var promise, reject, resolve11;
74960
+ resolve11 = reject = null;
74961
74961
  promise = new this.Promise(function(_resolve, _reject) {
74962
- resolve10 = _resolve;
74962
+ resolve11 = _resolve;
74963
74963
  return reject = _reject;
74964
74964
  });
74965
- this._queue.push({ task, args, resolve: resolve10, reject });
74965
+ this._queue.push({ task, args, resolve: resolve11, reject });
74966
74966
  this._tryToRun();
74967
74967
  return promise;
74968
74968
  }
@@ -75363,14 +75363,14 @@ var require_light = __commonJS({
75363
75363
  counts = this._states.counts;
75364
75364
  return counts[0] + counts[1] + counts[2] + counts[3] === at4;
75365
75365
  };
75366
- return new this.Promise((resolve10, reject) => {
75366
+ return new this.Promise((resolve11, reject) => {
75367
75367
  if (finished()) {
75368
- return resolve10();
75368
+ return resolve11();
75369
75369
  } else {
75370
75370
  return this.on("done", () => {
75371
75371
  if (finished()) {
75372
75372
  this.removeAllListeners("done");
75373
- return resolve10();
75373
+ return resolve11();
75374
75374
  }
75375
75375
  });
75376
75376
  }
@@ -75463,9 +75463,9 @@ var require_light = __commonJS({
75463
75463
  options = parser$5.load(options, this.jobDefaults);
75464
75464
  }
75465
75465
  task = (...args2) => {
75466
- return new this.Promise(function(resolve10, reject) {
75466
+ return new this.Promise(function(resolve11, reject) {
75467
75467
  return fn2(...args2, function(...args3) {
75468
- return (args3[0] != null ? reject : resolve10)(args3);
75468
+ return (args3[0] != null ? reject : resolve11)(args3);
75469
75469
  });
75470
75470
  });
75471
75471
  };
@@ -76660,7 +76660,7 @@ async function forEachChained(array2, iteratee, thisArg) {
76660
76660
  );
76661
76661
  }
76662
76662
  async function sleep(ms4) {
76663
- return new Promise((resolve10) => setTimeout(resolve10, ms4));
76663
+ return new Promise((resolve11) => setTimeout(resolve11, ms4));
76664
76664
  }
76665
76665
  async function withRetry(fn2, maxRetries = 3, onRetry) {
76666
76666
  if (!onRetry) {
@@ -77638,7 +77638,7 @@ var init_github = __esm({
77638
77638
  );
77639
77639
  }
77640
77640
  await new Promise(
77641
- (resolve10, reject) => response.body.pipe(fs6.createWriteStream(tempFilepath)).on("finish", () => resolve10()).on("error", reject)
77641
+ (resolve11, reject) => response.body.pipe(fs6.createWriteStream(tempFilepath)).on("finish", () => resolve11()).on("error", reject)
77642
77642
  );
77643
77643
  return tempFilepath;
77644
77644
  },
@@ -78324,8 +78324,8 @@ var require_retry = __commonJS({
78324
78324
  }
78325
78325
  const delay = getNextRetryDelay(config);
78326
78326
  err.config.retryConfig.currentRetryAttempt += 1;
78327
- const backoff = config.retryBackoff ? config.retryBackoff(err, delay) : new Promise((resolve10) => {
78328
- setTimeout(resolve10, delay);
78327
+ const backoff = config.retryBackoff ? config.retryBackoff(err, delay) : new Promise((resolve11) => {
78328
+ setTimeout(resolve11, delay);
78329
78329
  });
78330
78330
  if (config.onRetryAttempt) {
78331
78331
  config.onRetryAttempt(err);
@@ -78982,8 +78982,8 @@ var require_helpers = __commonJS({
78982
78982
  function req(url3, opts = {}) {
78983
78983
  const href = typeof url3 === "string" ? url3 : url3.href;
78984
78984
  const req2 = (href.startsWith("https:") ? https2 : http5).request(url3, opts);
78985
- const promise = new Promise((resolve10, reject) => {
78986
- req2.once("response", resolve10).once("error", reject).end();
78985
+ const promise = new Promise((resolve11, reject) => {
78986
+ req2.once("response", resolve11).once("error", reject).end();
78987
78987
  });
78988
78988
  req2.then = promise.then.bind(promise);
78989
78989
  return req2;
@@ -79162,7 +79162,7 @@ var require_parse_proxy_response = __commonJS({
79162
79162
  var debug_1 = __importDefault2(require_src());
79163
79163
  var debug4 = (0, debug_1.default)("https-proxy-agent:parse-proxy-response");
79164
79164
  function parseProxyResponse2(socket) {
79165
- return new Promise((resolve10, reject) => {
79165
+ return new Promise((resolve11, reject) => {
79166
79166
  let buffersLength = 0;
79167
79167
  const buffers = [];
79168
79168
  function read() {
@@ -79228,7 +79228,7 @@ var require_parse_proxy_response = __commonJS({
79228
79228
  }
79229
79229
  debug4("got proxy server response: %o %o", firstLine, headers);
79230
79230
  cleanup();
79231
- resolve10({
79231
+ resolve11({
79232
79232
  connect: {
79233
79233
  statusCode,
79234
79234
  statusText,
@@ -79531,11 +79531,11 @@ var require_gaxios = __commonJS({
79531
79531
  if (!opts.validateStatus(translatedResponse.status)) {
79532
79532
  if (opts.responseType === "stream") {
79533
79533
  let response = "";
79534
- await new Promise((resolve10) => {
79534
+ await new Promise((resolve11) => {
79535
79535
  (translatedResponse === null || translatedResponse === void 0 ? void 0 : translatedResponse.data).on("data", (chunk) => {
79536
79536
  response += chunk;
79537
79537
  });
79538
- (translatedResponse === null || translatedResponse === void 0 ? void 0 : translatedResponse.data).on("end", resolve10);
79538
+ (translatedResponse === null || translatedResponse === void 0 ? void 0 : translatedResponse.data).on("end", resolve11);
79539
79539
  });
79540
79540
  translatedResponse.data = response;
79541
79541
  }
@@ -84598,13 +84598,13 @@ var require_verify_stream = __commonJS({
84598
84598
  util5.inherits(VerifyStream, Stream3);
84599
84599
  VerifyStream.prototype.verify = function verify() {
84600
84600
  try {
84601
- var valid = jwsVerify(this.signature.buffer, this.algorithm, this.key.buffer);
84601
+ var valid2 = jwsVerify(this.signature.buffer, this.algorithm, this.key.buffer);
84602
84602
  var obj = jwsDecode(this.signature.buffer, this.encoding);
84603
- this.emit("done", valid, obj);
84604
- this.emit("data", valid);
84603
+ this.emit("done", valid2, obj);
84604
+ this.emit("data", valid2);
84605
84605
  this.emit("end");
84606
84606
  this.readable = false;
84607
- return valid;
84607
+ return valid2;
84608
84608
  } catch (e5) {
84609
84609
  this.readable = false;
84610
84610
  this.emit("error", e5);
@@ -85062,7 +85062,7 @@ var require_jwtaccess = __commonJS({
85062
85062
  }
85063
85063
  }
85064
85064
  fromStreamAsync(inputStream) {
85065
- return new Promise((resolve10, reject) => {
85065
+ return new Promise((resolve11, reject) => {
85066
85066
  if (!inputStream) {
85067
85067
  reject(new Error("Must pass in a stream containing the service account auth settings."));
85068
85068
  }
@@ -85071,7 +85071,7 @@ var require_jwtaccess = __commonJS({
85071
85071
  try {
85072
85072
  const data2 = JSON.parse(s8);
85073
85073
  this.fromJSON(data2);
85074
- resolve10();
85074
+ resolve11();
85075
85075
  } catch (err) {
85076
85076
  reject(err);
85077
85077
  }
@@ -85291,7 +85291,7 @@ var require_jwtclient = __commonJS({
85291
85291
  }
85292
85292
  }
85293
85293
  fromStreamAsync(inputStream) {
85294
- return new Promise((resolve10, reject) => {
85294
+ return new Promise((resolve11, reject) => {
85295
85295
  if (!inputStream) {
85296
85296
  throw new Error("Must pass in a stream containing the service account auth settings.");
85297
85297
  }
@@ -85300,7 +85300,7 @@ var require_jwtclient = __commonJS({
85300
85300
  try {
85301
85301
  const data2 = JSON.parse(s8);
85302
85302
  this.fromJSON(data2);
85303
- resolve10();
85303
+ resolve11();
85304
85304
  } catch (e5) {
85305
85305
  reject(e5);
85306
85306
  }
@@ -85421,7 +85421,7 @@ var require_refreshclient = __commonJS({
85421
85421
  }
85422
85422
  }
85423
85423
  async fromStreamAsync(inputStream) {
85424
- return new Promise((resolve10, reject) => {
85424
+ return new Promise((resolve11, reject) => {
85425
85425
  if (!inputStream) {
85426
85426
  return reject(new Error("Must pass in a stream containing the user refresh token."));
85427
85427
  }
@@ -85430,7 +85430,7 @@ var require_refreshclient = __commonJS({
85430
85430
  try {
85431
85431
  const data2 = JSON.parse(s8);
85432
85432
  this.fromJSON(data2);
85433
- return resolve10();
85433
+ return resolve11();
85434
85434
  } catch (err) {
85435
85435
  return reject(err);
85436
85436
  }
@@ -87003,7 +87003,7 @@ var require_pluggable_auth_handler = __commonJS({
87003
87003
  * @return A promise that resolves with the executable response.
87004
87004
  */
87005
87005
  retrieveResponseFromExecutable(envMap) {
87006
- return new Promise((resolve10, reject) => {
87006
+ return new Promise((resolve11, reject) => {
87007
87007
  const child = childProcess.spawn(this.commandComponents[0], this.commandComponents.slice(1), {
87008
87008
  env: { ...process.env, ...Object.fromEntries(envMap) }
87009
87009
  });
@@ -87025,7 +87025,7 @@ var require_pluggable_auth_handler = __commonJS({
87025
87025
  try {
87026
87026
  const responseJson = JSON.parse(output);
87027
87027
  const response = new executable_response_1.ExecutableResponse(responseJson);
87028
- return resolve10(response);
87028
+ return resolve11(response);
87029
87029
  } catch (error3) {
87030
87030
  if (error3 instanceof executable_response_1.ExecutableResponseError) {
87031
87031
  return reject(error3);
@@ -87879,7 +87879,7 @@ var require_googleauth = __commonJS({
87879
87879
  }
87880
87880
  }
87881
87881
  fromStreamAsync(inputStream, options) {
87882
- return new Promise((resolve10, reject) => {
87882
+ return new Promise((resolve11, reject) => {
87883
87883
  if (!inputStream) {
87884
87884
  throw new Error("Must pass in a stream containing the Google auth settings.");
87885
87885
  }
@@ -87889,7 +87889,7 @@ var require_googleauth = __commonJS({
87889
87889
  try {
87890
87890
  const data2 = JSON.parse(chunks.join(""));
87891
87891
  const r6 = this._cacheClientFromJSON(data2, options);
87892
- return resolve10(r6);
87892
+ return resolve11(r6);
87893
87893
  } catch (err) {
87894
87894
  if (!this.keyFilename)
87895
87895
  throw err;
@@ -87899,7 +87899,7 @@ var require_googleauth = __commonJS({
87899
87899
  });
87900
87900
  this.cachedCredential = client;
87901
87901
  this.setGapicJWTValues(client);
87902
- return resolve10(client);
87902
+ return resolve11(client);
87903
87903
  }
87904
87904
  } catch (err) {
87905
87905
  return reject(err);
@@ -87935,17 +87935,17 @@ var require_googleauth = __commonJS({
87935
87935
  * Run the Google Cloud SDK command that prints the default project ID
87936
87936
  */
87937
87937
  async getDefaultServiceProjectId() {
87938
- return new Promise((resolve10) => {
87938
+ return new Promise((resolve11) => {
87939
87939
  (0, child_process_1.exec)("gcloud config config-helper --format json", (err, stdout) => {
87940
87940
  if (!err && stdout) {
87941
87941
  try {
87942
87942
  const projectId = JSON.parse(stdout).configuration.properties.core.project;
87943
- resolve10(projectId);
87943
+ resolve11(projectId);
87944
87944
  return;
87945
87945
  } catch (e5) {
87946
87946
  }
87947
87947
  }
87948
- resolve10(null);
87948
+ resolve11(null);
87949
87949
  });
87950
87950
  });
87951
87951
  }
@@ -89018,7 +89018,7 @@ var require_dist7 = __commonJS({
89018
89018
  init_import_meta_url();
89019
89019
  Object.defineProperty(exports2, "__esModule", { value: true });
89020
89020
  function once2(emitter, name, { signal } = {}) {
89021
- return new Promise((resolve10, reject) => {
89021
+ return new Promise((resolve11, reject) => {
89022
89022
  function cleanup() {
89023
89023
  signal === null || signal === void 0 ? void 0 : signal.removeEventListener("abort", onAbort);
89024
89024
  emitter.removeListener(name, onEvent);
@@ -89026,7 +89026,7 @@ var require_dist7 = __commonJS({
89026
89026
  }
89027
89027
  function onEvent(...args) {
89028
89028
  cleanup();
89029
- resolve10(args);
89029
+ resolve11(args);
89030
89030
  }
89031
89031
  function onError2(err) {
89032
89032
  cleanup();
@@ -89059,12 +89059,12 @@ var require_promisify = __commonJS({
89059
89059
  Object.defineProperty(exports2, "__esModule", { value: true });
89060
89060
  function promisify5(fn2) {
89061
89061
  return function(req, opts) {
89062
- return new Promise((resolve10, reject) => {
89062
+ return new Promise((resolve11, reject) => {
89063
89063
  fn2.call(this, req, opts, (err, rtn) => {
89064
89064
  if (err) {
89065
89065
  reject(err);
89066
89066
  } else {
89067
- resolve10(rtn);
89067
+ resolve11(rtn);
89068
89068
  }
89069
89069
  });
89070
89070
  });
@@ -89265,11 +89265,11 @@ var require_agent = __commonJS({
89265
89265
  init_import_meta_url();
89266
89266
  var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P6, generator) {
89267
89267
  function adopt(value) {
89268
- return value instanceof P6 ? value : new P6(function(resolve10) {
89269
- resolve10(value);
89268
+ return value instanceof P6 ? value : new P6(function(resolve11) {
89269
+ resolve11(value);
89270
89270
  });
89271
89271
  }
89272
- return new (P6 || (P6 = Promise))(function(resolve10, reject) {
89272
+ return new (P6 || (P6 = Promise))(function(resolve11, reject) {
89273
89273
  function fulfilled(value) {
89274
89274
  try {
89275
89275
  step(generator.next(value));
@@ -89285,7 +89285,7 @@ var require_agent = __commonJS({
89285
89285
  }
89286
89286
  }
89287
89287
  function step(result) {
89288
- result.done ? resolve10(result.value) : adopt(result.value).then(fulfilled, rejected);
89288
+ result.done ? resolve11(result.value) : adopt(result.value).then(fulfilled, rejected);
89289
89289
  }
89290
89290
  step((generator = generator.apply(thisArg, _arguments || [])).next());
89291
89291
  });
@@ -89427,7 +89427,7 @@ var require_parse_proxy_response2 = __commonJS({
89427
89427
  var debug_1 = __importDefault2(require_src());
89428
89428
  var debug4 = debug_1.default("https-proxy-agent:parse-proxy-response");
89429
89429
  function parseProxyResponse2(socket) {
89430
- return new Promise((resolve10, reject) => {
89430
+ return new Promise((resolve11, reject) => {
89431
89431
  let buffersLength = 0;
89432
89432
  const buffers = [];
89433
89433
  function read() {
@@ -89467,7 +89467,7 @@ var require_parse_proxy_response2 = __commonJS({
89467
89467
  const firstLine = buffered.toString("ascii", 0, buffered.indexOf("\r\n"));
89468
89468
  const statusCode = +firstLine.split(" ")[1];
89469
89469
  debug4("got proxy server response: %o", firstLine);
89470
- resolve10({
89470
+ resolve11({
89471
89471
  statusCode,
89472
89472
  buffered
89473
89473
  });
@@ -89489,11 +89489,11 @@ var require_agent2 = __commonJS({
89489
89489
  init_import_meta_url();
89490
89490
  var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P6, generator) {
89491
89491
  function adopt(value) {
89492
- return value instanceof P6 ? value : new P6(function(resolve10) {
89493
- resolve10(value);
89492
+ return value instanceof P6 ? value : new P6(function(resolve11) {
89493
+ resolve11(value);
89494
89494
  });
89495
89495
  }
89496
- return new (P6 || (P6 = Promise))(function(resolve10, reject) {
89496
+ return new (P6 || (P6 = Promise))(function(resolve11, reject) {
89497
89497
  function fulfilled(value) {
89498
89498
  try {
89499
89499
  step(generator.next(value));
@@ -89509,7 +89509,7 @@ var require_agent2 = __commonJS({
89509
89509
  }
89510
89510
  }
89511
89511
  function step(result) {
89512
- result.done ? resolve10(result.value) : adopt(result.value).then(fulfilled, rejected);
89512
+ result.done ? resolve11(result.value) : adopt(result.value).then(fulfilled, rejected);
89513
89513
  }
89514
89514
  step((generator = generator.apply(thisArg, _arguments || [])).next());
89515
89515
  });
@@ -91822,14 +91822,14 @@ var require_async_iterator = __commonJS({
91822
91822
  };
91823
91823
  }
91824
91824
  function readAndResolve(iter) {
91825
- var resolve10 = iter[kLastResolve];
91826
- if (resolve10 !== null) {
91825
+ var resolve11 = iter[kLastResolve];
91826
+ if (resolve11 !== null) {
91827
91827
  var data2 = iter[kStream].read();
91828
91828
  if (data2 !== null) {
91829
91829
  iter[kLastPromise] = null;
91830
91830
  iter[kLastResolve] = null;
91831
91831
  iter[kLastReject] = null;
91832
- resolve10(createIterResult(data2, false));
91832
+ resolve11(createIterResult(data2, false));
91833
91833
  }
91834
91834
  }
91835
91835
  }
@@ -91837,13 +91837,13 @@ var require_async_iterator = __commonJS({
91837
91837
  process.nextTick(readAndResolve, iter);
91838
91838
  }
91839
91839
  function wrapForNext(lastPromise, iter) {
91840
- return function(resolve10, reject) {
91840
+ return function(resolve11, reject) {
91841
91841
  lastPromise.then(function() {
91842
91842
  if (iter[kEnded]) {
91843
- resolve10(createIterResult(void 0, true));
91843
+ resolve11(createIterResult(void 0, true));
91844
91844
  return;
91845
91845
  }
91846
- iter[kHandlePromise](resolve10, reject);
91846
+ iter[kHandlePromise](resolve11, reject);
91847
91847
  }, reject);
91848
91848
  };
91849
91849
  }
@@ -91863,12 +91863,12 @@ var require_async_iterator = __commonJS({
91863
91863
  return Promise.resolve(createIterResult(void 0, true));
91864
91864
  }
91865
91865
  if (this[kStream].destroyed) {
91866
- return new Promise(function(resolve10, reject) {
91866
+ return new Promise(function(resolve11, reject) {
91867
91867
  process.nextTick(function() {
91868
91868
  if (_this[kError]) {
91869
91869
  reject(_this[kError]);
91870
91870
  } else {
91871
- resolve10(createIterResult(void 0, true));
91871
+ resolve11(createIterResult(void 0, true));
91872
91872
  }
91873
91873
  });
91874
91874
  });
@@ -91891,13 +91891,13 @@ var require_async_iterator = __commonJS({
91891
91891
  return this;
91892
91892
  }), _defineProperty(_Object$setPrototypeO, "return", function _return() {
91893
91893
  var _this2 = this;
91894
- return new Promise(function(resolve10, reject) {
91894
+ return new Promise(function(resolve11, reject) {
91895
91895
  _this2[kStream].destroy(null, function(err) {
91896
91896
  if (err) {
91897
91897
  reject(err);
91898
91898
  return;
91899
91899
  }
91900
- resolve10(createIterResult(void 0, true));
91900
+ resolve11(createIterResult(void 0, true));
91901
91901
  });
91902
91902
  });
91903
91903
  }), _Object$setPrototypeO), AsyncIteratorPrototype);
@@ -91919,15 +91919,15 @@ var require_async_iterator = __commonJS({
91919
91919
  value: stream2._readableState.endEmitted,
91920
91920
  writable: true
91921
91921
  }), _defineProperty(_Object$create, kHandlePromise, {
91922
- value: function value(resolve10, reject) {
91922
+ value: function value(resolve11, reject) {
91923
91923
  var data2 = iterator2[kStream].read();
91924
91924
  if (data2) {
91925
91925
  iterator2[kLastPromise] = null;
91926
91926
  iterator2[kLastResolve] = null;
91927
91927
  iterator2[kLastReject] = null;
91928
- resolve10(createIterResult(data2, false));
91928
+ resolve11(createIterResult(data2, false));
91929
91929
  } else {
91930
- iterator2[kLastResolve] = resolve10;
91930
+ iterator2[kLastResolve] = resolve11;
91931
91931
  iterator2[kLastReject] = reject;
91932
91932
  }
91933
91933
  },
@@ -91946,12 +91946,12 @@ var require_async_iterator = __commonJS({
91946
91946
  iterator2[kError] = err;
91947
91947
  return;
91948
91948
  }
91949
- var resolve10 = iterator2[kLastResolve];
91950
- if (resolve10 !== null) {
91949
+ var resolve11 = iterator2[kLastResolve];
91950
+ if (resolve11 !== null) {
91951
91951
  iterator2[kLastPromise] = null;
91952
91952
  iterator2[kLastResolve] = null;
91953
91953
  iterator2[kLastReject] = null;
91954
- resolve10(createIterResult(void 0, true));
91954
+ resolve11(createIterResult(void 0, true));
91955
91955
  }
91956
91956
  iterator2[kEnded] = true;
91957
91957
  });
@@ -91967,7 +91967,7 @@ var require_from = __commonJS({
91967
91967
  "node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/from.js"(exports2, module2) {
91968
91968
  "use strict";
91969
91969
  init_import_meta_url();
91970
- function asyncGeneratorStep(gen, resolve10, reject, _next, _throw, key, arg) {
91970
+ function asyncGeneratorStep(gen, resolve11, reject, _next, _throw, key, arg) {
91971
91971
  try {
91972
91972
  var info = gen[key](arg);
91973
91973
  var value = info.value;
@@ -91976,7 +91976,7 @@ var require_from = __commonJS({
91976
91976
  return;
91977
91977
  }
91978
91978
  if (info.done) {
91979
- resolve10(value);
91979
+ resolve11(value);
91980
91980
  } else {
91981
91981
  Promise.resolve(value).then(_next, _throw);
91982
91982
  }
@@ -91984,13 +91984,13 @@ var require_from = __commonJS({
91984
91984
  function _asyncToGenerator(fn2) {
91985
91985
  return function() {
91986
91986
  var self2 = this, args = arguments;
91987
- return new Promise(function(resolve10, reject) {
91987
+ return new Promise(function(resolve11, reject) {
91988
91988
  var gen = fn2.apply(self2, args);
91989
91989
  function _next(value) {
91990
- asyncGeneratorStep(gen, resolve10, reject, _next, _throw, "next", value);
91990
+ asyncGeneratorStep(gen, resolve11, reject, _next, _throw, "next", value);
91991
91991
  }
91992
91992
  function _throw(err) {
91993
- asyncGeneratorStep(gen, resolve10, reject, _next, _throw, "throw", err);
91993
+ asyncGeneratorStep(gen, resolve11, reject, _next, _throw, "throw", err);
91994
91994
  }
91995
91995
  _next(void 0);
91996
91996
  });
@@ -94186,7 +94186,7 @@ var require_src12 = __commonJS({
94186
94186
  if (this && this.Promise) {
94187
94187
  PromiseCtor = this.Promise;
94188
94188
  }
94189
- return new PromiseCtor((resolve10, reject) => {
94189
+ return new PromiseCtor((resolve11, reject) => {
94190
94190
  args.push((...args2) => {
94191
94191
  const callbackArgs = slice.call(args2);
94192
94192
  const err = callbackArgs.shift();
@@ -94194,9 +94194,9 @@ var require_src12 = __commonJS({
94194
94194
  return reject(err);
94195
94195
  }
94196
94196
  if (options.singular && callbackArgs.length === 1) {
94197
- resolve10(callbackArgs[0]);
94197
+ resolve11(callbackArgs[0]);
94198
94198
  } else {
94199
- resolve10(callbackArgs);
94199
+ resolve11(callbackArgs);
94200
94200
  }
94201
94201
  });
94202
94202
  originalMethod.apply(this, args);
@@ -94726,11 +94726,11 @@ var require_src13 = __commonJS({
94726
94726
  }
94727
94727
  const results = new Array();
94728
94728
  let otherArgs = [];
94729
- const promise = new Promise((resolve10, reject) => {
94729
+ const promise = new Promise((resolve11, reject) => {
94730
94730
  const stream2 = paginator3.runAsStream_(parsedArguments, originalMethod);
94731
94731
  stream2.on("error", reject).on("data", (data2) => results.push(data2)).on("end", () => {
94732
94732
  otherArgs = stream2._otherArgs || [];
94733
- resolve10(results);
94733
+ resolve11(results);
94734
94734
  });
94735
94735
  });
94736
94736
  if (!callback) {
@@ -94926,18 +94926,18 @@ var require_p_limit = __commonJS({
94926
94926
  queue.dequeue()();
94927
94927
  }
94928
94928
  };
94929
- const run = async (fn2, resolve10, ...args) => {
94929
+ const run = async (fn2, resolve11, ...args) => {
94930
94930
  activeCount++;
94931
94931
  const result = (async () => fn2(...args))();
94932
- resolve10(result);
94932
+ resolve11(result);
94933
94933
  try {
94934
94934
  await result;
94935
94935
  } catch {
94936
94936
  }
94937
94937
  next();
94938
94938
  };
94939
- const enqueue = (fn2, resolve10, ...args) => {
94940
- queue.enqueue(run.bind(null, fn2, resolve10, ...args));
94939
+ const enqueue = (fn2, resolve11, ...args) => {
94940
+ queue.enqueue(run.bind(null, fn2, resolve11, ...args));
94941
94941
  (async () => {
94942
94942
  await Promise.resolve();
94943
94943
  if (activeCount < concurrency && queue.size > 0) {
@@ -94945,8 +94945,8 @@ var require_p_limit = __commonJS({
94945
94945
  }
94946
94946
  })();
94947
94947
  };
94948
- const generator = (fn2, ...args) => new Promise((resolve10) => {
94949
- enqueue(fn2, resolve10, ...args);
94948
+ const generator = (fn2, ...args) => new Promise((resolve11) => {
94949
+ enqueue(fn2, resolve11, ...args);
94950
94950
  });
94951
94951
  Object.defineProperties(generator, {
94952
94952
  activeCount: {
@@ -95204,7 +95204,7 @@ var require_lib10 = __commonJS({
95204
95204
  init_import_meta_url();
95205
95205
  var retrier = require_retry3();
95206
95206
  function retry2(fn2, opts) {
95207
- function run(resolve10, reject) {
95207
+ function run(resolve11, reject) {
95208
95208
  var options = opts || {};
95209
95209
  var op3;
95210
95210
  if (!("randomize" in options)) {
@@ -95233,7 +95233,7 @@ var require_lib10 = __commonJS({
95233
95233
  onError2(err, num2);
95234
95234
  return;
95235
95235
  }
95236
- Promise.resolve(val).then(resolve10).catch(function catchIt(err) {
95236
+ Promise.resolve(val).then(resolve11).catch(function catchIt(err) {
95237
95237
  onError2(err, num2);
95238
95238
  });
95239
95239
  }
@@ -96643,22 +96643,22 @@ var init_resumable_upload = __esm({
96643
96643
  * @returns If there will be more chunks to read in the future
96644
96644
  */
96645
96645
  async waitForNextChunk() {
96646
- const willBeMoreChunks = await new Promise((resolve10) => {
96646
+ const willBeMoreChunks = await new Promise((resolve11) => {
96647
96647
  if (this.writeBuffers.length) {
96648
- return resolve10(true);
96648
+ return resolve11(true);
96649
96649
  }
96650
96650
  if (this.upstreamEnded) {
96651
- return resolve10(false);
96651
+ return resolve11(false);
96652
96652
  }
96653
96653
  const wroteToChunkBufferCallback = () => {
96654
96654
  removeListeners();
96655
- return resolve10(true);
96655
+ return resolve11(true);
96656
96656
  };
96657
96657
  const upstreamFinishedCallback = () => {
96658
96658
  removeListeners();
96659
96659
  if (this.writeBuffers.length)
96660
- return resolve10(true);
96661
- return resolve10(false);
96660
+ return resolve11(true);
96661
+ return resolve11(false);
96662
96662
  };
96663
96663
  const removeListeners = () => {
96664
96664
  this.removeListener("wroteToChunkBuffer", wroteToChunkBufferCallback);
@@ -97726,14 +97726,14 @@ var init_crc32c = __esm({
97726
97726
  }
97727
97727
  static async fromFile(file) {
97728
97728
  const crc32c = new _CRC32C();
97729
- await new Promise((resolve10, reject) => {
97729
+ await new Promise((resolve11, reject) => {
97730
97730
  (0, import_fs10.createReadStream)(file).on("data", (d9) => {
97731
97731
  if (typeof d9 === "string") {
97732
97732
  crc32c.update(Buffer.from(d9));
97733
97733
  } else {
97734
97734
  crc32c.update(d9);
97735
97735
  }
97736
- }).on("end", () => resolve10()).on("error", reject);
97736
+ }).on("end", () => resolve11()).on("error", reject);
97737
97737
  });
97738
97738
  return crc32c;
97739
97739
  }
@@ -99292,8 +99292,8 @@ var init_file = __esm({
99292
99292
  }
99293
99293
  if (!fileWriteStreamMetadataReceived) {
99294
99294
  try {
99295
- await new Promise((resolve10, reject) => {
99296
- fileWriteStream.once("metadata", resolve10);
99295
+ await new Promise((resolve11, reject) => {
99296
+ fileWriteStream.once("metadata", resolve11);
99297
99297
  fileWriteStream.once("error", reject);
99298
99298
  });
99299
99299
  } catch (e6) {
@@ -100875,7 +100875,7 @@ var init_file = __esm({
100875
100875
  maxRetries = 0;
100876
100876
  }
100877
100877
  const returnValue = (0, import_async_retry2.default)(async (bail) => {
100878
- return new Promise((resolve10, reject) => {
100878
+ return new Promise((resolve11, reject) => {
100879
100879
  if (maxRetries === 0) {
100880
100880
  this.storage.retryOptions.autoRetry = false;
100881
100881
  }
@@ -100890,7 +100890,7 @@ var init_file = __esm({
100890
100890
  return bail(err);
100891
100891
  };
100892
100892
  if (typeof data2 === "string" || Buffer.isBuffer(data2) || data2 instanceof Uint8Array) {
100893
- writable.on("error", handleError).on("finish", () => resolve10()).end(data2);
100893
+ writable.on("error", handleError).on("finish", () => resolve11()).end(data2);
100894
100894
  } else {
100895
100895
  (0, import_stream5.pipeline)(data2, writable, (err) => {
100896
100896
  if (err) {
@@ -100899,7 +100899,7 @@ var init_file = __esm({
100899
100899
  }
100900
100900
  handleError(err);
100901
100901
  } else {
100902
- resolve10();
100902
+ resolve11();
100903
100903
  }
100904
100904
  });
100905
100905
  }
@@ -104652,7 +104652,7 @@ var init_bucket = __esm({
104652
104652
  var _a6, _b2;
104653
104653
  const upload2 = (numberOfRetries) => {
104654
104654
  const returnValue = (0, import_async_retry3.default)(async (bail) => {
104655
- await new Promise((resolve10, reject) => {
104655
+ await new Promise((resolve11, reject) => {
104656
104656
  var _a7, _b3;
104657
104657
  if (numberOfRetries === 0 && ((_b3 = (_a7 = newFile === null || newFile === void 0 ? void 0 : newFile.storage) === null || _a7 === void 0 ? void 0 : _a7.retryOptions) === null || _b3 === void 0 ? void 0 : _b3.autoRetry)) {
104658
104658
  newFile.storage.retryOptions.autoRetry = false;
@@ -104668,7 +104668,7 @@ var init_bucket = __esm({
104668
104668
  return bail(err);
104669
104669
  }
104670
104670
  }).on("finish", () => {
104671
- return resolve10();
104671
+ return resolve11();
104672
104672
  });
104673
104673
  });
104674
104674
  }, {
@@ -115561,10 +115561,10 @@ var require_async = __commonJS({
115561
115561
  if (typeof args[arity - 1] === "function") {
115562
115562
  return asyncFn.apply(this, args);
115563
115563
  }
115564
- return new Promise((resolve10, reject2) => {
115564
+ return new Promise((resolve11, reject2) => {
115565
115565
  args[arity - 1] = (err, ...cbArgs) => {
115566
115566
  if (err) return reject2(err);
115567
- resolve10(cbArgs.length > 1 ? cbArgs : cbArgs[0]);
115567
+ resolve11(cbArgs.length > 1 ? cbArgs : cbArgs[0]);
115568
115568
  };
115569
115569
  asyncFn.apply(this, args);
115570
115570
  });
@@ -115810,13 +115810,13 @@ var require_async = __commonJS({
115810
115810
  var applyEachSeries = applyEach(mapSeries$1);
115811
115811
  const PROMISE_SYMBOL = /* @__PURE__ */ Symbol("promiseCallback");
115812
115812
  function promiseCallback() {
115813
- let resolve10, reject2;
115813
+ let resolve11, reject2;
115814
115814
  function callback(err, ...args) {
115815
115815
  if (err) return reject2(err);
115816
- resolve10(args.length > 1 ? args : args[0]);
115816
+ resolve11(args.length > 1 ? args : args[0]);
115817
115817
  }
115818
115818
  callback[PROMISE_SYMBOL] = new Promise((res, rej) => {
115819
- resolve10 = res, reject2 = rej;
115819
+ resolve11 = res, reject2 = rej;
115820
115820
  });
115821
115821
  return callback;
115822
115822
  }
@@ -116140,8 +116140,8 @@ var require_async = __commonJS({
116140
116140
  });
116141
116141
  }
116142
116142
  if (rejectOnError || !callback) {
116143
- return new Promise((resolve10, reject2) => {
116144
- res = resolve10;
116143
+ return new Promise((resolve11, reject2) => {
116144
+ res = resolve11;
116145
116145
  rej = reject2;
116146
116146
  });
116147
116147
  }
@@ -116180,10 +116180,10 @@ var require_async = __commonJS({
116180
116180
  }
116181
116181
  const eventMethod = (name) => (handler15) => {
116182
116182
  if (!handler15) {
116183
- return new Promise((resolve10, reject2) => {
116183
+ return new Promise((resolve11, reject2) => {
116184
116184
  once3(name, (err, data2) => {
116185
116185
  if (err) return reject2(err);
116186
- resolve10(data2);
116186
+ resolve11(data2);
116187
116187
  });
116188
116188
  });
116189
116189
  }
@@ -118107,6 +118107,22 @@ var init_crates = __esm({
118107
118107
  cratesConfig;
118108
118108
  /** GitHub repo configuration */
118109
118109
  githubRepo;
118110
+ /**
118111
+ * Read the version from Cargo.toml: the first top-level `version` key,
118112
+ * which is `[package]` or `[workspace.package]` in a typical manifest.
118113
+ *
118114
+ * @param rootDir - Project root directory
118115
+ * @returns The version, or undefined if there is no Cargo.toml or it has no
118116
+ * literal version (e.g. `version.workspace = true`)
118117
+ */
118118
+ static async readVersion(rootDir) {
118119
+ const cargoTomlPath = path11.join(rootDir, "Cargo.toml");
118120
+ if (!fs11.existsSync(cargoTomlPath)) {
118121
+ return void 0;
118122
+ }
118123
+ const content = fs11.readFileSync(cargoTomlPath, "utf-8");
118124
+ return /^\s*version\s*=\s*"([^"]+)"/m.exec(content)?.[1];
118125
+ }
118110
118126
  /**
118111
118127
  * Bump version in Cargo.toml using cargo set-version (from cargo-edit).
118112
118128
  *
@@ -118930,7 +118946,7 @@ var init_gcs2 = __esm({
118930
118946
  });
118931
118947
 
118932
118948
  // src/targets/gem.ts
118933
- var import_promises5, import_path11, DEFAULT_GEM_BIN, GEM_BIN, DEFAULT_GEM_REGEX, GemTarget;
118949
+ var import_promises5, import_path11, DEFAULT_GEM_BIN, GEM_BIN, GEMSPEC_VERSION_REGEX, VERSION_RB_REGEX, DEFAULT_GEM_REGEX, GemTarget;
118934
118950
  var init_gem = __esm({
118935
118951
  "src/targets/gem.ts"() {
118936
118952
  "use strict";
@@ -118944,10 +118960,50 @@ var init_gem = __esm({
118944
118960
  init_logger2();
118945
118961
  DEFAULT_GEM_BIN = "gem";
118946
118962
  GEM_BIN = process.env.GEM_BIN || DEFAULT_GEM_BIN;
118963
+ GEMSPEC_VERSION_REGEX = /^(\s*\w+\.version\s*=\s*["'])([^"']+)(["'])/m;
118964
+ VERSION_RB_REGEX = /^(\s*VERSION\s*=\s*["'])([^"']+)(["'])/m;
118947
118965
  DEFAULT_GEM_REGEX = /^.*(\.gem)$/;
118948
118966
  GemTarget = class _GemTarget extends BaseTarget {
118949
118967
  /** Target name */
118950
118968
  name = "gem";
118969
+ /**
118970
+ * Read the version from the first gemspec that bumpVersion() would update,
118971
+ * or from a lib/.../version.rb next to it when the gemspec references a
118972
+ * constant such as `MyGem::VERSION`.
118973
+ *
118974
+ * @param rootDir - Project root directory
118975
+ * @returns The version, or undefined if no gemspec declares a literal one
118976
+ */
118977
+ static async readVersion(rootDir) {
118978
+ const gemspecFiles = await findFiles(rootDir, {
118979
+ maxDepth: 2,
118980
+ fileFilter: (name) => name.endsWith(".gemspec")
118981
+ });
118982
+ for (const gemspecPath of gemspecFiles) {
118983
+ const content = await (0, import_promises5.readFile)(gemspecPath, "utf-8");
118984
+ const version2 = GEMSPEC_VERSION_REGEX.exec(content)?.[2] ?? await _GemTarget.readVersionRb((0, import_path11.join)((0, import_path11.dirname)(gemspecPath), "lib"));
118985
+ if (version2) {
118986
+ return version2;
118987
+ }
118988
+ }
118989
+ return void 0;
118990
+ }
118991
+ static async readVersionRb(dir) {
118992
+ let entries;
118993
+ try {
118994
+ entries = await (0, import_promises5.readdir)(dir, { withFileTypes: true });
118995
+ } catch {
118996
+ return void 0;
118997
+ }
118998
+ for (const entry of entries) {
118999
+ const fullPath = (0, import_path11.join)(dir, entry.name);
119000
+ const version2 = entry.isDirectory() ? await _GemTarget.readVersionRb(fullPath) : entry.name === "version.rb" ? VERSION_RB_REGEX.exec(await (0, import_promises5.readFile)(fullPath, "utf-8"))?.[2] : void 0;
119001
+ if (version2) {
119002
+ return version2;
119003
+ }
119004
+ }
119005
+ return void 0;
119006
+ }
118951
119007
  /**
118952
119008
  * Bump version in Ruby gem project files.
118953
119009
  *
@@ -118969,9 +119025,11 @@ var init_gem = __esm({
118969
119025
  let bumped = false;
118970
119026
  for (const gemspecPath of gemspecFiles) {
118971
119027
  const content = await (0, import_promises5.readFile)(gemspecPath, "utf-8");
118972
- const versionRegex = /^(\s*\w+\.version\s*=\s*["'])([^"']+)(["'])/m;
118973
- if (versionRegex.test(content)) {
118974
- const newContent = content.replace(versionRegex, `$1${newVersion}$3`);
119028
+ if (GEMSPEC_VERSION_REGEX.test(content)) {
119029
+ const newContent = content.replace(
119030
+ GEMSPEC_VERSION_REGEX,
119031
+ `$1${newVersion}$3`
119032
+ );
118975
119033
  if (newContent !== content) {
118976
119034
  logger.debug(`Updating version in ${gemspecPath} to ${newVersion}`);
118977
119035
  await (0, import_promises5.writeFile)(gemspecPath, newContent);
@@ -119009,9 +119067,11 @@ var init_gem = __esm({
119009
119067
  updated = subUpdated || updated;
119010
119068
  } else if (entry.name === "version.rb") {
119011
119069
  const content = await (0, import_promises5.readFile)(fullPath, "utf-8");
119012
- const versionRegex = /^(\s*VERSION\s*=\s*["'])([^"']+)(["'])/m;
119013
- if (versionRegex.test(content)) {
119014
- const newContent = content.replace(versionRegex, `$1${newVersion}$3`);
119070
+ if (VERSION_RB_REGEX.test(content)) {
119071
+ const newContent = content.replace(
119072
+ VERSION_RB_REGEX,
119073
+ `$1${newVersion}$3`
119074
+ );
119015
119075
  if (newContent !== content) {
119016
119076
  logger.debug(`Updating VERSION in ${fullPath} to ${newVersion}`);
119017
119077
  await (0, import_promises5.writeFile)(fullPath, newContent);
@@ -120443,13 +120503,13 @@ function abortable(promise, signal) {
120443
120503
  });
120444
120504
  return Promise.reject(new Error("Summary aborted"));
120445
120505
  }
120446
- return new Promise((resolve10, reject) => {
120506
+ return new Promise((resolve11, reject) => {
120447
120507
  const abort = () => {
120448
120508
  signal.removeEventListener("abort", abort);
120449
120509
  reject(new Error("Summary aborted"));
120450
120510
  };
120451
120511
  signal.addEventListener("abort", abort, { once: true });
120452
- promise.then(resolve10, reject).finally(() => signal.removeEventListener("abort", abort));
120512
+ promise.then(resolve11, reject).finally(() => signal.removeEventListener("abort", abort));
120453
120513
  });
120454
120514
  }
120455
120515
  function resolveAiSummaryLlm(config) {
@@ -123462,6 +123522,15 @@ var init_npm = __esm({
123462
123522
  return expandedTarget;
123463
123523
  });
123464
123524
  }
123525
+ /**
123526
+ * Read the version from package.json.
123527
+ *
123528
+ * @param rootDir - Project root directory
123529
+ * @returns The version, or undefined if there is no readable package.json
123530
+ */
123531
+ static async readVersion(rootDir) {
123532
+ return _NpmTarget.readPackageJsonVersion((0, import_path14.join)(rootDir, "package.json"));
123533
+ }
123465
123534
  /**
123466
123535
  * Bump version in package.json using npm or yarn.
123467
123536
  * Supports workspaces - bumps root and all workspace packages.
@@ -124446,6 +124515,9 @@ var init_nugetRegistry = __esm({
124446
124515
  });
124447
124516
 
124448
124517
  // src/targets/nuget.ts
124518
+ function readXmlTag(content, tag2) {
124519
+ return new RegExp(`<${tag2}>([^<]+)</${tag2}>`).exec(content)?.[1].trim();
124520
+ }
124449
124521
  var import_fs18, import_path15, import_crypto6, NUGET_DOTNET_BIN, DEFAULT_NUGET_SERVER_URL, DEFAULT_NUGET_REGEX, SYMBOLS_NUGET_REGEX, DOTNET_SPAWN_OPTIONS, NugetTarget;
124450
124522
  var init_nuget = __esm({
124451
124523
  "src/targets/nuget.ts"() {
@@ -124548,6 +124620,33 @@ var init_nuget = __esm({
124548
124620
  return expandedTarget;
124549
124621
  });
124550
124622
  }
124623
+ /**
124624
+ * Read the package version from Directory.Build.props, or from the first
124625
+ * .csproj that declares one, in the same order bumpVersion() edits them.
124626
+ *
124627
+ * @param rootDir - Project root directory
124628
+ * @returns The `<PackageVersion>`, `<Version>`, or `<VersionPrefix>` with
124629
+ * its `<VersionSuffix>`, or undefined if no .NET project file declares one
124630
+ */
124631
+ static async readVersion(rootDir) {
124632
+ const projectFiles = [
124633
+ "Directory.Build.props",
124634
+ ...(0, import_fs18.readdirSync)(rootDir).filter((f8) => f8.endsWith(".csproj"))
124635
+ ].map((file) => (0, import_path15.join)(rootDir, file)).filter((file) => (0, import_fs18.existsSync)(file));
124636
+ for (const file of projectFiles) {
124637
+ const content = (0, import_fs18.readFileSync)(file, "utf-8");
124638
+ const version2 = readXmlTag(content, "PackageVersion") ?? readXmlTag(content, "Version");
124639
+ if (version2) {
124640
+ return version2;
124641
+ }
124642
+ const prefix = readXmlTag(content, "VersionPrefix");
124643
+ if (prefix) {
124644
+ const suffix = readXmlTag(content, "VersionSuffix");
124645
+ return suffix ? `${prefix}-${suffix}` : prefix;
124646
+ }
124647
+ }
124648
+ return void 0;
124649
+ }
124551
124650
  /**
124552
124651
  * Bump version in .NET project files (.csproj, Directory.Build.props).
124553
124652
  *
@@ -124636,6 +124735,12 @@ var init_nuget = __esm({
124636
124735
  if (!updated) {
124637
124736
  return false;
124638
124737
  }
124738
+ if (/<VersionPrefix>/.test(newContent)) {
124739
+ newContent = newContent.replace(
124740
+ /(<VersionSuffix>)[^<]*(<\/VersionSuffix>)/g,
124741
+ "$1$2"
124742
+ );
124743
+ }
124639
124744
  if (newContent === content) {
124640
124745
  return true;
124641
124746
  }
@@ -124930,7 +125035,7 @@ var init_sentryPypi = __esm({
124930
125035
  });
124931
125036
 
124932
125037
  // src/targets/pypi.ts
124933
- var import_fs20, import_path17, DEFAULT_TWINE_BIN, TWINE_BIN, DEFAULT_PYPI_REGEX, PypiTarget;
125038
+ var import_fs20, import_path17, DEFAULT_TWINE_BIN, TWINE_BIN, PYPROJECT_VERSION_REGEX, DEFAULT_PYPI_REGEX, PypiTarget;
124934
125039
  var init_pypi = __esm({
124935
125040
  "src/targets/pypi.ts"() {
124936
125041
  "use strict";
@@ -124943,12 +125048,31 @@ var init_pypi = __esm({
124943
125048
  init_logger2();
124944
125049
  DEFAULT_TWINE_BIN = "twine";
124945
125050
  TWINE_BIN = process.env.TWINE_BIN || DEFAULT_TWINE_BIN;
125051
+ PYPROJECT_VERSION_REGEX = /^(\s*version\s*=\s*["'])([^"']+)(["'])/m;
124946
125052
  DEFAULT_PYPI_REGEX = /^.*\d\.\d.*(\.whl|\.gz|\.zip)$/;
124947
125053
  PypiTarget = class _PypiTarget extends BaseTarget {
124948
125054
  /** Target name */
124949
125055
  name = "pypi";
124950
125056
  /** Target options */
124951
125057
  pypiConfig;
125058
+ /**
125059
+ * Read the static version from pyproject.toml.
125060
+ *
125061
+ * @param rootDir - Project root directory
125062
+ * @returns The version, or undefined if there is no pyproject.toml, the
125063
+ * version is dynamic, or setuptools_scm derives it from git tags
125064
+ */
125065
+ static async readVersion(rootDir) {
125066
+ const pyprojectPath = (0, import_path17.join)(rootDir, "pyproject.toml");
125067
+ if (!(0, import_fs20.existsSync)(pyprojectPath)) {
125068
+ return void 0;
125069
+ }
125070
+ const content = (0, import_fs20.readFileSync)(pyprojectPath, "utf-8");
125071
+ if (content.includes("[tool.setuptools_scm]")) {
125072
+ return void 0;
125073
+ }
125074
+ return PYPROJECT_VERSION_REGEX.exec(content)?.[2];
125075
+ }
124952
125076
  /**
124953
125077
  * Bump version in Python project files.
124954
125078
  *
@@ -125019,14 +125143,16 @@ var init_pypi = __esm({
125019
125143
  * This handles standard PEP 621 [project] section with version field
125020
125144
  */
125021
125145
  static bumpDirectToml(pyprojectPath, content, newVersion) {
125022
- const versionRegex = /^(\s*version\s*=\s*["'])([^"']+)(["'])/m;
125023
- if (!versionRegex.test(content)) {
125146
+ if (!PYPROJECT_VERSION_REGEX.test(content)) {
125024
125147
  logger.debug(
125025
125148
  "pyproject.toml has [project] section but no version field found"
125026
125149
  );
125027
125150
  return false;
125028
125151
  }
125029
- const newContent = content.replace(versionRegex, `$1${newVersion}$3`);
125152
+ const newContent = content.replace(
125153
+ PYPROJECT_VERSION_REGEX,
125154
+ `$1${newVersion}$3`
125155
+ );
125030
125156
  if (newContent === content) {
125031
125157
  logger.debug("Version already set to target value");
125032
125158
  return true;
@@ -127784,7 +127910,7 @@ var require_headStream = __commonJS({
127784
127910
  if ((0, stream_type_check_1.isReadableStream)(stream2)) {
127785
127911
  return (0, headStream_browser_1.headStream)(stream2, bytes);
127786
127912
  }
127787
- return new Promise((resolve10, reject) => {
127913
+ return new Promise((resolve11, reject) => {
127788
127914
  const collector = new Collector();
127789
127915
  collector.limit = bytes;
127790
127916
  stream2.pipe(collector);
@@ -127795,7 +127921,7 @@ var require_headStream = __commonJS({
127795
127921
  collector.on("error", reject);
127796
127922
  collector.on("finish", function() {
127797
127923
  const bytes2 = new Uint8Array(Buffer.concat(this.buffers));
127798
- resolve10(bytes2);
127924
+ resolve11(bytes2);
127799
127925
  });
127800
127926
  });
127801
127927
  };
@@ -127986,21 +128112,21 @@ var require_dist_cjs14 = __commonJS({
127986
128112
  let sendBody = true;
127987
128113
  if (!externalAgent && expect === "100-continue") {
127988
128114
  sendBody = await Promise.race([
127989
- new Promise((resolve10) => {
127990
- timeoutId = Number(timing.setTimeout(() => resolve10(true), Math.max(MIN_WAIT_TIME, maxContinueTimeoutMs)));
128115
+ new Promise((resolve11) => {
128116
+ timeoutId = Number(timing.setTimeout(() => resolve11(true), Math.max(MIN_WAIT_TIME, maxContinueTimeoutMs)));
127991
128117
  }),
127992
- new Promise((resolve10) => {
128118
+ new Promise((resolve11) => {
127993
128119
  httpRequest.on("continue", () => {
127994
128120
  timing.clearTimeout(timeoutId);
127995
- resolve10(true);
128121
+ resolve11(true);
127996
128122
  });
127997
128123
  httpRequest.on("response", () => {
127998
128124
  timing.clearTimeout(timeoutId);
127999
- resolve10(false);
128125
+ resolve11(false);
128000
128126
  });
128001
128127
  httpRequest.on("error", () => {
128002
128128
  timing.clearTimeout(timeoutId);
128003
- resolve10(false);
128129
+ resolve11(false);
128004
128130
  });
128005
128131
  })
128006
128132
  ]);
@@ -128066,13 +128192,13 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
128066
128192
  return socketWarningTimestamp;
128067
128193
  }
128068
128194
  constructor(options) {
128069
- this.configProvider = new Promise((resolve10, reject) => {
128195
+ this.configProvider = new Promise((resolve11, reject) => {
128070
128196
  if (typeof options === "function") {
128071
128197
  options().then((_options) => {
128072
- resolve10(this.resolveDefaultConfig(_options));
128198
+ resolve11(this.resolveDefaultConfig(_options));
128073
128199
  }).catch(reject);
128074
128200
  } else {
128075
- resolve10(this.resolveDefaultConfig(options));
128201
+ resolve11(this.resolveDefaultConfig(options));
128076
128202
  }
128077
128203
  });
128078
128204
  }
@@ -128115,7 +128241,7 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
128115
128241
  const config = this.config;
128116
128242
  let writeRequestBodyPromise = void 0;
128117
128243
  const timeouts = [];
128118
- const resolve10 = async (arg) => {
128244
+ const resolve11 = async (arg) => {
128119
128245
  await writeRequestBodyPromise;
128120
128246
  timeouts.forEach(timing.clearTimeout);
128121
128247
  _resolve(arg);
@@ -128181,7 +128307,7 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
128181
128307
  headers: getTransformedHeaders(res.headers),
128182
128308
  body: res
128183
128309
  });
128184
- resolve10({ response: httpResponse });
128310
+ resolve11({ response: httpResponse });
128185
128311
  });
128186
128312
  req.on("error", (err) => {
128187
128313
  if (NODEJS_TIMEOUT_ERROR_CODES.includes(err.code)) {
@@ -128361,13 +128487,13 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
128361
128487
  return new _NodeHttp2Handler(instanceOrOptions);
128362
128488
  }
128363
128489
  constructor(options) {
128364
- this.configProvider = new Promise((resolve10, reject) => {
128490
+ this.configProvider = new Promise((resolve11, reject) => {
128365
128491
  if (typeof options === "function") {
128366
128492
  options().then((opts) => {
128367
- resolve10(opts || {});
128493
+ resolve11(opts || {});
128368
128494
  }).catch(reject);
128369
128495
  } else {
128370
- resolve10(options || {});
128496
+ resolve11(options || {});
128371
128497
  }
128372
128498
  });
128373
128499
  }
@@ -128387,7 +128513,7 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
128387
128513
  return new Promise((_resolve, _reject) => {
128388
128514
  let fulfilled = false;
128389
128515
  let writeRequestBodyPromise = void 0;
128390
- const resolve10 = async (arg) => {
128516
+ const resolve11 = async (arg) => {
128391
128517
  await writeRequestBodyPromise;
128392
128518
  _resolve(arg);
128393
128519
  };
@@ -128443,7 +128569,7 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
128443
128569
  body: req
128444
128570
  });
128445
128571
  fulfilled = true;
128446
- resolve10({ response: httpResponse });
128572
+ resolve11({ response: httpResponse });
128447
128573
  if (disableConcurrentStreams) {
128448
128574
  session.close();
128449
128575
  this.connectionManager.deleteSession(authority, session);
@@ -128520,7 +128646,7 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
128520
128646
  if (isReadableStreamInstance(stream3)) {
128521
128647
  return collectReadableStream(stream3);
128522
128648
  }
128523
- return new Promise((resolve10, reject) => {
128649
+ return new Promise((resolve11, reject) => {
128524
128650
  const collector = new Collector();
128525
128651
  stream3.pipe(collector);
128526
128652
  stream3.on("error", (err) => {
@@ -128530,7 +128656,7 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
128530
128656
  collector.on("error", reject);
128531
128657
  collector.on("finish", function() {
128532
128658
  const bytes = new Uint8Array(Buffer.concat(this.bufferedBytes));
128533
- resolve10(bytes);
128659
+ resolve11(bytes);
128534
128660
  });
128535
128661
  });
128536
128662
  };
@@ -128575,7 +128701,7 @@ var require_dist_cjs15 = __commonJS({
128575
128701
  return new Request(url3, requestOptions);
128576
128702
  }
128577
128703
  function requestTimeout(timeoutInMs = 0) {
128578
- return new Promise((resolve10, reject) => {
128704
+ return new Promise((resolve11, reject) => {
128579
128705
  if (timeoutInMs) {
128580
128706
  setTimeout(() => {
128581
128707
  const timeoutError = new Error(`Request did not complete within ${timeoutInMs} ms`);
@@ -128693,7 +128819,7 @@ var require_dist_cjs15 = __commonJS({
128693
128819
  requestTimeout(requestTimeoutInMs)
128694
128820
  ];
128695
128821
  if (abortSignal) {
128696
- raceOfPromises.push(new Promise((resolve10, reject) => {
128822
+ raceOfPromises.push(new Promise((resolve11, reject) => {
128697
128823
  const onAbort = () => {
128698
128824
  const abortError = new Error("Request aborted");
128699
128825
  abortError.name = "AbortError";
@@ -128757,7 +128883,7 @@ var require_dist_cjs15 = __commonJS({
128757
128883
  return collected;
128758
128884
  }
128759
128885
  function readToBase64(blob) {
128760
- return new Promise((resolve10, reject) => {
128886
+ return new Promise((resolve11, reject) => {
128761
128887
  const reader = new FileReader();
128762
128888
  reader.onloadend = () => {
128763
128889
  if (reader.readyState !== 2) {
@@ -128766,7 +128892,7 @@ var require_dist_cjs15 = __commonJS({
128766
128892
  const result = reader.result ?? "";
128767
128893
  const commaIndex = result.indexOf(",");
128768
128894
  const dataOffset = commaIndex > -1 ? commaIndex + 1 : result.length;
128769
- resolve10(result.substring(dataOffset));
128895
+ resolve11(result.substring(dataOffset));
128770
128896
  };
128771
128897
  reader.onabort = () => reject(new Error("Read aborted"));
128772
128898
  reader.onerror = () => reject(reader.error);
@@ -130443,11 +130569,11 @@ function __metadata(metadataKey, metadataValue) {
130443
130569
  }
130444
130570
  function __awaiter(thisArg, _arguments, P6, generator) {
130445
130571
  function adopt(value) {
130446
- return value instanceof P6 ? value : new P6(function(resolve10) {
130447
- resolve10(value);
130572
+ return value instanceof P6 ? value : new P6(function(resolve11) {
130573
+ resolve11(value);
130448
130574
  });
130449
130575
  }
130450
- return new (P6 || (P6 = Promise))(function(resolve10, reject) {
130576
+ return new (P6 || (P6 = Promise))(function(resolve11, reject) {
130451
130577
  function fulfilled(value) {
130452
130578
  try {
130453
130579
  step(generator.next(value));
@@ -130463,7 +130589,7 @@ function __awaiter(thisArg, _arguments, P6, generator) {
130463
130589
  }
130464
130590
  }
130465
130591
  function step(result) {
130466
- result.done ? resolve10(result.value) : adopt(result.value).then(fulfilled, rejected);
130592
+ result.done ? resolve11(result.value) : adopt(result.value).then(fulfilled, rejected);
130467
130593
  }
130468
130594
  step((generator = generator.apply(thisArg, _arguments || [])).next());
130469
130595
  });
@@ -130654,14 +130780,14 @@ function __asyncValues(o6) {
130654
130780
  }, i5);
130655
130781
  function verb(n5) {
130656
130782
  i5[n5] = o6[n5] && function(v12) {
130657
- return new Promise(function(resolve10, reject) {
130658
- v12 = o6[n5](v12), settle(resolve10, reject, v12.done, v12.value);
130783
+ return new Promise(function(resolve11, reject) {
130784
+ v12 = o6[n5](v12), settle(resolve11, reject, v12.done, v12.value);
130659
130785
  });
130660
130786
  };
130661
130787
  }
130662
- function settle(resolve10, reject, d9, v12) {
130788
+ function settle(resolve11, reject, d9, v12) {
130663
130789
  Promise.resolve(v12).then(function(v13) {
130664
- resolve10({ value: v13, done: d9 });
130790
+ resolve11({ value: v13, done: d9 });
130665
130791
  }, reject);
130666
130792
  }
130667
130793
  }
@@ -138439,7 +138565,7 @@ var require_fxp = __commonJS({
138439
138565
  class dt3 {
138440
138566
  constructor(t7, e6) {
138441
138567
  var n6;
138442
- this.options = t7, this.currentNode = null, this.tagsNodeStack = [], this.parseXml = Nt4, this.parseTextData = ft3, this.resolveNameSpace = gt3, this.buildAttributesMap = xt3, this.isItStopNode = wt3, this.replaceEntitiesValue = yt2, this.readStopNodeData = At4, this.saveTextToParentTag = Et3, this.addChild = bt3, this.ignoreAttributesFn = "function" == typeof (n6 = this.options.ignoreAttributes) ? n6 : Array.isArray(n6) ? (t8) => {
138568
+ this.options = t7, this.currentNode = null, this.tagsNodeStack = [], this.parseXml = Nt4, this.parseTextData = ft3, this.resolveNameSpace = gt4, this.buildAttributesMap = xt3, this.isItStopNode = wt3, this.replaceEntitiesValue = yt2, this.readStopNodeData = At4, this.saveTextToParentTag = Et3, this.addChild = bt3, this.ignoreAttributesFn = "function" == typeof (n6 = this.options.ignoreAttributes) ? n6 : Array.isArray(n6) ? (t8) => {
138443
138569
  for (const e7 of n6) {
138444
138570
  if ("string" == typeof e7 && t8 === e7) return true;
138445
138571
  if (e7 instanceof RegExp && e7.test(t8)) return true;
@@ -138465,7 +138591,7 @@ var require_fxp = __commonJS({
138465
138591
  return null == h9 ? t7 : typeof h9 != typeof t7 || h9 !== t7 ? h9 : a6.trimValues || t7.trim() === t7 ? Tt3(t7, a6.parseTagValue, a6.numberParseOptions) : t7;
138466
138592
  }
138467
138593
  }
138468
- function gt3(t7) {
138594
+ function gt4(t7) {
138469
138595
  if (this.options.removeNSPrefix) {
138470
138596
  const e6 = t7.split(":"), n6 = "/" === t7.charAt(0) ? "/" : "";
138471
138597
  if ("xmlns" === e6[0]) return "";
@@ -141576,7 +141702,7 @@ var require_dist_cjs37 = __commonJS({
141576
141702
  this.refillTokenBucket();
141577
141703
  if (amount > this.currentCapacity) {
141578
141704
  const delay = (amount - this.currentCapacity) / this.fillRate * 1e3;
141579
- await new Promise((resolve10) => _DefaultRateLimiter.setTimeoutFn(resolve10, delay));
141705
+ await new Promise((resolve11) => _DefaultRateLimiter.setTimeoutFn(resolve11, delay));
141580
141706
  }
141581
141707
  this.currentCapacity = this.currentCapacity - amount;
141582
141708
  }
@@ -141913,7 +142039,7 @@ var require_dist_cjs38 = __commonJS({
141913
142039
  const delayFromResponse = getDelayFromRetryAfterHeader(err.$response);
141914
142040
  const delay = Math.max(delayFromResponse || 0, delayFromDecider);
141915
142041
  totalDelay += delay;
141916
- await new Promise((resolve10) => setTimeout(resolve10, delay));
142042
+ await new Promise((resolve11) => setTimeout(resolve11, delay));
141917
142043
  continue;
141918
142044
  }
141919
142045
  if (!err.$metadata) {
@@ -142071,7 +142197,7 @@ var require_dist_cjs38 = __commonJS({
142071
142197
  attempts = retryToken.getRetryCount();
142072
142198
  const delay = retryToken.getRetryDelay();
142073
142199
  totalRetryDelay += delay;
142074
- await new Promise((resolve10) => setTimeout(resolve10, delay));
142200
+ await new Promise((resolve11) => setTimeout(resolve11, delay));
142075
142201
  }
142076
142202
  }
142077
142203
  } else {
@@ -142371,7 +142497,7 @@ var require_dist_cjs40 = __commonJS({
142371
142497
  var nodeConfigProvider = require_dist_cjs34();
142372
142498
  var urlParser = require_dist_cjs21();
142373
142499
  function httpRequest(options) {
142374
- return new Promise((resolve10, reject) => {
142500
+ return new Promise((resolve11, reject) => {
142375
142501
  const req = http5.request({
142376
142502
  method: "GET",
142377
142503
  ...options,
@@ -142396,7 +142522,7 @@ var require_dist_cjs40 = __commonJS({
142396
142522
  chunks.push(chunk);
142397
142523
  });
142398
142524
  res.on("end", () => {
142399
- resolve10(buffer.Buffer.concat(chunks));
142525
+ resolve11(buffer.Buffer.concat(chunks));
142400
142526
  req.destroy();
142401
142527
  });
142402
142528
  });
@@ -142819,7 +142945,7 @@ var require_retry_wrapper = __commonJS({
142819
142945
  try {
142820
142946
  return await toRetry();
142821
142947
  } catch (e5) {
142822
- await new Promise((resolve10) => setTimeout(resolve10, delayMs));
142948
+ await new Promise((resolve11) => setTimeout(resolve11, delayMs));
142823
142949
  }
142824
142950
  }
142825
142951
  return await toRetry();
@@ -148928,7 +149054,7 @@ var require_dist_cjs60 = __commonJS({
148928
149054
  streamEnded = true;
148929
149055
  });
148930
149056
  while (!generationEnded) {
148931
- const value = await new Promise((resolve10) => setTimeout(() => resolve10(records.shift()), 0));
149057
+ const value = await new Promise((resolve11) => setTimeout(() => resolve11(records.shift()), 0));
148932
149058
  if (value) {
148933
149059
  yield value;
148934
149060
  }
@@ -149560,7 +149686,7 @@ var require_dist_cjs62 = __commonJS({
149560
149686
  };
149561
149687
  };
149562
149688
  var sleep2 = (seconds) => {
149563
- return new Promise((resolve10) => setTimeout(resolve10, seconds * 1e3));
149689
+ return new Promise((resolve11) => setTimeout(resolve11, seconds * 1e3));
149564
149690
  };
149565
149691
  var waiterServiceDefaults = {
149566
149692
  minDelay: 2,
@@ -149666,8 +149792,8 @@ var require_dist_cjs62 = __commonJS({
149666
149792
  };
149667
149793
  var abortTimeout = (abortSignal) => {
149668
149794
  let onAbort;
149669
- const promise = new Promise((resolve10) => {
149670
- onAbort = () => resolve10({ state: exports2.WaiterState.ABORTED });
149795
+ const promise = new Promise((resolve11) => {
149796
+ onAbort = () => resolve11({ state: exports2.WaiterState.ABORTED });
149671
149797
  if (typeof abortSignal.addEventListener === "function") {
149672
149798
  abortSignal.addEventListener("abort", onAbort);
149673
149799
  } else {
@@ -157716,8 +157842,311 @@ Error:
157716
157842
  }
157717
157843
  });
157718
157844
 
157845
+ // src/targets/mcpRegistry.ts
157846
+ function withoutSchema(server) {
157847
+ const copy = { ...server };
157848
+ delete copy.$schema;
157849
+ return copy;
157850
+ }
157851
+ function errorMessage(err) {
157852
+ return err instanceof Error ? err.message : String(err);
157853
+ }
157854
+ var import_fs23, import_path19, import_util23, DEFAULT_REGISTRY_URL, DEFAULT_MANIFEST, GITHUB_TOKEN_ENV_VAR, OFFICIAL_META_KEY, REQUEST_TIMEOUT_MS, LISTING_ATTEMPTS, LISTING_RETRY_DELAY_MS, McpRegistryTarget;
157855
+ var init_mcpRegistry = __esm({
157856
+ "src/targets/mcpRegistry.ts"() {
157857
+ "use strict";
157858
+ init_import_meta_url();
157859
+ import_fs23 = require("fs");
157860
+ import_path19 = require("path");
157861
+ import_util23 = require("util");
157862
+ init_config2();
157863
+ init_async();
157864
+ init_dryRun();
157865
+ init_errors2();
157866
+ init_helpers();
157867
+ init_base5();
157868
+ DEFAULT_REGISTRY_URL = "https://registry.modelcontextprotocol.io";
157869
+ DEFAULT_MANIFEST = "server.json";
157870
+ GITHUB_TOKEN_ENV_VAR = "MCP_GITHUB_TOKEN";
157871
+ OFFICIAL_META_KEY = "io.modelcontextprotocol.registry/official";
157872
+ REQUEST_TIMEOUT_MS = 3e4;
157873
+ LISTING_ATTEMPTS = 6;
157874
+ LISTING_RETRY_DELAY_MS = 5e3;
157875
+ McpRegistryTarget = class extends BaseTarget {
157876
+ /** Target name */
157877
+ name = "mcp-registry";
157878
+ /** Target options */
157879
+ mcpRegistryConfig;
157880
+ constructor(config, artifactProvider, githubRepo) {
157881
+ super(config, artifactProvider, githubRepo);
157882
+ this.mcpRegistryConfig = this.getMcpRegistryConfig();
157883
+ }
157884
+ /**
157885
+ * Extracts, validates and returns the "mcp-registry" target options.
157886
+ */
157887
+ getMcpRegistryConfig() {
157888
+ const config = this.config;
157889
+ const registryUrl = config.registryUrl ?? DEFAULT_REGISTRY_URL;
157890
+ let parsed;
157891
+ try {
157892
+ parsed = new URL(registryUrl);
157893
+ } catch {
157894
+ throw new ConfigurationError(
157895
+ `[mcp-registry] Invalid registryUrl "${registryUrl}"`
157896
+ );
157897
+ }
157898
+ if (parsed.protocol !== "https:" && parsed.protocol !== "http:") {
157899
+ throw new ConfigurationError(
157900
+ `[mcp-registry] registryUrl must be an http(s) URL (got "${registryUrl}")`
157901
+ );
157902
+ }
157903
+ const root = getConfigFileDir() || process.cwd();
157904
+ return {
157905
+ manifestPath: (0, import_path19.resolve)(root, config.manifest ?? DEFAULT_MANIFEST),
157906
+ registryUrl: registryUrl.replace(/\/+$/, "")
157907
+ };
157908
+ }
157909
+ /**
157910
+ * Publishes the manifest at `version`, or verifies the existing listing.
157911
+ *
157912
+ * @param version New version to be released
157913
+ * @param _revision Git commit SHA to be published
157914
+ */
157915
+ async publish(version2, _revision) {
157916
+ const manifest = this.loadManifest(version2);
157917
+ const label = `${manifest.name}@${version2}`;
157918
+ const existing = await this.getListing(manifest.name, version2);
157919
+ if (existing) {
157920
+ this.verifyListing(
157921
+ existing,
157922
+ manifest,
157923
+ `The MCP Registry already lists ${label}, but the listing differs from ${this.mcpRegistryConfig.manifestPath}. Registry versions are immutable, so release a new version instead.`
157924
+ );
157925
+ this.logger.info(`${label} is already listed in the MCP Registry`);
157926
+ return;
157927
+ }
157928
+ if (isDryRun()) {
157929
+ logDryRun(`publish ${label} to ${this.mcpRegistryConfig.registryUrl}`);
157930
+ return;
157931
+ }
157932
+ const token = await this.getRegistryToken();
157933
+ this.logger.info(`Publishing ${label} to the MCP Registry...`);
157934
+ await this.publishManifest(manifest, token);
157935
+ const listing = await this.waitForListing(manifest.name, version2);
157936
+ this.verifyListing(
157937
+ listing,
157938
+ manifest,
157939
+ `The MCP Registry listing for ${label} does not match the published manifest.`
157940
+ );
157941
+ this.logger.info(`Published ${label} to the MCP Registry`);
157942
+ }
157943
+ /**
157944
+ * Reads the manifest and sets `version` and every `packages[].version` to
157945
+ * the release version. The file on disk is not changed.
157946
+ */
157947
+ loadManifest(version2) {
157948
+ const { manifestPath } = this.mcpRegistryConfig;
157949
+ let manifest;
157950
+ try {
157951
+ manifest = JSON.parse((0, import_fs23.readFileSync)(manifestPath, "utf-8"));
157952
+ } catch (err) {
157953
+ throw new ConfigurationError(
157954
+ `[mcp-registry] Cannot read manifest ${manifestPath}: ${errorMessage(err)}`
157955
+ );
157956
+ }
157957
+ if (typeof manifest?.name !== "string" || !manifest.name) {
157958
+ throw new ConfigurationError(
157959
+ `[mcp-registry] Manifest ${manifestPath} has no "name"`
157960
+ );
157961
+ }
157962
+ manifest.version = version2;
157963
+ for (const pkg of manifest.packages ?? []) {
157964
+ pkg.version = version2;
157965
+ }
157966
+ return manifest;
157967
+ }
157968
+ listingUrl(name, version2) {
157969
+ return `${this.mcpRegistryConfig.registryUrl}/v0.1/servers/${encodeURIComponent(name)}/versions/${encodeURIComponent(version2)}`;
157970
+ }
157971
+ /**
157972
+ * Returns the registry listing for `name@version`, or undefined when that
157973
+ * version is not listed.
157974
+ */
157975
+ async getListing(name, version2) {
157976
+ const response = await fetch(this.listingUrl(name, version2), {
157977
+ headers: { Accept: "application/json" },
157978
+ signal: AbortSignal.timeout(REQUEST_TIMEOUT_MS)
157979
+ });
157980
+ if (response.status === 404) {
157981
+ return void 0;
157982
+ }
157983
+ if (!response.ok) {
157984
+ throw new Error(
157985
+ `MCP Registry lookup for ${name}@${version2} failed: HTTP ${response.status}`
157986
+ );
157987
+ }
157988
+ return await response.json();
157989
+ }
157990
+ async waitForListing(name, version2) {
157991
+ const listing = await this.pollJson(
157992
+ this.listingUrl(name, version2),
157993
+ `MCP Registry listing for ${name}@${version2}`,
157994
+ LISTING_ATTEMPTS,
157995
+ LISTING_RETRY_DELAY_MS
157996
+ );
157997
+ if (!listing) {
157998
+ throw new Error(
157999
+ `Published ${name}@${version2}, but the MCP Registry does not list it`
158000
+ );
158001
+ }
158002
+ return listing;
158003
+ }
158004
+ /**
158005
+ * Checks that the listing equals the manifest (ignoring `$schema`) and is
158006
+ * active. Throws `mismatchMessage` when the content differs.
158007
+ */
158008
+ verifyListing(listing, manifest, mismatchMessage) {
158009
+ if (!(0, import_util23.isDeepStrictEqual)(
158010
+ withoutSchema(listing.server ?? {}),
158011
+ withoutSchema(manifest)
158012
+ )) {
158013
+ throw new Error(mismatchMessage);
158014
+ }
158015
+ const status = listing._meta?.[OFFICIAL_META_KEY]?.status;
158016
+ if (status !== "active") {
158017
+ throw new Error(
158018
+ `MCP Registry listing for ${manifest.name}@${manifest.version} has status "${status ?? "unknown"}", expected "active"`
158019
+ );
158020
+ }
158021
+ }
158022
+ /**
158023
+ * GETs `url` until it returns JSON. Retries 404, 5xx and network errors up
158024
+ * to `attempts` times and returns undefined if they never resolve. Other
158025
+ * HTTP errors throw immediately.
158026
+ */
158027
+ async pollJson(url3, label, attempts, delayMs) {
158028
+ for (let attempt = 1; ; attempt++) {
158029
+ let reason;
158030
+ let response;
158031
+ try {
158032
+ response = await fetch(url3, {
158033
+ headers: { Accept: "application/json" },
158034
+ signal: AbortSignal.timeout(REQUEST_TIMEOUT_MS)
158035
+ });
158036
+ reason = `HTTP ${response.status}`;
158037
+ } catch (err) {
158038
+ reason = errorMessage(err);
158039
+ }
158040
+ if (response?.ok) {
158041
+ return response.json();
158042
+ }
158043
+ if (response && response.status !== 404 && response.status < 500) {
158044
+ throw new Error(`Fetching ${label} failed: ${reason}`);
158045
+ }
158046
+ if (attempt >= attempts) {
158047
+ return void 0;
158048
+ }
158049
+ this.logger.info(
158050
+ `${label} is not available yet (${reason}), retrying in ${delayMs / 1e3}s (${attempt}/${attempts})`
158051
+ );
158052
+ await sleep(delayMs);
158053
+ }
158054
+ }
158055
+ /**
158056
+ * Gets a registry token. Uses GitHub Actions OIDC when the job has
158057
+ * `id-token: write`, otherwise exchanges `MCP_GITHUB_TOKEN`.
158058
+ */
158059
+ async getRegistryToken() {
158060
+ const requestUrl = process.env.ACTIONS_ID_TOKEN_REQUEST_URL;
158061
+ const requestToken = process.env.ACTIONS_ID_TOKEN_REQUEST_TOKEN;
158062
+ if (requestUrl && requestToken) {
158063
+ this.logger.debug("Authenticating with GitHub Actions OIDC");
158064
+ const oidcToken = await this.getGitHubOidcToken(requestUrl, requestToken);
158065
+ return this.exchangeToken("github-oidc", { oidc_token: oidcToken });
158066
+ }
158067
+ const githubToken = process.env[GITHUB_TOKEN_ENV_VAR];
158068
+ if (githubToken) {
158069
+ this.logger.debug(`Authenticating with ${GITHUB_TOKEN_ENV_VAR}`);
158070
+ return this.exchangeToken("github-at", { github_token: githubToken });
158071
+ }
158072
+ throw new ConfigurationError(
158073
+ `[mcp-registry] No credentials: run in GitHub Actions with "id-token: write" permission, or set ${GITHUB_TOKEN_ENV_VAR}`
158074
+ );
158075
+ }
158076
+ /**
158077
+ * Requests a GitHub Actions OIDC token. Its audience is the registry origin,
158078
+ * which the registry checks (same as `mcp-publisher login github-oidc`).
158079
+ */
158080
+ async getGitHubOidcToken(requestUrl, requestToken) {
158081
+ const url3 = new URL(requestUrl);
158082
+ url3.searchParams.set(
158083
+ "audience",
158084
+ new URL(this.mcpRegistryConfig.registryUrl).origin
158085
+ );
158086
+ const response = await fetch(url3, {
158087
+ headers: {
158088
+ Accept: "application/json",
158089
+ Authorization: `Bearer ${requestToken}`
158090
+ },
158091
+ signal: AbortSignal.timeout(REQUEST_TIMEOUT_MS)
158092
+ });
158093
+ if (!response.ok) {
158094
+ throw new Error(
158095
+ `GitHub OIDC token request failed: HTTP ${response.status}`
158096
+ );
158097
+ }
158098
+ const { value } = await response.json();
158099
+ if (!value) {
158100
+ throw new Error("GitHub OIDC token response has no token");
158101
+ }
158102
+ return value;
158103
+ }
158104
+ /** Exchanges a GitHub credential for a short-lived registry token */
158105
+ async exchangeToken(method, body) {
158106
+ const response = await this.postJson(
158107
+ `/v0/auth/${method}`,
158108
+ body,
158109
+ `${method} token exchange`
158110
+ );
158111
+ const { registry_token: token } = await response.json();
158112
+ if (!token) {
158113
+ throw new Error(
158114
+ `MCP Registry ${method} token exchange returned no token`
158115
+ );
158116
+ }
158117
+ return token;
158118
+ }
158119
+ async publishManifest(manifest, token) {
158120
+ await this.postJson("/v0/publish", manifest, "publish", token);
158121
+ }
158122
+ /** POSTs JSON to the registry and throws on a non-2xx response */
158123
+ async postJson(path20, body, action, token) {
158124
+ const response = await fetch(
158125
+ `${this.mcpRegistryConfig.registryUrl}${path20}`,
158126
+ {
158127
+ method: "POST",
158128
+ headers: {
158129
+ Accept: "application/json",
158130
+ "Content-Type": "application/json",
158131
+ ...token ? { Authorization: `Bearer ${token}` } : {}
158132
+ },
158133
+ body: JSON.stringify(body),
158134
+ signal: AbortSignal.timeout(REQUEST_TIMEOUT_MS)
158135
+ }
158136
+ );
158137
+ if (!response.ok) {
158138
+ throw new Error(
158139
+ `MCP Registry ${action} failed: HTTP ${response.status}: ` + await response.text()
158140
+ );
158141
+ }
158142
+ return response;
158143
+ }
158144
+ };
158145
+ }
158146
+ });
158147
+
157719
158148
  // src/targets/symbolCollector.ts
157720
- var import_fs23, import_path19, DEFAULT_SYM_COLLECTOR_SERVER_ENDPOINT, SYM_COLLECTOR_BIN_NAME, SymbolCollector;
158149
+ var import_fs24, import_path20, DEFAULT_SYM_COLLECTOR_SERVER_ENDPOINT, SYM_COLLECTOR_BIN_NAME, SymbolCollector;
157721
158150
  var init_symbolCollector = __esm({
157722
158151
  "src/targets/symbolCollector.ts"() {
157723
158152
  "use strict";
@@ -157725,9 +158154,9 @@ var init_symbolCollector = __esm({
157725
158154
  init_errors2();
157726
158155
  init_base5();
157727
158156
  init_files();
157728
- import_fs23 = require("fs");
158157
+ import_fs24 = require("fs");
157729
158158
  init_system();
157730
- import_path19 = require("path");
158159
+ import_path20 = require("path");
157731
158160
  DEFAULT_SYM_COLLECTOR_SERVER_ENDPOINT = "https://symbol-collector.services.sentry.io/";
157732
158161
  SYM_COLLECTOR_BIN_NAME = "SymbolCollector.Console";
157733
158162
  SymbolCollector = class extends BaseTarget {
@@ -157773,8 +158202,8 @@ var init_symbolCollector = __esm({
157773
158202
  this.logger.debug("Downloading artifacts...");
157774
158203
  await Promise.all(
157775
158204
  artifacts.map(async (artifact, index) => {
157776
- const subdirPath = (0, import_path19.join)(dir, String(index));
157777
- await import_fs23.promises.mkdir(subdirPath);
158205
+ const subdirPath = (0, import_path20.join)(dir, String(index));
158206
+ await import_fs24.promises.mkdir(subdirPath);
157778
158207
  await this.artifactProvider.downloadArtifact(artifact, subdirPath);
157779
158208
  })
157780
158209
  );
@@ -157804,14 +158233,14 @@ var init_symbolCollector = __esm({
157804
158233
  });
157805
158234
 
157806
158235
  // src/targets/pubDev.ts
157807
- var import_fs24, import_os2, import_path20, targetSecrets3, PubDevTarget;
158236
+ var import_fs25, import_os2, import_path21, targetSecrets3, PubDevTarget;
157808
158237
  var init_pubDev = __esm({
157809
158238
  "src/targets/pubDev.ts"() {
157810
158239
  "use strict";
157811
158240
  init_import_meta_url();
157812
- import_fs24 = require("fs");
158241
+ import_fs25 = require("fs");
157813
158242
  import_os2 = require("os");
157814
- import_path20 = require("path");
158243
+ import_path21 = require("path");
157815
158244
  init_js_yaml();
157816
158245
  init_git();
157817
158246
  init_base5();
@@ -157833,6 +158262,22 @@ var init_pubDev = __esm({
157833
158262
  pubDevConfig;
157834
158263
  /** GitHub repo configuration */
157835
158264
  githubRepo;
158265
+ /**
158266
+ * Read the version from pubspec.yaml.
158267
+ *
158268
+ * @param rootDir - Project root directory
158269
+ * @returns The version, or undefined if there is no readable pubspec.yaml
158270
+ * or it has no version
158271
+ */
158272
+ static async readVersion(rootDir) {
158273
+ const pubspecPath = (0, import_path21.join)(rootDir, "pubspec.yaml");
158274
+ if (!(0, import_fs25.existsSync)(pubspecPath)) {
158275
+ return void 0;
158276
+ }
158277
+ const pubspec = load((0, import_fs25.readFileSync)(pubspecPath, "utf-8"));
158278
+ const version2 = pubspec?.version;
158279
+ return typeof version2 === "string" ? version2 : void 0;
158280
+ }
157836
158281
  /**
157837
158282
  * Bump version in pubspec.yaml for Dart/Flutter projects.
157838
158283
  *
@@ -157842,11 +158287,11 @@ var init_pubDev = __esm({
157842
158287
  * @throws Error if file cannot be updated
157843
158288
  */
157844
158289
  static async bumpVersion(rootDir, newVersion) {
157845
- const pubspecPath = (0, import_path20.join)(rootDir, "pubspec.yaml");
157846
- if (!(0, import_fs24.existsSync)(pubspecPath)) {
158290
+ const pubspecPath = (0, import_path21.join)(rootDir, "pubspec.yaml");
158291
+ if (!(0, import_fs25.existsSync)(pubspecPath)) {
157847
158292
  return false;
157848
158293
  }
157849
- const content = (0, import_fs24.readFileSync)(pubspecPath, "utf-8");
158294
+ const content = (0, import_fs25.readFileSync)(pubspecPath, "utf-8");
157850
158295
  const pubspec = load(content);
157851
158296
  if (!pubspec || typeof pubspec !== "object") {
157852
158297
  logger.debug("pubspec.yaml is not a valid YAML object");
@@ -157854,7 +158299,7 @@ var init_pubDev = __esm({
157854
158299
  }
157855
158300
  pubspec.version = newVersion;
157856
158301
  logger.debug(`Updating version in ${pubspecPath} to ${newVersion}`);
157857
- (0, import_fs24.writeFileSync)(pubspecPath, dump2(pubspec));
158302
+ (0, import_fs25.writeFileSync)(pubspecPath, dump2(pubspec));
157858
158303
  return true;
157859
158304
  }
157860
158305
  constructor(config, artifactProvider, githubRepo) {
@@ -157941,11 +158386,11 @@ var init_pubDev = __esm({
157941
158386
  // Expiration date is required, but irrelevant
157942
158387
  };
157943
158388
  try {
157944
- await import_fs24.promises.access(credentialsFilePath, import_fs24.constants.F_OK);
158389
+ await import_fs25.promises.access(credentialsFilePath, import_fs25.constants.F_OK);
157945
158390
  this.logger.warn("Credentials file already exists. Skipping creation.");
157946
158391
  } catch {
157947
- await import_fs24.promises.mkdir((0, import_path20.dirname)(credentialsFilePath), { recursive: true });
157948
- await import_fs24.promises.writeFile(credentialsFilePath, JSON.stringify(content));
158392
+ await import_fs25.promises.mkdir((0, import_path21.dirname)(credentialsFilePath), { recursive: true });
158393
+ await import_fs25.promises.writeFile(credentialsFilePath, JSON.stringify(content));
157949
158394
  this.logger.info("Credentials file created.");
157950
158395
  }
157951
158396
  }
@@ -158004,7 +158449,7 @@ var init_pubDev = __esm({
158004
158449
  this.pubDevConfig.dartCliPath,
158005
158450
  args,
158006
158451
  {
158007
- cwd: (0, import_path20.join)(directory, pkg)
158452
+ cwd: (0, import_path21.join)(directory, pkg)
158008
158453
  },
158009
158454
  // Dart stops the process and asks user to go to provided url for authorization.
158010
158455
  // We want the stdout to be visible just in case something goes wrong, otherwise
@@ -158016,24 +158461,24 @@ var init_pubDev = __esm({
158016
158461
  );
158017
158462
  }
158018
158463
  async removeDependencyOverrides(directory, pkg) {
158019
- const pubSpecPath = (0, import_path20.join)(directory, pkg, "pubspec.yaml");
158020
- const pubSpecContent = await import_fs24.promises.readFile(pubSpecPath, "utf8");
158464
+ const pubSpecPath = (0, import_path21.join)(directory, pkg, "pubspec.yaml");
158465
+ const pubSpecContent = await import_fs25.promises.readFile(pubSpecPath, "utf8");
158021
158466
  const pubSpecYaml = load(pubSpecContent);
158022
158467
  delete pubSpecYaml.dependency_overrides;
158023
- await import_fs24.promises.writeFile(pubSpecPath, dump2(pubSpecYaml));
158468
+ await import_fs25.promises.writeFile(pubSpecPath, dump2(pubSpecYaml));
158024
158469
  }
158025
158470
  };
158026
158471
  }
158027
158472
  });
158028
158473
 
158029
158474
  // src/targets/hex.ts
158030
- var import_fs25, import_path21, DEFAULT_MIX_BIN, MIX_BIN, HexTarget;
158475
+ var import_fs26, import_path22, DEFAULT_MIX_BIN, MIX_BIN, MIX_VERSION_PATTERNS, HexTarget;
158031
158476
  var init_hex = __esm({
158032
158477
  "src/targets/hex.ts"() {
158033
158478
  "use strict";
158034
158479
  init_import_meta_url();
158035
- import_fs25 = require("fs");
158036
- import_path21 = require("path");
158480
+ import_fs26 = require("fs");
158481
+ import_path22 = require("path");
158037
158482
  init_git();
158038
158483
  init_base5();
158039
158484
  init_files();
@@ -158042,11 +158487,36 @@ var init_hex = __esm({
158042
158487
  init_logger2();
158043
158488
  DEFAULT_MIX_BIN = "mix";
158044
158489
  MIX_BIN = process.env.MIX_BIN || DEFAULT_MIX_BIN;
158490
+ MIX_VERSION_PATTERNS = [
158491
+ /^(\s*version:\s*["'])([^"']+)(["'])/m,
158492
+ /^(\s*@version\s+["'])([^"']+)(["'])/m
158493
+ ];
158045
158494
  HexTarget = class extends BaseTarget {
158046
158495
  /** Target name */
158047
158496
  name = "hex";
158048
158497
  /** GitHub repo configuration */
158049
158498
  githubRepo;
158499
+ /**
158500
+ * Read the version from mix.exs.
158501
+ *
158502
+ * @param rootDir - Project root directory
158503
+ * @returns The version, or undefined if there is no mix.exs or it has no
158504
+ * literal `version:` or `@version`
158505
+ */
158506
+ static async readVersion(rootDir) {
158507
+ const mixExsPath = (0, import_path22.join)(rootDir, "mix.exs");
158508
+ if (!(0, import_fs26.existsSync)(mixExsPath)) {
158509
+ return void 0;
158510
+ }
158511
+ const content = (0, import_fs26.readFileSync)(mixExsPath, "utf-8");
158512
+ for (const pattern of MIX_VERSION_PATTERNS) {
158513
+ const version2 = pattern.exec(content)?.[2];
158514
+ if (version2) {
158515
+ return version2;
158516
+ }
158517
+ }
158518
+ return void 0;
158519
+ }
158050
158520
  /**
158051
158521
  * Bump version in mix.exs for Elixir projects.
158052
158522
  *
@@ -158056,18 +158526,14 @@ var init_hex = __esm({
158056
158526
  * @throws Error if file cannot be updated
158057
158527
  */
158058
158528
  static async bumpVersion(rootDir, newVersion) {
158059
- const mixExsPath = (0, import_path21.join)(rootDir, "mix.exs");
158060
- if (!(0, import_fs25.existsSync)(mixExsPath)) {
158529
+ const mixExsPath = (0, import_path22.join)(rootDir, "mix.exs");
158530
+ if (!(0, import_fs26.existsSync)(mixExsPath)) {
158061
158531
  return false;
158062
158532
  }
158063
- const content = (0, import_fs25.readFileSync)(mixExsPath, "utf-8");
158064
- const versionPatterns = [
158065
- /^(\s*version:\s*["'])([^"']+)(["'])/m,
158066
- /^(\s*@version\s+["'])([^"']+)(["'])/m
158067
- ];
158533
+ const content = (0, import_fs26.readFileSync)(mixExsPath, "utf-8");
158068
158534
  let newContent = content;
158069
158535
  let updated = false;
158070
- for (const pattern of versionPatterns) {
158536
+ for (const pattern of MIX_VERSION_PATTERNS) {
158071
158537
  if (pattern.test(newContent)) {
158072
158538
  newContent = newContent.replace(pattern, `$1${newVersion}$3`);
158073
158539
  updated = true;
@@ -158082,7 +158548,7 @@ var init_hex = __esm({
158082
158548
  return true;
158083
158549
  }
158084
158550
  logger.debug(`Updating version in ${mixExsPath} to ${newVersion}`);
158085
- (0, import_fs25.writeFileSync)(mixExsPath, newContent);
158551
+ (0, import_fs26.writeFileSync)(mixExsPath, newContent);
158086
158552
  return true;
158087
158553
  }
158088
158554
  constructor(config, artifactProvider, githubRepo) {
@@ -158314,12 +158780,12 @@ var init_commitOnGitRepository = __esm({
158314
158780
  });
158315
158781
 
158316
158782
  // src/targets/powershell.ts
158317
- var import_path22, POWERSHELL_BIN, DEFAULT_POWERSHELL_REPOSITORY, PowerShellTarget;
158783
+ var import_path23, POWERSHELL_BIN, DEFAULT_POWERSHELL_REPOSITORY, PowerShellTarget;
158318
158784
  var init_powershell = __esm({
158319
158785
  "src/targets/powershell.ts"() {
158320
158786
  "use strict";
158321
158787
  init_import_meta_url();
158322
- import_path22 = require("path");
158788
+ import_path23 = require("path");
158323
158789
  init_errors2();
158324
158790
  init_files();
158325
158791
  init_helpers();
@@ -158423,7 +158889,7 @@ var init_powershell = __esm({
158423
158889
  const zipPath = await this.artifactProvider.downloadArtifact(artifact);
158424
158890
  this.logger.info(`Extracting artifact "${artifact.filename}"`);
158425
158891
  await withTempDir(async (dir) => {
158426
- const moduleDir = (0, import_path22.join)(dir, this.psConfig.module);
158892
+ const moduleDir = (0, import_path23.join)(dir, this.psConfig.module);
158427
158893
  await extractZipArchive(zipPath, moduleDir);
158428
158894
  await this.publishModule(moduleDir);
158429
158895
  });
@@ -158453,10 +158919,10 @@ var require_universalify = __commonJS({
158453
158919
  return Object.defineProperty(function() {
158454
158920
  if (typeof arguments[arguments.length - 1] === "function") fn2.apply(this, arguments);
158455
158921
  else {
158456
- return new Promise((resolve10, reject) => {
158922
+ return new Promise((resolve11, reject) => {
158457
158923
  arguments[arguments.length] = (err, res) => {
158458
158924
  if (err) return reject(err);
158459
- resolve10(res);
158925
+ resolve11(res);
158460
158926
  };
158461
158927
  arguments.length++;
158462
158928
  fn2.apply(this, arguments);
@@ -159311,18 +159777,18 @@ var require_fs = __commonJS({
159311
159777
  if (typeof callback === "function") {
159312
159778
  return fs16.exists(filename, callback);
159313
159779
  }
159314
- return new Promise((resolve10) => {
159315
- return fs16.exists(filename, resolve10);
159780
+ return new Promise((resolve11) => {
159781
+ return fs16.exists(filename, resolve11);
159316
159782
  });
159317
159783
  };
159318
159784
  exports2.read = function(fd, buffer, offset, length, position, callback) {
159319
159785
  if (typeof callback === "function") {
159320
159786
  return fs16.read(fd, buffer, offset, length, position, callback);
159321
159787
  }
159322
- return new Promise((resolve10, reject) => {
159788
+ return new Promise((resolve11, reject) => {
159323
159789
  fs16.read(fd, buffer, offset, length, position, (err, bytesRead, buffer2) => {
159324
159790
  if (err) return reject(err);
159325
- resolve10({ bytesRead, buffer: buffer2 });
159791
+ resolve11({ bytesRead, buffer: buffer2 });
159326
159792
  });
159327
159793
  });
159328
159794
  };
@@ -159330,10 +159796,10 @@ var require_fs = __commonJS({
159330
159796
  if (typeof args[args.length - 1] === "function") {
159331
159797
  return fs16.write(fd, buffer, ...args);
159332
159798
  }
159333
- return new Promise((resolve10, reject) => {
159799
+ return new Promise((resolve11, reject) => {
159334
159800
  fs16.write(fd, buffer, ...args, (err, bytesWritten, buffer2) => {
159335
159801
  if (err) return reject(err);
159336
- resolve10({ bytesWritten, buffer: buffer2 });
159802
+ resolve11({ bytesWritten, buffer: buffer2 });
159337
159803
  });
159338
159804
  });
159339
159805
  };
@@ -160767,7 +161233,7 @@ var require_jsonfile = __commonJS({
160767
161233
  callback(null, obj);
160768
161234
  });
160769
161235
  }
160770
- function readFileSync21(file, options) {
161236
+ function readFileSync23(file, options) {
160771
161237
  options = options || {};
160772
161238
  if (typeof options === "string") {
160773
161239
  options = { encoding: options };
@@ -160833,7 +161299,7 @@ var require_jsonfile = __commonJS({
160833
161299
  }
160834
161300
  var jsonfile = {
160835
161301
  readFile: readFile7,
160836
- readFileSync: readFileSync21,
161302
+ readFileSync: readFileSync23,
160837
161303
  writeFile: writeFile5,
160838
161304
  writeFileSync: writeFileSync9
160839
161305
  };
@@ -161260,12 +161726,12 @@ var require_lib12 = __commonJS({
161260
161726
  if (token !== void 0) {
161261
161727
  return token;
161262
161728
  }
161263
- return new Promise((resolve10, reject) => {
161729
+ return new Promise((resolve11, reject) => {
161264
161730
  if (this.pauseFn && !this.paused) {
161265
161731
  this.paused = true;
161266
161732
  this.pauseFn();
161267
161733
  }
161268
- this.waiting.push({ resolve: resolve10, reject });
161734
+ this.waiting.push({ resolve: resolve11, reject });
161269
161735
  });
161270
161736
  }
161271
161737
  release(token) {
@@ -167697,8 +168163,8 @@ var require_universalify2 = __commonJS({
167697
168163
  return Object.defineProperty(function(...args) {
167698
168164
  if (typeof args[args.length - 1] === "function") fn2.apply(this, args);
167699
168165
  else {
167700
- return new Promise((resolve10, reject) => {
167701
- args.push((err, res) => err != null ? reject(err) : resolve10(res));
168166
+ return new Promise((resolve11, reject) => {
168167
+ args.push((err, res) => err != null ? reject(err) : resolve11(res));
167702
168168
  fn2.apply(this, args);
167703
168169
  });
167704
168170
  }
@@ -167770,18 +168236,18 @@ var require_fs2 = __commonJS({
167770
168236
  if (typeof callback === "function") {
167771
168237
  return fs16.exists(filename, callback);
167772
168238
  }
167773
- return new Promise((resolve10) => {
167774
- return fs16.exists(filename, resolve10);
168239
+ return new Promise((resolve11) => {
168240
+ return fs16.exists(filename, resolve11);
167775
168241
  });
167776
168242
  };
167777
168243
  exports2.read = function(fd, buffer, offset, length, position, callback) {
167778
168244
  if (typeof callback === "function") {
167779
168245
  return fs16.read(fd, buffer, offset, length, position, callback);
167780
168246
  }
167781
- return new Promise((resolve10, reject) => {
168247
+ return new Promise((resolve11, reject) => {
167782
168248
  fs16.read(fd, buffer, offset, length, position, (err, bytesRead, buffer2) => {
167783
168249
  if (err) return reject(err);
167784
- resolve10({ bytesRead, buffer: buffer2 });
168250
+ resolve11({ bytesRead, buffer: buffer2 });
167785
168251
  });
167786
168252
  });
167787
168253
  };
@@ -167789,10 +168255,10 @@ var require_fs2 = __commonJS({
167789
168255
  if (typeof args[args.length - 1] === "function") {
167790
168256
  return fs16.write(fd, buffer, ...args);
167791
168257
  }
167792
- return new Promise((resolve10, reject) => {
168258
+ return new Promise((resolve11, reject) => {
167793
168259
  fs16.write(fd, buffer, ...args, (err, bytesWritten, buffer2) => {
167794
168260
  if (err) return reject(err);
167795
- resolve10({ bytesWritten, buffer: buffer2 });
168261
+ resolve11({ bytesWritten, buffer: buffer2 });
167796
168262
  });
167797
168263
  });
167798
168264
  };
@@ -167800,10 +168266,10 @@ var require_fs2 = __commonJS({
167800
168266
  if (typeof args[args.length - 1] === "function") {
167801
168267
  return fs16.readv(fd, buffers, ...args);
167802
168268
  }
167803
- return new Promise((resolve10, reject) => {
168269
+ return new Promise((resolve11, reject) => {
167804
168270
  fs16.readv(fd, buffers, ...args, (err, bytesRead, buffers2) => {
167805
168271
  if (err) return reject(err);
167806
- resolve10({ bytesRead, buffers: buffers2 });
168272
+ resolve11({ bytesRead, buffers: buffers2 });
167807
168273
  });
167808
168274
  });
167809
168275
  };
@@ -167811,10 +168277,10 @@ var require_fs2 = __commonJS({
167811
168277
  if (typeof args[args.length - 1] === "function") {
167812
168278
  return fs16.writev(fd, buffers, ...args);
167813
168279
  }
167814
- return new Promise((resolve10, reject) => {
168280
+ return new Promise((resolve11, reject) => {
167815
168281
  fs16.writev(fd, buffers, ...args, (err, bytesWritten, buffers2) => {
167816
168282
  if (err) return reject(err);
167817
- resolve10({ bytesWritten, buffers: buffers2 });
168283
+ resolve11({ bytesWritten, buffers: buffers2 });
167818
168284
  });
167819
168285
  });
167820
168286
  };
@@ -168876,7 +169342,7 @@ var require_jsonfile3 = __commonJS({
168876
169342
  return obj;
168877
169343
  }
168878
169344
  var readFile7 = universalify.fromPromise(_readFile);
168879
- function readFileSync21(file, options = {}) {
169345
+ function readFileSync23(file, options = {}) {
168880
169346
  if (typeof options === "string") {
168881
169347
  options = { encoding: options };
168882
169348
  }
@@ -168908,7 +169374,7 @@ var require_jsonfile3 = __commonJS({
168908
169374
  }
168909
169375
  module2.exports = {
168910
169376
  readFile: readFile7,
168911
- readFileSync: readFileSync21,
169377
+ readFileSync: readFileSync23,
168912
169378
  writeFile: writeFile5,
168913
169379
  writeFileSync: writeFileSync9
168914
169380
  };
@@ -169248,14 +169714,14 @@ var require_version = __commonJS({
169248
169714
  ].join("");
169249
169715
  module2.exports = {
169250
169716
  VERSION_PATTERN,
169251
- valid,
169717
+ valid: valid2,
169252
169718
  clean,
169253
169719
  explain,
169254
169720
  parse: parse15,
169255
169721
  stringify: stringify4
169256
169722
  };
169257
169723
  var validRegex = new RegExp("^" + VERSION_PATTERN + "$", "i");
169258
- function valid(version2) {
169724
+ function valid2(version2) {
169259
169725
  return validRegex.test(version2) ? version2 : null;
169260
169726
  }
169261
169727
  var cleanRegex = new RegExp("^\\s*" + VERSION_PATTERN + "\\s*$", "i");
@@ -169381,13 +169847,13 @@ var require_operator = __commonJS({
169381
169847
  eq,
169382
169848
  ne: ne6,
169383
169849
  ge: ge4,
169384
- gt: gt3,
169850
+ gt: gt4,
169385
169851
  "<": lt4,
169386
169852
  "<=": le4,
169387
169853
  "==": eq,
169388
169854
  "!=": ne6,
169389
169855
  ">=": ge4,
169390
- ">": gt3,
169856
+ ">": gt4,
169391
169857
  "===": arbitrary
169392
169858
  };
169393
169859
  function lt4(version2, other) {
@@ -169405,7 +169871,7 @@ var require_operator = __commonJS({
169405
169871
  function ge4(version2, other) {
169406
169872
  return compare(version2, other) >= 0;
169407
169873
  }
169408
- function gt3(version2, other) {
169874
+ function gt4(version2, other) {
169409
169875
  return compare(version2, other) > 0;
169410
169876
  }
169411
169877
  function arbitrary(version2, other) {
@@ -169788,8 +170254,8 @@ var require_semantic = __commonJS({
169788
170254
  var require_pep440 = __commonJS({
169789
170255
  "node_modules/.pnpm/@renovatebot+pep440@4.2.1/node_modules/@renovatebot/pep440/index.js"(exports2, module2) {
169790
170256
  init_import_meta_url();
169791
- var { valid, clean, explain, parse: parse15 } = require_version();
169792
- var { lt: lt4, le: le4, eq, ne: ne6, ge: ge4, gt: gt3, compare, rcompare } = require_operator();
170257
+ var { valid: valid2, clean, explain, parse: parse15 } = require_version();
170258
+ var { lt: lt4, le: le4, eq, ne: ne6, ge: ge4, gt: gt4, compare, rcompare } = require_operator();
169793
170259
  var {
169794
170260
  filter: filter2,
169795
170261
  maxSatisfying,
@@ -169801,7 +170267,7 @@ var require_pep440 = __commonJS({
169801
170267
  var { major: major2, minor, patch, inc: inc3 } = require_semantic();
169802
170268
  module2.exports = {
169803
170269
  // version
169804
- valid,
170270
+ valid: valid2,
169805
170271
  clean,
169806
170272
  explain,
169807
170273
  parse: parse15,
@@ -169814,7 +170280,7 @@ var require_pep440 = __commonJS({
169814
170280
  neq: ne6,
169815
170281
  ge: ge4,
169816
170282
  gte: ge4,
169817
- gt: gt3,
170283
+ gt: gt4,
169818
170284
  compare,
169819
170285
  rcompare,
169820
170286
  // range
@@ -170251,15 +170717,15 @@ var require_parseUtil = __commonJS({
170251
170717
  ...issueData,
170252
170718
  path: fullPath
170253
170719
  };
170254
- let errorMessage = "";
170720
+ let errorMessage2 = "";
170255
170721
  const maps = errorMaps.filter((m10) => !!m10).slice().reverse();
170256
170722
  for (const map3 of maps) {
170257
- errorMessage = map3(fullIssue, { data: data2, defaultError: errorMessage }).message;
170723
+ errorMessage2 = map3(fullIssue, { data: data2, defaultError: errorMessage2 }).message;
170258
170724
  }
170259
170725
  return {
170260
170726
  ...issueData,
170261
170727
  path: fullPath,
170262
- message: issueData.message || errorMessage
170728
+ message: issueData.message || errorMessage2
170263
170729
  };
170264
170730
  };
170265
170731
  exports2.makeIssue = makeIssue;
@@ -173929,8 +174395,8 @@ var require_dist11 = __commonJS({
173929
174395
  const mod = await importWasmModule();
173930
174396
  return mod.getStringConstant(source, name) ?? null;
173931
174397
  }
173932
- var import_fs33 = __toESM2(require("fs"), 1);
173933
- var import_path33 = require("path");
174398
+ var import_fs34 = __toESM2(require("fs"), 1);
174399
+ var import_path34 = require("path");
173934
174400
  async function extractImports(source) {
173935
174401
  if (!source.includes("import")) {
173936
174402
  return [];
@@ -173941,7 +174407,7 @@ var require_dist11 = __commonJS({
173941
174407
  var DEFAULT_MAX_FILES = 3e4;
173942
174408
  async function readStatKind(path42) {
173943
174409
  try {
173944
- const stats = await import_fs33.default.promises.stat(path42);
174410
+ const stats = await import_fs34.default.promises.stat(path42);
173945
174411
  if (stats.isFile())
173946
174412
  return "file";
173947
174413
  if (stats.isDirectory())
@@ -173959,21 +174425,21 @@ var require_dist11 = __commonJS({
173959
174425
  return pending;
173960
174426
  }
173961
174427
  async function resolveNamePartsUncached(parts, searchDirs, cache4) {
173962
- const rel = (0, import_path33.join)(...parts);
174428
+ const rel = (0, import_path34.join)(...parts);
173963
174429
  for (const root of searchDirs) {
173964
174430
  let target = null;
173965
174431
  let targetKind = null;
173966
- const candidateInit = (0, import_path33.join)(root, rel, "__init__.py");
174432
+ const candidateInit = (0, import_path34.join)(root, rel, "__init__.py");
173967
174433
  if (await statKind(candidateInit, cache4) === "file") {
173968
174434
  target = candidateInit;
173969
174435
  targetKind = "file";
173970
174436
  } else {
173971
- const candidateModule = (0, import_path33.join)(root, `${rel}.py`);
174437
+ const candidateModule = (0, import_path34.join)(root, `${rel}.py`);
173972
174438
  if (await statKind(candidateModule, cache4) === "file") {
173973
174439
  target = candidateModule;
173974
174440
  targetKind = "file";
173975
- } else if (await statKind((0, import_path33.join)(root, rel), cache4) === "dir") {
173976
- target = (0, import_path33.join)(root, rel);
174441
+ } else if (await statKind((0, import_path34.join)(root, rel), cache4) === "dir") {
174442
+ target = (0, import_path34.join)(root, rel);
173977
174443
  targetKind = "dir";
173978
174444
  }
173979
174445
  }
@@ -173981,8 +174447,8 @@ var require_dist11 = __commonJS({
173981
174447
  const parentChain = [];
173982
174448
  let acc = root;
173983
174449
  for (const part of parts.slice(0, -1)) {
173984
- acc = (0, import_path33.join)(acc, part);
173985
- const init2 = (0, import_path33.join)(acc, "__init__.py");
174450
+ acc = (0, import_path34.join)(acc, part);
174451
+ const init2 = (0, import_path34.join)(acc, "__init__.py");
173986
174452
  if (await statKind(init2, cache4) === "file") {
173987
174453
  parentChain.push(init2);
173988
174454
  }
@@ -174019,8 +174485,8 @@ var require_dist11 = __commonJS({
174019
174485
  function submoduleDir(target, targetKind) {
174020
174486
  if (targetKind === "dir")
174021
174487
  return target;
174022
- if (targetKind === "file" && target.endsWith(`${import_path33.sep}__init__.py`)) {
174023
- return (0, import_path33.dirname)(target);
174488
+ if (targetKind === "file" && target.endsWith(`${import_path34.sep}__init__.py`)) {
174489
+ return (0, import_path34.dirname)(target);
174024
174490
  }
174025
174491
  return null;
174026
174492
  }
@@ -174029,9 +174495,9 @@ var require_dist11 = __commonJS({
174029
174495
  let search = roots;
174030
174496
  let searchKey = rootsKey;
174031
174497
  if (stmt.level > 0) {
174032
- let base = (0, import_path33.dirname)(importerPath);
174498
+ let base = (0, import_path34.dirname)(importerPath);
174033
174499
  for (let i5 = 1; i5 < stmt.level; i5++) {
174034
- base = (0, import_path33.dirname)(base);
174500
+ base = (0, import_path34.dirname)(base);
174035
174501
  }
174036
174502
  search = [base];
174037
174503
  searchKey = base;
@@ -174074,14 +174540,14 @@ var require_dist11 = __commonJS({
174074
174540
  return [...resolved];
174075
174541
  }
174076
174542
  function isModuleNameSeed(seed) {
174077
- return !(0, import_path33.isAbsolute)(seed) && /^[A-Za-z_][\w]*(\.[A-Za-z_][\w]*)*$/.test(seed);
174543
+ return !(0, import_path34.isAbsolute)(seed) && /^[A-Za-z_][\w]*(\.[A-Za-z_][\w]*)*$/.test(seed);
174078
174544
  }
174079
174545
  async function collectImportClosure({
174080
174546
  seeds,
174081
174547
  searchRoots,
174082
174548
  maxFiles = DEFAULT_MAX_FILES
174083
174549
  }) {
174084
- const roots = searchRoots.map((r6) => (0, import_path33.resolve)(r6));
174550
+ const roots = searchRoots.map((r6) => (0, import_path34.resolve)(r6));
174085
174551
  const rootsKey = roots.join("\0");
174086
174552
  const cache4 = {
174087
174553
  statKinds: /* @__PURE__ */ new Map(),
@@ -174104,7 +174570,7 @@ var require_dist11 = __commonJS({
174104
174570
  frontier.push(...name.parentChain);
174105
174571
  }
174106
174572
  } else {
174107
- const seedPath = (0, import_path33.resolve)(seed);
174573
+ const seedPath = (0, import_path34.resolve)(seed);
174108
174574
  if (await statKind(seedPath, cache4) === "file") {
174109
174575
  frontier.push(seedPath);
174110
174576
  }
@@ -174126,7 +174592,7 @@ var require_dist11 = __commonJS({
174126
174592
  batch.map(async (importerPath) => {
174127
174593
  let source;
174128
174594
  try {
174129
- source = await import_fs33.default.promises.readFile(importerPath, "utf8");
174595
+ source = await import_fs34.default.promises.readFile(importerPath, "utf8");
174130
174596
  } catch {
174131
174597
  return [];
174132
174598
  }
@@ -176854,7 +177320,7 @@ var require_dist12 = __commonJS({
176854
177320
  pna.nextTick(cb, er3);
176855
177321
  }
176856
177322
  function validChunk(stream2, state2, chunk, cb) {
176857
- var valid = true;
177323
+ var valid2 = true;
176858
177324
  var er3 = false;
176859
177325
  if (chunk === null) {
176860
177326
  er3 = new TypeError("May not write null values to stream");
@@ -176864,9 +177330,9 @@ var require_dist12 = __commonJS({
176864
177330
  if (er3) {
176865
177331
  stream2.emit("error", er3);
176866
177332
  pna.nextTick(cb, er3);
176867
- valid = false;
177333
+ valid2 = false;
176868
177334
  }
176869
- return valid;
177335
+ return valid2;
176870
177336
  }
176871
177337
  Writable3.prototype.write = function(chunk, encoding, cb) {
176872
177338
  var state2 = this._writableState;
@@ -178613,8 +179079,8 @@ var require_dist12 = __commonJS({
178613
179079
  if (typeof args[args.length - 1] === "function")
178614
179080
  fn2.apply(this, args);
178615
179081
  else {
178616
- return new Promise((resolve10, reject) => {
178617
- args.push((err, res) => err != null ? reject(err) : resolve10(res));
179082
+ return new Promise((resolve11, reject) => {
179083
+ args.push((err, res) => err != null ? reject(err) : resolve11(res));
178618
179084
  fn2.apply(this, args);
178619
179085
  });
178620
179086
  }
@@ -179485,19 +179951,19 @@ var require_dist12 = __commonJS({
179485
179951
  if (typeof callback === "function") {
179486
179952
  return fs122.exists(filename, callback);
179487
179953
  }
179488
- return new Promise((resolve10) => {
179489
- return fs122.exists(filename, resolve10);
179954
+ return new Promise((resolve11) => {
179955
+ return fs122.exists(filename, resolve11);
179490
179956
  });
179491
179957
  };
179492
179958
  exports3.read = function(fd, buffer, offset, length, position, callback) {
179493
179959
  if (typeof callback === "function") {
179494
179960
  return fs122.read(fd, buffer, offset, length, position, callback);
179495
179961
  }
179496
- return new Promise((resolve10, reject) => {
179962
+ return new Promise((resolve11, reject) => {
179497
179963
  fs122.read(fd, buffer, offset, length, position, (err, bytesRead, buffer2) => {
179498
179964
  if (err)
179499
179965
  return reject(err);
179500
- resolve10({ bytesRead, buffer: buffer2 });
179966
+ resolve11({ bytesRead, buffer: buffer2 });
179501
179967
  });
179502
179968
  });
179503
179969
  };
@@ -179505,11 +179971,11 @@ var require_dist12 = __commonJS({
179505
179971
  if (typeof args[args.length - 1] === "function") {
179506
179972
  return fs122.write(fd, buffer, ...args);
179507
179973
  }
179508
- return new Promise((resolve10, reject) => {
179974
+ return new Promise((resolve11, reject) => {
179509
179975
  fs122.write(fd, buffer, ...args, (err, bytesWritten, buffer2) => {
179510
179976
  if (err)
179511
179977
  return reject(err);
179512
- resolve10({ bytesWritten, buffer: buffer2 });
179978
+ resolve11({ bytesWritten, buffer: buffer2 });
179513
179979
  });
179514
179980
  });
179515
179981
  };
@@ -179518,11 +179984,11 @@ var require_dist12 = __commonJS({
179518
179984
  if (typeof args[args.length - 1] === "function") {
179519
179985
  return fs122.writev(fd, buffers, ...args);
179520
179986
  }
179521
- return new Promise((resolve10, reject) => {
179987
+ return new Promise((resolve11, reject) => {
179522
179988
  fs122.writev(fd, buffers, ...args, (err, bytesWritten, buffers2) => {
179523
179989
  if (err)
179524
179990
  return reject(err);
179525
- resolve10({ bytesWritten, buffers: buffers2 });
179991
+ resolve11({ bytesWritten, buffers: buffers2 });
179526
179992
  });
179527
179993
  });
179528
179994
  };
@@ -180855,7 +181321,7 @@ var require_dist12 = __commonJS({
180855
181321
  return obj;
180856
181322
  }
180857
181323
  var readFile32 = universalify.fromPromise(_readFile);
180858
- function readFileSync21(file, options = {}) {
181324
+ function readFileSync23(file, options = {}) {
180859
181325
  if (typeof options === "string") {
180860
181326
  options = { encoding: options };
180861
181327
  }
@@ -180887,7 +181353,7 @@ var require_dist12 = __commonJS({
180887
181353
  }
180888
181354
  module22.exports = {
180889
181355
  readFile: readFile32,
180890
- readFileSync: readFileSync21,
181356
+ readFileSync: readFileSync23,
180891
181357
  writeFile: writeFile5,
180892
181358
  writeFileSync: writeFileSync9
180893
181359
  };
@@ -181566,12 +182032,12 @@ var require_dist12 = __commonJS({
181566
182032
  if (token) {
181567
182033
  return token;
181568
182034
  }
181569
- return new Promise((resolve10, reject) => {
182035
+ return new Promise((resolve11, reject) => {
181570
182036
  if (this.pauseFn && !this.paused) {
181571
182037
  this.paused = true;
181572
182038
  this.pauseFn();
181573
182039
  }
181574
- this.waiting.push({ resolve: resolve10, reject });
182040
+ this.waiting.push({ resolve: resolve11, reject });
181575
182041
  });
181576
182042
  }
181577
182043
  async v() {
@@ -181821,7 +182287,7 @@ var require_dist12 = __commonJS({
181821
182287
  "../../node_modules/.pnpm/async-retry@1.2.3/node_modules/async-retry/lib/index.js"(exports3, module22) {
181822
182288
  var retrier = require_retry22();
181823
182289
  function retry2(fn2, opts) {
181824
- function run(resolve10, reject) {
182290
+ function run(resolve11, reject) {
181825
182291
  var options = opts || {};
181826
182292
  var op3 = retrier.operation(options);
181827
182293
  function bail(err) {
@@ -181846,7 +182312,7 @@ var require_dist12 = __commonJS({
181846
182312
  onError2(err, num2);
181847
182313
  return;
181848
182314
  }
181849
- Promise.resolve(val).then(resolve10).catch(function catchIt(err) {
182315
+ Promise.resolve(val).then(resolve11).catch(function catchIt(err) {
181850
182316
  onError2(err, num2);
181851
182317
  });
181852
182318
  }
@@ -185958,12 +186424,12 @@ var require_dist12 = __commonJS({
185958
186424
  if (typeof Promise !== "function") {
185959
186425
  throw new TypeError("callback not provided");
185960
186426
  }
185961
- return new Promise(function(resolve10, reject) {
186427
+ return new Promise(function(resolve11, reject) {
185962
186428
  isexe(path82, options || {}, function(er3, is3) {
185963
186429
  if (er3) {
185964
186430
  reject(er3);
185965
186431
  } else {
185966
- resolve10(is3);
186432
+ resolve11(is3);
185967
186433
  }
185968
186434
  });
185969
186435
  });
@@ -186379,8 +186845,8 @@ var require_dist12 = __commonJS({
186379
186845
  return null;
186380
186846
  }
186381
186847
  }
186382
- exports3.valid = valid;
186383
- function valid(version2, options) {
186848
+ exports3.valid = valid2;
186849
+ function valid2(version2, options) {
186384
186850
  var v12 = parse62(version2, options);
186385
186851
  return v12 ? v12.version : null;
186386
186852
  }
@@ -186664,8 +187130,8 @@ var require_dist12 = __commonJS({
186664
187130
  return exports3.rcompare(a5, b9, loose);
186665
187131
  });
186666
187132
  }
186667
- exports3.gt = gt3;
186668
- function gt3(a5, b9, loose) {
187133
+ exports3.gt = gt4;
187134
+ function gt4(a5, b9, loose) {
186669
187135
  return compare(a5, b9, loose) > 0;
186670
187136
  }
186671
187137
  exports3.lt = lt4;
@@ -186710,7 +187176,7 @@ var require_dist12 = __commonJS({
186710
187176
  case "!=":
186711
187177
  return neq(a5, b9, loose);
186712
187178
  case ">":
186713
- return gt3(a5, b9, loose);
187179
+ return gt4(a5, b9, loose);
186714
187180
  case ">=":
186715
187181
  return gte2(a5, b9, loose);
186716
187182
  case "<":
@@ -187179,7 +187645,7 @@ var require_dist12 = __commonJS({
187179
187645
  compver.raw = compver.format();
187180
187646
  case "":
187181
187647
  case ">=":
187182
- if (!minver || gt3(minver, compver)) {
187648
+ if (!minver || gt4(minver, compver)) {
187183
187649
  minver = compver;
187184
187650
  }
187185
187651
  break;
@@ -187219,7 +187685,7 @@ var require_dist12 = __commonJS({
187219
187685
  var gtfn, ltefn, ltfn, comp, ecomp;
187220
187686
  switch (hilo) {
187221
187687
  case ">":
187222
- gtfn = gt3;
187688
+ gtfn = gt4;
187223
187689
  ltefn = lte2;
187224
187690
  ltfn = lt4;
187225
187691
  comp = ">";
@@ -187228,7 +187694,7 @@ var require_dist12 = __commonJS({
187228
187694
  case "<":
187229
187695
  gtfn = lt4;
187230
187696
  ltefn = gte2;
187231
- ltfn = gt3;
187697
+ ltfn = gt4;
187232
187698
  comp = "<";
187233
187699
  ecomp = "<=";
187234
187700
  break;
@@ -187300,11 +187766,11 @@ var require_dist12 = __commonJS({
187300
187766
  var resolveCommand = require_resolveCommand();
187301
187767
  var escape2 = require_escape2();
187302
187768
  var readShebang = require_readShebang();
187303
- var semver3 = require_semver3();
187769
+ var semver4 = require_semver3();
187304
187770
  var isWin2 = process.platform === "win32";
187305
187771
  var isExecutableRegExp = /\.(?:com|exe)$/i;
187306
187772
  var isCmdShimRegExp = /node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;
187307
- var supportsShellOption = niceTry(() => semver3.satisfies(process.version, "^4.8.0 || ^5.7.0 || >= 6.0.0", true)) || false;
187773
+ var supportsShellOption = niceTry(() => semver4.satisfies(process.version, "^4.8.0 || ^5.7.0 || >= 6.0.0", true)) || false;
187308
187774
  function detectShebang(parsed) {
187309
187775
  parsed.file = resolveCommand(parsed);
187310
187776
  const shebang = parsed.file && readShebang(parsed.file);
@@ -187612,8 +188078,8 @@ var require_dist12 = __commonJS({
187612
188078
  return null;
187613
188079
  }
187614
188080
  }
187615
- exports3.valid = valid;
187616
- function valid(version2, options) {
188081
+ exports3.valid = valid2;
188082
+ function valid2(version2, options) {
187617
188083
  var v12 = parse62(version2, options);
187618
188084
  return v12 ? v12.version : null;
187619
188085
  }
@@ -187925,8 +188391,8 @@ var require_dist12 = __commonJS({
187925
188391
  return exports3.compareBuild(b9, a5, loose);
187926
188392
  });
187927
188393
  }
187928
- exports3.gt = gt3;
187929
- function gt3(a5, b9, loose) {
188394
+ exports3.gt = gt4;
188395
+ function gt4(a5, b9, loose) {
187930
188396
  return compare(a5, b9, loose) > 0;
187931
188397
  }
187932
188398
  exports3.lt = lt4;
@@ -187971,7 +188437,7 @@ var require_dist12 = __commonJS({
187971
188437
  case "!=":
187972
188438
  return neq(a5, b9, loose);
187973
188439
  case ">":
187974
- return gt3(a5, b9, loose);
188440
+ return gt4(a5, b9, loose);
187975
188441
  case ">=":
187976
188442
  return gte2(a5, b9, loose);
187977
188443
  case "<":
@@ -188468,7 +188934,7 @@ var require_dist12 = __commonJS({
188468
188934
  compver.raw = compver.format();
188469
188935
  case "":
188470
188936
  case ">=":
188471
- if (!minver || gt3(minver, compver)) {
188937
+ if (!minver || gt4(minver, compver)) {
188472
188938
  minver = compver;
188473
188939
  }
188474
188940
  break;
@@ -188508,7 +188974,7 @@ var require_dist12 = __commonJS({
188508
188974
  var gtfn, ltefn, ltfn, comp, ecomp;
188509
188975
  switch (hilo) {
188510
188976
  case ">":
188511
- gtfn = gt3;
188977
+ gtfn = gt4;
188512
188978
  ltefn = lte2;
188513
188979
  ltfn = lt4;
188514
188980
  comp = ">";
@@ -188517,7 +188983,7 @@ var require_dist12 = __commonJS({
188517
188983
  case "<":
188518
188984
  gtfn = lt4;
188519
188985
  ltefn = gte2;
188520
- ltfn = gt3;
188986
+ ltfn = gt4;
188521
188987
  comp = "<";
188522
188988
  ecomp = "<=";
188523
188989
  break;
@@ -191473,8 +191939,8 @@ var require_dist12 = __commonJS({
191473
191939
  var normalizeError = (error3) => {
191474
191940
  if (isError2(error3))
191475
191941
  return error3;
191476
- const errorMessage = errorToString(error3);
191477
- return isErrorLike(error3) ? Object.assign(new Error(errorMessage), error3) : new Error(errorMessage);
191942
+ const errorMessage2 = errorToString(error3);
191943
+ return isErrorLike(error3) ? Object.assign(new Error(errorMessage2), error3) : new Error(errorMessage2);
191478
191944
  };
191479
191945
  function isSpawnError(v12) {
191480
191946
  return isErrnoException2(v12) && "spawnargs" in v12;
@@ -207707,7 +208173,7 @@ ${fields}`;
207707
208173
  (0, import_assert3.default)(typeof mode === "number");
207708
208174
  (0, import_assert3.default)(typeof stream2.pipe === "function");
207709
208175
  const chunks = [];
207710
- await new Promise((resolve10, reject) => {
208176
+ await new Promise((resolve11, reject) => {
207711
208177
  stream2.on(
207712
208178
  "data",
207713
208179
  (chunk) => (
@@ -207719,7 +208185,7 @@ ${fields}`;
207719
208185
  )
207720
208186
  );
207721
208187
  stream2.on("error", (error3) => reject(error3));
207722
- stream2.on("end", () => resolve10());
208188
+ stream2.on("end", () => resolve11());
207723
208189
  });
207724
208190
  const data2 = Buffer.concat(chunks);
207725
208191
  return new _FileBlob({ mode, contentType, data: data2 });
@@ -207735,7 +208201,7 @@ ${fields}`;
207735
208201
  var import_assert22 = __toESM2(require("assert"));
207736
208202
  var import_fs_extra = __toESM2(require_lib16());
207737
208203
  var import_multistream = __toESM2(require_multistream());
207738
- var import_path33 = __toESM2(require("path"));
208204
+ var import_path34 = __toESM2(require("path"));
207739
208205
  var import_async_sema = __toESM2(require_async_sema());
207740
208206
  var semaToPreventEMFILE = new import_async_sema.default(20);
207741
208207
  var FileFsRef = class _FileFsRef {
@@ -207777,14 +208243,14 @@ ${fields}`;
207777
208243
  (0, import_assert22.default)(typeof mode === "number");
207778
208244
  (0, import_assert22.default)(typeof stream2.pipe === "function");
207779
208245
  (0, import_assert22.default)(typeof fsPath === "string");
207780
- await import_fs_extra.default.mkdirp(import_path33.default.dirname(fsPath));
207781
- await new Promise((resolve10, reject) => {
208246
+ await import_fs_extra.default.mkdirp(import_path34.default.dirname(fsPath));
208247
+ await new Promise((resolve11, reject) => {
207782
208248
  const dest = import_fs_extra.default.createWriteStream(fsPath, {
207783
208249
  mode: mode & 511
207784
208250
  });
207785
208251
  stream2.pipe(dest);
207786
208252
  stream2.on("error", reject);
207787
- dest.on("finish", resolve10);
208253
+ dest.on("finish", resolve11);
207788
208254
  dest.on("error", reject);
207789
208255
  });
207790
208256
  return _FileFsRef.fromFsPath({ mode, contentType, fsPath });
@@ -208025,7 +208491,7 @@ ${fields}`;
208025
208491
  var import_fs_extra2 = __toESM2(require_lib16());
208026
208492
  var import_end_of_stream = __toESM2(require_end_of_stream3());
208027
208493
  function streamToBuffer(stream2) {
208028
- return new Promise((resolve10, reject) => {
208494
+ return new Promise((resolve11, reject) => {
208029
208495
  const buffers = [];
208030
208496
  stream2.on("data", (chunk) => {
208031
208497
  const buffer = Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk);
@@ -208039,13 +208505,13 @@ ${fields}`;
208039
208505
  try {
208040
208506
  switch (buffers.length) {
208041
208507
  case 0:
208042
- resolve10(Buffer.allocUnsafe(0));
208508
+ resolve11(Buffer.allocUnsafe(0));
208043
208509
  break;
208044
208510
  case 1:
208045
- resolve10(Buffer.from(buffers[0]));
208511
+ resolve11(Buffer.from(buffers[0]));
208046
208512
  break;
208047
208513
  default:
208048
- resolve10(Buffer.concat(buffers));
208514
+ resolve11(Buffer.concat(buffers));
208049
208515
  }
208050
208516
  } catch (concatErr) {
208051
208517
  reject(concatErr);
@@ -208496,7 +208962,7 @@ ${fields}`;
208496
208962
  }
208497
208963
  }
208498
208964
  const zipFile = new import_yazl.ZipFile();
208499
- const zipBuffer = await new Promise((resolve10, reject) => {
208965
+ const zipBuffer = await new Promise((resolve11, reject) => {
208500
208966
  for (const name of names) {
208501
208967
  const file = files[name];
208502
208968
  const opts = { mode: file.mode, mtime };
@@ -208512,7 +208978,7 @@ ${fields}`;
208512
208978
  }
208513
208979
  }
208514
208980
  zipFile.end();
208515
- streamToBuffer(zipFile.outputStream).then(resolve10).catch(reject);
208981
+ streamToBuffer(zipFile.outputStream).then(resolve11).catch(reject);
208516
208982
  });
208517
208983
  return zipBuffer;
208518
208984
  }
@@ -208735,25 +209201,25 @@ ${fields}`;
208735
209201
  }
208736
209202
  }
208737
209203
  };
208738
- var import_path34 = require("path");
209204
+ var import_path35 = require("path");
208739
209205
  var import_os5 = require("os");
208740
209206
  var import_fs_extra4 = __toESM2(require_lib16());
208741
209207
  async function getWritableDirectory() {
208742
209208
  const name = Math.floor(Math.random() * 2147483647).toString(16);
208743
- const directory = (0, import_path34.join)((0, import_os5.tmpdir)(), name);
209209
+ const directory = (0, import_path35.join)((0, import_os5.tmpdir)(), name);
208744
209210
  await (0, import_fs_extra4.mkdirp)(directory);
208745
209211
  return directory;
208746
209212
  }
208747
209213
  var import_path42 = __toESM2(require("path"));
208748
209214
  var import_assert5 = __toESM2(require("assert"));
208749
209215
  var import_glob7 = __toESM2(require_glob());
208750
- var import_util26 = require("util");
209216
+ var import_util27 = require("util");
208751
209217
  var import_fs_extra5 = __toESM2(require_lib16());
208752
209218
  var isWin = process.platform === "win32";
208753
209219
  function normalizePath2(p8) {
208754
209220
  return isWin ? p8.replace(/\\/g, "/") : p8;
208755
209221
  }
208756
- var vanillaGlob = (0, import_util26.promisify)(import_glob7.default);
209222
+ var vanillaGlob = (0, import_util27.promisify)(import_glob7.default);
208757
209223
  async function glob2(pattern, opts, mountpoint) {
208758
209224
  const options = typeof opts === "string" ? { cwd: opts } : opts;
208759
209225
  if (!options.cwd) {
@@ -208838,7 +209304,7 @@ ${fields}`;
208838
209304
  var import_cross_spawn = __toESM2(require_cross_spawn());
208839
209305
  var import_semver22 = __toESM2(require_semver22());
208840
209306
  var import_util62 = require("util");
208841
- var import_fs33 = require("fs");
209307
+ var import_fs34 = require("fs");
208842
209308
  var import_semver3 = __toESM2(require_semver22());
208843
209309
  var Version = class {
208844
209310
  constructor(version2) {
@@ -208977,7 +209443,7 @@ ${fields}`;
208977
209443
  return NODE_VERSIONS;
208978
209444
  }
208979
209445
  function isNodeVersionAvailable(version2) {
208980
- const stat2 = (0, import_fs33.statSync)(`/node${version2.major}`, { throwIfNoEntry: false });
209446
+ const stat2 = (0, import_fs34.statSync)(`/node${version2.major}`, { throwIfNoEntry: false });
208981
209447
  return stat2?.isDirectory() ?? false;
208982
209448
  }
208983
209449
  function getAvailableNodeVersions() {
@@ -209839,7 +210305,7 @@ ${codeblock}`, options);
209839
210305
  path: void 0
209840
210306
  };
209841
210307
  function spawnAsync(command15, args, opts = {}) {
209842
- return new Promise((resolve10, reject) => {
210308
+ return new Promise((resolve11, reject) => {
209843
210309
  const stderrLogs = [];
209844
210310
  const hasCustomStreams = opts.outputStream || opts.errorStream;
209845
210311
  if (hasCustomStreams) {
@@ -209861,7 +210327,7 @@ ${codeblock}`, options);
209861
210327
  child.on("error", reject);
209862
210328
  child.on("close", (code, signal) => {
209863
210329
  if (code === 0 || opts.ignoreNon0Exit) {
209864
- return resolve10();
210330
+ return resolve11();
209865
210331
  }
209866
210332
  const cmd = opts.prettyCommand ? `Command "${opts.prettyCommand}"` : "Command";
209867
210333
  reject(
@@ -211488,7 +211954,7 @@ To use ${otherVersion}, manually opt in using corepack (https://vercel.com/docs/
211488
211954
  }
211489
211955
  }
211490
211956
  };
211491
- var import_fs34 = __toESM2(require("fs"));
211957
+ var import_fs35 = __toESM2(require("fs"));
211492
211958
  var import_path112 = require("path");
211493
211959
  var MANIFEST_VERSION = "20260304";
211494
211960
  var MANIFEST_FILENAME = "package-manifest.json";
@@ -211497,14 +211963,14 @@ To use ${otherVersion}, manually opt in using corepack (https://vercel.com/docs/
211497
211963
  }
211498
211964
  async function writeProjectManifest(manifest, workPath, runtime) {
211499
211965
  const outPath = (0, import_path112.join)(workPath, manifestPath(runtime));
211500
- await import_fs34.default.promises.mkdir((0, import_path112.dirname)(outPath), { recursive: true });
211501
- await import_fs34.default.promises.writeFile(outPath, JSON.stringify(manifest, null, 2));
211966
+ await import_fs35.default.promises.mkdir((0, import_path112.dirname)(outPath), { recursive: true });
211967
+ await import_fs35.default.promises.writeFile(outPath, JSON.stringify(manifest, null, 2));
211502
211968
  }
211503
211969
  function createDiagnostics(runtime) {
211504
211970
  return async ({ workPath }) => {
211505
211971
  try {
211506
211972
  const filePath = (0, import_path112.join)(workPath, manifestPath(runtime));
211507
- const data2 = await import_fs34.default.promises.readFile(filePath, "utf-8");
211973
+ const data2 = await import_fs35.default.promises.readFile(filePath, "utf-8");
211508
211974
  return {
211509
211975
  [MANIFEST_FILENAME]: new FileBlob({ data: data2 })
211510
211976
  };
@@ -212727,7 +213193,7 @@ ${entrypointsForMessage}`
212727
213193
  }
212728
213194
  var import_crypto8 = require("crypto");
212729
213195
  async function streamToDigestAsync(stream2) {
212730
- return await new Promise((resolve10, reject) => {
213196
+ return await new Promise((resolve11, reject) => {
212731
213197
  stream2.once("error", reject);
212732
213198
  let count = 0;
212733
213199
  const sha2562 = (0, import_crypto8.createHash)("sha256");
@@ -212738,7 +213204,7 @@ ${entrypointsForMessage}`
212738
213204
  md5: md522.digest("hex"),
212739
213205
  size: count
212740
213206
  };
212741
- resolve10(res);
213207
+ resolve11(res);
212742
213208
  });
212743
213209
  stream2.on("readable", () => {
212744
213210
  let chunk;
@@ -213667,8 +214133,8 @@ var require_readdir_recursive = __commonJS({
213667
214133
  default: () => readdir6
213668
214134
  });
213669
214135
  module2.exports = __toCommonJS2(readdir_recursive_exports);
213670
- var import_fs33 = __toESM2(require("fs"));
213671
- var import_path33 = __toESM2(require("path"));
214136
+ var import_fs34 = __toESM2(require("fs"));
214137
+ var import_path34 = __toESM2(require("path"));
213672
214138
  var import_minimatch8 = __toESM2(require_commonjs3());
213673
214139
  function patternMatcher(pattern) {
213674
214140
  return function(path20, stats) {
@@ -213686,18 +214152,18 @@ var require_readdir_recursive = __commonJS({
213686
214152
  function readdir6(path20, ignores) {
213687
214153
  ignores = ignores.map(toMatcherFunction);
213688
214154
  let list2 = [];
213689
- return new Promise(function(resolve10, reject) {
213690
- import_fs33.default.readdir(path20, function(err, files) {
214155
+ return new Promise(function(resolve11, reject) {
214156
+ import_fs34.default.readdir(path20, function(err, files) {
213691
214157
  if (err) {
213692
214158
  return reject(err);
213693
214159
  }
213694
214160
  let pending = files.length;
213695
214161
  if (!pending) {
213696
- return resolve10(list2);
214162
+ return resolve11(list2);
213697
214163
  }
213698
214164
  files.forEach(function(file) {
213699
- const filePath = import_path33.default.join(path20, file);
213700
- import_fs33.default.lstat(filePath, function(_err, stats) {
214165
+ const filePath = import_path34.default.join(path20, file);
214166
+ import_fs34.default.lstat(filePath, function(_err, stats) {
213701
214167
  if (_err) {
213702
214168
  return reject(_err);
213703
214169
  }
@@ -213705,7 +214171,7 @@ var require_readdir_recursive = __commonJS({
213705
214171
  if (matches) {
213706
214172
  pending -= 1;
213707
214173
  if (!pending) {
213708
- return resolve10(list2);
214174
+ return resolve11(list2);
213709
214175
  }
213710
214176
  return null;
213711
214177
  }
@@ -213717,14 +214183,14 @@ var require_readdir_recursive = __commonJS({
213717
214183
  list2 = list2.concat(res);
213718
214184
  pending -= 1;
213719
214185
  if (!pending) {
213720
- return resolve10(list2);
214186
+ return resolve11(list2);
213721
214187
  }
213722
214188
  }).catch(reject);
213723
214189
  } else {
213724
214190
  list2.push(filePath);
213725
214191
  pending -= 1;
213726
214192
  if (!pending) {
213727
- return resolve10(list2);
214193
+ return resolve11(list2);
213728
214194
  }
213729
214195
  }
213730
214196
  });
@@ -219985,41 +220451,41 @@ var require_queue = __commonJS({
219985
220451
  queue.drained = drained;
219986
220452
  return queue;
219987
220453
  function push(value) {
219988
- var p8 = new Promise(function(resolve10, reject) {
220454
+ var p8 = new Promise(function(resolve11, reject) {
219989
220455
  pushCb(value, function(err, result) {
219990
220456
  if (err) {
219991
220457
  reject(err);
219992
220458
  return;
219993
220459
  }
219994
- resolve10(result);
220460
+ resolve11(result);
219995
220461
  });
219996
220462
  });
219997
220463
  p8.catch(noop2);
219998
220464
  return p8;
219999
220465
  }
220000
220466
  function unshift(value) {
220001
- var p8 = new Promise(function(resolve10, reject) {
220467
+ var p8 = new Promise(function(resolve11, reject) {
220002
220468
  unshiftCb(value, function(err, result) {
220003
220469
  if (err) {
220004
220470
  reject(err);
220005
220471
  return;
220006
220472
  }
220007
- resolve10(result);
220473
+ resolve11(result);
220008
220474
  });
220009
220475
  });
220010
220476
  p8.catch(noop2);
220011
220477
  return p8;
220012
220478
  }
220013
220479
  function drained() {
220014
- var p8 = new Promise(function(resolve10) {
220480
+ var p8 = new Promise(function(resolve11) {
220015
220481
  process.nextTick(function() {
220016
220482
  if (queue.idle()) {
220017
- resolve10();
220483
+ resolve11();
220018
220484
  } else {
220019
220485
  var previousDrain = queue.drain;
220020
220486
  queue.drain = function() {
220021
220487
  if (typeof previousDrain === "function") previousDrain();
220022
- resolve10();
220488
+ resolve11();
220023
220489
  queue.drain = previousDrain;
220024
220490
  };
220025
220491
  }
@@ -220516,9 +220982,9 @@ var require_stream4 = __commonJS({
220516
220982
  });
220517
220983
  }
220518
220984
  _getStat(filepath) {
220519
- return new Promise((resolve10, reject) => {
220985
+ return new Promise((resolve11, reject) => {
220520
220986
  this._stat(filepath, this._fsStatSettings, (error3, stats) => {
220521
- return error3 === null ? resolve10(stats) : reject(error3);
220987
+ return error3 === null ? resolve11(stats) : reject(error3);
220522
220988
  });
220523
220989
  });
220524
220990
  }
@@ -220543,10 +221009,10 @@ var require_async6 = __commonJS({
220543
221009
  this._readerStream = new stream_1.default(this._settings);
220544
221010
  }
220545
221011
  dynamic(root, options) {
220546
- return new Promise((resolve10, reject) => {
221012
+ return new Promise((resolve11, reject) => {
220547
221013
  this._walkAsync(root, options, (error3, entries) => {
220548
221014
  if (error3 === null) {
220549
- resolve10(entries);
221015
+ resolve11(entries);
220550
221016
  } else {
220551
221017
  reject(error3);
220552
221018
  }
@@ -220556,10 +221022,10 @@ var require_async6 = __commonJS({
220556
221022
  async static(patterns, options) {
220557
221023
  const entries = [];
220558
221024
  const stream2 = this._readerStream.static(patterns, options);
220559
- return new Promise((resolve10, reject) => {
221025
+ return new Promise((resolve11, reject) => {
220560
221026
  stream2.once("error", reject);
220561
221027
  stream2.on("data", (entry) => entries.push(entry));
220562
- stream2.once("end", () => resolve10(entries));
221028
+ stream2.once("end", () => resolve11(entries));
220563
221029
  });
220564
221030
  }
220565
221031
  };
@@ -221497,7 +221963,7 @@ var require_utils10 = __commonJS({
221497
221963
  shouldInlineStaticFiles: () => shouldInlineStaticFiles
221498
221964
  });
221499
221965
  module2.exports = __toCommonJS2(utils_exports);
221500
- var import_path33 = require("path");
221966
+ var import_path34 = require("path");
221501
221967
  var import_stream10 = require("stream");
221502
221968
  var import_url13 = require("url");
221503
221969
  var import_ignore4 = __toESM2(require_ignore2());
@@ -221561,8 +222027,8 @@ var require_utils10 = __commonJS({
221561
222027
  };
221562
222028
  async function getUserIgnore(cwd) {
221563
222029
  const [vercelignore, nowignore] = await Promise.all([
221564
- maybeRead((0, import_path33.join)(cwd, ".vercelignore"), ""),
221565
- maybeRead((0, import_path33.join)(cwd, ".nowignore"), "")
222030
+ maybeRead((0, import_path34.join)(cwd, ".vercelignore"), ""),
222031
+ maybeRead((0, import_path34.join)(cwd, ".nowignore"), "")
221566
222032
  ]);
221567
222033
  if (vercelignore && nowignore) {
221568
222034
  throw new import_build_utils.NowBuildError({
@@ -221592,7 +222058,7 @@ var require_utils10 = __commonJS({
221592
222058
  debug4("Building file tree...");
221593
222059
  if (isDirectory && !Array.isArray(path20)) {
221594
222060
  const ignores2 = (absPath) => {
221595
- const rel = (0, import_path33.relative)(path20, absPath);
222061
+ const rel = (0, import_path34.relative)(path20, absPath);
221596
222062
  const ignored = ig.ignores(rel);
221597
222063
  if (ignored) {
221598
222064
  ignoreList.push(rel);
@@ -221603,7 +222069,7 @@ var require_utils10 = __commonJS({
221603
222069
  const refs = /* @__PURE__ */ new Set();
221604
222070
  if (prebuilt) {
221605
222071
  const vcConfigFilePaths = fileList.filter(
221606
- (file) => (0, import_path33.basename)(file) === ".vc-config.json"
222072
+ (file) => (0, import_path34.basename)(file) === ".vc-config.json"
221607
222073
  );
221608
222074
  const userIg = await getUserIgnore(path20);
221609
222075
  await Promise.all(
@@ -221613,9 +222079,9 @@ var require_utils10 = __commonJS({
221613
222079
  if (!config.filePathMap)
221614
222080
  return;
221615
222081
  for (const v12 of Object.values(config.filePathMap)) {
221616
- const absPath = (0, import_path33.join)(path20, v12);
221617
- const rel = (0, import_path33.relative)(path20, absPath);
221618
- if (rel.startsWith("..") || (0, import_path33.isAbsolute)(rel)) {
222082
+ const absPath = (0, import_path34.join)(path20, v12);
222083
+ const rel = (0, import_path34.relative)(path20, absPath);
222084
+ if (rel.startsWith("..") || (0, import_path34.isAbsolute)(rel)) {
221619
222085
  debug4(
221620
222086
  `Ignoring "filePathMap" entry "${v12}": resolves outside the deployment root`
221621
222087
  );
@@ -221633,7 +222099,7 @@ var require_utils10 = __commonJS({
221633
222099
  );
221634
222100
  try {
221635
222101
  let microfrontendConfigPath = (0, import_utils68.findConfig)({
221636
- dir: (0, import_path33.join)(path20, rootDirectory || "")
222102
+ dir: (0, import_path34.join)(path20, rootDirectory || "")
221637
222103
  });
221638
222104
  if (!microfrontendConfigPath && !rootDirectory && projectName) {
221639
222105
  microfrontendConfigPath = (0, import_utils68.findConfig)({
@@ -221651,7 +222117,7 @@ var require_utils10 = __commonJS({
221651
222117
  }
221652
222118
  }
221653
222119
  try {
221654
- const routesJsonPath = (0, import_path33.join)(path20, ".vercel", "routes.json");
222120
+ const routesJsonPath = (0, import_path34.join)(path20, ".vercel", "routes.json");
221655
222121
  const routesJsonContent = await maybeRead(routesJsonPath, null);
221656
222122
  if (routesJsonContent !== null) {
221657
222123
  refs.add(routesJsonPath);
@@ -221663,12 +222129,12 @@ var require_utils10 = __commonJS({
221663
222129
  if (prebuilt && bulkRedirectsPath) {
221664
222130
  try {
221665
222131
  const projectRoot = path20;
221666
- const bulkRedirectsFullPath = (0, import_path33.join)(
222132
+ const bulkRedirectsFullPath = (0, import_path34.join)(
221667
222133
  projectRoot,
221668
222134
  rootDirectory || "",
221669
222135
  bulkRedirectsPath
221670
222136
  );
221671
- const relativeFromRoot = (0, import_path33.relative)(projectRoot, bulkRedirectsFullPath);
222137
+ const relativeFromRoot = (0, import_path34.relative)(projectRoot, bulkRedirectsFullPath);
221672
222138
  if (relativeFromRoot.startsWith("..")) {
221673
222139
  debug4(
221674
222140
  `Skipping bulk redirects path "${bulkRedirectsPath}" - path traversal detected (resolves outside project root)`
@@ -221723,9 +222189,9 @@ var require_utils10 = __commonJS({
221723
222189
  if (typeof cwd !== "string") {
221724
222190
  throw new Error(`\`cwd\` must be a "string"`);
221725
222191
  }
221726
- const relOutputDir = (0, import_path33.relative)(cwd, vercelOutputDir);
222192
+ const relOutputDir = (0, import_path34.relative)(cwd, vercelOutputDir);
221727
222193
  ignores = ["*"];
221728
- const parts = relOutputDir.split(import_path33.sep);
222194
+ const parts = relOutputDir.split(import_path34.sep);
221729
222195
  parts.forEach((_5, i5) => {
221730
222196
  const level = parts.slice(0, i5 + 1).join("/");
221731
222197
  ignores.push(`!${level}`);
@@ -221765,8 +222231,8 @@ var require_utils10 = __commonJS({
221765
222231
  const files = await Promise.all(
221766
222232
  cwds.map(async (cwd2) => {
221767
222233
  const [vercelignore, nowignore] = await Promise.all([
221768
- maybeRead((0, import_path33.join)(cwd2, ".vercelignore"), ""),
221769
- maybeRead((0, import_path33.join)(cwd2, ".nowignore"), "")
222234
+ maybeRead((0, import_path34.join)(cwd2, ".vercelignore"), ""),
222235
+ maybeRead((0, import_path34.join)(cwd2, ".nowignore"), "")
221770
222236
  ]);
221771
222237
  if (vercelignore && nowignore) {
221772
222238
  throw new import_build_utils.NowBuildError({
@@ -221778,7 +222244,7 @@ var require_utils10 = __commonJS({
221778
222244
  return vercelignore || nowignore;
221779
222245
  })
221780
222246
  );
221781
- const isRustProject = (await Promise.all(cwds.map((cwd2) => (0, import_fs_extra.pathExists)((0, import_path33.join)(cwd2, "Cargo.toml"))))).some(Boolean);
222247
+ const isRustProject = (await Promise.all(cwds.map((cwd2) => (0, import_fs_extra.pathExists)((0, import_path34.join)(cwd2, "Cargo.toml"))))).some(Boolean);
221782
222248
  if (isRustProject) {
221783
222249
  ignores.push("/target");
221784
222250
  }
@@ -221860,9 +222326,9 @@ ${clearRelative(ignoreFile)}`);
221860
222326
  for (const name of file.names) {
221861
222327
  let fileName;
221862
222328
  if (clientOptions.isDirectory) {
221863
- fileName = typeof clientOptions.path === "string" ? (0, import_path33.relative)(clientOptions.path, name) : name;
222329
+ fileName = typeof clientOptions.path === "string" ? (0, import_path34.relative)(clientOptions.path, name) : name;
221864
222330
  } else {
221865
- const segments = name.split(import_path33.sep);
222331
+ const segments = name.split(import_path34.sep);
221866
222332
  fileName = segments[segments.length - 1];
221867
222333
  }
221868
222334
  const normalizedName = isWin ? fileName.replace(/\\/g, "/") : fileName;
@@ -222133,12 +222599,12 @@ var require_check_deployment_status = __commonJS({
222133
222599
  await (0, import_sleep_promise.default)(duration);
222134
222600
  return;
222135
222601
  }
222136
- await new Promise((resolve10) => {
222602
+ await new Promise((resolve11) => {
222137
222603
  const timeout = setTimeout(finish, duration);
222138
222604
  function finish() {
222139
222605
  clearTimeout(timeout);
222140
222606
  signal?.removeEventListener("abort", onAbort);
222141
- resolve10();
222607
+ resolve11();
222142
222608
  }
222143
222609
  function onAbort() {
222144
222610
  if (getAliasAssignedEvent(signal, deploymentId))
@@ -222770,7 +223236,7 @@ var require_lib15 = __commonJS({
222770
223236
  init_import_meta_url();
222771
223237
  var retrier = require_retry5();
222772
223238
  function retry2(fn2, opts) {
222773
- function run(resolve10, reject) {
223239
+ function run(resolve11, reject) {
222774
223240
  var options = opts || {};
222775
223241
  var op3 = retrier.operation(options);
222776
223242
  function bail(err) {
@@ -222795,7 +223261,7 @@ var require_lib15 = __commonJS({
222795
223261
  onError2(err, num2);
222796
223262
  return;
222797
223263
  }
222798
- Promise.resolve(val).then(resolve10).catch(function catchIt(err) {
223264
+ Promise.resolve(val).then(resolve11).catch(function catchIt(err) {
222799
223265
  onError2(err, num2);
222800
223266
  });
222801
223267
  }
@@ -222884,13 +223350,13 @@ var require_upload = __commonJS({
222884
223350
  uploadFiles: () => uploadFiles
222885
223351
  });
222886
223352
  module2.exports = __toCommonJS2(upload_exports);
222887
- var import_fs33 = require("fs");
223353
+ var import_fs34 = require("fs");
222888
223354
  var import_stream10 = require("stream");
222889
223355
  var import_node_events8 = require("node:events");
222890
223356
  var import_async_retry5 = __toESM2(require_lib15());
222891
223357
  var import_async_sema = require_lib12();
222892
223358
  var import_utils68 = require_utils10();
222893
- var import_errors48 = require_errors3();
223359
+ var import_errors49 = require_errors3();
222894
223360
  var import_deploy = require_deploy();
222895
223361
  var isClientNetworkError = (err) => {
222896
223362
  if (!(err instanceof Error)) {
@@ -223016,7 +223482,7 @@ var require_upload = __commonJS({
223016
223482
  body = buffered.pipe(counter);
223017
223483
  } else if (typeof size2 === "number") {
223018
223484
  contentLength = size2;
223019
- const fileStream = (0, import_fs33.createReadStream)(names[0]);
223485
+ const fileStream = (0, import_fs34.createReadStream)(names[0]);
223020
223486
  fileStream.on("error", (err2) => counter.destroy(err2));
223021
223487
  counter.on("close", () => fileStream.destroy());
223022
223488
  body = fileStream.pipe(counter);
@@ -223062,11 +223528,11 @@ var require_upload = __commonJS({
223062
223528
  `An internal error occurred in upload request. Not retrying...`
223063
223529
  );
223064
223530
  const { error: error3 } = await res.json();
223065
- err = new import_errors48.DeploymentError(error3);
223531
+ err = new import_errors49.DeploymentError(error3);
223066
223532
  } else {
223067
223533
  debug4(`A server error occurred in upload request. Retrying...`);
223068
223534
  const { error: error3 } = await res.json();
223069
- throw new import_errors48.DeploymentError(error3);
223535
+ throw new import_errors49.DeploymentError(error3);
223070
223536
  }
223071
223537
  } catch (e5) {
223072
223538
  debug4(`An unexpected error occurred in upload promise:
@@ -223194,8 +223660,8 @@ var require_dist13 = __commonJS({
223194
223660
  var normalizeError = (error3) => {
223195
223661
  if (isError2(error3))
223196
223662
  return error3;
223197
- const errorMessage = errorToString(error3);
223198
- return isErrorLike(error3) ? Object.assign(new Error(errorMessage), error3) : new Error(errorMessage);
223663
+ const errorMessage2 = errorToString(error3);
223664
+ return isErrorLike(error3) ? Object.assign(new Error(errorMessage2), error3) : new Error(errorMessage2);
223199
223665
  };
223200
223666
  function isSpawnError(v12) {
223201
223667
  return isErrnoException(v12) && "spawnargs" in v12;
@@ -223813,7 +224279,7 @@ var require_stream_writable2 = __commonJS({
223813
224279
  pna.nextTick(cb, er3);
223814
224280
  }
223815
224281
  function validChunk(stream2, state2, chunk, cb) {
223816
- var valid = true;
224282
+ var valid2 = true;
223817
224283
  var er3 = false;
223818
224284
  if (chunk === null) {
223819
224285
  er3 = new TypeError("May not write null values to stream");
@@ -223823,9 +224289,9 @@ var require_stream_writable2 = __commonJS({
223823
224289
  if (er3) {
223824
224290
  stream2.emit("error", er3);
223825
224291
  pna.nextTick(cb, er3);
223826
- valid = false;
224292
+ valid2 = false;
223827
224293
  }
223828
- return valid;
224294
+ return valid2;
223829
224295
  }
223830
224296
  Writable3.prototype.write = function(chunk, encoding, cb) {
223831
224297
  var state2 = this._writableState;
@@ -228236,9 +228702,9 @@ var require_tar_fs = __commonJS({
228236
228702
  }, stat2);
228237
228703
  }
228238
228704
  var dir = path20.dirname(name);
228239
- validate4(xfs, dir, path20.join(cwd, "."), function(err, valid) {
228705
+ validate4(xfs, dir, path20.join(cwd, "."), function(err, valid2) {
228240
228706
  if (err) return next(err);
228241
- if (!valid) return next(new Error(dir + " is not a valid path"));
228707
+ if (!valid2) return next(new Error(dir + " is not a valid path"));
228242
228708
  mkdirfix(dir, {
228243
228709
  fs: xfs,
228244
228710
  own,
@@ -228381,8 +228847,8 @@ var require_collect_deployment_files = __commonJS({
228381
228847
  module2.exports = __toCommonJS2(collect_deployment_files_exports);
228382
228848
  var import_error_utils = require_dist13();
228383
228849
  var import_fs_extra = require_lib11();
228384
- var import_path33 = require("path");
228385
- var import_errors48 = require_errors3();
228850
+ var import_path34 = require("path");
228851
+ var import_errors49 = require_errors3();
228386
228852
  var import_utils68 = require_utils10();
228387
228853
  var import_archive = require_archive();
228388
228854
  var import_hashes = require_hashes();
@@ -228391,7 +228857,7 @@ var require_collect_deployment_files = __commonJS({
228391
228857
  debug4(
228392
228858
  `Error: 'path' is expected to be a string or an array. Received ${typeof path20}`
228393
228859
  );
228394
- throw new import_errors48.DeploymentError({
228860
+ throw new import_errors49.DeploymentError({
228395
228861
  code: "missing_path",
228396
228862
  message: "Path not provided"
228397
228863
  });
@@ -228403,15 +228869,15 @@ var require_collect_deployment_files = __commonJS({
228403
228869
  clientOptions.isDirectory = isDirectory;
228404
228870
  if (Array.isArray(path20)) {
228405
228871
  for (const filePath of path20) {
228406
- if (!(0, import_path33.isAbsolute)(filePath)) {
228407
- throw new import_errors48.DeploymentError({
228872
+ if (!(0, import_path34.isAbsolute)(filePath)) {
228873
+ throw new import_errors49.DeploymentError({
228408
228874
  code: "invalid_path",
228409
228875
  message: `Provided path ${filePath} is not absolute`
228410
228876
  });
228411
228877
  }
228412
228878
  }
228413
- } else if (!(0, import_path33.isAbsolute)(path20)) {
228414
- throw new import_errors48.DeploymentError({
228879
+ } else if (!(0, import_path34.isAbsolute)(path20)) {
228880
+ throw new import_errors49.DeploymentError({
228415
228881
  code: "invalid_path",
228416
228882
  message: `Provided path ${path20} is not absolute`
228417
228883
  });
@@ -228434,9 +228900,9 @@ var require_collect_deployment_files = __commonJS({
228434
228900
  filesMap = clientOptions.archive === "tgz" ? await (0, import_archive.createTgzFiles)(workPath, fileList, debug4) : await (0, import_hashes.hashes)(fileList);
228435
228901
  } catch (err) {
228436
228902
  if (clientOptions.prebuilt && (0, import_error_utils.isErrnoException)(err) && err.code === "ENOENT" && err.path) {
228437
- const errPath = (0, import_path33.relative)(workPath, err.path);
228438
- err.message = `File does not exist: "${(0, import_path33.relative)(workPath, errPath)}"`;
228439
- if (errPath.split(import_path33.sep).includes("node_modules")) {
228903
+ const errPath = (0, import_path34.relative)(workPath, err.path);
228904
+ err.message = `File does not exist: "${(0, import_path34.relative)(workPath, errPath)}"`;
228905
+ if (errPath.split(import_path34.sep).includes("node_modules")) {
228440
228906
  err.message = `Please ensure project dependencies have been installed:
228441
228907
  ${err.message}`;
228442
228908
  }
@@ -228479,7 +228945,7 @@ var require_create_deployment = __commonJS({
228479
228945
  var import_deploy = require_deploy();
228480
228946
  var import_upload = require_upload();
228481
228947
  var import_utils68 = require_utils10();
228482
- var import_errors48 = require_errors3();
228948
+ var import_errors49 = require_errors3();
228483
228949
  var import_collect_deployment_files = require_collect_deployment_files();
228484
228950
  function buildCreateDeployment() {
228485
228951
  return async function* createDeployment2(clientOptions, deploymentOptions = {}) {
@@ -228491,7 +228957,7 @@ var require_create_deployment = __commonJS({
228491
228957
  debug4(
228492
228958
  `Error: 'token' is expected to be a string. Received ${typeof clientOptions.token}`
228493
228959
  );
228494
- throw new import_errors48.DeploymentError({
228960
+ throw new import_errors49.DeploymentError({
228495
228961
  code: "token_not_provided",
228496
228962
  message: "Options object must include a `token`"
228497
228963
  });
@@ -228499,7 +228965,7 @@ var require_create_deployment = __commonJS({
228499
228965
  if (clientOptions.manual) {
228500
228966
  debug4("Manual provisioning mode enabled");
228501
228967
  if (!clientOptions.prebuilt) {
228502
- throw new import_errors48.DeploymentError({
228968
+ throw new import_errors49.DeploymentError({
228503
228969
  code: "invalid_options",
228504
228970
  message: "The `manual` option requires `prebuilt` to be true"
228505
228971
  });
@@ -228581,23 +229047,23 @@ var require_continue = __commonJS({
228581
229047
  continueDeployment: () => continueDeployment2
228582
229048
  });
228583
229049
  module2.exports = __toCommonJS2(continue_exports);
228584
- var import_path33 = require("path");
229050
+ var import_path34 = require("path");
228585
229051
  var import_fs_extra = __toESM2(require_lib11());
228586
229052
  var import_check_deployment_status = require_check_deployment_status();
228587
229053
  var import_utils68 = require_utils10();
228588
229054
  var import_hashes = require_hashes();
228589
229055
  var import_ready_state = require_ready_state();
228590
229056
  var import_upload = require_upload();
228591
- var import_errors48 = require_errors3();
229057
+ var import_errors49 = require_errors3();
228592
229058
  var import_archive = require_archive();
228593
229059
  async function* continueDeployment2(options) {
228594
229060
  const debug4 = (0, import_utils68.createDebug)(options.debug);
228595
229061
  debug4(`Continuing deployment: ${options.deploymentId}`);
228596
- const outputDir = options.vercelOutputDir || (0, import_path33.join)(options.path, ".vercel", "output");
229062
+ const outputDir = options.vercelOutputDir || (0, import_path34.join)(options.path, ".vercel", "output");
228597
229063
  if (!await import_fs_extra.default.pathExists(outputDir)) {
228598
229064
  return yield {
228599
229065
  type: "error",
228600
- payload: new import_errors48.DeploymentError({
229066
+ payload: new import_errors49.DeploymentError({
228601
229067
  code: "output_dir_not_found",
228602
229068
  message: `Output directory not found at ${outputDir}. Run 'vercel build' first.`
228603
229069
  })
@@ -228608,7 +229074,7 @@ var require_continue = __commonJS({
228608
229074
  { isDirectory: true, prebuilt: true, vercelOutputDir: outputDir },
228609
229075
  debug4
228610
229076
  );
228611
- const provisionJsonPath = (0, import_path33.join)(outputDir, "provision.json");
229077
+ const provisionJsonPath = (0, import_path34.join)(outputDir, "provision.json");
228612
229078
  const unbundledFiles = fileList.filter((f8) => f8 === provisionJsonPath);
228613
229079
  let files;
228614
229080
  if (options.archive === "tgz") {
@@ -228696,7 +229162,7 @@ var require_continue = __commonJS({
228696
229162
  if (!deployment) {
228697
229163
  return yield {
228698
229164
  type: "error",
228699
- payload: new import_errors48.DeploymentError({
229165
+ payload: new import_errors49.DeploymentError({
228700
229166
  code: "continue_failed",
228701
229167
  message: "Failed to continue deployment after uploading files"
228702
229168
  })
@@ -228798,7 +229264,7 @@ var require_inspect_deployment_files = __commonJS({
228798
229264
  inspectDeploymentFiles: () => inspectDeploymentFiles2
228799
229265
  });
228800
229266
  module2.exports = __toCommonJS2(inspect_deployment_files_exports);
228801
- var import_path33 = require("path");
229267
+ var import_path34 = require("path");
228802
229268
  var import_collect_deployment_files = require_collect_deployment_files();
228803
229269
  var import_utils68 = require_utils10();
228804
229270
  async function inspectDeploymentFiles2(clientOptions) {
@@ -228810,8 +229276,8 @@ var require_inspect_deployment_files = __commonJS({
228810
229276
  for (const [sha, file] of filesMap) {
228811
229277
  const size2 = file.data?.byteLength || file.data?.length || 0;
228812
229278
  for (const name of file.names) {
228813
- const pathName = isDirectory ? (0, import_path33.relative)(workPath, name) : name.split(import_path33.sep).at(-1) || name;
228814
- const normalizedPath = pathName.split(import_path33.sep).join("/");
229279
+ const pathName = isDirectory ? (0, import_path34.relative)(workPath, name) : name.split(import_path34.sep).at(-1) || name;
229280
+ const normalizedPath = pathName.split(import_path34.sep).join("/");
228815
229281
  const deploymentFile = {
228816
229282
  path: normalizedPath,
228817
229283
  size: size2,
@@ -228927,12 +229393,12 @@ var require_dist14 = __commonJS({
228927
229393
  });
228928
229394
 
228929
229395
  // src/targets/vercel.ts
228930
- var import_path23, import_client6, targetSecrets4, ORG_ID_ENV_VAR, PROJECT_ID_ENV_VAR, DEFAULT_DEPLOY_ARCHIVE_REGEX3, VercelTarget;
229396
+ var import_path24, import_client6, targetSecrets4, ORG_ID_ENV_VAR, PROJECT_ID_ENV_VAR, DEFAULT_DEPLOY_ARCHIVE_REGEX3, VercelTarget;
228931
229397
  var init_vercel2 = __esm({
228932
229398
  "src/targets/vercel.ts"() {
228933
229399
  "use strict";
228934
229400
  init_import_meta_url();
228935
- import_path23 = require("path");
229401
+ import_path24 = require("path");
228936
229402
  import_client6 = __toESM(require_dist14());
228937
229403
  init_env2();
228938
229404
  init_errors2();
@@ -229020,7 +229486,7 @@ var init_vercel2 = __esm({
229020
229486
  token: this.vercelConfig.VERCEL_TOKEN,
229021
229487
  path: deployDir,
229022
229488
  prebuilt: this.vercelConfig.prebuilt,
229023
- vercelOutputDir: this.vercelConfig.prebuilt ? (0, import_path23.join)(deployDir, ".vercel", "output") : void 0,
229489
+ vercelOutputDir: this.vercelConfig.prebuilt ? (0, import_path24.join)(deployDir, ".vercel", "output") : void 0,
229024
229490
  teamId: this.vercelConfig.orgId,
229025
229491
  skipAutoDetectionConfirmation: true
229026
229492
  },
@@ -229071,7 +229537,7 @@ Details: ${JSON.stringify(
229071
229537
  async (directory) => {
229072
229538
  this.logger.info(`Extracting "${archivePath}" to "${directory}"...`);
229073
229539
  await extractZipArchive(archivePath, directory);
229074
- const deployDir = this.vercelConfig.workingDir ? (0, import_path23.join)(directory, this.vercelConfig.workingDir) : directory;
229540
+ const deployDir = this.vercelConfig.workingDir ? (0, import_path24.join)(directory, this.vercelConfig.workingDir) : directory;
229075
229541
  if (isDryRun()) {
229076
229542
  logDryRun(`@vercel/client createDeployment (${deployDir})`);
229077
229543
  return;
@@ -229125,6 +229591,7 @@ var init_targets = __esm({
229125
229591
  init_awsLambdaLayer();
229126
229592
  init_upm();
229127
229593
  init_maven();
229594
+ init_mcpRegistry();
229128
229595
  init_symbolCollector();
229129
229596
  init_pubDev();
229130
229597
  init_hex();
@@ -229149,6 +229616,7 @@ var init_targets = __esm({
229149
229616
  "aws-lambda-layer": AwsLambdaLayerTarget,
229150
229617
  upm: UpmTarget,
229151
229618
  maven: MavenTarget,
229619
+ "mcp-registry": McpRegistryTarget,
229152
229620
  "symbol-collector": SymbolCollector,
229153
229621
  "pub-dev": PubDevTarget,
229154
229622
  hex: HexTarget,
@@ -229218,11 +229686,11 @@ function getWorkspacePlaceholderResolver(workspaceName, workspaceDirectory) {
229218
229686
  if (packageName !== void 0) {
229219
229687
  return packageName;
229220
229688
  }
229221
- const packageJsonPath = import_path24.default.posix.join(workspaceName, "package.json");
229689
+ const packageJsonPath = import_path25.default.posix.join(workspaceName, "package.json");
229222
229690
  let name;
229223
229691
  try {
229224
229692
  name = JSON.parse(
229225
- (0, import_fs26.readFileSync)(import_path24.default.join(workspaceDirectory, packageJsonPath), "utf-8")
229693
+ (0, import_fs27.readFileSync)(import_path25.default.join(workspaceDirectory, packageJsonPath), "utf-8")
229226
229694
  )?.name;
229227
229695
  } catch (error3) {
229228
229696
  throw new ConfigurationError(
@@ -229242,7 +229710,7 @@ function getWorkspacePlaceholderResolver(workspaceName, workspaceDirectory) {
229242
229710
  case "workspace":
229243
229711
  return workspaceName;
229244
229712
  case "workspaceName":
229245
- return import_path24.default.posix.basename(workspaceName);
229713
+ return import_path25.default.posix.basename(workspaceName);
229246
229714
  case "packageName":
229247
229715
  return readPackageName(placeholder);
229248
229716
  case "packageSimpleName":
@@ -229250,21 +229718,21 @@ function getWorkspacePlaceholderResolver(workspaceName, workspaceDirectory) {
229250
229718
  }
229251
229719
  };
229252
229720
  }
229253
- function expandWorkspacePlaceholders(value, resolve10) {
229721
+ function expandWorkspacePlaceholders(value, resolve11) {
229254
229722
  if (typeof value === "string") {
229255
229723
  return value.replace(
229256
229724
  WORKSPACE_PLACEHOLDER_REGEX,
229257
- (_match, placeholder) => resolve10(placeholder)
229725
+ (_match, placeholder) => resolve11(placeholder)
229258
229726
  );
229259
229727
  }
229260
229728
  if (Array.isArray(value)) {
229261
- return value.map((item) => expandWorkspacePlaceholders(item, resolve10));
229729
+ return value.map((item) => expandWorkspacePlaceholders(item, resolve11));
229262
229730
  }
229263
229731
  if (value !== null && typeof value === "object" && Object.getPrototypeOf(value) === Object.prototype) {
229264
229732
  return Object.fromEntries(
229265
229733
  Object.entries(value).map(([key, item]) => [
229266
229734
  key,
229267
- expandWorkspacePlaceholders(item, resolve10)
229735
+ expandWorkspacePlaceholders(item, resolve11)
229268
229736
  ])
229269
229737
  );
229270
229738
  }
@@ -229316,8 +229784,8 @@ function getWorkspaceGlobMatches(workspaceGlob, workspaceDirectory) {
229316
229784
  `Workspace glob "${workspaceGlob}" must remain inside the repository root.`
229317
229785
  );
229318
229786
  }
229319
- const root = import_path24.default.resolve(workspaceDirectory);
229320
- const realRoot = (0, import_fs26.realpathSync)(root);
229787
+ const root = import_path25.default.resolve(workspaceDirectory);
229788
+ const realRoot = (0, import_fs27.realpathSync)(root);
229321
229789
  return globSync(workspaceGlob, {
229322
229790
  absolute: false,
229323
229791
  cwd: root,
@@ -229325,30 +229793,30 @@ function getWorkspaceGlobMatches(workspaceGlob, workspaceDirectory) {
229325
229793
  ignore: ["**/node_modules/**"],
229326
229794
  posix: true
229327
229795
  }).filter((match3) => {
229328
- const resolvedMatch = import_path24.default.resolve(root, match3);
229796
+ const resolvedMatch = import_path25.default.resolve(root, match3);
229329
229797
  let realMatch;
229330
229798
  try {
229331
- realMatch = (0, import_fs26.realpathSync)(resolvedMatch);
229799
+ realMatch = (0, import_fs27.realpathSync)(resolvedMatch);
229332
229800
  } catch (error3) {
229333
229801
  if (error3.code === "ENOENT") {
229334
229802
  return false;
229335
229803
  }
229336
229804
  throw error3;
229337
229805
  }
229338
- return isSafeWorkspacePath(match3) && (resolvedMatch === root || resolvedMatch.startsWith(`${root}${import_path24.default.sep}`)) && (realMatch === realRoot || realMatch.startsWith(`${realRoot}${import_path24.default.sep}`)) && (0, import_fs26.lstatSync)(resolvedMatch).isDirectory();
229806
+ return isSafeWorkspacePath(match3) && (resolvedMatch === root || resolvedMatch.startsWith(`${root}${import_path25.default.sep}`)) && (realMatch === realRoot || realMatch.startsWith(`${realRoot}${import_path25.default.sep}`)) && (0, import_fs27.lstatSync)(resolvedMatch).isDirectory();
229339
229807
  }).sort();
229340
229808
  }
229341
229809
  function isWorkspacePattern(name) {
229342
229810
  return hasMagic(name, { magicalBraces: true });
229343
229811
  }
229344
229812
  function isSafeWorkspacePath(name) {
229345
- return !import_path24.default.isAbsolute(name) && !name.includes("\\") && name.split("/").every(
229813
+ return !import_path25.default.isAbsolute(name) && !name.includes("\\") && name.split("/").every(
229346
229814
  (segment) => /^[A-Za-z0-9_.-]+$/.test(segment) && segment !== "" && segment !== "." && segment !== ".." && segment !== "__proto__" && !segment.startsWith("-")
229347
229815
  );
229348
229816
  }
229349
229817
  function isSafeWorkspaceGlob2(name) {
229350
229818
  const alternatives = expandBraceAlternatives2(name);
229351
- return !import_path24.default.isAbsolute(name) && !name.includes("\\") && alternatives !== void 0 && alternatives.length > 0 && alternatives.every(
229819
+ return !import_path25.default.isAbsolute(name) && !name.includes("\\") && alternatives !== void 0 && alternatives.length > 0 && alternatives.every(
229352
229820
  (expanded) => expanded.split("/").every(isSafeWorkspaceGlobSegment2)
229353
229821
  );
229354
229822
  }
@@ -229472,7 +229940,7 @@ function applyWorkspaceSelection(config, workspaceDirectory) {
229472
229940
  );
229473
229941
  }
229474
229942
  function findConfigFile() {
229475
- if (_configPathCache && (0, import_fs26.existsSync)(_configPathCache)) {
229943
+ if (_configPathCache && (0, import_fs27.existsSync)(_configPathCache)) {
229476
229944
  return _configPathCache;
229477
229945
  }
229478
229946
  _configPathCache = void 0;
@@ -229481,12 +229949,12 @@ function findConfigFile() {
229481
229949
  let depth = 0;
229482
229950
  let currentDir = cwd;
229483
229951
  while (depth <= MAX_DEPTH) {
229484
- const probePath = import_path24.default.join(currentDir, CONFIG_FILE_NAME);
229485
- if ((0, import_fs26.existsSync)(probePath) && (0, import_fs26.lstatSync)(probePath).isFile()) {
229952
+ const probePath = import_path25.default.join(currentDir, CONFIG_FILE_NAME);
229953
+ if ((0, import_fs27.existsSync)(probePath) && (0, import_fs27.lstatSync)(probePath).isFile()) {
229486
229954
  _configPathCache = probePath;
229487
229955
  return _configPathCache;
229488
229956
  }
229489
- const parentDir = import_path24.default.dirname(currentDir);
229957
+ const parentDir = import_path25.default.dirname(currentDir);
229490
229958
  if (currentDir === parentDir) {
229491
229959
  return void 0;
229492
229960
  }
@@ -229510,7 +229978,7 @@ function getConfigFileDir() {
229510
229978
  if (!configFilePath) {
229511
229979
  return void 0;
229512
229980
  }
229513
- return import_path24.default.dirname(configFilePath);
229981
+ return import_path25.default.dirname(configFilePath);
229514
229982
  }
229515
229983
  function formatIssues(issues, prefix = []) {
229516
229984
  return issues.flatMap((issue) => {
@@ -229540,10 +230008,10 @@ function getConfiguration(clearCache = false) {
229540
230008
  }
229541
230009
  const configPath = getConfigFilePath();
229542
230010
  logger.debug("Configuration file found: ", configPath);
229543
- const rawConfig = load((0, import_fs26.readFileSync)(configPath, "utf-8"));
230011
+ const rawConfig = load((0, import_fs27.readFileSync)(configPath, "utf-8"));
229544
230012
  const parsed = validateConfiguration(rawConfig);
229545
230013
  checkMinimalConfigVersion(parsed);
229546
- _configCache = applyWorkspaceSelection(parsed, import_path24.default.dirname(configPath));
230014
+ _configCache = applyWorkspaceSelection(parsed, import_path25.default.dirname(configPath));
229547
230015
  return _configCache;
229548
230016
  }
229549
230017
  function loadConfigurationFromString(configContent, workspaceDirectory = process.cwd()) {
@@ -229589,10 +230057,10 @@ function getUnownedPathsOwner() {
229589
230057
  }
229590
230058
  function loadUnselectedConfiguration() {
229591
230059
  const configPath = getConfigFilePath();
229592
- const rawConfig = load((0, import_fs26.readFileSync)(configPath, "utf-8"));
230060
+ const rawConfig = load((0, import_fs27.readFileSync)(configPath, "utf-8"));
229593
230061
  const config = validateConfiguration(rawConfig);
229594
230062
  checkMinimalConfigVersion(config);
229595
- return { config, directory: import_path24.default.dirname(configPath) };
230063
+ return { config, directory: import_path25.default.dirname(configPath) };
229596
230064
  }
229597
230065
  function checkMinimalConfigVersion(config) {
229598
230066
  const minVersionRaw = config.minVersion;
@@ -229743,13 +230211,13 @@ function getActiveWorkspaceDirectory() {
229743
230211
  throw new ConfigurationError(`Invalid workspace path: "${workspace}"`);
229744
230212
  }
229745
230213
  const root = getConfigFileDir() || process.cwd();
229746
- const directory = import_path24.default.resolve(root, workspace);
229747
- if (!(0, import_fs26.existsSync)(directory) || !(0, import_fs26.lstatSync)(directory).isDirectory()) {
230214
+ const directory = import_path25.default.resolve(root, workspace);
230215
+ if (!(0, import_fs27.existsSync)(directory) || !(0, import_fs27.lstatSync)(directory).isDirectory()) {
229748
230216
  return void 0;
229749
230217
  }
229750
- const realRoot = (0, import_fs26.realpathSync)(root);
229751
- const realDirectory = (0, import_fs26.realpathSync)(directory);
229752
- if (!realDirectory.startsWith(`${realRoot}${import_path24.default.sep}`)) {
230218
+ const realRoot = (0, import_fs27.realpathSync)(root);
230219
+ const realDirectory = (0, import_fs27.realpathSync)(directory);
230220
+ if (!realDirectory.startsWith(`${realRoot}${import_path25.default.sep}`)) {
229753
230221
  throw new ConfigurationError(
229754
230222
  `Workspace directory escapes the repository: "${workspace}"`
229755
230223
  );
@@ -229759,11 +230227,11 @@ function getActiveWorkspaceDirectory() {
229759
230227
  function getReleaseUnitDir() {
229760
230228
  const root = getConfigFileDir() || process.cwd();
229761
230229
  const workspaceDirectory = getActiveWorkspaceDirectory();
229762
- return workspaceDirectory ? import_path24.default.resolve(root, workspaceDirectory) : root;
230230
+ return workspaceDirectory ? import_path25.default.resolve(root, workspaceDirectory) : root;
229763
230231
  }
229764
230232
  function getDefaultChangelogFilePath() {
229765
230233
  const workspaceDirectory = getActiveWorkspaceDirectory();
229766
- return workspaceDirectory ? import_path24.default.posix.join(workspaceDirectory, DEFAULT_CHANGELOG_FILE_PATH) : DEFAULT_CHANGELOG_FILE_PATH;
230234
+ return workspaceDirectory ? import_path25.default.posix.join(workspaceDirectory, DEFAULT_CHANGELOG_FILE_PATH) : DEFAULT_CHANGELOG_FILE_PATH;
229767
230235
  }
229768
230236
  function getChangelogConfig() {
229769
230237
  const config = getConfiguration();
@@ -229854,13 +230322,13 @@ async function expandWorkspaceTargets(targets) {
229854
230322
  }
229855
230323
  return expandedTargets;
229856
230324
  }
229857
- var import_fs26, import_path24, import_git_url_parse, CONFIG_FILE_NAME, DEFAULT_RELEASE_BRANCH_NAME, _configPathCache, _configCache, WORKSPACES_MIN_VERSION, _activeWorkspaceName, WORKSPACE_PLACEHOLDERS, WORKSPACE_PLACEHOLDER_REGEX, AUTO_VERSION_MIN_VERSION, _globalGitHubConfigCache, DEFAULT_CHANGELOG_FILE_PATH;
230325
+ var import_fs27, import_path25, import_git_url_parse, CONFIG_FILE_NAME, DEFAULT_RELEASE_BRANCH_NAME, _configPathCache, _configCache, WORKSPACES_MIN_VERSION, _activeWorkspaceName, WORKSPACE_PLACEHOLDERS, WORKSPACE_PLACEHOLDER_REGEX, AUTO_VERSION_MIN_VERSION, _globalGitHubConfigCache, DEFAULT_CHANGELOG_FILE_PATH;
229858
230326
  var init_config2 = __esm({
229859
230327
  "src/config.ts"() {
229860
230328
  "use strict";
229861
230329
  init_import_meta_url();
229862
- import_fs26 = require("fs");
229863
- import_path24 = __toESM(require("path"));
230330
+ import_fs27 = require("fs");
230331
+ import_path25 = __toESM(require("path"));
229864
230332
  init_esm13();
229865
230333
  init_js_yaml();
229866
230334
  import_git_url_parse = __toESM(require_lib5());
@@ -229898,7 +230366,7 @@ var require_package7 = __commonJS({
229898
230366
  "package.json"(exports2, module2) {
229899
230367
  module2.exports = {
229900
230368
  name: "@sentry/craft",
229901
- version: "3.4.1",
230369
+ version: "3.6.0",
229902
230370
  description: "The universal sentry workflow CLI",
229903
230371
  main: "dist/craft",
229904
230372
  repository: "https://github.com/getsentry/craft",
@@ -230105,7 +230573,7 @@ function getPackage() {
230105
230573
  }
230106
230574
  function getPackageVersion3() {
230107
230575
  const { version: version2 } = getPackage();
230108
- const buildInfo = "90e8e203ad86c8ab8ee134e8d387def13e620e81";
230576
+ const buildInfo = "5a97c9fdb9182ed0aef66f36accbbf022e7bfbb5";
230109
230577
  return buildInfo ? `${version2} (${buildInfo})` : version2;
230110
230578
  }
230111
230579
  function semVerToString(s8) {
@@ -231118,11 +231586,11 @@ var require_valid = __commonJS({
231118
231586
  "use strict";
231119
231587
  init_import_meta_url();
231120
231588
  var parse15 = require_parse5();
231121
- var valid = (version2, options) => {
231589
+ var valid2 = (version2, options) => {
231122
231590
  const v12 = parse15(version2, options);
231123
231591
  return v12 ? v12.version : null;
231124
231592
  };
231125
- module2.exports = valid;
231593
+ module2.exports = valid2;
231126
231594
  }
231127
231595
  });
231128
231596
 
@@ -231333,8 +231801,8 @@ var require_gt = __commonJS({
231333
231801
  "use strict";
231334
231802
  init_import_meta_url();
231335
231803
  var compare = require_compare();
231336
- var gt3 = (a5, b9, loose) => compare(a5, b9, loose) > 0;
231337
- module2.exports = gt3;
231804
+ var gt4 = (a5, b9, loose) => compare(a5, b9, loose) > 0;
231805
+ module2.exports = gt4;
231338
231806
  }
231339
231807
  });
231340
231808
 
@@ -231400,7 +231868,7 @@ var require_cmp = __commonJS({
231400
231868
  init_import_meta_url();
231401
231869
  var eq = require_eq();
231402
231870
  var neq = require_neq();
231403
- var gt3 = require_gt();
231871
+ var gt4 = require_gt();
231404
231872
  var gte2 = require_gte();
231405
231873
  var lt4 = require_lt();
231406
231874
  var lte2 = require_lte();
@@ -231429,7 +231897,7 @@ var require_cmp = __commonJS({
231429
231897
  case "!=":
231430
231898
  return neq(a5, b9, loose);
231431
231899
  case ">":
231432
- return gt3(a5, b9, loose);
231900
+ return gt4(a5, b9, loose);
231433
231901
  case ">=":
231434
231902
  return gte2(a5, b9, loose);
231435
231903
  case "<":
@@ -232118,7 +232586,7 @@ var require_min_version = __commonJS({
232118
232586
  init_import_meta_url();
232119
232587
  var SemVer5 = require_semver();
232120
232588
  var Range = require_range2();
232121
- var gt3 = require_gt();
232589
+ var gt4 = require_gt();
232122
232590
  var minVersion = (range3, loose) => {
232123
232591
  range3 = new Range(range3, loose);
232124
232592
  let minver = new SemVer5("0.0.0");
@@ -232146,7 +232614,7 @@ var require_min_version = __commonJS({
232146
232614
  /* fallthrough */
232147
232615
  case "":
232148
232616
  case ">=":
232149
- if (!setMin || gt3(compver, setMin)) {
232617
+ if (!setMin || gt4(compver, setMin)) {
232150
232618
  setMin = compver;
232151
232619
  }
232152
232620
  break;
@@ -232158,7 +232626,7 @@ var require_min_version = __commonJS({
232158
232626
  throw new Error(`Unexpected operation: ${comparator.operator}`);
232159
232627
  }
232160
232628
  });
232161
- if (setMin && (!minver || gt3(minver, setMin))) {
232629
+ if (setMin && (!minver || gt4(minver, setMin))) {
232162
232630
  minver = setMin;
232163
232631
  }
232164
232632
  }
@@ -232198,7 +232666,7 @@ var require_outside = __commonJS({
232198
232666
  var { ANY } = Comparator;
232199
232667
  var Range = require_range2();
232200
232668
  var satisfies2 = require_satisfies();
232201
- var gt3 = require_gt();
232669
+ var gt4 = require_gt();
232202
232670
  var lt4 = require_lt();
232203
232671
  var lte2 = require_lte();
232204
232672
  var gte2 = require_gte();
@@ -232208,7 +232676,7 @@ var require_outside = __commonJS({
232208
232676
  let gtfn, ltefn, ltfn, comp, ecomp;
232209
232677
  switch (hilo) {
232210
232678
  case ">":
232211
- gtfn = gt3;
232679
+ gtfn = gt4;
232212
232680
  ltefn = lte2;
232213
232681
  ltfn = lt4;
232214
232682
  comp = ">";
@@ -232217,7 +232685,7 @@ var require_outside = __commonJS({
232217
232685
  case "<":
232218
232686
  gtfn = lt4;
232219
232687
  ltefn = gte2;
232220
- ltfn = gt3;
232688
+ ltfn = gt4;
232221
232689
  comp = "<";
232222
232690
  ecomp = "<=";
232223
232691
  break;
@@ -232400,10 +232868,10 @@ var require_subset = __commonJS({
232400
232868
  }
232401
232869
  }
232402
232870
  const eqSet = /* @__PURE__ */ new Set();
232403
- let gt3, lt4;
232871
+ let gt4, lt4;
232404
232872
  for (const c7 of sub) {
232405
232873
  if (c7.operator === ">" || c7.operator === ">=") {
232406
- gt3 = higherGT(gt3, c7, options);
232874
+ gt4 = higherGT(gt4, c7, options);
232407
232875
  } else if (c7.operator === "<" || c7.operator === "<=") {
232408
232876
  lt4 = lowerLT(lt4, c7, options);
232409
232877
  } else {
@@ -232414,16 +232882,16 @@ var require_subset = __commonJS({
232414
232882
  return null;
232415
232883
  }
232416
232884
  let gtltComp;
232417
- if (gt3 && lt4) {
232418
- gtltComp = compare(gt3.semver, lt4.semver, options);
232885
+ if (gt4 && lt4) {
232886
+ gtltComp = compare(gt4.semver, lt4.semver, options);
232419
232887
  if (gtltComp > 0) {
232420
232888
  return null;
232421
- } else if (gtltComp === 0 && (gt3.operator !== ">=" || lt4.operator !== "<=")) {
232889
+ } else if (gtltComp === 0 && (gt4.operator !== ">=" || lt4.operator !== "<=")) {
232422
232890
  return null;
232423
232891
  }
232424
232892
  }
232425
232893
  for (const eq of eqSet) {
232426
- if (gt3 && !satisfies2(eq, String(gt3), options)) {
232894
+ if (gt4 && !satisfies2(eq, String(gt4), options)) {
232427
232895
  return null;
232428
232896
  }
232429
232897
  if (lt4 && !satisfies2(eq, String(lt4), options)) {
@@ -232439,25 +232907,25 @@ var require_subset = __commonJS({
232439
232907
  let higher, lower;
232440
232908
  let hasDomLT, hasDomGT;
232441
232909
  let needDomLTPre = lt4 && !options.includePrerelease && lt4.semver.prerelease.length ? lt4.semver : false;
232442
- let needDomGTPre = gt3 && !options.includePrerelease && gt3.semver.prerelease.length ? gt3.semver : false;
232910
+ let needDomGTPre = gt4 && !options.includePrerelease && gt4.semver.prerelease.length ? gt4.semver : false;
232443
232911
  if (needDomLTPre && needDomLTPre.prerelease.length === 1 && lt4.operator === "<" && needDomLTPre.prerelease[0] === 0) {
232444
232912
  needDomLTPre = false;
232445
232913
  }
232446
232914
  for (const c7 of dom) {
232447
232915
  hasDomGT = hasDomGT || c7.operator === ">" || c7.operator === ">=";
232448
232916
  hasDomLT = hasDomLT || c7.operator === "<" || c7.operator === "<=";
232449
- if (gt3) {
232917
+ if (gt4) {
232450
232918
  if (needDomGTPre) {
232451
232919
  if (c7.semver.prerelease && c7.semver.prerelease.length && c7.semver.major === needDomGTPre.major && c7.semver.minor === needDomGTPre.minor && c7.semver.patch === needDomGTPre.patch) {
232452
232920
  needDomGTPre = false;
232453
232921
  }
232454
232922
  }
232455
232923
  if (c7.operator === ">" || c7.operator === ">=") {
232456
- higher = higherGT(gt3, c7, options);
232457
- if (higher === c7 && higher !== gt3) {
232924
+ higher = higherGT(gt4, c7, options);
232925
+ if (higher === c7 && higher !== gt4) {
232458
232926
  return false;
232459
232927
  }
232460
- } else if (gt3.operator === ">=" && !satisfies2(gt3.semver, String(c7), options)) {
232928
+ } else if (gt4.operator === ">=" && !satisfies2(gt4.semver, String(c7), options)) {
232461
232929
  return false;
232462
232930
  }
232463
232931
  }
@@ -232476,14 +232944,14 @@ var require_subset = __commonJS({
232476
232944
  return false;
232477
232945
  }
232478
232946
  }
232479
- if (!c7.operator && (lt4 || gt3) && gtltComp !== 0) {
232947
+ if (!c7.operator && (lt4 || gt4) && gtltComp !== 0) {
232480
232948
  return false;
232481
232949
  }
232482
232950
  }
232483
- if (gt3 && hasDomLT && !lt4 && gtltComp !== 0) {
232951
+ if (gt4 && hasDomLT && !lt4 && gtltComp !== 0) {
232484
232952
  return false;
232485
232953
  }
232486
- if (lt4 && hasDomGT && !gt3 && gtltComp !== 0) {
232954
+ if (lt4 && hasDomGT && !gt4 && gtltComp !== 0) {
232487
232955
  return false;
232488
232956
  }
232489
232957
  if (needDomGTPre || needDomLTPre) {
@@ -232519,7 +232987,7 @@ var require_semver2 = __commonJS({
232519
232987
  var SemVer5 = require_semver();
232520
232988
  var identifiers = require_identifiers();
232521
232989
  var parse15 = require_parse5();
232522
- var valid = require_valid();
232990
+ var valid2 = require_valid();
232523
232991
  var clean = require_clean();
232524
232992
  var inc3 = require_inc();
232525
232993
  var diff = require_diff();
@@ -232533,7 +233001,7 @@ var require_semver2 = __commonJS({
232533
233001
  var compareBuild = require_compare_build();
232534
233002
  var sort = require_sort();
232535
233003
  var rsort = require_rsort();
232536
- var gt3 = require_gt();
233004
+ var gt4 = require_gt();
232537
233005
  var lt4 = require_lt();
232538
233006
  var eq = require_eq();
232539
233007
  var neq = require_neq();
@@ -232557,7 +233025,7 @@ var require_semver2 = __commonJS({
232557
233025
  var subset = require_subset();
232558
233026
  module2.exports = {
232559
233027
  parse: parse15,
232560
- valid,
233028
+ valid: valid2,
232561
233029
  clean,
232562
233030
  inc: inc3,
232563
233031
  diff,
@@ -232571,7 +233039,7 @@ var require_semver2 = __commonJS({
232571
233039
  compareBuild,
232572
233040
  sort,
232573
233041
  rsort,
232574
- gt: gt3,
233042
+ gt: gt4,
232575
233043
  lt: lt4,
232576
233044
  eq,
232577
233045
  neq,
@@ -232692,7 +233160,7 @@ var require_path_arg = __commonJS({
232692
233160
  "node_modules/.pnpm/mkdirp@1.0.4/node_modules/mkdirp/lib/path-arg.js"(exports2, module2) {
232693
233161
  init_import_meta_url();
232694
233162
  var platform4 = process.env.__TESTING_MKDIRP_PLATFORM__ || process.platform;
232695
- var { resolve: resolve10, parse: parse15 } = require("path");
233163
+ var { resolve: resolve11, parse: parse15 } = require("path");
232696
233164
  var pathArg = (path20) => {
232697
233165
  if (/\0/.test(path20)) {
232698
233166
  throw Object.assign(
@@ -232703,7 +233171,7 @@ var require_path_arg = __commonJS({
232703
233171
  }
232704
233172
  );
232705
233173
  }
232706
- path20 = resolve10(path20);
233174
+ path20 = resolve11(path20);
232707
233175
  if (platform4 === "win32") {
232708
233176
  const badWinChars = /[*|"<>?:]/;
232709
233177
  const { root } = parse15(path20);
@@ -233702,30 +234170,30 @@ function ui2(opts) {
233702
234170
 
233703
234171
  // node_modules/.pnpm/escalade@3.2.0/node_modules/escalade/sync/index.mjs
233704
234172
  init_import_meta_url();
233705
- var import_path25 = require("path");
233706
- var import_fs27 = require("fs");
234173
+ var import_path26 = require("path");
234174
+ var import_fs28 = require("fs");
233707
234175
  function sync_default(start, callback) {
233708
- let dir = (0, import_path25.resolve)(".", start);
233709
- let tmp2, stats = (0, import_fs27.statSync)(dir);
234176
+ let dir = (0, import_path26.resolve)(".", start);
234177
+ let tmp2, stats = (0, import_fs28.statSync)(dir);
233710
234178
  if (!stats.isDirectory()) {
233711
- dir = (0, import_path25.dirname)(dir);
234179
+ dir = (0, import_path26.dirname)(dir);
233712
234180
  }
233713
234181
  while (true) {
233714
- tmp2 = callback(dir, (0, import_fs27.readdirSync)(dir));
233715
- if (tmp2) return (0, import_path25.resolve)(dir, tmp2);
233716
- dir = (0, import_path25.dirname)(tmp2 = dir);
234182
+ tmp2 = callback(dir, (0, import_fs28.readdirSync)(dir));
234183
+ if (tmp2) return (0, import_path26.resolve)(dir, tmp2);
234184
+ dir = (0, import_path26.dirname)(tmp2 = dir);
233717
234185
  if (tmp2 === dir) break;
233718
234186
  }
233719
234187
  }
233720
234188
 
233721
234189
  // node_modules/.pnpm/yargs@18.0.0/node_modules/yargs/lib/platform-shims/esm.mjs
233722
- var import_util25 = require("util");
234190
+ var import_util26 = require("util");
233723
234191
  var import_url12 = require("url");
233724
234192
 
233725
234193
  // node_modules/.pnpm/yargs-parser@22.0.0/node_modules/yargs-parser/build/lib/index.js
233726
234194
  init_import_meta_url();
233727
- var import_util23 = require("util");
233728
- var import_path26 = require("path");
234195
+ var import_util24 = require("util");
234196
+ var import_path27 = require("path");
233729
234197
 
233730
234198
  // node_modules/.pnpm/yargs-parser@22.0.0/node_modules/yargs-parser/build/lib/string-utils.js
233731
234199
  init_import_meta_url();
@@ -234669,7 +235137,7 @@ function stripQuotes(val) {
234669
235137
  }
234670
235138
 
234671
235139
  // node_modules/.pnpm/yargs-parser@22.0.0/node_modules/yargs-parser/build/lib/index.js
234672
- var import_fs28 = require("fs");
235140
+ var import_fs29 = require("fs");
234673
235141
  var import_node_module4 = require("node:module");
234674
235142
  var _a5;
234675
235143
  var _b;
@@ -234689,14 +235157,14 @@ var parser = new YargsParser({
234689
235157
  env: () => {
234690
235158
  return env2;
234691
235159
  },
234692
- format: import_util23.format,
234693
- normalize: import_path26.normalize,
234694
- resolve: import_path26.resolve,
235160
+ format: import_util24.format,
235161
+ normalize: import_path27.normalize,
235162
+ resolve: import_path27.resolve,
234695
235163
  require: (path20) => {
234696
235164
  if (typeof require2 !== "undefined") {
234697
235165
  return require2(path20);
234698
235166
  } else if (path20.match(/\.json$/)) {
234699
- return JSON.parse((0, import_fs28.readFileSync)(path20, "utf8"));
235167
+ return JSON.parse((0, import_fs29.readFileSync)(path20, "utf8"));
234700
235168
  } else {
234701
235169
  throw Error("only .json config files are supported in ESM");
234702
235170
  }
@@ -234715,7 +235183,7 @@ yargsParser.looksLikeNumber = looksLikeNumber;
234715
235183
  var lib_default = yargsParser;
234716
235184
 
234717
235185
  // node_modules/.pnpm/yargs@18.0.0/node_modules/yargs/lib/platform-shims/esm.mjs
234718
- var import_path28 = require("path");
235186
+ var import_path29 = require("path");
234719
235187
 
234720
235188
  // node_modules/.pnpm/yargs@18.0.0/node_modules/yargs/build/lib/utils/process-argv.js
234721
235189
  init_import_meta_url();
@@ -234739,19 +235207,19 @@ init_import_meta_url();
234739
235207
 
234740
235208
  // node_modules/.pnpm/y18n@5.0.8/node_modules/y18n/build/lib/platform-shims/node.js
234741
235209
  init_import_meta_url();
234742
- var import_fs29 = require("fs");
234743
- var import_util24 = require("util");
234744
- var import_path27 = require("path");
235210
+ var import_fs30 = require("fs");
235211
+ var import_util25 = require("util");
235212
+ var import_path28 = require("path");
234745
235213
  var node_default = {
234746
235214
  fs: {
234747
- readFileSync: import_fs29.readFileSync,
234748
- writeFile: import_fs29.writeFile
235215
+ readFileSync: import_fs30.readFileSync,
235216
+ writeFile: import_fs30.writeFile
234749
235217
  },
234750
- format: import_util24.format,
234751
- resolve: import_path27.resolve,
235218
+ format: import_util25.format,
235219
+ resolve: import_path28.resolve,
234752
235220
  exists: (file) => {
234753
235221
  try {
234754
- return (0, import_fs29.statSync)(file).isFile();
235222
+ return (0, import_fs30.statSync)(file).isFile();
234755
235223
  } catch (err) {
234756
235224
  return false;
234757
235225
  }
@@ -234943,17 +235411,17 @@ var esm_default = {
234943
235411
  getEnv: (key) => {
234944
235412
  return process.env[key];
234945
235413
  },
234946
- inspect: import_util25.inspect,
235414
+ inspect: import_util26.inspect,
234947
235415
  getProcessArgvBin,
234948
235416
  mainFilename: mainFilename || process.cwd(),
234949
235417
  Parser: lib_default,
234950
235418
  path: {
234951
- basename: import_path28.basename,
234952
- dirname: import_path28.dirname,
234953
- extname: import_path28.extname,
234954
- relative: import_path28.relative,
234955
- resolve: import_path28.resolve,
234956
- join: import_path28.join
235419
+ basename: import_path29.basename,
235420
+ dirname: import_path29.dirname,
235421
+ extname: import_path29.extname,
235422
+ relative: import_path29.relative,
235423
+ resolve: import_path29.resolve,
235424
+ join: import_path29.join
234957
235425
  },
234958
235426
  process: {
234959
235427
  argv: () => process.argv,
@@ -234975,7 +235443,7 @@ var esm_default = {
234975
235443
  },
234976
235444
  stringWidth,
234977
235445
  y18n: y18n_default({
234978
- directory: (0, import_path28.resolve)(__dirname2, "../../../locales"),
235446
+ directory: (0, import_path29.resolve)(__dirname2, "../../../locales"),
234979
235447
  updateFiles: false
234980
235448
  })
234981
235449
  };
@@ -237276,12 +237744,12 @@ var YargsInstance = class {
237276
237744
  async getCompletion(args, done) {
237277
237745
  argsert("<array> [function]", [args, done], arguments.length);
237278
237746
  if (!done) {
237279
- return new Promise((resolve10, reject) => {
237747
+ return new Promise((resolve11, reject) => {
237280
237748
  __classPrivateFieldGet6(this, _YargsInstance_completion, "f").getCompletion(args, (err, completions) => {
237281
237749
  if (err)
237282
237750
  reject(err);
237283
237751
  else
237284
- resolve10(completions);
237752
+ resolve11(completions);
237285
237753
  });
237286
237754
  });
237287
237755
  } else {
@@ -238347,8 +238815,8 @@ __export(prepare_exports, {
238347
238815
  runPreReleaseCommand: () => runPreReleaseCommand
238348
238816
  });
238349
238817
  init_import_meta_url();
238350
- var import_fs31 = require("fs");
238351
- var import_path31 = require("path");
238818
+ var import_fs32 = require("fs");
238819
+ var import_path32 = require("path");
238352
238820
  var shellQuote2 = __toESM(require_shell_quote());
238353
238821
  init_dryRun();
238354
238822
  init_config2();
@@ -238474,11 +238942,37 @@ init_version8();
238474
238942
 
238475
238943
  // src/utils/versionBump.ts
238476
238944
  init_import_meta_url();
238945
+ var semver2 = __toESM(require_semver2());
238477
238946
  init_targets();
238478
238947
  init_logger2();
238479
238948
  function hasVersionBump(targetClass) {
238480
238949
  return typeof targetClass === "function" && "bumpVersion" in targetClass && typeof targetClass.bumpVersion === "function";
238481
238950
  }
238951
+ function hasReadVersion(targetClass) {
238952
+ return typeof targetClass === "function" && "readVersion" in targetClass && typeof targetClass.readVersion === "function";
238953
+ }
238954
+ async function readProjectVersion(targets, rootDir) {
238955
+ const targetNames = new Set(targets.map((target) => target.name));
238956
+ for (const targetName of targetNames) {
238957
+ const targetClass = TARGET_MAP[targetName];
238958
+ if (!hasReadVersion(targetClass)) {
238959
+ continue;
238960
+ }
238961
+ const version2 = await targetClass.readVersion(rootDir);
238962
+ if (version2 && semver2.valid(version2) && semver2.gt(version2, "0.0.0")) {
238963
+ logger.info(
238964
+ `No previous release tag found, using version ${version2} read by the "${targetName}" target`
238965
+ );
238966
+ return version2;
238967
+ }
238968
+ if (version2) {
238969
+ logger.debug(
238970
+ `Ignoring version "${version2}" read by "${targetName}" target`
238971
+ );
238972
+ }
238973
+ }
238974
+ return void 0;
238975
+ }
238482
238976
  async function runAutomaticVersionBumps(targets, rootDir, newVersion) {
238483
238977
  const processedTargetTypes = /* @__PURE__ */ new Set();
238484
238978
  let anyBumped = false;
@@ -238540,9 +239034,9 @@ __export(publish_exports, {
238540
239034
  });
238541
239035
  init_import_meta_url();
238542
239036
  var import_chalk = __toESM(require_source());
238543
- var import_fs30 = require("fs");
239037
+ var import_fs31 = require("fs");
238544
239038
  init_dryRun();
238545
- var import_path30 = require("path");
239039
+ var import_path31 = require("path");
238546
239040
  var shellQuote = __toESM(require_shell_quote());
238547
239041
  var import_string_length = __toESM(require_string_length());
238548
239042
  init_config2();
@@ -238564,14 +239058,14 @@ init_tracing2();
238564
239058
  init_import_meta_url();
238565
239059
  var import_crypto7 = require("crypto");
238566
239060
  var import_os4 = require("os");
238567
- var import_path29 = require("path");
239061
+ var import_path30 = require("path");
238568
239062
  var STATE_DIR_NAME = "craft";
238569
239063
  function getCraftStateDir() {
238570
239064
  const xdgStateHome = process.env.XDG_STATE_HOME;
238571
239065
  if (xdgStateHome && xdgStateHome.length > 0) {
238572
- return (0, import_path29.join)(xdgStateHome, STATE_DIR_NAME);
239066
+ return (0, import_path30.join)(xdgStateHome, STATE_DIR_NAME);
238573
239067
  }
238574
- return (0, import_path29.join)((0, import_os4.homedir)(), ".local", "state", STATE_DIR_NAME);
239068
+ return (0, import_path30.join)((0, import_os4.homedir)(), ".local", "state", STATE_DIR_NAME);
238575
239069
  }
238576
239070
  function sanitiseForFilename(raw) {
238577
239071
  return raw.toLowerCase().replace(/[^a-z0-9._-]+/g, "_").replace(/^_+|_+$/g, "");
@@ -238595,14 +239089,14 @@ function getPublishStateFilename(version2, githubConfig, cwd = process.cwd(), wo
238595
239089
  return `publish-state-${cwdDigest}-${workspacePrefix}${safeVersion}.json`;
238596
239090
  }
238597
239091
  function getPublishStatePath(version2, githubConfig, cwd = process.cwd(), workspace) {
238598
- return (0, import_path29.join)(
239092
+ return (0, import_path30.join)(
238599
239093
  getCraftStateDir(),
238600
239094
  getPublishStateFilename(version2, githubConfig, cwd, workspace)
238601
239095
  );
238602
239096
  }
238603
239097
 
238604
239098
  // src/commands/publish.ts
238605
- var DEFAULT_POST_RELEASE_SCRIPT_PATH = (0, import_path30.join)("scripts", "post-release.sh");
239099
+ var DEFAULT_POST_RELEASE_SCRIPT_PATH = (0, import_path31.join)("scripts", "post-release.sh");
238606
239100
  var command2 = ["publish NEW-VERSION"];
238607
239101
  var aliases = ["pp", "publish"];
238608
239102
  var description = "\u{1F6EB} Publish artifacts";
@@ -239073,16 +239567,16 @@ Original error: ${err instanceof Error ? err.message : String(err)}`;
239073
239567
  logger.info(`Looking for publish state file for ${newVersion}...`);
239074
239568
  logger.debug(`Publish state file path: ${publishStateFile}`);
239075
239569
  const legacyStateFile = `.craft-publish-${newVersion}.json`;
239076
- if ((0, import_fs30.existsSync)(legacyStateFile)) {
239570
+ if ((0, import_fs31.existsSync)(legacyStateFile)) {
239077
239571
  logger.warn(
239078
239572
  `Found legacy publish state file at "${legacyStateFile}" in the project directory. This file is no longer read for security reasons. Craft now stores publish state at "${publishStateFile}". If you were pre-seeding published targets, update your workflow to write to the new location.`
239079
239573
  );
239080
239574
  }
239081
- const earlierStateExists = (0, import_fs30.existsSync)(publishStateFile);
239575
+ const earlierStateExists = (0, import_fs31.existsSync)(publishStateFile);
239082
239576
  let publishState;
239083
239577
  if (earlierStateExists) {
239084
239578
  logger.info(`Found publish state file, resuming from there...`);
239085
- publishState = JSON.parse((0, import_fs30.readFileSync)(publishStateFile).toString());
239579
+ publishState = JSON.parse((0, import_fs31.readFileSync)(publishStateFile).toString());
239086
239580
  targetsToPublish = new Set(targetConfigList.map(BaseTarget.getId));
239087
239581
  } else {
239088
239582
  publishState = { published: /* @__PURE__ */ Object.create(null) };
@@ -239110,7 +239604,7 @@ Original error: ${err instanceof Error ? err.message : String(err)}`;
239110
239604
  await promptConfirmation();
239111
239605
  await withTempDir(async (downloadDirectory) => {
239112
239606
  artifactProvider.setDownloadDirectory(downloadDirectory);
239113
- (0, import_fs30.mkdirSync)((0, import_path30.dirname)(publishStateFile), { recursive: true });
239607
+ (0, import_fs31.mkdirSync)((0, import_path31.dirname)(publishStateFile), { recursive: true });
239114
239608
  for (const target of targetList) {
239115
239609
  await publishToTarget(target, newVersion, revision);
239116
239610
  publishState.published[BaseTarget.getId(target.config)] = true;
@@ -239281,7 +239775,7 @@ async function handler3() {
239281
239775
  var command4 = ["prepare [NEW-VERSION]"];
239282
239776
  var aliases2 = ["p", "prerelease", "prepublish", "prepare", "release"];
239283
239777
  var description3 = "\u{1F6A2} Prepare a new release branch";
239284
- var DEFAULT_BUMP_VERSION_PATH = (0, import_path31.join)("scripts", "bump-version.sh");
239778
+ var DEFAULT_BUMP_VERSION_PATH = (0, import_path32.join)("scripts", "bump-version.sh");
239285
239779
  var AUTO_VERSION_MIN_VERSION2 = "2.14.0";
239286
239780
  var AUTO_BUMP_MIN_VERSION = "2.21.0";
239287
239781
  var builder2 = (yargs) => yargs.positional("NEW-VERSION", {
@@ -239528,12 +240022,12 @@ async function prepareChangelog(git, oldVersion, newVersion, changelogPolicy = "
239528
240022
  }
239529
240023
  logger.info("Checking the changelog...");
239530
240024
  logger.debug(`Changelog policy: "${changelogPolicy}".`);
239531
- const relativePath = (0, import_path31.relative)("", changelogPath);
240025
+ const relativePath = (0, import_path32.relative)("", changelogPath);
239532
240026
  logger.debug(`Changelog path: ${relativePath}`);
239533
240027
  if (relativePath.startsWith(".")) {
239534
240028
  throw new ConfigurationError(`Invalid changelog path: "${changelogPath}"`);
239535
240029
  }
239536
- if (!(0, import_fs31.existsSync)(relativePath)) {
240030
+ if (!(0, import_fs32.existsSync)(relativePath)) {
239537
240031
  if (changelogPolicy === "auto" /* Auto */) {
239538
240032
  logger.info(`Creating changelog file: ${relativePath}`);
239539
240033
  await safeFs.writeFile(relativePath, "# Changelog\n");
@@ -239543,7 +240037,7 @@ async function prepareChangelog(git, oldVersion, newVersion, changelogPolicy = "
239543
240037
  );
239544
240038
  }
239545
240039
  }
239546
- let changelogString = (await import_fs31.promises.readFile(relativePath)).toString();
240040
+ let changelogString = (await import_fs32.promises.readFile(relativePath)).toString();
239547
240041
  let changeset = findChangeset(
239548
240042
  changelogString,
239549
240043
  newVersion,
@@ -239666,7 +240160,7 @@ async function resolveVersion(git, options) {
239666
240160
  } else {
239667
240161
  bumpType = version2;
239668
240162
  }
239669
- const currentVersion = latestTag && getVersion(latestTag) || "0.0.0";
240163
+ const currentVersion = latestTag && getVersion(latestTag) || await readProjectVersion(config.targets || [], getReleaseUnitDir()) || "0.0.0";
239670
240164
  const newVersion = calculateNextVersion(currentVersion, bumpType);
239671
240165
  logger.info(
239672
240166
  `Version bump: ${currentVersion} -> ${newVersion} (${bumpType} bump)`
@@ -239733,7 +240227,7 @@ async function prepareMain(argv) {
239733
240227
  changelogPath
239734
240228
  );
239735
240229
  if (changelogBody) {
239736
- const resolvedChangelogPath = (0, import_path31.relative)("", changelogPath);
240230
+ const resolvedChangelogPath = (0, import_path32.relative)("", changelogPath);
239737
240231
  await git.add(resolvedChangelogPath);
239738
240232
  }
239739
240233
  const preReleaseCommandRan = await runPreReleaseCommand({
@@ -239847,8 +240341,8 @@ init_import_meta_url();
239847
240341
  init_logger2();
239848
240342
  init_config2();
239849
240343
  init_errors2();
239850
- var import_path32 = require("path");
239851
- var import_fs32 = require("fs");
240344
+ var import_path33 = require("path");
240345
+ var import_fs33 = require("fs");
239852
240346
  init_none();
239853
240347
  var mkdirp = require_mkdirp2();
239854
240348
  var command6 = ["download [NAME..]"];
@@ -239870,9 +240364,9 @@ var builder3 = (yargs) => yargs.positional("NAME", {
239870
240364
  });
239871
240365
  async function prepareOutputDirectory(argv) {
239872
240366
  if (argv.directory) {
239873
- const fullPath = (0, import_path32.resolve)(argv.directory);
239874
- if ((0, import_fs32.existsSync)(fullPath)) {
239875
- if ((0, import_fs32.lstatSync)(fullPath).isDirectory()) {
240367
+ const fullPath = (0, import_path33.resolve)(argv.directory);
240368
+ if ((0, import_fs33.existsSync)(fullPath)) {
240369
+ if ((0, import_fs33.lstatSync)(fullPath).isDirectory()) {
239876
240370
  return fullPath;
239877
240371
  } else {
239878
240372
  throw new ConfigurationError(`Not a directory: ${fullPath}`);
@@ -239883,7 +240377,7 @@ async function prepareOutputDirectory(argv) {
239883
240377
  return fullPath;
239884
240378
  }
239885
240379
  } else {
239886
- return (0, import_path32.resolve)(process.cwd());
240380
+ return (0, import_path33.resolve)(process.cwd());
239887
240381
  }
239888
240382
  }
239889
240383
  async function handlerMain(argv) {