@wix/create-new 0.0.64 → 0.0.66

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/index.js CHANGED
@@ -80,6 +80,7 @@ import {
80
80
  CliSystemErrorCode,
81
81
  RepoType,
82
82
  USER_CONFIG_FILENAME,
83
+ WIX_CONFIG_FILENAME,
83
84
  createPackageManager,
84
85
  execa,
85
86
  external_exports,
@@ -107,6 +108,7 @@ import {
107
108
  readPackageJson,
108
109
  require_is_git_url,
109
110
  require_lib,
111
+ require_semver,
110
112
  require_verror,
111
113
  runCommand,
112
114
  setupTestEnv,
@@ -116,7 +118,7 @@ import {
116
118
  writeJson,
117
119
  writePackageJson,
118
120
  zod_default
119
- } from "./chunk-6IGZ75IY.js";
121
+ } from "./chunk-6P27MUFC.js";
120
122
  import {
121
123
  __commonJS,
122
124
  __dirname,
@@ -3378,20 +3380,20 @@ Expecting one of '${allowedValues.join("', '")}'`);
3378
3380
  let debugOption;
3379
3381
  let debugHost = "127.0.0.1";
3380
3382
  let debugPort = "9229";
3381
- let match37;
3382
- if ((match37 = arg.match(/^(--inspect(-brk)?)$/)) !== null) {
3383
- debugOption = match37[1];
3384
- } else if ((match37 = arg.match(/^(--inspect(-brk|-port)?)=([^:]+)$/)) !== null) {
3385
- debugOption = match37[1];
3386
- if (/^\d+$/.test(match37[3])) {
3387
- debugPort = match37[3];
3383
+ let match39;
3384
+ if ((match39 = arg.match(/^(--inspect(-brk)?)$/)) !== null) {
3385
+ debugOption = match39[1];
3386
+ } else if ((match39 = arg.match(/^(--inspect(-brk|-port)?)=([^:]+)$/)) !== null) {
3387
+ debugOption = match39[1];
3388
+ if (/^\d+$/.test(match39[3])) {
3389
+ debugPort = match39[3];
3388
3390
  } else {
3389
- debugHost = match37[3];
3391
+ debugHost = match39[3];
3390
3392
  }
3391
- } else if ((match37 = arg.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/)) !== null) {
3392
- debugOption = match37[1];
3393
- debugHost = match37[3];
3394
- debugPort = match37[4];
3393
+ } else if ((match39 = arg.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/)) !== null) {
3394
+ debugOption = match39[1];
3395
+ debugHost = match39[3];
3396
+ debugPort = match39[4];
3395
3397
  }
3396
3398
  if (debugOption && debugPort !== "0") {
3397
3399
  return `${debugOption}=${debugHost}:${parseInt(debugPort) + 1}`;
@@ -5258,14 +5260,14 @@ var require_ms = __commonJS({
5258
5260
  if (str.length > 100) {
5259
5261
  return;
5260
5262
  }
5261
- var match37 = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(
5263
+ var match39 = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(
5262
5264
  str
5263
5265
  );
5264
- if (!match37) {
5266
+ if (!match39) {
5265
5267
  return;
5266
5268
  }
5267
- var n3 = parseFloat(match37[1]);
5268
- var type = (match37[2] || "ms").toLowerCase();
5269
+ var n3 = parseFloat(match39[1]);
5270
+ var type = (match39[2] || "ms").toLowerCase();
5269
5271
  switch (type) {
5270
5272
  case "years":
5271
5273
  case "year":
@@ -5398,19 +5400,19 @@ var require_common = __commonJS({
5398
5400
  args.unshift("%O");
5399
5401
  }
5400
5402
  let index = 0;
5401
- args[0] = args[0].replace(/%([a-zA-Z%])/g, (match37, format2) => {
5402
- if (match37 === "%%") {
5403
+ args[0] = args[0].replace(/%([a-zA-Z%])/g, (match39, format2) => {
5404
+ if (match39 === "%%") {
5403
5405
  return "%";
5404
5406
  }
5405
5407
  index++;
5406
5408
  const formatter = createDebug.formatters[format2];
5407
5409
  if (typeof formatter === "function") {
5408
5410
  const val = args[index];
5409
- match37 = formatter.call(self2, val);
5411
+ match39 = formatter.call(self2, val);
5410
5412
  args.splice(index, 1);
5411
5413
  index--;
5412
5414
  }
5413
- return match37;
5415
+ return match39;
5414
5416
  });
5415
5417
  createDebug.formatArgs.call(self2, args);
5416
5418
  const logFn = self2.log || createDebug.log;
@@ -5647,12 +5649,12 @@ var require_browser = __commonJS({
5647
5649
  args.splice(1, 0, c2, "color: inherit");
5648
5650
  let index = 0;
5649
5651
  let lastC = 0;
5650
- args[0].replace(/%[a-zA-Z%]/g, (match37) => {
5651
- if (match37 === "%%") {
5652
+ args[0].replace(/%[a-zA-Z%]/g, (match39) => {
5653
+ if (match39 === "%%") {
5652
5654
  return;
5653
5655
  }
5654
5656
  index++;
5655
- if (match37 === "%c") {
5657
+ if (match39 === "%c") {
5656
5658
  lastC = index;
5657
5659
  }
5658
5660
  });
@@ -6955,8 +6957,8 @@ var require_cookies = __commonJS({
6955
6957
  document.cookie = cookie.join("; ");
6956
6958
  },
6957
6959
  read: function read(name) {
6958
- var match37 = document.cookie.match(new RegExp("(^|;\\s*)(" + name + ")=([^;]*)"));
6959
- return match37 ? decodeURIComponent(match37[3]) : null;
6960
+ var match39 = document.cookie.match(new RegExp("(^|;\\s*)(" + name + ")=([^;]*)"));
6961
+ return match39 ? decodeURIComponent(match39[3]) : null;
6960
6962
  },
6961
6963
  remove: function remove(name) {
6962
6964
  this.write(name, "", Date.now() - 864e5);
@@ -14915,21 +14917,21 @@ var require_stack_utils = __commonJS({
14915
14917
  return res;
14916
14918
  }
14917
14919
  parseLine(line) {
14918
- const match37 = line && line.match(re);
14919
- if (!match37) {
14920
+ const match39 = line && line.match(re);
14921
+ if (!match39) {
14920
14922
  return null;
14921
14923
  }
14922
- const ctor = match37[1] === "new";
14923
- let fname = match37[2];
14924
- const evalOrigin = match37[3];
14925
- const evalFile = match37[4];
14926
- const evalLine = Number(match37[5]);
14927
- const evalCol = Number(match37[6]);
14928
- let file = match37[7];
14929
- const lnum = match37[8];
14930
- const col = match37[9];
14931
- const native = match37[10] === "native";
14932
- const closeParen = match37[11] === ")";
14924
+ const ctor = match39[1] === "new";
14925
+ let fname = match39[2];
14926
+ const evalOrigin = match39[3];
14927
+ const evalFile = match39[4];
14928
+ const evalLine = Number(match39[5]);
14929
+ const evalCol = Number(match39[6]);
14930
+ let file = match39[7];
14931
+ const lnum = match39[8];
14932
+ const col = match39[9];
14933
+ const native = match39[10] === "native";
14934
+ const closeParen = match39[11] === ")";
14933
14935
  let method;
14934
14936
  const res = {};
14935
14937
  if (lnum) {
@@ -18894,15 +18896,15 @@ var init_TraceState = __esm({
18894
18896
 
18895
18897
  // ../../node_modules/@opentelemetry/core/build/esm/trace/W3CTraceContextPropagator.js
18896
18898
  function parseTraceParent(traceParent) {
18897
- var match37 = TRACE_PARENT_REGEX.exec(traceParent);
18898
- if (!match37)
18899
+ var match39 = TRACE_PARENT_REGEX.exec(traceParent);
18900
+ if (!match39)
18899
18901
  return null;
18900
- if (match37[1] === "00" && match37[5])
18902
+ if (match39[1] === "00" && match39[5])
18901
18903
  return null;
18902
18904
  return {
18903
- traceId: match37[2],
18904
- spanId: match37[3],
18905
- traceFlags: parseInt(match37[4], 16)
18905
+ traceId: match39[2],
18906
+ spanId: match39[3],
18907
+ traceFlags: parseInt(match39[4], 16)
18906
18908
  };
18907
18909
  }
18908
18910
  var TRACE_PARENT_HEADER, TRACE_STATE_HEADER, VERSION2, VERSION_PART, TRACE_ID_PART, PARENT_ID_PART, FLAGS_PART, TRACE_PARENT_REGEX, W3CTraceContextPropagator;
@@ -19675,1960 +19677,6 @@ var init_esm4 = __esm({
19675
19677
  }
19676
19678
  });
19677
19679
 
19678
- // ../../node_modules/semver/internal/constants.js
19679
- var require_constants3 = __commonJS({
19680
- "../../node_modules/semver/internal/constants.js"(exports, module2) {
19681
- "use strict";
19682
- init_esm_shims();
19683
- var SEMVER_SPEC_VERSION = "2.0.0";
19684
- var MAX_LENGTH = 256;
19685
- var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || /* istanbul ignore next */
19686
- 9007199254740991;
19687
- var MAX_SAFE_COMPONENT_LENGTH = 16;
19688
- var MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6;
19689
- var RELEASE_TYPES = [
19690
- "major",
19691
- "premajor",
19692
- "minor",
19693
- "preminor",
19694
- "patch",
19695
- "prepatch",
19696
- "prerelease"
19697
- ];
19698
- module2.exports = {
19699
- MAX_LENGTH,
19700
- MAX_SAFE_COMPONENT_LENGTH,
19701
- MAX_SAFE_BUILD_LENGTH,
19702
- MAX_SAFE_INTEGER,
19703
- RELEASE_TYPES,
19704
- SEMVER_SPEC_VERSION,
19705
- FLAG_INCLUDE_PRERELEASE: 1,
19706
- FLAG_LOOSE: 2
19707
- };
19708
- }
19709
- });
19710
-
19711
- // ../../node_modules/semver/internal/debug.js
19712
- var require_debug2 = __commonJS({
19713
- "../../node_modules/semver/internal/debug.js"(exports, module2) {
19714
- "use strict";
19715
- init_esm_shims();
19716
- var debug3 = typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...args) => console.error("SEMVER", ...args) : () => {
19717
- };
19718
- module2.exports = debug3;
19719
- }
19720
- });
19721
-
19722
- // ../../node_modules/semver/internal/re.js
19723
- var require_re = __commonJS({
19724
- "../../node_modules/semver/internal/re.js"(exports, module2) {
19725
- "use strict";
19726
- init_esm_shims();
19727
- var {
19728
- MAX_SAFE_COMPONENT_LENGTH,
19729
- MAX_SAFE_BUILD_LENGTH,
19730
- MAX_LENGTH
19731
- } = require_constants3();
19732
- var debug3 = require_debug2();
19733
- exports = module2.exports = {};
19734
- var re = exports.re = [];
19735
- var safeRe = exports.safeRe = [];
19736
- var src = exports.src = [];
19737
- var safeSrc = exports.safeSrc = [];
19738
- var t3 = exports.t = {};
19739
- var R = 0;
19740
- var LETTERDASHNUMBER = "[a-zA-Z0-9-]";
19741
- var safeRegexReplacements = [
19742
- ["\\s", 1],
19743
- ["\\d", MAX_LENGTH],
19744
- [LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH]
19745
- ];
19746
- var makeSafeRegex = (value2) => {
19747
- for (const [token2, max] of safeRegexReplacements) {
19748
- value2 = value2.split(`${token2}*`).join(`${token2}{0,${max}}`).split(`${token2}+`).join(`${token2}{1,${max}}`);
19749
- }
19750
- return value2;
19751
- };
19752
- var createToken = (name, value2, isGlobal) => {
19753
- const safe = makeSafeRegex(value2);
19754
- const index = R++;
19755
- debug3(name, index, value2);
19756
- t3[name] = index;
19757
- src[index] = value2;
19758
- safeSrc[index] = safe;
19759
- re[index] = new RegExp(value2, isGlobal ? "g" : void 0);
19760
- safeRe[index] = new RegExp(safe, isGlobal ? "g" : void 0);
19761
- };
19762
- createToken("NUMERICIDENTIFIER", "0|[1-9]\\d*");
19763
- createToken("NUMERICIDENTIFIERLOOSE", "\\d+");
19764
- createToken("NONNUMERICIDENTIFIER", `\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`);
19765
- createToken("MAINVERSION", `(${src[t3.NUMERICIDENTIFIER]})\\.(${src[t3.NUMERICIDENTIFIER]})\\.(${src[t3.NUMERICIDENTIFIER]})`);
19766
- createToken("MAINVERSIONLOOSE", `(${src[t3.NUMERICIDENTIFIERLOOSE]})\\.(${src[t3.NUMERICIDENTIFIERLOOSE]})\\.(${src[t3.NUMERICIDENTIFIERLOOSE]})`);
19767
- createToken("PRERELEASEIDENTIFIER", `(?:${src[t3.NUMERICIDENTIFIER]}|${src[t3.NONNUMERICIDENTIFIER]})`);
19768
- createToken("PRERELEASEIDENTIFIERLOOSE", `(?:${src[t3.NUMERICIDENTIFIERLOOSE]}|${src[t3.NONNUMERICIDENTIFIER]})`);
19769
- createToken("PRERELEASE", `(?:-(${src[t3.PRERELEASEIDENTIFIER]}(?:\\.${src[t3.PRERELEASEIDENTIFIER]})*))`);
19770
- createToken("PRERELEASELOOSE", `(?:-?(${src[t3.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${src[t3.PRERELEASEIDENTIFIERLOOSE]})*))`);
19771
- createToken("BUILDIDENTIFIER", `${LETTERDASHNUMBER}+`);
19772
- createToken("BUILD", `(?:\\+(${src[t3.BUILDIDENTIFIER]}(?:\\.${src[t3.BUILDIDENTIFIER]})*))`);
19773
- createToken("FULLPLAIN", `v?${src[t3.MAINVERSION]}${src[t3.PRERELEASE]}?${src[t3.BUILD]}?`);
19774
- createToken("FULL", `^${src[t3.FULLPLAIN]}$`);
19775
- createToken("LOOSEPLAIN", `[v=\\s]*${src[t3.MAINVERSIONLOOSE]}${src[t3.PRERELEASELOOSE]}?${src[t3.BUILD]}?`);
19776
- createToken("LOOSE", `^${src[t3.LOOSEPLAIN]}$`);
19777
- createToken("GTLT", "((?:<|>)?=?)");
19778
- createToken("XRANGEIDENTIFIERLOOSE", `${src[t3.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);
19779
- createToken("XRANGEIDENTIFIER", `${src[t3.NUMERICIDENTIFIER]}|x|X|\\*`);
19780
- createToken("XRANGEPLAIN", `[v=\\s]*(${src[t3.XRANGEIDENTIFIER]})(?:\\.(${src[t3.XRANGEIDENTIFIER]})(?:\\.(${src[t3.XRANGEIDENTIFIER]})(?:${src[t3.PRERELEASE]})?${src[t3.BUILD]}?)?)?`);
19781
- createToken("XRANGEPLAINLOOSE", `[v=\\s]*(${src[t3.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t3.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t3.XRANGEIDENTIFIERLOOSE]})(?:${src[t3.PRERELEASELOOSE]})?${src[t3.BUILD]}?)?)?`);
19782
- createToken("XRANGE", `^${src[t3.GTLT]}\\s*${src[t3.XRANGEPLAIN]}$`);
19783
- createToken("XRANGELOOSE", `^${src[t3.GTLT]}\\s*${src[t3.XRANGEPLAINLOOSE]}$`);
19784
- createToken("COERCEPLAIN", `${"(^|[^\\d])(\\d{1,"}${MAX_SAFE_COMPONENT_LENGTH}})(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`);
19785
- createToken("COERCE", `${src[t3.COERCEPLAIN]}(?:$|[^\\d])`);
19786
- createToken("COERCEFULL", src[t3.COERCEPLAIN] + `(?:${src[t3.PRERELEASE]})?(?:${src[t3.BUILD]})?(?:$|[^\\d])`);
19787
- createToken("COERCERTL", src[t3.COERCE], true);
19788
- createToken("COERCERTLFULL", src[t3.COERCEFULL], true);
19789
- createToken("LONETILDE", "(?:~>?)");
19790
- createToken("TILDETRIM", `(\\s*)${src[t3.LONETILDE]}\\s+`, true);
19791
- exports.tildeTrimReplace = "$1~";
19792
- createToken("TILDE", `^${src[t3.LONETILDE]}${src[t3.XRANGEPLAIN]}$`);
19793
- createToken("TILDELOOSE", `^${src[t3.LONETILDE]}${src[t3.XRANGEPLAINLOOSE]}$`);
19794
- createToken("LONECARET", "(?:\\^)");
19795
- createToken("CARETTRIM", `(\\s*)${src[t3.LONECARET]}\\s+`, true);
19796
- exports.caretTrimReplace = "$1^";
19797
- createToken("CARET", `^${src[t3.LONECARET]}${src[t3.XRANGEPLAIN]}$`);
19798
- createToken("CARETLOOSE", `^${src[t3.LONECARET]}${src[t3.XRANGEPLAINLOOSE]}$`);
19799
- createToken("COMPARATORLOOSE", `^${src[t3.GTLT]}\\s*(${src[t3.LOOSEPLAIN]})$|^$`);
19800
- createToken("COMPARATOR", `^${src[t3.GTLT]}\\s*(${src[t3.FULLPLAIN]})$|^$`);
19801
- createToken("COMPARATORTRIM", `(\\s*)${src[t3.GTLT]}\\s*(${src[t3.LOOSEPLAIN]}|${src[t3.XRANGEPLAIN]})`, true);
19802
- exports.comparatorTrimReplace = "$1$2$3";
19803
- createToken("HYPHENRANGE", `^\\s*(${src[t3.XRANGEPLAIN]})\\s+-\\s+(${src[t3.XRANGEPLAIN]})\\s*$`);
19804
- createToken("HYPHENRANGELOOSE", `^\\s*(${src[t3.XRANGEPLAINLOOSE]})\\s+-\\s+(${src[t3.XRANGEPLAINLOOSE]})\\s*$`);
19805
- createToken("STAR", "(<|>)?=?\\s*\\*");
19806
- createToken("GTE0", "^\\s*>=\\s*0\\.0\\.0\\s*$");
19807
- createToken("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$");
19808
- }
19809
- });
19810
-
19811
- // ../../node_modules/semver/internal/parse-options.js
19812
- var require_parse_options = __commonJS({
19813
- "../../node_modules/semver/internal/parse-options.js"(exports, module2) {
19814
- "use strict";
19815
- init_esm_shims();
19816
- var looseOption = Object.freeze({ loose: true });
19817
- var emptyOpts = Object.freeze({});
19818
- var parseOptions = (options) => {
19819
- if (!options) {
19820
- return emptyOpts;
19821
- }
19822
- if (typeof options !== "object") {
19823
- return looseOption;
19824
- }
19825
- return options;
19826
- };
19827
- module2.exports = parseOptions;
19828
- }
19829
- });
19830
-
19831
- // ../../node_modules/semver/internal/identifiers.js
19832
- var require_identifiers = __commonJS({
19833
- "../../node_modules/semver/internal/identifiers.js"(exports, module2) {
19834
- "use strict";
19835
- init_esm_shims();
19836
- var numeric = /^[0-9]+$/;
19837
- var compareIdentifiers = (a2, b2) => {
19838
- const anum = numeric.test(a2);
19839
- const bnum = numeric.test(b2);
19840
- if (anum && bnum) {
19841
- a2 = +a2;
19842
- b2 = +b2;
19843
- }
19844
- return a2 === b2 ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a2 < b2 ? -1 : 1;
19845
- };
19846
- var rcompareIdentifiers = (a2, b2) => compareIdentifiers(b2, a2);
19847
- module2.exports = {
19848
- compareIdentifiers,
19849
- rcompareIdentifiers
19850
- };
19851
- }
19852
- });
19853
-
19854
- // ../../node_modules/semver/classes/semver.js
19855
- var require_semver = __commonJS({
19856
- "../../node_modules/semver/classes/semver.js"(exports, module2) {
19857
- "use strict";
19858
- init_esm_shims();
19859
- var debug3 = require_debug2();
19860
- var { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants3();
19861
- var { safeRe: re, safeSrc: src, t: t3 } = require_re();
19862
- var parseOptions = require_parse_options();
19863
- var { compareIdentifiers } = require_identifiers();
19864
- var SemVer = class _SemVer {
19865
- constructor(version, options) {
19866
- options = parseOptions(options);
19867
- if (version instanceof _SemVer) {
19868
- if (version.loose === !!options.loose && version.includePrerelease === !!options.includePrerelease) {
19869
- return version;
19870
- } else {
19871
- version = version.version;
19872
- }
19873
- } else if (typeof version !== "string") {
19874
- throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version}".`);
19875
- }
19876
- if (version.length > MAX_LENGTH) {
19877
- throw new TypeError(
19878
- `version is longer than ${MAX_LENGTH} characters`
19879
- );
19880
- }
19881
- debug3("SemVer", version, options);
19882
- this.options = options;
19883
- this.loose = !!options.loose;
19884
- this.includePrerelease = !!options.includePrerelease;
19885
- const m = version.trim().match(options.loose ? re[t3.LOOSE] : re[t3.FULL]);
19886
- if (!m) {
19887
- throw new TypeError(`Invalid Version: ${version}`);
19888
- }
19889
- this.raw = version;
19890
- this.major = +m[1];
19891
- this.minor = +m[2];
19892
- this.patch = +m[3];
19893
- if (this.major > MAX_SAFE_INTEGER || this.major < 0) {
19894
- throw new TypeError("Invalid major version");
19895
- }
19896
- if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) {
19897
- throw new TypeError("Invalid minor version");
19898
- }
19899
- if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) {
19900
- throw new TypeError("Invalid patch version");
19901
- }
19902
- if (!m[4]) {
19903
- this.prerelease = [];
19904
- } else {
19905
- this.prerelease = m[4].split(".").map((id) => {
19906
- if (/^[0-9]+$/.test(id)) {
19907
- const num = +id;
19908
- if (num >= 0 && num < MAX_SAFE_INTEGER) {
19909
- return num;
19910
- }
19911
- }
19912
- return id;
19913
- });
19914
- }
19915
- this.build = m[5] ? m[5].split(".") : [];
19916
- this.format();
19917
- }
19918
- format() {
19919
- this.version = `${this.major}.${this.minor}.${this.patch}`;
19920
- if (this.prerelease.length) {
19921
- this.version += `-${this.prerelease.join(".")}`;
19922
- }
19923
- return this.version;
19924
- }
19925
- toString() {
19926
- return this.version;
19927
- }
19928
- compare(other) {
19929
- debug3("SemVer.compare", this.version, this.options, other);
19930
- if (!(other instanceof _SemVer)) {
19931
- if (typeof other === "string" && other === this.version) {
19932
- return 0;
19933
- }
19934
- other = new _SemVer(other, this.options);
19935
- }
19936
- if (other.version === this.version) {
19937
- return 0;
19938
- }
19939
- return this.compareMain(other) || this.comparePre(other);
19940
- }
19941
- compareMain(other) {
19942
- if (!(other instanceof _SemVer)) {
19943
- other = new _SemVer(other, this.options);
19944
- }
19945
- return compareIdentifiers(this.major, other.major) || compareIdentifiers(this.minor, other.minor) || compareIdentifiers(this.patch, other.patch);
19946
- }
19947
- comparePre(other) {
19948
- if (!(other instanceof _SemVer)) {
19949
- other = new _SemVer(other, this.options);
19950
- }
19951
- if (this.prerelease.length && !other.prerelease.length) {
19952
- return -1;
19953
- } else if (!this.prerelease.length && other.prerelease.length) {
19954
- return 1;
19955
- } else if (!this.prerelease.length && !other.prerelease.length) {
19956
- return 0;
19957
- }
19958
- let i2 = 0;
19959
- do {
19960
- const a2 = this.prerelease[i2];
19961
- const b2 = other.prerelease[i2];
19962
- debug3("prerelease compare", i2, a2, b2);
19963
- if (a2 === void 0 && b2 === void 0) {
19964
- return 0;
19965
- } else if (b2 === void 0) {
19966
- return 1;
19967
- } else if (a2 === void 0) {
19968
- return -1;
19969
- } else if (a2 === b2) {
19970
- continue;
19971
- } else {
19972
- return compareIdentifiers(a2, b2);
19973
- }
19974
- } while (++i2);
19975
- }
19976
- compareBuild(other) {
19977
- if (!(other instanceof _SemVer)) {
19978
- other = new _SemVer(other, this.options);
19979
- }
19980
- let i2 = 0;
19981
- do {
19982
- const a2 = this.build[i2];
19983
- const b2 = other.build[i2];
19984
- debug3("build compare", i2, a2, b2);
19985
- if (a2 === void 0 && b2 === void 0) {
19986
- return 0;
19987
- } else if (b2 === void 0) {
19988
- return 1;
19989
- } else if (a2 === void 0) {
19990
- return -1;
19991
- } else if (a2 === b2) {
19992
- continue;
19993
- } else {
19994
- return compareIdentifiers(a2, b2);
19995
- }
19996
- } while (++i2);
19997
- }
19998
- // preminor will bump the version up to the next minor release, and immediately
19999
- // down to pre-release. premajor and prepatch work the same way.
20000
- inc(release2, identifier, identifierBase) {
20001
- if (release2.startsWith("pre")) {
20002
- if (!identifier && identifierBase === false) {
20003
- throw new Error("invalid increment argument: identifier is empty");
20004
- }
20005
- if (identifier) {
20006
- const r2 = new RegExp(`^${this.options.loose ? src[t3.PRERELEASELOOSE] : src[t3.PRERELEASE]}$`);
20007
- const match37 = `-${identifier}`.match(r2);
20008
- if (!match37 || match37[1] !== identifier) {
20009
- throw new Error(`invalid identifier: ${identifier}`);
20010
- }
20011
- }
20012
- }
20013
- switch (release2) {
20014
- case "premajor":
20015
- this.prerelease.length = 0;
20016
- this.patch = 0;
20017
- this.minor = 0;
20018
- this.major++;
20019
- this.inc("pre", identifier, identifierBase);
20020
- break;
20021
- case "preminor":
20022
- this.prerelease.length = 0;
20023
- this.patch = 0;
20024
- this.minor++;
20025
- this.inc("pre", identifier, identifierBase);
20026
- break;
20027
- case "prepatch":
20028
- this.prerelease.length = 0;
20029
- this.inc("patch", identifier, identifierBase);
20030
- this.inc("pre", identifier, identifierBase);
20031
- break;
20032
- // If the input is a non-prerelease version, this acts the same as
20033
- // prepatch.
20034
- case "prerelease":
20035
- if (this.prerelease.length === 0) {
20036
- this.inc("patch", identifier, identifierBase);
20037
- }
20038
- this.inc("pre", identifier, identifierBase);
20039
- break;
20040
- case "release":
20041
- if (this.prerelease.length === 0) {
20042
- throw new Error(`version ${this.raw} is not a prerelease`);
20043
- }
20044
- this.prerelease.length = 0;
20045
- break;
20046
- case "major":
20047
- if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) {
20048
- this.major++;
20049
- }
20050
- this.minor = 0;
20051
- this.patch = 0;
20052
- this.prerelease = [];
20053
- break;
20054
- case "minor":
20055
- if (this.patch !== 0 || this.prerelease.length === 0) {
20056
- this.minor++;
20057
- }
20058
- this.patch = 0;
20059
- this.prerelease = [];
20060
- break;
20061
- case "patch":
20062
- if (this.prerelease.length === 0) {
20063
- this.patch++;
20064
- }
20065
- this.prerelease = [];
20066
- break;
20067
- // This probably shouldn't be used publicly.
20068
- // 1.0.0 'pre' would become 1.0.0-0 which is the wrong direction.
20069
- case "pre": {
20070
- const base = Number(identifierBase) ? 1 : 0;
20071
- if (this.prerelease.length === 0) {
20072
- this.prerelease = [base];
20073
- } else {
20074
- let i2 = this.prerelease.length;
20075
- while (--i2 >= 0) {
20076
- if (typeof this.prerelease[i2] === "number") {
20077
- this.prerelease[i2]++;
20078
- i2 = -2;
20079
- }
20080
- }
20081
- if (i2 === -1) {
20082
- if (identifier === this.prerelease.join(".") && identifierBase === false) {
20083
- throw new Error("invalid increment argument: identifier already exists");
20084
- }
20085
- this.prerelease.push(base);
20086
- }
20087
- }
20088
- if (identifier) {
20089
- let prerelease = [identifier, base];
20090
- if (identifierBase === false) {
20091
- prerelease = [identifier];
20092
- }
20093
- if (compareIdentifiers(this.prerelease[0], identifier) === 0) {
20094
- if (isNaN(this.prerelease[1])) {
20095
- this.prerelease = prerelease;
20096
- }
20097
- } else {
20098
- this.prerelease = prerelease;
20099
- }
20100
- }
20101
- break;
20102
- }
20103
- default:
20104
- throw new Error(`invalid increment argument: ${release2}`);
20105
- }
20106
- this.raw = this.format();
20107
- if (this.build.length) {
20108
- this.raw += `+${this.build.join(".")}`;
20109
- }
20110
- return this;
20111
- }
20112
- };
20113
- module2.exports = SemVer;
20114
- }
20115
- });
20116
-
20117
- // ../../node_modules/semver/functions/parse.js
20118
- var require_parse = __commonJS({
20119
- "../../node_modules/semver/functions/parse.js"(exports, module2) {
20120
- "use strict";
20121
- init_esm_shims();
20122
- var SemVer = require_semver();
20123
- var parse4 = (version, options, throwErrors = false) => {
20124
- if (version instanceof SemVer) {
20125
- return version;
20126
- }
20127
- try {
20128
- return new SemVer(version, options);
20129
- } catch (er) {
20130
- if (!throwErrors) {
20131
- return null;
20132
- }
20133
- throw er;
20134
- }
20135
- };
20136
- module2.exports = parse4;
20137
- }
20138
- });
20139
-
20140
- // ../../node_modules/semver/functions/valid.js
20141
- var require_valid = __commonJS({
20142
- "../../node_modules/semver/functions/valid.js"(exports, module2) {
20143
- "use strict";
20144
- init_esm_shims();
20145
- var parse4 = require_parse();
20146
- var valid = (version, options) => {
20147
- const v = parse4(version, options);
20148
- return v ? v.version : null;
20149
- };
20150
- module2.exports = valid;
20151
- }
20152
- });
20153
-
20154
- // ../../node_modules/semver/functions/clean.js
20155
- var require_clean = __commonJS({
20156
- "../../node_modules/semver/functions/clean.js"(exports, module2) {
20157
- "use strict";
20158
- init_esm_shims();
20159
- var parse4 = require_parse();
20160
- var clean = (version, options) => {
20161
- const s2 = parse4(version.trim().replace(/^[=v]+/, ""), options);
20162
- return s2 ? s2.version : null;
20163
- };
20164
- module2.exports = clean;
20165
- }
20166
- });
20167
-
20168
- // ../../node_modules/semver/functions/inc.js
20169
- var require_inc = __commonJS({
20170
- "../../node_modules/semver/functions/inc.js"(exports, module2) {
20171
- "use strict";
20172
- init_esm_shims();
20173
- var SemVer = require_semver();
20174
- var inc = (version, release2, options, identifier, identifierBase) => {
20175
- if (typeof options === "string") {
20176
- identifierBase = identifier;
20177
- identifier = options;
20178
- options = void 0;
20179
- }
20180
- try {
20181
- return new SemVer(
20182
- version instanceof SemVer ? version.version : version,
20183
- options
20184
- ).inc(release2, identifier, identifierBase).version;
20185
- } catch (er) {
20186
- return null;
20187
- }
20188
- };
20189
- module2.exports = inc;
20190
- }
20191
- });
20192
-
20193
- // ../../node_modules/semver/functions/diff.js
20194
- var require_diff = __commonJS({
20195
- "../../node_modules/semver/functions/diff.js"(exports, module2) {
20196
- "use strict";
20197
- init_esm_shims();
20198
- var parse4 = require_parse();
20199
- var diff2 = (version1, version2) => {
20200
- const v1 = parse4(version1, null, true);
20201
- const v2 = parse4(version2, null, true);
20202
- const comparison = v1.compare(v2);
20203
- if (comparison === 0) {
20204
- return null;
20205
- }
20206
- const v1Higher = comparison > 0;
20207
- const highVersion = v1Higher ? v1 : v2;
20208
- const lowVersion = v1Higher ? v2 : v1;
20209
- const highHasPre = !!highVersion.prerelease.length;
20210
- const lowHasPre = !!lowVersion.prerelease.length;
20211
- if (lowHasPre && !highHasPre) {
20212
- if (!lowVersion.patch && !lowVersion.minor) {
20213
- return "major";
20214
- }
20215
- if (lowVersion.compareMain(highVersion) === 0) {
20216
- if (lowVersion.minor && !lowVersion.patch) {
20217
- return "minor";
20218
- }
20219
- return "patch";
20220
- }
20221
- }
20222
- const prefix = highHasPre ? "pre" : "";
20223
- if (v1.major !== v2.major) {
20224
- return prefix + "major";
20225
- }
20226
- if (v1.minor !== v2.minor) {
20227
- return prefix + "minor";
20228
- }
20229
- if (v1.patch !== v2.patch) {
20230
- return prefix + "patch";
20231
- }
20232
- return "prerelease";
20233
- };
20234
- module2.exports = diff2;
20235
- }
20236
- });
20237
-
20238
- // ../../node_modules/semver/functions/major.js
20239
- var require_major = __commonJS({
20240
- "../../node_modules/semver/functions/major.js"(exports, module2) {
20241
- "use strict";
20242
- init_esm_shims();
20243
- var SemVer = require_semver();
20244
- var major = (a2, loose) => new SemVer(a2, loose).major;
20245
- module2.exports = major;
20246
- }
20247
- });
20248
-
20249
- // ../../node_modules/semver/functions/minor.js
20250
- var require_minor = __commonJS({
20251
- "../../node_modules/semver/functions/minor.js"(exports, module2) {
20252
- "use strict";
20253
- init_esm_shims();
20254
- var SemVer = require_semver();
20255
- var minor = (a2, loose) => new SemVer(a2, loose).minor;
20256
- module2.exports = minor;
20257
- }
20258
- });
20259
-
20260
- // ../../node_modules/semver/functions/patch.js
20261
- var require_patch = __commonJS({
20262
- "../../node_modules/semver/functions/patch.js"(exports, module2) {
20263
- "use strict";
20264
- init_esm_shims();
20265
- var SemVer = require_semver();
20266
- var patch = (a2, loose) => new SemVer(a2, loose).patch;
20267
- module2.exports = patch;
20268
- }
20269
- });
20270
-
20271
- // ../../node_modules/semver/functions/prerelease.js
20272
- var require_prerelease = __commonJS({
20273
- "../../node_modules/semver/functions/prerelease.js"(exports, module2) {
20274
- "use strict";
20275
- init_esm_shims();
20276
- var parse4 = require_parse();
20277
- var prerelease = (version, options) => {
20278
- const parsed = parse4(version, options);
20279
- return parsed && parsed.prerelease.length ? parsed.prerelease : null;
20280
- };
20281
- module2.exports = prerelease;
20282
- }
20283
- });
20284
-
20285
- // ../../node_modules/semver/functions/compare.js
20286
- var require_compare = __commonJS({
20287
- "../../node_modules/semver/functions/compare.js"(exports, module2) {
20288
- "use strict";
20289
- init_esm_shims();
20290
- var SemVer = require_semver();
20291
- var compare = (a2, b2, loose) => new SemVer(a2, loose).compare(new SemVer(b2, loose));
20292
- module2.exports = compare;
20293
- }
20294
- });
20295
-
20296
- // ../../node_modules/semver/functions/rcompare.js
20297
- var require_rcompare = __commonJS({
20298
- "../../node_modules/semver/functions/rcompare.js"(exports, module2) {
20299
- "use strict";
20300
- init_esm_shims();
20301
- var compare = require_compare();
20302
- var rcompare = (a2, b2, loose) => compare(b2, a2, loose);
20303
- module2.exports = rcompare;
20304
- }
20305
- });
20306
-
20307
- // ../../node_modules/semver/functions/compare-loose.js
20308
- var require_compare_loose = __commonJS({
20309
- "../../node_modules/semver/functions/compare-loose.js"(exports, module2) {
20310
- "use strict";
20311
- init_esm_shims();
20312
- var compare = require_compare();
20313
- var compareLoose = (a2, b2) => compare(a2, b2, true);
20314
- module2.exports = compareLoose;
20315
- }
20316
- });
20317
-
20318
- // ../../node_modules/semver/functions/compare-build.js
20319
- var require_compare_build = __commonJS({
20320
- "../../node_modules/semver/functions/compare-build.js"(exports, module2) {
20321
- "use strict";
20322
- init_esm_shims();
20323
- var SemVer = require_semver();
20324
- var compareBuild = (a2, b2, loose) => {
20325
- const versionA = new SemVer(a2, loose);
20326
- const versionB = new SemVer(b2, loose);
20327
- return versionA.compare(versionB) || versionA.compareBuild(versionB);
20328
- };
20329
- module2.exports = compareBuild;
20330
- }
20331
- });
20332
-
20333
- // ../../node_modules/semver/functions/sort.js
20334
- var require_sort = __commonJS({
20335
- "../../node_modules/semver/functions/sort.js"(exports, module2) {
20336
- "use strict";
20337
- init_esm_shims();
20338
- var compareBuild = require_compare_build();
20339
- var sort = (list, loose) => list.sort((a2, b2) => compareBuild(a2, b2, loose));
20340
- module2.exports = sort;
20341
- }
20342
- });
20343
-
20344
- // ../../node_modules/semver/functions/rsort.js
20345
- var require_rsort = __commonJS({
20346
- "../../node_modules/semver/functions/rsort.js"(exports, module2) {
20347
- "use strict";
20348
- init_esm_shims();
20349
- var compareBuild = require_compare_build();
20350
- var rsort = (list, loose) => list.sort((a2, b2) => compareBuild(b2, a2, loose));
20351
- module2.exports = rsort;
20352
- }
20353
- });
20354
-
20355
- // ../../node_modules/semver/functions/gt.js
20356
- var require_gt = __commonJS({
20357
- "../../node_modules/semver/functions/gt.js"(exports, module2) {
20358
- "use strict";
20359
- init_esm_shims();
20360
- var compare = require_compare();
20361
- var gt = (a2, b2, loose) => compare(a2, b2, loose) > 0;
20362
- module2.exports = gt;
20363
- }
20364
- });
20365
-
20366
- // ../../node_modules/semver/functions/lt.js
20367
- var require_lt = __commonJS({
20368
- "../../node_modules/semver/functions/lt.js"(exports, module2) {
20369
- "use strict";
20370
- init_esm_shims();
20371
- var compare = require_compare();
20372
- var lt = (a2, b2, loose) => compare(a2, b2, loose) < 0;
20373
- module2.exports = lt;
20374
- }
20375
- });
20376
-
20377
- // ../../node_modules/semver/functions/eq.js
20378
- var require_eq = __commonJS({
20379
- "../../node_modules/semver/functions/eq.js"(exports, module2) {
20380
- "use strict";
20381
- init_esm_shims();
20382
- var compare = require_compare();
20383
- var eq = (a2, b2, loose) => compare(a2, b2, loose) === 0;
20384
- module2.exports = eq;
20385
- }
20386
- });
20387
-
20388
- // ../../node_modules/semver/functions/neq.js
20389
- var require_neq = __commonJS({
20390
- "../../node_modules/semver/functions/neq.js"(exports, module2) {
20391
- "use strict";
20392
- init_esm_shims();
20393
- var compare = require_compare();
20394
- var neq = (a2, b2, loose) => compare(a2, b2, loose) !== 0;
20395
- module2.exports = neq;
20396
- }
20397
- });
20398
-
20399
- // ../../node_modules/semver/functions/gte.js
20400
- var require_gte = __commonJS({
20401
- "../../node_modules/semver/functions/gte.js"(exports, module2) {
20402
- "use strict";
20403
- init_esm_shims();
20404
- var compare = require_compare();
20405
- var gte = (a2, b2, loose) => compare(a2, b2, loose) >= 0;
20406
- module2.exports = gte;
20407
- }
20408
- });
20409
-
20410
- // ../../node_modules/semver/functions/lte.js
20411
- var require_lte = __commonJS({
20412
- "../../node_modules/semver/functions/lte.js"(exports, module2) {
20413
- "use strict";
20414
- init_esm_shims();
20415
- var compare = require_compare();
20416
- var lte = (a2, b2, loose) => compare(a2, b2, loose) <= 0;
20417
- module2.exports = lte;
20418
- }
20419
- });
20420
-
20421
- // ../../node_modules/semver/functions/cmp.js
20422
- var require_cmp = __commonJS({
20423
- "../../node_modules/semver/functions/cmp.js"(exports, module2) {
20424
- "use strict";
20425
- init_esm_shims();
20426
- var eq = require_eq();
20427
- var neq = require_neq();
20428
- var gt = require_gt();
20429
- var gte = require_gte();
20430
- var lt = require_lt();
20431
- var lte = require_lte();
20432
- var cmp = (a2, op, b2, loose) => {
20433
- switch (op) {
20434
- case "===":
20435
- if (typeof a2 === "object") {
20436
- a2 = a2.version;
20437
- }
20438
- if (typeof b2 === "object") {
20439
- b2 = b2.version;
20440
- }
20441
- return a2 === b2;
20442
- case "!==":
20443
- if (typeof a2 === "object") {
20444
- a2 = a2.version;
20445
- }
20446
- if (typeof b2 === "object") {
20447
- b2 = b2.version;
20448
- }
20449
- return a2 !== b2;
20450
- case "":
20451
- case "=":
20452
- case "==":
20453
- return eq(a2, b2, loose);
20454
- case "!=":
20455
- return neq(a2, b2, loose);
20456
- case ">":
20457
- return gt(a2, b2, loose);
20458
- case ">=":
20459
- return gte(a2, b2, loose);
20460
- case "<":
20461
- return lt(a2, b2, loose);
20462
- case "<=":
20463
- return lte(a2, b2, loose);
20464
- default:
20465
- throw new TypeError(`Invalid operator: ${op}`);
20466
- }
20467
- };
20468
- module2.exports = cmp;
20469
- }
20470
- });
20471
-
20472
- // ../../node_modules/semver/functions/coerce.js
20473
- var require_coerce = __commonJS({
20474
- "../../node_modules/semver/functions/coerce.js"(exports, module2) {
20475
- "use strict";
20476
- init_esm_shims();
20477
- var SemVer = require_semver();
20478
- var parse4 = require_parse();
20479
- var { safeRe: re, t: t3 } = require_re();
20480
- var coerce = (version, options) => {
20481
- if (version instanceof SemVer) {
20482
- return version;
20483
- }
20484
- if (typeof version === "number") {
20485
- version = String(version);
20486
- }
20487
- if (typeof version !== "string") {
20488
- return null;
20489
- }
20490
- options = options || {};
20491
- let match37 = null;
20492
- if (!options.rtl) {
20493
- match37 = version.match(options.includePrerelease ? re[t3.COERCEFULL] : re[t3.COERCE]);
20494
- } else {
20495
- const coerceRtlRegex = options.includePrerelease ? re[t3.COERCERTLFULL] : re[t3.COERCERTL];
20496
- let next;
20497
- while ((next = coerceRtlRegex.exec(version)) && (!match37 || match37.index + match37[0].length !== version.length)) {
20498
- if (!match37 || next.index + next[0].length !== match37.index + match37[0].length) {
20499
- match37 = next;
20500
- }
20501
- coerceRtlRegex.lastIndex = next.index + next[1].length + next[2].length;
20502
- }
20503
- coerceRtlRegex.lastIndex = -1;
20504
- }
20505
- if (match37 === null) {
20506
- return null;
20507
- }
20508
- const major = match37[2];
20509
- const minor = match37[3] || "0";
20510
- const patch = match37[4] || "0";
20511
- const prerelease = options.includePrerelease && match37[5] ? `-${match37[5]}` : "";
20512
- const build = options.includePrerelease && match37[6] ? `+${match37[6]}` : "";
20513
- return parse4(`${major}.${minor}.${patch}${prerelease}${build}`, options);
20514
- };
20515
- module2.exports = coerce;
20516
- }
20517
- });
20518
-
20519
- // ../../node_modules/semver/internal/lrucache.js
20520
- var require_lrucache = __commonJS({
20521
- "../../node_modules/semver/internal/lrucache.js"(exports, module2) {
20522
- "use strict";
20523
- init_esm_shims();
20524
- var LRUCache = class {
20525
- constructor() {
20526
- this.max = 1e3;
20527
- this.map = /* @__PURE__ */ new Map();
20528
- }
20529
- get(key) {
20530
- const value2 = this.map.get(key);
20531
- if (value2 === void 0) {
20532
- return void 0;
20533
- } else {
20534
- this.map.delete(key);
20535
- this.map.set(key, value2);
20536
- return value2;
20537
- }
20538
- }
20539
- delete(key) {
20540
- return this.map.delete(key);
20541
- }
20542
- set(key, value2) {
20543
- const deleted = this.delete(key);
20544
- if (!deleted && value2 !== void 0) {
20545
- if (this.map.size >= this.max) {
20546
- const firstKey = this.map.keys().next().value;
20547
- this.delete(firstKey);
20548
- }
20549
- this.map.set(key, value2);
20550
- }
20551
- return this;
20552
- }
20553
- };
20554
- module2.exports = LRUCache;
20555
- }
20556
- });
20557
-
20558
- // ../../node_modules/semver/classes/range.js
20559
- var require_range = __commonJS({
20560
- "../../node_modules/semver/classes/range.js"(exports, module2) {
20561
- "use strict";
20562
- init_esm_shims();
20563
- var SPACE_CHARACTERS = /\s+/g;
20564
- var Range = class _Range {
20565
- constructor(range, options) {
20566
- options = parseOptions(options);
20567
- if (range instanceof _Range) {
20568
- if (range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease) {
20569
- return range;
20570
- } else {
20571
- return new _Range(range.raw, options);
20572
- }
20573
- }
20574
- if (range instanceof Comparator) {
20575
- this.raw = range.value;
20576
- this.set = [[range]];
20577
- this.formatted = void 0;
20578
- return this;
20579
- }
20580
- this.options = options;
20581
- this.loose = !!options.loose;
20582
- this.includePrerelease = !!options.includePrerelease;
20583
- this.raw = range.trim().replace(SPACE_CHARACTERS, " ");
20584
- this.set = this.raw.split("||").map((r2) => this.parseRange(r2.trim())).filter((c2) => c2.length);
20585
- if (!this.set.length) {
20586
- throw new TypeError(`Invalid SemVer Range: ${this.raw}`);
20587
- }
20588
- if (this.set.length > 1) {
20589
- const first = this.set[0];
20590
- this.set = this.set.filter((c2) => !isNullSet(c2[0]));
20591
- if (this.set.length === 0) {
20592
- this.set = [first];
20593
- } else if (this.set.length > 1) {
20594
- for (const c2 of this.set) {
20595
- if (c2.length === 1 && isAny(c2[0])) {
20596
- this.set = [c2];
20597
- break;
20598
- }
20599
- }
20600
- }
20601
- }
20602
- this.formatted = void 0;
20603
- }
20604
- get range() {
20605
- if (this.formatted === void 0) {
20606
- this.formatted = "";
20607
- for (let i2 = 0; i2 < this.set.length; i2++) {
20608
- if (i2 > 0) {
20609
- this.formatted += "||";
20610
- }
20611
- const comps = this.set[i2];
20612
- for (let k = 0; k < comps.length; k++) {
20613
- if (k > 0) {
20614
- this.formatted += " ";
20615
- }
20616
- this.formatted += comps[k].toString().trim();
20617
- }
20618
- }
20619
- }
20620
- return this.formatted;
20621
- }
20622
- format() {
20623
- return this.range;
20624
- }
20625
- toString() {
20626
- return this.range;
20627
- }
20628
- parseRange(range) {
20629
- const memoOpts = (this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) | (this.options.loose && FLAG_LOOSE);
20630
- const memoKey = memoOpts + ":" + range;
20631
- const cached = cache3.get(memoKey);
20632
- if (cached) {
20633
- return cached;
20634
- }
20635
- const loose = this.options.loose;
20636
- const hr = loose ? re[t3.HYPHENRANGELOOSE] : re[t3.HYPHENRANGE];
20637
- range = range.replace(hr, hyphenReplace(this.options.includePrerelease));
20638
- debug3("hyphen replace", range);
20639
- range = range.replace(re[t3.COMPARATORTRIM], comparatorTrimReplace);
20640
- debug3("comparator trim", range);
20641
- range = range.replace(re[t3.TILDETRIM], tildeTrimReplace);
20642
- debug3("tilde trim", range);
20643
- range = range.replace(re[t3.CARETTRIM], caretTrimReplace);
20644
- debug3("caret trim", range);
20645
- let rangeList = range.split(" ").map((comp) => parseComparator(comp, this.options)).join(" ").split(/\s+/).map((comp) => replaceGTE0(comp, this.options));
20646
- if (loose) {
20647
- rangeList = rangeList.filter((comp) => {
20648
- debug3("loose invalid filter", comp, this.options);
20649
- return !!comp.match(re[t3.COMPARATORLOOSE]);
20650
- });
20651
- }
20652
- debug3("range list", rangeList);
20653
- const rangeMap = /* @__PURE__ */ new Map();
20654
- const comparators = rangeList.map((comp) => new Comparator(comp, this.options));
20655
- for (const comp of comparators) {
20656
- if (isNullSet(comp)) {
20657
- return [comp];
20658
- }
20659
- rangeMap.set(comp.value, comp);
20660
- }
20661
- if (rangeMap.size > 1 && rangeMap.has("")) {
20662
- rangeMap.delete("");
20663
- }
20664
- const result = [...rangeMap.values()];
20665
- cache3.set(memoKey, result);
20666
- return result;
20667
- }
20668
- intersects(range, options) {
20669
- if (!(range instanceof _Range)) {
20670
- throw new TypeError("a Range is required");
20671
- }
20672
- return this.set.some((thisComparators) => {
20673
- return isSatisfiable(thisComparators, options) && range.set.some((rangeComparators) => {
20674
- return isSatisfiable(rangeComparators, options) && thisComparators.every((thisComparator) => {
20675
- return rangeComparators.every((rangeComparator) => {
20676
- return thisComparator.intersects(rangeComparator, options);
20677
- });
20678
- });
20679
- });
20680
- });
20681
- }
20682
- // if ANY of the sets match ALL of its comparators, then pass
20683
- test(version) {
20684
- if (!version) {
20685
- return false;
20686
- }
20687
- if (typeof version === "string") {
20688
- try {
20689
- version = new SemVer(version, this.options);
20690
- } catch (er) {
20691
- return false;
20692
- }
20693
- }
20694
- for (let i2 = 0; i2 < this.set.length; i2++) {
20695
- if (testSet(this.set[i2], version, this.options)) {
20696
- return true;
20697
- }
20698
- }
20699
- return false;
20700
- }
20701
- };
20702
- module2.exports = Range;
20703
- var LRU = require_lrucache();
20704
- var cache3 = new LRU();
20705
- var parseOptions = require_parse_options();
20706
- var Comparator = require_comparator();
20707
- var debug3 = require_debug2();
20708
- var SemVer = require_semver();
20709
- var {
20710
- safeRe: re,
20711
- t: t3,
20712
- comparatorTrimReplace,
20713
- tildeTrimReplace,
20714
- caretTrimReplace
20715
- } = require_re();
20716
- var { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require_constants3();
20717
- var isNullSet = (c2) => c2.value === "<0.0.0-0";
20718
- var isAny = (c2) => c2.value === "";
20719
- var isSatisfiable = (comparators, options) => {
20720
- let result = true;
20721
- const remainingComparators = comparators.slice();
20722
- let testComparator = remainingComparators.pop();
20723
- while (result && remainingComparators.length) {
20724
- result = remainingComparators.every((otherComparator) => {
20725
- return testComparator.intersects(otherComparator, options);
20726
- });
20727
- testComparator = remainingComparators.pop();
20728
- }
20729
- return result;
20730
- };
20731
- var parseComparator = (comp, options) => {
20732
- debug3("comp", comp, options);
20733
- comp = replaceCarets(comp, options);
20734
- debug3("caret", comp);
20735
- comp = replaceTildes(comp, options);
20736
- debug3("tildes", comp);
20737
- comp = replaceXRanges(comp, options);
20738
- debug3("xrange", comp);
20739
- comp = replaceStars(comp, options);
20740
- debug3("stars", comp);
20741
- return comp;
20742
- };
20743
- var isX = (id) => !id || id.toLowerCase() === "x" || id === "*";
20744
- var replaceTildes = (comp, options) => {
20745
- return comp.trim().split(/\s+/).map((c2) => replaceTilde(c2, options)).join(" ");
20746
- };
20747
- var replaceTilde = (comp, options) => {
20748
- const r2 = options.loose ? re[t3.TILDELOOSE] : re[t3.TILDE];
20749
- return comp.replace(r2, (_2, M, m, p, pr) => {
20750
- debug3("tilde", comp, _2, M, m, p, pr);
20751
- let ret;
20752
- if (isX(M)) {
20753
- ret = "";
20754
- } else if (isX(m)) {
20755
- ret = `>=${M}.0.0 <${+M + 1}.0.0-0`;
20756
- } else if (isX(p)) {
20757
- ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0`;
20758
- } else if (pr) {
20759
- debug3("replaceTilde pr", pr);
20760
- ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`;
20761
- } else {
20762
- ret = `>=${M}.${m}.${p} <${M}.${+m + 1}.0-0`;
20763
- }
20764
- debug3("tilde return", ret);
20765
- return ret;
20766
- });
20767
- };
20768
- var replaceCarets = (comp, options) => {
20769
- return comp.trim().split(/\s+/).map((c2) => replaceCaret(c2, options)).join(" ");
20770
- };
20771
- var replaceCaret = (comp, options) => {
20772
- debug3("caret", comp, options);
20773
- const r2 = options.loose ? re[t3.CARETLOOSE] : re[t3.CARET];
20774
- const z = options.includePrerelease ? "-0" : "";
20775
- return comp.replace(r2, (_2, M, m, p, pr) => {
20776
- debug3("caret", comp, _2, M, m, p, pr);
20777
- let ret;
20778
- if (isX(M)) {
20779
- ret = "";
20780
- } else if (isX(m)) {
20781
- ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`;
20782
- } else if (isX(p)) {
20783
- if (M === "0") {
20784
- ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`;
20785
- } else {
20786
- ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0`;
20787
- }
20788
- } else if (pr) {
20789
- debug3("replaceCaret pr", pr);
20790
- if (M === "0") {
20791
- if (m === "0") {
20792
- ret = `>=${M}.${m}.${p}-${pr} <${M}.${m}.${+p + 1}-0`;
20793
- } else {
20794
- ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`;
20795
- }
20796
- } else {
20797
- ret = `>=${M}.${m}.${p}-${pr} <${+M + 1}.0.0-0`;
20798
- }
20799
- } else {
20800
- debug3("no pr");
20801
- if (M === "0") {
20802
- if (m === "0") {
20803
- ret = `>=${M}.${m}.${p}${z} <${M}.${m}.${+p + 1}-0`;
20804
- } else {
20805
- ret = `>=${M}.${m}.${p}${z} <${M}.${+m + 1}.0-0`;
20806
- }
20807
- } else {
20808
- ret = `>=${M}.${m}.${p} <${+M + 1}.0.0-0`;
20809
- }
20810
- }
20811
- debug3("caret return", ret);
20812
- return ret;
20813
- });
20814
- };
20815
- var replaceXRanges = (comp, options) => {
20816
- debug3("replaceXRanges", comp, options);
20817
- return comp.split(/\s+/).map((c2) => replaceXRange(c2, options)).join(" ");
20818
- };
20819
- var replaceXRange = (comp, options) => {
20820
- comp = comp.trim();
20821
- const r2 = options.loose ? re[t3.XRANGELOOSE] : re[t3.XRANGE];
20822
- return comp.replace(r2, (ret, gtlt, M, m, p, pr) => {
20823
- debug3("xRange", comp, ret, gtlt, M, m, p, pr);
20824
- const xM = isX(M);
20825
- const xm = xM || isX(m);
20826
- const xp = xm || isX(p);
20827
- const anyX = xp;
20828
- if (gtlt === "=" && anyX) {
20829
- gtlt = "";
20830
- }
20831
- pr = options.includePrerelease ? "-0" : "";
20832
- if (xM) {
20833
- if (gtlt === ">" || gtlt === "<") {
20834
- ret = "<0.0.0-0";
20835
- } else {
20836
- ret = "*";
20837
- }
20838
- } else if (gtlt && anyX) {
20839
- if (xm) {
20840
- m = 0;
20841
- }
20842
- p = 0;
20843
- if (gtlt === ">") {
20844
- gtlt = ">=";
20845
- if (xm) {
20846
- M = +M + 1;
20847
- m = 0;
20848
- p = 0;
20849
- } else {
20850
- m = +m + 1;
20851
- p = 0;
20852
- }
20853
- } else if (gtlt === "<=") {
20854
- gtlt = "<";
20855
- if (xm) {
20856
- M = +M + 1;
20857
- } else {
20858
- m = +m + 1;
20859
- }
20860
- }
20861
- if (gtlt === "<") {
20862
- pr = "-0";
20863
- }
20864
- ret = `${gtlt + M}.${m}.${p}${pr}`;
20865
- } else if (xm) {
20866
- ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0`;
20867
- } else if (xp) {
20868
- ret = `>=${M}.${m}.0${pr} <${M}.${+m + 1}.0-0`;
20869
- }
20870
- debug3("xRange return", ret);
20871
- return ret;
20872
- });
20873
- };
20874
- var replaceStars = (comp, options) => {
20875
- debug3("replaceStars", comp, options);
20876
- return comp.trim().replace(re[t3.STAR], "");
20877
- };
20878
- var replaceGTE0 = (comp, options) => {
20879
- debug3("replaceGTE0", comp, options);
20880
- return comp.trim().replace(re[options.includePrerelease ? t3.GTE0PRE : t3.GTE0], "");
20881
- };
20882
- var hyphenReplace = (incPr) => ($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr) => {
20883
- if (isX(fM)) {
20884
- from = "";
20885
- } else if (isX(fm)) {
20886
- from = `>=${fM}.0.0${incPr ? "-0" : ""}`;
20887
- } else if (isX(fp)) {
20888
- from = `>=${fM}.${fm}.0${incPr ? "-0" : ""}`;
20889
- } else if (fpr) {
20890
- from = `>=${from}`;
20891
- } else {
20892
- from = `>=${from}${incPr ? "-0" : ""}`;
20893
- }
20894
- if (isX(tM)) {
20895
- to = "";
20896
- } else if (isX(tm)) {
20897
- to = `<${+tM + 1}.0.0-0`;
20898
- } else if (isX(tp)) {
20899
- to = `<${tM}.${+tm + 1}.0-0`;
20900
- } else if (tpr) {
20901
- to = `<=${tM}.${tm}.${tp}-${tpr}`;
20902
- } else if (incPr) {
20903
- to = `<${tM}.${tm}.${+tp + 1}-0`;
20904
- } else {
20905
- to = `<=${to}`;
20906
- }
20907
- return `${from} ${to}`.trim();
20908
- };
20909
- var testSet = (set, version, options) => {
20910
- for (let i2 = 0; i2 < set.length; i2++) {
20911
- if (!set[i2].test(version)) {
20912
- return false;
20913
- }
20914
- }
20915
- if (version.prerelease.length && !options.includePrerelease) {
20916
- for (let i2 = 0; i2 < set.length; i2++) {
20917
- debug3(set[i2].semver);
20918
- if (set[i2].semver === Comparator.ANY) {
20919
- continue;
20920
- }
20921
- if (set[i2].semver.prerelease.length > 0) {
20922
- const allowed = set[i2].semver;
20923
- if (allowed.major === version.major && allowed.minor === version.minor && allowed.patch === version.patch) {
20924
- return true;
20925
- }
20926
- }
20927
- }
20928
- return false;
20929
- }
20930
- return true;
20931
- };
20932
- }
20933
- });
20934
-
20935
- // ../../node_modules/semver/classes/comparator.js
20936
- var require_comparator = __commonJS({
20937
- "../../node_modules/semver/classes/comparator.js"(exports, module2) {
20938
- "use strict";
20939
- init_esm_shims();
20940
- var ANY = Symbol("SemVer ANY");
20941
- var Comparator = class _Comparator {
20942
- static get ANY() {
20943
- return ANY;
20944
- }
20945
- constructor(comp, options) {
20946
- options = parseOptions(options);
20947
- if (comp instanceof _Comparator) {
20948
- if (comp.loose === !!options.loose) {
20949
- return comp;
20950
- } else {
20951
- comp = comp.value;
20952
- }
20953
- }
20954
- comp = comp.trim().split(/\s+/).join(" ");
20955
- debug3("comparator", comp, options);
20956
- this.options = options;
20957
- this.loose = !!options.loose;
20958
- this.parse(comp);
20959
- if (this.semver === ANY) {
20960
- this.value = "";
20961
- } else {
20962
- this.value = this.operator + this.semver.version;
20963
- }
20964
- debug3("comp", this);
20965
- }
20966
- parse(comp) {
20967
- const r2 = this.options.loose ? re[t3.COMPARATORLOOSE] : re[t3.COMPARATOR];
20968
- const m = comp.match(r2);
20969
- if (!m) {
20970
- throw new TypeError(`Invalid comparator: ${comp}`);
20971
- }
20972
- this.operator = m[1] !== void 0 ? m[1] : "";
20973
- if (this.operator === "=") {
20974
- this.operator = "";
20975
- }
20976
- if (!m[2]) {
20977
- this.semver = ANY;
20978
- } else {
20979
- this.semver = new SemVer(m[2], this.options.loose);
20980
- }
20981
- }
20982
- toString() {
20983
- return this.value;
20984
- }
20985
- test(version) {
20986
- debug3("Comparator.test", version, this.options.loose);
20987
- if (this.semver === ANY || version === ANY) {
20988
- return true;
20989
- }
20990
- if (typeof version === "string") {
20991
- try {
20992
- version = new SemVer(version, this.options);
20993
- } catch (er) {
20994
- return false;
20995
- }
20996
- }
20997
- return cmp(version, this.operator, this.semver, this.options);
20998
- }
20999
- intersects(comp, options) {
21000
- if (!(comp instanceof _Comparator)) {
21001
- throw new TypeError("a Comparator is required");
21002
- }
21003
- if (this.operator === "") {
21004
- if (this.value === "") {
21005
- return true;
21006
- }
21007
- return new Range(comp.value, options).test(this.value);
21008
- } else if (comp.operator === "") {
21009
- if (comp.value === "") {
21010
- return true;
21011
- }
21012
- return new Range(this.value, options).test(comp.semver);
21013
- }
21014
- options = parseOptions(options);
21015
- if (options.includePrerelease && (this.value === "<0.0.0-0" || comp.value === "<0.0.0-0")) {
21016
- return false;
21017
- }
21018
- if (!options.includePrerelease && (this.value.startsWith("<0.0.0") || comp.value.startsWith("<0.0.0"))) {
21019
- return false;
21020
- }
21021
- if (this.operator.startsWith(">") && comp.operator.startsWith(">")) {
21022
- return true;
21023
- }
21024
- if (this.operator.startsWith("<") && comp.operator.startsWith("<")) {
21025
- return true;
21026
- }
21027
- if (this.semver.version === comp.semver.version && this.operator.includes("=") && comp.operator.includes("=")) {
21028
- return true;
21029
- }
21030
- if (cmp(this.semver, "<", comp.semver, options) && this.operator.startsWith(">") && comp.operator.startsWith("<")) {
21031
- return true;
21032
- }
21033
- if (cmp(this.semver, ">", comp.semver, options) && this.operator.startsWith("<") && comp.operator.startsWith(">")) {
21034
- return true;
21035
- }
21036
- return false;
21037
- }
21038
- };
21039
- module2.exports = Comparator;
21040
- var parseOptions = require_parse_options();
21041
- var { safeRe: re, t: t3 } = require_re();
21042
- var cmp = require_cmp();
21043
- var debug3 = require_debug2();
21044
- var SemVer = require_semver();
21045
- var Range = require_range();
21046
- }
21047
- });
21048
-
21049
- // ../../node_modules/semver/functions/satisfies.js
21050
- var require_satisfies = __commonJS({
21051
- "../../node_modules/semver/functions/satisfies.js"(exports, module2) {
21052
- "use strict";
21053
- init_esm_shims();
21054
- var Range = require_range();
21055
- var satisfies2 = (version, range, options) => {
21056
- try {
21057
- range = new Range(range, options);
21058
- } catch (er) {
21059
- return false;
21060
- }
21061
- return range.test(version);
21062
- };
21063
- module2.exports = satisfies2;
21064
- }
21065
- });
21066
-
21067
- // ../../node_modules/semver/ranges/to-comparators.js
21068
- var require_to_comparators = __commonJS({
21069
- "../../node_modules/semver/ranges/to-comparators.js"(exports, module2) {
21070
- "use strict";
21071
- init_esm_shims();
21072
- var Range = require_range();
21073
- var toComparators = (range, options) => new Range(range, options).set.map((comp) => comp.map((c2) => c2.value).join(" ").trim().split(" "));
21074
- module2.exports = toComparators;
21075
- }
21076
- });
21077
-
21078
- // ../../node_modules/semver/ranges/max-satisfying.js
21079
- var require_max_satisfying = __commonJS({
21080
- "../../node_modules/semver/ranges/max-satisfying.js"(exports, module2) {
21081
- "use strict";
21082
- init_esm_shims();
21083
- var SemVer = require_semver();
21084
- var Range = require_range();
21085
- var maxSatisfying = (versions, range, options) => {
21086
- let max = null;
21087
- let maxSV = null;
21088
- let rangeObj = null;
21089
- try {
21090
- rangeObj = new Range(range, options);
21091
- } catch (er) {
21092
- return null;
21093
- }
21094
- versions.forEach((v) => {
21095
- if (rangeObj.test(v)) {
21096
- if (!max || maxSV.compare(v) === -1) {
21097
- max = v;
21098
- maxSV = new SemVer(max, options);
21099
- }
21100
- }
21101
- });
21102
- return max;
21103
- };
21104
- module2.exports = maxSatisfying;
21105
- }
21106
- });
21107
-
21108
- // ../../node_modules/semver/ranges/min-satisfying.js
21109
- var require_min_satisfying = __commonJS({
21110
- "../../node_modules/semver/ranges/min-satisfying.js"(exports, module2) {
21111
- "use strict";
21112
- init_esm_shims();
21113
- var SemVer = require_semver();
21114
- var Range = require_range();
21115
- var minSatisfying = (versions, range, options) => {
21116
- let min = null;
21117
- let minSV = null;
21118
- let rangeObj = null;
21119
- try {
21120
- rangeObj = new Range(range, options);
21121
- } catch (er) {
21122
- return null;
21123
- }
21124
- versions.forEach((v) => {
21125
- if (rangeObj.test(v)) {
21126
- if (!min || minSV.compare(v) === 1) {
21127
- min = v;
21128
- minSV = new SemVer(min, options);
21129
- }
21130
- }
21131
- });
21132
- return min;
21133
- };
21134
- module2.exports = minSatisfying;
21135
- }
21136
- });
21137
-
21138
- // ../../node_modules/semver/ranges/min-version.js
21139
- var require_min_version = __commonJS({
21140
- "../../node_modules/semver/ranges/min-version.js"(exports, module2) {
21141
- "use strict";
21142
- init_esm_shims();
21143
- var SemVer = require_semver();
21144
- var Range = require_range();
21145
- var gt = require_gt();
21146
- var minVersion = (range, loose) => {
21147
- range = new Range(range, loose);
21148
- let minver = new SemVer("0.0.0");
21149
- if (range.test(minver)) {
21150
- return minver;
21151
- }
21152
- minver = new SemVer("0.0.0-0");
21153
- if (range.test(minver)) {
21154
- return minver;
21155
- }
21156
- minver = null;
21157
- for (let i2 = 0; i2 < range.set.length; ++i2) {
21158
- const comparators = range.set[i2];
21159
- let setMin = null;
21160
- comparators.forEach((comparator) => {
21161
- const compver = new SemVer(comparator.semver.version);
21162
- switch (comparator.operator) {
21163
- case ">":
21164
- if (compver.prerelease.length === 0) {
21165
- compver.patch++;
21166
- } else {
21167
- compver.prerelease.push(0);
21168
- }
21169
- compver.raw = compver.format();
21170
- /* fallthrough */
21171
- case "":
21172
- case ">=":
21173
- if (!setMin || gt(compver, setMin)) {
21174
- setMin = compver;
21175
- }
21176
- break;
21177
- case "<":
21178
- case "<=":
21179
- break;
21180
- /* istanbul ignore next */
21181
- default:
21182
- throw new Error(`Unexpected operation: ${comparator.operator}`);
21183
- }
21184
- });
21185
- if (setMin && (!minver || gt(minver, setMin))) {
21186
- minver = setMin;
21187
- }
21188
- }
21189
- if (minver && range.test(minver)) {
21190
- return minver;
21191
- }
21192
- return null;
21193
- };
21194
- module2.exports = minVersion;
21195
- }
21196
- });
21197
-
21198
- // ../../node_modules/semver/ranges/valid.js
21199
- var require_valid2 = __commonJS({
21200
- "../../node_modules/semver/ranges/valid.js"(exports, module2) {
21201
- "use strict";
21202
- init_esm_shims();
21203
- var Range = require_range();
21204
- var validRange = (range, options) => {
21205
- try {
21206
- return new Range(range, options).range || "*";
21207
- } catch (er) {
21208
- return null;
21209
- }
21210
- };
21211
- module2.exports = validRange;
21212
- }
21213
- });
21214
-
21215
- // ../../node_modules/semver/ranges/outside.js
21216
- var require_outside = __commonJS({
21217
- "../../node_modules/semver/ranges/outside.js"(exports, module2) {
21218
- "use strict";
21219
- init_esm_shims();
21220
- var SemVer = require_semver();
21221
- var Comparator = require_comparator();
21222
- var { ANY } = Comparator;
21223
- var Range = require_range();
21224
- var satisfies2 = require_satisfies();
21225
- var gt = require_gt();
21226
- var lt = require_lt();
21227
- var lte = require_lte();
21228
- var gte = require_gte();
21229
- var outside = (version, range, hilo, options) => {
21230
- version = new SemVer(version, options);
21231
- range = new Range(range, options);
21232
- let gtfn, ltefn, ltfn, comp, ecomp;
21233
- switch (hilo) {
21234
- case ">":
21235
- gtfn = gt;
21236
- ltefn = lte;
21237
- ltfn = lt;
21238
- comp = ">";
21239
- ecomp = ">=";
21240
- break;
21241
- case "<":
21242
- gtfn = lt;
21243
- ltefn = gte;
21244
- ltfn = gt;
21245
- comp = "<";
21246
- ecomp = "<=";
21247
- break;
21248
- default:
21249
- throw new TypeError('Must provide a hilo val of "<" or ">"');
21250
- }
21251
- if (satisfies2(version, range, options)) {
21252
- return false;
21253
- }
21254
- for (let i2 = 0; i2 < range.set.length; ++i2) {
21255
- const comparators = range.set[i2];
21256
- let high = null;
21257
- let low = null;
21258
- comparators.forEach((comparator) => {
21259
- if (comparator.semver === ANY) {
21260
- comparator = new Comparator(">=0.0.0");
21261
- }
21262
- high = high || comparator;
21263
- low = low || comparator;
21264
- if (gtfn(comparator.semver, high.semver, options)) {
21265
- high = comparator;
21266
- } else if (ltfn(comparator.semver, low.semver, options)) {
21267
- low = comparator;
21268
- }
21269
- });
21270
- if (high.operator === comp || high.operator === ecomp) {
21271
- return false;
21272
- }
21273
- if ((!low.operator || low.operator === comp) && ltefn(version, low.semver)) {
21274
- return false;
21275
- } else if (low.operator === ecomp && ltfn(version, low.semver)) {
21276
- return false;
21277
- }
21278
- }
21279
- return true;
21280
- };
21281
- module2.exports = outside;
21282
- }
21283
- });
21284
-
21285
- // ../../node_modules/semver/ranges/gtr.js
21286
- var require_gtr = __commonJS({
21287
- "../../node_modules/semver/ranges/gtr.js"(exports, module2) {
21288
- "use strict";
21289
- init_esm_shims();
21290
- var outside = require_outside();
21291
- var gtr = (version, range, options) => outside(version, range, ">", options);
21292
- module2.exports = gtr;
21293
- }
21294
- });
21295
-
21296
- // ../../node_modules/semver/ranges/ltr.js
21297
- var require_ltr = __commonJS({
21298
- "../../node_modules/semver/ranges/ltr.js"(exports, module2) {
21299
- "use strict";
21300
- init_esm_shims();
21301
- var outside = require_outside();
21302
- var ltr = (version, range, options) => outside(version, range, "<", options);
21303
- module2.exports = ltr;
21304
- }
21305
- });
21306
-
21307
- // ../../node_modules/semver/ranges/intersects.js
21308
- var require_intersects = __commonJS({
21309
- "../../node_modules/semver/ranges/intersects.js"(exports, module2) {
21310
- "use strict";
21311
- init_esm_shims();
21312
- var Range = require_range();
21313
- var intersects = (r1, r2, options) => {
21314
- r1 = new Range(r1, options);
21315
- r2 = new Range(r2, options);
21316
- return r1.intersects(r2, options);
21317
- };
21318
- module2.exports = intersects;
21319
- }
21320
- });
21321
-
21322
- // ../../node_modules/semver/ranges/simplify.js
21323
- var require_simplify = __commonJS({
21324
- "../../node_modules/semver/ranges/simplify.js"(exports, module2) {
21325
- "use strict";
21326
- init_esm_shims();
21327
- var satisfies2 = require_satisfies();
21328
- var compare = require_compare();
21329
- module2.exports = (versions, range, options) => {
21330
- const set = [];
21331
- let first = null;
21332
- let prev = null;
21333
- const v = versions.sort((a2, b2) => compare(a2, b2, options));
21334
- for (const version of v) {
21335
- const included = satisfies2(version, range, options);
21336
- if (included) {
21337
- prev = version;
21338
- if (!first) {
21339
- first = version;
21340
- }
21341
- } else {
21342
- if (prev) {
21343
- set.push([first, prev]);
21344
- }
21345
- prev = null;
21346
- first = null;
21347
- }
21348
- }
21349
- if (first) {
21350
- set.push([first, null]);
21351
- }
21352
- const ranges = [];
21353
- for (const [min, max] of set) {
21354
- if (min === max) {
21355
- ranges.push(min);
21356
- } else if (!max && min === v[0]) {
21357
- ranges.push("*");
21358
- } else if (!max) {
21359
- ranges.push(`>=${min}`);
21360
- } else if (min === v[0]) {
21361
- ranges.push(`<=${max}`);
21362
- } else {
21363
- ranges.push(`${min} - ${max}`);
21364
- }
21365
- }
21366
- const simplified = ranges.join(" || ");
21367
- const original = typeof range.raw === "string" ? range.raw : String(range);
21368
- return simplified.length < original.length ? simplified : range;
21369
- };
21370
- }
21371
- });
21372
-
21373
- // ../../node_modules/semver/ranges/subset.js
21374
- var require_subset = __commonJS({
21375
- "../../node_modules/semver/ranges/subset.js"(exports, module2) {
21376
- "use strict";
21377
- init_esm_shims();
21378
- var Range = require_range();
21379
- var Comparator = require_comparator();
21380
- var { ANY } = Comparator;
21381
- var satisfies2 = require_satisfies();
21382
- var compare = require_compare();
21383
- var subset = (sub, dom, options = {}) => {
21384
- if (sub === dom) {
21385
- return true;
21386
- }
21387
- sub = new Range(sub, options);
21388
- dom = new Range(dom, options);
21389
- let sawNonNull = false;
21390
- OUTER: for (const simpleSub of sub.set) {
21391
- for (const simpleDom of dom.set) {
21392
- const isSub = simpleSubset(simpleSub, simpleDom, options);
21393
- sawNonNull = sawNonNull || isSub !== null;
21394
- if (isSub) {
21395
- continue OUTER;
21396
- }
21397
- }
21398
- if (sawNonNull) {
21399
- return false;
21400
- }
21401
- }
21402
- return true;
21403
- };
21404
- var minimumVersionWithPreRelease = [new Comparator(">=0.0.0-0")];
21405
- var minimumVersion = [new Comparator(">=0.0.0")];
21406
- var simpleSubset = (sub, dom, options) => {
21407
- if (sub === dom) {
21408
- return true;
21409
- }
21410
- if (sub.length === 1 && sub[0].semver === ANY) {
21411
- if (dom.length === 1 && dom[0].semver === ANY) {
21412
- return true;
21413
- } else if (options.includePrerelease) {
21414
- sub = minimumVersionWithPreRelease;
21415
- } else {
21416
- sub = minimumVersion;
21417
- }
21418
- }
21419
- if (dom.length === 1 && dom[0].semver === ANY) {
21420
- if (options.includePrerelease) {
21421
- return true;
21422
- } else {
21423
- dom = minimumVersion;
21424
- }
21425
- }
21426
- const eqSet = /* @__PURE__ */ new Set();
21427
- let gt, lt;
21428
- for (const c2 of sub) {
21429
- if (c2.operator === ">" || c2.operator === ">=") {
21430
- gt = higherGT(gt, c2, options);
21431
- } else if (c2.operator === "<" || c2.operator === "<=") {
21432
- lt = lowerLT(lt, c2, options);
21433
- } else {
21434
- eqSet.add(c2.semver);
21435
- }
21436
- }
21437
- if (eqSet.size > 1) {
21438
- return null;
21439
- }
21440
- let gtltComp;
21441
- if (gt && lt) {
21442
- gtltComp = compare(gt.semver, lt.semver, options);
21443
- if (gtltComp > 0) {
21444
- return null;
21445
- } else if (gtltComp === 0 && (gt.operator !== ">=" || lt.operator !== "<=")) {
21446
- return null;
21447
- }
21448
- }
21449
- for (const eq of eqSet) {
21450
- if (gt && !satisfies2(eq, String(gt), options)) {
21451
- return null;
21452
- }
21453
- if (lt && !satisfies2(eq, String(lt), options)) {
21454
- return null;
21455
- }
21456
- for (const c2 of dom) {
21457
- if (!satisfies2(eq, String(c2), options)) {
21458
- return false;
21459
- }
21460
- }
21461
- return true;
21462
- }
21463
- let higher, lower;
21464
- let hasDomLT, hasDomGT;
21465
- let needDomLTPre = lt && !options.includePrerelease && lt.semver.prerelease.length ? lt.semver : false;
21466
- let needDomGTPre = gt && !options.includePrerelease && gt.semver.prerelease.length ? gt.semver : false;
21467
- if (needDomLTPre && needDomLTPre.prerelease.length === 1 && lt.operator === "<" && needDomLTPre.prerelease[0] === 0) {
21468
- needDomLTPre = false;
21469
- }
21470
- for (const c2 of dom) {
21471
- hasDomGT = hasDomGT || c2.operator === ">" || c2.operator === ">=";
21472
- hasDomLT = hasDomLT || c2.operator === "<" || c2.operator === "<=";
21473
- if (gt) {
21474
- if (needDomGTPre) {
21475
- if (c2.semver.prerelease && c2.semver.prerelease.length && c2.semver.major === needDomGTPre.major && c2.semver.minor === needDomGTPre.minor && c2.semver.patch === needDomGTPre.patch) {
21476
- needDomGTPre = false;
21477
- }
21478
- }
21479
- if (c2.operator === ">" || c2.operator === ">=") {
21480
- higher = higherGT(gt, c2, options);
21481
- if (higher === c2 && higher !== gt) {
21482
- return false;
21483
- }
21484
- } else if (gt.operator === ">=" && !satisfies2(gt.semver, String(c2), options)) {
21485
- return false;
21486
- }
21487
- }
21488
- if (lt) {
21489
- if (needDomLTPre) {
21490
- if (c2.semver.prerelease && c2.semver.prerelease.length && c2.semver.major === needDomLTPre.major && c2.semver.minor === needDomLTPre.minor && c2.semver.patch === needDomLTPre.patch) {
21491
- needDomLTPre = false;
21492
- }
21493
- }
21494
- if (c2.operator === "<" || c2.operator === "<=") {
21495
- lower = lowerLT(lt, c2, options);
21496
- if (lower === c2 && lower !== lt) {
21497
- return false;
21498
- }
21499
- } else if (lt.operator === "<=" && !satisfies2(lt.semver, String(c2), options)) {
21500
- return false;
21501
- }
21502
- }
21503
- if (!c2.operator && (lt || gt) && gtltComp !== 0) {
21504
- return false;
21505
- }
21506
- }
21507
- if (gt && hasDomLT && !lt && gtltComp !== 0) {
21508
- return false;
21509
- }
21510
- if (lt && hasDomGT && !gt && gtltComp !== 0) {
21511
- return false;
21512
- }
21513
- if (needDomGTPre || needDomLTPre) {
21514
- return false;
21515
- }
21516
- return true;
21517
- };
21518
- var higherGT = (a2, b2, options) => {
21519
- if (!a2) {
21520
- return b2;
21521
- }
21522
- const comp = compare(a2.semver, b2.semver, options);
21523
- return comp > 0 ? a2 : comp < 0 ? b2 : b2.operator === ">" && a2.operator === ">=" ? b2 : a2;
21524
- };
21525
- var lowerLT = (a2, b2, options) => {
21526
- if (!a2) {
21527
- return b2;
21528
- }
21529
- const comp = compare(a2.semver, b2.semver, options);
21530
- return comp < 0 ? a2 : comp > 0 ? b2 : b2.operator === "<" && a2.operator === "<=" ? b2 : a2;
21531
- };
21532
- module2.exports = subset;
21533
- }
21534
- });
21535
-
21536
- // ../../node_modules/semver/index.js
21537
- var require_semver2 = __commonJS({
21538
- "../../node_modules/semver/index.js"(exports, module2) {
21539
- "use strict";
21540
- init_esm_shims();
21541
- var internalRe = require_re();
21542
- var constants = require_constants3();
21543
- var SemVer = require_semver();
21544
- var identifiers = require_identifiers();
21545
- var parse4 = require_parse();
21546
- var valid = require_valid();
21547
- var clean = require_clean();
21548
- var inc = require_inc();
21549
- var diff2 = require_diff();
21550
- var major = require_major();
21551
- var minor = require_minor();
21552
- var patch = require_patch();
21553
- var prerelease = require_prerelease();
21554
- var compare = require_compare();
21555
- var rcompare = require_rcompare();
21556
- var compareLoose = require_compare_loose();
21557
- var compareBuild = require_compare_build();
21558
- var sort = require_sort();
21559
- var rsort = require_rsort();
21560
- var gt = require_gt();
21561
- var lt = require_lt();
21562
- var eq = require_eq();
21563
- var neq = require_neq();
21564
- var gte = require_gte();
21565
- var lte = require_lte();
21566
- var cmp = require_cmp();
21567
- var coerce = require_coerce();
21568
- var Comparator = require_comparator();
21569
- var Range = require_range();
21570
- var satisfies2 = require_satisfies();
21571
- var toComparators = require_to_comparators();
21572
- var maxSatisfying = require_max_satisfying();
21573
- var minSatisfying = require_min_satisfying();
21574
- var minVersion = require_min_version();
21575
- var validRange = require_valid2();
21576
- var outside = require_outside();
21577
- var gtr = require_gtr();
21578
- var ltr = require_ltr();
21579
- var intersects = require_intersects();
21580
- var simplifyRange = require_simplify();
21581
- var subset = require_subset();
21582
- module2.exports = {
21583
- parse: parse4,
21584
- valid,
21585
- clean,
21586
- inc,
21587
- diff: diff2,
21588
- major,
21589
- minor,
21590
- patch,
21591
- prerelease,
21592
- compare,
21593
- rcompare,
21594
- compareLoose,
21595
- compareBuild,
21596
- sort,
21597
- rsort,
21598
- gt,
21599
- lt,
21600
- eq,
21601
- neq,
21602
- gte,
21603
- lte,
21604
- cmp,
21605
- coerce,
21606
- Comparator,
21607
- Range,
21608
- satisfies: satisfies2,
21609
- toComparators,
21610
- maxSatisfying,
21611
- minSatisfying,
21612
- minVersion,
21613
- validRange,
21614
- outside,
21615
- gtr,
21616
- ltr,
21617
- intersects,
21618
- simplifyRange,
21619
- subset,
21620
- SemVer,
21621
- re: internalRe.re,
21622
- src: internalRe.src,
21623
- tokens: internalRe.t,
21624
- SEMVER_SPEC_VERSION: constants.SEMVER_SPEC_VERSION,
21625
- RELEASE_TYPES: constants.RELEASE_TYPES,
21626
- compareIdentifiers: identifiers.compareIdentifiers,
21627
- rcompareIdentifiers: identifiers.rcompareIdentifiers
21628
- };
21629
- }
21630
- });
21631
-
21632
19680
  // ../../node_modules/@opentelemetry/instrumentation-http/build/src/enums/AttributeNames.js
21633
19681
  var require_AttributeNames = __commonJS({
21634
19682
  "../../node_modules/@opentelemetry/instrumentation-http/build/src/enums/AttributeNames.js"(exports) {
@@ -24552,7 +22600,7 @@ var init_instrumentation2 = __esm({
24552
22600
  "../../node_modules/@opentelemetry/instrumentation/build/esm/platform/node/instrumentation.js"() {
24553
22601
  "use strict";
24554
22602
  init_esm_shims();
24555
- import_semver = __toESM(require_semver2());
22603
+ import_semver = __toESM(require_semver());
24556
22604
  import_shimmer = __toESM(require_shimmer());
24557
22605
  init_instrumentation();
24558
22606
  init_RequireInTheMiddleSingleton();
@@ -25000,7 +23048,7 @@ var require_http2 = __commonJS({
25000
23048
  exports.HttpInstrumentation = void 0;
25001
23049
  var api_1 = (init_esm(), __toCommonJS(esm_exports));
25002
23050
  var core_1 = (init_esm4(), __toCommonJS(esm_exports4));
25003
- var semver = require_semver2();
23051
+ var semver = require_semver();
25004
23052
  var url = __require("url");
25005
23053
  var utils = require_utils3();
25006
23054
  var version_1 = require_version();
@@ -25909,7 +23957,7 @@ var require_types4 = __commonJS({
25909
23957
  });
25910
23958
 
25911
23959
  // ../../node_modules/@opentelemetry/instrumentation-fastify/build/src/constants.js
25912
- var require_constants4 = __commonJS({
23960
+ var require_constants3 = __commonJS({
25913
23961
  "../../node_modules/@opentelemetry/instrumentation-fastify/build/src/constants.js"(exports) {
25914
23962
  "use strict";
25915
23963
  init_esm_shims();
@@ -25938,7 +23986,7 @@ var require_utils5 = __commonJS({
25938
23986
  Object.defineProperty(exports, "__esModule", { value: true });
25939
23987
  exports.safeExecuteInTheMiddleMaybePromise = exports.endSpan = exports.startSpan = void 0;
25940
23988
  var api_1 = (init_esm(), __toCommonJS(esm_exports));
25941
- var constants_1 = require_constants4();
23989
+ var constants_1 = require_constants3();
25942
23990
  function startSpan2(reply, tracer, spanName, spanAttributes = {}) {
25943
23991
  const span = tracer.startSpan(spanName, { attributes: spanAttributes });
25944
23992
  const spans = reply[constants_1.spanRequestSymbol] || [];
@@ -26020,7 +24068,7 @@ var require_instrumentation2 = __commonJS({
26020
24068
  var core_1 = (init_esm4(), __toCommonJS(esm_exports4));
26021
24069
  var instrumentation_1 = (init_esm6(), __toCommonJS(esm_exports5));
26022
24070
  var semantic_conventions_1 = (init_esm2(), __toCommonJS(esm_exports2));
26023
- var constants_1 = require_constants4();
24071
+ var constants_1 = require_constants3();
26024
24072
  var AttributeNames_1 = require_AttributeNames3();
26025
24073
  var utils_1 = require_utils5();
26026
24074
  var version_1 = require_version3();
@@ -32693,16 +30741,16 @@ var require_util = __commonJS({
32693
30741
  var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/;
32694
30742
  var dataUrlRegexp = /^data:.+\,.+$/;
32695
30743
  function urlParse(aUrl) {
32696
- var match37 = aUrl.match(urlRegexp);
32697
- if (!match37) {
30744
+ var match39 = aUrl.match(urlRegexp);
30745
+ if (!match39) {
32698
30746
  return null;
32699
30747
  }
32700
30748
  return {
32701
- scheme: match37[1],
32702
- auth: match37[2],
32703
- host: match37[3],
32704
- port: match37[4],
32705
- path: match37[5]
30749
+ scheme: match39[1],
30750
+ auth: match39[2],
30751
+ host: match39[3],
30752
+ port: match39[4],
30753
+ path: match39[5]
32706
30754
  };
32707
30755
  }
32708
30756
  exports.urlParse = urlParse;
@@ -40017,8 +38065,8 @@ var require_lib3 = __commonJS({
40017
38065
  default:
40018
38066
  if (ch >= 48 && ch <= 55) {
40019
38067
  const startPos = pos - 1;
40020
- const match37 = /^[0-7]+/.exec(input.slice(startPos, pos + 2));
40021
- let octalStr = match37[0];
38068
+ const match39 = /^[0-7]+/.exec(input.slice(startPos, pos + 2));
38069
+ let octalStr = match39[0];
40022
38070
  let octal = parseInt(octalStr, 8);
40023
38071
  if (octal > 255) {
40024
38072
  octalStr = octalStr.slice(0, -1);
@@ -49139,6 +47187,173 @@ var require_lib3 = __commonJS({
49139
47187
  }
49140
47188
  });
49141
47189
 
47190
+ // ../../node_modules/lodash/_baseSlice.js
47191
+ var require_baseSlice = __commonJS({
47192
+ "../../node_modules/lodash/_baseSlice.js"(exports, module2) {
47193
+ "use strict";
47194
+ init_esm_shims();
47195
+ function baseSlice(array, start, end) {
47196
+ var index = -1, length = array.length;
47197
+ if (start < 0) {
47198
+ start = -start > length ? 0 : length + start;
47199
+ }
47200
+ end = end > length ? length : end;
47201
+ if (end < 0) {
47202
+ end += length;
47203
+ }
47204
+ length = start > end ? 0 : end - start >>> 0;
47205
+ start >>>= 0;
47206
+ var result = Array(length);
47207
+ while (++index < length) {
47208
+ result[index] = array[index + start];
47209
+ }
47210
+ return result;
47211
+ }
47212
+ module2.exports = baseSlice;
47213
+ }
47214
+ });
47215
+
47216
+ // ../../node_modules/lodash/_castSlice.js
47217
+ var require_castSlice = __commonJS({
47218
+ "../../node_modules/lodash/_castSlice.js"(exports, module2) {
47219
+ "use strict";
47220
+ init_esm_shims();
47221
+ var baseSlice = require_baseSlice();
47222
+ function castSlice(array, start, end) {
47223
+ var length = array.length;
47224
+ end = end === void 0 ? length : end;
47225
+ return !start && end >= length ? array : baseSlice(array, start, end);
47226
+ }
47227
+ module2.exports = castSlice;
47228
+ }
47229
+ });
47230
+
47231
+ // ../../node_modules/lodash/_hasUnicode.js
47232
+ var require_hasUnicode = __commonJS({
47233
+ "../../node_modules/lodash/_hasUnicode.js"(exports, module2) {
47234
+ "use strict";
47235
+ init_esm_shims();
47236
+ var rsAstralRange = "\\ud800-\\udfff";
47237
+ var rsComboMarksRange = "\\u0300-\\u036f";
47238
+ var reComboHalfMarksRange = "\\ufe20-\\ufe2f";
47239
+ var rsComboSymbolsRange = "\\u20d0-\\u20ff";
47240
+ var rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange;
47241
+ var rsVarRange = "\\ufe0e\\ufe0f";
47242
+ var rsZWJ = "\\u200d";
47243
+ var reHasUnicode = RegExp("[" + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + "]");
47244
+ function hasUnicode(string) {
47245
+ return reHasUnicode.test(string);
47246
+ }
47247
+ module2.exports = hasUnicode;
47248
+ }
47249
+ });
47250
+
47251
+ // ../../node_modules/lodash/_asciiToArray.js
47252
+ var require_asciiToArray = __commonJS({
47253
+ "../../node_modules/lodash/_asciiToArray.js"(exports, module2) {
47254
+ "use strict";
47255
+ init_esm_shims();
47256
+ function asciiToArray(string) {
47257
+ return string.split("");
47258
+ }
47259
+ module2.exports = asciiToArray;
47260
+ }
47261
+ });
47262
+
47263
+ // ../../node_modules/lodash/_unicodeToArray.js
47264
+ var require_unicodeToArray = __commonJS({
47265
+ "../../node_modules/lodash/_unicodeToArray.js"(exports, module2) {
47266
+ "use strict";
47267
+ init_esm_shims();
47268
+ var rsAstralRange = "\\ud800-\\udfff";
47269
+ var rsComboMarksRange = "\\u0300-\\u036f";
47270
+ var reComboHalfMarksRange = "\\ufe20-\\ufe2f";
47271
+ var rsComboSymbolsRange = "\\u20d0-\\u20ff";
47272
+ var rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange;
47273
+ var rsVarRange = "\\ufe0e\\ufe0f";
47274
+ var rsAstral = "[" + rsAstralRange + "]";
47275
+ var rsCombo = "[" + rsComboRange + "]";
47276
+ var rsFitz = "\\ud83c[\\udffb-\\udfff]";
47277
+ var rsModifier = "(?:" + rsCombo + "|" + rsFitz + ")";
47278
+ var rsNonAstral = "[^" + rsAstralRange + "]";
47279
+ var rsRegional = "(?:\\ud83c[\\udde6-\\uddff]){2}";
47280
+ var rsSurrPair = "[\\ud800-\\udbff][\\udc00-\\udfff]";
47281
+ var rsZWJ = "\\u200d";
47282
+ var reOptMod = rsModifier + "?";
47283
+ var rsOptVar = "[" + rsVarRange + "]?";
47284
+ var rsOptJoin = "(?:" + rsZWJ + "(?:" + [rsNonAstral, rsRegional, rsSurrPair].join("|") + ")" + rsOptVar + reOptMod + ")*";
47285
+ var rsSeq = rsOptVar + reOptMod + rsOptJoin;
47286
+ var rsSymbol = "(?:" + [rsNonAstral + rsCombo + "?", rsCombo, rsRegional, rsSurrPair, rsAstral].join("|") + ")";
47287
+ var reUnicode = RegExp(rsFitz + "(?=" + rsFitz + ")|" + rsSymbol + rsSeq, "g");
47288
+ function unicodeToArray(string) {
47289
+ return string.match(reUnicode) || [];
47290
+ }
47291
+ module2.exports = unicodeToArray;
47292
+ }
47293
+ });
47294
+
47295
+ // ../../node_modules/lodash/_stringToArray.js
47296
+ var require_stringToArray = __commonJS({
47297
+ "../../node_modules/lodash/_stringToArray.js"(exports, module2) {
47298
+ "use strict";
47299
+ init_esm_shims();
47300
+ var asciiToArray = require_asciiToArray();
47301
+ var hasUnicode = require_hasUnicode();
47302
+ var unicodeToArray = require_unicodeToArray();
47303
+ function stringToArray(string) {
47304
+ return hasUnicode(string) ? unicodeToArray(string) : asciiToArray(string);
47305
+ }
47306
+ module2.exports = stringToArray;
47307
+ }
47308
+ });
47309
+
47310
+ // ../../node_modules/lodash/_createCaseFirst.js
47311
+ var require_createCaseFirst = __commonJS({
47312
+ "../../node_modules/lodash/_createCaseFirst.js"(exports, module2) {
47313
+ "use strict";
47314
+ init_esm_shims();
47315
+ var castSlice = require_castSlice();
47316
+ var hasUnicode = require_hasUnicode();
47317
+ var stringToArray = require_stringToArray();
47318
+ var toString = require_toString();
47319
+ function createCaseFirst(methodName) {
47320
+ return function(string) {
47321
+ string = toString(string);
47322
+ var strSymbols = hasUnicode(string) ? stringToArray(string) : void 0;
47323
+ var chr = strSymbols ? strSymbols[0] : string.charAt(0);
47324
+ var trailing = strSymbols ? castSlice(strSymbols, 1).join("") : string.slice(1);
47325
+ return chr[methodName]() + trailing;
47326
+ };
47327
+ }
47328
+ module2.exports = createCaseFirst;
47329
+ }
47330
+ });
47331
+
47332
+ // ../../node_modules/lodash/upperFirst.js
47333
+ var require_upperFirst = __commonJS({
47334
+ "../../node_modules/lodash/upperFirst.js"(exports, module2) {
47335
+ "use strict";
47336
+ init_esm_shims();
47337
+ var createCaseFirst = require_createCaseFirst();
47338
+ var upperFirst = createCaseFirst("toUpperCase");
47339
+ module2.exports = upperFirst;
47340
+ }
47341
+ });
47342
+
47343
+ // ../../node_modules/lodash/startCase.js
47344
+ var require_startCase = __commonJS({
47345
+ "../../node_modules/lodash/startCase.js"(exports, module2) {
47346
+ "use strict";
47347
+ init_esm_shims();
47348
+ var createCompounder = require_createCompounder();
47349
+ var upperFirst = require_upperFirst();
47350
+ var startCase2 = createCompounder(function(result, word, index) {
47351
+ return result + (index ? " " : "") + upperFirst(word);
47352
+ });
47353
+ module2.exports = startCase2;
47354
+ }
47355
+ });
47356
+
49142
47357
  // ../../node_modules/@vercel/detect-agent/dist/index.js
49143
47358
  var require_dist2 = __commonJS({
49144
47359
  "../../node_modules/@vercel/detect-agent/dist/index.js"(exports, module2) {
@@ -51580,12 +49795,12 @@ var getAllProperties = (object) => {
51580
49795
  };
51581
49796
  function autoBind(self2, { include, exclude } = {}) {
51582
49797
  const filter = (key) => {
51583
- const match37 = (pattern) => typeof pattern === "string" ? key === pattern : pattern.test(key);
49798
+ const match39 = (pattern) => typeof pattern === "string" ? key === pattern : pattern.test(key);
51584
49799
  if (include) {
51585
- return include.some(match37);
49800
+ return include.some(match39);
51586
49801
  }
51587
49802
  if (exclude) {
51588
- return !exclude.some(match37);
49803
+ return !exclude.some(match39);
51589
49804
  }
51590
49805
  return true;
51591
49806
  };
@@ -57343,9 +55558,9 @@ var Highlighter = ({ pattern, text }) => {
57343
55558
  }
57344
55559
  const matches = text.matchAll(pattern);
57345
55560
  const hightlightMap = new Array(text.length).fill(0);
57346
- for (const match37 of matches) {
57347
- const start = match37.index;
57348
- const end = match37.index + match37[0].length;
55561
+ for (const match39 of matches) {
55562
+ const start = match39.index;
55563
+ const end = match39.index + match39[0].length;
57349
55564
  for (let i2 = start; i2 < end; i2++) {
57350
55565
  hightlightMap[i2] = 1;
57351
55566
  }
@@ -58128,11 +56343,11 @@ function hasFlag3(flag, argv = process18.argv) {
58128
56343
  // ../../node_modules/supports-hyperlinks/index.js
58129
56344
  function parseVersion(versionString = "") {
58130
56345
  if (/^\d{3,4}$/.test(versionString)) {
58131
- const match37 = /(\d{1,2})(\d{2})/.exec(versionString) ?? [];
56346
+ const match39 = /(\d{1,2})(\d{2})/.exec(versionString) ?? [];
58132
56347
  return {
58133
56348
  major: 0,
58134
- minor: Number.parseInt(match37[1], 10),
58135
- patch: Number.parseInt(match37[2], 10)
56349
+ minor: Number.parseInt(match39[1], 10),
56350
+ patch: Number.parseInt(match39[2], 10)
58136
56351
  };
58137
56352
  }
58138
56353
  const versions = (versionString ?? "").split(".").map((n3) => Number.parseInt(n3, 10));
@@ -59692,9 +57907,9 @@ init_esm_shims();
59692
57907
  var DATE_TIME_REGEX = /(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;
59693
57908
  function parseDateTimeSkeleton(skeleton) {
59694
57909
  var result = {};
59695
- skeleton.replace(DATE_TIME_REGEX, function(match37) {
59696
- var len = match37.length;
59697
- switch (match37[0]) {
57910
+ skeleton.replace(DATE_TIME_REGEX, function(match39) {
57911
+ var len = match39.length;
57912
+ switch (match39[0]) {
59698
57913
  // Era
59699
57914
  case "G":
59700
57915
  result.era = len === 4 ? "long" : len === 5 ? "narrow" : "short";
@@ -61704,21 +59919,21 @@ if (REGEX_SUPPORTS_U_AND_Y) {
61704
59919
  matchIdentifierAtIndex = function matchIdentifierAtIndex2(s2, index) {
61705
59920
  var _a3;
61706
59921
  IDENTIFIER_PREFIX_RE_1.lastIndex = index;
61707
- var match37 = IDENTIFIER_PREFIX_RE_1.exec(s2);
61708
- return (_a3 = match37[1]) !== null && _a3 !== void 0 ? _a3 : "";
59922
+ var match39 = IDENTIFIER_PREFIX_RE_1.exec(s2);
59923
+ return (_a3 = match39[1]) !== null && _a3 !== void 0 ? _a3 : "";
61709
59924
  };
61710
59925
  } else {
61711
59926
  matchIdentifierAtIndex = function matchIdentifierAtIndex2(s2, index) {
61712
- var match37 = [];
59927
+ var match39 = [];
61713
59928
  while (true) {
61714
59929
  var c2 = codePointAt(s2, index);
61715
59930
  if (c2 === void 0 || _isWhiteSpace(c2) || _isPatternSyntax(c2)) {
61716
59931
  break;
61717
59932
  }
61718
- match37.push(c2);
59933
+ match39.push(c2);
61719
59934
  index += c2 >= 65536 ? 2 : 1;
61720
59935
  }
61721
- return fromCodePoint.apply(void 0, match37);
59936
+ return fromCodePoint.apply(void 0, match39);
61722
59937
  };
61723
59938
  }
61724
59939
  var IDENTIFIER_PREFIX_RE_1;
@@ -64141,7 +62356,7 @@ var Interpolator = class {
64141
62356
  this.nestingRegexp = getOrResetRegExp(this.nestingRegexp, `${this.nestingPrefix}(.+?)${this.nestingSuffix}`);
64142
62357
  }
64143
62358
  interpolate(str, data, lng, options) {
64144
- let match37;
62359
+ let match39;
64145
62360
  let value2;
64146
62361
  let replaces;
64147
62362
  const defaultData = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {};
@@ -64175,17 +62390,17 @@ var Interpolator = class {
64175
62390
  }];
64176
62391
  todos.forEach((todo) => {
64177
62392
  replaces = 0;
64178
- while (match37 = todo.regex.exec(str)) {
64179
- const matchedVar = match37[1].trim();
62393
+ while (match39 = todo.regex.exec(str)) {
62394
+ const matchedVar = match39[1].trim();
64180
62395
  value2 = handleFormat(matchedVar);
64181
62396
  if (value2 === void 0) {
64182
62397
  if (typeof missingInterpolationHandler === "function") {
64183
- const temp = missingInterpolationHandler(str, match37, options);
62398
+ const temp = missingInterpolationHandler(str, match39, options);
64184
62399
  value2 = isString2(temp) ? temp : "";
64185
62400
  } else if (options && Object.prototype.hasOwnProperty.call(options, matchedVar)) {
64186
62401
  value2 = "";
64187
62402
  } else if (skipOnVariables) {
64188
- value2 = match37[0];
62403
+ value2 = match39[0];
64189
62404
  continue;
64190
62405
  } else {
64191
62406
  this.logger.warn(`missed to pass in variable ${matchedVar} for interpolating ${str}`);
@@ -64195,10 +62410,10 @@ var Interpolator = class {
64195
62410
  value2 = makeString(value2);
64196
62411
  }
64197
62412
  const safeValue = todo.safeValue(value2);
64198
- str = str.replace(match37[0], safeValue);
62413
+ str = str.replace(match39[0], safeValue);
64199
62414
  if (skipOnVariables) {
64200
62415
  todo.regex.lastIndex += value2.length;
64201
- todo.regex.lastIndex -= match37[0].length;
62416
+ todo.regex.lastIndex -= match39[0].length;
64202
62417
  } else {
64203
62418
  todo.regex.lastIndex = 0;
64204
62419
  }
@@ -64212,7 +62427,7 @@ var Interpolator = class {
64212
62427
  }
64213
62428
  nest(str, fc) {
64214
62429
  let options = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
64215
- let match37;
62430
+ let match39;
64216
62431
  let value2;
64217
62432
  let clonedOptions;
64218
62433
  const handleHasOptions = (key, inheritedOptions) => {
@@ -64240,7 +62455,7 @@ var Interpolator = class {
64240
62455
  if (clonedOptions.defaultValue && clonedOptions.defaultValue.indexOf(this.prefix) > -1) delete clonedOptions.defaultValue;
64241
62456
  return key;
64242
62457
  };
64243
- while (match37 = this.nestingRegexp.exec(str)) {
62458
+ while (match39 = this.nestingRegexp.exec(str)) {
64244
62459
  let formatters = [];
64245
62460
  clonedOptions = {
64246
62461
  ...options
@@ -64249,26 +62464,26 @@ var Interpolator = class {
64249
62464
  clonedOptions.applyPostProcessor = false;
64250
62465
  delete clonedOptions.defaultValue;
64251
62466
  let doReduce = false;
64252
- if (match37[0].indexOf(this.formatSeparator) !== -1 && !/{.*}/.test(match37[1])) {
64253
- const r2 = match37[1].split(this.formatSeparator).map((elem) => elem.trim());
64254
- match37[1] = r2.shift();
62467
+ if (match39[0].indexOf(this.formatSeparator) !== -1 && !/{.*}/.test(match39[1])) {
62468
+ const r2 = match39[1].split(this.formatSeparator).map((elem) => elem.trim());
62469
+ match39[1] = r2.shift();
64255
62470
  formatters = r2;
64256
62471
  doReduce = true;
64257
62472
  }
64258
- value2 = fc(handleHasOptions.call(this, match37[1].trim(), clonedOptions), clonedOptions);
64259
- if (value2 && match37[0] === str && !isString2(value2)) return value2;
62473
+ value2 = fc(handleHasOptions.call(this, match39[1].trim(), clonedOptions), clonedOptions);
62474
+ if (value2 && match39[0] === str && !isString2(value2)) return value2;
64260
62475
  if (!isString2(value2)) value2 = makeString(value2);
64261
62476
  if (!value2) {
64262
- this.logger.warn(`missed to resolve ${match37[1]} for nesting ${str}`);
62477
+ this.logger.warn(`missed to resolve ${match39[1]} for nesting ${str}`);
64263
62478
  value2 = "";
64264
62479
  }
64265
62480
  if (doReduce) {
64266
62481
  value2 = formatters.reduce((v, f) => this.format(v, f, options.lng, {
64267
62482
  ...options,
64268
- interpolationkey: match37[1].trim()
62483
+ interpolationkey: match39[1].trim()
64269
62484
  }), value2.trim());
64270
62485
  }
64271
- str = str.replace(match37[0], value2);
62486
+ str = str.replace(match39[0], value2);
64272
62487
  this.regexp.lastIndex = 0;
64273
62488
  }
64274
62489
  return str;
@@ -65391,8 +63606,8 @@ async function defaultBrowserId() {
65391
63606
  throw new Error("macOS only");
65392
63607
  }
65393
63608
  const { stdout } = await execFileAsync("defaults", ["read", "com.apple.LaunchServices/com.apple.launchservices.secure", "LSHandlers"]);
65394
- const match37 = /LSHandlerRoleAll = "(?!-)(?<id>[^"]+?)";\s+?LSHandlerURLScheme = (?:http|https);/.exec(stdout);
65395
- return match37?.groups.id ?? "com.apple.Safari";
63609
+ const match39 = /LSHandlerRoleAll = "(?!-)(?<id>[^"]+?)";\s+?LSHandlerURLScheme = (?:http|https);/.exec(stdout);
63610
+ return match39?.groups.id ?? "com.apple.Safari";
65396
63611
  }
65397
63612
 
65398
63613
  // ../../node_modules/bundle-name/index.js
@@ -65446,11 +63661,11 @@ async function defaultBrowser(_execFileAsync = execFileAsync3) {
65446
63661
  "/v",
65447
63662
  "ProgId"
65448
63663
  ]);
65449
- const match37 = /ProgId\s*REG_SZ\s*(?<id>\S+)/.exec(stdout);
65450
- if (!match37) {
63664
+ const match39 = /ProgId\s*REG_SZ\s*(?<id>\S+)/.exec(stdout);
63665
+ if (!match39) {
65451
63666
  throw new UnknownBrowserError(`Cannot find Windows browser in stdout: ${JSON.stringify(stdout)}`);
65452
63667
  }
65453
- const { id } = match37.groups;
63668
+ const { id } = match39.groups;
65454
63669
  const browser = windowsBrowserProgIds[id];
65455
63670
  if (!browser) {
65456
63671
  throw new UnknownBrowserError(`Unknown browser ID: ${id}`);
@@ -65885,9 +64100,9 @@ var reDetectIndentation = /(?:\r\n|\r|\n)([ \t]*)(?:[^ \t\r\n]|$)/;
65885
64100
  var reOnlyWhitespaceWithAtLeastOneNewline = /^[ \t]*[\r\n][ \t\r\n]*$/;
65886
64101
  function _outdentArray(strings, firstInterpolatedValueSetsIndentationLevel, options) {
65887
64102
  var indentationLevel = 0;
65888
- var match37 = strings[0].match(reDetectIndentation);
65889
- if (match37) {
65890
- indentationLevel = match37[1].length;
64103
+ var match39 = strings[0].match(reDetectIndentation);
64104
+ if (match39) {
64105
+ indentationLevel = match39[1].length;
65891
64106
  }
65892
64107
  var reSource = "(\\r\\n|\\r|\\n).{0," + indentationLevel + "}";
65893
64108
  var reMatchIndent = new RegExp(reSource, "g");
@@ -68351,8 +66566,8 @@ var LINUX_VERSIONS = {
68351
66566
  ubuntu: (content) => matchFirst(/distrib_release=(.*)/, content)
68352
66567
  };
68353
66568
  function matchFirst(regex2, text) {
68354
- const match37 = regex2.exec(text);
68355
- return match37 ? match37[1] : void 0;
66569
+ const match39 = regex2.exec(text);
66570
+ return match39 ? match39[1] : void 0;
68356
66571
  }
68357
66572
  async function getDarwinInfo() {
68358
66573
  const darwinInfo = {
@@ -83581,7 +81796,7 @@ function getTasks({
83581
81796
  cause: e2
83582
81797
  });
83583
81798
  }
83584
- const { generateApp } = await import("./generator-7ZJRN5BW.js");
81799
+ const { generateApp } = await import("./generator-MDWSQZ5F.js");
83585
81800
  await generateApp({
83586
81801
  packageName,
83587
81802
  packageFolder,
@@ -84124,7 +82339,7 @@ var getAppCommand = ({
84124
82339
 
84125
82340
  // ../create-new-packages/headless-command/src/index.tsx
84126
82341
  init_esm_shims();
84127
- var import_react156 = __toESM(require_react(), 1);
82342
+ var import_react159 = __toESM(require_react(), 1);
84128
82343
  import process26 from "node:process";
84129
82344
 
84130
82345
  // ../create-new-packages/headless-command/src/validations/validate-business-name.ts
@@ -84190,11 +82405,10 @@ init_esm_shims();
84190
82405
  var import_react138 = __toESM(require_react(), 1);
84191
82406
  var import_variant46 = __toESM(require_lib(), 1);
84192
82407
 
84193
- // ../create-new-packages/headless-command/src/clients/funnel-projects/useFunnelProjectsClient.ts
82408
+ // ../funnel-projects-client/src/index.ts
84194
82409
  init_esm_shims();
84195
- var import_react137 = __toESM(require_react(), 1);
84196
82410
 
84197
- // ../create-new-packages/headless-command/src/clients/funnel-projects/funnel-projects-client.ts
82411
+ // ../funnel-projects-client/src/funnel-projects-client.ts
84198
82412
  init_esm_shims();
84199
82413
 
84200
82414
  // ../../node_modules/@wix/ambassador-funnel-projects-v1-project/build/es/http.impl.js
@@ -84263,7 +82477,7 @@ var Type3;
84263
82477
  Type5["VIBE"] = "VIBE";
84264
82478
  })(Type3 || (Type3 = {}));
84265
82479
 
84266
- // ../create-new-packages/headless-command/src/clients/funnel-projects/schemas.ts
82480
+ // ../funnel-projects-client/src/schemas.ts
84267
82481
  init_esm_shims();
84268
82482
  var CreateProjectResponseSchema = external_exports.object({
84269
82483
  project: external_exports.object({
@@ -84271,7 +82485,7 @@ var CreateProjectResponseSchema = external_exports.object({
84271
82485
  })
84272
82486
  });
84273
82487
 
84274
- // ../create-new-packages/headless-command/src/clients/funnel-projects/funnel-projects-client.ts
82488
+ // ../funnel-projects-client/src/funnel-projects-client.ts
84275
82489
  var FunnelProjectsClient = class {
84276
82490
  constructor(httpClient) {
84277
82491
  this.httpClient = httpClient;
@@ -84295,7 +82509,9 @@ var FunnelProjectsClient = class {
84295
82509
  };
84296
82510
  };
84297
82511
 
84298
- // ../create-new-packages/headless-command/src/clients/funnel-projects/useFunnelProjectsClient.ts
82512
+ // ../funnel-projects-client/src/useFunnelProjectsClient.ts
82513
+ init_esm_shims();
82514
+ var import_react137 = __toESM(require_react(), 1);
84299
82515
  function useFunnelProjectsClient() {
84300
82516
  const httpClient = useHttpClient({ type: "api" });
84301
82517
  const client2 = (0, import_react137.useMemo)(
@@ -93202,12 +91418,12 @@ function detectCodeFormat(code, userStyles = {}) {
93202
91418
  }
93203
91419
  if (detect.quote || detect.arrowParens) {
93204
91420
  const matches = trimmitedLine.matchAll(syntaxDetectRegex);
93205
- for (const match37 of matches) {
93206
- if (!match37.groups) {
91421
+ for (const match39 of matches) {
91422
+ if (!match39.groups) {
93207
91423
  continue;
93208
91424
  }
93209
91425
  for (const key in syntaxUsages) {
93210
- if (match37.groups[key]) {
91426
+ if (match39.groups[key]) {
93211
91427
  syntaxUsages[key]++;
93212
91428
  }
93213
91429
  }
@@ -93943,16 +92159,16 @@ async function parseCommandOptions2(targetParentFolder2, options) {
93943
92159
  // ../create-new-packages/headless-command/src/validations/site-template.ts
93944
92160
  function validateSiteTemplate(value2) {
93945
92161
  const normalized = value2.trim().toLowerCase();
93946
- const match37 = pureHeadlessTemplates.find(
92162
+ const match39 = pureHeadlessTemplates.find(
93947
92163
  (template) => template.name === normalized
93948
92164
  );
93949
- if (!match37) {
92165
+ if (!match39) {
93950
92166
  const available = pureHeadlessTemplates.map((template) => template.name).join(", ");
93951
92167
  throw new InvalidArgumentError(
93952
92168
  `Unknown template "${value2}". Available templates: ${available}`
93953
92169
  );
93954
92170
  }
93955
- return match37.name;
92171
+ return match39.name;
93956
92172
  }
93957
92173
 
93958
92174
  // ../create-new-packages/headless-command/src/validations/git-url.ts
@@ -95681,6 +93897,144 @@ function validateDirectoryExists(path4) {
95681
93897
  return path4;
95682
93898
  }
95683
93899
 
93900
+ // ../create-new-packages/headless-command/src/get-headless-init-command.tsx
93901
+ init_esm_shims();
93902
+ var import_react158 = __toESM(require_react(), 1);
93903
+
93904
+ // ../create-new-packages/headless-command/src/components/InitHeadlessSiteCommand.tsx
93905
+ init_esm_shims();
93906
+ var import_react157 = __toESM(require_react(), 1);
93907
+ import { basename } from "node:path";
93908
+ var import_variant62 = __toESM(require_lib(), 1);
93909
+ var import_startCase = __toESM(require_startCase(), 1);
93910
+
93911
+ // ../create-new-packages/headless-command/src/components/WriteConfig.tsx
93912
+ init_esm_shims();
93913
+ var import_react156 = __toESM(require_react(), 1);
93914
+ var import_variant61 = __toESM(require_lib(), 1);
93915
+ var WriteConfig = ({ businessId, projectData, targetParentFolder: targetParentFolder2 }) => {
93916
+ const { status } = useAsync2(async () => {
93917
+ await writeJson(
93918
+ getWixConfigFilePath(targetParentFolder2),
93919
+ {
93920
+ projectType: "Site",
93921
+ appId: projectData.projectId,
93922
+ siteId: businessId,
93923
+ site: {
93924
+ outputDirectory: "./dist"
93925
+ }
93926
+ },
93927
+ { spaces: 2 }
93928
+ );
93929
+ }, []);
93930
+ return /* @__PURE__ */ import_react156.default.createElement(import_react156.default.Fragment, null, (0, import_variant61.match)(status, {
93931
+ Error: () => null,
93932
+ Loading: () => /* @__PURE__ */ import_react156.default.createElement(Box_default, { marginBottom: 1 }, /* @__PURE__ */ import_react156.default.createElement(Spinner2, { text: "Saving settings..." })),
93933
+ Success: () => /* @__PURE__ */ import_react156.default.createElement(Box_default, { marginLeft: -2, marginBottom: 1 }, /* @__PURE__ */ import_react156.default.createElement(Alert, { type: "success" }, /* @__PURE__ */ import_react156.default.createElement(Badge, { skin: "success" }, "Success"), " ", /* @__PURE__ */ import_react156.default.createElement(Text2, null, "Settings saved to `", WIX_CONFIG_FILENAME, "`."))),
93934
+ NotRequested: () => null
93935
+ }));
93936
+ };
93937
+
93938
+ // ../create-new-packages/headless-command/src/components/InitHeadlessSiteCommand.tsx
93939
+ var BLANK_PROJECT_TEMPLATE_ID2 = "212b41cb-0da6-4401-9c72-7c579e6477a2";
93940
+ var InitHeadlessSiteCommand = ({ targetParentFolder: targetParentFolder2 }) => {
93941
+ const [businessId, setBusinessId] = (0, import_react157.useState)();
93942
+ const [projectData, setProjectData] = (0, import_react157.useState)();
93943
+ const { status } = useAsync2(async () => {
93944
+ if (await pathExists(getWixConfigFilePath(targetParentFolder2))) {
93945
+ throw new CliError({
93946
+ code: CliErrorCode.ProjectIsAlreadyLinked(),
93947
+ cause: null
93948
+ });
93949
+ }
93950
+ const name = basename(targetParentFolder2).trim();
93951
+ return { businessName: (0, import_startCase.default)(name).slice(0, 255) };
93952
+ }, []);
93953
+ return (0, import_variant62.match)(status, {
93954
+ Error: () => null,
93955
+ Loading: () => /* @__PURE__ */ import_react157.default.createElement(Spinner2, { text: "Loading..." }),
93956
+ Success: ({ result: { businessName } }) => /* @__PURE__ */ import_react157.default.createElement(
93957
+ Box_default,
93958
+ {
93959
+ flexDirection: "column",
93960
+ borderStyle: "single",
93961
+ borderColor: "gray",
93962
+ borderBottom: false,
93963
+ borderRight: false,
93964
+ borderTop: false,
93965
+ paddingLeft: 1
93966
+ },
93967
+ /* @__PURE__ */ import_react157.default.createElement(AuthProvider, null, /* @__PURE__ */ import_react157.default.createElement(
93968
+ CreateBusiness,
93969
+ {
93970
+ businessName,
93971
+ businessTemplateId: BLANK_PROJECT_TEMPLATE_ID2,
93972
+ onDone: ({ businessId: businessId2 }) => setBusinessId(businessId2)
93973
+ }
93974
+ )),
93975
+ businessId && /* @__PURE__ */ import_react157.default.createElement(SiteAuthProvider, { siteId: businessId }, /* @__PURE__ */ import_react157.default.createElement(
93976
+ CreateProject,
93977
+ {
93978
+ businessId,
93979
+ projectName: businessName,
93980
+ onSubmit: (data) => setProjectData(data)
93981
+ }
93982
+ )),
93983
+ businessId && projectData && /* @__PURE__ */ import_react157.default.createElement(
93984
+ WriteConfig,
93985
+ {
93986
+ businessId,
93987
+ projectData,
93988
+ targetParentFolder: targetParentFolder2
93989
+ }
93990
+ )
93991
+ )
93992
+ });
93993
+ };
93994
+
93995
+ // ../create-new-packages/headless-command/src/get-headless-init-command.tsx
93996
+ var getHeadlessInitCommand = ({
93997
+ errorReporter: errorReporter2,
93998
+ userInfo: userInfo2,
93999
+ panorama: panorama2,
94000
+ cliVersion,
94001
+ cliSessionId: cliSessionId2,
94002
+ targetParentFolder: targetParentFolder2,
94003
+ aiAgentName: aiAgentName2
94004
+ }) => {
94005
+ return createCommand("init").description("Create a Wix headless site without scaffolding").action(async (_2, command) => {
94006
+ errorReporter2.setContext("Command Info", {
94007
+ Arguments: command.args,
94008
+ Options: command.opts()
94009
+ });
94010
+ const { biLogger, reportCommandStartEvent: reportCommandStartEvent2 } = await createBiLogger3({
94011
+ errorReporter: errorReporter2,
94012
+ cliVersion,
94013
+ cliSessionId: cliSessionId2,
94014
+ userId: userInfo2?.userId,
94015
+ aiAgentName: aiAgentName2
94016
+ });
94017
+ const commandStatus = reportCommandStartEvent2(command);
94018
+ const transaction = createCommandTransaction(panorama2, command);
94019
+ try {
94020
+ transaction.start();
94021
+ await render2(
94022
+ /* @__PURE__ */ import_react158.default.createElement(BiProvider, { value: biLogger }, /* @__PURE__ */ import_react158.default.createElement(ErrorReporterProvider, { value: errorReporter2 }, /* @__PURE__ */ import_react158.default.createElement(PanoramaProvider, { value: panorama2 }, /* @__PURE__ */ import_react158.default.createElement(
94023
+ InitHeadlessSiteCommand,
94024
+ {
94025
+ targetParentFolder: targetParentFolder2
94026
+ }
94027
+ ))))
94028
+ );
94029
+ transaction.finish();
94030
+ commandStatus.succeed();
94031
+ } catch (e2) {
94032
+ commandStatus.failed(e2);
94033
+ throw e2;
94034
+ }
94035
+ });
94036
+ };
94037
+
95684
94038
  // ../create-new-packages/headless-command/src/index.tsx
95685
94039
  function assertInteractiveTerminalIfNeeded(hasRequiredFlagsForNonInteractive) {
95686
94040
  if (!process26.stdin.isTTY && !hasRequiredFlagsForNonInteractive) {
@@ -95730,7 +94084,7 @@ var getHeadlessCommand = ({
95730
94084
  try {
95731
94085
  transaction.start();
95732
94086
  await render2(
95733
- /* @__PURE__ */ import_react156.default.createElement(BiProvider, { value: biLogger }, /* @__PURE__ */ import_react156.default.createElement(ErrorReporterProvider, { value: errorReporter2 }, /* @__PURE__ */ import_react156.default.createElement(PanoramaProvider, { value: panorama2 }, /* @__PURE__ */ import_react156.default.createElement(
94087
+ /* @__PURE__ */ import_react159.default.createElement(BiProvider, { value: biLogger }, /* @__PURE__ */ import_react159.default.createElement(ErrorReporterProvider, { value: errorReporter2 }, /* @__PURE__ */ import_react159.default.createElement(PanoramaProvider, { value: panorama2 }, /* @__PURE__ */ import_react159.default.createElement(
95734
94088
  LinkCommand,
95735
94089
  {
95736
94090
  projectName: options.projectName,
@@ -95822,7 +94176,7 @@ var getHeadlessCommand = ({
95822
94176
  try {
95823
94177
  transaction.start();
95824
94178
  await render2(
95825
- /* @__PURE__ */ import_react156.default.createElement(BiProvider, { value: biLogger }, /* @__PURE__ */ import_react156.default.createElement(ErrorReporterProvider, { value: errorReporter2 }, /* @__PURE__ */ import_react156.default.createElement(PanoramaProvider, { value: panorama2 }, /* @__PURE__ */ import_react156.default.createElement(
94179
+ /* @__PURE__ */ import_react159.default.createElement(BiProvider, { value: biLogger }, /* @__PURE__ */ import_react159.default.createElement(ErrorReporterProvider, { value: errorReporter2 }, /* @__PURE__ */ import_react159.default.createElement(PanoramaProvider, { value: panorama2 }, /* @__PURE__ */ import_react159.default.createElement(
95826
94180
  ProcessCommand,
95827
94181
  {
95828
94182
  targetParentFolder: targetParentFolder2,
@@ -95848,7 +94202,7 @@ import { randomUUID as randomUUID3 } from "node:crypto";
95848
94202
  var package_default = {
95849
94203
  name: "@wix/create-new",
95850
94204
  description: "General entry point for creating Wix projects",
95851
- version: "0.0.64",
94205
+ version: "0.0.66",
95852
94206
  bin: "bin/index.cjs",
95853
94207
  devDependencies: {
95854
94208
  "@commander-js/extra-typings": "^13.0.0",
@@ -95961,6 +94315,18 @@ program2.addCommand(
95961
94315
  aiAgentName
95962
94316
  })
95963
94317
  );
94318
+ program2.addCommand(
94319
+ getHeadlessInitCommand({
94320
+ errorReporter,
94321
+ userInfo,
94322
+ panorama,
94323
+ cliVersion: package_default.version,
94324
+ cliSessionId,
94325
+ targetParentFolder,
94326
+ aiAgentName
94327
+ }),
94328
+ { hidden: true }
94329
+ );
95964
94330
  try {
95965
94331
  await program2.parseAsync();
95966
94332
  } catch (error) {