wrangler 3.78.2 → 3.78.4

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.
@@ -36280,9 +36280,9 @@ var require_websocket_server = __commonJS({
36280
36280
  handleUpgrade(req, socket, head, cb) {
36281
36281
  socket.on("error", socketOnError);
36282
36282
  const key = req.headers["sec-websocket-key"] !== void 0 ? req.headers["sec-websocket-key"].trim() : false;
36283
- const version3 = +req.headers["sec-websocket-version"];
36283
+ const version4 = +req.headers["sec-websocket-version"];
36284
36284
  const extensions = {};
36285
- if (req.method !== "GET" || req.headers.upgrade.toLowerCase() !== "websocket" || !key || !keyRegex.test(key) || version3 !== 8 && version3 !== 13 || !this.shouldHandle(req)) {
36285
+ if (req.method !== "GET" || req.headers.upgrade.toLowerCase() !== "websocket" || !key || !keyRegex.test(key) || version4 !== 8 && version4 !== 13 || !this.shouldHandle(req)) {
36286
36286
  return abortHandshake(socket, 400);
36287
36287
  }
36288
36288
  if (this.options.perMessageDeflate) {
@@ -36303,7 +36303,7 @@ var require_websocket_server = __commonJS({
36303
36303
  }
36304
36304
  if (this.options.verifyClient) {
36305
36305
  const info = {
36306
- origin: req.headers[`${version3 === 8 ? "sec-websocket-origin" : "origin"}`],
36306
+ origin: req.headers[`${version4 === 8 ? "sec-websocket-origin" : "origin"}`],
36307
36307
  secure: !!(req.socket.authorized || req.socket.encrypted),
36308
36308
  req
36309
36309
  };
@@ -38591,7 +38591,7 @@ var require_backend = __commonJS({
38591
38591
  }
38592
38592
  __name(dangerous_setTargetConsoleForTesting, "dangerous_setTargetConsoleForTesting");
38593
38593
  function registerRenderer(renderer, onErrorOrWarning) {
38594
- var currentDispatcherRef = renderer.currentDispatcherRef, getCurrentFiber = renderer.getCurrentFiber, findFiberByHostInstance = renderer.findFiberByHostInstance, version3 = renderer.version;
38594
+ var currentDispatcherRef = renderer.currentDispatcherRef, getCurrentFiber = renderer.getCurrentFiber, findFiberByHostInstance = renderer.findFiberByHostInstance, version4 = renderer.version;
38595
38595
  if (typeof findFiberByHostInstance !== "function") {
38596
38596
  return;
38597
38597
  }
@@ -38599,7 +38599,7 @@ var require_backend = __commonJS({
38599
38599
  var _getInternalReactCons = Object(_renderer__WEBPACK_IMPORTED_MODULE_1__[
38600
38600
  /* getInternalReactConstants */
38601
38601
  "b"
38602
- ])(version3), ReactTypeOfWork = _getInternalReactCons.ReactTypeOfWork;
38602
+ ])(version4), ReactTypeOfWork = _getInternalReactCons.ReactTypeOfWork;
38603
38603
  injectedRenderers.set(renderer, {
38604
38604
  currentDispatcherRef,
38605
38605
  getCurrentFiber,
@@ -38919,76 +38919,76 @@ var require_backend = __commonJS({
38919
38919
  }
38920
38920
  }
38921
38921
  exports3.parse = parse7;
38922
- function parse7(version3, options29) {
38922
+ function parse7(version4, options29) {
38923
38923
  if (!options29 || _typeof7(options29) !== "object") {
38924
38924
  options29 = {
38925
38925
  loose: !!options29,
38926
38926
  includePrerelease: false
38927
38927
  };
38928
38928
  }
38929
- if (version3 instanceof SemVer) {
38930
- return version3;
38929
+ if (version4 instanceof SemVer) {
38930
+ return version4;
38931
38931
  }
38932
- if (typeof version3 !== "string") {
38932
+ if (typeof version4 !== "string") {
38933
38933
  return null;
38934
38934
  }
38935
- if (version3.length > MAX_LENGTH) {
38935
+ if (version4.length > MAX_LENGTH) {
38936
38936
  return null;
38937
38937
  }
38938
38938
  var r3 = options29.loose ? re[t3.LOOSE] : re[t3.FULL];
38939
- if (!r3.test(version3)) {
38939
+ if (!r3.test(version4)) {
38940
38940
  return null;
38941
38941
  }
38942
38942
  try {
38943
- return new SemVer(version3, options29);
38943
+ return new SemVer(version4, options29);
38944
38944
  } catch (er) {
38945
38945
  return null;
38946
38946
  }
38947
38947
  }
38948
38948
  __name(parse7, "parse");
38949
38949
  exports3.valid = valid;
38950
- function valid(version3, options29) {
38951
- var v2 = parse7(version3, options29);
38950
+ function valid(version4, options29) {
38951
+ var v2 = parse7(version4, options29);
38952
38952
  return v2 ? v2.version : null;
38953
38953
  }
38954
38954
  __name(valid, "valid");
38955
38955
  exports3.clean = clean;
38956
- function clean(version3, options29) {
38957
- var s = parse7(version3.trim().replace(/^[=v]+/, ""), options29);
38956
+ function clean(version4, options29) {
38957
+ var s = parse7(version4.trim().replace(/^[=v]+/, ""), options29);
38958
38958
  return s ? s.version : null;
38959
38959
  }
38960
38960
  __name(clean, "clean");
38961
38961
  exports3.SemVer = SemVer;
38962
- function SemVer(version3, options29) {
38962
+ function SemVer(version4, options29) {
38963
38963
  if (!options29 || _typeof7(options29) !== "object") {
38964
38964
  options29 = {
38965
38965
  loose: !!options29,
38966
38966
  includePrerelease: false
38967
38967
  };
38968
38968
  }
38969
- if (version3 instanceof SemVer) {
38970
- if (version3.loose === options29.loose) {
38971
- return version3;
38969
+ if (version4 instanceof SemVer) {
38970
+ if (version4.loose === options29.loose) {
38971
+ return version4;
38972
38972
  } else {
38973
- version3 = version3.version;
38973
+ version4 = version4.version;
38974
38974
  }
38975
- } else if (typeof version3 !== "string") {
38976
- throw new TypeError("Invalid Version: " + version3);
38975
+ } else if (typeof version4 !== "string") {
38976
+ throw new TypeError("Invalid Version: " + version4);
38977
38977
  }
38978
- if (version3.length > MAX_LENGTH) {
38978
+ if (version4.length > MAX_LENGTH) {
38979
38979
  throw new TypeError("version is longer than " + MAX_LENGTH + " characters");
38980
38980
  }
38981
38981
  if (!(this instanceof SemVer)) {
38982
- return new SemVer(version3, options29);
38982
+ return new SemVer(version4, options29);
38983
38983
  }
38984
- debug("SemVer", version3, options29);
38984
+ debug("SemVer", version4, options29);
38985
38985
  this.options = options29;
38986
38986
  this.loose = !!options29.loose;
38987
- var m2 = version3.trim().match(options29.loose ? re[t3.LOOSE] : re[t3.FULL]);
38987
+ var m2 = version4.trim().match(options29.loose ? re[t3.LOOSE] : re[t3.FULL]);
38988
38988
  if (!m2) {
38989
- throw new TypeError("Invalid Version: " + version3);
38989
+ throw new TypeError("Invalid Version: " + version4);
38990
38990
  }
38991
- this.raw = version3;
38991
+ this.raw = version4;
38992
38992
  this.major = +m2[1];
38993
38993
  this.minor = +m2[2];
38994
38994
  this.patch = +m2[3];
@@ -39172,13 +39172,13 @@ var require_backend = __commonJS({
39172
39172
  return this;
39173
39173
  };
39174
39174
  exports3.inc = inc;
39175
- function inc(version3, release2, loose, identifier) {
39175
+ function inc(version4, release2, loose, identifier) {
39176
39176
  if (typeof loose === "string") {
39177
39177
  identifier = loose;
39178
39178
  loose = void 0;
39179
39179
  }
39180
39180
  try {
39181
- return new SemVer(version3, loose).inc(release2, identifier).version;
39181
+ return new SemVer(version4, loose).inc(release2, identifier).version;
39182
39182
  } catch (er) {
39183
39183
  return null;
39184
39184
  }
@@ -39389,19 +39389,19 @@ var require_backend = __commonJS({
39389
39389
  Comparator.prototype.toString = function() {
39390
39390
  return this.value;
39391
39391
  };
39392
- Comparator.prototype.test = function(version3) {
39393
- debug("Comparator.test", version3, this.options.loose);
39394
- if (this.semver === ANY || version3 === ANY) {
39392
+ Comparator.prototype.test = function(version4) {
39393
+ debug("Comparator.test", version4, this.options.loose);
39394
+ if (this.semver === ANY || version4 === ANY) {
39395
39395
  return true;
39396
39396
  }
39397
- if (typeof version3 === "string") {
39397
+ if (typeof version4 === "string") {
39398
39398
  try {
39399
- version3 = new SemVer(version3, this.options);
39399
+ version4 = new SemVer(version4, this.options);
39400
39400
  } catch (er) {
39401
39401
  return false;
39402
39402
  }
39403
39403
  }
39404
- return cmp(version3, this.operator, this.semver, this.options);
39404
+ return cmp(version4, this.operator, this.semver, this.options);
39405
39405
  };
39406
39406
  Comparator.prototype.intersects = function(comp, options29) {
39407
39407
  if (!(comp instanceof Comparator)) {
@@ -39725,31 +39725,31 @@ var require_backend = __commonJS({
39725
39725
  return (from + " " + to).trim();
39726
39726
  }
39727
39727
  __name(hyphenReplace, "hyphenReplace");
39728
- Range.prototype.test = function(version3) {
39729
- if (!version3) {
39728
+ Range.prototype.test = function(version4) {
39729
+ if (!version4) {
39730
39730
  return false;
39731
39731
  }
39732
- if (typeof version3 === "string") {
39732
+ if (typeof version4 === "string") {
39733
39733
  try {
39734
- version3 = new SemVer(version3, this.options);
39734
+ version4 = new SemVer(version4, this.options);
39735
39735
  } catch (er) {
39736
39736
  return false;
39737
39737
  }
39738
39738
  }
39739
39739
  for (var i2 = 0; i2 < this.set.length; i2++) {
39740
- if (testSet(this.set[i2], version3, this.options)) {
39740
+ if (testSet(this.set[i2], version4, this.options)) {
39741
39741
  return true;
39742
39742
  }
39743
39743
  }
39744
39744
  return false;
39745
39745
  };
39746
- function testSet(set, version3, options29) {
39746
+ function testSet(set, version4, options29) {
39747
39747
  for (var i2 = 0; i2 < set.length; i2++) {
39748
- if (!set[i2].test(version3)) {
39748
+ if (!set[i2].test(version4)) {
39749
39749
  return false;
39750
39750
  }
39751
39751
  }
39752
- if (version3.prerelease.length && !options29.includePrerelease) {
39752
+ if (version4.prerelease.length && !options29.includePrerelease) {
39753
39753
  for (i2 = 0; i2 < set.length; i2++) {
39754
39754
  debug(set[i2].semver);
39755
39755
  if (set[i2].semver === ANY) {
@@ -39757,7 +39757,7 @@ var require_backend = __commonJS({
39757
39757
  }
39758
39758
  if (set[i2].semver.prerelease.length > 0) {
39759
39759
  var allowed = set[i2].semver;
39760
- if (allowed.major === version3.major && allowed.minor === version3.minor && allowed.patch === version3.patch) {
39760
+ if (allowed.major === version4.major && allowed.minor === version4.minor && allowed.patch === version4.patch) {
39761
39761
  return true;
39762
39762
  }
39763
39763
  }
@@ -39768,13 +39768,13 @@ var require_backend = __commonJS({
39768
39768
  }
39769
39769
  __name(testSet, "testSet");
39770
39770
  exports3.satisfies = satisfies;
39771
- function satisfies(version3, range, options29) {
39771
+ function satisfies(version4, range, options29) {
39772
39772
  try {
39773
39773
  range = new Range(range, options29);
39774
39774
  } catch (er) {
39775
39775
  return false;
39776
39776
  }
39777
- return range.test(version3);
39777
+ return range.test(version4);
39778
39778
  }
39779
39779
  __name(satisfies, "satisfies");
39780
39780
  exports3.maxSatisfying = maxSatisfying;
@@ -39871,18 +39871,18 @@ var require_backend = __commonJS({
39871
39871
  }
39872
39872
  __name(validRange, "validRange");
39873
39873
  exports3.ltr = ltr;
39874
- function ltr(version3, range, options29) {
39875
- return outside(version3, range, "<", options29);
39874
+ function ltr(version4, range, options29) {
39875
+ return outside(version4, range, "<", options29);
39876
39876
  }
39877
39877
  __name(ltr, "ltr");
39878
39878
  exports3.gtr = gtr;
39879
- function gtr(version3, range, options29) {
39880
- return outside(version3, range, ">", options29);
39879
+ function gtr(version4, range, options29) {
39880
+ return outside(version4, range, ">", options29);
39881
39881
  }
39882
39882
  __name(gtr, "gtr");
39883
39883
  exports3.outside = outside;
39884
- function outside(version3, range, hilo, options29) {
39885
- version3 = new SemVer(version3, options29);
39884
+ function outside(version4, range, hilo, options29) {
39885
+ version4 = new SemVer(version4, options29);
39886
39886
  range = new Range(range, options29);
39887
39887
  var gtfn, ltefn, ltfn, comp, ecomp;
39888
39888
  switch (hilo) {
@@ -39903,7 +39903,7 @@ var require_backend = __commonJS({
39903
39903
  default:
39904
39904
  throw new TypeError('Must provide a hilo val of "<" or ">"');
39905
39905
  }
39906
- if (satisfies(version3, range, options29)) {
39906
+ if (satisfies(version4, range, options29)) {
39907
39907
  return false;
39908
39908
  }
39909
39909
  for (var i2 = 0; i2 < range.set.length; ++i2) {
@@ -39925,9 +39925,9 @@ var require_backend = __commonJS({
39925
39925
  if (high.operator === comp || high.operator === ecomp) {
39926
39926
  return false;
39927
39927
  }
39928
- if ((!low.operator || low.operator === comp) && ltefn(version3, low.semver)) {
39928
+ if ((!low.operator || low.operator === comp) && ltefn(version4, low.semver)) {
39929
39929
  return false;
39930
- } else if (low.operator === ecomp && ltfn(version3, low.semver)) {
39930
+ } else if (low.operator === ecomp && ltfn(version4, low.semver)) {
39931
39931
  return false;
39932
39932
  }
39933
39933
  }
@@ -39935,8 +39935,8 @@ var require_backend = __commonJS({
39935
39935
  }
39936
39936
  __name(outside, "outside");
39937
39937
  exports3.prerelease = prerelease;
39938
- function prerelease(version3, options29) {
39939
- var parsed = parse7(version3, options29);
39938
+ function prerelease(version4, options29) {
39939
+ var parsed = parse7(version4, options29);
39940
39940
  return parsed && parsed.prerelease.length ? parsed.prerelease : null;
39941
39941
  }
39942
39942
  __name(prerelease, "prerelease");
@@ -39948,23 +39948,23 @@ var require_backend = __commonJS({
39948
39948
  }
39949
39949
  __name(intersects, "intersects");
39950
39950
  exports3.coerce = coerce2;
39951
- function coerce2(version3, options29) {
39952
- if (version3 instanceof SemVer) {
39953
- return version3;
39951
+ function coerce2(version4, options29) {
39952
+ if (version4 instanceof SemVer) {
39953
+ return version4;
39954
39954
  }
39955
- if (typeof version3 === "number") {
39956
- version3 = String(version3);
39955
+ if (typeof version4 === "number") {
39956
+ version4 = String(version4);
39957
39957
  }
39958
- if (typeof version3 !== "string") {
39958
+ if (typeof version4 !== "string") {
39959
39959
  return null;
39960
39960
  }
39961
39961
  options29 = options29 || {};
39962
39962
  var match = null;
39963
39963
  if (!options29.rtl) {
39964
- match = version3.match(re[t3.COERCE]);
39964
+ match = version4.match(re[t3.COERCE]);
39965
39965
  } else {
39966
39966
  var next;
39967
- while ((next = re[t3.COERCERTL].exec(version3)) && (!match || match.index + match[0].length !== version3.length)) {
39967
+ while ((next = re[t3.COERCERTL].exec(version4)) && (!match || match.index + match[0].length !== version4.length)) {
39968
39968
  if (!match || next.index + next[0].length !== match.index + match[0].length) {
39969
39969
  match = next;
39970
39970
  }
@@ -41302,7 +41302,7 @@ var require_backend = __commonJS({
41302
41302
  } : function() {
41303
41303
  return Date.now();
41304
41304
  };
41305
- function getInternalReactConstants(version3) {
41305
+ function getInternalReactConstants(version4) {
41306
41306
  var ReactTypeOfSideEffect = {
41307
41307
  DidCapture: 128,
41308
41308
  NoFlags: 0,
@@ -41319,7 +41319,7 @@ var require_backend = __commonJS({
41319
41319
  IdlePriority: 95,
41320
41320
  NoPriority: 90
41321
41321
  };
41322
- if (Object(semver2["gt"])(version3, "17.0.2")) {
41322
+ if (Object(semver2["gt"])(version4, "17.0.2")) {
41323
41323
  ReactPriorityLevels = {
41324
41324
  ImmediatePriority: 1,
41325
41325
  UserBlockingPriority: 2,
@@ -41330,15 +41330,15 @@ var require_backend = __commonJS({
41330
41330
  };
41331
41331
  }
41332
41332
  var StrictModeBits = 0;
41333
- if (Object(semver2["gte"])(version3, "18.0.0-alpha")) {
41333
+ if (Object(semver2["gte"])(version4, "18.0.0-alpha")) {
41334
41334
  StrictModeBits = 24;
41335
- } else if (Object(semver2["gte"])(version3, "16.9.0")) {
41335
+ } else if (Object(semver2["gte"])(version4, "16.9.0")) {
41336
41336
  StrictModeBits = 1;
41337
- } else if (Object(semver2["gte"])(version3, "16.3.0")) {
41337
+ } else if (Object(semver2["gte"])(version4, "16.3.0")) {
41338
41338
  StrictModeBits = 2;
41339
41339
  }
41340
41340
  var ReactTypeOfWork = null;
41341
- if (Object(semver2["gt"])(version3, "17.0.1")) {
41341
+ if (Object(semver2["gt"])(version4, "17.0.1")) {
41342
41342
  ReactTypeOfWork = {
41343
41343
  CacheComponent: 24,
41344
41344
  // Experimental
@@ -41376,7 +41376,7 @@ var require_backend = __commonJS({
41376
41376
  YieldComponent: -1
41377
41377
  // Removed
41378
41378
  };
41379
- } else if (Object(semver2["gte"])(version3, "17.0.0-alpha")) {
41379
+ } else if (Object(semver2["gte"])(version4, "17.0.0-alpha")) {
41380
41380
  ReactTypeOfWork = {
41381
41381
  CacheComponent: -1,
41382
41382
  // Doesn't exist yet
@@ -41414,7 +41414,7 @@ var require_backend = __commonJS({
41414
41414
  YieldComponent: -1
41415
41415
  // Removed
41416
41416
  };
41417
- } else if (Object(semver2["gte"])(version3, "16.6.0-beta.0")) {
41417
+ } else if (Object(semver2["gte"])(version4, "16.6.0-beta.0")) {
41418
41418
  ReactTypeOfWork = {
41419
41419
  CacheComponent: -1,
41420
41420
  // Doesn't exist yet
@@ -41452,7 +41452,7 @@ var require_backend = __commonJS({
41452
41452
  YieldComponent: -1
41453
41453
  // Removed
41454
41454
  };
41455
- } else if (Object(semver2["gte"])(version3, "16.4.3-alpha")) {
41455
+ } else if (Object(semver2["gte"])(version4, "16.4.3-alpha")) {
41456
41456
  ReactTypeOfWork = {
41457
41457
  CacheComponent: -1,
41458
41458
  // Doesn't exist yet
@@ -41705,8 +41705,8 @@ var require_backend = __commonJS({
41705
41705
  }
41706
41706
  __name(getInternalReactConstants, "getInternalReactConstants");
41707
41707
  function attach(hook, rendererID, renderer, global2) {
41708
- var version3 = renderer.reconcilerVersion || renderer.version;
41709
- var _getInternalReactCons = getInternalReactConstants(version3), getDisplayNameForFiber = _getInternalReactCons.getDisplayNameForFiber, getTypeSymbol = _getInternalReactCons.getTypeSymbol, ReactPriorityLevels = _getInternalReactCons.ReactPriorityLevels, ReactTypeOfWork = _getInternalReactCons.ReactTypeOfWork, ReactTypeOfSideEffect = _getInternalReactCons.ReactTypeOfSideEffect, StrictModeBits = _getInternalReactCons.StrictModeBits;
41708
+ var version4 = renderer.reconcilerVersion || renderer.version;
41709
+ var _getInternalReactCons = getInternalReactConstants(version4), getDisplayNameForFiber = _getInternalReactCons.getDisplayNameForFiber, getTypeSymbol = _getInternalReactCons.getTypeSymbol, ReactPriorityLevels = _getInternalReactCons.ReactPriorityLevels, ReactTypeOfWork = _getInternalReactCons.ReactTypeOfWork, ReactTypeOfSideEffect = _getInternalReactCons.ReactTypeOfSideEffect, StrictModeBits = _getInternalReactCons.StrictModeBits;
41710
41710
  var DidCapture = ReactTypeOfSideEffect.DidCapture, Hydrating = ReactTypeOfSideEffect.Hydrating, NoFlags = ReactTypeOfSideEffect.NoFlags, PerformedWork = ReactTypeOfSideEffect.PerformedWork, Placement = ReactTypeOfSideEffect.Placement;
41711
41711
  var CacheComponent = ReactTypeOfWork.CacheComponent, ClassComponent = ReactTypeOfWork.ClassComponent, ContextConsumer = ReactTypeOfWork.ContextConsumer, DehydratedSuspenseComponent = ReactTypeOfWork.DehydratedSuspenseComponent, ForwardRef = ReactTypeOfWork.ForwardRef, Fragment7 = ReactTypeOfWork.Fragment, FunctionComponent = ReactTypeOfWork.FunctionComponent, HostRoot = ReactTypeOfWork.HostRoot, HostPortal = ReactTypeOfWork.HostPortal, HostComponent = ReactTypeOfWork.HostComponent, HostText = ReactTypeOfWork.HostText, IncompleteClassComponent = ReactTypeOfWork.IncompleteClassComponent, IndeterminateComponent = ReactTypeOfWork.IndeterminateComponent, LegacyHiddenComponent = ReactTypeOfWork.LegacyHiddenComponent, MemoComponent = ReactTypeOfWork.MemoComponent, OffscreenComponent = ReactTypeOfWork.OffscreenComponent, SimpleMemoComponent = ReactTypeOfWork.SimpleMemoComponent, SuspenseComponent = ReactTypeOfWork.SuspenseComponent, SuspenseListComponent = ReactTypeOfWork.SuspenseListComponent;
41712
41712
  var ImmediatePriority = ReactPriorityLevels.ImmediatePriority, UserBlockingPriority = ReactPriorityLevels.UserBlockingPriority, NormalPriority = ReactPriorityLevels.NormalPriority, LowPriority = ReactPriorityLevels.LowPriority, IdlePriority = ReactPriorityLevels.IdlePriority, NoPriority = ReactPriorityLevels.NoPriority;
@@ -41726,7 +41726,7 @@ var require_backend = __commonJS({
41726
41726
  injectProfilingHooks(createProfilingHooks({
41727
41727
  getDisplayNameForFiber,
41728
41728
  getLaneLabelMap,
41729
- reactVersion: version3
41729
+ reactVersion: version4
41730
41730
  }));
41731
41731
  }
41732
41732
  var fibersWithChangedErrorOrWarningCounts = /* @__PURE__ */ new Set();
@@ -52075,10 +52075,10 @@ var require_supports_color = __commonJS({
52075
52075
  return 3;
52076
52076
  }
52077
52077
  if ("TERM_PROGRAM" in env7) {
52078
- const version3 = parseInt((env7.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
52078
+ const version4 = parseInt((env7.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
52079
52079
  switch (env7.TERM_PROGRAM) {
52080
52080
  case "iTerm.app":
52081
- return version3 >= 3 ? 3 : 2;
52081
+ return version4 >= 3 ? 3 : 2;
52082
52082
  case "Apple_Terminal":
52083
52083
  return 2;
52084
52084
  }
@@ -55033,10 +55033,10 @@ var require_supports_colors = __commonJS({
55033
55033
  return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env7.TEAMCITY_VERSION) ? 1 : 0;
55034
55034
  }
55035
55035
  if ("TERM_PROGRAM" in env7) {
55036
- var version3 = parseInt((env7.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
55036
+ var version4 = parseInt((env7.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
55037
55037
  switch (env7.TERM_PROGRAM) {
55038
55038
  case "iTerm.app":
55039
- return version3 >= 3 ? 3 : 2;
55039
+ return version4 >= 3 ? 3 : 2;
55040
55040
  case "Hyper":
55041
55041
  return 3;
55042
55042
  case "Apple_Terminal":
@@ -65787,8 +65787,8 @@ var require_async = __commonJS({
65787
65787
  cb(null, x2);
65788
65788
  }
65789
65789
  }, "maybeRealpath");
65790
- var defaultReadPackage = /* @__PURE__ */ __name(function defaultReadPackage2(readFile16, pkgfile, cb) {
65791
- readFile16(pkgfile, function(readFileErr, body) {
65790
+ var defaultReadPackage = /* @__PURE__ */ __name(function defaultReadPackage2(readFile17, pkgfile, cb) {
65791
+ readFile17(pkgfile, function(readFileErr, body) {
65792
65792
  if (readFileErr)
65793
65793
  cb(readFileErr);
65794
65794
  else {
@@ -65824,7 +65824,7 @@ var require_async = __commonJS({
65824
65824
  opts = normalizeOptions(x2, opts);
65825
65825
  var isFile = opts.isFile || defaultIsFile;
65826
65826
  var isDirectory2 = opts.isDirectory || defaultIsDir;
65827
- var readFile16 = opts.readFile || fs26.readFile;
65827
+ var readFile17 = opts.readFile || fs26.readFile;
65828
65828
  var realpath = opts.realpath || defaultRealpath;
65829
65829
  var readPackage = opts.readPackage || defaultReadPackage;
65830
65830
  if (opts.readFile && opts.readPackage) {
@@ -65971,7 +65971,7 @@ var require_async = __commonJS({
65971
65971
  isFile(pkgfile, function(err2, ex) {
65972
65972
  if (!ex)
65973
65973
  return loadpkg(path74.dirname(dir), cb2);
65974
- readPackage(readFile16, pkgfile, function(err3, pkgParam) {
65974
+ readPackage(readFile17, pkgfile, function(err3, pkgParam) {
65975
65975
  if (err3)
65976
65976
  cb2(err3);
65977
65977
  var pkg = pkgParam;
@@ -66000,7 +66000,7 @@ var require_async = __commonJS({
66000
66000
  return cb2(err2);
66001
66001
  if (!ex)
66002
66002
  return loadAsFile(path74.join(x3, "index"), fpkg, cb2);
66003
- readPackage(readFile16, pkgfile, function(err3, pkgParam) {
66003
+ readPackage(readFile17, pkgfile, function(err3, pkgParam) {
66004
66004
  if (err3)
66005
66005
  return cb2(err3);
66006
66006
  var pkg = pkgParam;
@@ -69320,10 +69320,10 @@ function _supportsColor2(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
69320
69320
  return 3;
69321
69321
  }
69322
69322
  if ("TERM_PROGRAM" in env4) {
69323
- const version3 = Number.parseInt((env4.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
69323
+ const version4 = Number.parseInt((env4.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
69324
69324
  switch (env4.TERM_PROGRAM) {
69325
69325
  case "iTerm.app":
69326
- return version3 >= 3 ? 3 : 2;
69326
+ return version4 >= 3 ? 3 : 2;
69327
69327
  case "Apple_Terminal":
69328
69328
  return 2;
69329
69329
  }
@@ -70250,7 +70250,7 @@ var require_update_check = __commonJS({
70250
70250
  var registryUrl = require_registry_url();
70251
70251
  var writeFile8 = promisify2(fs26.writeFile);
70252
70252
  var mkdir7 = promisify2(fs26.mkdir);
70253
- var readFile16 = promisify2(fs26.readFile);
70253
+ var readFile17 = promisify2(fs26.readFile);
70254
70254
  var compareVersions = /* @__PURE__ */ __name((a, b2) => a.localeCompare(b2, "en-US", { numeric: true }), "compareVersions");
70255
70255
  var encode = /* @__PURE__ */ __name((value) => encodeURIComponent(value).replace(/^%40/, "@"), "encode");
70256
70256
  var getFile = /* @__PURE__ */ __name(async (details, distTag) => {
@@ -70267,7 +70267,7 @@ var require_update_check = __commonJS({
70267
70267
  }, "getFile");
70268
70268
  var evaluateCache = /* @__PURE__ */ __name(async (file, time, interval) => {
70269
70269
  if (fs26.existsSync(file)) {
70270
- const content = await readFile16(file, "utf8");
70270
+ const content = await readFile17(file, "utf8");
70271
70271
  const { lastUpdate, latest } = JSON.parse(content);
70272
70272
  const nextCheck = lastUpdate + interval;
70273
70273
  if (nextCheck > time) {
@@ -70342,11 +70342,11 @@ var require_update_check = __commonJS({
70342
70342
  throw err;
70343
70343
  }
70344
70344
  }
70345
- const version3 = spec["dist-tags"][distTag];
70346
- if (!version3) {
70345
+ const version4 = spec["dist-tags"][distTag];
70346
+ if (!version4) {
70347
70347
  throw new Error(`Distribution tag ${distTag} is not available`);
70348
70348
  }
70349
- return version3;
70349
+ return version4;
70350
70350
  }, "getMostRecent");
70351
70351
  var defaultConfig = {
70352
70352
  interval: 36e5,
@@ -109745,31 +109745,31 @@ var require_semver = __commonJS({
109745
109745
  var parseOptions = require_parse_options();
109746
109746
  var { compareIdentifiers } = require_identifiers();
109747
109747
  var SemVer = class {
109748
- constructor(version3, options29) {
109748
+ constructor(version4, options29) {
109749
109749
  options29 = parseOptions(options29);
109750
- if (version3 instanceof SemVer) {
109751
- if (version3.loose === !!options29.loose && version3.includePrerelease === !!options29.includePrerelease) {
109752
- return version3;
109750
+ if (version4 instanceof SemVer) {
109751
+ if (version4.loose === !!options29.loose && version4.includePrerelease === !!options29.includePrerelease) {
109752
+ return version4;
109753
109753
  } else {
109754
- version3 = version3.version;
109754
+ version4 = version4.version;
109755
109755
  }
109756
- } else if (typeof version3 !== "string") {
109757
- throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version3}".`);
109756
+ } else if (typeof version4 !== "string") {
109757
+ throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version4}".`);
109758
109758
  }
109759
- if (version3.length > MAX_LENGTH) {
109759
+ if (version4.length > MAX_LENGTH) {
109760
109760
  throw new TypeError(
109761
109761
  `version is longer than ${MAX_LENGTH} characters`
109762
109762
  );
109763
109763
  }
109764
- debug("SemVer", version3, options29);
109764
+ debug("SemVer", version4, options29);
109765
109765
  this.options = options29;
109766
109766
  this.loose = !!options29.loose;
109767
109767
  this.includePrerelease = !!options29.includePrerelease;
109768
- const m2 = version3.trim().match(options29.loose ? re[t3.LOOSE] : re[t3.FULL]);
109768
+ const m2 = version4.trim().match(options29.loose ? re[t3.LOOSE] : re[t3.FULL]);
109769
109769
  if (!m2) {
109770
- throw new TypeError(`Invalid Version: ${version3}`);
109770
+ throw new TypeError(`Invalid Version: ${version4}`);
109771
109771
  }
109772
- this.raw = version3;
109772
+ this.raw = version4;
109773
109773
  this.major = +m2[1];
109774
109774
  this.minor = +m2[2];
109775
109775
  this.patch = +m2[3];
@@ -109984,12 +109984,12 @@ var require_parse6 = __commonJS({
109984
109984
  "../../node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/parse.js"(exports2, module3) {
109985
109985
  init_import_meta_url();
109986
109986
  var SemVer = require_semver();
109987
- var parse7 = /* @__PURE__ */ __name((version3, options29, throwErrors = false) => {
109988
- if (version3 instanceof SemVer) {
109989
- return version3;
109987
+ var parse7 = /* @__PURE__ */ __name((version4, options29, throwErrors = false) => {
109988
+ if (version4 instanceof SemVer) {
109989
+ return version4;
109990
109990
  }
109991
109991
  try {
109992
- return new SemVer(version3, options29);
109992
+ return new SemVer(version4, options29);
109993
109993
  } catch (er) {
109994
109994
  if (!throwErrors) {
109995
109995
  return null;
@@ -110006,8 +110006,8 @@ var require_valid = __commonJS({
110006
110006
  "../../node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/valid.js"(exports2, module3) {
110007
110007
  init_import_meta_url();
110008
110008
  var parse7 = require_parse6();
110009
- var valid = /* @__PURE__ */ __name((version3, options29) => {
110010
- const v2 = parse7(version3, options29);
110009
+ var valid = /* @__PURE__ */ __name((version4, options29) => {
110010
+ const v2 = parse7(version4, options29);
110011
110011
  return v2 ? v2.version : null;
110012
110012
  }, "valid");
110013
110013
  module3.exports = valid;
@@ -110019,8 +110019,8 @@ var require_clean = __commonJS({
110019
110019
  "../../node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/clean.js"(exports2, module3) {
110020
110020
  init_import_meta_url();
110021
110021
  var parse7 = require_parse6();
110022
- var clean = /* @__PURE__ */ __name((version3, options29) => {
110023
- const s = parse7(version3.trim().replace(/^[=v]+/, ""), options29);
110022
+ var clean = /* @__PURE__ */ __name((version4, options29) => {
110023
+ const s = parse7(version4.trim().replace(/^[=v]+/, ""), options29);
110024
110024
  return s ? s.version : null;
110025
110025
  }, "clean");
110026
110026
  module3.exports = clean;
@@ -110032,7 +110032,7 @@ var require_inc = __commonJS({
110032
110032
  "../../node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/inc.js"(exports2, module3) {
110033
110033
  init_import_meta_url();
110034
110034
  var SemVer = require_semver();
110035
- var inc = /* @__PURE__ */ __name((version3, release2, options29, identifier, identifierBase) => {
110035
+ var inc = /* @__PURE__ */ __name((version4, release2, options29, identifier, identifierBase) => {
110036
110036
  if (typeof options29 === "string") {
110037
110037
  identifierBase = identifier;
110038
110038
  identifier = options29;
@@ -110040,7 +110040,7 @@ var require_inc = __commonJS({
110040
110040
  }
110041
110041
  try {
110042
110042
  return new SemVer(
110043
- version3 instanceof SemVer ? version3.version : version3,
110043
+ version4 instanceof SemVer ? version4.version : version4,
110044
110044
  options29
110045
110045
  ).inc(release2, identifier, identifierBase).version;
110046
110046
  } catch (er) {
@@ -110131,8 +110131,8 @@ var require_prerelease = __commonJS({
110131
110131
  "../../node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/prerelease.js"(exports2, module3) {
110132
110132
  init_import_meta_url();
110133
110133
  var parse7 = require_parse6();
110134
- var prerelease = /* @__PURE__ */ __name((version3, options29) => {
110135
- const parsed = parse7(version3, options29);
110134
+ var prerelease = /* @__PURE__ */ __name((version4, options29) => {
110135
+ const parsed = parse7(version4, options29);
110136
110136
  return parsed && parsed.prerelease.length ? parsed.prerelease : null;
110137
110137
  }, "prerelease");
110138
110138
  module3.exports = prerelease;
@@ -110320,23 +110320,23 @@ var require_coerce = __commonJS({
110320
110320
  var SemVer = require_semver();
110321
110321
  var parse7 = require_parse6();
110322
110322
  var { safeRe: re, t: t3 } = require_re();
110323
- var coerce2 = /* @__PURE__ */ __name((version3, options29) => {
110324
- if (version3 instanceof SemVer) {
110325
- return version3;
110323
+ var coerce2 = /* @__PURE__ */ __name((version4, options29) => {
110324
+ if (version4 instanceof SemVer) {
110325
+ return version4;
110326
110326
  }
110327
- if (typeof version3 === "number") {
110328
- version3 = String(version3);
110327
+ if (typeof version4 === "number") {
110328
+ version4 = String(version4);
110329
110329
  }
110330
- if (typeof version3 !== "string") {
110330
+ if (typeof version4 !== "string") {
110331
110331
  return null;
110332
110332
  }
110333
110333
  options29 = options29 || {};
110334
110334
  let match = null;
110335
110335
  if (!options29.rtl) {
110336
- match = version3.match(re[t3.COERCE]);
110336
+ match = version4.match(re[t3.COERCE]);
110337
110337
  } else {
110338
110338
  let next;
110339
- while ((next = re[t3.COERCERTL].exec(version3)) && (!match || match.index + match[0].length !== version3.length)) {
110339
+ while ((next = re[t3.COERCERTL].exec(version4)) && (!match || match.index + match[0].length !== version4.length)) {
110340
110340
  if (!match || next.index + next[0].length !== match.index + match[0].length) {
110341
110341
  match = next;
110342
110342
  }
@@ -111122,19 +111122,19 @@ var require_range = __commonJS({
111122
111122
  });
111123
111123
  }
111124
111124
  // if ANY of the sets match ALL of its comparators, then pass
111125
- test(version3) {
111126
- if (!version3) {
111125
+ test(version4) {
111126
+ if (!version4) {
111127
111127
  return false;
111128
111128
  }
111129
- if (typeof version3 === "string") {
111129
+ if (typeof version4 === "string") {
111130
111130
  try {
111131
- version3 = new SemVer(version3, this.options);
111131
+ version4 = new SemVer(version4, this.options);
111132
111132
  } catch (er) {
111133
111133
  return false;
111134
111134
  }
111135
111135
  }
111136
111136
  for (let i = 0; i < this.set.length; i++) {
111137
- if (testSet(this.set[i], version3, this.options)) {
111137
+ if (testSet(this.set[i], version4, this.options)) {
111138
111138
  return true;
111139
111139
  }
111140
111140
  }
@@ -111349,13 +111349,13 @@ var require_range = __commonJS({
111349
111349
  }
111350
111350
  return `${from} ${to}`.trim();
111351
111351
  }, "hyphenReplace");
111352
- var testSet = /* @__PURE__ */ __name((set, version3, options29) => {
111352
+ var testSet = /* @__PURE__ */ __name((set, version4, options29) => {
111353
111353
  for (let i = 0; i < set.length; i++) {
111354
- if (!set[i].test(version3)) {
111354
+ if (!set[i].test(version4)) {
111355
111355
  return false;
111356
111356
  }
111357
111357
  }
111358
- if (version3.prerelease.length && !options29.includePrerelease) {
111358
+ if (version4.prerelease.length && !options29.includePrerelease) {
111359
111359
  for (let i = 0; i < set.length; i++) {
111360
111360
  debug(set[i].semver);
111361
111361
  if (set[i].semver === Comparator.ANY) {
@@ -111363,7 +111363,7 @@ var require_range = __commonJS({
111363
111363
  }
111364
111364
  if (set[i].semver.prerelease.length > 0) {
111365
111365
  const allowed = set[i].semver;
111366
- if (allowed.major === version3.major && allowed.minor === version3.minor && allowed.patch === version3.patch) {
111366
+ if (allowed.major === version4.major && allowed.minor === version4.minor && allowed.patch === version4.patch) {
111367
111367
  return true;
111368
111368
  }
111369
111369
  }
@@ -111424,19 +111424,19 @@ var require_comparator = __commonJS({
111424
111424
  toString() {
111425
111425
  return this.value;
111426
111426
  }
111427
- test(version3) {
111428
- debug("Comparator.test", version3, this.options.loose);
111429
- if (this.semver === ANY || version3 === ANY) {
111427
+ test(version4) {
111428
+ debug("Comparator.test", version4, this.options.loose);
111429
+ if (this.semver === ANY || version4 === ANY) {
111430
111430
  return true;
111431
111431
  }
111432
- if (typeof version3 === "string") {
111432
+ if (typeof version4 === "string") {
111433
111433
  try {
111434
- version3 = new SemVer(version3, this.options);
111434
+ version4 = new SemVer(version4, this.options);
111435
111435
  } catch (er) {
111436
111436
  return false;
111437
111437
  }
111438
111438
  }
111439
- return cmp(version3, this.operator, this.semver, this.options);
111439
+ return cmp(version4, this.operator, this.semver, this.options);
111440
111440
  }
111441
111441
  intersects(comp, options29) {
111442
111442
  if (!(comp instanceof Comparator)) {
@@ -111494,13 +111494,13 @@ var require_satisfies = __commonJS({
111494
111494
  "../../node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/satisfies.js"(exports2, module3) {
111495
111495
  init_import_meta_url();
111496
111496
  var Range = require_range();
111497
- var satisfies = /* @__PURE__ */ __name((version3, range, options29) => {
111497
+ var satisfies = /* @__PURE__ */ __name((version4, range, options29) => {
111498
111498
  try {
111499
111499
  range = new Range(range, options29);
111500
111500
  } catch (er) {
111501
111501
  return false;
111502
111502
  }
111503
- return range.test(version3);
111503
+ return range.test(version4);
111504
111504
  }, "satisfies");
111505
111505
  module3.exports = satisfies;
111506
111506
  }
@@ -111660,8 +111660,8 @@ var require_outside = __commonJS({
111660
111660
  var lt2 = require_lt();
111661
111661
  var lte = require_lte();
111662
111662
  var gte = require_gte();
111663
- var outside = /* @__PURE__ */ __name((version3, range, hilo, options29) => {
111664
- version3 = new SemVer(version3, options29);
111663
+ var outside = /* @__PURE__ */ __name((version4, range, hilo, options29) => {
111664
+ version4 = new SemVer(version4, options29);
111665
111665
  range = new Range(range, options29);
111666
111666
  let gtfn, ltefn, ltfn, comp, ecomp;
111667
111667
  switch (hilo) {
@@ -111682,7 +111682,7 @@ var require_outside = __commonJS({
111682
111682
  default:
111683
111683
  throw new TypeError('Must provide a hilo val of "<" or ">"');
111684
111684
  }
111685
- if (satisfies(version3, range, options29)) {
111685
+ if (satisfies(version4, range, options29)) {
111686
111686
  return false;
111687
111687
  }
111688
111688
  for (let i = 0; i < range.set.length; ++i) {
@@ -111704,9 +111704,9 @@ var require_outside = __commonJS({
111704
111704
  if (high.operator === comp || high.operator === ecomp) {
111705
111705
  return false;
111706
111706
  }
111707
- if ((!low.operator || low.operator === comp) && ltefn(version3, low.semver)) {
111707
+ if ((!low.operator || low.operator === comp) && ltefn(version4, low.semver)) {
111708
111708
  return false;
111709
- } else if (low.operator === ecomp && ltfn(version3, low.semver)) {
111709
+ } else if (low.operator === ecomp && ltfn(version4, low.semver)) {
111710
111710
  return false;
111711
111711
  }
111712
111712
  }
@@ -111721,7 +111721,7 @@ var require_gtr = __commonJS({
111721
111721
  "../../node_modules/.pnpm/semver@7.5.4/node_modules/semver/ranges/gtr.js"(exports2, module3) {
111722
111722
  init_import_meta_url();
111723
111723
  var outside = require_outside();
111724
- var gtr = /* @__PURE__ */ __name((version3, range, options29) => outside(version3, range, ">", options29), "gtr");
111724
+ var gtr = /* @__PURE__ */ __name((version4, range, options29) => outside(version4, range, ">", options29), "gtr");
111725
111725
  module3.exports = gtr;
111726
111726
  }
111727
111727
  });
@@ -111731,7 +111731,7 @@ var require_ltr = __commonJS({
111731
111731
  "../../node_modules/.pnpm/semver@7.5.4/node_modules/semver/ranges/ltr.js"(exports2, module3) {
111732
111732
  init_import_meta_url();
111733
111733
  var outside = require_outside();
111734
- var ltr = /* @__PURE__ */ __name((version3, range, options29) => outside(version3, range, "<", options29), "ltr");
111734
+ var ltr = /* @__PURE__ */ __name((version4, range, options29) => outside(version4, range, "<", options29), "ltr");
111735
111735
  module3.exports = ltr;
111736
111736
  }
111737
111737
  });
@@ -111761,12 +111761,12 @@ var require_simplify = __commonJS({
111761
111761
  let first = null;
111762
111762
  let prev = null;
111763
111763
  const v2 = versions.sort((a, b2) => compare(a, b2, options29));
111764
- for (const version3 of v2) {
111765
- const included = satisfies(version3, range, options29);
111764
+ for (const version4 of v2) {
111765
+ const included = satisfies(version4, range, options29);
111766
111766
  if (included) {
111767
- prev = version3;
111767
+ prev = version4;
111768
111768
  if (!first) {
111769
- first = version3;
111769
+ first = version4;
111770
111770
  }
111771
111771
  } else {
111772
111772
  if (prev) {
@@ -112137,16 +112137,16 @@ var require_builtins = __commonJS({
112137
112137
  wasi: ">=12.16.0",
112138
112138
  diagnostics_channel: "^14.17.0 || >=15.1.0"
112139
112139
  };
112140
- module3.exports = ({ version: version3 = process.version, experimental: experimental2 = false } = {}) => {
112140
+ module3.exports = ({ version: version4 = process.version, experimental: experimental2 = false } = {}) => {
112141
112141
  const builtins = [...permanentModules];
112142
112142
  for (const [name, semverRange] of Object.entries(versionLockedModules)) {
112143
- if (version3 === "*" || semver2.satisfies(version3, semverRange)) {
112143
+ if (version4 === "*" || semver2.satisfies(version4, semverRange)) {
112144
112144
  builtins.push(name);
112145
112145
  }
112146
112146
  }
112147
112147
  if (experimental2) {
112148
112148
  for (const [name, semverRange] of Object.entries(experimentalModules)) {
112149
- if (!builtins.includes(name) && (version3 === "*" || semver2.satisfies(version3, semverRange))) {
112149
+ if (!builtins.includes(name) && (version4 === "*" || semver2.satisfies(version4, semverRange))) {
112150
112150
  builtins.push(name);
112151
112151
  }
112152
112152
  }
@@ -112325,7 +112325,7 @@ function npxResolve(pkg) {
112325
112325
  async function checkPackagesAvailableLocally(pkg) {
112326
112326
  const packages = {};
112327
112327
  for (const p2 of Array.isArray(pkg) ? pkg : [pkg]) {
112328
- const { name, version: version3, path: path74, exact } = parseAndValidate(p2);
112328
+ const { name, version: version4, path: path74, exact } = parseAndValidate(p2);
112329
112329
  if (packages[name])
112330
112330
  throw new Error(`npx-import cannot import the same package twice! Got: '${p2}' but already saw '${name}' earlier!`);
112331
112331
  const packageWithPath = [name, path74].join("");
@@ -112333,7 +112333,7 @@ async function checkPackagesAvailableLocally(pkg) {
112333
112333
  packages[name] = {
112334
112334
  name,
112335
112335
  packageWithPath,
112336
- version: version3,
112336
+ version: version4,
112337
112337
  exact,
112338
112338
  path: path74,
112339
112339
  imported,
@@ -112346,7 +112346,7 @@ function parseAndValidate(p2) {
112346
112346
  if (p2.match(/^[.\/]/)) {
112347
112347
  throw new Error(`npx-import can only import packages, not relative paths: got ${p2}`);
112348
112348
  }
112349
- const { name, version: version3, path: path74 } = parse5(p2);
112349
+ const { name, version: version4, path: path74 } = parse5(p2);
112350
112350
  const validation2 = (0, import_validate_npm_package_name.default)(name);
112351
112351
  if (!validation2.validForNewPackages) {
112352
112352
  if (validation2.warnings?.some((w2) => w2.match(/is a core module name/)))
@@ -112354,7 +112354,7 @@ function parseAndValidate(p2) {
112354
112354
  else
112355
112355
  throw new Error(`npx-import can't import invalid package name: parsed name '${name}' from '${p2}'`);
112356
112356
  }
112357
- return { name, version: version3, path: path74, exact: import_semver.default.parse(version3) !== null };
112357
+ return { name, version: version4, path: path74, exact: import_semver.default.parse(version4) !== null };
112358
112358
  }
112359
112359
  async function tryImport(packageWithPath) {
112360
112360
  try {
@@ -148205,7 +148205,7 @@ var require_websocket_server2 = __commonJS({
148205
148205
  socket.on("error", socketOnError);
148206
148206
  const key = req.headers["sec-websocket-key"];
148207
148207
  const upgrade = req.headers.upgrade;
148208
- const version3 = +req.headers["sec-websocket-version"];
148208
+ const version4 = +req.headers["sec-websocket-version"];
148209
148209
  if (req.method !== "GET") {
148210
148210
  const message = "Invalid HTTP method";
148211
148211
  abortHandshakeOrEmitwsClientError(this, req, socket, 405, message);
@@ -148221,7 +148221,7 @@ var require_websocket_server2 = __commonJS({
148221
148221
  abortHandshakeOrEmitwsClientError(this, req, socket, 400, message);
148222
148222
  return;
148223
148223
  }
148224
- if (version3 !== 8 && version3 !== 13) {
148224
+ if (version4 !== 8 && version4 !== 13) {
148225
148225
  const message = "Missing or invalid Sec-WebSocket-Version header";
148226
148226
  abortHandshakeOrEmitwsClientError(this, req, socket, 400, message);
148227
148227
  return;
@@ -148263,7 +148263,7 @@ var require_websocket_server2 = __commonJS({
148263
148263
  }
148264
148264
  if (this.options.verifyClient) {
148265
148265
  const info = {
148266
- origin: req.headers[`${version3 === 8 ? "sec-websocket-origin" : "origin"}`],
148266
+ origin: req.headers[`${version4 === 8 ? "sec-websocket-origin" : "origin"}`],
148267
148267
  secure: !!(req.socket.authorized || req.socket.encrypted),
148268
148268
  req
148269
148269
  };
@@ -149426,6 +149426,166 @@ var require_dist7 = __commonJS({
149426
149426
  }
149427
149427
  });
149428
149428
 
149429
+ // ../../node_modules/.pnpm/workerd@1.20240909.0/node_modules/workerd/lib/main.js
149430
+ var require_main5 = __commonJS({
149431
+ "../../node_modules/.pnpm/workerd@1.20240909.0/node_modules/workerd/lib/main.js"(exports2, module3) {
149432
+ init_import_meta_url();
149433
+ var __create2 = Object.create;
149434
+ var __defProp2 = Object.defineProperty;
149435
+ var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
149436
+ var __getOwnPropNames2 = Object.getOwnPropertyNames;
149437
+ var __getProtoOf2 = Object.getPrototypeOf;
149438
+ var __hasOwnProp2 = Object.prototype.hasOwnProperty;
149439
+ var __export2 = /* @__PURE__ */ __name((target, all2) => {
149440
+ for (var name in all2)
149441
+ __defProp2(target, name, { get: all2[name], enumerable: true });
149442
+ }, "__export");
149443
+ var __copyProps2 = /* @__PURE__ */ __name((to, from, except, desc) => {
149444
+ if (from && typeof from === "object" || typeof from === "function") {
149445
+ for (let key of __getOwnPropNames2(from))
149446
+ if (!__hasOwnProp2.call(to, key) && key !== except)
149447
+ __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
149448
+ }
149449
+ return to;
149450
+ }, "__copyProps");
149451
+ var __toESM2 = /* @__PURE__ */ __name((mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
149452
+ // If the importer is in node compatibility mode or this is not an ESM
149453
+ // file that has been converted to a CommonJS file using a Babel-
149454
+ // compatible transform (i.e. "__esModule" has not been set), then set
149455
+ // "default" to the CommonJS "module.exports" for node compatibility.
149456
+ isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target,
149457
+ mod
149458
+ )), "__toESM");
149459
+ var __toCommonJS2 = /* @__PURE__ */ __name((mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod), "__toCommonJS");
149460
+ var node_path_exports = {};
149461
+ __export2(node_path_exports, {
149462
+ compatibilityDate: () => compatibilityDate,
149463
+ default: () => node_path_default,
149464
+ version: () => version4
149465
+ });
149466
+ module3.exports = __toCommonJS2(node_path_exports);
149467
+ var import_fs16 = __toESM2(require("fs"));
149468
+ var import_os4 = __toESM2(require("os"));
149469
+ var import_path20 = __toESM2(require("path"));
149470
+ var knownPackages = {
149471
+ "darwin arm64 LE": "@cloudflare/workerd-darwin-arm64",
149472
+ "darwin x64 LE": "@cloudflare/workerd-darwin-64",
149473
+ "linux arm64 LE": "@cloudflare/workerd-linux-arm64",
149474
+ "linux x64 LE": "@cloudflare/workerd-linux-64",
149475
+ "win32 x64 LE": "@cloudflare/workerd-windows-64"
149476
+ };
149477
+ var maybeExeExtension = process.platform === "win32" ? ".exe" : "";
149478
+ function pkgAndSubpathForCurrentPlatform() {
149479
+ let pkg;
149480
+ let subpath;
149481
+ let platformKey = `${process.platform} ${import_os4.default.arch()} ${import_os4.default.endianness()}`;
149482
+ if (platformKey in knownPackages) {
149483
+ pkg = knownPackages[platformKey];
149484
+ subpath = `bin/workerd${maybeExeExtension}`;
149485
+ } else {
149486
+ throw new Error(`Unsupported platform: ${platformKey}`);
149487
+ }
149488
+ return { pkg, subpath };
149489
+ }
149490
+ __name(pkgAndSubpathForCurrentPlatform, "pkgAndSubpathForCurrentPlatform");
149491
+ function pkgForSomeOtherPlatform() {
149492
+ const libMain = require.resolve("workerd");
149493
+ const nodeModulesDirectory = import_path20.default.dirname(
149494
+ import_path20.default.dirname(import_path20.default.dirname(libMain))
149495
+ );
149496
+ if (import_path20.default.basename(nodeModulesDirectory) === "node_modules") {
149497
+ for (const unixKey in knownPackages) {
149498
+ try {
149499
+ const pkg = knownPackages[unixKey];
149500
+ if (import_fs16.default.existsSync(import_path20.default.join(nodeModulesDirectory, pkg)))
149501
+ return pkg;
149502
+ } catch {
149503
+ }
149504
+ }
149505
+ }
149506
+ return null;
149507
+ }
149508
+ __name(pkgForSomeOtherPlatform, "pkgForSomeOtherPlatform");
149509
+ function downloadedBinPath(pkg, subpath) {
149510
+ const libDir = import_path20.default.dirname(require.resolve("workerd"));
149511
+ return import_path20.default.join(libDir, `downloaded-${pkg.replace("/", "-")}-${import_path20.default.basename(subpath)}${maybeExeExtension}`);
149512
+ }
149513
+ __name(downloadedBinPath, "downloadedBinPath");
149514
+ function generateBinPath() {
149515
+ const { pkg, subpath } = pkgAndSubpathForCurrentPlatform();
149516
+ let binPath2;
149517
+ try {
149518
+ binPath2 = require.resolve(`${pkg}/${subpath}`);
149519
+ } catch (e3) {
149520
+ binPath2 = downloadedBinPath(pkg, subpath);
149521
+ if (!import_fs16.default.existsSync(binPath2)) {
149522
+ try {
149523
+ require.resolve(pkg);
149524
+ } catch {
149525
+ const otherPkg = pkgForSomeOtherPlatform();
149526
+ if (otherPkg) {
149527
+ throw new Error(`
149528
+ You installed workerd on another platform than the one you're currently using.
149529
+ This won't work because workerd is written with native code and needs to
149530
+ install a platform-specific binary executable.
149531
+
149532
+ Specifically the "${otherPkg}" package is present but this platform
149533
+ needs the "${pkg}" package instead. People often get into this
149534
+ situation by installing workerd on macOS and copying "node_modules"
149535
+ into a Docker image that runs Linux.
149536
+
149537
+ If you are installing with npm, you can try not copying the "node_modules"
149538
+ directory when you copy the files over, and running "npm ci" or "npm install"
149539
+ on the destination platform after the copy. Or you could consider using yarn
149540
+ instead which has built-in support for installing a package on multiple
149541
+ platforms simultaneously.
149542
+
149543
+ If you are installing with yarn, you can try listing both this platform and the
149544
+ other platform in your ".yarnrc.yml" file using the "supportedArchitectures"
149545
+ feature: https://yarnpkg.com/configuration/yarnrc/#supportedArchitectures
149546
+ Keep in mind that this means multiple copies of workerd will be present.
149547
+ `);
149548
+ }
149549
+ throw new Error(`The package "${pkg}" could not be found, and is needed by workerd.
149550
+
149551
+ If you are installing workerd with npm, make sure that you don't specify the
149552
+ "--no-optional" flag. The "optionalDependencies" package.json feature is used
149553
+ by workerd to install the correct binary executable for your current platform.`);
149554
+ }
149555
+ throw e3;
149556
+ }
149557
+ }
149558
+ let pnpapi;
149559
+ try {
149560
+ pnpapi = require("pnpapi");
149561
+ } catch (e3) {
149562
+ }
149563
+ if (pnpapi) {
149564
+ const root = pnpapi.getPackageInformation(pnpapi.topLevel).packageLocation;
149565
+ const binTargetPath = import_path20.default.join(
149566
+ root,
149567
+ "node_modules",
149568
+ ".cache",
149569
+ "workerd",
149570
+ `pnpapi-${pkg.replace("/", "-")}-${"1.20240909.0"}-${import_path20.default.basename(subpath)}`
149571
+ );
149572
+ if (!import_fs16.default.existsSync(binTargetPath)) {
149573
+ import_fs16.default.mkdirSync(import_path20.default.dirname(binTargetPath), { recursive: true });
149574
+ import_fs16.default.copyFileSync(binPath2, binTargetPath);
149575
+ import_fs16.default.chmodSync(binTargetPath, 493);
149576
+ }
149577
+ return { binPath: binTargetPath };
149578
+ }
149579
+ return { binPath: binPath2 };
149580
+ }
149581
+ __name(generateBinPath, "generateBinPath");
149582
+ var { binPath } = generateBinPath();
149583
+ var node_path_default = binPath;
149584
+ var compatibilityDate = "2024-09-09";
149585
+ var version4 = "1.20240909.0";
149586
+ }
149587
+ });
149588
+
149429
149589
  // src/cli.ts
149430
149590
  var cli_exports2 = {};
149431
149591
  __export(cli_exports2, {
@@ -152153,10 +152313,10 @@ function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
152153
152313
  return 3;
152154
152314
  }
152155
152315
  if ("TERM_PROGRAM" in env2) {
152156
- const version3 = Number.parseInt((env2.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
152316
+ const version4 = Number.parseInt((env2.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
152157
152317
  switch (env2.TERM_PROGRAM) {
152158
152318
  case "iTerm.app": {
152159
- return version3 >= 3 ? 3 : 2;
152319
+ return version4 >= 3 ? 3 : 2;
152160
152320
  }
152161
152321
  case "Apple_Terminal": {
152162
152322
  return 2;
@@ -152716,7 +152876,7 @@ init_import_meta_url();
152716
152876
  init_import_meta_url();
152717
152877
 
152718
152878
  // package.json
152719
- var version = "3.78.2";
152879
+ var version = "3.78.4";
152720
152880
  var package_default = {
152721
152881
  name: "wrangler",
152722
152882
  version,
@@ -152798,7 +152958,7 @@ var package_default = {
152798
152958
  esbuild: "0.17.19",
152799
152959
  miniflare: "workspace:*",
152800
152960
  nanoid: "^3.3.3",
152801
- "path-to-regexp": "^6.2.0",
152961
+ "path-to-regexp": "^6.3.0",
152802
152962
  resolve: "^1.22.8",
152803
152963
  "resolve.exports": "^2.0.2",
152804
152964
  selfsigned: "^2.0.1",
@@ -161261,7 +161421,9 @@ function createWorkerUploadForm(worker) {
161261
161421
  assets: {
161262
161422
  jwt: experimental_assets.jwt,
161263
161423
  config: assetConfig
161264
- }
161424
+ },
161425
+ ...compatibility_date && { compatibility_date },
161426
+ ...compatibility_flags && { compatibility_flags }
161265
161427
  })
161266
161428
  );
161267
161429
  return formData;
@@ -162587,11 +162749,11 @@ var datetimeRegex = /* @__PURE__ */ __name((args) => {
162587
162749
  }
162588
162750
  }
162589
162751
  }, "datetimeRegex");
162590
- function isValidIP(ip2, version3) {
162591
- if ((version3 === "v4" || !version3) && ipv4Regex.test(ip2)) {
162752
+ function isValidIP(ip2, version4) {
162753
+ if ((version4 === "v4" || !version4) && ipv4Regex.test(ip2)) {
162592
162754
  return true;
162593
162755
  }
162594
- if ((version3 === "v6" || !version3) && ipv6Regex.test(ip2)) {
162756
+ if ((version4 === "v6" || !version4) && ipv6Regex.test(ip2)) {
162595
162757
  return true;
162596
162758
  }
162597
162759
  return false;
@@ -169567,11 +169729,11 @@ async function fetchVersion(accountId, workerName, versionId, versionCache) {
169567
169729
  if (cachedVersion) {
169568
169730
  return cachedVersion;
169569
169731
  }
169570
- const version3 = await fetchResult(
169732
+ const version4 = await fetchResult(
169571
169733
  `/accounts/${accountId}/workers/scripts/${workerName}/versions/${versionId}`
169572
169734
  );
169573
- versionCache?.set(version3.id, version3);
169574
- return version3;
169735
+ versionCache?.set(version4.id, version4);
169736
+ return version4;
169575
169737
  }
169576
169738
  __name(fetchVersion, "fetchVersion");
169577
169739
  async function fetchVersions(accountId, workerName, versionCache, ...versionIds) {
@@ -169612,8 +169774,8 @@ async function fetchDeployableVersions(accountId, workerName, versionCache) {
169612
169774
  const { items: versions } = await fetchResult(
169613
169775
  `/accounts/${accountId}/workers/scripts/${workerName}/versions?deployable=true`
169614
169776
  );
169615
- for (const version3 of versions) {
169616
- versionCache.set(version3.id, version3);
169777
+ for (const version4 of versions) {
169778
+ versionCache.set(version4.id, version4);
169617
169779
  }
169618
169780
  return versions;
169619
169781
  }
@@ -171628,13 +171790,13 @@ function printVersions(versions, traffic) {
171628
171790
  }
171629
171791
  __name(printVersions, "printVersions");
171630
171792
  function formatVersions(versions, traffic) {
171631
- return versions.map((version3) => {
171632
- const trafficString = brandColor(`(${traffic.get(version3.id)}%)`);
171633
- const versionIdString = white(version3.id);
171793
+ return versions.map((version4) => {
171794
+ const trafficString = brandColor(`(${traffic.get(version4.id)}%)`);
171795
+ const versionIdString = white(version4.id);
171634
171796
  return gray(`${trafficString} ${versionIdString}
171635
- Created: ${version3.metadata.created_on}
171636
- Tag: ${version3.annotations?.["workers/tag"] ?? BLANK_INPUT}
171637
- Message: ${version3.annotations?.["workers/message"] ?? BLANK_INPUT}`);
171797
+ Created: ${version4.metadata.created_on}
171798
+ Tag: ${version4.annotations?.["workers/tag"] ?? BLANK_INPUT}
171799
+ Message: ${version4.annotations?.["workers/message"] ?? BLANK_INPUT}`);
171638
171800
  }).join("\n\n");
171639
171801
  }
171640
171802
  __name(formatVersions, "formatVersions");
@@ -171659,13 +171821,13 @@ async function promptVersionsToDeploy(accountId, workerName, defaultSelectedVers
171659
171821
  const result = await inputPrompt({
171660
171822
  type: "multiselect",
171661
171823
  question,
171662
- options: selectableVersions.map((version3) => ({
171663
- value: version3.id,
171664
- label: version3.id,
171824
+ options: selectableVersions.map((version4) => ({
171825
+ value: version4.id,
171826
+ label: version4.id,
171665
171827
  sublabel: gray(`
171666
- ${ZERO_WIDTH_SPACE} Created: ${version3.metadata.created_on}
171667
- ${ZERO_WIDTH_SPACE} Tag: ${version3.annotations?.["workers/tag"] ?? BLANK_INPUT}
171668
- ${ZERO_WIDTH_SPACE} Message: ${version3.annotations?.["workers/message"] ?? BLANK_INPUT}
171828
+ ${ZERO_WIDTH_SPACE} Created: ${version4.metadata.created_on}
171829
+ ${ZERO_WIDTH_SPACE} Tag: ${version4.annotations?.["workers/tag"] ?? BLANK_INPUT}
171830
+ ${ZERO_WIDTH_SPACE} Message: ${version4.annotations?.["workers/message"] ?? BLANK_INPUT}
171669
171831
  `)
171670
171832
  })),
171671
171833
  label: "",
@@ -171684,18 +171846,18 @@ ${ZERO_WIDTH_SPACE} Message: ${version3.annotations?.["workers/message"]
171684
171846
  `${versionIds.length} Worker Version(s) selected`
171685
171847
  );
171686
171848
  const versions = versionIds?.map((versionId, i) => {
171687
- const version3 = versionCache.get(versionId);
171688
- (0, import_assert2.default)(version3);
171849
+ const version4 = versionCache.get(versionId);
171850
+ (0, import_assert2.default)(version4);
171689
171851
  return `${grayBar}
171690
- ${leftT} ${white(` Worker Version ${i + 1}: `, version3.id)}
171691
- ${grayBar} ${gray(" Created: ", version3.metadata.created_on)}
171852
+ ${leftT} ${white(` Worker Version ${i + 1}: `, version4.id)}
171853
+ ${grayBar} ${gray(" Created: ", version4.metadata.created_on)}
171692
171854
  ${grayBar} ${gray(
171693
171855
  " Tag: ",
171694
- version3.annotations?.["workers/tag"] ?? BLANK_INPUT
171856
+ version4.annotations?.["workers/tag"] ?? BLANK_INPUT
171695
171857
  )}
171696
171858
  ${grayBar} ${gray(
171697
171859
  " Message: ",
171698
- version3.annotations?.["workers/message"] ?? BLANK_INPUT
171860
+ version4.annotations?.["workers/message"] ?? BLANK_INPUT
171699
171861
  )}`;
171700
171862
  });
171701
171863
  return [
@@ -178255,16 +178417,16 @@ function usage(yargs, shim3) {
178255
178417
  }
178256
178418
  }
178257
178419
  __name(windowWidth, "windowWidth");
178258
- let version3 = null;
178420
+ let version4 = null;
178259
178421
  self2.version = (ver) => {
178260
- version3 = ver;
178422
+ version4 = ver;
178261
178423
  };
178262
178424
  self2.showVersion = (level) => {
178263
178425
  const logger3 = yargs.getInternalMethods().getLoggerInstance();
178264
178426
  if (!level)
178265
178427
  level = "error";
178266
178428
  const emit = typeof level === "function" ? level : logger3[level];
178267
- emit(version3);
178429
+ emit(version4);
178268
178430
  };
178269
178431
  self2.reset = /* @__PURE__ */ __name(function reset(localLookup) {
178270
178432
  failMessage = null;
@@ -190707,20 +190869,20 @@ async function deployments(accountId, scriptName, { send_metrics: sendMetrics }
190707
190869
  const triggerStr = versions.annotations?.["workers/triggered_by"] ? `${formatTrigger(
190708
190870
  versions.annotations["workers/triggered_by"]
190709
190871
  )} from ${formatSource(versions.metadata.source)}` : `${formatSource(versions.metadata.source)}`;
190710
- let version3 = `
190872
+ let version4 = `
190711
190873
  Version ID: ${versions.id}
190712
190874
  Created on: ${versions.metadata.created_on}
190713
190875
  Author: ${versions.metadata.author_email}
190714
190876
  Source: ${triggerStr}`;
190715
190877
  if (versions.annotations?.["workers/rollback_from"]) {
190716
- version3 += `
190878
+ version4 += `
190717
190879
  Rollback from: ${versions.annotations["workers/rollback_from"]}`;
190718
190880
  }
190719
190881
  if (versions.annotations?.["workers/message"]) {
190720
- version3 += `
190882
+ version4 += `
190721
190883
  Message: ${versions.annotations["workers/message"]}`;
190722
190884
  }
190723
- return version3 + `
190885
+ return version4 + `
190724
190886
  `;
190725
190887
  });
190726
190888
  versionMessages[versionMessages.length - 1] += "\u{1F7E9} Active";
@@ -190868,7 +191030,7 @@ Compatibility Date: ${deploymentDetails.resources.script_runtime?.compatibility
190868
191030
  const compatFlagsStr = deploymentDetails.resources.script_runtime?.compatibility_flags ? `
190869
191031
  Compatibility Flags: ${deploymentDetails.resources.script_runtime?.compatibility_flags}` : ``;
190870
191032
  const bindings = deploymentDetails.resources.bindings;
190871
- const version3 = `
191033
+ const version4 = `
190872
191034
  Version ID: ${deploymentDetails.id}
190873
191035
  Created on: ${deploymentDetails.metadata.created_on}
190874
191036
  Author: ${deploymentDetails.metadata.author_email}
@@ -190880,7 +191042,7 @@ Handlers: ${deploymentDetails.resources.script.handlers}${compatDateS
190880
191042
  --------------------------bindings--------------------------
190881
191043
  ${bindings.length > 0 ? import_toml5.default.stringify(await mapBindings(accountId, bindings)) : `None`}
190882
191044
  `;
190883
- logger.log(version3);
191045
+ logger.log(version4);
190884
191046
  }
190885
191047
  __name(viewDeployment, "viewDeployment");
190886
191048
  async function commonDeploymentCMDSetup(yargs) {
@@ -191569,7 +191731,6 @@ async function handler5(args) {
191569
191731
  args.host,
191570
191732
  args.port,
191571
191733
  args.scheme,
191572
- args.database,
191573
191734
  args.user,
191574
191735
  args.password
191575
191736
  );
@@ -191592,9 +191753,9 @@ async function handler5(args) {
191592
191753
  throw new UserError(
191593
191754
  "You must provide a port number - e.g. 'user:password@database.example.com:port/databasename"
191594
191755
  );
191595
- } else if (url4.pathname === "") {
191756
+ } else if (args.connectionString && url4.pathname === "" || args.database === "") {
191596
191757
  throw new UserError(
191597
- "You must provide a database name as the path component - e.g. /postgres"
191758
+ "You must provide a database name as the path component - e.g. example.com:port/postgres"
191598
191759
  );
191599
191760
  } else if (url4.username === "") {
191600
191761
  throw new UserError(
@@ -191607,9 +191768,9 @@ async function handler5(args) {
191607
191768
  } else {
191608
191769
  logger.log(`\u{1F6A7} Creating '${args.name}'`);
191609
191770
  const origin = args.accessClientId && args.accessClientSecret ? {
191610
- host: url4.hostname,
191771
+ host: url4.hostname + url4.pathname,
191611
191772
  scheme: url4.protocol.replace(":", ""),
191612
- database: decodeURIComponent(url4.pathname.replace("/", "")),
191773
+ database: args.database,
191613
191774
  user: decodeURIComponent(url4.username),
191614
191775
  password: decodeURIComponent(url4.password),
191615
191776
  access_client_id: args.accessClientId,
@@ -191618,7 +191779,8 @@ async function handler5(args) {
191618
191779
  host: url4.hostname,
191619
191780
  port: parseInt(url4.port),
191620
191781
  scheme: url4.protocol.replace(":", ""),
191621
- database: decodeURIComponent(url4.pathname.replace("/", "")),
191782
+ // database will either be the value passed in the relevant yargs flag or is URL-decoded value from the url pathname
191783
+ database: args.connectionString !== "" ? decodeURIComponent(url4.pathname.replace("/", "")) : args.database,
191622
191784
  user: decodeURIComponent(url4.username),
191623
191785
  password: decodeURIComponent(url4.password)
191624
191786
  };
@@ -191639,8 +191801,8 @@ async function handler5(args) {
191639
191801
  }
191640
191802
  }
191641
191803
  __name(handler5, "handler");
191642
- function buildURLFromParts(host, port2, scheme, database, user, password) {
191643
- const url4 = new URL(database ? `/${database}` : "", `${scheme}://${host}`);
191804
+ function buildURLFromParts(host, port2, scheme, user, password) {
191805
+ const url4 = new URL(`${scheme}://${host}`);
191644
191806
  if (port2) {
191645
191807
  url4.port = port2.toString();
191646
191808
  }
@@ -191724,11 +191886,13 @@ function options8(yargs) {
191724
191886
  name: { type: "string", describe: "Give your config a new name" },
191725
191887
  "origin-host": {
191726
191888
  type: "string",
191727
- describe: "The host of the origin database"
191889
+ describe: "The host of the origin database",
191890
+ implies: ["database", "origin-user", "origin-password"]
191728
191891
  },
191729
191892
  "origin-port": {
191730
191893
  type: "number",
191731
- describe: "The port number of the origin database"
191894
+ describe: "The port number of the origin database",
191895
+ implies: ["origin-host", "database", "origin-user", "origin-password"]
191732
191896
  },
191733
191897
  "origin-scheme": {
191734
191898
  type: "string",
@@ -191736,27 +191900,42 @@ function options8(yargs) {
191736
191900
  },
191737
191901
  database: {
191738
191902
  type: "string",
191739
- describe: "The name of the database within the origin database"
191903
+ describe: "The name of the database within the origin database",
191904
+ implies: ["origin-host", "origin-user", "origin-password"]
191740
191905
  },
191741
191906
  "origin-user": {
191742
191907
  type: "string",
191743
- describe: "The username used to connect to the origin database"
191908
+ describe: "The username used to connect to the origin database",
191909
+ implies: ["origin-host", "database", "origin-password"]
191744
191910
  },
191745
191911
  "origin-password": {
191746
191912
  type: "string",
191747
- describe: "The password used to connect to the origin database"
191913
+ describe: "The password used to connect to the origin database",
191914
+ implies: ["origin-host", "database", "origin-user"]
191748
191915
  },
191749
191916
  "access-client-id": {
191750
191917
  type: "string",
191751
191918
  describe: "The Client ID of the Access token to use when connecting to the origin database",
191752
191919
  conflicts: ["origin-port"],
191753
- implies: ["access-client-secret"]
191920
+ implies: [
191921
+ "access-client-secret",
191922
+ "origin-host",
191923
+ "database",
191924
+ "origin-user",
191925
+ "origin-password"
191926
+ ]
191754
191927
  },
191755
191928
  "access-client-secret": {
191756
191929
  type: "string",
191757
191930
  describe: "The Client Secret of the Access token to use when connecting to the origin database",
191758
191931
  conflicts: ["origin-port"],
191759
- implies: ["access-client-id"]
191932
+ implies: [
191933
+ "access-client-id",
191934
+ "origin-host",
191935
+ "database",
191936
+ "origin-user",
191937
+ "origin-password"
191938
+ ]
191760
191939
  },
191761
191940
  "caching-disabled": {
191762
191941
  type: "boolean",
@@ -191774,33 +191953,21 @@ function options8(yargs) {
191774
191953
  });
191775
191954
  }
191776
191955
  __name(options8, "options");
191777
- var requiredOriginOptions = [
191956
+ var coreOriginOptions = [
191778
191957
  "originHost",
191779
191958
  "database",
191780
191959
  "originUser",
191781
191960
  "originPassword"
191782
191961
  ];
191783
- function camelToKebab(str) {
191784
- return str.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
191785
- }
191786
- __name(camelToKebab, "camelToKebab");
191787
191962
  function isOptionSet(args, key) {
191788
191963
  return key in args && args[key] !== void 0;
191789
191964
  }
191790
191965
  __name(isOptionSet, "isOptionSet");
191791
191966
  async function handler9(args) {
191792
- const allOriginFieldsSet = requiredOriginOptions.every(
191967
+ const coreOriginFieldsSet = coreOriginOptions.every(
191793
191968
  (field) => isOptionSet(args, field)
191794
191969
  );
191795
- const noOriginFieldSet = requiredOriginOptions.every(
191796
- (field) => !isOptionSet(args, field)
191797
- );
191798
- if (!allOriginFieldsSet && !noOriginFieldSet) {
191799
- throw new UserError(
191800
- `When updating the origin, all of the following must be set: ${requiredOriginOptions.map((option) => camelToKebab(option)).join(", ")}`
191801
- );
191802
- }
191803
- if (allOriginFieldsSet && args.originPort === void 0 && args.accessClientId === void 0 && args.accessClientSecret === void 0) {
191970
+ if (coreOriginFieldsSet && args.originPort === void 0 && args.accessClientId === void 0 && args.accessClientSecret === void 0) {
191804
191971
  throw new UserError(
191805
191972
  `When updating the origin, either the port or the Access Client ID and Secret must be set`
191806
191973
  );
@@ -191811,7 +191978,7 @@ async function handler9(args) {
191811
191978
  if (args.name !== void 0) {
191812
191979
  database.name = args.name;
191813
191980
  }
191814
- if (allOriginFieldsSet) {
191981
+ if (coreOriginFieldsSet) {
191815
191982
  if (args.accessClientId && args.accessClientSecret) {
191816
191983
  database.origin = {
191817
191984
  scheme: args.originScheme ?? "postgresql",
@@ -199152,13 +199319,20 @@ async function deleteEventNotificationConfig(config, apiCredentials, accountId,
199152
199319
  logger.log(
199153
199320
  `Disabling event notifications for "${bucketName}" to queue ${queueName}...`
199154
199321
  );
199155
- const body = ruleId !== void 0 ? {
199156
- ruleIds: [ruleId]
199157
- } : {};
199158
- return await fetchResult(
199159
- `/accounts/${accountId}/event_notifications/r2/${bucketName}/configuration/queues/${queue.queue_id}`,
199160
- { method: "DELETE", body: JSON.stringify(body), headers }
199161
- );
199322
+ if (ruleId !== void 0) {
199323
+ const body = ruleId !== void 0 ? {
199324
+ ruleIds: [ruleId]
199325
+ } : {};
199326
+ return await fetchResult(
199327
+ `/accounts/${accountId}/event_notifications/r2/${bucketName}/configuration/queues/${queue.queue_id}`,
199328
+ { method: "DELETE", body: JSON.stringify(body), headers }
199329
+ );
199330
+ } else {
199331
+ return await fetchResult(
199332
+ `/accounts/${accountId}/event_notifications/r2/${bucketName}/configuration/queues/${queue.queue_id}`,
199333
+ { method: "DELETE", headers }
199334
+ );
199335
+ }
199162
199336
  }
199163
199337
  __name(deleteEventNotificationConfig, "deleteEventNotificationConfig");
199164
199338
  function isValidR2BucketName(name) {
@@ -199196,21 +199370,21 @@ function CreateOptions4(yargs) {
199196
199370
  type: "string",
199197
199371
  demandOption: true
199198
199372
  }).option("event-types", {
199199
- describe: "Specify the kinds of object events to emit notifications for. ex. '--event-types object-create object-delete'",
199373
+ describe: "The type of event(s) that will emit event notifications",
199200
199374
  alias: "event-type",
199201
199375
  choices: Object.keys(actionsForEventCategories),
199202
199376
  demandOption: true,
199203
199377
  requiresArg: true,
199204
199378
  type: "array"
199205
199379
  }).option("prefix", {
199206
- describe: "only actions on objects with this prefix will emit notifications",
199380
+ describe: "The prefix that an object must match to emit event notifications (note: regular expressions not supported)",
199207
199381
  requiresArg: false,
199208
199382
  type: "string"
199209
199383
  }).option("suffix", {
199210
- describe: "only actions on objects with this suffix will emit notifications",
199384
+ describe: "The suffix that an object must match to emit event notifications (note: regular expressions not supported)",
199211
199385
  type: "string"
199212
199386
  }).option("queue", {
199213
- describe: "The name of the queue to which event notifications will be sent. ex '--queue my-queue'",
199387
+ describe: "The name of the queue that will receive event notification messages",
199214
199388
  demandOption: true,
199215
199389
  requiresArg: true,
199216
199390
  type: "string"
@@ -199242,12 +199416,12 @@ function DeleteOptions2(yargs) {
199242
199416
  type: "string",
199243
199417
  demandOption: true
199244
199418
  }).option("queue", {
199245
- describe: "The name of the queue that is configured to receive notifications. ex '--queue my-queue'",
199419
+ describe: "The name of the queue that will receive event notification messages",
199246
199420
  demandOption: true,
199247
199421
  requiresArg: true,
199248
199422
  type: "string"
199249
199423
  }).option("rule", {
199250
- describe: "The id of the rule to delete. If no rule is specified, all rules for the bucket/queue configuration will be deleted.",
199424
+ describe: "The id of the rule to delete. If no rule is specified, all rules for the bucket/queue configuration will be deleted",
199251
199425
  requiresArg: false,
199252
199426
  type: "string"
199253
199427
  });
@@ -202463,8 +202637,8 @@ function getSdkMetadataForEnvelopeHeader(metadataOrEvent) {
202463
202637
  if (!metadataOrEvent || !metadataOrEvent.sdk) {
202464
202638
  return;
202465
202639
  }
202466
- const { name, version: version3 } = metadataOrEvent.sdk;
202467
- return { name, version: version3 };
202640
+ const { name, version: version4 } = metadataOrEvent.sdk;
202641
+ return { name, version: version4 };
202468
202642
  }
202469
202643
  __name(getSdkMetadataForEnvelopeHeader, "getSdkMetadataForEnvelopeHeader");
202470
202644
  function createEventEnvelopeHeaders(event, sdkInfo, tunnel, dsn) {
@@ -203360,8 +203534,8 @@ var Hub = class {
203360
203534
  /**
203361
203535
  * @inheritDoc
203362
203536
  */
203363
- isOlderThan(version3) {
203364
- return this._version < version3;
203537
+ isOlderThan(version4) {
203538
+ return this._version < version4;
203365
203539
  }
203366
203540
  /**
203367
203541
  * @inheritDoc
@@ -209811,6 +209985,7 @@ init_import_meta_url();
209811
209985
  var import_fs14 = require("fs");
209812
209986
  var import_promises26 = require("fs/promises");
209813
209987
  var import_miniflare18 = require("miniflare");
209988
+ var import_workerd = __toESM(require_main5());
209814
209989
  var DEFAULT_OUTFILE_RELATIVE_PATH = "./.wrangler/types/runtime.d.ts";
209815
209990
  async function generateRuntimeTypes({
209816
209991
  config: { compatibility_date, compatibility_flags = [] },
@@ -209820,6 +209995,18 @@ async function generateRuntimeTypes({
209820
209995
  throw new Error("Config must have a compatibility date.");
209821
209996
  }
209822
209997
  await ensureDirectoryExists(outFile);
209998
+ const header = `// Runtime types generated with workerd@${import_workerd.version} ${compatibility_date} ${compatibility_flags.join(",")}`;
209999
+ try {
210000
+ const existingTypes = await (0, import_promises26.readFile)(outFile, "utf8");
210001
+ if (existingTypes.split("\n")[0] === header) {
210002
+ logger.debug("Using cached runtime types: ", header);
210003
+ return { outFile };
210004
+ }
210005
+ } catch (e3) {
210006
+ if (e3.code !== "ENOENT") {
210007
+ throw e3;
210008
+ }
210009
+ }
209823
210010
  const types = await generate({
209824
210011
  compatibilityDate: compatibility_date,
209825
210012
  // Ignore nodejs compat flags as there is currently no mechanism to generate these dynamically.
@@ -209827,7 +210014,8 @@ async function generateRuntimeTypes({
209827
210014
  (flag) => !flag.includes("nodejs_compat")
209828
210015
  )
209829
210016
  });
209830
- await (0, import_promises26.writeFile)(outFile, types, "utf8");
210017
+ await (0, import_promises26.writeFile)(outFile, `${header}
210018
+ ${types}`, "utf8");
209831
210019
  return {
209832
210020
  outFile
209833
210021
  };
@@ -210260,8 +210448,7 @@ ${modulesTypeStructure.join("\n")}`;
210260
210448
  fs25.writeFileSync(
210261
210449
  path74,
210262
210450
  [
210263
- `// Generated by Wrangler on ${/* @__PURE__ */ new Date()}`,
210264
- `// by running \`${wranglerCommandUsed}\``,
210451
+ `// Generated by Wrangler by running \`${wranglerCommandUsed}\``,
210265
210452
  "",
210266
210453
  combinedTypeStrings
210267
210454
  ].join("\n")
@@ -211361,14 +211548,14 @@ async function versionsListHandler(args) {
211361
211548
  logRaw(JSON.stringify(versions, null, 2));
211362
211549
  return;
211363
211550
  }
211364
- for (const version3 of versions) {
211551
+ for (const version4 of versions) {
211365
211552
  const formattedVersion = formatLabelledValues({
211366
- "Version ID": version3.id,
211367
- Created: new Date(version3.metadata["created_on"]).toISOString(),
211368
- Author: version3.metadata.author_email,
211369
- Source: getVersionSource(version3),
211370
- Tag: version3.annotations?.["workers/tag"] || BLANK_INPUT2,
211371
- Message: version3.annotations?.["workers/message"] || BLANK_INPUT2
211553
+ "Version ID": version4.id,
211554
+ Created: new Date(version4.metadata["created_on"]).toISOString(),
211555
+ Author: version4.metadata.author_email,
211556
+ Source: getVersionSource(version4),
211557
+ Tag: version4.annotations?.["workers/tag"] || BLANK_INPUT2,
211558
+ Message: version4.annotations?.["workers/message"] || BLANK_INPUT2
211372
211559
  });
211373
211560
  logRaw(formattedVersion);
211374
211561
  logRaw(``);
@@ -211381,8 +211568,8 @@ function getConfig3(args) {
211381
211568
  return config;
211382
211569
  }
211383
211570
  __name(getConfig3, "getConfig");
211384
- function getVersionSource(version3) {
211385
- return version3.annotations?.["workers/triggered_by"] === void 0 ? formatSource2(version3.metadata.source) : formatTrigger2(version3.annotations["workers/triggered_by"]);
211571
+ function getVersionSource(version4) {
211572
+ return version4.annotations?.["workers/triggered_by"] === void 0 ? formatSource2(version4.metadata.source) : formatTrigger2(version4.annotations["workers/triggered_by"]);
211386
211573
  }
211387
211574
  __name(getVersionSource, "getVersionSource");
211388
211575
  function formatSource2(source) {
@@ -211649,11 +211836,11 @@ async function versionsSecretListHandler(args) {
211649
211836
  versionCache
211650
211837
  );
211651
211838
  }
211652
- for (const version3 of versions) {
211839
+ for (const version4 of versions) {
211653
211840
  logger.log(
211654
- `-- Version ${version3.id} (${rollout.get(version3.id)}%) secrets --`
211841
+ `-- Version ${version4.id} (${rollout.get(version4.id)}%) secrets --`
211655
211842
  );
211656
- const secrets = version3.resources.bindings.filter(
211843
+ const secrets = version4.resources.bindings.filter(
211657
211844
  (binding) => binding.type === "secret_text"
211658
211845
  );
211659
211846
  for (const secret3 of secrets) {
@@ -212360,33 +212547,33 @@ async function versionsViewHandler(args) {
212360
212547
  'You need to provide a name of your worker. Either pass it as a cli arg with `--name <name>` or in your config file as `name = "<name>"`'
212361
212548
  );
212362
212549
  }
212363
- const version3 = await fetchVersion(accountId, workerName, args.versionId);
212550
+ const version4 = await fetchVersion(accountId, workerName, args.versionId);
212364
212551
  if (args.json) {
212365
- logRaw(JSON.stringify(version3, null, 2));
212552
+ logRaw(JSON.stringify(version4, null, 2));
212366
212553
  return;
212367
212554
  }
212368
212555
  logRaw(
212369
212556
  formatLabelledValues({
212370
- "Version ID": version3.id,
212371
- Created: new Date(version3.metadata["created_on"]).toISOString(),
212372
- Author: version3.metadata.author_email,
212373
- Source: getVersionSource(version3),
212374
- Tag: version3.annotations?.["workers/tag"] || BLANK_INPUT3,
212375
- Message: version3.annotations?.["workers/message"] || BLANK_INPUT3
212557
+ "Version ID": version4.id,
212558
+ Created: new Date(version4.metadata["created_on"]).toISOString(),
212559
+ Author: version4.metadata.author_email,
212560
+ Source: getVersionSource(version4),
212561
+ Tag: version4.annotations?.["workers/tag"] || BLANK_INPUT3,
212562
+ Message: version4.annotations?.["workers/message"] || BLANK_INPUT3
212376
212563
  })
212377
212564
  );
212378
212565
  logRaw("------------------------------------------------------------");
212379
212566
  const scriptInfo = {
212380
- Handlers: version3.resources.script.handlers.join(", ")
212567
+ Handlers: version4.resources.script.handlers.join(", ")
212381
212568
  };
212382
- if (version3.resources.script_runtime.compatibility_date) {
212383
- scriptInfo["Compatibility Date"] = version3.resources.script_runtime.compatibility_date;
212569
+ if (version4.resources.script_runtime.compatibility_date) {
212570
+ scriptInfo["Compatibility Date"] = version4.resources.script_runtime.compatibility_date;
212384
212571
  }
212385
- if (version3.resources.script_runtime.compatibility_flags) {
212386
- scriptInfo["Compatibility Flags"] = version3.resources.script_runtime.compatibility_flags.join(", ");
212572
+ if (version4.resources.script_runtime.compatibility_flags) {
212573
+ scriptInfo["Compatibility Flags"] = version4.resources.script_runtime.compatibility_flags.join(", ");
212387
212574
  }
212388
212575
  logRaw(formatLabelledValues(scriptInfo));
212389
- const secrets = version3.resources.bindings.filter(
212576
+ const secrets = version4.resources.bindings.filter(
212390
212577
  (binding) => binding.type === "secret_text"
212391
212578
  );
212392
212579
  if (secrets.length > 0) {
@@ -212399,7 +212586,7 @@ async function versionsViewHandler(args) {
212399
212586
  );
212400
212587
  }
212401
212588
  }
212402
- const bindings = version3.resources.bindings.filter(
212589
+ const bindings = version4.resources.bindings.filter(
212403
212590
  (binding) => binding.type !== "secret_text"
212404
212591
  );
212405
212592
  if (bindings.length > 0) {
@@ -212795,14 +212982,14 @@ async function versionsDeploymentsListHandler(args) {
212795
212982
  await fetchVersions(accountId, workerName, versionCache, ...versionIds);
212796
212983
  const formattedDeployments = deployments2.map((deployment) => {
212797
212984
  const formattedVersions = deployment.versions.map((traffic) => {
212798
- const version3 = versionCache.get(traffic.version_id);
212799
- (0, import_assert4.default)(version3);
212985
+ const version4 = versionCache.get(traffic.version_id);
212986
+ (0, import_assert4.default)(version4);
212800
212987
  const percentage = brandColor(`(${traffic.percentage}%)`);
212801
212988
  const details = formatLabelledValues(
212802
212989
  {
212803
- Created: new Date(version3.metadata["created_on"]).toISOString(),
212804
- Tag: version3.annotations?.["workers/tag"] || BLANK_INPUT4,
212805
- Message: version3.annotations?.["workers/message"] || BLANK_INPUT4
212990
+ Created: new Date(version4.metadata["created_on"]).toISOString(),
212991
+ Tag: version4.annotations?.["workers/tag"] || BLANK_INPUT4,
212992
+ Message: version4.annotations?.["workers/message"] || BLANK_INPUT4
212806
212993
  },
212807
212994
  {
212808
212995
  indentationCount: 4,
@@ -212811,7 +212998,7 @@ async function versionsDeploymentsListHandler(args) {
212811
212998
  formatValue: (value) => gray(value)
212812
212999
  }
212813
213000
  );
212814
- return `${percentage} ${version3.id}
213001
+ return `${percentage} ${version4.id}
212815
213002
  ${details}`;
212816
213003
  });
212817
213004
  return formatLabelledValues({
@@ -212881,14 +213068,14 @@ async function versionsDeploymentsStatusHandler(args) {
212881
213068
  const versionIds = latestDeployment.versions.map((v2) => v2.version_id);
212882
213069
  await fetchVersions(accountId, workerName, versionCache, ...versionIds);
212883
213070
  const formattedVersions = latestDeployment.versions.map((traffic) => {
212884
- const version3 = versionCache.get(traffic.version_id);
212885
- (0, import_assert5.default)(version3);
213071
+ const version4 = versionCache.get(traffic.version_id);
213072
+ (0, import_assert5.default)(version4);
212886
213073
  const percentage = brandColor(`(${traffic.percentage}%)`);
212887
213074
  const details = formatLabelledValues(
212888
213075
  {
212889
- Created: new Date(version3.metadata["created_on"]).toISOString(),
212890
- Tag: version3.annotations?.["workers/tag"] || BLANK_INPUT5,
212891
- Message: version3.annotations?.["workers/message"] || BLANK_INPUT5
213076
+ Created: new Date(version4.metadata["created_on"]).toISOString(),
213077
+ Tag: version4.annotations?.["workers/tag"] || BLANK_INPUT5,
213078
+ Message: version4.annotations?.["workers/message"] || BLANK_INPUT5
212892
213079
  },
212893
213080
  {
212894
213081
  indentationCount: 4,
@@ -212897,7 +213084,7 @@ async function versionsDeploymentsStatusHandler(args) {
212897
213084
  formatValue: (value) => gray(value)
212898
213085
  }
212899
213086
  );
212900
- return `${percentage} ${version3.id}
213087
+ return `${percentage} ${version4.id}
212901
213088
  ${details}`;
212902
213089
  });
212903
213090
  const formattedDeployment = formatLabelledValues({
@@ -213015,7 +213202,7 @@ async function versionsRollbackHandler(args) {
213015
213202
  defaultValue: args.message ?? "Rollback"
213016
213203
  }
213017
213204
  );
213018
- const version3 = await fetchVersion(accountId, workerName, versionId);
213205
+ const version4 = await fetchVersion(accountId, workerName, versionId);
213019
213206
  warn(
213020
213207
  `You are about to rollback to Worker Version ${versionId}.
213021
213208
  This will immediately replace the current deployment and become the active deployment across all your deployed triggers.
@@ -213024,7 +213211,7 @@ Rolling back to a previous deployment will not rollback any of the bound resourc
213024
213211
  { multiline: true, shape: shapes.leftT }
213025
213212
  );
213026
213213
  const rollbackTraffic = /* @__PURE__ */ new Map([[versionId, 100]]);
213027
- printVersions([version3], rollbackTraffic);
213214
+ printVersions([version4], rollbackTraffic);
213028
213215
  const confirmed = await confirm(
213029
213216
  "Are you sure you want to deploy this Worker Version to 100% of traffic?",
213030
213217
  { defaultValue: true }
@@ -217893,3 +218080,4 @@ yargs-parser/build/lib/index.js:
217893
218080
  * SPDX-License-Identifier: ISC
217894
218081
  *)
217895
218082
  */
218083
+ //# sourceMappingURL=cli.js.map