hot-updater 0.18.2 → 0.18.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,30 +1,33 @@
1
1
  #!/usr/bin/env node
2
2
  import { __commonJS, __require, __toESM, require_picocolors } from "./picocolors-OFVOrezl.js";
3
- import fs from "fs";
4
- import path from "path";
5
3
  import { createServer } from "http";
6
4
  import { Http2ServerRequest } from "http2";
7
5
  import { Readable } from "stream";
8
6
  import crypto from "crypto";
9
7
  import app from "@hot-updater/console";
10
8
  import { banner, createZipTargetFiles, getCwd, loadConfig, log, printBanner } from "@hot-updater/plugin-core";
9
+ import fs from "fs";
11
10
  import process$1, { execArgv, execPath, hrtime, platform } from "node:process";
12
11
  import { Buffer as Buffer$1 } from "node:buffer";
13
- import path$1 from "node:path";
12
+ import path from "node:path";
14
13
  import { fileURLToPath } from "node:url";
15
14
  import childProcess, { ChildProcess, execFile, spawn, spawnSync } from "node:child_process";
16
- import fsPromises, { constants } from "node:fs/promises";
15
+ import fs$1, { constants } from "node:fs/promises";
17
16
  import os, { constants as constants$1 } from "node:os";
18
- import fs$1, { appendFileSync, createReadStream, createWriteStream, readFileSync, statSync, writeFileSync } from "node:fs";
17
+ import fs$2, { appendFileSync, createReadStream, createWriteStream, readFileSync, statSync, writeFileSync } from "node:fs";
19
18
  import { aborted, callbackify, debuglog, inspect, promisify, stripVTControlCharacters } from "node:util";
20
19
  import net from "node:net";
20
+ import * as p$7 from "@clack/prompts";
21
+ import * as p$6 from "@clack/prompts";
22
+ import * as p$5 from "@clack/prompts";
21
23
  import * as p$4 from "@clack/prompts";
22
24
  import * as p$3 from "@clack/prompts";
23
25
  import * as p$2 from "@clack/prompts";
24
26
  import * as p$1 from "@clack/prompts";
25
27
  import * as p from "@clack/prompts";
26
- import fs$2 from "fs/promises";
28
+ import fs$3 from "fs/promises";
27
29
  import { openRepository } from "es-git";
30
+ import path$1 from "path";
28
31
  import { XcodeProject } from "@bacons/xcode";
29
32
  import { globby, globbySync } from "globby";
30
33
  import { nativeFingerprint } from "@rnef/tools";
@@ -484,11 +487,11 @@ var require_re = __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_module
484
487
  const { MAX_SAFE_COMPONENT_LENGTH, MAX_SAFE_BUILD_LENGTH, MAX_LENGTH: MAX_LENGTH$1 } = require_constants();
485
488
  const debug$3 = require_debug();
486
489
  exports = module.exports = {};
487
- const re$3 = exports.re = [];
490
+ const re$4 = exports.re = [];
488
491
  const safeRe = exports.safeRe = [];
489
492
  const src = exports.src = [];
490
493
  const safeSrc = exports.safeSrc = [];
491
- const t$3 = exports.t = {};
494
+ const t$4 = exports.t = {};
492
495
  let R = 0;
493
496
  const LETTERDASHNUMBER = "[a-zA-Z0-9-]";
494
497
  const safeRegexReplacements = [
@@ -504,55 +507,55 @@ var require_re = __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_module
504
507
  const safe = makeSafeRegex(value);
505
508
  const index$1 = R++;
506
509
  debug$3(name, index$1, value);
507
- t$3[name] = index$1;
510
+ t$4[name] = index$1;
508
511
  src[index$1] = value;
509
512
  safeSrc[index$1] = safe;
510
- re$3[index$1] = new RegExp(value, isGlobal ? "g" : void 0);
513
+ re$4[index$1] = new RegExp(value, isGlobal ? "g" : void 0);
511
514
  safeRe[index$1] = new RegExp(safe, isGlobal ? "g" : void 0);
512
515
  };
513
516
  createToken("NUMERICIDENTIFIER", "0|[1-9]\\d*");
514
517
  createToken("NUMERICIDENTIFIERLOOSE", "\\d+");
515
518
  createToken("NONNUMERICIDENTIFIER", `\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`);
516
- createToken("MAINVERSION", `(${src[t$3.NUMERICIDENTIFIER]})\\.(${src[t$3.NUMERICIDENTIFIER]})\\.(${src[t$3.NUMERICIDENTIFIER]})`);
517
- createToken("MAINVERSIONLOOSE", `(${src[t$3.NUMERICIDENTIFIERLOOSE]})\\.(${src[t$3.NUMERICIDENTIFIERLOOSE]})\\.(${src[t$3.NUMERICIDENTIFIERLOOSE]})`);
518
- createToken("PRERELEASEIDENTIFIER", `(?:${src[t$3.NONNUMERICIDENTIFIER]}|${src[t$3.NUMERICIDENTIFIER]})`);
519
- createToken("PRERELEASEIDENTIFIERLOOSE", `(?:${src[t$3.NONNUMERICIDENTIFIER]}|${src[t$3.NUMERICIDENTIFIERLOOSE]})`);
520
- createToken("PRERELEASE", `(?:-(${src[t$3.PRERELEASEIDENTIFIER]}(?:\\.${src[t$3.PRERELEASEIDENTIFIER]})*))`);
521
- createToken("PRERELEASELOOSE", `(?:-?(${src[t$3.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${src[t$3.PRERELEASEIDENTIFIERLOOSE]})*))`);
519
+ createToken("MAINVERSION", `(${src[t$4.NUMERICIDENTIFIER]})\\.(${src[t$4.NUMERICIDENTIFIER]})\\.(${src[t$4.NUMERICIDENTIFIER]})`);
520
+ createToken("MAINVERSIONLOOSE", `(${src[t$4.NUMERICIDENTIFIERLOOSE]})\\.(${src[t$4.NUMERICIDENTIFIERLOOSE]})\\.(${src[t$4.NUMERICIDENTIFIERLOOSE]})`);
521
+ createToken("PRERELEASEIDENTIFIER", `(?:${src[t$4.NONNUMERICIDENTIFIER]}|${src[t$4.NUMERICIDENTIFIER]})`);
522
+ createToken("PRERELEASEIDENTIFIERLOOSE", `(?:${src[t$4.NONNUMERICIDENTIFIER]}|${src[t$4.NUMERICIDENTIFIERLOOSE]})`);
523
+ createToken("PRERELEASE", `(?:-(${src[t$4.PRERELEASEIDENTIFIER]}(?:\\.${src[t$4.PRERELEASEIDENTIFIER]})*))`);
524
+ createToken("PRERELEASELOOSE", `(?:-?(${src[t$4.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${src[t$4.PRERELEASEIDENTIFIERLOOSE]})*))`);
522
525
  createToken("BUILDIDENTIFIER", `${LETTERDASHNUMBER}+`);
523
- createToken("BUILD", `(?:\\+(${src[t$3.BUILDIDENTIFIER]}(?:\\.${src[t$3.BUILDIDENTIFIER]})*))`);
524
- createToken("FULLPLAIN", `v?${src[t$3.MAINVERSION]}${src[t$3.PRERELEASE]}?${src[t$3.BUILD]}?`);
525
- createToken("FULL", `^${src[t$3.FULLPLAIN]}$`);
526
- createToken("LOOSEPLAIN", `[v=\\s]*${src[t$3.MAINVERSIONLOOSE]}${src[t$3.PRERELEASELOOSE]}?${src[t$3.BUILD]}?`);
527
- createToken("LOOSE", `^${src[t$3.LOOSEPLAIN]}$`);
526
+ createToken("BUILD", `(?:\\+(${src[t$4.BUILDIDENTIFIER]}(?:\\.${src[t$4.BUILDIDENTIFIER]})*))`);
527
+ createToken("FULLPLAIN", `v?${src[t$4.MAINVERSION]}${src[t$4.PRERELEASE]}?${src[t$4.BUILD]}?`);
528
+ createToken("FULL", `^${src[t$4.FULLPLAIN]}$`);
529
+ createToken("LOOSEPLAIN", `[v=\\s]*${src[t$4.MAINVERSIONLOOSE]}${src[t$4.PRERELEASELOOSE]}?${src[t$4.BUILD]}?`);
530
+ createToken("LOOSE", `^${src[t$4.LOOSEPLAIN]}$`);
528
531
  createToken("GTLT", "((?:<|>)?=?)");
529
- createToken("XRANGEIDENTIFIERLOOSE", `${src[t$3.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);
530
- createToken("XRANGEIDENTIFIER", `${src[t$3.NUMERICIDENTIFIER]}|x|X|\\*`);
531
- createToken("XRANGEPLAIN", `[v=\\s]*(${src[t$3.XRANGEIDENTIFIER]})(?:\\.(${src[t$3.XRANGEIDENTIFIER]})(?:\\.(${src[t$3.XRANGEIDENTIFIER]})(?:${src[t$3.PRERELEASE]})?${src[t$3.BUILD]}?)?)?`);
532
- createToken("XRANGEPLAINLOOSE", `[v=\\s]*(${src[t$3.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t$3.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t$3.XRANGEIDENTIFIERLOOSE]})(?:${src[t$3.PRERELEASELOOSE]})?${src[t$3.BUILD]}?)?)?`);
533
- createToken("XRANGE", `^${src[t$3.GTLT]}\\s*${src[t$3.XRANGEPLAIN]}$`);
534
- createToken("XRANGELOOSE", `^${src[t$3.GTLT]}\\s*${src[t$3.XRANGEPLAINLOOSE]}$`);
532
+ createToken("XRANGEIDENTIFIERLOOSE", `${src[t$4.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);
533
+ createToken("XRANGEIDENTIFIER", `${src[t$4.NUMERICIDENTIFIER]}|x|X|\\*`);
534
+ createToken("XRANGEPLAIN", `[v=\\s]*(${src[t$4.XRANGEIDENTIFIER]})(?:\\.(${src[t$4.XRANGEIDENTIFIER]})(?:\\.(${src[t$4.XRANGEIDENTIFIER]})(?:${src[t$4.PRERELEASE]})?${src[t$4.BUILD]}?)?)?`);
535
+ createToken("XRANGEPLAINLOOSE", `[v=\\s]*(${src[t$4.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t$4.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t$4.XRANGEIDENTIFIERLOOSE]})(?:${src[t$4.PRERELEASELOOSE]})?${src[t$4.BUILD]}?)?)?`);
536
+ createToken("XRANGE", `^${src[t$4.GTLT]}\\s*${src[t$4.XRANGEPLAIN]}$`);
537
+ createToken("XRANGELOOSE", `^${src[t$4.GTLT]}\\s*${src[t$4.XRANGEPLAINLOOSE]}$`);
535
538
  createToken("COERCEPLAIN", `(^|[^\\d])(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}})(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`);
536
- createToken("COERCE", `${src[t$3.COERCEPLAIN]}(?:$|[^\\d])`);
537
- createToken("COERCEFULL", src[t$3.COERCEPLAIN] + `(?:${src[t$3.PRERELEASE]})?(?:${src[t$3.BUILD]})?(?:$|[^\\d])`);
538
- createToken("COERCERTL", src[t$3.COERCE], true);
539
- createToken("COERCERTLFULL", src[t$3.COERCEFULL], true);
539
+ createToken("COERCE", `${src[t$4.COERCEPLAIN]}(?:$|[^\\d])`);
540
+ createToken("COERCEFULL", src[t$4.COERCEPLAIN] + `(?:${src[t$4.PRERELEASE]})?(?:${src[t$4.BUILD]})?(?:$|[^\\d])`);
541
+ createToken("COERCERTL", src[t$4.COERCE], true);
542
+ createToken("COERCERTLFULL", src[t$4.COERCEFULL], true);
540
543
  createToken("LONETILDE", "(?:~>?)");
541
- createToken("TILDETRIM", `(\\s*)${src[t$3.LONETILDE]}\\s+`, true);
544
+ createToken("TILDETRIM", `(\\s*)${src[t$4.LONETILDE]}\\s+`, true);
542
545
  exports.tildeTrimReplace = "$1~";
543
- createToken("TILDE", `^${src[t$3.LONETILDE]}${src[t$3.XRANGEPLAIN]}$`);
544
- createToken("TILDELOOSE", `^${src[t$3.LONETILDE]}${src[t$3.XRANGEPLAINLOOSE]}$`);
546
+ createToken("TILDE", `^${src[t$4.LONETILDE]}${src[t$4.XRANGEPLAIN]}$`);
547
+ createToken("TILDELOOSE", `^${src[t$4.LONETILDE]}${src[t$4.XRANGEPLAINLOOSE]}$`);
545
548
  createToken("LONECARET", "(?:\\^)");
546
- createToken("CARETTRIM", `(\\s*)${src[t$3.LONECARET]}\\s+`, true);
549
+ createToken("CARETTRIM", `(\\s*)${src[t$4.LONECARET]}\\s+`, true);
547
550
  exports.caretTrimReplace = "$1^";
548
- createToken("CARET", `^${src[t$3.LONECARET]}${src[t$3.XRANGEPLAIN]}$`);
549
- createToken("CARETLOOSE", `^${src[t$3.LONECARET]}${src[t$3.XRANGEPLAINLOOSE]}$`);
550
- createToken("COMPARATORLOOSE", `^${src[t$3.GTLT]}\\s*(${src[t$3.LOOSEPLAIN]})$|^$`);
551
- createToken("COMPARATOR", `^${src[t$3.GTLT]}\\s*(${src[t$3.FULLPLAIN]})$|^$`);
552
- createToken("COMPARATORTRIM", `(\\s*)${src[t$3.GTLT]}\\s*(${src[t$3.LOOSEPLAIN]}|${src[t$3.XRANGEPLAIN]})`, true);
551
+ createToken("CARET", `^${src[t$4.LONECARET]}${src[t$4.XRANGEPLAIN]}$`);
552
+ createToken("CARETLOOSE", `^${src[t$4.LONECARET]}${src[t$4.XRANGEPLAINLOOSE]}$`);
553
+ createToken("COMPARATORLOOSE", `^${src[t$4.GTLT]}\\s*(${src[t$4.LOOSEPLAIN]})$|^$`);
554
+ createToken("COMPARATOR", `^${src[t$4.GTLT]}\\s*(${src[t$4.FULLPLAIN]})$|^$`);
555
+ createToken("COMPARATORTRIM", `(\\s*)${src[t$4.GTLT]}\\s*(${src[t$4.LOOSEPLAIN]}|${src[t$4.XRANGEPLAIN]})`, true);
553
556
  exports.comparatorTrimReplace = "$1$2$3";
554
- createToken("HYPHENRANGE", `^\\s*(${src[t$3.XRANGEPLAIN]})\\s+-\\s+(${src[t$3.XRANGEPLAIN]})\\s*$`);
555
- createToken("HYPHENRANGELOOSE", `^\\s*(${src[t$3.XRANGEPLAINLOOSE]})\\s+-\\s+(${src[t$3.XRANGEPLAINLOOSE]})\\s*$`);
557
+ createToken("HYPHENRANGE", `^\\s*(${src[t$4.XRANGEPLAIN]})\\s+-\\s+(${src[t$4.XRANGEPLAIN]})\\s*$`);
558
+ createToken("HYPHENRANGELOOSE", `^\\s*(${src[t$4.XRANGEPLAINLOOSE]})\\s+-\\s+(${src[t$4.XRANGEPLAINLOOSE]})\\s*$`);
556
559
  createToken("STAR", "(<|>)?=?\\s*\\*");
557
560
  createToken("GTE0", "^\\s*>=\\s*0\\.0\\.0\\s*$");
558
561
  createToken("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$");
@@ -580,16 +583,16 @@ var require_identifiers = __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/no
580
583
 
581
584
  //#endregion
582
585
  //#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/semver.js
583
- var require_semver = __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/semver.js"(exports, module) {
586
+ var require_semver$1 = __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/semver.js"(exports, module) {
584
587
  const debug$2 = require_debug();
585
588
  const { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants();
586
- const { safeRe: re$2, t: t$2 } = require_re();
589
+ const { safeRe: re$3, t: t$3 } = require_re();
587
590
  const parseOptions$2 = require_parse_options();
588
591
  const { compareIdentifiers } = require_identifiers();
589
- var SemVer$4 = class SemVer$4 {
592
+ var SemVer$15 = class SemVer$15 {
590
593
  constructor(version$1, options) {
591
594
  options = parseOptions$2(options);
592
- if (version$1 instanceof SemVer$4) if (version$1.loose === !!options.loose && version$1.includePrerelease === !!options.includePrerelease) return version$1;
595
+ if (version$1 instanceof SemVer$15) if (version$1.loose === !!options.loose && version$1.includePrerelease === !!options.includePrerelease) return version$1;
593
596
  else version$1 = version$1.version;
594
597
  else if (typeof version$1 !== "string") throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version$1}".`);
595
598
  if (version$1.length > MAX_LENGTH) throw new TypeError(`version is longer than ${MAX_LENGTH} characters`);
@@ -597,7 +600,7 @@ var require_semver = __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_mo
597
600
  this.options = options;
598
601
  this.loose = !!options.loose;
599
602
  this.includePrerelease = !!options.includePrerelease;
600
- const m = version$1.trim().match(options.loose ? re$2[t$2.LOOSE] : re$2[t$2.FULL]);
603
+ const m = version$1.trim().match(options.loose ? re$3[t$3.LOOSE] : re$3[t$3.FULL]);
601
604
  if (!m) throw new TypeError(`Invalid Version: ${version$1}`);
602
605
  this.raw = version$1;
603
606
  this.major = +m[1];
@@ -627,19 +630,19 @@ var require_semver = __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_mo
627
630
  }
628
631
  compare(other) {
629
632
  debug$2("SemVer.compare", this.version, this.options, other);
630
- if (!(other instanceof SemVer$4)) {
633
+ if (!(other instanceof SemVer$15)) {
631
634
  if (typeof other === "string" && other === this.version) return 0;
632
- other = new SemVer$4(other, this.options);
635
+ other = new SemVer$15(other, this.options);
633
636
  }
634
637
  if (other.version === this.version) return 0;
635
638
  return this.compareMain(other) || this.comparePre(other);
636
639
  }
637
640
  compareMain(other) {
638
- if (!(other instanceof SemVer$4)) other = new SemVer$4(other, this.options);
641
+ if (!(other instanceof SemVer$15)) other = new SemVer$15(other, this.options);
639
642
  return compareIdentifiers(this.major, other.major) || compareIdentifiers(this.minor, other.minor) || compareIdentifiers(this.patch, other.patch);
640
643
  }
641
644
  comparePre(other) {
642
- if (!(other instanceof SemVer$4)) other = new SemVer$4(other, this.options);
645
+ if (!(other instanceof SemVer$15)) other = new SemVer$15(other, this.options);
643
646
  if (this.prerelease.length && !other.prerelease.length) return -1;
644
647
  else if (!this.prerelease.length && other.prerelease.length) return 1;
645
648
  else if (!this.prerelease.length && !other.prerelease.length) return 0;
@@ -656,7 +659,7 @@ var require_semver = __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_mo
656
659
  } while (++i$2);
657
660
  }
658
661
  compareBuild(other) {
659
- if (!(other instanceof SemVer$4)) other = new SemVer$4(other, this.options);
662
+ if (!(other instanceof SemVer$15)) other = new SemVer$15(other, this.options);
660
663
  let i$2 = 0;
661
664
  do {
662
665
  const a$1 = this.build[i$2];
@@ -673,7 +676,7 @@ var require_semver = __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_mo
673
676
  if (release.startsWith("pre")) {
674
677
  if (!identifier && identifierBase === false) throw new Error("invalid increment argument: identifier is empty");
675
678
  if (identifier) {
676
- const match = `-${identifier}`.match(this.options.loose ? re$2[t$2.PRERELEASELOOSE] : re$2[t$2.PRERELEASE]);
679
+ const match = `-${identifier}`.match(this.options.loose ? re$3[t$3.PRERELEASELOOSE] : re$3[t$3.PRERELEASE]);
677
680
  if (!match || match[1] !== identifier) throw new Error(`invalid identifier: ${identifier}`);
678
681
  }
679
682
  }
@@ -734,11 +737,11 @@ var require_semver = __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_mo
734
737
  }
735
738
  }
736
739
  if (identifier) {
737
- let prerelease = [identifier, base];
738
- if (identifierBase === false) prerelease = [identifier];
740
+ let prerelease$2 = [identifier, base];
741
+ if (identifierBase === false) prerelease$2 = [identifier];
739
742
  if (compareIdentifiers(this.prerelease[0], identifier) === 0) {
740
- if (isNaN(this.prerelease[1])) this.prerelease = prerelease;
741
- } else this.prerelease = prerelease;
743
+ if (isNaN(this.prerelease[1])) this.prerelease = prerelease$2;
744
+ } else this.prerelease = prerelease$2;
742
745
  }
743
746
  break;
744
747
  }
@@ -749,75 +752,75 @@ var require_semver = __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_mo
749
752
  return this;
750
753
  }
751
754
  };
752
- module.exports = SemVer$4;
755
+ module.exports = SemVer$15;
753
756
  } });
754
757
 
755
758
  //#endregion
756
759
  //#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/compare.js
757
760
  var require_compare = __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/compare.js"(exports, module) {
758
- const SemVer$3 = require_semver();
759
- const compare$6 = (a$1, b, loose) => new SemVer$3(a$1, loose).compare(new SemVer$3(b, loose));
760
- module.exports = compare$6;
761
+ const SemVer$14 = require_semver$1();
762
+ const compare$11 = (a$1, b, loose) => new SemVer$14(a$1, loose).compare(new SemVer$14(b, loose));
763
+ module.exports = compare$11;
761
764
  } });
762
765
 
763
766
  //#endregion
764
767
  //#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/eq.js
765
768
  var require_eq = __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/eq.js"(exports, module) {
766
- const compare$5 = require_compare();
767
- const eq$1 = (a$1, b, loose) => compare$5(a$1, b, loose) === 0;
768
- module.exports = eq$1;
769
+ const compare$10 = require_compare();
770
+ const eq$2 = (a$1, b, loose) => compare$10(a$1, b, loose) === 0;
771
+ module.exports = eq$2;
769
772
  } });
770
773
 
771
774
  //#endregion
772
775
  //#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/neq.js
773
776
  var require_neq = __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/neq.js"(exports, module) {
774
- const compare$4 = require_compare();
775
- const neq$1 = (a$1, b, loose) => compare$4(a$1, b, loose) !== 0;
776
- module.exports = neq$1;
777
+ const compare$9 = require_compare();
778
+ const neq$2 = (a$1, b, loose) => compare$9(a$1, b, loose) !== 0;
779
+ module.exports = neq$2;
777
780
  } });
778
781
 
779
782
  //#endregion
780
783
  //#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/gt.js
781
784
  var require_gt = __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/gt.js"(exports, module) {
782
- const compare$3 = require_compare();
783
- const gt$1 = (a$1, b, loose) => compare$3(a$1, b, loose) > 0;
784
- module.exports = gt$1;
785
+ const compare$8 = require_compare();
786
+ const gt$4 = (a$1, b, loose) => compare$8(a$1, b, loose) > 0;
787
+ module.exports = gt$4;
785
788
  } });
786
789
 
