hot-updater 0.22.2 → 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,4 +1,6 @@
1
1
  const require_chunk = require('./chunk-DWy1uDak.cjs');
2
+ let node_path = require("node:path");
3
+ node_path = require_chunk.__toESM(node_path);
2
4
  let __hot_updater_cli_tools = require("@hot-updater/cli-tools");
3
5
  __hot_updater_cli_tools = require_chunk.__toESM(__hot_updater_cli_tools);
4
6
  let path = require("path");
@@ -7,6 +9,10 @@ let fs = require("fs");
7
9
  fs = require_chunk.__toESM(fs);
8
10
  let __expo_fingerprint = require("@expo/fingerprint");
9
11
  __expo_fingerprint = require_chunk.__toESM(__expo_fingerprint);
12
+ let node_fs_promises = require("node:fs/promises");
13
+ node_fs_promises = require_chunk.__toESM(node_fs_promises);
14
+ let node_crypto = require("node:crypto");
15
+ node_crypto = require_chunk.__toESM(node_crypto);
10
16
 
11
17
  //#region ../../node_modules/.pnpm/fast-xml-parser@5.2.3/node_modules/fast-xml-parser/src/util.js
12
18
  const nameStartChar$1 = ":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD";
@@ -1474,10 +1480,10 @@ var AndroidConfigParser = class {
1474
1480
  });
1475
1481
  }
1476
1482
  async exists() {
1477
- return this.stringsXmlPaths.some((path$15) => fs.default.existsSync(path$15));
1483
+ return this.stringsXmlPaths.some((path$16) => fs.default.existsSync(path$16));
1478
1484
  }
1479
1485
  getExistingPaths() {
1480
- return this.stringsXmlPaths.filter((path$15) => fs.default.existsSync(path$15));
1486
+ return this.stringsXmlPaths.filter((path$16) => fs.default.existsSync(path$16));
1481
1487
  }
1482
1488
  async get(key) {
1483
1489
  const existingPaths = this.getExistingPaths();
@@ -1507,6 +1513,28 @@ var AndroidConfigParser = class {
1507
1513
  paths: searchedPaths
1508
1514
  };
1509
1515
  }
