hot-updater 0.23.0 → 0.23.1

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.
@@ -1,8 +1,11 @@
1
1
  import { createRequire } from "node:module";
2
+ import path from "node:path";
2
3
  import { colors, getCwd, loadConfig, p } from "@hot-updater/cli-tools";
3
- import path from "path";
4
+ import path$1 from "path";
4
5
  import fs from "fs";
5
6
  import { SourceSkips, createFingerprintAsync, diffFingerprintChangesAsync } from "@expo/fingerprint";
7
+ import fs$1 from "node:fs/promises";
8
+ import crypto from "node:crypto";
6
9
 
7
10
  //#region rolldown:runtime
8
11
  var __create = Object.create;
@@ -1478,7 +1481,7 @@ var AndroidConfigParser = class {
1478
1481
  parser;
1479
1482
  builder;
1480
1483
  constructor(customPaths) {
1481
- this.stringsXmlPaths = (customPaths || []).map((p$1) => path.isAbsolute(p$1) ? p$1 : path.join(getCwd(), p$1));
1484
+ this.stringsXmlPaths = (customPaths || []).map((p$1) => path$1.isAbsolute(p$1) ? p$1 : path$1.join(getCwd(), p$1));
1482
1485
  const options = {
1483
1486
  ignoreAttributes: false,
1484
1487
  attributeNamePrefix: "@_",
@@ -1497,10 +1500,10 @@ var AndroidConfigParser = class {
1497
1500
  });
1498
1501
  }
1499
1502
  async exists() {
1500
- return this.stringsXmlPaths.some((path$11) => fs.existsSync(path$11));
1503
+ return this.stringsXmlPaths.some((path$12) => fs.existsSync(path$12));
1501
1504
  }
1502
1505
  getExistingPaths() {
1503
- return this.stringsXmlPaths.filter((path$11) => fs.existsSync(path$11));
1506
+ return this.stringsXmlPaths.filter((path$12) => fs.existsSync(path$12));
1504
1507
  }
1505
1508
  async get(key) {
1506
1509
  const existingPaths = this.getExistingPaths();
@@ -1510,7 +1513,7 @@ var AndroidConfigParser = class {
1510
1513
  paths: []
1511
1514
  };
1512
1515
  for (const stringsXmlPath of existingPaths) {
1513
- const relativePath = path.relative(getCwd(), stringsXmlPath);
1516
+ const relativePath = path$1.relative(getCwd(), stringsXmlPath);
1514
1517
  searchedPaths.push(relativePath);
1515
1518
  try {
1516
1519
  const content = await fs.promises.readFile(stringsXmlPath, "utf-8");
@@ -1546,7 +1549,7 @@ var AndroidConfigParser = class {
1546
1549
  else result.resources.string = strings.length === 1 ? strings[0] : strings;
1547
1550
  const newContent = this.builder.build(result);
1548
1551
  await fs.promises.writeFile(stringsXmlPath, newContent, "utf-8");
1549
- updatedPaths.push(path.relative(getCwd(), stringsXmlPath));
1552
+ updatedPaths.push(path$1.relative(getCwd(), stringsXmlPath));
1550
1553
  } catch (error) {
1551
1554
  throw new Error(`Failed to remove key from strings.xml: ${error}`);
1552
1555
  }
@@ -1575,7 +1578,7 @@ var AndroidConfigParser = class {
1575
1578
  result.resources.string = strings.length === 1 ? strings[0] : strings;
1576
1579
  const newContent = this.builder.build(result);
1577
1580
  await fs.promises.writeFile(stringsXmlPath, newContent, "utf-8");
1578
- updatedPaths.push(path.relative(getCwd(), stringsXmlPath));
1581
+ updatedPaths.push(path$1.relative(getCwd(), stringsXmlPath));
1579
1582
  } catch (error) {
1580
1583
  throw new Error(`Failed to parse or update strings.xml: ${error}`);
1581
1584
  }
@@ -9098,7 +9101,7 @@ var IosConfigParser = class {
9098
9101
  this.plistPaths = customPaths || [];
9099
9102
  }
9100
9103
  getPlistPaths() {
9101
- return this.plistPaths.map((p$1) => path.isAbsolute(p$1) ? p$1 : path.join(getCwd(), p$1)).filter((p$1) => fs.existsSync(p$1));
9104
+ return this.plistPaths.map((p$1) => path$1.isAbsolute(p$1) ? p$1 : path$1.join(getCwd(), p$1)).filter((p$1) => fs.existsSync(p$1));
9102
9105
  }
9103
9106
  async exists() {
9104
9107
  return this.getPlistPaths().length > 0;
@@ -9111,7 +9114,7 @@ var IosConfigParser = class {
9111
9114
  paths: []
9112
9115
  };
9113
9116
  for (const plistFile of plistPaths) {
9114
- const relativePath = path.relative(getCwd(), plistFile);
9117
+ const relativePath = path$1.relative(getCwd(), plistFile);
9115
9118
  searchedPaths.push(relativePath);
9116
9119
  const plistXml = await fs.promises.readFile(plistFile, "utf-8");
9117
9120
  const plistObject = import_plist.default.parse(plistXml);
@@ -9134,7 +9137,7 @@ var IosConfigParser = class {
9134
9137
  if (plistPaths.length === 0) return { paths: [] };
9135
9138
  const updatedPaths = [];
9136
9139
  for (const plistFile of plistPaths) {
9137
- const relativePath = path.relative(getCwd(), plistFile);
9140
+ const relativePath = path$1.relative(getCwd(), plistFile);
9138
9141
  try {
9139
9142
  const plistXml = await fs.promises.readFile(plistFile, "utf-8");
9140
9143
  const plistObject = import_plist.default.parse(plistXml);
@@ -9160,7 +9163,7 @@ var IosConfigParser = class {
9160
9163
  }
9161
9164
  const updatedPaths = [];
9162
9165
  for (const plistFile of plistPaths) {
9163
- const relativePath = path.relative(getCwd(), plistFile);
9166
+ const relativePath = path$1.relative(getCwd(), plistFile);
9164
9167
  try {
9165
9168
  const plistXml = await fs.promises.readFile(plistFile, "utf-8");
9166
9169
  if (!plistXml.trim().startsWith("<?xml")) throw new Error("File does not appear to be valid XML: missing XML declaration");
@@ -9255,7 +9258,7 @@ var require_fs$3 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/fast-g
9255
9258
  var require_path = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/utils/path.js": ((exports) => {
9256
9259
  Object.defineProperty(exports, "__esModule", { value: true });
9257
9260
  const os$1 = __require("os");
9258
- const path$10 = __require("path");
9261
+ const path$11 = __require("path");
9259
9262
  const IS_WINDOWS_PLATFORM = os$1.platform() === "win32";
9260
9263
  const LEADING_DOT_SEGMENT_CHARACTERS_COUNT = 2;
9261
9264
  /**
@@ -9284,7 +9287,7 @@ var require_path = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/fast-g
9284
9287
  }
9285
9288
  exports.unixify = unixify;
9286
9289
  function makeAbsolute(cwd, filepath) {
9287
- return path$10.resolve(cwd, filepath);
9290
+ return path$11.resolve(cwd, filepath);
9288
9291
  }
9289
9292
  exports.makeAbsolute = makeAbsolute;
9290
9293
  function removeLeadingDotSegment(entry) {
@@ -10531,7 +10534,7 @@ var require_braces = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/brac
10531
10534
  //#endregion
10532
10535
  //#region ../../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/constants.js
10533
10536
  var require_constants$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/constants.js": ((exports, module) => {
10534
- const path$9 = __require("path");
10537
+ const path$10 = __require("path");
10535
10538
  const WIN_SLASH = "\\\\/";
10536
10539
  const WIN_NO_SLASH = `[^${WIN_SLASH}]`;
10537
10540
  /**
@@ -10656,7 +10659,7 @@ var require_constants$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm
10656
10659
  CHAR_UNDERSCORE: 95,
10657
10660
  CHAR_VERTICAL_LINE: 124,
10658
10661
  CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279,
10659
- SEP: path$9.sep,
10662
+ SEP: path$10.sep,
10660
10663
  extglobChars(chars$1) {
10661
10664
  return {
10662
10665
  "!": {
@@ -10695,7 +10698,7 @@ var require_constants$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm
10695
10698
  //#endregion
10696
10699
  //#region ../../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/utils.js
10697
10700
  var require_utils$2 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/utils.js": ((exports) => {
10698
- const path$8 = __require("path");
10701
+ const path$9 = __require("path");
10699
10702
  const win32 = process.platform === "win32";
10700
10703
  const { REGEX_BACKSLASH, REGEX_REMOVE_BACKSLASH, REGEX_SPECIAL_CHARS, REGEX_SPECIAL_CHARS_GLOBAL } = require_constants$1();
10701
10704
  exports.isObject = (val) => val !== null && typeof val === "object" && !Array.isArray(val);
@@ -10715,7 +10718,7 @@ var require_utils$2 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/pic
10715
10718
  };
10716
10719
  exports.isWindows = (options) => {
10717
10720
  if (options && typeof options.windows === "boolean") return options.windows;
10718
- return win32 === true || path$8.sep === "\\";
10721
+ return win32 === true || path$9.sep === "\\";
10719
10722
  };
10720
10723
  exports.escapeLast = (input, char, lastIdx) => {
10721
10724
  const idx = input.lastIndexOf(char, lastIdx);
@@ -11029,12 +11032,12 @@ var require_scan = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/picoma
11029
11032
  //#endregion
11030
11033
  //#region ../../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/parse.js
11031
11034
  var require_parse = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/parse.js": ((exports, module) => {
11032
- const constants$1 = require_constants$1();
11035
+ const constants$2 = require_constants$1();
11033
11036
  const utils$12 = require_utils$2();
11034
11037
  /**
11035
11038
  * Constants
11036
11039
  */
11037
- const { MAX_LENGTH, POSIX_REGEX_SOURCE, REGEX_NON_SPECIAL_CHARS, REGEX_SPECIAL_CHARS_BACKREF, REPLACEMENTS } = constants$1;
11040
+ const { MAX_LENGTH, POSIX_REGEX_SOURCE, REGEX_NON_SPECIAL_CHARS, REGEX_SPECIAL_CHARS_BACKREF, REPLACEMENTS } = constants$2;
11038
11041
  /**
11039
11042
  * Helpers
11040
11043
  */
@@ -11076,8 +11079,8 @@ var require_parse = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/picom
11076
11079
  const tokens = [bos];
11077
11080
  const capture = opts.capture ? "" : "?:";
11078
11081
  const win32$1 = utils$12.isWindows(options);
11079
- const PLATFORM_CHARS = constants$1.globChars(win32$1);
11080
- const EXTGLOB_CHARS = constants$1.extglobChars(PLATFORM_CHARS);
11082
+ const PLATFORM_CHARS = constants$2.globChars(win32$1);
11083
+ const EXTGLOB_CHARS = constants$2.extglobChars(PLATFORM_CHARS);
11081
11084
  const { DOT_LITERAL: DOT_LITERAL$1, PLUS_LITERAL: PLUS_LITERAL$1, SLASH_LITERAL: SLASH_LITERAL$1, ONE_CHAR: ONE_CHAR$1, DOTS_SLASH: DOTS_SLASH$1, NO_DOT, NO_DOT_SLASH, NO_DOTS_SLASH, QMARK: QMARK$1, QMARK_NO_DOT, STAR, START_ANCHOR: START_ANCHOR$1 } = PLATFORM_CHARS;
11082
11085
  const globstar = (opts$1) => {
11083
11086
  return `(${capture}(?:(?!${START_ANCHOR$1}${opts$1.dot ? DOTS_SLASH$1 : DOT_LITERAL$1}).)*?)`;
@@ -11848,7 +11851,7 @@ var require_parse = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/picom
11848
11851
  if (len$1 > max) throw new SyntaxError(`Input length: ${len$1}, exceeds maximum allowed length: ${max}`);
11849
11852
  input = REPLACEMENTS[input] || input;
11850
11853
  const win32$1 = utils$12.isWindows(options);
11851
- const { DOT_LITERAL: DOT_LITERAL$1, SLASH_LITERAL: SLASH_LITERAL$1, ONE_CHAR: ONE_CHAR$1, DOTS_SLASH: DOTS_SLASH$1, NO_DOT, NO_DOTS, NO_DOTS_SLASH, STAR, START_ANCHOR: START_ANCHOR$1 } = constants$1.globChars(win32$1);
11854
+ const { DOT_LITERAL: DOT_LITERAL$1, SLASH_LITERAL: SLASH_LITERAL$1, ONE_CHAR: ONE_CHAR$1, DOTS_SLASH: DOTS_SLASH$1, NO_DOT, NO_DOTS, NO_DOTS_SLASH, STAR, START_ANCHOR: START_ANCHOR$1 } = constants$2.globChars(win32$1);
11852
11855
  const nodot = opts.dot ? NO_DOTS : NO_DOT;
11853
11856
  const slashDot = opts.dot ? NO_DOTS_SLASH : NO_DOT;
11854
11857
  const capture = opts.capture ? "" : "?:";
@@ -11891,11 +11894,11 @@ var require_parse = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/picom
11891
11894
  //#endregion
11892
11895
  //#region ../../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/picomatch.js
11893
11896
  var require_picomatch$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/picomatch.js": ((exports, module) => {
11894
- const path$7 = __require("path");
11897
+ const path$8 = __require("path");
11895
11898
  const scan = require_scan();
11896
11899
  const parse = require_parse();
11897
11900
  const utils$11 = require_utils$2();
11898
- const constants = require_constants$1();
11901
+ const constants$1 = require_constants$1();
11899
11902
  const isObject = (val) => val && typeof val === "object" && !Array.isArray(val);
11900
11903
  /**
11901
11904
  * Creates a matcher function from one or more glob patterns. The
@@ -12030,7 +12033,7 @@ var require_picomatch$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm
12030
12033
  * @api public
12031
12034
  */
12032
12035
  picomatch$1.matchBase = (input, glob, options, posix = utils$11.isWindows(options)) => {
12033
- return (glob instanceof RegExp ? glob : picomatch$1.makeRe(glob, options)).test(path$7.basename(input));
12036
+ return (glob instanceof RegExp ? glob : picomatch$1.makeRe(glob, options)).test(path$8.basename(input));
12034
12037
  };
12035
12038
  /**
12036
12039
  * Returns true if **any** of the given glob `patterns` match the specified `string`.
@@ -12175,7 +12178,7 @@ var require_picomatch$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm
12175
12178
  * Picomatch constants.
12176
12179
  * @return {Object}
12177
12180
  */
12178
- picomatch$1.constants = constants;
12181
+ picomatch$1.constants = constants$1;
12179
12182
  /**
12180
12183
  * Expose "picomatch"
12181
12184
  */
@@ -12587,7 +12590,7 @@ var require_micromatch = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/
12587
12590
  //#region ../../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/utils/pattern.js
12588
12591
  var require_pattern = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/utils/pattern.js": ((exports) => {
12589
12592
  Object.defineProperty(exports, "__esModule", { value: true });
12590
- const path$6 = __require("path");
12593
+ const path$7 = __require("path");
12591
12594
  const globParent = require_glob_parent();
12592
12595
  const micromatch = require_micromatch();
12593
12596
  const GLOBSTAR = "**";
@@ -12695,7 +12698,7 @@ var require_pattern = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/fas
12695
12698
  }
12696
12699
  exports.endsWithSlashGlobStar = endsWithSlashGlobStar;
12697
12700
  function isAffectDepthOfReadingPattern(pattern$1) {
12698
- const basename = path$6.basename(pattern$1);
12701
+ const basename = path$7.basename(pattern$1);
12699
12702
  return endsWithSlashGlobStar(pattern$1) || isStaticPattern(basename);
12700
12703
  }
12701
12704
  exports.isAffectDepthOfReadingPattern = isAffectDepthOfReadingPattern;
@@ -12769,7 +12772,7 @@ var require_pattern = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/fas
12769
12772
  }
12770
12773
  exports.partitionAbsoluteAndRelative = partitionAbsoluteAndRelative;
12771
12774
  function isAbsolute(pattern$1) {
12772
- return path$6.isAbsolute(pattern$1);
12775
+ return path$7.isAbsolute(pattern$1);
12773
12776
  }
12774
12777
  exports.isAbsolute = isAbsolute;
12775
12778
  }) });
@@ -12897,10 +12900,10 @@ var require_utils$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/fas
12897
12900
  exports.array = array;
12898
12901
  const errno = require_errno();
12899
12902
  exports.errno = errno;
12900
- const fs$7 = require_fs$3();
12901
- exports.fs = fs$7;
12902
- const path$5 = require_path();
12903
- exports.path = path$5;
12903
+ const fs$8 = require_fs$3();
12904
+ exports.fs = fs$8;
12905
+ const path$6 = require_path();
12906
+ exports.path = path$6;
12904
12907
  const pattern = require_pattern();
12905
12908
  exports.pattern = pattern;
12906
12909
  const stream = require_stream$3();
@@ -13007,8 +13010,8 @@ var require_tasks = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/fast-
13007
13010
  //#region ../../node_modules/.pnpm/@nodelib+fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/providers/async.js
13008
13011
  var require_async$5 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@nodelib+fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/providers/async.js": ((exports) => {
13009
13012
  Object.defineProperty(exports, "__esModule", { value: true });
13010
- function read$3(path$11, settings, callback) {
13011
- settings.fs.lstat(path$11, (lstatError, lstat) => {
13013
+ function read$3(path$12, settings, callback) {
13014
+ settings.fs.lstat(path$12, (lstatError, lstat) => {
13012
13015
  if (lstatError !== null) {
13013
13016
  callFailureCallback$2(callback, lstatError);
13014
13017
  return;
@@ -13017,7 +13020,7 @@ var require_async$5 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@no
13017
13020
  callSuccessCallback$2(callback, lstat);
13018
13021
  return;
13019
13022
  }
13020
- settings.fs.stat(path$11, (statError, stat$1) => {
13023
+ settings.fs.stat(path$12, (statError, stat$1) => {
13021
13024
  if (statError !== null) {
13022
13025
  if (settings.throwErrorOnBrokenSymbolicLink) {
13023
13026
  callFailureCallback$2(callback, statError);
@@ -13044,11 +13047,11 @@ var require_async$5 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@no
13044
13047
  //#region ../../node_modules/.pnpm/@nodelib+fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/providers/sync.js
13045
13048
  var require_sync$5 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@nodelib+fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/providers/sync.js": ((exports) => {
13046
13049
  Object.defineProperty(exports, "__esModule", { value: true });
13047
- function read$2(path$11, settings) {
13048
- const lstat = settings.fs.lstatSync(path$11);
13050
+ function read$2(path$12, settings) {
13051
+ const lstat = settings.fs.lstatSync(path$12);
13049
13052
  if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) return lstat;
13050
13053
  try {
13051
- const stat$1 = settings.fs.statSync(path$11);
13054
+ const stat$1 = settings.fs.statSync(path$12);
13052
13055
  if (settings.markSymbolicLink) stat$1.isSymbolicLink = () => true;
13053
13056
  return stat$1;
13054
13057
  } catch (error) {
@@ -13064,12 +13067,12 @@ var require_sync$5 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@nod
13064
13067
  var require_fs$2 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@nodelib+fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/adapters/fs.js": ((exports) => {
13065
13068
  Object.defineProperty(exports, "__esModule", { value: true });
13066
13069
  exports.createFileSystemAdapter = exports.FILE_SYSTEM_ADAPTER = void 0;
13067
- const fs$6 = __require("fs");
13070
+ const fs$7 = __require("fs");
13068
13071
  exports.FILE_SYSTEM_ADAPTER = {
13069
- lstat: fs$6.lstat,
13070
- stat: fs$6.stat,
13071
- lstatSync: fs$6.lstatSync,
13072
- statSync: fs$6.statSync
13072
+ lstat: fs$7.lstat,
13073
+ stat: fs$7.stat,
13074
+ lstatSync: fs$7.lstatSync,
13075
+ statSync: fs$7.statSync
13073
13076
  };
13074
13077
  function createFileSystemAdapter$1(fsMethods) {
13075
13078
  if (fsMethods === void 0) return exports.FILE_SYSTEM_ADAPTER;
@@ -13082,12 +13085,12 @@ var require_fs$2 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@nodel
13082
13085
  //#region ../../node_modules/.pnpm/@nodelib+fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/settings.js
13083
13086
  var require_settings$3 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@nodelib+fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/settings.js": ((exports) => {
13084
13087
  Object.defineProperty(exports, "__esModule", { value: true });
13085
- const fs$5 = require_fs$2();
13088
+ const fs$6 = require_fs$2();
13086
13089
  var Settings$3 = class {
13087
13090
  constructor(_options = {}) {
13088
13091
  this._options = _options;
13089
13092
  this.followSymbolicLink = this._getValue(this._options.followSymbolicLink, true);
13090
- this.fs = fs$5.createFileSystemAdapter(this._options.fs);
13093
+ this.fs = fs$6.createFileSystemAdapter(this._options.fs);
13091
13094
  this.markSymbolicLink = this._getValue(this._options.markSymbolicLink, false);
13092
13095
  this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true);
13093
13096
  }
@@ -13106,17 +13109,17 @@ var require_out$3 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@node
13106
13109
  const sync$1 = require_sync$5();
13107
13110
  const settings_1$3 = require_settings$3();
13108
13111
  exports.Settings = settings_1$3.default;
13109
- function stat(path$11, optionsOrSettingsOrCallback, callback) {
13112
+ function stat(path$12, optionsOrSettingsOrCallback, callback) {
13110
13113
  if (typeof optionsOrSettingsOrCallback === "function") {
13111
- async$1.read(path$11, getSettings$2(), optionsOrSettingsOrCallback);
13114
+ async$1.read(path$12, getSettings$2(), optionsOrSettingsOrCallback);
13112
13115
  return;
13113
13116
  }
13114
- async$1.read(path$11, getSettings$2(optionsOrSettingsOrCallback), callback);
13117
+ async$1.read(path$12, getSettings$2(optionsOrSettingsOrCallback), callback);
13115
13118
  }
13116
13119
  exports.stat = stat;
13117
- function statSync(path$11, optionsOrSettings) {
13120
+ function statSync(path$12, optionsOrSettings) {
13118
13121
  const settings = getSettings$2(optionsOrSettings);
13119
- return sync$1.read(path$11, settings);
13122
+ return sync$1.read(path$12, settings);
13120
13123
  }
13121
13124
  exports.statSync = statSync;
13122
13125
  function getSettings$2(settingsOrOptions = {}) {
@@ -13223,8 +13226,8 @@ var require_fs$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@nodel
13223
13226
  //#region ../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/utils/index.js
13224
13227
  var require_utils = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/utils/index.js": ((exports) => {
13225
13228
  Object.defineProperty(exports, "__esModule", { value: true });
13226
- const fs$4 = require_fs$1();
13227
- exports.fs = fs$4;
13229
+ const fs$5 = require_fs$1();
13230
+ exports.fs = fs$5;
13228
13231
  }) });
13229
13232
 
13230
13233
  //#endregion
@@ -13310,16 +13313,16 @@ var require_async$4 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@no
13310
13313
  return;
13311
13314
  }
13312
13315
  rpl(names.map((name) => {
13313
- const path$11 = common$4.joinPathSegments(directory, name, settings.pathSegmentSeparator);
13316
+ const path$12 = common$4.joinPathSegments(directory, name, settings.pathSegmentSeparator);
13314
13317
  return (done) => {
13315
- fsStat$5.stat(path$11, settings.fsStatSettings, (error, stats) => {
13318
+ fsStat$5.stat(path$12, settings.fsStatSettings, (error, stats) => {
13316
13319
  if (error !== null) {
13317
13320
  done(error);
13318
13321
  return;
13319
13322
  }
13320
13323
  const entry = {
13321
13324
  name,
13322
- path: path$11,
13325
+ path: path$12,
13323
13326
  dirent: utils$8.fs.createDirentFromStats(name, stats)
13324
13327
  };
13325
13328
  if (settings.stats) entry.stats = stats;
@@ -13395,14 +13398,14 @@ var require_sync$4 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@nod
13395
13398
  var require_fs = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/adapters/fs.js": ((exports) => {
13396
13399
  Object.defineProperty(exports, "__esModule", { value: true });
13397
13400
  exports.createFileSystemAdapter = exports.FILE_SYSTEM_ADAPTER = void 0;
13398
- const fs$3 = __require("fs");
13401
+ const fs$4 = __require("fs");
13399
13402
  exports.FILE_SYSTEM_ADAPTER = {
13400
- lstat: fs$3.lstat,
13401
- stat: fs$3.stat,
13402
- lstatSync: fs$3.lstatSync,
13403
- statSync: fs$3.statSync,
13404
- readdir: fs$3.readdir,
13405
- readdirSync: fs$3.readdirSync
13403
+ lstat: fs$4.lstat,
13404
+ stat: fs$4.stat,
13405
+ lstatSync: fs$4.lstatSync,
13406
+ statSync: fs$4.statSync,
13407
+ readdir: fs$4.readdir,
13408
+ readdirSync: fs$4.readdirSync
13406
13409
  };
13407
13410
  function createFileSystemAdapter(fsMethods) {
13408
13411
  if (fsMethods === void 0) return exports.FILE_SYSTEM_ADAPTER;
@@ -13415,15 +13418,15 @@ var require_fs = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@nodelib
13415
13418
  //#region ../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/settings.js
13416
13419
  var require_settings$2 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/settings.js": ((exports) => {
13417
13420
  Object.defineProperty(exports, "__esModule", { value: true });
13418
- const path$4 = __require("path");
13421
+ const path$5 = __require("path");
13419
13422
  const fsStat$3 = require_out$3();
13420
- const fs$2 = require_fs();
13423
+ const fs$3 = require_fs();
13421
13424
  var Settings$2 = class {
13422
13425
  constructor(_options = {}) {
13423
13426
  this._options = _options;
13424
13427
  this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, false);
13425
- this.fs = fs$2.createFileSystemAdapter(this._options.fs);
13426
- this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path$4.sep);
13428
+ this.fs = fs$3.createFileSystemAdapter(this._options.fs);
13429
+ this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path$5.sep);
13427
13430
  this.stats = this._getValue(this._options.stats, false);
13428
13431
  this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true);
13429
13432
  this.fsStatSettings = new fsStat$3.Settings({
@@ -13447,17 +13450,17 @@ var require_out$2 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@node
13447
13450
  const sync = require_sync$4();
13448
13451
  const settings_1$2 = require_settings$2();
13449
13452
  exports.Settings = settings_1$2.default;
13450
- function scandir(path$11, optionsOrSettingsOrCallback, callback) {
13453
+ function scandir(path$12, optionsOrSettingsOrCallback, callback) {
13451
13454
  if (typeof optionsOrSettingsOrCallback === "function") {
13452
- async.read(path$11, getSettings$1(), optionsOrSettingsOrCallback);
13455
+ async.read(path$12, getSettings$1(), optionsOrSettingsOrCallback);
13453
13456
  return;
13454
13457
  }
13455
- async.read(path$11, getSettings$1(optionsOrSettingsOrCallback), callback);
13458
+ async.read(path$12, getSettings$1(optionsOrSettingsOrCallback), callback);
13456
13459
  }
13457
13460
  exports.scandir = scandir;
13458
- function scandirSync(path$11, optionsOrSettings) {
13461
+ function scandirSync(path$12, optionsOrSettings) {
13459
13462
  const settings = getSettings$1(optionsOrSettings);
13460
- return sync.read(path$11, settings);
13463
+ return sync.read(path$12, settings);
13461
13464
  }
13462
13465
  exports.scandirSync = scandirSync;
13463
13466
  function getSettings$1(settingsOrOptions = {}) {
@@ -14002,7 +14005,7 @@ var require_sync$2 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@nod
14002
14005
  //#region ../../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/settings.js
14003
14006
  var require_settings$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/settings.js": ((exports) => {
14004
14007
  Object.defineProperty(exports, "__esModule", { value: true });
14005
- const path$3 = __require("path");
14008
+ const path$4 = __require("path");
14006
14009
  const fsScandir = require_out$2();
14007
14010
  var Settings$1 = class {
14008
14011
  constructor(_options = {}) {
@@ -14012,7 +14015,7 @@ var require_settings$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/
14012
14015
  this.deepFilter = this._getValue(this._options.deepFilter, null);
14013
14016
  this.entryFilter = this._getValue(this._options.entryFilter, null);
14014
14017
  this.errorFilter = this._getValue(this._options.errorFilter, null);
14015
- this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path$3.sep);
14018
+ this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path$4.sep);
14016
14019
  this.fsScandirSettings = new fsScandir.Settings({
14017
14020
  followSymbolicLinks: this._options.followSymbolicLinks,
14018
14021
  fs: this._options.fs,
@@ -14065,7 +14068,7 @@ var require_out$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@node
14065
14068
  //#region ../../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/readers/reader.js
14066
14069
  var require_reader = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/readers/reader.js": ((exports) => {
14067
14070
  Object.defineProperty(exports, "__esModule", { value: true });
14068
- const path$2 = __require("path");
14071
+ const path$3 = __require("path");
14069
14072
  const fsStat$2 = require_out$3();
14070
14073
  const utils$6 = require_utils$1();
14071
14074
  var Reader = class {
@@ -14078,7 +14081,7 @@ var require_reader = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/fast
14078
14081
  });
14079
14082
  }
14080
14083
  _getFullEntryPath(filepath) {
14081
- return path$2.resolve(this._settings.cwd, filepath);
14084
+ return path$3.resolve(this._settings.cwd, filepath);
14082
14085
  }
14083
14086
  _makeEntry(stats, pattern$1) {
14084
14087
  const entry = {
@@ -14422,7 +14425,7 @@ var require_entry = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/fast-
14422
14425
  //#region ../../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/providers/provider.js
14423
14426
  var require_provider = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/providers/provider.js": ((exports) => {
14424
14427
  Object.defineProperty(exports, "__esModule", { value: true });
14425
- const path$1 = __require("path");
14428
+ const path$2 = __require("path");
14426
14429
  const deep_1 = require_deep();
14427
14430
  const entry_1 = require_entry$1();
14428
14431
  const error_1 = require_error();
@@ -14436,7 +14439,7 @@ var require_provider = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/fa
14436
14439
  this.entryTransformer = new entry_2.default(this._settings);
14437
14440
  }
14438
14441
  _getRootDirectory(task) {
14439
- return path$1.resolve(this._settings.cwd, task.base);
14442
+ return path$2.resolve(this._settings.cwd, task.base);
14440
14443
  }
14441
14444
  _getReaderOptions(task) {
14442
14445
  const basePath = task.base === "." ? "" : task.base;
@@ -14597,7 +14600,7 @@ var require_sync = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/fast-g
14597
14600
  var require_settings = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/settings.js": ((exports) => {
14598
14601
  Object.defineProperty(exports, "__esModule", { value: true });
14599
14602
  exports.DEFAULT_FILE_SYSTEM_ADAPTER = void 0;
14600
- const fs$1 = __require("fs");
14603
+ const fs$2 = __require("fs");
14601
14604
  const os = __require("os");
14602
14605
  /**
14603
14606
  * The `os.cpus` method can return zero. We expect the number of cores to be greater than zero.
@@ -14605,12 +14608,12 @@ var require_settings = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/fa
14605
14608
  */
14606
14609
  const CPU_COUNT = Math.max(os.cpus().length, 1);
14607
14610
  exports.DEFAULT_FILE_SYSTEM_ADAPTER = {
14608
- lstat: fs$1.lstat,
14609
- lstatSync: fs$1.lstatSync,
14610
- stat: fs$1.stat,
14611
- statSync: fs$1.statSync,
14612
- readdir: fs$1.readdir,
14613
- readdirSync: fs$1.readdirSync
14611
+ lstat: fs$2.lstat,
14612
+ lstatSync: fs$2.lstatSync,
14613
+ stat: fs$2.stat,
14614
+ statSync: fs$2.statSync,
14615
+ readdir: fs$2.readdir,
14616
+ readdirSync: fs$2.readdirSync
14614
14617
  };
14615
14618
  var Settings = class {
14616
14619
  constructor(_options = {}) {
@@ -14768,7 +14771,7 @@ function processExtraSources(extraSources, cwd) {
14768
14771
  });
14769
14772
  for (const absolutePath of matches) if (fs.existsSync(absolutePath)) {
14770
14773
  const stats = fs.statSync(absolutePath);
14771
- const relativePath = path.relative(cwd, absolutePath);
14774
+ const relativePath = path$1.relative(cwd, absolutePath);
14772
14775
  if (stats.isDirectory()) processedSources.push({
14773
14776
  type: "dir",
14774
14777
  filePath: relativePath,
@@ -14816,7 +14819,7 @@ function getDefaultIgnorePaths() {
14816
14819
  "**/build/"
14817
14820
  ];
14818
14821
  }
14819
- function getOtaFingerprintOptions(platform, path$11, options) {
14822
+ function getOtaFingerprintOptions(platform, path$12, options) {
14820
14823
  return {
14821
14824
  useRNCoreAutolinkingFromExpo: false,
14822
14825
  platforms: [platform],
@@ -14857,7 +14860,7 @@ function getOtaFingerprintOptions(platform, path$11, options) {
14857
14860
  ...options.ignorePaths ?? []
14858
14861
  ],
14859
14862
  sourceSkips: SourceSkips.GitIgnore | SourceSkips.PackageJsonScriptsAll | SourceSkips.PackageJsonAndroidAndIosScriptsIfNotContainRun | SourceSkips.ExpoConfigAll | SourceSkips.ExpoConfigVersions | SourceSkips.ExpoConfigNames | SourceSkips.ExpoConfigRuntimeVersionIfString | SourceSkips.ExpoConfigAssets | SourceSkips.ExpoConfigExtraSection | SourceSkips.ExpoConfigEASProject | SourceSkips.ExpoConfigSchemes,
14860
- extraSources: processExtraSources(options.extraSources ?? [], path$11),
14863
+ extraSources: processExtraSources(options.extraSources ?? [], path$12),
14861
14864
  debug: options.debug
14862
14865
  };
14863
14866
  }
@@ -14897,9 +14900,9 @@ function showFingerprintDiff(diff, platform) {
14897
14900
  /**
14898
14901
  * Calculates the fingerprint of the native parts project of the project.
14899
14902
  */
14900
- async function nativeFingerprint(path$11, options) {
14903
+ async function nativeFingerprint(path$12, options) {
14901
14904
  const platform = options.platform;
14902
- return createFingerprintAsync(path$11, getOtaFingerprintOptions(platform, path$11, options));
14905
+ return createFingerprintAsync(path$12, getOtaFingerprintOptions(platform, path$12, options));
14903
14906
  }
14904
14907
  const generateFingerprints = async () => {
14905
14908
  const fingerprintConfig = await ensureFingerprintConfig();
@@ -14957,12 +14960,12 @@ const createAndInjectFingerprintFiles = async ({ platform } = {}) => {
14957
14960
  };
14958
14961
  };
14959
14962
  const createFingerprintJSON = async (fingerprint) => {
14960
- const FINGERPRINT_FILE_PATH = path.join(getCwd(), "fingerprint.json");
14963
+ const FINGERPRINT_FILE_PATH = path$1.join(getCwd(), "fingerprint.json");
14961
14964
  await fs.promises.writeFile(FINGERPRINT_FILE_PATH, JSON.stringify(fingerprint, null, 2));
14962
14965
  return fingerprint;
14963
14966
  };
14964
14967
  const readLocalFingerprint = async () => {
14965
- const FINGERPRINT_FILE_PATH = path.join(getCwd(), "fingerprint.json");
14968
+ const FINGERPRINT_FILE_PATH = path$1.join(getCwd(), "fingerprint.json");
14966
14969
  try {
14967
14970
  const content = await fs.promises.readFile(FINGERPRINT_FILE_PATH, "utf-8");
14968
14971
  return JSON.parse(content);
@@ -14972,4 +14975,72 @@ const readLocalFingerprint = async () => {
14972
14975
  };
14973
14976
 
14974
14977
  //#endregion
14975
- export { __toESM as _, nativeFingerprint as a, showFingerprintDiff as c, IosConfigParser as d, require_plist as f, __require as g, __commonJS as h, generateFingerprints as i, isFingerprintEquals as l, AndroidConfigParser as m, createFingerprintJSON as n, readLocalFingerprint as o, require_base64_js as p, generateFingerprint as r, getFingerprintDiff as s, createAndInjectFingerprintFiles as t, require_out as u };
14978
+ //#region src/utils/signing/keyGeneration.ts
14979
+ /**
14980
+ * Generate RSA key pair for bundle signing.
14981
+ * @param keySize Key size in bits (2048 or 4096)
14982
+ * @returns Promise resolving to key pair in PEM format
14983
+ */
14984
+ async function generateKeyPair(keySize = 4096) {
14985
+ return new Promise((resolve, reject) => {
14986
+ crypto.generateKeyPair("rsa", {
14987
+ modulusLength: keySize,
14988
+ publicKeyEncoding: {
14989
+ type: "spki",
14990
+ format: "pem"
14991
+ },
14992
+ privateKeyEncoding: {
14993
+ type: "pkcs8",
14994
+ format: "pem"
14995
+ }
14996
+ }, (err, publicKey, privateKey) => {
14997
+ if (err) reject(err);
14998
+ else resolve({
14999
+ privateKey,
15000
+ publicKey
15001
+ });
15002
+ });
15003
+ });
15004
+ }
15005
+ /**
15006
+ * Save key pair to disk with secure permissions.
15007
+ * @param keyPair Generated key pair
15008
+ * @param outputDir Directory to save keys
15009
+ */
15010
+ async function saveKeyPair(keyPair, outputDir) {
15011
+ await fs$1.mkdir(outputDir, { recursive: true });
15012
+ const privateKeyPath = path.join(outputDir, "private-key.pem");
15013
+ const publicKeyPath = path.join(outputDir, "public-key.pem");
15014
+ await fs$1.writeFile(privateKeyPath, keyPair.privateKey, { mode: 384 });
15015
+ await fs$1.writeFile(publicKeyPath, keyPair.publicKey, { mode: 420 });
15016
+ }
15017
+ /**
15018
+ * Load private key from PEM file.
15019
+ * @param privateKeyPath Path to private key file
15020
+ * @returns Private key in PEM format
15021
+ * @throws Error if file not found or invalid format
15022
+ */
15023
+ async function loadPrivateKey(privateKeyPath) {
15024
+ try {
15025
+ const privateKey = await fs$1.readFile(privateKeyPath, "utf-8");
15026
+ crypto.createPrivateKey(privateKey);
15027
+ return privateKey;
15028
+ } catch (error) {
15029
+ throw new Error(`Failed to load private key from ${privateKeyPath}: ${error.message}`);
15030
+ }
15031
+ }
15032
+ /**
15033
+ * Extract public key from private key.
15034
+ * @param privateKeyPEM Private key in PEM format
15035
+ * @returns Public key in PEM format
15036
+ */
15037
+ function getPublicKeyFromPrivate(privateKeyPEM) {
15038
+ const privateKey = crypto.createPrivateKey(privateKeyPEM);
15039
+ return crypto.createPublicKey(privateKey).export({
15040
+ type: "spki",
15041
+ format: "pem"
15042
+ });
15043
+ }
15044
+
15045
+ //#endregion
15046
+ export { require_base64_js as _, createAndInjectFingerprintFiles as a, __require as b, generateFingerprints as c, getFingerprintDiff as d, showFingerprintDiff as f, require_plist as g, IosConfigParser as h, saveKeyPair as i, nativeFingerprint as l, require_out as m, getPublicKeyFromPrivate as n, createFingerprintJSON as o, isFingerprintEquals as p, loadPrivateKey as r, generateFingerprint as s, generateKeyPair as t, readLocalFingerprint as u, AndroidConfigParser as v, __toESM as x, __commonJS as y };