787
790
  //#endregion
788
791
  //#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/gte.js
789
792
  var require_gte = __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/gte.js"(exports, module) {
790
- const compare$2 = require_compare();
791
- const gte$1 = (a$1, b, loose) => compare$2(a$1, b, loose) >= 0;
792
- module.exports = gte$1;
793
+ const compare$7 = require_compare();
794
+ const gte$3 = (a$1, b, loose) => compare$7(a$1, b, loose) >= 0;
795
+ module.exports = gte$3;
793
796
  } });
794
797
 
795
798
  //#endregion
796
799
  //#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/lt.js
797
800
  var require_lt = __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/lt.js"(exports, module) {
798
- const compare$1 = require_compare();
799
- const lt$1 = (a$1, b, loose) => compare$1(a$1, b, loose) < 0;
800
- module.exports = lt$1;
801
+ const compare$6 = require_compare();
802
+ const lt$3 = (a$1, b, loose) => compare$6(a$1, b, loose) < 0;
803
+ module.exports = lt$3;
801
804
  } });
802
805
 
803
806
  //#endregion
804
807
  //#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/lte.js
805
808
  var require_lte = __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/lte.js"(exports, module) {
806
- const compare = require_compare();
807
- const lte$1 = (a$1, b, loose) => compare(a$1, b, loose) <= 0;
808
- module.exports = lte$1;
809
+ const compare$5 = require_compare();
810
+ const lte$3 = (a$1, b, loose) => compare$5(a$1, b, loose) <= 0;
811
+ module.exports = lte$3;
809
812
  } });
810
813
 
811
814
  //#endregion
812
815
  //#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/cmp.js
813
816
  var require_cmp = __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/cmp.js"(exports, module) {
814
- const eq = require_eq();
815
- const neq = require_neq();
816
- const gt = require_gt();
817
- const gte = require_gte();
818
- const lt = require_lt();
819
- const lte = require_lte();
820
- const cmp$1 = (a$1, op, b, loose) => {
817
+ const eq$1 = require_eq();
818
+ const neq$1 = require_neq();
819
+ const gt$3 = require_gt();
820
+ const gte$2 = require_gte();
821
+ const lt$2 = require_lt();
822
+ const lte$2 = require_lte();
823
+ const cmp$2 = (a$1, op, b, loose) => {
821
824
  switch (op) {
822
825
  case "===":
823
826
  if (typeof a$1 === "object") a$1 = a$1.version;
@@ -829,69 +832,69 @@ var require_cmp = __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modul
829
832
  return a$1 !== b;
830
833
  case "":
831
834
  case "=":
832
- case "==": return eq(a$1, b, loose);
833
- case "!=": return neq(a$1, b, loose);
834
- case ">": return gt(a$1, b, loose);
835
- case ">=": return gte(a$1, b, loose);
836
- case "<": return lt(a$1, b, loose);
837
- case "<=": return lte(a$1, b, loose);
835
+ case "==": return eq$1(a$1, b, loose);
836
+ case "!=": return neq$1(a$1, b, loose);
837
+ case ">": return gt$3(a$1, b, loose);
838
+ case ">=": return gte$2(a$1, b, loose);
839
+ case "<": return lt$2(a$1, b, loose);
840
+ case "<=": return lte$2(a$1, b, loose);
838
841
  default: throw new TypeError(`Invalid operator: ${op}`);
839
842
  }
840
843
  };
841
- module.exports = cmp$1;
844
+ module.exports = cmp$2;
842
845
  } });
843
846
 
844
847
  //#endregion
845
848
  //#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/comparator.js
846
849
  var require_comparator = __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/comparator.js"(exports, module) {
847
- const ANY = Symbol("SemVer ANY");
848
- var Comparator$1 = class Comparator$1 {
850
+ const ANY$2 = Symbol("SemVer ANY");
851
+ var Comparator$4 = class Comparator$4 {
849
852
  static get ANY() {
850
- return ANY;
853
+ return ANY$2;
851
854
  }
852
855
  constructor(comp, options) {
853
856
  options = parseOptions$1(options);
854
- if (comp instanceof Comparator$1) if (comp.loose === !!options.loose) return comp;
857
+ if (comp instanceof Comparator$4) if (comp.loose === !!options.loose) return comp;
855
858
  else comp = comp.value;
856
859
  comp = comp.trim().split(/\s+/).join(" ");
857
860
  debug$1("comparator", comp, options);
858
861
  this.options = options;
859
862
  this.loose = !!options.loose;
860
863
  this.parse(comp);
861
- if (this.semver === ANY) this.value = "";
864
+ if (this.semver === ANY$2) this.value = "";
862
865
  else this.value = this.operator + this.semver.version;
863
866
  debug$1("comp", this);
864
867
  }
865
868
  parse(comp) {
866
- const r = this.options.loose ? re$1[t$1.COMPARATORLOOSE] : re$1[t$1.COMPARATOR];
869
+ const r = this.options.loose ? re$2[t$2.COMPARATORLOOSE] : re$2[t$2.COMPARATOR];
867
870
  const m = comp.match(r);
868
871
  if (!m) throw new TypeError(`Invalid comparator: ${comp}`);
869
872
  this.operator = m[1] !== void 0 ? m[1] : "";
870
873
  if (this.operator === "=") this.operator = "";
871
- if (!m[2]) this.semver = ANY;
872
- else this.semver = new SemVer$2(m[2], this.options.loose);
874
+ if (!m[2]) this.semver = ANY$2;
875
+ else this.semver = new SemVer$13(m[2], this.options.loose);
873
876
  }
874
877
  toString() {
875
878
  return this.value;
876
879
  }
877
880
  test(version$1) {
878
881
  debug$1("Comparator.test", version$1, this.options.loose);
879
- if (this.semver === ANY || version$1 === ANY) return true;
882
+ if (this.semver === ANY$2 || version$1 === ANY$2) return true;
880
883
  if (typeof version$1 === "string") try {
881
- version$1 = new SemVer$2(version$1, this.options);
884
+ version$1 = new SemVer$13(version$1, this.options);
882
885
  } catch (er) {
883
886
  return false;
884
887
  }
885
- return cmp(version$1, this.operator, this.semver, this.options);
888
+ return cmp$1(version$1, this.operator, this.semver, this.options);
886
889
  }
887
890
  intersects(comp, options) {
888
- if (!(comp instanceof Comparator$1)) throw new TypeError("a Comparator is required");
891
+ if (!(comp instanceof Comparator$4)) throw new TypeError("a Comparator is required");
889
892
  if (this.operator === "") {
890
893
  if (this.value === "") return true;
891
- return new Range$2(comp.value, options).test(this.value);
894
+ return new Range$11(comp.value, options).test(this.value);
892
895
  } else if (comp.operator === "") {
893
896
  if (comp.value === "") return true;
894
- return new Range$2(this.value, options).test(comp.semver);
897
+ return new Range$11(this.value, options).test(comp.semver);
895
898
  }
896
899
  options = parseOptions$1(options);
897
900
  if (options.includePrerelease && (this.value === "<0.0.0-0" || comp.value === "<0.0.0-0")) return false;
@@ -899,30 +902,30 @@ var require_comparator = __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/nod
899
902
  if (this.operator.startsWith(">") && comp.operator.startsWith(">")) return true;
900
903
  if (this.operator.startsWith("<") && comp.operator.startsWith("<")) return true;
901
904
  if (this.semver.version === comp.semver.version && this.operator.includes("=") && comp.operator.includes("=")) return true;
902
- if (cmp(this.semver, "<", comp.semver, options) && this.operator.startsWith(">") && comp.operator.startsWith("<")) return true;
903
- if (cmp(this.semver, ">", comp.semver, options) && this.operator.startsWith("<") && comp.operator.startsWith(">")) return true;
905
+ if (cmp$1(this.semver, "<", comp.semver, options) && this.operator.startsWith(">") && comp.operator.startsWith("<")) return true;
906
+ if (cmp$1(this.semver, ">", comp.semver, options) && this.operator.startsWith("<") && comp.operator.startsWith(">")) return true;
904
907
  return false;
905
908
  }
906
909
  };
907
- module.exports = Comparator$1;
910
+ module.exports = Comparator$4;
908
911
  const parseOptions$1 = require_parse_options();
909
- const { safeRe: re$1, t: t$1 } = require_re();
910
- const cmp = require_cmp();
912
+ const { safeRe: re$2, t: t$2 } = require_re();
913
+ const cmp$1 = require_cmp();
911
914
  const debug$1 = require_debug();
912
- const SemVer$2 = require_semver();
913
- const Range$2 = require_range();
915
+ const SemVer$13 = require_semver$1();
916
+ const Range$11 = require_range();
914
917
  } });
915
918
 
916
919
  //#endregion
917
920
  //#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/range.js
918
921
  var require_range = __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/classes/range.js"(exports, module) {
919
922
  const SPACE_CHARACTERS = /\s+/g;