1516
+ async remove(key) {
1517
+ const existingPaths = this.getExistingPaths();
1518
+ if (existingPaths.length === 0) return { paths: [] };
1519
+ const updatedPaths = [];
1520
+ for (const stringsXmlPath of existingPaths) try {
1521
+ const content = await fs.default.promises.readFile(stringsXmlPath, "utf-8");
1522
+ const result = this.parser.parse(content);
1523
+ if (!result.resources.string) continue;
1524
+ const strings = Array.isArray(result.resources.string) ? result.resources.string : [result.resources.string];
1525
+ const existingIndex = strings.findIndex((str) => str["@_name"] === key && str["@_moduleConfig"] === "true");
1526
+ if (existingIndex === -1) continue;
1527
+ strings.splice(existingIndex, 1);
1528
+ if (strings.length === 0) result.resources.string = void 0;
1529
+ else result.resources.string = strings.length === 1 ? strings[0] : strings;
1530
+ const newContent = this.builder.build(result);
1531
+ await fs.default.promises.writeFile(stringsXmlPath, newContent, "utf-8");
1532
+ updatedPaths.push(path.default.relative((0, __hot_updater_cli_tools.getCwd)(), stringsXmlPath));
1533
+ } catch (error) {
1534
+ throw new Error(`Failed to remove key from strings.xml: ${error}`);
1535
+ }
1536
+ return { paths: updatedPaths };
1537
+ }
1510
1538
  async set(key, value) {
1511
1539
  const existingPaths = this.getExistingPaths();
1512
1540
  if (existingPaths.length === 0) {
@@ -9084,6 +9112,29 @@ var IosConfigParser = class {
9084
9112
  paths: searchedPaths
9085
9113
  };
9086
9114
  }
9115
+ async remove(key) {
9116
+ const plistPaths = this.getPlistPaths();
9117
+ if (plistPaths.length === 0) return { paths: [] };
9118
+ const updatedPaths = [];
9119
+ for (const plistFile of plistPaths) {
9120
+ const relativePath = path.default.relative((0, __hot_updater_cli_tools.getCwd)(), plistFile);
9121
+ try {
9122
+ const plistXml = await fs.default.promises.readFile(plistFile, "utf-8");
9123
+ const plistObject = import_plist.default.parse(plistXml);
9124
+ if (!(key in plistObject)) continue;
9125
+ delete plistObject[key];
9126
+ const newPlistXml = import_plist.default.build(plistObject, {
9127
+ indent: " ",
9128
+ pretty: true
9129
+ });
9130
+ await fs.default.promises.writeFile(plistFile, newPlistXml);
9131
+ updatedPaths.push(relativePath);
9132
+ } catch (error) {
9133
+ throw new Error(`Failed to remove key from Info.plist at '${relativePath}': ${error instanceof Error ? error.message : String(error)}`);
9134
+ }
9135
+ }
9136
+ return { paths: updatedPaths };
9137
+ }
9087
9138
  async set(key, value) {
9088
9139
  const plistPaths = this.getPlistPaths();
9089
9140
  if (plistPaths.length === 0) {
@@ -9187,7 +9238,7 @@ var require_fs$3 = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_module
9187
9238
  var require_path = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/utils/path.js": ((exports) => {
9188
9239
  Object.defineProperty(exports, "__esModule", { value: true });
9189
9240
  const os$1 = require("os");
9190
- const path$12 = require("path");
9241
+ const path$13 = require("path");
9191
9242
  const IS_WINDOWS_PLATFORM = os$1.platform() === "win32";
9192
9243
  const LEADING_DOT_SEGMENT_CHARACTERS_COUNT = 2;
9193
9244
  /**
@@ -9216,7 +9267,7 @@ var require_path = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_module
9216
9267
  }
9217
9268
  exports.unixify = unixify;
9218
9269
  function makeAbsolute(cwd, filepath) {
9219
- return path$12.resolve(cwd, filepath);
9270
+ return path$13.resolve(cwd, filepath);
9220
9271
  }
9221
9272
  exports.makeAbsolute = makeAbsolute;
9222
9273
  function removeLeadingDotSegment(entry) {
@@ -10463,7 +10514,7 @@ var require_braces = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_modu
10463
10514
  //#endregion
10464
10515
  //#region ../../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/constants.js
10465
10516
  var require_constants$1 = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/constants.js": ((exports, module) => {
10466
- const path$11 = require("path");
10517
+ const path$12 = require("path");
10467
10518
  const WIN_SLASH = "\\\\/";
10468
10519
  const WIN_NO_SLASH = `[^${WIN_SLASH}]`;
10469
10520
  /**
@@ -10588,7 +10639,7 @@ var require_constants$1 = /* @__PURE__ */ require_chunk.__commonJS({ "../../node
10588
10639
  CHAR_UNDERSCORE: 95,
10589
10640
  CHAR_VERTICAL_LINE: 124,
10590
10641
  CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279,
10591
- SEP: path$11.sep,
10642
+ SEP: path$12.sep,
10592
10643
  extglobChars(chars$1) {
10593
10644
  return {
10594
10645
  "!": {
@@ -10627,7 +10678,7 @@ var require_constants$1 = /* @__PURE__ */ require_chunk.__commonJS({ "../../node
10627
10678
  //#endregion
10628
10679
  //#region ../../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/utils.js
10629
10680
  var require_utils$2 = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/utils.js": ((exports) => {
10630
- const path$10 = require("path");
10681
+ const path$11 = require("path");
10631
10682
  const win32 = process.platform === "win32";
10632
10683
  const { REGEX_BACKSLASH, REGEX_REMOVE_BACKSLASH, REGEX_SPECIAL_CHARS, REGEX_SPECIAL_CHARS_GLOBAL } = require_constants$1();
10633
10684
  exports.isObject = (val) => val !== null && typeof val === "object" && !Array.isArray(val);
@@ -10647,7 +10698,7 @@ var require_utils$2 = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_mod
10647
10698
  };
10648
10699
  exports.isWindows = (options) => {
10649
10700
  if (options && typeof options.windows === "boolean") return options.windows;
10650
- return win32 === true || path$10.sep === "\\";
10701
+ return win32 === true || path$11.sep === "\\";
10651
10702
  };
10652
10703
  exports.escapeLast = (input, char, lastIdx) => {
10653
10704
  const idx = input.lastIndexOf(char, lastIdx);
@@ -11823,7 +11874,7 @@ var require_parse = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_modul
11823
11874
  //#endregion
11824
11875
  //#region ../../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/picomatch.js
11825
11876
  var require_picomatch$1 = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/picomatch.js": ((exports, module) => {
11826
- const path$9 = require("path");
11877
+ const path$10 = require("path");
11827
11878
  const scan = require_scan();
11828
11879
  const parse = require_parse();
11829
11880
  const utils$11 = require_utils$2();
@@ -11962,7 +12013,7 @@ var require_picomatch$1 = /* @__PURE__ */ require_chunk.__commonJS({ "../../node
11962
12013
  * @api public
11963
12014
  */
11964
12015
  picomatch$1.matchBase = (input, glob, options, posix = utils$11.isWindows(options)) => {
11965
- return (glob instanceof RegExp ? glob : picomatch$1.makeRe(glob, options)).test(path$9.basename(input));
12016
+ return (glob instanceof RegExp ? glob : picomatch$1.makeRe(glob, options)).test(path$10.basename(input));
11966
12017
  };
11967
12018
  /**
11968
12019
  * Returns true if **any** of the given glob `patterns` match the specified `string`.
@@ -12519,7 +12570,7 @@ var require_micromatch = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_
12519
12570
  //#region ../../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/utils/pattern.js
12520
12571
  var require_pattern = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/utils/pattern.js": ((exports) => {
12521
12572
  Object.defineProperty(exports, "__esModule", { value: true });
12522
- const path$8 = require("path");
12573
+ const path$9 = require("path");
12523
12574
  const globParent = require_glob_parent();
12524
12575
  const micromatch = require_micromatch();
12525
12576
  const GLOBSTAR = "**";
@@ -12627,7 +12678,7 @@ var require_pattern = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_mod
12627
12678
  }
12628
12679
  exports.endsWithSlashGlobStar = endsWithSlashGlobStar;
12629
12680
  function isAffectDepthOfReadingPattern(pattern$1) {
12630
- const basename = path$8.basename(pattern$1);
12681
+ const basename = path$9.basename(pattern$1);
12631
12682
  return endsWithSlashGlobStar(pattern$1) || isStaticPattern(basename);
12632
12683
  }
12633
12684
  exports.isAffectDepthOfReadingPattern = isAffectDepthOfReadingPattern;
@@ -12701,7 +12752,7 @@ var require_pattern = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_mod
12701
12752
  }
12702
12753
  exports.partitionAbsoluteAndRelative = partitionAbsoluteAndRelative;
12703
12754
  function isAbsolute(pattern$1) {
12704
- return path$8.isAbsolute(pattern$1);
12755
+ return path$9.isAbsolute(pattern$1);
12705
12756
  }
12706
12757
  exports.isAbsolute = isAbsolute;
12707
12758
  }) });
@@ -12829,10 +12880,10 @@ var require_utils$1 = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_mod
12829
12880
  exports.array = array;
12830
12881
  const errno = require_errno();
12831
12882
  exports.errno = errno;
12832
- const fs$9 = require_fs$3();
12833
- exports.fs = fs$9;
12834
- const path$7 = require_path();
12835
- exports.path = path$7;
12883
+ const fs$10 = require_fs$3();
12884
+ exports.fs = fs$10;
12885
+ const path$8 = require_path();
12886
+ exports.path = path$8;
12836
12887
  const pattern = require_pattern();
12837
12888
  exports.pattern = pattern;
12838
12889
  const stream = require_stream$3();
@@ -12939,8 +12990,8 @@ var require_tasks = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_modul
12939
12990
  //#region ../../node_modules/.pnpm/@nodelib+fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/providers/async.js
12940
12991
  var require_async$5 = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_modules/.pnpm/@nodelib+fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/providers/async.js": ((exports) => {
12941
12992
  Object.defineProperty(exports, "__esModule", { value: true });
12942
- function read$3(path$15, settings, callback) {
12943
- settings.fs.lstat(path$15, (lstatError, lstat) => {
12993
+ function read$3(path$16, settings, callback) {
12994
+ settings.fs.lstat(path$16, (lstatError, lstat) => {
12944
12995
  if (lstatError !== null) {
12945
12996
  callFailureCallback$2(callback, lstatError);
12946
12997
  return;
@@ -12949,7 +13000,7 @@ var require_async$5 = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_mod
12949
13000
  callSuccessCallback$2(callback, lstat);
12950
13001
  return;
12951
13002
  }
12952
- settings.fs.stat(path$15, (statError, stat$1) => {
13003
+ settings.fs.stat(path$16, (statError, stat$1) => {
12953
13004
  if (statError !== null) {
12954
13005
  if (settings.throwErrorOnBrokenSymbolicLink) {
12955
13006
  callFailureCallback$2(callback, statError);
@@ -12976,11 +13027,11 @@ var require_async$5 = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_mod
12976
13027
  //#region ../../node_modules/.pnpm/@nodelib+fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/providers/sync.js
12977
13028
  var require_sync$5 = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_modules/.pnpm/@nodelib+fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/providers/sync.js": ((exports) => {
12978
13029
  Object.defineProperty(exports, "__esModule", { value: true });
12979
- function read$2(path$15, settings) {
12980
- const lstat = settings.fs.lstatSync(path$15);
13030
+ function read$2(path$16, settings) {
13031
+ const lstat = settings.fs.lstatSync(path$16);
12981
13032
  if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) return lstat;
12982
13033
  try {
12983
- const stat$1 = settings.fs.statSync(path$15);
13034
+ const stat$1 = settings.fs.statSync(path$16);
12984
13035
  if (settings.markSymbolicLink) stat$1.isSymbolicLink = () => true;
12985
13036
  return stat$1;
12986
13037
  } catch (error) {
@@ -12996,12 +13047,12 @@ var require_sync$5 = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_modu
12996
13047
  var require_fs$2 = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_modules/.pnpm/@nodelib+fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/adapters/fs.js": ((exports) => {
12997
13048
  Object.defineProperty(exports, "__esModule", { value: true });
12998
13049
  exports.createFileSystemAdapter = exports.FILE_SYSTEM_ADAPTER = void 0;
12999
- const fs$8 = require("fs");
13050
+ const fs$9 = require("fs");
13000
13051
  exports.FILE_SYSTEM_ADAPTER = {
13001
- lstat: fs$8.lstat,
13002
- stat: fs$8.stat,
13003
- lstatSync: fs$8.lstatSync,
13004
- statSync: fs$8.statSync
13052
+ lstat: fs$9.lstat,
13053
+ stat: fs$9.stat,
13054
+ lstatSync: fs$9.lstatSync,
13055
+ statSync: fs$9.statSync
13005
13056
  };
13006
13057
  function createFileSystemAdapter$1(fsMethods) {
13007
13058
  if (fsMethods === void 0) return exports.FILE_SYSTEM_ADAPTER;
@@ -13014,12 +13065,12 @@ var require_fs$2 = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_module
13014
13065
  //#region ../../node_modules/.pnpm/@nodelib+fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/settings.js
13015
13066
  var require_settings$3 = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_modules/.pnpm/@nodelib+fs.stat@2.0.5/node_modules/@nodelib/fs.stat/out/settings.js": ((exports) => {
13016
13067
  Object.defineProperty(exports, "__esModule", { value: true });
13017
- const fs$7 = require_fs$2();
13068
+ const fs$8 = require_fs$2();
13018
13069
  var Settings$3 = class {
13019
13070
  constructor(_options = {}) {
13020
13071
  this._options = _options;
13021
13072
  this.followSymbolicLink = this._getValue(this._options.followSymbolicLink, true);
13022
- this.fs = fs$7.createFileSystemAdapter(this._options.fs);
13073
+ this.fs = fs$8.createFileSystemAdapter(this._options.fs);
13023
13074
  this.markSymbolicLink = this._getValue(this._options.markSymbolicLink, false);
13024
13075
  this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true);
13025
13076
  }
@@ -13038,17 +13089,17 @@ var require_out$3 = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_modul
13038
13089
  const sync$1 = require_sync$5();
13039
13090
  const settings_1$3 = require_settings$3();
13040
13091
  exports.Settings = settings_1$3.default;
13041
- function stat(path$15, optionsOrSettingsOrCallback, callback) {
13092
+ function stat(path$16, optionsOrSettingsOrCallback, callback) {
13042
13093
  if (typeof optionsOrSettingsOrCallback === "function") {
13043
- async$1.read(path$15, getSettings$2(), optionsOrSettingsOrCallback);
13094
+ async$1.read(path$16, getSettings$2(), optionsOrSettingsOrCallback);
13044
13095
  return;
13045
13096
  }
13046
- async$1.read(path$15, getSettings$2(optionsOrSettingsOrCallback), callback);
13097
+ async$1.read(path$16, getSettings$2(optionsOrSettingsOrCallback), callback);
13047
13098
  }
13048
13099
  exports.stat = stat;
13049
- function statSync(path$15, optionsOrSettings) {
13100
+ function statSync(path$16, optionsOrSettings) {
13050
13101
  const settings = getSettings$2(optionsOrSettings);
13051
- return sync$1.read(path$15, settings);
13102
+ return sync$1.read(path$16, settings);
13052
13103
  }
13053
13104
  exports.statSync = statSync;
13054
13105
  function getSettings$2(settingsOrOptions = {}) {
@@ -13155,8 +13206,8 @@ var require_fs$1 = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_module
13155
13206
  //#region ../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/utils/index.js
13156
13207
  var require_utils = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/utils/index.js": ((exports) => {
13157
13208
  Object.defineProperty(exports, "__esModule", { value: true });
13158
- const fs$6 = require_fs$1();
13159
- exports.fs = fs$6;
13209
+ const fs$7 = require_fs$1();
13210
+ exports.fs = fs$7;
13160
13211
  }) });
13161
13212
 
13162
13213
  //#endregion
@@ -13242,16 +13293,16 @@ var require_async$4 = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_mod
13242
13293
  return;
13243
13294
  }
13244
13295
  rpl(names.map((name) => {
13245
- const path$15 = common$4.joinPathSegments(directory, name, settings.pathSegmentSeparator);
13296
+ const path$16 = common$4.joinPathSegments(directory, name, settings.pathSegmentSeparator);
13246
13297
  return (done) => {
13247
- fsStat$5.stat(path$15, settings.fsStatSettings, (error, stats) => {
13298
+ fsStat$5.stat(path$16, settings.fsStatSettings, (error, stats) => {
13248
13299
  if (error !== null) {
13249
13300
  done(error);
13250
13301
  return;
13251
13302
  }
13252
13303
  const entry = {
13253
13304
  name,
13254
- path: path$15,
13305
+ path: path$16,
13255
13306
  dirent: utils$8.fs.createDirentFromStats(name, stats)
13256
13307
  };
13257
13308
  if (settings.stats) entry.stats = stats;
@@ -13327,14 +13378,14 @@ var require_sync$4 = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_modu
13327
13378
  var require_fs = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/adapters/fs.js": ((exports) => {
13328
13379
  Object.defineProperty(exports, "__esModule", { value: true });
13329
13380
  exports.createFileSystemAdapter = exports.FILE_SYSTEM_ADAPTER = void 0;
13330
- const fs$5 = require("fs");
13381
+ const fs$6 = require("fs");
13331
13382
  exports.FILE_SYSTEM_ADAPTER = {
13332
- lstat: fs$5.lstat,
13333
- stat: fs$5.stat,
13334
- lstatSync: fs$5.lstatSync,
13335
- statSync: fs$5.statSync,
13336
- readdir: fs$5.readdir,
13337
- readdirSync: fs$5.readdirSync
13383
+ lstat: fs$6.lstat,
13384
+ stat: fs$6.stat,
13385
+ lstatSync: fs$6.lstatSync,
13386
+ statSync: fs$6.statSync,
13387
+ readdir: fs$6.readdir,
13388
+ readdirSync: fs$6.readdirSync
13338
13389
  };
13339
13390
  function createFileSystemAdapter(fsMethods) {
13340
13391
  if (fsMethods === void 0) return exports.FILE_SYSTEM_ADAPTER;
@@ -13347,15 +13398,15 @@ var require_fs = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_modules/
13347
13398
  //#region ../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/settings.js
13348
13399
  var require_settings$2 = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/settings.js": ((exports) => {
13349
13400
  Object.defineProperty(exports, "__esModule", { value: true });
13350
- const path$6 = require("path");
13401
+ const path$7 = require("path");
13351
13402
  const fsStat$3 = require_out$3();
13352
- const fs$4 = require_fs();
13403
+ const fs$5 = require_fs();
13353
13404
  var Settings$2 = class {
13354
13405
  constructor(_options = {}) {
13355
13406
  this._options = _options;
13356
13407
  this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, false);
13357
- this.fs = fs$4.createFileSystemAdapter(this._options.fs);
13358
- this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path$6.sep);
13408
+ this.fs = fs$5.createFileSystemAdapter(this._options.fs);
13409
+ this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path$7.sep);
13359
13410
  this.stats = this._getValue(this._options.stats, false);
13360
13411
  this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true);
13361
13412
  this.fsStatSettings = new fsStat$3.Settings({
@@ -13379,17 +13430,17 @@ var require_out$2 = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_modul
13379
13430
  const sync = require_sync$4();
13380
13431
  const settings_1$2 = require_settings$2();
13381
13432
  exports.Settings = settings_1$2.default;
13382
- function scandir(path$15, optionsOrSettingsOrCallback, callback) {
13433
+ function scandir(path$16, optionsOrSettingsOrCallback, callback) {
13383
13434
  if (typeof optionsOrSettingsOrCallback === "function") {
13384
- async.read(path$15, getSettings$1(), optionsOrSettingsOrCallback);
13435
+ async.read(path$16, getSettings$1(), optionsOrSettingsOrCallback);
13385
13436
  return;
13386
13437
  }
13387
- async.read(path$15, getSettings$1(optionsOrSettingsOrCallback), callback);
13438
+ async.read(path$16, getSettings$1(optionsOrSettingsOrCallback), callback);
13388
13439
  }
13389
13440
  exports.scandir = scandir;
13390
- function scandirSync(path$15, optionsOrSettings) {
13441
+ function scandirSync(path$16, optionsOrSettings) {
13391
13442
  const settings = getSettings$1(optionsOrSettings);
13392
- return sync.read(path$15, settings);
13443
+ return sync.read(path$16, settings);
13393
13444
  }
13394
13445
  exports.scandirSync = scandirSync;
13395
13446
  function getSettings$1(settingsOrOptions = {}) {
@@ -13934,7 +13985,7 @@ var require_sync$2 = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_modu
13934
13985
  //#region ../../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/settings.js
13935
13986
  var require_settings$1 = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_modules/.pnpm/@nodelib+fs.walk@1.2.8/node_modules/@nodelib/fs.walk/out/settings.js": ((exports) => {
13936
13987
  Object.defineProperty(exports, "__esModule", { value: true });
13937
- const path$5 = require("path");
13988
+ const path$6 = require("path");
13938
13989
  const fsScandir = require_out$2();
13939
13990
  var Settings$1 = class {
13940
13991
  constructor(_options = {}) {
@@ -13944,7 +13995,7 @@ var require_settings$1 = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_
13944
13995
  this.deepFilter = this._getValue(this._options.deepFilter, null);
13945
13996
  this.entryFilter = this._getValue(this._options.entryFilter, null);
13946
13997
  this.errorFilter = this._getValue(this._options.errorFilter, null);
13947
- this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path$5.sep);
13998
+ this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path$6.sep);
13948
13999
  this.fsScandirSettings = new fsScandir.Settings({
13949
14000
  followSymbolicLinks: this._options.followSymbolicLinks,
13950
14001
  fs: this._options.fs,
@@ -13997,7 +14048,7 @@ var require_out$1 = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_modul
13997
14048
  //#region ../../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/readers/reader.js
13998
14049
  var require_reader = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/readers/reader.js": ((exports) => {
13999
14050
  Object.defineProperty(exports, "__esModule", { value: true });
14000
- const path$4 = require("path");
14051
+ const path$5 = require("path");
14001
14052
  const fsStat$2 = require_out$3();
14002
14053
  const utils$6 = require_utils$1();
14003
14054
  var Reader = class {
@@ -14010,7 +14061,7 @@ var require_reader = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_modu
14010
14061
  });
14011
14062
  }
14012
14063
  _getFullEntryPath(filepath) {
14013
- return path$4.resolve(this._settings.cwd, filepath);
14064
+ return path$5.resolve(this._settings.cwd, filepath);
14014
14065
  }
14015
14066
  _makeEntry(stats, pattern$1) {
14016
14067
  const entry = {
@@ -14354,7 +14405,7 @@ var require_entry = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_modul
14354
14405
  //#region ../../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/providers/provider.js
14355
14406
  var require_provider = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/providers/provider.js": ((exports) => {
14356
14407
  Object.defineProperty(exports, "__esModule", { value: true });
14357
- const path$3 = require("path");
14408
+ const path$4 = require("path");
14358
14409
  const deep_1 = require_deep();
14359
14410
  const entry_1 = require_entry$1();
14360
14411
  const error_1 = require_error();
@@ -14368,7 +14419,7 @@ var require_provider = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_mo
14368
14419
  this.entryTransformer = new entry_2.default(this._settings);
14369
14420
  }
14370
14421
  _getRootDirectory(task) {
14371
- return path$3.resolve(this._settings.cwd, task.base);
14422
+ return path$4.resolve(this._settings.cwd, task.base);
14372
14423
  }
14373
14424
  _getReaderOptions(task) {
14374
14425
  const basePath = task.base === "." ? "" : task.base;
@@ -14529,7 +14580,7 @@ var require_sync = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_module
14529
14580
  var require_settings = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/settings.js": ((exports) => {
14530
14581
  Object.defineProperty(exports, "__esModule", { value: true });
14531
14582
  exports.DEFAULT_FILE_SYSTEM_ADAPTER = void 0;
14532
- const fs$3 = require("fs");
14583
+ const fs$4 = require("fs");
14533
14584
  const os = require("os");
14534
14585
  /**
14535
14586
  * The `os.cpus` method can return zero. We expect the number of cores to be greater than zero.
@@ -14537,12 +14588,12 @@ var require_settings = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_mo
14537
14588
  */
14538
14589
  const CPU_COUNT = Math.max(os.cpus().length, 1);
14539
14590
  exports.DEFAULT_FILE_SYSTEM_ADAPTER = {
14540
- lstat: fs$3.lstat,
14541
- lstatSync: fs$3.lstatSync,
14542
- stat: fs$3.stat,
14543
- statSync: fs$3.statSync,
14544
- readdir: fs$3.readdir,
14545
- readdirSync: fs$3.readdirSync
14591
+ lstat: fs$4.lstat,
14592
+ lstatSync: fs$4.lstatSync,
14593
+ stat: fs$4.stat,
14594
+ statSync: fs$4.statSync,
14595
+ readdir: fs$4.readdir,
14596
+ readdirSync: fs$4.readdirSync
14546
14597
  };
14547
14598
  var Settings = class {
14548
14599
  constructor(_options = {}) {
@@ -14748,7 +14799,7 @@ function getDefaultIgnorePaths() {
14748
14799
  "**/build/"
14749
14800
  ];
14750
14801
  }
14751
- function getOtaFingerprintOptions(platform, path$15, options) {
14802
+ function getOtaFingerprintOptions(platform, path$16, options) {
14752
14803
  return {
14753
14804
  useRNCoreAutolinkingFromExpo: false,
14754
14805
  platforms: [platform],
@@ -14789,7 +14840,7 @@ function getOtaFingerprintOptions(platform, path$15, options) {
14789
14840
  ...options.ignorePaths ?? []
14790
14841
  ],
14791
14842
  sourceSkips: __expo_fingerprint.SourceSkips.GitIgnore | __expo_fingerprint.SourceSkips.PackageJsonScriptsAll | __expo_fingerprint.SourceSkips.PackageJsonAndroidAndIosScriptsIfNotContainRun | __expo_fingerprint.SourceSkips.ExpoConfigAll | __expo_fingerprint.SourceSkips.ExpoConfigVersions | __expo_fingerprint.SourceSkips.ExpoConfigNames | __expo_fingerprint.SourceSkips.ExpoConfigRuntimeVersionIfString | __expo_fingerprint.SourceSkips.ExpoConfigAssets | __expo_fingerprint.SourceSkips.ExpoConfigExtraSection | __expo_fingerprint.SourceSkips.ExpoConfigEASProject | __expo_fingerprint.SourceSkips.ExpoConfigSchemes,
14792
- extraSources: processExtraSources(options.extraSources ?? [], path$15),
14843
+ extraSources: processExtraSources(options.extraSources ?? [], path$16),
14793
14844
  debug: options.debug
14794
14845
  };
14795
14846
  }
@@ -14829,9 +14880,9 @@ function showFingerprintDiff(diff, platform) {
14829
14880
  /**
14830
14881
  * Calculates the fingerprint of the native parts project of the project.
14831
14882
  */
14832
- async function nativeFingerprint(path$15, options) {
14883
+ async function nativeFingerprint(path$16, options) {
14833
14884
  const platform = options.platform;
14834
- return (0, __expo_fingerprint.createFingerprintAsync)(path$15, getOtaFingerprintOptions(platform, path$15, options));
14885
+ return (0, __expo_fingerprint.createFingerprintAsync)(path$16, getOtaFingerprintOptions(platform, path$16, options));
14835
14886
  }
14836
14887
  const generateFingerprints = async () => {
14837
14888
  const fingerprintConfig = await ensureFingerprintConfig();
@@ -14903,6 +14954,74 @@ const readLocalFingerprint = async () => {
14903
14954
  }
14904
14955
  };
14905
14956
 
14957
+ //#endregion
14958
+ //#region src/utils/signing/keyGeneration.ts
14959
+ /**
14960
+ * Generate RSA key pair for bundle signing.
14961
+ * @param keySize Key size in bits (2048 or 4096)
14962
+ * @returns Promise resolving to key pair in PEM format
14963
+ */
14964
+ async function generateKeyPair(keySize = 4096) {
14965
+ return new Promise((resolve, reject) => {
14966
+ node_crypto.default.generateKeyPair("rsa", {
14967
+ modulusLength: keySize,
14968
+ publicKeyEncoding: {
14969
+ type: "spki",
14970
+ format: "pem"
14971
+ },
14972
+ privateKeyEncoding: {
14973
+ type: "pkcs8",
14974
+ format: "pem"
14975
+ }
14976
+ }, (err, publicKey, privateKey) => {
14977
+ if (err) reject(err);
14978
+ else resolve({
14979
+ privateKey,
14980
+ publicKey
14981
+ });
14982
+ });
14983
+ });
14984
+ }
14985
+ /**
14986
+ * Save key pair to disk with secure permissions.
14987
+ * @param keyPair Generated key pair
14988
+ * @param outputDir Directory to save keys
14989
+ */
14990
+ async function saveKeyPair(keyPair, outputDir) {
14991
+ await node_fs_promises.default.mkdir(outputDir, { recursive: true });
14992
+ const privateKeyPath = node_path.default.join(outputDir, "private-key.pem");
14993
+ const publicKeyPath = node_path.default.join(outputDir, "public-key.pem");
14994
+ await node_fs_promises.default.writeFile(privateKeyPath, keyPair.privateKey, { mode: 384 });
14995
+ await node_fs_promises.default.writeFile(publicKeyPath, keyPair.publicKey, { mode: 420 });
14996
+ }
14997
+ /**
14998
+ * Load private key from PEM file.
14999
+ * @param privateKeyPath Path to private key file
15000
+ * @returns Private key in PEM format
15001
+ * @throws Error if file not found or invalid format
15002
+ */
15003
+ async function loadPrivateKey(privateKeyPath) {
15004
+ try {
15005
+ const privateKey = await node_fs_promises.default.readFile(privateKeyPath, "utf-8");
15006
+ node_crypto.default.createPrivateKey(privateKey);
15007
+ return privateKey;
15008
+ } catch (error) {
15009
+ throw new Error(`Failed to load private key from ${privateKeyPath}: ${error.message}`);
15010
+ }
15011
+ }
15012
+ /**
15013
+ * Extract public key from private key.
15014
+ * @param privateKeyPEM Private key in PEM format
15015
+ * @returns Public key in PEM format
15016
+ */
15017
+ function getPublicKeyFromPrivate(privateKeyPEM) {
15018
+ const privateKey = node_crypto.default.createPrivateKey(privateKeyPEM);
15019
+ return node_crypto.default.createPublicKey(privateKey).export({
15020
+ type: "spki",
15021
+ format: "pem"
15022
+ });
15023
+ }
15024
+
14906
15025
  //#endregion
14907
15026
  Object.defineProperty(exports, 'AndroidConfigParser', {
14908
15027
  enumerable: true,
@@ -14940,18 +15059,36 @@ Object.defineProperty(exports, 'generateFingerprints', {
14940
15059
  return generateFingerprints;
14941
15060
  }
14942
15061
  });
15062
+ Object.defineProperty(exports, 'generateKeyPair', {
15063
+ enumerable: true,
15064
+ get: function () {
15065
+ return generateKeyPair;
15066
+ }
15067
+ });
14943
15068
  Object.defineProperty(exports, 'getFingerprintDiff', {
14944
15069
  enumerable: true,
14945
15070
  get: function () {
14946
15071
  return getFingerprintDiff;
14947
15072
  }
14948
15073
  });
15074
+ Object.defineProperty(exports, 'getPublicKeyFromPrivate', {
15075
+ enumerable: true,
15076
+ get: function () {
15077
+ return getPublicKeyFromPrivate;
15078
+ }
15079
+ });
14949
15080
  Object.defineProperty(exports, 'isFingerprintEquals', {
14950
15081
  enumerable: true,
14951
15082
  get: function () {
14952
15083
  return isFingerprintEquals;
14953
15084
  }
14954
15085
  });
15086
+ Object.defineProperty(exports, 'loadPrivateKey', {
15087
+ enumerable: true,
15088
+ get: function () {
15089
+ return loadPrivateKey;
15090
+ }
15091
+ });
14955
15092
  Object.defineProperty(exports, 'nativeFingerprint', {
14956
15093
  enumerable: true,
14957
15094
  get: function () {
@@ -14982,6 +15119,12 @@ Object.defineProperty(exports, 'require_plist', {
14982
15119
  return require_plist;
14983
15120
  }
14984
15121
  });
15122
+ Object.defineProperty(exports, 'saveKeyPair', {
15123
+ enumerable: true,
15124
+ get: function () {
15125
+ return saveKeyPair;
15126
+ }
15127
+ });
14985
15128
  Object.defineProperty(exports, 'showFingerprintDiff', {
14986
15129
  enumerable: true,
14987
15130
  get: function () {