920
- var Range$1 = class Range$1 {
923
+ var Range$10 = class Range$10 {
921
924
  constructor(range, options) {
922
925
  options = parseOptions(options);
923
- if (range instanceof Range$1) if (range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease) return range;
924
- else return new Range$1(range.raw, options);
925
- if (range instanceof Comparator) {
926
+ if (range instanceof Range$10) if (range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease) return range;
927
+ else return new Range$10(range.raw, options);
928
+ if (range instanceof Comparator$3) {
926
929
  this.raw = range.value;
927
930
  this.set = [[range]];
928
931
  this.formatted = void 0;
@@ -973,23 +976,23 @@ var require_range = __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_mod
973
976
  const cached = cache$1.get(memoKey);
974
977
  if (cached) return cached;
975
978
  const loose = this.options.loose;
976
- const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE];
979
+ const hr = loose ? re$1[t$1.HYPHENRANGELOOSE] : re$1[t$1.HYPHENRANGE];
977
980
  range = range.replace(hr, hyphenReplace(this.options.includePrerelease));
978
981
  debug("hyphen replace", range);
979
- range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace);
982
+ range = range.replace(re$1[t$1.COMPARATORTRIM], comparatorTrimReplace);
980
983
  debug("comparator trim", range);
981
- range = range.replace(re[t.TILDETRIM], tildeTrimReplace);
984
+ range = range.replace(re$1[t$1.TILDETRIM], tildeTrimReplace);
982
985
  debug("tilde trim", range);
983
- range = range.replace(re[t.CARETTRIM], caretTrimReplace);
986
+ range = range.replace(re$1[t$1.CARETTRIM], caretTrimReplace);
984
987
  debug("caret trim", range);
985
988
  let rangeList = range.split(" ").map((comp) => parseComparator(comp, this.options)).join(" ").split(/\s+/).map((comp) => replaceGTE0(comp, this.options));
986
989
  if (loose) rangeList = rangeList.filter((comp) => {
987
990
  debug("loose invalid filter", comp, this.options);
988
- return !!comp.match(re[t.COMPARATORLOOSE]);
991
+ return !!comp.match(re$1[t$1.COMPARATORLOOSE]);
989
992
  });
990
993
  debug("range list", rangeList);
991
994
  const rangeMap = /* @__PURE__ */ new Map();
992
- const comparators = rangeList.map((comp) => new Comparator(comp, this.options));
995
+ const comparators = rangeList.map((comp) => new Comparator$3(comp, this.options));
993
996
  for (const comp of comparators) {
994
997
  if (isNullSet(comp)) return [comp];
995
998
  rangeMap.set(comp.value, comp);
@@ -1000,7 +1003,7 @@ var require_range = __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_mod
1000
1003
  return result;
1001
1004
  }
1002
1005
  intersects(range, options) {
1003
- if (!(range instanceof Range$1)) throw new TypeError("a Range is required");
1006
+ if (!(range instanceof Range$10)) throw new TypeError("a Range is required");
1004
1007
  return this.set.some((thisComparators) => {
1005
1008
  return isSatisfiable(thisComparators, options) && range.set.some((rangeComparators) => {
1006
1009
  return isSatisfiable(rangeComparators, options) && thisComparators.every((thisComparator) => {
@@ -1014,7 +1017,7 @@ var require_range = __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_mod
1014
1017
  test(version$1) {
1015
1018
  if (!version$1) return false;
1016
1019
  if (typeof version$1 === "string") try {
1017
- version$1 = new SemVer$1(version$1, this.options);
1020
+ version$1 = new SemVer$12(version$1, this.options);
1018
1021
  } catch (er) {
1019
1022
  return false;
1020
1023
  }
@@ -1022,14 +1025,14 @@ var require_range = __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_mod
1022
1025
  return false;
1023
1026
  }
1024
1027
  };
1025
- module.exports = Range$1;
1028
+ module.exports = Range$10;
1026
1029
  const LRU = require_lrucache();
1027
1030
  const cache$1 = new LRU();
1028
1031
  const parseOptions = require_parse_options();
1029
- const Comparator = require_comparator();
1032
+ const Comparator$3 = require_comparator();
1030
1033
  const debug = require_debug();
1031
- const SemVer$1 = require_semver();
1032
- const { safeRe: re, t, comparatorTrimReplace, tildeTrimReplace, caretTrimReplace } = require_re();
1034
+ const SemVer$12 = require_semver$1();
1035
+ const { safeRe: re$1, t: t$1, comparatorTrimReplace, tildeTrimReplace, caretTrimReplace } = require_re();
1033
1036
  const { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require_constants();
1034
1037
  const isNullSet = (c$1) => c$1.value === "<0.0.0-0";
1035
1038
  const isAny = (c$1) => c$1.value === "";
@@ -1062,17 +1065,17 @@ var require_range = __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_mod
1062
1065
  return comp.trim().split(/\s+/).map((c$1) => replaceTilde(c$1, options)).join(" ");
1063
1066
  };
1064
1067
  const replaceTilde = (comp, options) => {
1065
- const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE];
1066
- return comp.replace(r, (_, M, m, p$5, pr) => {
1067
- debug("tilde", comp, _, M, m, p$5, pr);
1068
+ const r = options.loose ? re$1[t$1.TILDELOOSE] : re$1[t$1.TILDE];
1069
+ return comp.replace(r, (_, M, m, p$8, pr) => {
1070
+ debug("tilde", comp, _, M, m, p$8, pr);
1068
1071
  let ret;
1069
1072
  if (isX(M)) ret = "";
1070
1073
  else if (isX(m)) ret = `>=${M}.0.0 <${+M + 1}.0.0-0`;
1071
- else if (isX(p$5)) ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0`;
1074
+ else if (isX(p$8)) ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0`;
1072
1075
  else if (pr) {
1073
1076
  debug("replaceTilde pr", pr);
1074
- ret = `>=${M}.${m}.${p$5}-${pr} <${M}.${+m + 1}.0-0`;
1075
- } else ret = `>=${M}.${m}.${p$5} <${M}.${+m + 1}.0-0`;
1077
+ ret = `>=${M}.${m}.${p$8}-${pr} <${M}.${+m + 1}.0-0`;
1078
+ } else ret = `>=${M}.${m}.${p$8} <${M}.${+m + 1}.0-0`;
1076
1079
  debug("tilde return", ret);
1077
1080
  return ret;
1078
1081
  });
@@ -1082,25 +1085,25 @@ var require_range = __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_mod
1082
1085
  };
1083
1086
  const replaceCaret = (comp, options) => {
1084
1087
  debug("caret", comp, options);
1085
- const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET];
1088
+ const r = options.loose ? re$1[t$1.CARETLOOSE] : re$1[t$1.CARET];
1086
1089
  const z = options.includePrerelease ? "-0" : "";
1087
- return comp.replace(r, (_, M, m, p$5, pr) => {
1088
- debug("caret", comp, _, M, m, p$5, pr);
1090
+ return comp.replace(r, (_, M, m, p$8, pr) => {
1091
+ debug("caret", comp, _, M, m, p$8, pr);
1089
1092
  let ret;
1090
1093
  if (isX(M)) ret = "";
1091
1094
  else if (isX(m)) ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`;
1092
- else if (isX(p$5)) if (M === "0") ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`;
1095
+ else if (isX(p$8)) if (M === "0") ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`;
1093
1096
  else ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0`;
1094
1097
  else if (pr) {
1095
1098
  debug("replaceCaret pr", pr);
1096
- if (M === "0") if (m === "0") ret = `>=${M}.${m}.${p$5}-${pr} <${M}.${m}.${+p$5 + 1}-0`;
1097
- else ret = `>=${M}.${m}.${p$5}-${pr} <${M}.${+m + 1}.0-0`;
1098
- else ret = `>=${M}.${m}.${p$5}-${pr} <${+M + 1}.0.0-0`;
1099
+ if (M === "0") if (m === "0") ret = `>=${M}.${m}.${p$8}-${pr} <${M}.${m}.${+p$8 + 1}-0`;
1100
+ else ret = `>=${M}.${m}.${p$8}-${pr} <${M}.${+m + 1}.0-0`;
1101
+ else ret = `>=${M}.${m}.${p$8}-${pr} <${+M + 1}.0.0-0`;
1099
1102
  } else {
1100
1103
  debug("no pr");
1101
- if (M === "0") if (m === "0") ret = `>=${M}.${m}.${p$5}${z} <${M}.${m}.${+p$5 + 1}-0`;
1102
- else ret = `>=${M}.${m}.${p$5}${z} <${M}.${+m + 1}.0-0`;
1103
- else ret = `>=${M}.${m}.${p$5} <${+M + 1}.0.0-0`;
1104
+ if (M === "0") if (m === "0") ret = `>=${M}.${m}.${p$8}${z} <${M}.${m}.${+p$8 + 1}-0`;
1105
+ else ret = `>=${M}.${m}.${p$8}${z} <${M}.${+m + 1}.0-0`;
1106
+ else ret = `>=${M}.${m}.${p$8} <${+M + 1}.0.0-0`;
1104
1107
  }
1105
1108
  debug("caret return", ret);
1106
1109
  return ret;
@@ -1112,12 +1115,12 @@ var require_range = __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_mod
1112
1115
  };
1113
1116
  const replaceXRange = (comp, options) => {
1114
1117
  comp = comp.trim();
1115
- const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE];
1116
- return comp.replace(r, (ret, gtlt, M, m, p$5, pr) => {
1117
- debug("xRange", comp, ret, gtlt, M, m, p$5, pr);
1118
+ const r = options.loose ? re$1[t$1.XRANGELOOSE] : re$1[t$1.XRANGE];
1119
+ return comp.replace(r, (ret, gtlt, M, m, p$8, pr) => {
1120
+ debug("xRange", comp, ret, gtlt, M, m, p$8, pr);
1118
1121
  const xM = isX(M);
1119
1122
  const xm = xM || isX(m);
1120
- const xp = xm || isX(p$5);
1123
+ const xp = xm || isX(p$8);
1121
1124
  const anyX = xp;
1122
1125
  if (gtlt === "=" && anyX) gtlt = "";
1123
1126
  pr = options.includePrerelease ? "-0" : "";
@@ -1125,16 +1128,16 @@ var require_range = __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_mod
1125
1128
  else ret = "*";
1126
1129
  else if (gtlt && anyX) {
1127
1130
  if (xm) m = 0;
1128
- p$5 = 0;
1131
+ p$8 = 0;
1129
1132
  if (gtlt === ">") {
1130
1133
  gtlt = ">=";
1131
1134
  if (xm) {
1132
1135
  M = +M + 1;
1133
1136
  m = 0;
1134
- p$5 = 0;
1137
+ p$8 = 0;
1135
1138
  } else {
1136
1139
  m = +m + 1;
1137
- p$5 = 0;
1140
+ p$8 = 0;
1138
1141
  }
1139
1142
  } else if (gtlt === "<=") {
1140
1143
  gtlt = "<";
@@ -1142,7 +1145,7 @@ var require_range = __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_mod
1142
1145
  else m = +m + 1;
1143
1146
  }
1144
1147
  if (gtlt === "<") pr = "-0";
1145
- ret = `${gtlt + M}.${m}.${p$5}${pr}`;
1148
+ ret = `${gtlt + M}.${m}.${p$8}${pr}`;
1146
1149
  } else if (xm) ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0`;
1147
1150
  else if (xp) ret = `>=${M}.${m}.0${pr} <${M}.${+m + 1}.0-0`;
1148
1151
  debug("xRange return", ret);
@@ -1151,11 +1154,11 @@ var require_range = __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_mod
1151
1154
  };
1152
1155
  const replaceStars = (comp, options) => {
1153
1156
  debug("replaceStars", comp, options);
1154
- return comp.trim().replace(re[t.STAR], "");
1157
+ return comp.trim().replace(re$1[t$1.STAR], "");
1155
1158
  };
1156
1159
  const replaceGTE0 = (comp, options) => {
1157
1160
  debug("replaceGTE0", comp, options);
1158
- return comp.trim().replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], "");
1161
+ return comp.trim().replace(re$1[options.includePrerelease ? t$1.GTE0PRE : t$1.GTE0], "");
1159
1162
  };
1160
1163
  const hyphenReplace = (incPr) => ($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr) => {
1161
1164
  if (isX(fM)) from = "";
@@ -1176,7 +1179,7 @@ var require_range = __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_mod
1176
1179
  if (version$1.prerelease.length && !options.includePrerelease) {
1177
1180
  for (let i$2 = 0; i$2 < set.length; i$2++) {
1178
1181
  debug(set[i$2].semver);
1179
- if (set[i$2].semver === Comparator.ANY) continue;
1182
+ if (set[i$2].semver === Comparator$3.ANY) continue;
1180
1183
  if (set[i$2].semver.prerelease.length > 0) {
1181
1184
  const allowed = set[i$2].semver;
1182
1185
  if (allowed.major === version$1.major && allowed.minor === version$1.minor && allowed.patch === version$1.patch) return true;
@@ -1191,15 +1194,15 @@ var require_range = __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_mod
1191
1194
  //#endregion
1192
1195
  //#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/valid.js
1193
1196
  var require_valid$1 = __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/valid.js"(exports, module) {
1194
- const Range = require_range();
1195
- const validRange = (range, options) => {
1197
+ const Range$9 = require_range();
1198
+ const validRange$1 = (range, options) => {
1196
1199
  try {
1197
- return new Range(range, options).range || "*";
1200
+ return new Range$9(range, options).range || "*";
1198
1201
  } catch (er) {
1199
1202
  return null;
1200
1203
  }
1201
1204
  };
1202
- module.exports = validRange;
1205
+ module.exports = validRange$1;
1203
1206
  } });
1204
1207
 
1205
1208
  //#endregion
@@ -1207,7 +1210,7 @@ var require_valid$1 = __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_m
1207
1210
  let isDockerCached;
1208
1211
  function hasDockerEnv() {
1209
1212
  try {
1210
- fs$1.statSync("/.dockerenv");
1213
+ fs$2.statSync("/.dockerenv");
1211
1214
  return true;
1212
1215
  } catch {
1213
1216
  return false;
@@ -1215,7 +1218,7 @@ function hasDockerEnv() {
1215
1218
  }
1216
1219
  function hasDockerCGroup() {
1217
1220
  try {
1218
- return fs$1.readFileSync("/proc/self/cgroup", "utf8").includes("docker");
1221
+ return fs$2.readFileSync("/proc/self/cgroup", "utf8").includes("docker");
1219
1222
  } catch {
1220
1223
  return false;
1221
1224
  }
@@ -1230,7 +1233,7 @@ function isDocker() {
1230
1233
  let cachedResult;
1231
1234
  const hasContainerEnv = () => {
1232
1235
  try {
1233
- fs$1.statSync("/run/.containerenv");
1236
+ fs$2.statSync("/run/.containerenv");
1234
1237
  return true;
1235
1238
  } catch {
1236
1239
  return false;
@@ -1250,7 +1253,7 @@ const isWsl = () => {
1250
1253
  return true;
1251
1254
  }
1252
1255
  try {
1253
- return fs$1.readFileSync("/proc/version", "utf8").toLowerCase().includes("microsoft") ? !isInsideContainer() : false;
1256
+ return fs$2.readFileSync("/proc/version", "utf8").toLowerCase().includes("microsoft") ? !isInsideContainer() : false;
1254
1257
  } catch {
1255
1258
  return false;
1256
1259
  }
@@ -1403,8 +1406,8 @@ async function defaultBrowser() {
1403
1406
 
1404
1407
  //#endregion
1405
1408
  //#region ../../node_modules/.pnpm/open@10.1.0/node_modules/open/index.js
1406
- const __dirname$1 = path$1.dirname(fileURLToPath(import.meta.url));
1407
- const localXdgOpenPath = path$1.join(__dirname$1, "xdg-open");
1409
+ const __dirname$1 = path.dirname(fileURLToPath(import.meta.url));
1410
+ const localXdgOpenPath = path.join(__dirname$1, "xdg-open");
1408
1411
  const { platform: platform$1, arch } = process$1;
1409
1412
  /**
1410
1413
  Get the mount point for fixed drives in WSL.
@@ -1420,11 +1423,11 @@ const getWslDrivesMountPoint = (() => {
1420
1423
  const configFilePath = "/etc/wsl.conf";
1421
1424
  let isConfigFileExists = false;
1422
1425
  try {
1423
- await fsPromises.access(configFilePath, constants.F_OK);
1426
+ await fs$1.access(configFilePath, constants.F_OK);
1424
1427
  isConfigFileExists = true;
1425
1428
  } catch {}
1426
1429
  if (!isConfigFileExists) return defaultMountPoint;
1427
- const configContent = await fsPromises.readFile(configFilePath, { encoding: "utf8" });
1430
+ const configContent = await fs$1.readFile(configFilePath, { encoding: "utf8" });
1428
1431
  const configMountPoint = /(?<!#.*)root\s*=\s*(?<mountPoint>.*)/g.exec(configContent);
1429
1432
  if (!configMountPoint) return defaultMountPoint;
1430
1433
  mountPoint = configMountPoint.groups.mountPoint.trim();
@@ -1522,7 +1525,7 @@ const baseOpen = async (options) => {
1522
1525
  const isBundled = !__dirname$1 || __dirname$1 === "/";
1523
1526
  let exeLocalXdgOpen = false;
1524
1527
  try {
1525
- await fsPromises.access(localXdgOpenPath, constants.X_OK);
1528
+ await fs$1.access(localXdgOpenPath, constants.X_OK);
1526
1529
  exeLocalXdgOpen = true;
1527
1530
  } catch {}
1528
1531
  const useSystemXdgOpen = process$1.versions.electron ?? (platform$1 === "android" || isBundled || !exeLocalXdgOpen);
@@ -1622,38 +1625,60 @@ async function isPortReachable(port, { host, timeout = 1e3 } = {}) {
1622
1625
  }
1623
1626
 
1624
1627
  //#endregion
1625
- //#region ../../node_modules/.pnpm/find-up-simple@1.0.1/node_modules/find-up-simple/index.js
1626
- const toPath$2 = (urlOrPath) => urlOrPath instanceof URL ? fileURLToPath(urlOrPath) : urlOrPath;
1627
- async function findUp(name, { cwd = process$1.cwd(), type: type$1 = "file", stopAt } = {}) {
1628
- let directory = path$1.resolve(toPath$2(cwd) ?? "");
1629
- const { root } = path$1.parse(directory);
1630
- stopAt = path$1.resolve(directory, toPath$2(stopAt ?? root));
1631
- const isAbsoluteName = path$1.isAbsolute(name);
1632
- while (directory) {
1633
- const filePath = isAbsoluteName ? name : path$1.join(directory, name);
1634
- try {
1635
- const stats = await fsPromises.stat(filePath);
1636
- if (type$1 === "file" && stats.isFile() || type$1 === "directory" && stats.isDirectory()) return filePath;
1637
- } catch {}
1638
- if (directory === stopAt || directory === root) break;
1639
- directory = path$1.dirname(directory);
1628
+ //#region src/utils/getFileHash.ts
1629
+ const getFileHashFromFile = async (filepath) => {
1630
+ try {
1631
+ const fileBuffer = await fs$3.readFile(filepath).catch((error) => {
1632
+ console.error("Error reading the file:", error);
1633
+ throw error;
1634
+ });
1635
+ const hash = crypto.createHash("sha256");
1636
+ hash.update(fileBuffer);
1637
+ const fileHash = hash.digest("hex");
1638
+ return fileHash;
1639
+ } catch (error) {
1640
+ console.error("Error fetching or processing the file:", error);
1641
+ throw error;
1640
1642
  }
1641
- }
1642
- function findUpSync(name, { cwd = process$1.cwd(), type: type$1 = "file", stopAt } = {}) {
1643
- let directory = path$1.resolve(toPath$2(cwd) ?? "");
1644
- const { root } = path$1.parse(directory);
1645
- stopAt = path$1.resolve(directory, toPath$2(stopAt) ?? root);
1646
- const isAbsoluteName = path$1.isAbsolute(name);
1647
- while (directory) {
1648
- const filePath = isAbsoluteName ? name : path$1.join(directory, name);
1649
- try {
1650
- const stats = fs$1.statSync(filePath, { throwIfNoEntry: false });
1651
- if (type$1 === "file" && stats?.isFile() || type$1 === "directory" && stats?.isDirectory()) return filePath;
1652
- } catch {}
1653
- if (directory === stopAt || directory === root) break;
1654
- directory = path$1.dirname(directory);
1643
+ };
1644
+
1645
+ //#endregion
1646
+ //#region src/utils/git.ts
1647
+ const getLatestGitCommit = async () => {
1648
+ try {
1649
+ const repo = await openRepository(getCwd());
1650
+ const headSha = repo.revparse("HEAD").from;
1651
+ if (headSha) return repo.getCommit(headSha);
1652
+ return null;
1653
+ } catch (error) {
1654
+ return null;
1655
1655
  }
1656
- }
1656
+ };
1657
+
1658
+ //#endregion
1659
+ //#region src/utils/version/getAndroidVersion.ts
1660
+ var import_valid$4 = __toESM(require_valid$1());
1661
+ const getAndroidVersionFromAppBuildGradle = async () => {
1662
+ const buildGradlePath = path$1.join(getCwd(), "android", "app", "build.gradle");
1663
+ try {
1664
+ const buildGradleContent = await fs$3.readFile(buildGradlePath, "utf8");
1665
+ const versionNameMatch = buildGradleContent.match(/versionName\s+['"]([^"]+)['"]/);
1666
+ return versionNameMatch?.[1] ?? null;
1667
+ } catch (error) {
1668
+ return null;
1669
+ }
1670
+ };
1671
+ const AndroidVersionParsers = { "app-build-gradle": getAndroidVersionFromAppBuildGradle };
1672
+ const getAndroidVersion = async ({ parser, validateWithSemver = false }) => {
1673
+ const parsers = Array.isArray(parser) ? parser : [parser];
1674
+ for (const parserKey of parsers) {
1675
+ const parsedVersion = await AndroidVersionParsers[parserKey]();
1676
+ if (!parsedVersion) continue;
1677
+ if (validateWithSemver && !(0, import_valid$4.default)(parsedVersion)) continue;
1678
+ return parsedVersion;
1679
+ }
1680
+ return null;
1681
+ };
1657
1682
 
1658
1683
  //#endregion
1659
1684
  //#region ../../node_modules/.pnpm/@xmldom+xmldom@0.8.10/node_modules/@xmldom/xmldom/lib/conventions.js
@@ -1814,7 +1839,7 @@ var require_dom = __commonJS({ "../../node_modules/.pnpm/@xmldom+xmldom@0.8.10/n
1814
1839
  };
1815
1840
  }
1816
1841
  function copy(src$1, dest) {
1817
- for (var p$5 in src$1) if (Object.prototype.hasOwnProperty.call(src$1, p$5)) dest[p$5] = src$1[p$5];
1842
+ for (var p$8 in src$1) if (Object.prototype.hasOwnProperty.call(src$1, p$8)) dest[p$8] = src$1[p$8];
1818
1843
  }
1819
1844
  /**
1820
1845
  ^\w+\.prototype\.([_\w]+)\s*=\s*((?:.*\{\s*?[\r\n][\s\S]*?^})|\S.*?(?=[;\r\n]));?
@@ -1823,11 +1848,11 @@ var require_dom = __commonJS({ "../../node_modules/.pnpm/@xmldom+xmldom@0.8.10/n
1823
1848
  function _extends(Class, Super) {
1824
1849
  var pt = Class.prototype;
1825
1850
  if (!(pt instanceof Super)) {
1826
- function t$4() {}
1827
- t$4.prototype = Super.prototype;
1828
- t$4 = new t$4();
1829
- copy(pt, t$4);
1830
- Class.prototype = pt = t$4;
1851
+ function t$5() {}
1852
+ t$5.prototype = Super.prototype;
1853
+ t$5 = new t$5();
1854
+ copy(pt, t$5);
1855
+ Class.prototype = pt = t$5;
1831
1856
  }
1832
1857
  if (pt.constructor != Class) {
1833
1858
  if (typeof Class != "function") console.error("unknown Class:" + Class);
@@ -1912,15 +1937,15 @@ var require_dom = __commonJS({ "../../node_modules/.pnpm/@xmldom+xmldom@0.8.10/n
1912
1937
  _updateLiveList(this);
1913
1938
  }
1914
1939
  function _updateLiveList(list) {
1915
- var inc = list._node._inc || list._node.ownerDocument._inc;
1916
- if (list._inc !== inc) {
1940
+ var inc$2 = list._node._inc || list._node.ownerDocument._inc;
1941
+ if (list._inc !== inc$2) {
1917
1942
  var ls = list._refresh(list._node);
1918
1943
  __set__(list, "length", ls.length);
1919
1944
  if (!list.$$length || ls.length < list.$$length) {
1920
1945
  for (var i$2 = ls.length; i$2 in list; i$2++) if (Object.prototype.hasOwnProperty.call(list, i$2)) delete list[i$2];
1921
1946
  }
1922
1947
  copy(ls, list);
1923
- list._inc = inc;
1948
+ list._inc = inc$2;
1924
1949
  }
1925
1950
  }
1926
1951
  LiveNodeList.prototype.item = function(i$2) {
@@ -5236,10 +5261,10 @@ var require_sax = __commonJS({ "../../node_modules/.pnpm/@xmldom+xmldom@0.8.10/n
5236
5261
  var domBuilder = this.domBuilder;
5237
5262
  domBuilder.startDocument();
5238
5263
  _copy(defaultNSMap, defaultNSMap = {});
5239
- parse$9(source, defaultNSMap, entityMap, domBuilder, this.errorHandler);
5264
+ parse$13(source, defaultNSMap, entityMap, domBuilder, this.errorHandler);
5240
5265
  domBuilder.endDocument();
5241
5266
  } };
5242
- function parse$9(source, defaultNSMapCopy, entityMap, domBuilder, errorHandler) {
5267
+ function parse$13(source, defaultNSMapCopy, entityMap, domBuilder, errorHandler) {
5243
5268
  function fixedFromCharCode(code$1) {
5244
5269
  if (code$1 > 65535) {
5245
5270
  code$1 -= 65536;
@@ -5264,13 +5289,13 @@ var require_sax = __commonJS({ "../../node_modules/.pnpm/@xmldom+xmldom@0.8.10/n
5264
5289
  start = end$1;
5265
5290
  }
5266
5291
  }
5267
- function position$1(p$5, m) {
5268
- while (p$5 >= lineEnd && (m = linePattern.exec(source))) {
5292
+ function position$1(p$8, m) {
5293
+ while (p$8 >= lineEnd && (m = linePattern.exec(source))) {
5269
5294
  lineStart = m.index;
5270
5295
  lineEnd = lineStart + m[0].length;
5271
5296
  locator.lineNumber++;
5272
5297
  }
5273
- locator.columnNumber = p$5 - lineStart + 1;
5298
+ locator.columnNumber = p$8 - lineStart + 1;
5274
5299
  }
5275
5300
  var lineStart = 0;
5276
5301
  var lineEnd = 0;
@@ -5359,10 +5384,10 @@ var require_sax = __commonJS({ "../../node_modules/.pnpm/@xmldom+xmldom@0.8.10/n
5359
5384
  else appendText(Math.max(tagStart, start) + 1);
5360
5385
  }
5361
5386
  }
5362
- function copyLocator(f, t$4) {
5363
- t$4.lineNumber = f.lineNumber;
5364
- t$4.columnNumber = f.columnNumber;
5365
- return t$4;
5387
+ function copyLocator(f, t$5) {
5388
+ t$5.lineNumber = f.lineNumber;
5389
+ t$5.columnNumber = f.columnNumber;
5390
+ return t$5;
5366
5391
  }
5367
5392
  /**
5368
5393
  * @see #appendElement(source,elStartEnd,el,selfClosed,entityReplacer,domBuilder,parseStack);
@@ -5380,14 +5405,14 @@ var require_sax = __commonJS({ "../../node_modules/.pnpm/@xmldom+xmldom@0.8.10/n
5380
5405
  }
5381
5406
  var attrName;
5382
5407
  var value;
5383
- var p$5 = ++start;
5408
+ var p$8 = ++start;
5384
5409
  var s = S_TAG;
5385
5410
  while (true) {
5386
- var c$1 = source.charAt(p$5);
5411
+ var c$1 = source.charAt(p$8);
5387
5412
  switch (c$1) {
5388
5413
  case "=":
5389
5414
  if (s === S_ATTR) {
5390
- attrName = source.slice(start, p$5);
5415
+ attrName = source.slice(start, p$8);
5391
5416
  s = S_EQ;
5392
5417
  } else if (s === S_ATTR_SPACE) s = S_EQ;
5393
5418
  else throw new Error("attribute equal must after attrName");
@@ -5397,26 +5422,26 @@ var require_sax = __commonJS({ "../../node_modules/.pnpm/@xmldom+xmldom@0.8.10/n
5397
5422
  if (s === S_EQ || s === S_ATTR) {
5398
5423
  if (s === S_ATTR) {
5399
5424
  errorHandler.warning("attribute value must after \"=\"");
5400
- attrName = source.slice(start, p$5);
5425
+ attrName = source.slice(start, p$8);
5401
5426
  }
5402
- start = p$5 + 1;
5403
- p$5 = source.indexOf(c$1, start);
5404
- if (p$5 > 0) {
5405
- value = source.slice(start, p$5);
5427
+ start = p$8 + 1;
5428
+ p$8 = source.indexOf(c$1, start);
5429
+ if (p$8 > 0) {
5430
+ value = source.slice(start, p$8);
5406
5431
  addAttribute(attrName, value, start - 1);
5407
5432
  s = S_ATTR_END;
5408
5433
  } else throw new Error("attribute value no end '" + c$1 + "' match");
5409
5434
  } else if (s == S_ATTR_NOQUOT_VALUE) {
5410
- value = source.slice(start, p$5);
5435
+ value = source.slice(start, p$8);
5411
5436
  addAttribute(attrName, value, start);
5412
5437
  errorHandler.warning("attribute \"" + attrName + "\" missed start quot(" + c$1 + ")!!");
5413
- start = p$5 + 1;
5438
+ start = p$8 + 1;
5414
5439
  s = S_ATTR_END;
5415
5440
  } else throw new Error("attribute value must after \"=\"");
5416
5441
  break;
5417
5442
  case "/":
5418
5443
  switch (s) {
5419
- case S_TAG: el.setTagName(source.slice(start, p$5));
5444
+ case S_TAG: el.setTagName(source.slice(start, p$8));
5420
5445
  case S_ATTR_END:
5421
5446
  case S_TAG_SPACE:
5422
5447
  case S_TAG_CLOSE:
@@ -5432,17 +5457,17 @@ var require_sax = __commonJS({ "../../node_modules/.pnpm/@xmldom+xmldom@0.8.10/n
5432
5457
  break;
5433
5458
  case "":
5434
5459
  errorHandler.error("unexpected end of input");
5435
- if (s == S_TAG) el.setTagName(source.slice(start, p$5));
5436
- return p$5;
5460
+ if (s == S_TAG) el.setTagName(source.slice(start, p$8));
5461
+ return p$8;
5437
5462
  case ">":
5438
5463
  switch (s) {
5439
- case S_TAG: el.setTagName(source.slice(start, p$5));
5464
+ case S_TAG: el.setTagName(source.slice(start, p$8));
5440
5465
  case S_ATTR_END:
5441
5466
  case S_TAG_SPACE:
5442
5467
  case S_TAG_CLOSE: break;
5443
5468
  case S_ATTR_NOQUOT_VALUE:
5444
5469
  case S_ATTR:
5445
- value = source.slice(start, p$5);
5470
+ value = source.slice(start, p$8);
5446
5471
  if (value.slice(-1) === "/") {
5447
5472
  el.closed = true;
5448
5473
  value = value.slice(0, -1);
@@ -5459,19 +5484,19 @@ var require_sax = __commonJS({ "../../node_modules/.pnpm/@xmldom+xmldom@0.8.10/n
5459
5484
  break;
5460
5485
  case S_EQ: throw new Error("attribute value missed!!");
5461
5486
  }
5462
- return p$5;
5487
+ return p$8;
5463
5488
  case "€": c$1 = " ";
5464
5489
  default: if (c$1 <= " ") switch (s) {
5465
5490
  case S_TAG:
5466
- el.setTagName(source.slice(start, p$5));
5491
+ el.setTagName(source.slice(start, p$8));
5467
5492
  s = S_TAG_SPACE;
5468
5493
  break;
5469
5494
  case S_ATTR:
5470
- attrName = source.slice(start, p$5);
5495
+ attrName = source.slice(start, p$8);
5471
5496
  s = S_ATTR_SPACE;
5472
5497
  break;
5473
5498
  case S_ATTR_NOQUOT_VALUE:
5474
- var value = source.slice(start, p$5);
5499
+ var value = source.slice(start, p$8);
5475
5500
  errorHandler.warning("attribute \"" + value + "\" missed quot(\")!!");
5476
5501
  addAttribute(attrName, value, start);
5477
5502
  case S_ATTR_END:
@@ -5483,22 +5508,22 @@ var require_sax = __commonJS({ "../../node_modules/.pnpm/@xmldom+xmldom@0.8.10/n
5483
5508
  var tagName = el.tagName;
5484
5509
  if (!NAMESPACE$1.isHTML(currentNSMap[""]) || !attrName.match(/^(?:disabled|checked|selected)$/i)) errorHandler.warning("attribute \"" + attrName + "\" missed value!! \"" + attrName + "\" instead2!!");
5485
5510
  addAttribute(attrName, attrName, start);
5486
- start = p$5;
5511
+ start = p$8;
5487
5512
  s = S_ATTR;
5488
5513
  break;
5489
5514
  case S_ATTR_END: errorHandler.warning("attribute space is required\"" + attrName + "\"!!");
5490
5515
  case S_TAG_SPACE:
5491
5516
  s = S_ATTR;
5492
- start = p$5;
5517
+ start = p$8;
5493
5518
  break;
5494
5519
  case S_EQ:
5495
5520
  s = S_ATTR_NOQUOT_VALUE;
5496
- start = p$5;
5521
+ start = p$8;
5497
5522
  break;
5498
5523
  case S_TAG_CLOSE: throw new Error("elements closed character '/' and '>' must be connected to");
5499
5524
  }
5500
5525
  }
5501
- p$5++;
5526
+ p$8++;
5502
5527
  }
5503
5528
  }
5504
5529
  /**
@@ -5947,7 +5972,7 @@ var require_parse$3 = __commonJS({ "../../node_modules/.pnpm/plist@3.1.0/node_mo
5947
5972
  /**
5948
5973
  * Module exports.
5949
5974
  */
5950
- exports.parse = parse$8;
5975
+ exports.parse = parse$12;
5951
5976
  var TEXT_NODE = 3;
5952
5977
  var CDATA_NODE = 4;
5953
5978
  var COMMENT_NODE = 8;
@@ -5986,12 +6011,12 @@ var require_parse$3 = __commonJS({ "../../node_modules/.pnpm/plist@3.1.0/node_mo
5986
6011
  * @returns {Mixed} the decoded value from the Plist XML
5987
6012
  * @api public
5988
6013
  */
5989
- function parse$8(xml) {
6014
+ function parse$12(xml) {
5990
6015
  var doc = new DOMParser().parseFromString(xml);
5991
6016
  invariant(doc.documentElement.nodeName === "plist", "malformed document. First element should be <plist>");
5992
- var plist$3 = parsePlistXML(doc.documentElement);
5993
- if (plist$3.length == 1) plist$3 = plist$3[0];
5994
- return plist$3;
6017
+ var plist$2 = parsePlistXML(doc.documentElement);
6018
+ if (plist$2.length == 1) plist$2 = plist$2[0];
6019
+ return plist$2;
5995
6020
  }
5996
6021
  /**
5997
6022
  * Convert an XML based plist document into a JSON representation.
@@ -9245,83 +9270,101 @@ var require_plist = __commonJS({ "../../node_modules/.pnpm/plist@3.1.0/node_modu
9245
9270
  } });
9246
9271
 
9247
9272
  //#endregion
9248
- //#region src/utils/getDefaultTargetAppVersion.ts
9249
- var import_plist$2 = __toESM(require_plist());
9250
- const getIOSVersion$1 = async (cwd) => {
9273
+ //#region src/utils/getIosAppTargetDirectoryName.ts
9274
+ const getIosAppTargetDirectoryName = () => {
9275
+ const iosDirectory = path$1.join(getCwd(), "ios");
9276
+ const [xcodeprojPath] = globbySync("*.xcodeproj/project.pbxproj", {
9277
+ cwd: iosDirectory,
9278
+ absolute: false,
9279
+ onlyFiles: true
9280
+ });
9281
+ return xcodeprojPath?.split(".")?.[0] ?? null;
9282
+ };
9283
+
9284
+ //#endregion
9285
+ //#region src/utils/version/getIOSVersion.ts
9286
+ var import_plist$1 = __toESM(require_plist());
9287
+ var import_valid$3 = __toESM(require_valid$1());
9288
+ const isFileExist = async (path$5) => {
9251
9289
  try {
9252
- const plistPath = await findUp("Info.plist", {
9253
- cwd,
9254
- type: "file"
9255
- });
9256
- if (!plistPath) return null;
9257
- const file = await fs$2.readFile(plistPath, "utf8");
9258
- const data = import_plist$2.default.parse(file);
9290
+ await fs$3.access(path$5);
9291
+ return true;
9292
+ } catch {
9293
+ return false;
9294
+ }
9295
+ };
9296
+ const getIOSVersionFromInfoPlist = async () => {
9297
+ try {
9298
+ const iosAppTargetDirectory = getIosAppTargetDirectoryName();
9299
+ if (!iosAppTargetDirectory) return null;
9300
+ const plistPath = path$1.join(getCwd(), "ios", iosAppTargetDirectory, "Info.plist");
9301
+ if (!await isFileExist(plistPath)) return null;
9302
+ const file = await fs$3.readFile(plistPath, "utf8");
9303
+ const data = import_plist$1.default.parse(file);
9259
9304
  return data["CFBundleShortVersionString"] ?? null;
9260
9305
  } catch {
9261
9306
  return null;
9262
9307
  }
9263
9308
  };
9264
- const getAndroidVersion$1 = async (cwd) => {
9265
- const buildGradlePath = path.join(cwd, "android", "app", "build.gradle");
9309
+ const getIOSVersionFromXcodeProject = async () => {
9266
9310
  try {
9267
- const buildGradleContent = await fs$2.readFile(buildGradlePath, "utf8");
9268
- const versionNameMatch = buildGradleContent.match(/versionName\s+"([\d.]+)"/);
9269
- return versionNameMatch?.[1] ? versionNameMatch[1] : null;
9270
- } catch (error) {
9311
+ const [xcodeprojPath] = globbySync("*.xcodeproj/project.pbxproj", {
9312
+ cwd: path$1.join(getCwd(), "ios"),
9313
+ absolute: true,
9314
+ onlyFiles: true
9315
+ });
9316
+ if (!xcodeprojPath) return null;
9317
+ const project = XcodeProject.open(xcodeprojPath).toJSON();
9318
+ const objects = project.objects ?? {};
9319
+ for (const key of Object.keys(objects)) {
9320
+ const obj = objects[key];
9321
+ if (obj?.isa === "XCBuildConfiguration" && obj?.name === "Release" && typeof obj.buildSettings?.MARKETING_VERSION === "string") return obj.buildSettings.MARKETING_VERSION;
9322
+ }
9271
9323
  return null;
9324
+ } catch {
9325
+ return null;
9326
+ }
9327
+ };
9328
+ const IOSVersionParsers = {
9329
+ xcodeproj: getIOSVersionFromXcodeProject,
9330
+ "info-plist": getIOSVersionFromInfoPlist
9331
+ };
9332
+ const getIOSVersion = async ({ parser, validateWithSemver = false }) => {
9333
+ const parsers = Array.isArray(parser) ? parser : [parser];
9334
+ for (const parserKey of parsers) {
9335
+ const parsedVersion = await IOSVersionParsers[parserKey]();
9336
+ if (!parsedVersion) continue;
9337
+ if (validateWithSemver && !(0, import_valid$3.default)(parsedVersion)) continue;
9338
+ return parsedVersion;
9272
9339
  }
9340
+ return null;
9273
9341
  };
9274
- const getDefaultTargetAppVersion = async (cwd, platform$2) => {
9342
+
9343
+ //#endregion
9344
+ //#region src/utils/version/getDefaultTargetAppVersion.ts
9345
+ var import_valid$2 = __toESM(require_valid$1());
9346
+ const getDefaultTargetAppVersion = async (platform$2) => {
9275
9347
  let version$1 = null;
9276
9348
  switch (platform$2) {
9277
9349
  case "ios":
9278
- version$1 = await getIOSVersion$1(cwd);
9350
+ version$1 = await getIOSVersion({ parser: "info-plist" });
9279
9351
  break;
9280
9352
  case "android":
9281
- version$1 = await getAndroidVersion$1(cwd);
9353
+ version$1 = await getAndroidVersion({ parser: "app-build-gradle" });
9282
9354
  break;
9283
9355
  }
9284
9356
  if (!version$1) return null;
9357
+ const isAcceptableFormat = /^\d+\.\d+$/.test(version$1) || (0, import_valid$2.default)(version$1);
9358
+ if (!isAcceptableFormat) return null;
9285
9359
  const dotCount = version$1.split(".").length - 1;
9286
9360
  if (dotCount === 1) version$1 = `${version$1}.x`;
9287
9361
  return version$1;
9288
9362
  };
9289
9363
 
9290
- //#endregion
9291
- //#region src/utils/getFileHash.ts
9292
- const getFileHashFromFile = async (filepath) => {
9293
- try {
9294
- const fileBuffer = await fs$2.readFile(filepath).catch((error) => {
9295
- console.error("Error reading the file:", error);
9296
- throw error;
9297
- });
9298
- const hash = crypto.createHash("sha256");
9299
- hash.update(fileBuffer);
9300
- const fileHash = hash.digest("hex");
9301
- return fileHash;
9302
- } catch (error) {
9303
- console.error("Error fetching or processing the file:", error);
9304
- throw error;
9305
- }
9306
- };
9307
-
9308
- //#endregion
9309
- //#region src/utils/git.ts
9310
- const getLatestGitCommit = async () => {
9311
- try {
9312
- const repo = await openRepository(getCwd());
9313
- const headSha = repo.revparse("HEAD").from;
9314
- if (headSha) return repo.getCommit(headSha);
9315
- return null;
9316
- } catch (error) {
9317
- return null;
9318
- }
9319
- };
9320
-
9321
9364
  //#endregion
9322
9365
  //#region src/prompts/getPlatform.ts
9323
9366
  const getPlatform = async (message) => {
9324
- const platform$2 = await p$4.select({
9367
+ const platform$2 = await p$7.select({
9325
9368
  message,
9326
9369
  initialValue: "ios",
9327
9370
  options: [{
@@ -9341,15 +9384,15 @@ const getPlatform = async (message) => {
9341
9384
  async function getBundleZipTargets(basePath, files) {
9342
9385
  const bundleCandidates = {};
9343
9386
  const targets = [];
9344
- const normalizeToPosix = (filePath) => filePath.split(path.sep).join("/");
9345
- const normalizedBase = normalizeToPosix(path.normalize(basePath));
9387
+ const normalizeToPosix = (filePath) => filePath.split(path$1.sep).join("/");
9388
+ const normalizedBase = normalizeToPosix(path$1.normalize(basePath));
9346
9389
  const getRelative = (file) => {
9347
- const normalizedFile = normalizeToPosix(path.normalize(file));
9390
+ const normalizedFile = normalizeToPosix(path$1.normalize(file));
9348
9391
  if (normalizedFile.startsWith(`${normalizedBase}/`)) return normalizedFile.slice(normalizedBase.length + 1);
9349
9392
  return normalizedFile;
9350
9393
  };
9351
9394
  for (const file of files) {
9352
- const normalizedFile = normalizeToPosix(path.normalize(file));
9395
+ const normalizedFile = normalizeToPosix(path$1.normalize(file));
9353
9396
  if (normalizedFile.endsWith(".map")) continue;
9354
9397
  const relative = getRelative(normalizedFile);
9355
9398
  if (relative.endsWith(".bundle") || relative.endsWith(".bundle.hbc")) {
@@ -9373,72 +9416,46 @@ async function getBundleZipTargets(basePath, files) {
9373
9416
  return targets;
9374
9417
  }
9375
9418
 
9376
- //#endregion
9377
- //#region src/utils/getNativeAppVersion.ts
9378
- var import_plist$1 = __toESM(require_plist());
9379
- const getNativeAppVersion = async (platform$2) => {
9380
- switch (platform$2) {
9381
- case "ios": {
9382
- const iosVersion = await getIOSVersion();
9383
- if (iosVersion) return iosVersion;
9384
- const plistVersion = await getPlistVersion();
9385
- if (plistVersion) return plistVersion;
9386
- return null;
9387
- }
9388
- case "android": return getAndroidVersion();
9389
- default: return null;
9390
- }
9391
- };
9392
- const getIOSVersion = async () => {
9393
- try {
9394
- const [xcodeprojPath] = globbySync("*.xcodeproj/project.pbxproj", {
9395
- cwd: path.join(getCwd(), "ios"),
9396
- absolute: true,
9397
- onlyFiles: true
9398
- });
9399
- if (!xcodeprojPath) return null;
9400
- const project = XcodeProject.open(xcodeprojPath).toJSON();
9401
- const objects = project.objects ?? {};
9402
- for (const key of Object.keys(objects)) {
9403
- const obj = objects[key];
9404
- if (obj?.isa === "XCBuildConfiguration" && obj?.name === "Release" && typeof obj.buildSettings?.MARKETING_VERSION === "string") return obj.buildSettings.MARKETING_VERSION;
9405
- }
9406
- return null;
9407
- } catch {
9408
- return null;
9409
- }
9410
- };
9411
- const getPlistVersion = async () => {
9412
- try {
9413
- const plistPath = await findUp("Info.plist", {
9414
- cwd: path.join(getCwd(), "ios"),
9415
- type: "file"
9416
- });
9417
- if (!plistPath) return null;
9418
- const file = await fs$2.readFile(plistPath, "utf8");
9419
- const data = import_plist$1.default.parse(file);
9420
- return data["CFBundleShortVersionString"] ?? null;
9421
- } catch {
9422
- return null;
9423
- }
9424
- };
9425
- const getAndroidVersion = async () => {
9426
- const buildGradlePath = path.join(getCwd(), "android", "app", "build.gradle");
9427
- try {
9428
- const buildGradleContent = await fs$2.readFile(buildGradlePath, "utf8");
9429
- const versionNameMatch = buildGradleContent.match(/versionName\s+"([^"]+)"/);
9430
- return versionNameMatch?.[1] ?? null;
9431
- } catch (error) {
9432
- return null;
9433
- }
9434
- };
9435
-
9436
9419
  //#endregion
9437
9420
  //#region ../../node_modules/.pnpm/tsdown@0.12.6_typescript@5.8.3/node_modules/tsdown/esm-shims.js
9438
9421
  const getFilename = () => fileURLToPath(import.meta.url);
9439
- const getDirname = () => path$1.dirname(getFilename());
9422
+ const getDirname = () => path.dirname(getFilename());
9440
9423
  const __dirname = /* @__PURE__ */ getDirname();
9441
9424
 
9425
+ //#endregion
9426
+ //#region ../../node_modules/.pnpm/find-up-simple@1.0.1/node_modules/find-up-simple/index.js
9427
+ const toPath$2 = (urlOrPath) => urlOrPath instanceof URL ? fileURLToPath(urlOrPath) : urlOrPath;
9428
+ async function findUp(name, { cwd = process$1.cwd(), type: type$1 = "file", stopAt } = {}) {
9429
+ let directory = path.resolve(toPath$2(cwd) ?? "");
9430
+ const { root } = path.parse(directory);
9431
+ stopAt = path.resolve(directory, toPath$2(stopAt ?? root));
9432
+ const isAbsoluteName = path.isAbsolute(name);
9433
+ while (directory) {
9434
+ const filePath = isAbsoluteName ? name : path.join(directory, name);
9435
+ try {
9436
+ const stats = await fs$1.stat(filePath);
9437
+ if (type$1 === "file" && stats.isFile() || type$1 === "directory" && stats.isDirectory()) return filePath;
9438
+ } catch {}
9439
+ if (directory === stopAt || directory === root) break;
9440
+ directory = path.dirname(directory);
9441
+ }
9442
+ }
9443
+ function findUpSync(name, { cwd = process$1.cwd(), type: type$1 = "file", stopAt } = {}) {
9444
+ let directory = path.resolve(toPath$2(cwd) ?? "");
9445
+ const { root } = path.parse(directory);
9446
+ stopAt = path.resolve(directory, toPath$2(stopAt) ?? root);
9447
+ const isAbsoluteName = path.isAbsolute(name);
9448
+ while (directory) {
9449
+ const filePath = isAbsoluteName ? name : path.join(directory, name);
9450
+ try {
9451
+ const stats = fs$2.statSync(filePath, { throwIfNoEntry: false });
9452
+ if (type$1 === "file" && stats?.isFile() || type$1 === "directory" && stats?.isDirectory()) return filePath;
9453
+ } catch {}
9454
+ if (directory === stopAt || directory === root) break;
9455
+ directory = path.dirname(directory);
9456
+ }
9457
+ }
9458
+
9442
9459
  //#endregion
9443
9460
  //#region ../../node_modules/.pnpm/js-tokens@4.0.0/node_modules/js-tokens/index.js
9444
9461
  var require_js_tokens = __commonJS({ "../../node_modules/.pnpm/js-tokens@4.0.0/node_modules/js-tokens/index.js"(exports) {
@@ -10579,11 +10596,11 @@ var require_lib$2 = __commonJS({ "../../node_modules/.pnpm/@babel+helper-validat
10579
10596
  //#region ../../node_modules/.pnpm/@babel+code-frame@7.26.2/node_modules/@babel/code-frame/lib/index.js
10580
10597
  var require_lib$1 = __commonJS({ "../../node_modules/.pnpm/@babel+code-frame@7.26.2/node_modules/@babel/code-frame/lib/index.js"(exports) {
10581
10598
  Object.defineProperty(exports, "__esModule", { value: true });
10582
- var picocolors$1 = require_picocolors();
10599
+ var picocolors$3 = require_picocolors();
10583
10600
  var jsTokens = require_js_tokens();
10584
10601
  var helperValidatorIdentifier = require_lib$2();
10585
10602
  function isColorSupported() {
10586
- return typeof process === "object" && (process.env.FORCE_COLOR === "0" || process.env.FORCE_COLOR === "false") ? false : picocolors$1.isColorSupported;
10603
+ return typeof process === "object" && (process.env.FORCE_COLOR === "0" || process.env.FORCE_COLOR === "false") ? false : picocolors$3.isColorSupported;
10587
10604
  }
10588
10605
  const compose = (f, g) => (v) => f(g(v));
10589
10606
  function buildDefs(colors) {
@@ -10603,8 +10620,8 @@ var require_lib$1 = __commonJS({ "../../node_modules/.pnpm/@babel+code-frame@7.2
10603
10620
  reset: colors.reset
10604
10621
  };
10605
10622
  }
10606
- const defsOn = buildDefs(picocolors$1.createColors(true));
10607
- const defsOff = buildDefs(picocolors$1.createColors(false));
10623
+ const defsOn = buildDefs(picocolors$3.createColors(true));
10624
+ const defsOff = buildDefs(picocolors$3.createColors(false));
10608
10625
  function getDefs(enabled) {
10609
10626
  return enabled ? defsOn : defsOff;
10610
10627
  }
@@ -10846,39 +10863,39 @@ function parseJson(string, reviver, fileName) {
10846
10863
  //#endregion
10847
10864
  //#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/parse.js
10848
10865
  var require_parse$2 = __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/parse.js"(exports, module) {
10849
- const SemVer = require_semver();
10850
- const parse$7 = (version$1, options, throwErrors = false) => {
10851
- if (version$1 instanceof SemVer) return version$1;
10866
+ const SemVer$11 = require_semver$1();
10867
+ const parse$11 = (version$1, options, throwErrors = false) => {
10868
+ if (version$1 instanceof SemVer$11) return version$1;
10852
10869
  try {
10853
- return new SemVer(version$1, options);
10870
+ return new SemVer$11(version$1, options);
10854
10871
  } catch (er) {
10855
10872
  if (!throwErrors) return null;
10856
10873
  throw er;
10857
10874
  }
10858
10875
  };
10859
- module.exports = parse$7;
10876
+ module.exports = parse$11;
10860
10877
  } });
10861
10878
 
10862
10879
  //#endregion
10863
10880
  //#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/valid.js
10864
10881
  var require_valid = __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/valid.js"(exports, module) {
10865
- const parse$6 = require_parse$2();
10866
- const valid$1 = (version$1, options) => {
10867
- const v = parse$6(version$1, options);
10882
+ const parse$10 = require_parse$2();
10883
+ const valid$2 = (version$1, options) => {
10884
+ const v = parse$10(version$1, options);
10868
10885
  return v ? v.version : null;
10869
10886
  };
10870
- module.exports = valid$1;
10887
+ module.exports = valid$2;
10871
10888
  } });
10872
10889
 
10873
10890
  //#endregion
10874
10891
  //#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/clean.js
10875
10892
  var require_clean = __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/clean.js"(exports, module) {
10876
- const parse$5 = require_parse$2();
10877
- const clean = (version$1, options) => {
10878
- const s = parse$5(version$1.trim().replace(/^[=v]+/, ""), options);
10893
+ const parse$9 = require_parse$2();
10894
+ const clean$1 = (version$1, options) => {
10895
+ const s = parse$9(version$1.trim().replace(/^[=v]+/, ""), options);
10879
10896
  return s ? s.version : null;
10880
10897
  };
10881
- module.exports = clean;
10898
+ module.exports = clean$1;
10882
10899
  } });
10883
10900
 
10884
10901
  //#endregion
@@ -11738,18 +11755,18 @@ var require_parse$1 = __commonJS({ "../../node_modules/.pnpm/spdx-expression-par
11738
11755
  index$1++;
11739
11756
  }
11740
11757
  function parseOperator(operator) {
11741
- var t$4 = token();
11742
- if (t$4 && t$4.type === "OPERATOR" && operator === t$4.string) {
11758
+ var t$5 = token();
11759
+ if (t$5 && t$5.type === "OPERATOR" && operator === t$5.string) {
11743
11760
  next();
11744
- return t$4.string;
11761
+ return t$5.string;
11745
11762
  }
11746
11763
  }
11747
11764
  function parseWith() {
11748
11765
  if (parseOperator("WITH")) {
11749
- var t$4 = token();
11750
- if (t$4 && t$4.type === "EXCEPTION") {
11766
+ var t$5 = token();
11767
+ if (t$5 && t$5.type === "EXCEPTION") {
11751
11768
  next();
11752
- return t$4.string;
11769
+ return t$5.string;
11753
11770
  }
11754
11771
  throw new Error("Expected exception after `WITH`");
11755
11772
  }
@@ -11757,25 +11774,25 @@ var require_parse$1 = __commonJS({ "../../node_modules/.pnpm/spdx-expression-par
11757
11774
  function parseLicenseRef() {
11758
11775
  var begin = index$1;
11759
11776
  var string = "";
11760
- var t$4 = token();
11761
- if (t$4.type === "DOCUMENTREF") {
11777
+ var t$5 = token();
11778
+ if (t$5.type === "DOCUMENTREF") {
11762
11779
  next();
11763
- string += "DocumentRef-" + t$4.string + ":";
11780
+ string += "DocumentRef-" + t$5.string + ":";
11764
11781
  if (!parseOperator(":")) throw new Error("Expected `:` after `DocumentRef-...`");
11765
11782
  }
11766
- t$4 = token();
11767
- if (t$4.type === "LICENSEREF") {
11783
+ t$5 = token();
11784
+ if (t$5.type === "LICENSEREF") {
11768
11785
  next();
11769
- string += "LicenseRef-" + t$4.string;
11786
+ string += "LicenseRef-" + t$5.string;
11770
11787
  return { license: string };
11771
11788
  }
11772
11789
  index$1 = begin;
11773
11790
  }
11774
11791
  function parseLicense() {
11775
- var t$4 = token();
11776
- if (t$4 && t$4.type === "LICENSE") {
11792
+ var t$5 = token();
11793
+ if (t$5 && t$5.type === "LICENSE") {
11777
11794
  next();
11778
- var node$1 = { license: t$4.string };
11795
+ var node$1 = { license: t$5.string };
11779
11796
  if (parseOperator("+")) node$1.plus = true;
11780
11797
  var exception = parseWith();
11781
11798
  if (exception) node$1.exception = exception;
@@ -11818,20 +11835,20 @@ var require_parse$1 = __commonJS({ "../../node_modules/.pnpm/spdx-expression-par
11818
11835
  //#region ../../node_modules/.pnpm/spdx-expression-parse@3.0.1/node_modules/spdx-expression-parse/index.js
11819
11836
  var require_spdx_expression_parse = __commonJS({ "../../node_modules/.pnpm/spdx-expression-parse@3.0.1/node_modules/spdx-expression-parse/index.js"(exports, module) {
11820
11837
  var scan = require_scan();
11821
- var parse$4 = require_parse$1();
11838
+ var parse$8 = require_parse$1();
11822
11839
  module.exports = function(source) {
11823
- return parse$4(scan(source));
11840
+ return parse$8(scan(source));
11824
11841
  };
11825
11842
  } });
11826
11843
 
11827
11844
  //#endregion
11828
11845
  //#region ../../node_modules/.pnpm/spdx-correct@3.2.0/node_modules/spdx-correct/index.js
11829
11846
  var require_spdx_correct = __commonJS({ "../../node_modules/.pnpm/spdx-correct@3.2.0/node_modules/spdx-correct/index.js"(exports, module) {
11830
- var parse$3 = require_spdx_expression_parse();
11847
+ var parse$7 = require_spdx_expression_parse();
11831
11848
  var spdxLicenseIds = require_spdx_license_ids();
11832
- function valid(string) {
11849
+ function valid$1(string) {
11833
11850
  try {
11834
- parse$3(string);
11851
+ parse$7(string);
11835
11852
  return true;
11836
11853
  } catch (error) {
11837
11854
  return false;
@@ -12018,7 +12035,7 @@ var require_spdx_correct = __commonJS({ "../../node_modules/.pnpm/spdx-correct@3
12018
12035
  var validTransformation = function(identifier) {
12019
12036
  for (var i$2 = 0; i$2 < transforms.length; i$2++) {
12020
12037
  var transformed = transforms[i$2](identifier).trim();
12021
- if (transformed !== identifier && valid(transformed)) return transformed;
12038
+ if (transformed !== identifier && valid$1(transformed)) return transformed;
12022
12039
  }
12023
12040
  return null;
12024
12041
  };
@@ -12051,13 +12068,13 @@ var require_spdx_correct = __commonJS({ "../../node_modules/.pnpm/spdx-correct@3
12051
12068
  var validArugment = typeof identifier === "string" && identifier.trim().length !== 0;
12052
12069
  if (!validArugment) throw Error("Invalid argument. Expected non-empty string.");
12053
12070
  identifier = identifier.trim();
12054
- if (valid(identifier)) return postprocess(identifier);
12071
+ if (valid$1(identifier)) return postprocess(identifier);
12055
12072
  var noPlus = identifier.replace(/\+$/, "").trim();
12056
- if (valid(noPlus)) return postprocess(noPlus);
12073
+ if (valid$1(noPlus)) return postprocess(noPlus);
12057
12074
  var transformed = validTransformation(identifier);
12058
12075
  if (transformed !== null) return postprocess(transformed);
12059
12076
  transformed = anyCorrection(identifier, function(argument) {
12060
- if (valid(argument)) return argument;
12077
+ if (valid$1(argument)) return argument;
12061
12078
  return validTransformation(argument);
12062
12079
  });
12063
12080
  if (transformed !== null) return postprocess(transformed);
@@ -12099,7 +12116,7 @@ var require_spdx_correct = __commonJS({ "../../node_modules/.pnpm/spdx-correct@3
12099
12116
  //#endregion
12100
12117
  //#region ../../node_modules/.pnpm/validate-npm-package-license@3.0.4/node_modules/validate-npm-package-license/index.js
12101
12118
  var require_validate_npm_package_license = __commonJS({ "../../node_modules/.pnpm/validate-npm-package-license@3.0.4/node_modules/validate-npm-package-license/index.js"(exports, module) {
12102
- var parse$2 = require_spdx_expression_parse();
12119
+ var parse$6 = require_spdx_expression_parse();
12103
12120
  var correct = require_spdx_correct();
12104
12121
  var genericWarning = "license should be a valid SPDX license expression (without \"LicenseRef\"), \"UNLICENSED\", or \"SEE LICENSE IN <filename>\"";
12105
12122
  var fileReferenceRE = /^SEE LICEN[CS]E IN (.+)$/;
@@ -12115,7 +12132,7 @@ var require_validate_npm_package_license = __commonJS({ "../../node_modules/.pnp
12115
12132
  module.exports = function(argument) {
12116
12133
  var ast;
12117
12134
  try {
12118
- ast = parse$2(argument);
12135
+ ast = parse$6(argument);
12119
12136
  } catch (e) {
12120
12137
  var match;
12121
12138
  if (argument === "UNLICENSED" || argument === "UNLICENCED") return {
@@ -12361,7 +12378,7 @@ var require_commonjs = __commonJS({ "../../node_modules/.pnpm/lru-cache@10.2.2/n
12361
12378
  return c$1.#tail;
12362
12379
  },
12363
12380
  free: c$1.#free,
12364
- isBackgroundFetch: (p$5) => c$1.#isBackgroundFetch(p$5),
12381
+ isBackgroundFetch: (p$8) => c$1.#isBackgroundFetch(p$8),
12365
12382
  backgroundFetch: (k, index$1, options, context) => c$1.#backgroundFetch(k, index$1, options, context),
12366
12383
  moveToTail: (index$1) => c$1.#moveToTail(index$1),
12367
12384
  indexes: (options) => c$1.#indexes(options),
@@ -12496,11 +12513,11 @@ var require_commonjs = __commonJS({ "../../node_modules/.pnpm/lru-cache@10.2.2/n
12496
12513
  starts[index$1] = ttl !== 0 ? start : 0;
12497
12514
  ttls[index$1] = ttl;
12498
12515
  if (ttl !== 0 && this.ttlAutopurge) {
12499
- const t$4 = setTimeout(() => {
12516
+ const t$5 = setTimeout(() => {
12500
12517
  if (this.#isStale(index$1)) this.delete(this.#keyList[index$1]);
12501
12518
  }, ttl + 1);
12502
12519
  /* c8 ignore start */
12503
- if (t$4.unref) t$4.unref();
12520
+ if (t$5.unref) t$5.unref();
12504
12521
  }
12505
12522
  };
12506
12523
  this.#updateItemAge = (index$1) => {
@@ -12524,9 +12541,9 @@ var require_commonjs = __commonJS({ "../../node_modules/.pnpm/lru-cache@10.2.2/n
12524
12541
  const n$1 = perf.now();
12525
12542
  if (this.ttlResolution > 0) {
12526
12543
  cachedNow = n$1;
12527
- const t$4 = setTimeout(() => cachedNow = 0, this.ttlResolution);
12544
+ const t$5 = setTimeout(() => cachedNow = 0, this.ttlResolution);
12528
12545
  /* c8 ignore start */
12529
- if (t$4.unref) t$4.unref();
12546
+ if (t$5.unref) t$5.unref();
12530
12547
  }
12531
12548
  return n$1;
12532
12549
  };
@@ -12541,8 +12558,8 @@ var require_commonjs = __commonJS({ "../../node_modules/.pnpm/lru-cache@10.2.2/n
12541
12558
  };
12542
12559
  this.#isStale = (index$1) => {
12543
12560
  const s = starts[index$1];
12544
- const t$4 = ttls[index$1];
12545
- return !!t$4 && !!s && (cachedNow || getNow()) - s > t$4;
12561
+ const t$5 = ttls[index$1];
12562
+ return !!t$5 && !!s && (cachedNow || getNow()) - s > t$5;
12546
12563
  };
12547
12564
  }
12548
12565
  #updateItemAge = () => {};
@@ -12979,8 +12996,8 @@ var require_commonjs = __commonJS({ "../../node_modules/.pnpm/lru-cache@10.2.2/n
12979
12996
  if (ignoreAbort) options.status.fetchAbortIgnored = true;
12980
12997
  } else options.status.fetchResolved = true;
12981
12998
  if (aborted$1 && !ignoreAbort && !updateCache) return fetchFail(ac.signal.reason);
12982
- const bf$1 = p$5;
12983
- if (this.#valList[index$1] === p$5) if (v$1 === void 0) if (bf$1.__staleWhileFetching) this.#valList[index$1] = bf$1.__staleWhileFetching;
12999
+ const bf$1 = p$8;
13000
+ if (this.#valList[index$1] === p$8) if (v$1 === void 0) if (bf$1.__staleWhileFetching) this.#valList[index$1] = bf$1.__staleWhileFetching;
12984
13001
  else this.delete(k);
12985
13002
  else {
12986
13003
  if (options.status) options.status.fetchUpdated = true;
@@ -13000,8 +13017,8 @@ var require_commonjs = __commonJS({ "../../node_modules/.pnpm/lru-cache@10.2.2/n
13000
13017
  const allowStaleAborted = aborted$1 && options.allowStaleOnFetchAbort;
13001
13018
  const allowStale = allowStaleAborted || options.allowStaleOnFetchRejection;
13002
13019
  const noDelete = allowStale || options.noDeleteOnFetchRejection;
13003
- const bf$1 = p$5;
13004
- if (this.#valList[index$1] === p$5) {
13020
+ const bf$1 = p$8;
13021
+ if (this.#valList[index$1] === p$8) {
13005
13022
  const del = !noDelete || bf$1.__staleWhileFetching === void 0;
13006
13023
  if (del) this.delete(k);
13007
13024
  else if (!allowStaleAborted) this.#valList[index$1] = bf$1.__staleWhileFetching;
@@ -13022,8 +13039,8 @@ var require_commonjs = __commonJS({ "../../node_modules/.pnpm/lru-cache@10.2.2/n
13022
13039
  });
13023
13040
  };
13024
13041
  if (options.status) options.status.fetchDispatched = true;
13025
- const p$5 = new Promise(pcall).then(cb, eb);
13026
- const bf = Object.assign(p$5, {
13042
+ const p$8 = new Promise(pcall).then(cb, eb);
13043
+ const bf = Object.assign(p$8, {
13027
13044
  __abortController: ac,
13028
13045
  __staleWhileFetching: v,
13029
13046
  __returned: void 0
@@ -13037,9 +13054,9 @@ var require_commonjs = __commonJS({ "../../node_modules/.pnpm/lru-cache@10.2.2/n
13037
13054
  } else this.#valList[index$1] = bf;
13038
13055
  return bf;
13039
13056
  }
13040
- #isBackgroundFetch(p$5) {
13057
+ #isBackgroundFetch(p$8) {
13041
13058
  if (!this.#hasFetchMethod) return false;
13042
- const b = p$5;
13059
+ const b = p$8;
13043
13060
  return !!b && b instanceof Promise && b.hasOwnProperty("__staleWhileFetching") && b.__abortController instanceof AC;
13044
13061
  }
13045
13062
  async fetch(k, fetchOptions = {}) {
@@ -13072,8 +13089,8 @@ var require_commonjs = __commonJS({ "../../node_modules/.pnpm/lru-cache@10.2.2/n
13072
13089
  let index$1 = this.#keyMap.get(k);
13073
13090
  if (index$1 === void 0) {
13074
13091
  if (status) status.fetch = "miss";
13075
- const p$5 = this.#backgroundFetch(k, index$1, options, context);
13076
- return p$5.__returned = p$5;
13092
+ const p$8 = this.#backgroundFetch(k, index$1, options, context);
13093
+ return p$8.__returned = p$8;
13077
13094
  } else {
13078
13095
  const v = this.#valList[index$1];
13079
13096
  if (this.#isBackgroundFetch(v)) {
@@ -13092,14 +13109,14 @@ var require_commonjs = __commonJS({ "../../node_modules/.pnpm/lru-cache@10.2.2/n
13092
13109
  if (status) this.#statusTTL(status, index$1);
13093
13110
  return v;
13094
13111
  }
13095
- const p$5 = this.#backgroundFetch(k, index$1, options, context);
13096
- const hasStale = p$5.__staleWhileFetching !== void 0;
13112
+ const p$8 = this.#backgroundFetch(k, index$1, options, context);
13113
+ const hasStale = p$8.__staleWhileFetching !== void 0;
13097
13114
  const staleVal = hasStale && allowStale;
13098
13115
  if (status) {
13099
13116
  status.fetch = isStale ? "stale" : "refresh";
13100
13117
  if (staleVal && isStale) status.returnedStale = true;
13101
13118
  }
13102
- return staleVal ? p$5.__staleWhileFetching : p$5.__returned = p$5;
13119
+ return staleVal ? p$8.__staleWhileFetching : p$8.__returned = p$8;
13103
13120
  }
13104
13121
  }
13105
13122
  /**
@@ -13134,9 +13151,9 @@ var require_commonjs = __commonJS({ "../../node_modules/.pnpm/lru-cache@10.2.2/n
13134
13151
  }
13135
13152
  } else if (status) status.get = "miss";
13136
13153
  }
13137
- #connect(p$5, n$1) {
13138
- this.#prev[n$1] = p$5;
13139
- this.#next[p$5] = n$1;
13154
+ #connect(p$8, n$1) {
13155
+ this.#prev[n$1] = p$8;
13156
+ this.#next[p$8] = n$1;
13140
13157
  }
13141
13158
  #moveToTail(index$1) {
13142
13159
  if (index$1 !== this.#tail) {
@@ -14155,18 +14172,18 @@ function toPath$1(urlOrPath) {
14155
14172
  //#endregion
14156
14173
  //#region ../../node_modules/.pnpm/read-pkg@9.0.1/node_modules/read-pkg/index.js
14157
14174
  var import_normalize = __toESM(require_normalize(), 1);
14158
- const getPackagePath = (cwd) => path$1.resolve(toPath$1(cwd) ?? ".", "package.json");
14175
+ const getPackagePath = (cwd) => path.resolve(toPath$1(cwd) ?? ".", "package.json");
14159
14176
  const _readPackage = (file, normalize$1) => {
14160
14177
  const json = typeof file === "string" ? parseJson(file) : file;
14161
14178
  if (normalize$1) (0, import_normalize.default)(json);
14162
14179
  return json;
14163
14180
  };
14164
14181
  async function readPackage({ cwd, normalize: normalize$1 = true } = {}) {
14165
- const packageFile = await fsPromises.readFile(getPackagePath(cwd), "utf8");
14182
+ const packageFile = await fs$1.readFile(getPackagePath(cwd), "utf8");
14166
14183
  return _readPackage(packageFile, normalize$1);
14167
14184
  }
14168
14185
  function readPackageSync({ cwd, normalize: normalize$1 = true } = {}) {
14169
- const packageFile = fs$1.readFileSync(getPackagePath(cwd), "utf8");
14186
+ const packageFile = fs$2.readFileSync(getPackagePath(cwd), "utf8");
14170
14187
  return _readPackage(packageFile, normalize$1);
14171
14188
  }
14172
14189
 
@@ -14178,7 +14195,7 @@ async function readPackageUp(options) {
14178
14195
  return {
14179
14196
  packageJson: await readPackage({
14180
14197
  ...options,
14181
- cwd: path$1.dirname(filePath)
14198
+ cwd: path.dirname(filePath)
14182
14199
  }),
14183
14200
  path: filePath
14184
14201
  };
@@ -14189,7 +14206,7 @@ function readPackageUpSync(options) {
14189
14206
  return {
14190
14207
  packageJson: readPackageSync({
14191
14208
  ...options,
14192
- cwd: path$1.dirname(filePath)
14209
+ cwd: path.dirname(filePath)
14193
14210
  }),
14194
14211
  path: filePath
14195
14212
  };
@@ -14206,6 +14223,16 @@ const printBanner$1 = () => {
14206
14223
  printBanner(version);
14207
14224
  };
14208
14225
 
14226
+ //#endregion
14227
+ //#region src/utils/version/getNativeAppVersion.ts
14228
+ const getNativeAppVersion = async (platform$2) => {
14229
+ switch (platform$2) {
14230
+ case "ios": return getIOSVersion({ parser: ["xcodeproj", "info-plist"] });
14231
+ case "android": return getAndroidVersion({ parser: "app-build-gradle" });
14232
+ default: return null;
14233
+ }
14234
+ };
14235
+
14209
14236
  //#endregion
14210
14237
  //#region src/commands/deploy.ts
14211
14238
  var import_valid$1 = __toESM(require_valid$1());
@@ -14215,9 +14242,9 @@ const deploy = async (options) => {
14215
14242
  const gitCommit = await getLatestGitCommit();
14216
14243
  const [gitCommitHash, gitMessage] = [gitCommit?.id() ?? null, gitCommit?.summary() ?? null];
14217
14244
  const platform$2 = options.platform ?? (options.interactive ? await getPlatform("Which platform do you want to deploy?") : null);
14218
- if (p$3.isCancel(platform$2)) return;
14245
+ if (p$6.isCancel(platform$2)) return;
14219
14246
  if (!platform$2) {
14220
- p$3.log.error("Platform not found. -p <ios | android> or --platform <ios | android>");
14247
+ p$6.log.error("Platform not found. -p <ios | android> or --platform <ios | android>");
14221
14248
  return;
14222
14249
  }
14223
14250
  const channel = options.channel;
@@ -14233,29 +14260,29 @@ const deploy = async (options) => {
14233
14260
  appVersion: null,
14234
14261
  fingerprintHash: null
14235
14262
  };
14236
- p$3.log.step(`Channel: ${channel}`);
14263
+ p$6.log.step(`Channel: ${channel}`);
14237
14264
  if (config.updateStrategy === "fingerprint") {
14238
- const s = p$3.spinner();
14265
+ const s = p$6.spinner();
14239
14266
  s.start(`Fingerprinting (${platform$2})`);
14240
- if (!fs.existsSync(path.join(cwd, "fingerprint.json"))) {
14241
- p$3.log.error("Fingerprint.json not found. Please run 'hot-updater fingerprint create' to update fingerprint.json");
14267
+ if (!fs.existsSync(path$1.join(cwd, "fingerprint.json"))) {
14268
+ p$6.log.error("Fingerprint.json not found. Please run 'hot-updater fingerprint create' to update fingerprint.json");
14242
14269
  process.exit(1);
14243
14270
  }
14244
14271
  const fingerprint = await nativeFingerprint(cwd, {
14245
14272
  platform: platform$2,
14246
14273
  ...config.fingerprint
14247
14274
  });
14248
- const projectFingerprintJsonFile = fs.readFileSync(path.join(cwd, "fingerprint.json"), "utf-8");
14275
+ const projectFingerprintJsonFile = fs.readFileSync(path$1.join(cwd, "fingerprint.json"), "utf-8");
14249
14276
  const projectFingerprint = JSON.parse(projectFingerprintJsonFile);
14250
14277
  if (fingerprint.hash !== projectFingerprint[platform$2].hash) {
14251
- p$3.log.error("Fingerprint mismatch. 'hot-updater fingerprint create' to update fingerprint.json");
14278
+ p$6.log.error("Fingerprint mismatch. 'hot-updater fingerprint create' to update fingerprint.json");
14252
14279
  process.exit(1);
14253
14280
  }
14254
14281
  target.fingerprintHash = fingerprint.hash;
14255
14282
  s.stop(`Fingerprint(${platform$2}): ${fingerprint.hash}`);
14256
14283
  } else {
14257
- const defaultTargetAppVersion = await getDefaultTargetAppVersion(cwd, platform$2) ?? "1.0.0";
14258
- const targetAppVersion = options.targetAppVersion ?? (options.interactive ? await p$3.text({
14284
+ const defaultTargetAppVersion = await getDefaultTargetAppVersion(platform$2) ?? "1.0.0";
14285
+ const targetAppVersion = options.targetAppVersion ?? (options.interactive ? await p$6.text({
14259
14286
  message: "Target app version",
14260
14287
  placeholder: defaultTargetAppVersion,
14261
14288
  initialValue: defaultTargetAppVersion,
@@ -14264,24 +14291,24 @@ const deploy = async (options) => {
14264
14291
  return;
14265
14292
  }
14266
14293
  }) : null);
14267
- if (p$3.isCancel(targetAppVersion)) return;
14294
+ if (p$6.isCancel(targetAppVersion)) return;
14268
14295
  if (!targetAppVersion) {
14269
- p$3.log.error("Target app version not found. -t <targetAppVersion> semver format (e.g. 1.0.0, 1.x.x)");
14296
+ p$6.log.error("Target app version not found. -t <targetAppVersion> semver format (e.g. 1.0.0, 1.x.x)");
14270
14297
  return;
14271
14298
  }
14272
- p$3.log.info(`Target app version: ${(0, import_valid$1.default)(targetAppVersion)}`);
14299
+ p$6.log.info(`Target app version: ${(0, import_valid$1.default)(targetAppVersion)}`);
14273
14300
  target.appVersion = targetAppVersion;
14274
14301
  }
14275
14302
  if (!target.fingerprintHash && !target.appVersion) {
14276
- if (config.updateStrategy === "fingerprint") p$3.log.error("Fingerprint hash not found. Please run 'hot-updater fingerprint create' to update fingerprint.json");
14277
- else p$3.log.error("Target app version not found. -t <targetAppVersion> semver format (e.g. 1.0.0, 1.x.x)");
14303
+ if (config.updateStrategy === "fingerprint") p$6.log.error("Fingerprint hash not found. Please run 'hot-updater fingerprint create' to update fingerprint.json");
14304
+ else p$6.log.error("Target app version not found. -t <targetAppVersion> semver format (e.g. 1.0.0, 1.x.x)");
14278
14305
  process.exit(1);
14279
14306
  }
14280
14307
  const outputPath = options.bundleOutputPath ?? cwd;
14281
14308
  let bundleId = null;
14282
14309
  let fileHash;
14283
- const normalizeOutputPath = path.isAbsolute(outputPath) ? outputPath : path.join(cwd, outputPath);
14284
- const bundlePath = path.join(normalizeOutputPath, "bundle.zip");
14310
+ const normalizeOutputPath = path$1.isAbsolute(outputPath) ? outputPath : path$1.join(cwd, outputPath);
14311
+ const bundlePath = path$1.join(normalizeOutputPath, "bundle.zip");
14285
14312
  const [buildPlugin, storagePlugin, databasePlugin] = await Promise.all([
14286
14313
  config.build({ cwd }),
14287
14314
  config.storage({ cwd }),
@@ -14292,7 +14319,7 @@ const deploy = async (options) => {
14292
14319
  buildResult: null,
14293
14320
  storageUri: null
14294
14321
  };
14295
- await p$3.tasks([{
14322
+ await p$6.tasks([{
14296
14323
  title: `📦 Building Bundle (${buildPlugin.name})`,
14297
14324
  task: async () => {
14298
14325
  taskRef.buildResult = await buildPlugin.build({
@@ -14303,7 +14330,7 @@ const deploy = async (options) => {
14303
14330
  const buildPath = taskRef.buildResult?.buildPath;
14304
14331
  if (!buildPath) throw new Error("Build result not found");
14305
14332
  const files = await fs.promises.readdir(buildPath, { recursive: true });
14306
- const targetFiles = await getBundleZipTargets(buildPath, files.filter((file) => !fs.statSync(path.join(buildPath, file)).isDirectory()).map((file) => path.join(buildPath, file)));
14333
+ const targetFiles = await getBundleZipTargets(buildPath, files.filter((file) => !fs.statSync(path$1.join(buildPath, file)).isDirectory()).map((file) => path$1.join(buildPath, file)));
14307
14334
  await createZipTargetFiles({
14308
14335
  outfile: bundlePath,
14309
14336
  targetFiles
@@ -14313,8 +14340,8 @@ const deploy = async (options) => {
14313
14340
  return `✅ Build Complete (${buildPlugin.name})`;
14314
14341
  }
14315
14342
  }]);
14316
- if (taskRef.buildResult?.stdout) p$3.log.success(taskRef.buildResult.stdout);
14317
- await p$3.tasks([{
14343
+ if (taskRef.buildResult?.stdout) p$6.log.success(taskRef.buildResult.stdout);
14344
+ await p$6.tasks([{
14318
14345
  title: `📦 Uploading to Storage (${storagePlugin.name})`,
14319
14346
  task: async () => {
14320
14347
  if (!bundleId) throw new Error("Bundle ID not found");
@@ -14322,7 +14349,7 @@ const deploy = async (options) => {
14322
14349
  const { storageUri } = await storagePlugin.uploadBundle(bundleId, bundlePath);
14323
14350
  taskRef.storageUri = storageUri;
14324
14351
  } catch (e) {
14325
- if (e instanceof Error) p$3.log.error(e.message);
14352
+ if (e instanceof Error) p$6.log.error(e.message);
14326
14353
  throw new Error("Failed to upload bundle to storage");
14327
14354
  }
14328
14355
  return `✅ Upload Complete (${storagePlugin.name})`;
@@ -14350,7 +14377,7 @@ const deploy = async (options) => {
14350
14377
  });
14351
14378
  await databasePlugin.commitBundle();
14352
14379
  } catch (e) {
14353
- if (e instanceof Error) p$3.log.error(e.message);
14380
+ if (e instanceof Error) p$6.log.error(e.message);
14354
14381
  throw e;
14355
14382
  }
14356
14383
  await databasePlugin.onUnmount?.();
@@ -14369,17 +14396,17 @@ const deploy = async (options) => {
14369
14396
  const url$2 = openUrl.toString();
14370
14397
  const note = `Console: ${url$2}`;
14371
14398
  if (!isConsoleOpen) {
14372
- const result = await p$3.confirm({
14399
+ const result = await p$6.confirm({
14373
14400
  message: "Console server is not running. Would you like to start it?",
14374
14401
  initialValue: false
14375
14402
  });
14376
- if (!p$3.isCancel(result) && result) await openConsole(port, () => {
14403
+ if (!p$6.isCancel(result) && result) await openConsole(port, () => {
14377
14404
  open_default(url$2);
14378
14405
  });
14379
14406
  } else open_default(url$2);
14380
- p$3.note(note);
14407
+ p$6.note(note);
14381
14408
  }
14382
- p$3.outro("🚀 Deployment Successful");
14409
+ p$6.outro("🚀 Deployment Successful");
14383
14410
  } catch (e) {
14384
14411
  await databasePlugin.onUnmount?.();
14385
14412
  await fs.promises.rm(bundlePath, { force: true });
@@ -15205,15 +15232,15 @@ const handleCommand = (filePath, rawArguments, rawOptions) => {
15205
15232
  var require_windows = __commonJS({ "../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js"(exports, module) {
15206
15233
  module.exports = isexe$3;
15207
15234
  isexe$3.sync = sync$2;
15208
- var fs$6 = __require("fs");
15235
+ var fs$7 = __require("fs");
15209
15236
  function checkPathExt(path$5, options) {
15210
15237
  var pathext = options.pathExt !== void 0 ? options.pathExt : process.env.PATHEXT;
15211
15238
  if (!pathext) return true;
15212
15239
  pathext = pathext.split(";");
15213
15240
  if (pathext.indexOf("") !== -1) return true;
15214
15241
  for (var i$2 = 0; i$2 < pathext.length; i$2++) {
15215
- var p$5 = pathext[i$2].toLowerCase();
15216
- if (p$5 && path$5.substr(-p$5.length).toLowerCase() === p$5) return true;
15242
+ var p$8 = pathext[i$2].toLowerCase();
15243
+ if (p$8 && path$5.substr(-p$8.length).toLowerCase() === p$8) return true;
15217
15244
  }
15218
15245
  return false;
15219
15246
  }
@@ -15222,12 +15249,12 @@ var require_windows = __commonJS({ "../../node_modules/.pnpm/isexe@2.0.0/node_mo
15222
15249
  return checkPathExt(path$5, options);
15223
15250
  }
15224
15251
  function isexe$3(path$5, options, cb) {
15225
- fs$6.stat(path$5, function(er, stat) {
15252
+ fs$7.stat(path$5, function(er, stat) {
15226
15253
  cb(er, er ? false : checkStat$1(stat, path$5, options));
15227
15254
  });
15228
15255
  }
15229
15256
  function sync$2(path$5, options) {
15230
- return checkStat$1(fs$6.statSync(path$5), path$5, options);
15257
+ return checkStat$1(fs$7.statSync(path$5), path$5, options);
15231
15258
  }
15232
15259
  } });
15233
15260
 
@@ -15236,14 +15263,14 @@ var require_windows = __commonJS({ "../../node_modules/.pnpm/isexe@2.0.0/node_mo
15236
15263
  var require_mode = __commonJS({ "../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/mode.js"(exports, module) {
15237
15264
  module.exports = isexe$2;
15238
15265
  isexe$2.sync = sync$1;
15239
- var fs$5 = __require("fs");
15266
+ var fs$6 = __require("fs");
15240
15267
  function isexe$2(path$5, options, cb) {
15241
- fs$5.stat(path$5, function(er, stat) {
15268
+ fs$6.stat(path$5, function(er, stat) {
15242
15269
  cb(er, er ? false : checkStat(stat, options));
15243
15270
  });
15244
15271
  }
15245
15272
  function sync$1(path$5, options) {
15246
- return checkStat(fs$5.statSync(path$5), options);
15273
+ return checkStat(fs$6.statSync(path$5), options);
15247
15274
  }
15248
15275
  function checkStat(stat, options) {
15249
15276
  return stat.isFile() && checkMode(stat, options);
@@ -15266,7 +15293,7 @@ var require_mode = __commonJS({ "../../node_modules/.pnpm/isexe@2.0.0/node_modul
15266
15293
  //#endregion
15267
15294
  //#region ../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js
15268
15295
  var require_isexe = __commonJS({ "../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js"(exports, module) {
15269
- var fs$4 = __require("fs");
15296
+ var fs$5 = __require("fs");
15270
15297
  var core;
15271
15298
  if (process.platform === "win32" || global.TESTING_WINDOWS) core = require_windows();
15272
15299
  else core = require_mode();
@@ -15341,16 +15368,16 @@ var require_which = __commonJS({ "../../node_modules/.pnpm/which@2.0.2/node_modu
15341
15368
  const ppRaw = pathEnv[i$2];
15342
15369
  const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
15343
15370
  const pCmd = path$4.join(pathPart, cmd);
15344
- const p$5 = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
15345
- resolve(subStep(p$5, i$2, 0));
15371
+ const p$8 = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
15372
+ resolve(subStep(p$8, i$2, 0));
15346
15373
  });
15347
- const subStep = (p$5, i$2, ii) => new Promise((resolve, reject) => {
15374
+ const subStep = (p$8, i$2, ii) => new Promise((resolve, reject) => {
15348
15375
  if (ii === pathExt.length) return resolve(step(i$2 + 1));
15349
15376
  const ext = pathExt[ii];
15350
- isexe(p$5 + ext, { pathExt: pathExtExe }, (er, is) => {
15351
- if (!er && is) if (opt.all) found.push(p$5 + ext);
15352
- else return resolve(p$5 + ext);
15353
- return resolve(subStep(p$5, i$2, ii + 1));
15377
+ isexe(p$8 + ext, { pathExt: pathExtExe }, (er, is) => {
15378
+ if (!er && is) if (opt.all) found.push(p$8 + ext);
15379
+ else return resolve(p$8 + ext);
15380
+ return resolve(subStep(p$8, i$2, ii + 1));
15354
15381
  });
15355
15382
  });
15356
15383
  return cb ? step(0).then((res) => cb(null, res), cb) : step(0);
@@ -15363,9 +15390,9 @@ var require_which = __commonJS({ "../../node_modules/.pnpm/which@2.0.2/node_modu
15363
15390
  const ppRaw = pathEnv[i$2];
15364
15391
  const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
15365
15392
  const pCmd = path$4.join(pathPart, cmd);
15366
- const p$5 = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
15393
+ const p$8 = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
15367
15394
  for (let j = 0; j < pathExt.length; j++) {
15368
- const cur = p$5 + pathExt[j];
15395
+ const cur = p$8 + pathExt[j];
15369
15396
  try {
15370
15397
  const is = isexe.sync(cur, { pathExt: pathExtExe });
15371
15398
  if (is) if (opt.all) found.push(cur);
@@ -15470,16 +15497,16 @@ var require_shebang_command = __commonJS({ "../../node_modules/.pnpm/shebang-com
15470
15497
  //#endregion
15471
15498
  //#region ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/readShebang.js
15472
15499
  var require_readShebang = __commonJS({ "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/readShebang.js"(exports, module) {
15473
- const fs$3 = __require("fs");
15500
+ const fs$4 = __require("fs");
15474
15501
  const shebangCommand = require_shebang_command();
15475
15502
  function readShebang$1(command) {
15476
15503
  const size = 150;
15477
15504
  const buffer = Buffer.alloc(size);
15478
15505
  let fd;
15479
15506
  try {
15480
- fd = fs$3.openSync(command, "r");
15481
- fs$3.readSync(fd, buffer, 0, size, 0);
15482
- fs$3.closeSync(fd);
15507
+ fd = fs$4.openSync(command, "r");
15508
+ fs$4.readSync(fd, buffer, 0, size, 0);
15509
+ fs$4.closeSync(fd);
15483
15510
  } catch (e) {}
15484
15511
  return shebangCommand(buffer.toString());
15485
15512
  }
@@ -15527,7 +15554,7 @@ var require_parse = __commonJS({ "../../node_modules/.pnpm/cross-spawn@7.0.6/nod
15527
15554
  }
15528
15555
  return parsed;
15529
15556
  }
15530
- function parse$1(command, args, options) {
15557
+ function parse$5(command, args, options) {
15531
15558
  if (args && !Array.isArray(args)) {
15532
15559
  options = args;
15533
15560
  args = null;
@@ -15546,7 +15573,7 @@ var require_parse = __commonJS({ "../../node_modules/.pnpm/cross-spawn@7.0.6/nod
15546
15573
  };
15547
15574
  return options.shell ? parsed : parseNonShell(parsed);
15548
15575
  }
15549
- module.exports = parse$1;
15576
+ module.exports = parse$5;
15550
15577
  } });
15551
15578
 
15552
15579
  //#endregion
@@ -15593,16 +15620,16 @@ var require_enoent = __commonJS({ "../../node_modules/.pnpm/cross-spawn@7.0.6/no
15593
15620
  //#region ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/index.js
15594
15621
  var require_cross_spawn = __commonJS({ "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/index.js"(exports, module) {
15595
15622
  const cp = __require("child_process");
15596
- const parse = require_parse();
15623
+ const parse$4 = require_parse();
15597
15624
  const enoent = require_enoent();
15598
15625
  function spawn$1(command, args, options) {
15599
- const parsed = parse(command, args, options);
15626
+ const parsed = parse$4(command, args, options);
15600
15627
  const spawned = cp.spawn(parsed.command, parsed.args, parsed.options);
15601
15628
  enoent.hookChildProcess(spawned, parsed);
15602
15629
  return spawned;
15603
15630
  }
15604
15631
  function spawnSync$1(command, args, options) {
15605
- const parsed = parse(command, args, options);
15632
+ const parsed = parse$4(command, args, options);
15606
15633
  const result = cp.spawnSync(parsed.command, parsed.args, parsed.options);
15607
15634
  result.error = result.error || enoent.verifyENOENTSync(result.status, parsed);
15608
15635
  return result;
@@ -15610,7 +15637,7 @@ var require_cross_spawn = __commonJS({ "../../node_modules/.pnpm/cross-spawn@7.0
15610
15637
  module.exports = spawn$1;
15611
15638
  module.exports.spawn = spawn$1;
15612
15639
  module.exports.sync = spawnSync$1;
15613
- module.exports._parse = parse;
15640
+ module.exports._parse = parse$4;
15614
15641
  module.exports._enoent = enoent;
15615
15642
  } });
15616
15643
 
@@ -15630,12 +15657,12 @@ function toPath(urlOrPath) {
15630
15657
  }
15631
15658
  function traversePathUp(startPath) {
15632
15659
  return { *[Symbol.iterator]() {
15633
- let currentPath = path$1.resolve(toPath(startPath));
15660
+ let currentPath = path.resolve(toPath(startPath));
15634
15661
  let previousPath;
15635
15662
  while (previousPath !== currentPath) {
15636
15663
  yield currentPath;
15637
15664
  previousPath = currentPath;
15638
- currentPath = path$1.resolve(currentPath, "..");
15665
+ currentPath = path.resolve(currentPath, "..");
15639
15666
  }
15640
15667
  } };
15641
15668
  }
@@ -15644,21 +15671,21 @@ const TEN_MEGABYTES_IN_BYTES = 10 * 1024 * 1024;
15644
15671
  //#endregion
15645
15672
  //#region ../../node_modules/.pnpm/npm-run-path@6.0.0/node_modules/npm-run-path/index.js
15646
15673
  const npmRunPath = ({ cwd = process$1.cwd(), path: pathOption = process$1.env[pathKey()], preferLocal = true, execPath: execPath$1 = process$1.execPath, addExecPath = true } = {}) => {
15647
- const cwdPath = path$1.resolve(toPath(cwd));
15674
+ const cwdPath = path.resolve(toPath(cwd));
15648
15675
  const result = [];
15649
- const pathParts = pathOption.split(path$1.delimiter);
15676
+ const pathParts = pathOption.split(path.delimiter);
15650
15677
  if (preferLocal) applyPreferLocal(result, pathParts, cwdPath);
15651
15678
  if (addExecPath) applyExecPath(result, pathParts, execPath$1, cwdPath);
15652
- return pathOption === "" || pathOption === path$1.delimiter ? `${result.join(path$1.delimiter)}${pathOption}` : [...result, pathOption].join(path$1.delimiter);
15679
+ return pathOption === "" || pathOption === path.delimiter ? `${result.join(path.delimiter)}${pathOption}` : [...result, pathOption].join(path.delimiter);
15653
15680
  };
15654
15681
  const applyPreferLocal = (result, pathParts, cwdPath) => {
15655
15682
  for (const directory of traversePathUp(cwdPath)) {
15656
- const pathPart = path$1.join(directory, "node_modules/.bin");
15683
+ const pathPart = path.join(directory, "node_modules/.bin");
15657
15684
  if (!pathParts.includes(pathPart)) result.push(pathPart);
15658
15685
  }
15659
15686
  };
15660
15687
  const applyExecPath = (result, pathParts, execPath$1, cwdPath) => {
15661
- const pathPart = path$1.resolve(cwdPath, toPath(execPath$1), "..");
15688
+ const pathPart = path.resolve(cwdPath, toPath(execPath$1), "..");
15662
15689
  if (!pathParts.includes(pathPart)) result.push(pathPart);
15663
15690
  };
15664
15691
  const npmRunPathEnv = ({ env = process$1.env,...options } = {}) => {
@@ -16701,7 +16728,7 @@ const mapNode = ({ options }) => {
16701
16728
  const handleNodeOption = (file, commandArguments, { node: shouldHandleNode = false, nodePath = execPath, nodeOptions = execArgv.filter((nodeOption) => !nodeOption.startsWith("--inspect")), cwd, execPath: formerNodePath,...options }) => {
16702
16729
  if (formerNodePath !== void 0) throw new TypeError("The \"execPath\" option has been removed. Please use the \"nodePath\" option instead.");
16703
16730
  const normalizedNodePath = safeNormalizeFileUrl(nodePath, "The \"nodePath\" option");
16704
- const resolvedNodePath = path$1.resolve(cwd, normalizedNodePath);
16731
+ const resolvedNodePath = path.resolve(cwd, normalizedNodePath);
16705
16732
  const newOptions = {
16706
16733
  ...options,
16707
16734
  nodePath: resolvedNodePath,
@@ -16713,7 +16740,7 @@ const handleNodeOption = (file, commandArguments, { node: shouldHandleNode = fal
16713
16740
  commandArguments,
16714
16741
  newOptions
16715
16742
  ];
16716
- if (path$1.basename(file, ".exe") === "node") throw new TypeError("When the \"node\" option is true, the first argument does not need to be \"node\".");
16743
+ if (path.basename(file, ".exe") === "node") throw new TypeError("When the \"node\" option is true, the first argument does not need to be \"node\".");
16717
16744
  return [
16718
16745
  resolvedNodePath,
16719
16746
  [
@@ -16800,7 +16827,7 @@ const serializeEncoding = (encoding) => typeof encoding === "string" ? `"${encod
16800
16827
  //#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/arguments/cwd.js
16801
16828
  const normalizeCwd = (cwd = getDefaultCwd()) => {
16802
16829
  const cwdString = safeNormalizeFileUrl(cwd, "The \"cwd\" option");
16803
- return path$1.resolve(cwdString);
16830
+ return path.resolve(cwdString);
16804
16831
  };
16805
16832
  const getDefaultCwd = () => {
16806
16833
  try {
@@ -16841,7 +16868,7 @@ const normalizeOptions = (filePath, rawArguments, rawOptions) => {
16841
16868
  options.killSignal = normalizeKillSignal(options.killSignal);
16842
16869
  options.forceKillAfterDelay = normalizeForceKillAfterDelay(options.forceKillAfterDelay);
16843
16870
  options.lines = options.lines.map((lines, fdNumber) => lines && !BINARY_ENCODINGS.has(options.encoding) && options.buffer[fdNumber]);
16844
- if (process$1.platform === "win32" && path$1.basename(file, ".exe") === "cmd") commandArguments.unshift("/q");
16871
+ if (process$1.platform === "win32" && path.basename(file, ".exe") === "cmd") commandArguments.unshift("/q");
16845
16872
  return {
16846
16873
  file,
16847
16874
  commandArguments,
@@ -16921,16 +16948,16 @@ var c = class {
16921
16948
  #n;
16922
16949
  #r = !1;
16923
16950
  #e = void 0;
16924
- constructor(e, t$4) {
16925
- this.#t = e, this.#n = t$4;
16951
+ constructor(e, t$5) {
16952
+ this.#t = e, this.#n = t$5;
16926
16953
  }
16927
16954
  next() {
16928
16955
  const e = () => this.#s();
16929
16956
  return this.#e = this.#e ? this.#e.then(e, e) : e(), this.#e;
16930
16957
  }
16931
16958
  return(e) {
16932
- const t$4 = () => this.#i(e);
16933
- return this.#e ? this.#e.then(t$4, t$4) : t$4();
16959
+ const t$5 = () => this.#i(e);
16960
+ return this.#e ? this.#e.then(t$5, t$5) : t$5();
16934
16961
  }
16935
16962
  async #s() {
16936
16963
  if (this.#r) return {
@@ -16940,8 +16967,8 @@ var c = class {
16940
16967
  let e;
16941
16968
  try {
16942
16969
  e = await this.#t.read();
16943
- } catch (t$4) {
16944
- throw this.#e = void 0, this.#r = !0, this.#t.releaseLock(), t$4;
16970
+ } catch (t$5) {
16971
+ throw this.#e = void 0, this.#r = !0, this.#t.releaseLock(), t$5;
16945
16972
  }
16946
16973
  return e.done && (this.#e = void 0, this.#r = !0, this.#t.releaseLock()), e;
16947
16974
  }
@@ -16951,8 +16978,8 @@ var c = class {
16951
16978
  value: e
16952
16979
  };
16953
16980
  if (this.#r = !0, !this.#n) {
16954
- const t$4 = this.#t.cancel(e);
16955
- return this.#t.releaseLock(), await t$4, {
16981
+ const t$5 = this.#t.cancel(e);
16982
+ return this.#t.releaseLock(), await t$5, {
16956
16983
  done: !0,
16957
16984
  value: e
16958
16985
  };
@@ -16987,8 +17014,8 @@ const u = Object.create(a, {
16987
17014
  }
16988
17015
  });
16989
17016
  function h({ preventCancel: r = !1 } = {}) {
16990
- const e = this.getReader(), t$4 = new c(e, r), s = Object.create(u);
16991
- return s[n] = t$4, s;
17017
+ const e = this.getReader(), t$5 = new c(e, r), s = Object.create(u);
17018
+ return s[n] = t$5, s;
16992
17019
  }
16993
17020
 
16994
17021
  //#endregion
@@ -19471,8 +19498,8 @@ var SignalExit = class extends SignalExitBase {
19471
19498
  const listeners = this.#process.listeners(sig);
19472
19499
  let { count: count$1 } = this.#emitter;
19473
19500
  /* c8 ignore start */
19474
- const p$5 = process$3;
19475
- if (typeof p$5.__signal_exit_emitter__ === "object" && typeof p$5.__signal_exit_emitter__.count === "number") count$1 += p$5.__signal_exit_emitter__.count;
19501
+ const p$8 = process$3;
19502
+ if (typeof p$8.__signal_exit_emitter__ === "object" && typeof p$8.__signal_exit_emitter__.count === "number") count$1 += p$8.__signal_exit_emitter__.count;
19476
19503
  /* c8 ignore stop */
19477
19504
  if (listeners.length === count$1) {
19478
19505
  this.unload();
@@ -20826,7 +20853,7 @@ const ensureInstallPackages = async (buildPluginPackages) => {
20826
20853
  return !packages?.packageJson?.devDependencies?.[pkg];
20827
20854
  });
20828
20855
  const packageManager = getPackageManager();
20829
- await p$2.tasks([{
20856
+ await p$5.tasks([{
20830
20857
  enabled: dependenciesToInstall.length > 0,
20831
20858
  title: "Checking packages",
20832
20859
  task: async (message) => {
@@ -20834,13 +20861,13 @@ const ensureInstallPackages = async (buildPluginPackages) => {
20834
20861
  try {
20835
20862
  const result = await execa(packageManager, [packageManager === "yarn" ? "add" : "install", ...dependenciesToInstall.map(ensurePackageVersion)]);
20836
20863
  if (result.exitCode !== 0 && result.stderr) {
20837
- p$2.log.error(result.stderr);
20864
+ p$5.log.error(result.stderr);
20838
20865
  process.exit(1);
20839
20866
  }
20840
20867
  return `Installed ${dependenciesToInstall.join(", ")}`;
20841
20868
  } catch (e) {
20842
- if (e instanceof ExecaError) p$2.log.error(e.stderr || e.stdout || e.message);
20843
- else if (e instanceof Error) p$2.log.error(e.message);
20869
+ if (e instanceof ExecaError) p$5.log.error(e.stderr || e.stdout || e.message);
20870
+ else if (e instanceof Error) p$5.log.error(e.message);
20844
20871
  process.exit(1);
20845
20872
  }
20846
20873
  }
@@ -20856,13 +20883,13 @@ const ensureInstallPackages = async (buildPluginPackages) => {
20856
20883
  packageManager === "yarn" ? "--dev" : "--save-dev"
20857
20884
  ]);
20858
20885
  if (result.exitCode !== 0 && result.stderr) {
20859
- p$2.log.error(result.stderr);
20886
+ p$5.log.error(result.stderr);
20860
20887
  process.exit(1);
20861
20888
  }
20862
20889
  return `Installed ${devDependenciesToInstall.join(", ")}`;
20863
20890
  } catch (e) {
20864
- if (e instanceof ExecaError) p$2.log.error(e.stderr || e.stdout || e.message);
20865
- else if (e instanceof Error) p$2.log.error(e.message);
20891
+ if (e instanceof ExecaError) p$5.log.error(e.stderr || e.stdout || e.message);
20892
+ else if (e instanceof Error) p$5.log.error(e.message);
20866
20893
  process.exit(1);
20867
20894
  }
20868
20895
  }
@@ -20899,7 +20926,7 @@ const PACKAGE_MAP = {
20899
20926
  };
20900
20927
  const init = async () => {
20901
20928
  printBanner$1();
20902
- const buildPluginPackage = await p$1.select({
20929
+ const buildPluginPackage = await p$4.select({
20903
20930
  message: "Select a build plugin",
20904
20931
  options: [
20905
20932
  {
@@ -20930,8 +20957,8 @@ const init = async () => {
20930
20957
  }
20931
20958
  ]
20932
20959
  });
20933
- if (p$1.isCancel(buildPluginPackage)) process.exit(0);
20934
- const provider = await p$1.select({
20960
+ if (p$4.isCancel(buildPluginPackage)) process.exit(0);
20961
+ const provider = await p$4.select({
20935
20962
  message: "Select a provider",
20936
20963
  options: [
20937
20964
  {
@@ -20952,7 +20979,7 @@ const init = async () => {
20952
20979
  }
20953
20980
  ]
20954
20981
  });
20955
- if (p$1.isCancel(provider)) process.exit(0);
20982
+ if (p$4.isCancel(provider)) process.exit(0);
20956
20983
  try {
20957
20984
  await ensureInstallPackages({
20958
20985
  dependencies: [
@@ -20967,8 +20994,8 @@ const init = async () => {
20967
20994
  ]
20968
20995
  });
20969
20996
  } catch (e) {
20970
- if (e instanceof ExecaError) p$1.log.error(e.stderr ?? e.message);
20971
- else if (e instanceof Error) p$1.log.error(e.message);
20997
+ if (e instanceof ExecaError) p$4.log.error(e.stderr ?? e.message);
20998
+ else if (e instanceof Error) p$4.log.error(e.message);
20972
20999
  process.exit(1);
20973
21000
  }
20974
21001
  const build$1 = buildPluginPackage.name;
@@ -21031,7 +21058,7 @@ var AndroidConfigParser = class {
21031
21058
  parser;
21032
21059
  builder;
21033
21060
  constructor() {
21034
- this.stringsXmlPath = path.join(getCwd(), "android", "app", "src", "main", "res", "values", "strings.xml");
21061
+ this.stringsXmlPath = path$1.join(getCwd(), "android", "app", "src", "main", "res", "values", "strings.xml");
21035
21062
  const options = {
21036
21063
  ignoreAttributes: false,
21037
21064
  attributeNamePrefix: "@_",
@@ -21055,25 +21082,25 @@ var AndroidConfigParser = class {
21055
21082
  async get(key) {
21056
21083
  if (!await this.exists()) return {
21057
21084
  value: null,
21058
- path: path.relative(getCwd(), this.stringsXmlPath)
21085
+ path: path$1.relative(getCwd(), this.stringsXmlPath)
21059
21086
  };
21060
21087
  try {
21061
21088
  const content = await fs.promises.readFile(this.stringsXmlPath, "utf-8");
21062
21089
  const result = this.parser.parse(content);
21063
21090
  if (!result.resources.string) return {
21064
21091
  value: null,
21065
- path: path.relative(getCwd(), this.stringsXmlPath)
21092
+ path: path$1.relative(getCwd(), this.stringsXmlPath)
21066
21093
  };
21067
21094
  const strings = Array.isArray(result.resources.string) ? result.resources.string : [result.resources.string];
21068
21095
  const stringElement = strings.find((str) => str["@_name"] === key && str["@_moduleConfig"] === "true");
21069
21096
  return {
21070
21097
  value: stringElement?.["#text"]?.trim() ?? null,
21071
- path: path.relative(getCwd(), this.stringsXmlPath)
21098
+ path: path$1.relative(getCwd(), this.stringsXmlPath)
21072
21099
  };
21073
21100
  } catch (error) {
21074
21101
  return {
21075
21102
  value: null,
21076
- path: path.relative(getCwd(), this.stringsXmlPath)
21103
+ path: path$1.relative(getCwd(), this.stringsXmlPath)
21077
21104
  };
21078
21105
  }
21079
21106
  }
@@ -21095,7 +21122,7 @@ var AndroidConfigParser = class {
21095
21122
  result.resources.string = strings.length === 1 ? strings[0] : strings;
21096
21123
  const newContent = this.builder.build(result);
21097
21124
  await fs.promises.writeFile(this.stringsXmlPath, newContent, "utf-8");
21098
- return { path: path.relative(getCwd(), this.stringsXmlPath) };
21125
+ return { path: path$1.relative(getCwd(), this.stringsXmlPath) };
21099
21126
  } catch (error) {
21100
21127
  throw new Error(`Failed to parse or update strings.xml: ${error}`);
21101
21128
  }
@@ -21108,7 +21135,7 @@ var import_plist = __toESM(require_plist());
21108
21135
  var IosConfigParser = class {
21109
21136
  async getPlistPath() {
21110
21137
  const [plistFile] = await globby("*/Info.plist", {
21111
- cwd: path.join(getCwd(), "ios"),
21138
+ cwd: path$1.join(getCwd(), "ios"),
21112
21139
  absolute: true,
21113
21140
  onlyFiles: true
21114
21141
  });
@@ -21132,25 +21159,25 @@ var IosConfigParser = class {
21132
21159
  const value = plistObject[key];
21133
21160
  if (value === null || value === void 0) return {
21134
21161
  value: null,
21135
- path: path.relative(getCwd(), plistFile)
21162
+ path: path$1.relative(getCwd(), plistFile)
21136
21163
  };
21137
21164
  if (typeof value === "string") return {
21138
21165
  value,
21139
- path: path.relative(getCwd(), plistFile)
21166
+ path: path$1.relative(getCwd(), plistFile)
21140
21167
  };
21141
21168
  return {
21142
21169
  value: String(value),
21143
- path: path.relative(getCwd(), plistFile)
21170
+ path: path$1.relative(getCwd(), plistFile)
21144
21171
  };
21145
21172
  }
21146
21173
  return {
21147
21174
  value: null,
21148
- path: path.relative(getCwd(), plistFile)
21175
+ path: path$1.relative(getCwd(), plistFile)
21149
21176
  };
21150
21177
  } catch (error) {
21151
21178
  return {
21152
21179
  value: null,
21153
- path: path.relative(getCwd(), await this.getPlistPath())
21180
+ path: path$1.relative(getCwd(), await this.getPlistPath())
21154
21181
  };
21155
21182
  }
21156
21183
  }
@@ -21164,7 +21191,7 @@ var IosConfigParser = class {
21164
21191
  pretty: true
21165
21192
  });
21166
21193
  await fs.promises.writeFile(plistFile, newPlistXml);
21167
- return { path: path.relative(getCwd(), plistFile) };
21194
+ return { path: path$1.relative(getCwd(), plistFile) };
21168
21195
  }
21169
21196
  };
21170
21197
 
@@ -21203,25 +21230,19 @@ const getChannel = async (platform$2) => {
21203
21230
  };
21204
21231
 
21205
21232
  //#endregion
21206
- //#region src/index.ts
21207
- var import_picocolors = __toESM(require_picocolors());
21208
- var import_valid = __toESM(require_valid$1());
21209
- const DEFAULT_CHANNEL = "production";
21210
- const program = new Command();
21211
- program.name("hot-updater").description(banner(version)).version(version);
21212
- program.command("init").description("Initialize Hot Updater").action(init);
21213
- const fingerprintCommand = program.command("fingerprint").description("Generate fingerprint");
21214
- fingerprintCommand.action(async () => {
21233
+ //#region src/commands/fingerprint.ts
21234
+ var import_picocolors$2 = __toESM(require_picocolors());
21235
+ const handleFingerprint = async () => {
21215
21236
  const config = await loadConfig(null);
21216
21237
  if (config.updateStrategy === "appVersion") {
21217
- p.log.error("The updateStrategy in hot-updater.config.ts is set to 'appVersion'. This command only works with 'fingerprint' strategy.");
21238
+ p$3.log.error("The updateStrategy in hot-updater.config.ts is set to 'appVersion'. This command only works with 'fingerprint' strategy.");
21218
21239
  process.exit(1);
21219
21240
  }
21220
21241
  const fingerPrintRef = {
21221
21242
  ios: null,
21222
21243
  android: null
21223
21244
  };
21224
- await p.tasks([{
21245
+ await p$3.tasks([{
21225
21246
  title: "Generating fingerprint (iOS)",
21226
21247
  task: async () => {
21227
21248
  const fingerprint = await nativeFingerprint(getCwd(), {
@@ -21242,22 +21263,22 @@ fingerprintCommand.action(async () => {
21242
21263
  return `Fingerprint(Android): ${fingerprint.hash}`;
21243
21264
  }
21244
21265
  }]);
21245
- const localFingerprintPath = path.join(getCwd(), "fingerprint.json");
21266
+ const localFingerprintPath = path$1.join(getCwd(), "fingerprint.json");
21246
21267
  if (!fs.existsSync(localFingerprintPath)) return;
21247
21268
  const readFingerprint = await fs.promises.readFile(localFingerprintPath, "utf-8");
21248
21269
  const localFingerprint = JSON.parse(readFingerprint);
21249
21270
  if (localFingerprint.ios.hash !== fingerPrintRef.ios?.hash) {
21250
- p.log.error("iOS fingerprint mismatch. Please update using 'hot-updater fingerprint create' command.");
21271
+ p$3.log.error("iOS fingerprint mismatch. Please update using 'hot-updater fingerprint create' command.");
21251
21272
  process.exit(1);
21252
21273
  }
21253
21274
  if (localFingerprint.android.hash !== fingerPrintRef.android?.hash) {
21254
- p.log.error("Android fingerprint mismatch. Please update using 'hot-updater fingerprint create' command.");
21275
+ p$3.log.error("Android fingerprint mismatch. Please update using 'hot-updater fingerprint create' command.");
21255
21276
  process.exit(1);
21256
21277
  }
21257
- p.log.success("Fingerprint matched");
21258
- });
21259
- fingerprintCommand.command("create").description("Create fingerprint").action(async () => {
21260
- const FINGERPRINT_FILE_PATH = path.join(getCwd(), "fingerprint.json");
21278
+ p$3.log.success("Fingerprint matched");
21279
+ };
21280
+ const handleCreateFingerprint = async () => {
21281
+ const FINGERPRINT_FILE_PATH = path$1.join(getCwd(), "fingerprint.json");
21261
21282
  const createFingerprintData = async (config) => {
21262
21283
  const [ios, android] = await Promise.all([nativeFingerprint(getCwd(), {
21263
21284
  platform: "ios",
@@ -21280,12 +21301,12 @@ fingerprintCommand.command("create").description("Create fingerprint").action(as
21280
21301
  }
21281
21302
  };
21282
21303
  let diffChanged = false;
21283
- await p.tasks([{
21304
+ await p$3.tasks([{
21284
21305
  title: "Creating fingerprint.json",
21285
21306
  task: async () => {
21286
21307
  const config = await loadConfig(null);
21287
21308
  if (config.updateStrategy === "appVersion") {
21288
- p.log.error("The updateStrategy in hot-updater.config.ts is set to 'appVersion'. This command only works with 'fingerprint' strategy.");
21309
+ p$3.log.error("The updateStrategy in hot-updater.config.ts is set to 'appVersion'. This command only works with 'fingerprint' strategy.");
21289
21310
  process.exit(1);
21290
21311
  }
21291
21312
  const newFingerprint = await createFingerprintData(config);
@@ -21295,26 +21316,742 @@ fingerprintCommand.command("create").description("Create fingerprint").action(as
21295
21316
  return "Created fingerprint.json";
21296
21317
  }
21297
21318
  }]);
21298
- if (diffChanged) p.log.success(import_picocolors.default.bold(`${import_picocolors.default.blue("fingerprint.json")} has changed, you need to rebuild the native app.`));
21299
- });
21300
- const channelCommand = program.command("channel").description("Manage channels");
21301
- channelCommand.action(async () => {
21319
+ if (diffChanged) p$3.log.success(import_picocolors$2.default.bold(`${import_picocolors$2.default.blue("fingerprint.json")} has changed, you need to rebuild the native app.`));
21320
+ else p$3.log.success(import_picocolors$2.default.bold(`${import_picocolors$2.default.blue("fingerprint.json")} is up to date.`));
21321
+ };
21322
+
21323
+ //#endregion
21324
+ //#region src/commands/channel.ts
21325
+ var import_picocolors$1 = __toESM(require_picocolors());
21326
+ const handleChannel = async () => {
21302
21327
  const androidChannel = await getChannel("android");
21303
21328
  const iosChannel = await getChannel("ios");
21304
- p.log.info(`Current Android channel: ${import_picocolors.default.green(androidChannel.value)}`);
21305
- p.log.info(` from: ${import_picocolors.default.blue(androidChannel.path)}`);
21306
- p.log.info(`Current iOS channel: ${import_picocolors.default.green(iosChannel.value)}`);
21307
- p.log.info(` from: ${import_picocolors.default.blue(iosChannel.path)}`);
21308
- });
21309
- channelCommand.command("set").description("Set the channel for Android (BuildConfig) and iOS (Info.plist)").argument("<channel>", "the channel to set").action(async (channel) => {
21329
+ p$2.log.info(`Current Android channel: ${import_picocolors$1.default.green(androidChannel.value)}`);
21330
+ p$2.log.info(` from: ${import_picocolors$1.default.blue(androidChannel.path)}`);
21331
+ p$2.log.info(`Current iOS channel: ${import_picocolors$1.default.green(iosChannel.value)}`);
21332
+ p$2.log.info(` from: ${import_picocolors$1.default.blue(iosChannel.path)}`);
21333
+ };
21334
+ const handleSetChannel = async (channel) => {
21310
21335
  const { path: androidPath } = await setChannel("android", channel);
21311
- p.log.success(`Set Android channel to: ${import_picocolors.default.green(channel)}`);
21312
- p.log.info(` from: ${import_picocolors.default.blue(androidPath)}`);
21336
+ p$2.log.success(`Set Android channel to: ${import_picocolors$1.default.green(channel)}`);
21337
+ p$2.log.info(` from: ${import_picocolors$1.default.blue(androidPath)}`);
21313
21338
  const { path: iosPath } = await setChannel("ios", channel);
21314
- p.log.success(`Set iOS channel to: ${import_picocolors.default.green(channel)}`);
21315
- p.log.info(` from: ${import_picocolors.default.blue(iosPath)}`);
21316
- p.log.success("You need to rebuild the native app if the channel has changed.");
21317
- });
21339
+ p$2.log.success(`Set iOS channel to: ${import_picocolors$1.default.green(channel)}`);
21340
+ p$2.log.info(` from: ${import_picocolors$1.default.blue(iosPath)}`);
21341
+ p$2.log.success("You need to rebuild the native app if the channel has changed.");
21342
+ const config = await loadConfig(null);
21343
+ if (config.updateStrategy === "fingerprint") await handleCreateFingerprint();
21344
+ };
21345
+
21346
+ //#endregion
21347
+ //#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/inc.js
21348
+ var require_inc = __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/inc.js"(exports, module) {
21349
+ const SemVer$10 = require_semver$1();
21350
+ const inc$1 = (version$1, release, options, identifier, identifierBase) => {
21351
+ if (typeof options === "string") {
21352
+ identifierBase = identifier;
21353
+ identifier = options;
21354
+ options = void 0;
21355
+ }
21356
+ try {
21357
+ return new SemVer$10(version$1 instanceof SemVer$10 ? version$1.version : version$1, options).inc(release, identifier, identifierBase).version;
21358
+ } catch (er) {
21359
+ return null;
21360
+ }
21361
+ };
21362
+ module.exports = inc$1;
21363
+ } });
21364
+
21365
+ //#endregion
21366
+ //#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/diff.js
21367
+ var require_diff = __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/diff.js"(exports, module) {
21368
+ const parse$3 = require_parse$2();
21369
+ const diff$1 = (version1, version2) => {
21370
+ const v1 = parse$3(version1, null, true);
21371
+ const v2 = parse$3(version2, null, true);
21372
+ const comparison = v1.compare(v2);
21373
+ if (comparison === 0) return null;
21374
+ const v1Higher = comparison > 0;
21375
+ const highVersion = v1Higher ? v1 : v2;
21376
+ const lowVersion = v1Higher ? v2 : v1;
21377
+ const highHasPre = !!highVersion.prerelease.length;
21378
+ const lowHasPre = !!lowVersion.prerelease.length;
21379
+ if (lowHasPre && !highHasPre) {
21380
+ if (!lowVersion.patch && !lowVersion.minor) return "major";
21381
+ if (lowVersion.compareMain(highVersion) === 0) {
21382
+ if (lowVersion.minor && !lowVersion.patch) return "minor";
21383
+ return "patch";
21384
+ }
21385
+ }
21386
+ const prefix = highHasPre ? "pre" : "";
21387
+ if (v1.major !== v2.major) return prefix + "major";
21388
+ if (v1.minor !== v2.minor) return prefix + "minor";
21389
+ if (v1.patch !== v2.patch) return prefix + "patch";
21390
+ return "prerelease";
21391
+ };
21392
+ module.exports = diff$1;
21393
+ } });
21394
+
21395
+ //#endregion
21396
+ //#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/major.js
21397
+ var require_major = __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/major.js"(exports, module) {
21398
+ const SemVer$9 = require_semver$1();
21399
+ const major$1 = (a$1, loose) => new SemVer$9(a$1, loose).major;
21400
+ module.exports = major$1;
21401
+ } });
21402
+
21403
+ //#endregion
21404
+ //#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/minor.js
21405
+ var require_minor = __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/minor.js"(exports, module) {
21406
+ const SemVer$8 = require_semver$1();
21407
+ const minor$1 = (a$1, loose) => new SemVer$8(a$1, loose).minor;
21408
+ module.exports = minor$1;
21409
+ } });
21410
+
21411
+ //#endregion
21412
+ //#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/patch.js
21413
+ var require_patch = __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/patch.js"(exports, module) {
21414
+ const SemVer$7 = require_semver$1();
21415
+ const patch$1 = (a$1, loose) => new SemVer$7(a$1, loose).patch;
21416
+ module.exports = patch$1;
21417
+ } });
21418
+
21419
+ //#endregion
21420
+ //#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/prerelease.js
21421
+ var require_prerelease = __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/prerelease.js"(exports, module) {
21422
+ const parse$2 = require_parse$2();
21423
+ const prerelease$1 = (version$1, options) => {
21424
+ const parsed = parse$2(version$1, options);
21425
+ return parsed && parsed.prerelease.length ? parsed.prerelease : null;
21426
+ };
21427
+ module.exports = prerelease$1;
21428
+ } });
21429
+
21430
+ //#endregion
21431
+ //#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/rcompare.js
21432
+ var require_rcompare = __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/rcompare.js"(exports, module) {
21433
+ const compare$4 = require_compare();
21434
+ const rcompare$1 = (a$1, b, loose) => compare$4(b, a$1, loose);
21435
+ module.exports = rcompare$1;
21436
+ } });
21437
+
21438
+ //#endregion
21439
+ //#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/compare-loose.js
21440
+ var require_compare_loose = __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/compare-loose.js"(exports, module) {
21441
+ const compare$3 = require_compare();
21442
+ const compareLoose$1 = (a$1, b) => compare$3(a$1, b, true);
21443
+ module.exports = compareLoose$1;
21444
+ } });
21445
+
21446
+ //#endregion
21447
+ //#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/compare-build.js
21448
+ var require_compare_build = __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/compare-build.js"(exports, module) {
21449
+ const SemVer$6 = require_semver$1();
21450
+ const compareBuild$3 = (a$1, b, loose) => {
21451
+ const versionA = new SemVer$6(a$1, loose);
21452
+ const versionB = new SemVer$6(b, loose);
21453
+ return versionA.compare(versionB) || versionA.compareBuild(versionB);
21454
+ };
21455
+ module.exports = compareBuild$3;
21456
+ } });
21457
+
21458
+ //#endregion
21459
+ //#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/sort.js
21460
+ var require_sort = __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/sort.js"(exports, module) {
21461
+ const compareBuild$2 = require_compare_build();
21462
+ const sort$1 = (list, loose) => list.sort((a$1, b) => compareBuild$2(a$1, b, loose));
21463
+ module.exports = sort$1;
21464
+ } });
21465
+
21466
+ //#endregion
21467
+ //#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/rsort.js
21468
+ var require_rsort = __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/rsort.js"(exports, module) {
21469
+ const compareBuild$1 = require_compare_build();
21470
+ const rsort$1 = (list, loose) => list.sort((a$1, b) => compareBuild$1(b, a$1, loose));
21471
+ module.exports = rsort$1;
21472
+ } });
21473
+
21474
+ //#endregion
21475
+ //#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/coerce.js
21476
+ var require_coerce = __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/coerce.js"(exports, module) {
21477
+ const SemVer$5 = require_semver$1();
21478
+ const parse$1 = require_parse$2();
21479
+ const { safeRe: re, t } = require_re();
21480
+ const coerce$1 = (version$1, options) => {
21481
+ if (version$1 instanceof SemVer$5) return version$1;
21482
+ if (typeof version$1 === "number") version$1 = String(version$1);
21483
+ if (typeof version$1 !== "string") return null;
21484
+ options = options || {};
21485
+ let match = null;
21486
+ if (!options.rtl) match = version$1.match(options.includePrerelease ? re[t.COERCEFULL] : re[t.COERCE]);
21487
+ else {
21488
+ const coerceRtlRegex = options.includePrerelease ? re[t.COERCERTLFULL] : re[t.COERCERTL];
21489
+ let next;
21490
+ while ((next = coerceRtlRegex.exec(version$1)) && (!match || match.index + match[0].length !== version$1.length)) {
21491
+ if (!match || next.index + next[0].length !== match.index + match[0].length) match = next;
21492
+ coerceRtlRegex.lastIndex = next.index + next[1].length + next[2].length;
21493
+ }
21494
+ coerceRtlRegex.lastIndex = -1;
21495
+ }
21496
+ if (match === null) return null;
21497
+ const major$2 = match[2];
21498
+ const minor$2 = match[3] || "0";
21499
+ const patch$2 = match[4] || "0";
21500
+ const prerelease$2 = options.includePrerelease && match[5] ? `-${match[5]}` : "";
21501
+ const build$1 = options.includePrerelease && match[6] ? `+${match[6]}` : "";
21502
+ return parse$1(`${major$2}.${minor$2}.${patch$2}${prerelease$2}${build$1}`, options);
21503
+ };
21504
+ module.exports = coerce$1;
21505
+ } });
21506
+
21507
+ //#endregion
21508
+ //#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/satisfies.js
21509
+ var require_satisfies = __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/functions/satisfies.js"(exports, module) {
21510
+ const Range$8 = require_range();
21511
+ const satisfies$4 = (version$1, range, options) => {
21512
+ try {
21513
+ range = new Range$8(range, options);
21514
+ } catch (er) {
21515
+ return false;
21516
+ }
21517
+ return range.test(version$1);
21518
+ };
21519
+ module.exports = satisfies$4;
21520
+ } });
21521
+
21522
+ //#endregion
21523
+ //#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/to-comparators.js
21524
+ var require_to_comparators = __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/to-comparators.js"(exports, module) {
21525
+ const Range$7 = require_range();
21526
+ const toComparators$1 = (range, options) => new Range$7(range, options).set.map((comp) => comp.map((c$1) => c$1.value).join(" ").trim().split(" "));
21527
+ module.exports = toComparators$1;
21528
+ } });
21529
+
21530
+ //#endregion
21531
+ //#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/max-satisfying.js
21532
+ var require_max_satisfying = __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/max-satisfying.js"(exports, module) {
21533
+ const SemVer$4 = require_semver$1();
21534
+ const Range$6 = require_range();
21535
+ const maxSatisfying$1 = (versions, range, options) => {
21536
+ let max = null;
21537
+ let maxSV = null;
21538
+ let rangeObj = null;
21539
+ try {
21540
+ rangeObj = new Range$6(range, options);
21541
+ } catch (er) {
21542
+ return null;
21543
+ }
21544
+ versions.forEach((v) => {
21545
+ if (rangeObj.test(v)) {
21546
+ if (!max || maxSV.compare(v) === -1) {
21547
+ max = v;
21548
+ maxSV = new SemVer$4(max, options);
21549
+ }
21550
+ }
21551
+ });
21552
+ return max;
21553
+ };
21554
+ module.exports = maxSatisfying$1;
21555
+ } });
21556
+
21557
+ //#endregion
21558
+ //#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/min-satisfying.js
21559
+ var require_min_satisfying = __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/min-satisfying.js"(exports, module) {
21560
+ const SemVer$3 = require_semver$1();
21561
+ const Range$5 = require_range();
21562
+ const minSatisfying$1 = (versions, range, options) => {
21563
+ let min = null;
21564
+ let minSV = null;
21565
+ let rangeObj = null;
21566
+ try {
21567
+ rangeObj = new Range$5(range, options);
21568
+ } catch (er) {
21569
+ return null;
21570
+ }
21571
+ versions.forEach((v) => {
21572
+ if (rangeObj.test(v)) {
21573
+ if (!min || minSV.compare(v) === 1) {
21574
+ min = v;
21575
+ minSV = new SemVer$3(min, options);
21576
+ }
21577
+ }
21578
+ });
21579
+ return min;
21580
+ };
21581
+ module.exports = minSatisfying$1;
21582
+ } });
21583
+
21584
+ //#endregion
21585
+ //#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/min-version.js
21586
+ var require_min_version = __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/min-version.js"(exports, module) {
21587
+ const SemVer$2 = require_semver$1();
21588
+ const Range$4 = require_range();
21589
+ const gt$2 = require_gt();
21590
+ const minVersion$1 = (range, loose) => {
21591
+ range = new Range$4(range, loose);
21592
+ let minver = new SemVer$2("0.0.0");
21593
+ if (range.test(minver)) return minver;
21594
+ minver = new SemVer$2("0.0.0-0");
21595
+ if (range.test(minver)) return minver;
21596
+ minver = null;
21597
+ for (let i$2 = 0; i$2 < range.set.length; ++i$2) {
21598
+ const comparators = range.set[i$2];
21599
+ let setMin = null;
21600
+ comparators.forEach((comparator) => {
21601
+ const compver = new SemVer$2(comparator.semver.version);
21602
+ switch (comparator.operator) {
21603
+ case ">":
21604
+ if (compver.prerelease.length === 0) compver.patch++;
21605
+ else compver.prerelease.push(0);
21606
+ compver.raw = compver.format();
21607
+ case "":
21608
+ case ">=":
21609
+ if (!setMin || gt$2(compver, setMin)) setMin = compver;
21610
+ break;
21611
+ case "<":
21612
+ case "<=": break;
21613
+ default: throw new Error(`Unexpected operation: ${comparator.operator}`);
21614
+ }
21615
+ });
21616
+ if (setMin && (!minver || gt$2(minver, setMin))) minver = setMin;
21617
+ }
21618
+ if (minver && range.test(minver)) return minver;
21619
+ return null;
21620
+ };
21621
+ module.exports = minVersion$1;
21622
+ } });
21623
+
21624
+ //#endregion
21625
+ //#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/outside.js
21626
+ var require_outside = __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/outside.js"(exports, module) {
21627
+ const SemVer$1 = require_semver$1();
21628
+ const Comparator$2 = require_comparator();
21629
+ const { ANY: ANY$1 } = Comparator$2;
21630
+ const Range$3 = require_range();
21631
+ const satisfies$3 = require_satisfies();
21632
+ const gt$1 = require_gt();
21633
+ const lt$1 = require_lt();
21634
+ const lte$1 = require_lte();
21635
+ const gte$1 = require_gte();
21636
+ const outside$3 = (version$1, range, hilo, options) => {
21637
+ version$1 = new SemVer$1(version$1, options);
21638
+ range = new Range$3(range, options);
21639
+ let gtfn, ltefn, ltfn, comp, ecomp;
21640
+ switch (hilo) {
21641
+ case ">":
21642
+ gtfn = gt$1;
21643
+ ltefn = lte$1;
21644
+ ltfn = lt$1;
21645
+ comp = ">";
21646
+ ecomp = ">=";
21647
+ break;
21648
+ case "<":
21649
+ gtfn = lt$1;
21650
+ ltefn = gte$1;
21651
+ ltfn = gt$1;
21652
+ comp = "<";
21653
+ ecomp = "<=";
21654
+ break;
21655
+ default: throw new TypeError("Must provide a hilo val of \"<\" or \">\"");
21656
+ }
21657
+ if (satisfies$3(version$1, range, options)) return false;
21658
+ for (let i$2 = 0; i$2 < range.set.length; ++i$2) {
21659
+ const comparators = range.set[i$2];
21660
+ let high = null;
21661
+ let low = null;
21662
+ comparators.forEach((comparator) => {
21663
+ if (comparator.semver === ANY$1) comparator = new Comparator$2(">=0.0.0");
21664
+ high = high || comparator;
21665
+ low = low || comparator;
21666
+ if (gtfn(comparator.semver, high.semver, options)) high = comparator;
21667
+ else if (ltfn(comparator.semver, low.semver, options)) low = comparator;
21668
+ });
21669
+ if (high.operator === comp || high.operator === ecomp) return false;
21670
+ if ((!low.operator || low.operator === comp) && ltefn(version$1, low.semver)) return false;
21671
+ else if (low.operator === ecomp && ltfn(version$1, low.semver)) return false;
21672
+ }
21673
+ return true;
21674
+ };
21675
+ module.exports = outside$3;
21676
+ } });
21677
+
21678
+ //#endregion
21679
+ //#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/gtr.js
21680
+ var require_gtr = __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/gtr.js"(exports, module) {
21681
+ const outside$2 = require_outside();
21682
+ const gtr$1 = (version$1, range, options) => outside$2(version$1, range, ">", options);
21683
+ module.exports = gtr$1;
21684
+ } });
21685
+
21686
+ //#endregion
21687
+ //#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/ltr.js
21688
+ var require_ltr = __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/ltr.js"(exports, module) {
21689
+ const outside$1 = require_outside();
21690
+ const ltr$1 = (version$1, range, options) => outside$1(version$1, range, "<", options);
21691
+ module.exports = ltr$1;
21692
+ } });
21693
+
21694
+ //#endregion
21695
+ //#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/intersects.js
21696
+ var require_intersects = __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/intersects.js"(exports, module) {
21697
+ const Range$2 = require_range();
21698
+ const intersects$1 = (r1, r2, options) => {
21699
+ r1 = new Range$2(r1, options);
21700
+ r2 = new Range$2(r2, options);
21701
+ return r1.intersects(r2, options);
21702
+ };
21703
+ module.exports = intersects$1;
21704
+ } });
21705
+
21706
+ //#endregion
21707
+ //#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/simplify.js
21708
+ var require_simplify = __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/simplify.js"(exports, module) {
21709
+ const satisfies$2 = require_satisfies();
21710
+ const compare$2 = require_compare();
21711
+ module.exports = (versions, range, options) => {
21712
+ const set = [];
21713
+ let first = null;
21714
+ let prev = null;
21715
+ const v = versions.sort((a$1, b) => compare$2(a$1, b, options));
21716
+ for (const version$1 of v) {
21717
+ const included = satisfies$2(version$1, range, options);
21718
+ if (included) {
21719
+ prev = version$1;
21720
+ if (!first) first = version$1;
21721
+ } else {
21722
+ if (prev) set.push([first, prev]);
21723
+ prev = null;
21724
+ first = null;
21725
+ }
21726
+ }
21727
+ if (first) set.push([first, null]);
21728
+ const ranges = [];
21729
+ for (const [min, max] of set) if (min === max) ranges.push(min);
21730
+ else if (!max && min === v[0]) ranges.push("*");
21731
+ else if (!max) ranges.push(`>=${min}`);
21732
+ else if (min === v[0]) ranges.push(`<=${max}`);
21733
+ else ranges.push(`${min} - ${max}`);
21734
+ const simplified = ranges.join(" || ");
21735
+ const original = typeof range.raw === "string" ? range.raw : String(range);
21736
+ return simplified.length < original.length ? simplified : range;
21737
+ };
21738
+ } });
21739
+
21740
+ //#endregion
21741
+ //#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/subset.js
21742
+ var require_subset = __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/ranges/subset.js"(exports, module) {
21743
+ const Range$1 = require_range();
21744
+ const Comparator$1 = require_comparator();
21745
+ const { ANY } = Comparator$1;
21746
+ const satisfies$1 = require_satisfies();
21747
+ const compare$1 = require_compare();
21748
+ const subset$1 = (sub, dom$2, options = {}) => {
21749
+ if (sub === dom$2) return true;
21750
+ sub = new Range$1(sub, options);
21751
+ dom$2 = new Range$1(dom$2, options);
21752
+ let sawNonNull = false;
21753
+ OUTER: for (const simpleSub of sub.set) {
21754
+ for (const simpleDom of dom$2.set) {
21755
+ const isSub = simpleSubset(simpleSub, simpleDom, options);
21756
+ sawNonNull = sawNonNull || isSub !== null;
21757
+ if (isSub) continue OUTER;
21758
+ }
21759
+ if (sawNonNull) return false;
21760
+ }
21761
+ return true;
21762
+ };
21763
+ const minimumVersionWithPreRelease = [new Comparator$1(">=0.0.0-0")];
21764
+ const minimumVersion = [new Comparator$1(">=0.0.0")];
21765
+ const simpleSubset = (sub, dom$2, options) => {
21766
+ if (sub === dom$2) return true;
21767
+ if (sub.length === 1 && sub[0].semver === ANY) if (dom$2.length === 1 && dom$2[0].semver === ANY) return true;
21768
+ else if (options.includePrerelease) sub = minimumVersionWithPreRelease;
21769
+ else sub = minimumVersion;
21770
+ if (dom$2.length === 1 && dom$2[0].semver === ANY) if (options.includePrerelease) return true;
21771
+ else dom$2 = minimumVersion;
21772
+ const eqSet = /* @__PURE__ */ new Set();
21773
+ let gt$5, lt$4;
21774
+ for (const c$1 of sub) if (c$1.operator === ">" || c$1.operator === ">=") gt$5 = higherGT(gt$5, c$1, options);
21775
+ else if (c$1.operator === "<" || c$1.operator === "<=") lt$4 = lowerLT(lt$4, c$1, options);
21776
+ else eqSet.add(c$1.semver);
21777
+ if (eqSet.size > 1) return null;
21778
+ let gtltComp;
21779
+ if (gt$5 && lt$4) {
21780
+ gtltComp = compare$1(gt$5.semver, lt$4.semver, options);
21781
+ if (gtltComp > 0) return null;
21782
+ else if (gtltComp === 0 && (gt$5.operator !== ">=" || lt$4.operator !== "<=")) return null;
21783
+ }
21784
+ for (const eq$3 of eqSet) {
21785
+ if (gt$5 && !satisfies$1(eq$3, String(gt$5), options)) return null;
21786
+ if (lt$4 && !satisfies$1(eq$3, String(lt$4), options)) return null;
21787
+ for (const c$1 of dom$2) if (!satisfies$1(eq$3, String(c$1), options)) return false;
21788
+ return true;
21789
+ }
21790
+ let higher, lower;
21791
+ let hasDomLT, hasDomGT;
21792
+ let needDomLTPre = lt$4 && !options.includePrerelease && lt$4.semver.prerelease.length ? lt$4.semver : false;
21793
+ let needDomGTPre = gt$5 && !options.includePrerelease && gt$5.semver.prerelease.length ? gt$5.semver : false;
21794
+ if (needDomLTPre && needDomLTPre.prerelease.length === 1 && lt$4.operator === "<" && needDomLTPre.prerelease[0] === 0) needDomLTPre = false;
21795
+ for (const c$1 of dom$2) {
21796
+ hasDomGT = hasDomGT || c$1.operator === ">" || c$1.operator === ">=";
21797
+ hasDomLT = hasDomLT || c$1.operator === "<" || c$1.operator === "<=";
21798
+ if (gt$5) {
21799
+ if (needDomGTPre) {
21800
+ if (c$1.semver.prerelease && c$1.semver.prerelease.length && c$1.semver.major === needDomGTPre.major && c$1.semver.minor === needDomGTPre.minor && c$1.semver.patch === needDomGTPre.patch) needDomGTPre = false;
21801
+ }
21802
+ if (c$1.operator === ">" || c$1.operator === ">=") {
21803
+ higher = higherGT(gt$5, c$1, options);
21804
+ if (higher === c$1 && higher !== gt$5) return false;
21805
+ } else if (gt$5.operator === ">=" && !satisfies$1(gt$5.semver, String(c$1), options)) return false;
21806
+ }
21807
+ if (lt$4) {
21808
+ if (needDomLTPre) {
21809
+ if (c$1.semver.prerelease && c$1.semver.prerelease.length && c$1.semver.major === needDomLTPre.major && c$1.semver.minor === needDomLTPre.minor && c$1.semver.patch === needDomLTPre.patch) needDomLTPre = false;
21810
+ }
21811
+ if (c$1.operator === "<" || c$1.operator === "<=") {
21812
+ lower = lowerLT(lt$4, c$1, options);
21813
+ if (lower === c$1 && lower !== lt$4) return false;
21814
+ } else if (lt$4.operator === "<=" && !satisfies$1(lt$4.semver, String(c$1), options)) return false;
21815
+ }
21816
+ if (!c$1.operator && (lt$4 || gt$5) && gtltComp !== 0) return false;
21817
+ }
21818
+ if (gt$5 && hasDomLT && !lt$4 && gtltComp !== 0) return false;
21819
+ if (lt$4 && hasDomGT && !gt$5 && gtltComp !== 0) return false;
21820
+ if (needDomGTPre || needDomLTPre) return false;
21821
+ return true;
21822
+ };
21823
+ const higherGT = (a$1, b, options) => {
21824
+ if (!a$1) return b;
21825
+ const comp = compare$1(a$1.semver, b.semver, options);
21826
+ return comp > 0 ? a$1 : comp < 0 ? b : b.operator === ">" && a$1.operator === ">=" ? b : a$1;
21827
+ };
21828
+ const lowerLT = (a$1, b, options) => {
21829
+ if (!a$1) return b;
21830
+ const comp = compare$1(a$1.semver, b.semver, options);
21831
+ return comp < 0 ? a$1 : comp > 0 ? b : b.operator === "<" && a$1.operator === "<=" ? b : a$1;
21832
+ };
21833
+ module.exports = subset$1;
21834
+ } });
21835
+
21836
+ //#endregion
21837
+ //#region ../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/index.js
21838
+ var require_semver = __commonJS({ "../../node_modules/.pnpm/semver@7.7.2/node_modules/semver/index.js"(exports, module) {
21839
+ const internalRe = require_re();
21840
+ const constants$2 = require_constants();
21841
+ const SemVer = require_semver$1();
21842
+ const identifiers = require_identifiers();
21843
+ const parse = require_parse$2();
21844
+ const valid = require_valid();
21845
+ const clean = require_clean();
21846
+ const inc = require_inc();
21847
+ const diff = require_diff();
21848
+ const major = require_major();
21849
+ const minor = require_minor();
21850
+ const patch = require_patch();
21851
+ const prerelease = require_prerelease();
21852
+ const compare = require_compare();
21853
+ const rcompare = require_rcompare();
21854
+ const compareLoose = require_compare_loose();
21855
+ const compareBuild = require_compare_build();
21856
+ const sort = require_sort();
21857
+ const rsort = require_rsort();
21858
+ const gt = require_gt();
21859
+ const lt = require_lt();
21860
+ const eq = require_eq();
21861
+ const neq = require_neq();
21862
+ const gte = require_gte();
21863
+ const lte = require_lte();
21864
+ const cmp = require_cmp();
21865
+ const coerce = require_coerce();
21866
+ const Comparator = require_comparator();
21867
+ const Range = require_range();
21868
+ const satisfies = require_satisfies();
21869
+ const toComparators = require_to_comparators();
21870
+ const maxSatisfying = require_max_satisfying();
21871
+ const minSatisfying = require_min_satisfying();
21872
+ const minVersion = require_min_version();
21873
+ const validRange = require_valid$1();
21874
+ const outside = require_outside();
21875
+ const gtr = require_gtr();
21876
+ const ltr = require_ltr();
21877
+ const intersects = require_intersects();
21878
+ const simplifyRange = require_simplify();
21879
+ const subset = require_subset();
21880
+ module.exports = {
21881
+ parse,
21882
+ valid,
21883
+ clean,
21884
+ inc,
21885
+ diff,
21886
+ major,
21887
+ minor,
21888
+ patch,
21889
+ prerelease,
21890
+ compare,
21891
+ rcompare,
21892
+ compareLoose,
21893
+ compareBuild,
21894
+ sort,
21895
+ rsort,
21896
+ gt,
21897
+ lt,
21898
+ eq,
21899
+ neq,
21900
+ gte,
21901
+ lte,
21902
+ cmp,
21903
+ coerce,
21904
+ Comparator,
21905
+ Range,
21906
+ satisfies,
21907
+ toComparators,
21908
+ maxSatisfying,
21909
+ minSatisfying,
21910
+ minVersion,
21911
+ validRange,
21912
+ outside,
21913
+ gtr,
21914
+ ltr,
21915
+ intersects,
21916
+ simplifyRange,
21917
+ subset,
21918
+ SemVer,
21919
+ re: internalRe.re,
21920
+ src: internalRe.src,
21921
+ tokens: internalRe.t,
21922
+ SEMVER_SPEC_VERSION: constants$2.SEMVER_SPEC_VERSION,
21923
+ RELEASE_TYPES: constants$2.RELEASE_TYPES,
21924
+ compareIdentifiers: identifiers.compareIdentifiers,
21925
+ rcompareIdentifiers: identifiers.rcompareIdentifiers
21926
+ };
21927
+ } });
21928
+
21929
+ //#endregion
21930
+ //#region src/commands/doctor.ts
21931
+ var import_semver = __toESM(require_semver());
21932
+ /**
21933
+ * Checks if two versions (or version and range) are compatible.
21934
+ * @param versionA - First version or range string.
21935
+ * @param versionB - Second version or range string.
21936
+ * @returns True if compatible, false otherwise.
21937
+ */
21938
+ function areVersionsCompatible(versionA, versionB) {
21939
+ if (versionA === versionB) return true;
21940
+ const options = { includePrerelease: true };
21941
+ if (import_semver.valid(versionA) && import_semver.validRange(versionB) && import_semver.satisfies(versionA, versionB, options)) return true;
21942
+ if (import_semver.valid(versionB) && import_semver.validRange(versionA) && import_semver.satisfies(versionB, versionA, options)) return true;
21943
+ return false;
21944
+ }
21945
+ /**
21946
+ * Performs health check on Hot Updater installation
21947
+ * @param cwd - Current working directory (optional)
21948
+ * @returns true if everything is healthy, or DoctorResult with details if there are issues
21949
+ */
21950
+ async function doctor(cwd = getCwd()) {
21951
+ try {
21952
+ const packageResult = await readPackageUp({ cwd });
21953
+ if (!packageResult) return {
21954
+ success: false,
21955
+ error: "Could not find package.json"
21956
+ };
21957
+ const packageJson = packageResult.packageJson;
21958
+ const packageJsonPath = packageResult.path;
21959
+ const allDependencies = merge(packageJson.dependencies ?? {}, packageJson.devDependencies ?? {});
21960
+ const hotUpdaterVersion = allDependencies["hot-updater"];
21961
+ if (!hotUpdaterVersion) return {
21962
+ success: false,
21963
+ error: "hot-updater CLI not found. Please install it first."
21964
+ };
21965
+ const hotUpdaterPackages = Object.keys(allDependencies).filter((key) => key.startsWith("@hot-updater/"));
21966
+ const versionMismatches = [];
21967
+ for (const packageName of hotUpdaterPackages) {
21968
+ const currentVersion = allDependencies[packageName];
21969
+ if (hotUpdaterVersion && currentVersion && !areVersionsCompatible(currentVersion, hotUpdaterVersion)) versionMismatches.push({
21970
+ packageName,
21971
+ currentVersion,
21972
+ expectedVersion: hotUpdaterVersion
21973
+ });
21974
+ }
21975
+ const details = {
21976
+ hotUpdaterVersion,
21977
+ packageJsonPath,
21978
+ installedHotUpdaterPackages: hotUpdaterPackages
21979
+ };
21980
+ if (versionMismatches.length > 0) details.versionMismatches = versionMismatches;
21981
+ const hasIssues = versionMismatches.length > 0;
21982
+ if (hasIssues) return {
21983
+ success: false,
21984
+ details
21985
+ };
21986
+ return true;
21987
+ } catch (error) {
21988
+ return {
21989
+ success: false,
21990
+ error: error.message
21991
+ };
21992
+ }
21993
+ }
21994
+ /**
21995
+ * Fix version mismatches in package.json
21996
+ * This is a separate utility function for CLI usage
21997
+ */
21998
+ async function fixVersionMismatches(packageJsonPath, versionMismatches) {
21999
+ const packageResult = await fs.promises.readFile(packageJsonPath, "utf-8");
22000
+ if (!packageResult) throw new Error("Could not read package.json");
22001
+ const packageJson = JSON.parse(packageResult);
22002
+ for (const mismatch of versionMismatches) if (packageJson.dependencies?.[mismatch.packageName]) packageJson.dependencies[mismatch.packageName] = mismatch.expectedVersion;
22003
+ else if (packageJson.devDependencies?.[mismatch.packageName]) packageJson.devDependencies[mismatch.packageName] = mismatch.expectedVersion;
22004
+ const content = `${JSON.stringify(packageJson, null, 2)}\n`;
22005
+ await fs.promises.writeFile(packageJsonPath, content);
22006
+ }
22007
+ const handleDoctor = async ({ fix }) => {
22008
+ p$1.intro("Checking the health of Hot Updater.");
22009
+ const result = await doctor();
22010
+ if (result === true) {
22011
+ p$1.log.success("✅ All Hot Updater checks passed!");
22012
+ p$1.outro("Hot Updater is healthy.");
22013
+ return;
22014
+ }
22015
+ if (result.error) {
22016
+ p$1.log.error(result.error);
22017
+ p$1.outro("Doctor check failed.");
22018
+ return;
22019
+ }
22020
+ const { details } = result;
22021
+ if (details?.hotUpdaterVersion) p$1.log.info(`hot-updater CLI version: ${details.hotUpdaterVersion}`);
22022
+ if (details?.versionMismatches && details.versionMismatches.length > 0) {
22023
+ p$1.log.warn("Version mismatches found:");
22024
+ for (const mismatch of details.versionMismatches) p$1.log.error(`❌ ${mismatch.packageName}: ${mismatch.currentVersion} (expected ${mismatch.expectedVersion})`);
22025
+ if (fix && details.packageJsonPath) try {
22026
+ await fixVersionMismatches(details.packageJsonPath, details.versionMismatches);
22027
+ p$1.log.success("✅ Fixed version mismatches in package.json");
22028
+ p$1.log.info("Run your package manager to install the updated versions.");
22029
+ } catch (error) {
22030
+ p$1.log.error(`Failed to fix versions: ${error.message}`);
22031
+ }
22032
+ else if (!fix) {
22033
+ p$1.log.info("Run with --fix to automatically update versions.");
22034
+ process.exit(1);
22035
+ }
22036
+ }
22037
+ p$1.outro("Doctor check complete.");
22038
+ };
22039
+
22040
+ //#endregion
22041
+ //#region src/index.ts
22042
+ var import_picocolors = __toESM(require_picocolors());
22043
+ var import_valid = __toESM(require_valid$1());
22044
+ const DEFAULT_CHANNEL = "production";
22045
+ const program = new Command();
22046
+ program.name("hot-updater").description(banner(version)).version(version);
22047
+ program.command("init").description("Initialize Hot Updater").action(init);
22048
+ program.command("doctor").description("Check the health of Hot Updater").option("-f, --fix", "fix the issues", false).action(handleDoctor);
22049
+ const fingerprintCommand = program.command("fingerprint").description("Generate fingerprint");
22050
+ fingerprintCommand.action(handleFingerprint);
22051
+ fingerprintCommand.command("create").description("Create fingerprint").action(handleCreateFingerprint);
22052
+ const channelCommand = program.command("channel").description("Manage channels");
22053
+ channelCommand.action(handleChannel);
22054
+ channelCommand.command("set").description("Set the channel for Android (BuildConfig) and iOS (Info.plist)").argument("<channel>", "the channel to set").action(handleSetChannel);
21318
22055
  program.command("deploy").description("deploy a new version").addOption(new Option("-p, --platform <platform>", "specify the platform").choices(["ios", "android"])).addOption(new Option("-t, --target-app-version <targetAppVersion>", "specify the target app version (semver format e.g. 1.0.0, 1.x.x)").argParser((value) => {
21319
22056
  if (!(0, import_valid.default)(value)) {
21320
22057
  p.log.error("Invalid semver format (e.g. 1.0.0, 1.x.x)");
@@ -21332,9 +22069,8 @@ program.command("console").description("open the console").action(async () => {
21332
22069
  });
21333
22070
  });
21334
22071
  program.command("app-version").description("get the current app version").action(async () => {
21335
- const path$5 = getCwd();
21336
- const androidVersion = await getDefaultTargetAppVersion(path$5, "android");
21337
- const iosVersion = await getDefaultTargetAppVersion(path$5, "ios");
22072
+ const androidVersion = await getNativeAppVersion("android");
22073
+ const iosVersion = await getNativeAppVersion("ios");
21338
22074
  log.info(`Android version: ${androidVersion}`);
21339
22075
  log.info(`iOS version: ${iosVersion}`);
21340
22076
  });