hot-updater 0.19.7 → 0.19.8

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,10 +1,11 @@
1
- import { __commonJS, __require, __toESM } from "./chunk-BLXvPPr8.js";
2
- import fs from "fs";
1
+ import { __commonJS, __require, __toESM, require_picocolors } from "./picocolors-OFVOrezl.js";
2
+ import fs from "node:fs";
3
+ import fs$1 from "fs";
4
+ import * as p$1 from "@clack/prompts";
3
5
  import * as p from "@clack/prompts";
4
6
  import { getCwd, loadConfig } from "@hot-updater/plugin-core";
5
7
  import path from "path";
6
- import { createFingerprintAsync } from "@expo/fingerprint";
7
- import fs$1 from "node:fs";
8
+ import { createFingerprintAsync, diffFingerprintChangesAsync } from "@expo/fingerprint";
8
9
 
9
10
  //#region ../../node_modules/.pnpm/fast-xml-parser@5.2.3/node_modules/fast-xml-parser/src/util.js
10
11
  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";
@@ -1487,7 +1488,7 @@ var AndroidConfigParser = class {
1487
1488
  });
1488
1489
  }
1489
1490
  async exists() {
1490
- return fs.existsSync(this.stringsXmlPath);
1491
+ return fs$1.existsSync(this.stringsXmlPath);
1491
1492
  }
1492
1493
  async get(key) {
1493
1494
  if (!await this.exists()) return {
@@ -1495,7 +1496,7 @@ var AndroidConfigParser = class {
1495
1496
  path: path.relative(getCwd(), this.stringsXmlPath)
1496
1497
  };
1497
1498
  try {
1498
- const content = await fs.promises.readFile(this.stringsXmlPath, "utf-8");
1499
+ const content = await fs$1.promises.readFile(this.stringsXmlPath, "utf-8");
1499
1500
  const result = this.parser.parse(content);
1500
1501
  if (!result.resources.string) return {
1501
1502
  value: null,
@@ -1519,7 +1520,7 @@ var AndroidConfigParser = class {
1519
1520
  console.warn("hot-updater: strings.xml not found. Skipping Android-specific config modifications.");
1520
1521
  return { path: null };
1521
1522
  }
1522
- const content = await fs.promises.readFile(this.stringsXmlPath, "utf-8");
1523
+ const content = await fs$1.promises.readFile(this.stringsXmlPath, "utf-8");
1523
1524
  try {
1524
1525
  const result = this.parser.parse(content);
1525
1526
  if (!result.resources.string) result.resources.string = [];
@@ -1534,7 +1535,7 @@ var AndroidConfigParser = class {
1534
1535
  else strings.push(stringElement);
1535
1536
  result.resources.string = strings.length === 1 ? strings[0] : strings;
1536
1537
  const newContent = this.builder.build(result);
1537
- await fs.promises.writeFile(this.stringsXmlPath, newContent, "utf-8");
1538
+ await fs$1.promises.writeFile(this.stringsXmlPath, newContent, "utf-8");
1538
1539
  return { path: path.relative(getCwd(), this.stringsXmlPath) };
1539
1540
  } catch (error) {
1540
1541
  throw new Error(`Failed to parse or update strings.xml: ${error}`);
@@ -2359,11 +2360,11 @@ var require_expand = __commonJS({ "../../node_modules/.pnpm/braces@3.0.3/node_mo
2359
2360
  const rangeLimit = options.rangeLimit === void 0 ? 1e3 : options.rangeLimit;
2360
2361
  const walk$1 = (node, parent = {}) => {
2361
2362
  node.queue = [];
2362
- let p$1 = parent;
2363
+ let p$2 = parent;
2363
2364
  let q = parent.queue;
2364
- while (p$1.type !== "brace" && p$1.type !== "root" && p$1.parent) {
2365
- p$1 = p$1.parent;
2366
- q = p$1.queue;
2365
+ while (p$2.type !== "brace" && p$2.type !== "root" && p$2.parent) {
2366
+ p$2 = p$2.parent;
2367
+ q = p$2.queue;
2367
2368
  }
2368
2369
  if (node.invalid || node.dollar) {
2369
2370
  q.push(append(q.pop(), stringify$2(node, options)));
@@ -4434,7 +4435,7 @@ var require_picomatch$1 = __commonJS({ "../../node_modules/.pnpm/picomatch@2.3.1
4434
4435
  * @api public
4435
4436
  */
4436
4437
  picomatch$1.parse = (pattern$1, options) => {
4437
- if (Array.isArray(pattern$1)) return pattern$1.map((p$1) => picomatch$1.parse(p$1, options));
4438
+ if (Array.isArray(pattern$1)) return pattern$1.map((p$2) => picomatch$1.parse(p$2, options));
4438
4439
  return parse$2(pattern$1, {
4439
4440
  ...options,
4440
4441
  fastpaths: false
@@ -4621,7 +4622,7 @@ var require_micromatch = __commonJS({ "../../node_modules/.pnpm/micromatch@4.0.8
4621
4622
  let matches = result.filter((item) => !omit.has(item));
4622
4623
  if (options && matches.length === 0) {
4623
4624
  if (options.failglob === true) throw new Error(`No matches found for "${patterns.join(", ")}"`);
4624
- if (options.nonull === true || options.nullglob === true) return options.unescape ? patterns.map((p$1) => p$1.replace(/\\/g, "")) : patterns;
4625
+ if (options.nonull === true || options.nullglob === true) return options.unescape ? patterns.map((p$2) => p$2.replace(/\\/g, "")) : patterns;
4625
4626
  }
4626
4627
  return matches;
4627
4628
  };
@@ -4721,7 +4722,7 @@ var require_micromatch = __commonJS({ "../../node_modules/.pnpm/micromatch@4.0.8
4721
4722
  */
4722
4723
  micromatch$1.contains = (str, pattern$1, options) => {
4723
4724
  if (typeof str !== "string") throw new TypeError(`Expected a string: "${util.inspect(str)}"`);
4724
- if (Array.isArray(pattern$1)) return pattern$1.some((p$1) => micromatch$1.contains(str, p$1, options));
4725
+ if (Array.isArray(pattern$1)) return pattern$1.some((p$2) => micromatch$1.contains(str, p$2, options));
4725
4726
  if (typeof pattern$1 === "string") {
4726
4727
  if (isEmptyString(str) || isEmptyString(pattern$1)) return false;
4727
4728
  if (str.includes(pattern$1) || str.startsWith("./") && str.slice(2).includes(pattern$1)) return true;
@@ -4842,7 +4843,7 @@ var require_micromatch = __commonJS({ "../../node_modules/.pnpm/micromatch@4.0.8
4842
4843
  */
4843
4844
  micromatch$1.all = (str, patterns, options) => {
4844
4845
  if (typeof str !== "string") throw new TypeError(`Expected a string: "${util.inspect(str)}"`);
4845
- return [].concat(patterns).every((p$1) => picomatch(p$1, options)(str));
4846
+ return [].concat(patterns).every((p$2) => picomatch(p$2, options)(str));
4846
4847
  };
4847
4848
  /**
4848
4849
  * Returns an array of matches captured by `pattern` in `string, or `null` if the pattern did not match.
@@ -6083,7 +6084,7 @@ var require_queue = __commonJS({ "../../node_modules/.pnpm/fastq@1.17.1/node_mod
6083
6084
  queue.drained = drained;
6084
6085
  return queue;
6085
6086
  function push(value) {
6086
- var p$1 = new Promise(function(resolve, reject) {
6087
+ var p$2 = new Promise(function(resolve, reject) {
6087
6088
  pushCb(value, function(err, result) {
6088
6089
  if (err) {
6089
6090
  reject(err);
@@ -6092,11 +6093,11 @@ var require_queue = __commonJS({ "../../node_modules/.pnpm/fastq@1.17.1/node_mod
6092
6093
  resolve(result);
6093
6094
  });
6094
6095
  });
6095
- p$1.catch(noop);
6096
- return p$1;
6096
+ p$2.catch(noop);
6097
+ return p$2;
6097
6098
  }
6098
6099
  function unshift(value) {
6099
- var p$1 = new Promise(function(resolve, reject) {
6100
+ var p$2 = new Promise(function(resolve, reject) {
6100
6101
  unshiftCb(value, function(err, result) {
6101
6102
  if (err) {
6102
6103
  reject(err);
@@ -6105,21 +6106,21 @@ var require_queue = __commonJS({ "../../node_modules/.pnpm/fastq@1.17.1/node_mod
6105
6106
  resolve(result);
6106
6107
  });
6107
6108
  });
6108
- p$1.catch(noop);
6109
- return p$1;
6109
+ p$2.catch(noop);
6110
+ return p$2;
6110
6111
  }
6111
6112
  function drained() {
6112
6113
  if (queue.idle()) return new Promise(function(resolve) {
6113
6114
  resolve();
6114
6115
  });
6115
6116
  var previousDrain = queue.drain;
6116
- var p$1 = new Promise(function(resolve) {
6117
+ var p$2 = new Promise(function(resolve) {
6117
6118
  queue.drain = function() {
6118
6119
  previousDrain();
6119
6120
  resolve();
6120
6121
  };
6121
6122
  });
6122
- return p$1;
6123
+ return p$2;
6123
6124
  }
6124
6125
  }
6125
6126
  module.exports = fastqueue;
@@ -7322,7 +7323,7 @@ var require_dom = __commonJS({ "../../node_modules/.pnpm/@xmldom+xmldom@0.8.10/n
7322
7323
  };
7323
7324
  }
7324
7325
  function copy(src, dest) {
7325
- for (var p$1 in src) if (Object.prototype.hasOwnProperty.call(src, p$1)) dest[p$1] = src[p$1];
7326
+ for (var p$2 in src) if (Object.prototype.hasOwnProperty.call(src, p$2)) dest[p$2] = src[p$2];
7326
7327
  }
7327
7328
  /**
7328
7329
  ^\w+\.prototype\.([_\w]+)\s*=\s*((?:.*\{\s*?[\r\n][\s\S]*?^})|\S.*?(?=[;\r\n]));?
@@ -10772,13 +10773,13 @@ var require_sax = __commonJS({ "../../node_modules/.pnpm/@xmldom+xmldom@0.8.10/n
10772
10773
  start = end$1;
10773
10774
  }
10774
10775
  }
10775
- function position$1(p$1, m) {
10776
- while (p$1 >= lineEnd && (m = linePattern.exec(source))) {
10776
+ function position$1(p$2, m) {
10777
+ while (p$2 >= lineEnd && (m = linePattern.exec(source))) {
10777
10778
  lineStart = m.index;
10778
10779
  lineEnd = lineStart + m[0].length;
10779
10780
  locator.lineNumber++;
10780
10781
  }
10781
- locator.columnNumber = p$1 - lineStart + 1;
10782
+ locator.columnNumber = p$2 - lineStart + 1;
10782
10783
  }
10783
10784
  var lineStart = 0;
10784
10785
  var lineEnd = 0;
@@ -10888,14 +10889,14 @@ var require_sax = __commonJS({ "../../node_modules/.pnpm/@xmldom+xmldom@0.8.10/n
10888
10889
  }
10889
10890
  var attrName;
10890
10891
  var value;
10891
- var p$1 = ++start;
10892
+ var p$2 = ++start;
10892
10893
  var s = S_TAG;
10893
10894
  while (true) {
10894
- var c = source.charAt(p$1);
10895
+ var c = source.charAt(p$2);
10895
10896
  switch (c) {
10896
10897
  case "=":
10897
10898
  if (s === S_ATTR) {
10898
- attrName = source.slice(start, p$1);
10899
+ attrName = source.slice(start, p$2);
10899
10900
  s = S_EQ;
10900
10901
  } else if (s === S_ATTR_SPACE) s = S_EQ;
10901
10902
  else throw new Error("attribute equal must after attrName");
@@ -10905,26 +10906,26 @@ var require_sax = __commonJS({ "../../node_modules/.pnpm/@xmldom+xmldom@0.8.10/n
10905
10906
  if (s === S_EQ || s === S_ATTR) {
10906
10907
  if (s === S_ATTR) {
10907
10908
  errorHandler.warning("attribute value must after \"=\"");
10908
- attrName = source.slice(start, p$1);
10909
+ attrName = source.slice(start, p$2);
10909
10910
  }
10910
- start = p$1 + 1;
10911
- p$1 = source.indexOf(c, start);
10912
- if (p$1 > 0) {
10913
- value = source.slice(start, p$1);
10911
+ start = p$2 + 1;
10912
+ p$2 = source.indexOf(c, start);
10913
+ if (p$2 > 0) {
10914
+ value = source.slice(start, p$2);
10914
10915
  addAttribute(attrName, value, start - 1);
10915
10916
  s = S_ATTR_END;
10916
10917
  } else throw new Error("attribute value no end '" + c + "' match");
10917
10918
  } else if (s == S_ATTR_NOQUOT_VALUE) {
10918
- value = source.slice(start, p$1);
10919
+ value = source.slice(start, p$2);
10919
10920
  addAttribute(attrName, value, start);
10920
10921
  errorHandler.warning("attribute \"" + attrName + "\" missed start quot(" + c + ")!!");
10921
- start = p$1 + 1;
10922
+ start = p$2 + 1;
10922
10923
  s = S_ATTR_END;
10923
10924
  } else throw new Error("attribute value must after \"=\"");
10924
10925
  break;
10925
10926
  case "/":
10926
10927
  switch (s) {
10927
- case S_TAG: el.setTagName(source.slice(start, p$1));
10928
+ case S_TAG: el.setTagName(source.slice(start, p$2));
10928
10929
  case S_ATTR_END:
10929
10930
  case S_TAG_SPACE:
10930
10931
  case S_TAG_CLOSE:
@@ -10940,17 +10941,17 @@ var require_sax = __commonJS({ "../../node_modules/.pnpm/@xmldom+xmldom@0.8.10/n
10940
10941
  break;
10941
10942
  case "":
10942
10943
  errorHandler.error("unexpected end of input");
10943
- if (s == S_TAG) el.setTagName(source.slice(start, p$1));
10944
- return p$1;
10944
+ if (s == S_TAG) el.setTagName(source.slice(start, p$2));
10945
+ return p$2;
10945
10946
  case ">":
10946
10947
  switch (s) {
10947
- case S_TAG: el.setTagName(source.slice(start, p$1));
10948
+ case S_TAG: el.setTagName(source.slice(start, p$2));
10948
10949
  case S_ATTR_END:
10949
10950
  case S_TAG_SPACE:
10950
10951
  case S_TAG_CLOSE: break;
10951
10952
  case S_ATTR_NOQUOT_VALUE:
10952
10953
  case S_ATTR:
10953
- value = source.slice(start, p$1);
10954
+ value = source.slice(start, p$2);
10954
10955
  if (value.slice(-1) === "/") {
10955
10956
  el.closed = true;
10956
10957
  value = value.slice(0, -1);
@@ -10967,19 +10968,19 @@ var require_sax = __commonJS({ "../../node_modules/.pnpm/@xmldom+xmldom@0.8.10/n
10967
10968
  break;
10968
10969
  case S_EQ: throw new Error("attribute value missed!!");
10969
10970
  }
10970
- return p$1;
10971
+ return p$2;
10971
10972
  case "€": c = " ";
10972
10973
  default: if (c <= " ") switch (s) {
10973
10974
  case S_TAG:
10974
- el.setTagName(source.slice(start, p$1));
10975
+ el.setTagName(source.slice(start, p$2));
10975
10976
  s = S_TAG_SPACE;
10976
10977
  break;
10977
10978
  case S_ATTR:
10978
- attrName = source.slice(start, p$1);
10979
+ attrName = source.slice(start, p$2);
10979
10980
  s = S_ATTR_SPACE;
10980
10981
  break;
10981
10982
  case S_ATTR_NOQUOT_VALUE:
10982
- var value = source.slice(start, p$1);
10983
+ var value = source.slice(start, p$2);
10983
10984
  errorHandler.warning("attribute \"" + value + "\" missed quot(\")!!");
10984
10985
  addAttribute(attrName, value, start);
10985
10986
  case S_ATTR_END:
@@ -10991,22 +10992,22 @@ var require_sax = __commonJS({ "../../node_modules/.pnpm/@xmldom+xmldom@0.8.10/n
10991
10992
  var tagName = el.tagName;
10992
10993
  if (!NAMESPACE$1.isHTML(currentNSMap[""]) || !attrName.match(/^(?:disabled|checked|selected)$/i)) errorHandler.warning("attribute \"" + attrName + "\" missed value!! \"" + attrName + "\" instead2!!");
10993
10994
  addAttribute(attrName, attrName, start);
10994
- start = p$1;
10995
+ start = p$2;
10995
10996
  s = S_ATTR;
10996
10997
  break;
10997
10998
  case S_ATTR_END: errorHandler.warning("attribute space is required\"" + attrName + "\"!!");
10998
10999
  case S_TAG_SPACE:
10999
11000
  s = S_ATTR;
11000
- start = p$1;
11001
+ start = p$2;
11001
11002
  break;
11002
11003
  case S_EQ:
11003
11004
  s = S_ATTR_NOQUOT_VALUE;
11004
- start = p$1;
11005
+ start = p$2;
11005
11006
  break;
11006
11007
  case S_TAG_CLOSE: throw new Error("elements closed character '/' and '>' must be connected to");
11007
11008
  }
11008
11009
  }
11009
- p$1++;
11010
+ p$2++;
11010
11011
  }
11011
11012
  }
11012
11013
  /**
@@ -14781,7 +14782,7 @@ var IosConfigParser = class {
14781
14782
  value: null,
14782
14783
  path: null
14783
14784
  };
14784
- const plistXml = await fs.promises.readFile(plistFile, "utf-8");
14785
+ const plistXml = await fs$1.promises.readFile(plistFile, "utf-8");
14785
14786
  const plistObject = import_plist.default.parse(plistXml);
14786
14787
  if (key in plistObject) {
14787
14788
  const value = plistObject[key];
@@ -14815,14 +14816,14 @@ var IosConfigParser = class {
14815
14816
  console.warn("hot-updater: Info.plist not found. Skipping iOS-specific config modifications.");
14816
14817
  return { path: null };
14817
14818
  }
14818
- const plistXml = await fs.promises.readFile(plistFile, "utf-8");
14819
+ const plistXml = await fs$1.promises.readFile(plistFile, "utf-8");
14819
14820
  const plistObject = import_plist.default.parse(plistXml);
14820
14821
  plistObject[key] = value;
14821
14822
  const newPlistXml = import_plist.default.build(plistObject, {
14822
14823
  indent: " ",
14823
14824
  pretty: true
14824
14825
  });
14825
- await fs.promises.writeFile(plistFile, newPlistXml);
14826
+ await fs$1.promises.writeFile(plistFile, newPlistXml);
14826
14827
  return { path: path.relative(getCwd(), plistFile) };
14827
14828
  }
14828
14829
  };
@@ -14863,8 +14864,8 @@ function processExtraSources(extraSources, cwd, ignorePaths) {
14863
14864
  absolute: true,
14864
14865
  onlyFiles: false
14865
14866
  });
14866
- for (const absolutePath of matches) if (fs$1.existsSync(absolutePath)) {
14867
- const stats = fs$1.statSync(absolutePath);
14867
+ for (const absolutePath of matches) if (fs.existsSync(absolutePath)) {
14868
+ const stats = fs.statSync(absolutePath);
14868
14869
  if (stats.isDirectory()) processedSources.push({
14869
14870
  type: "dir",
14870
14871
  filePath: absolutePath,
@@ -14873,7 +14874,7 @@ function processExtraSources(extraSources, cwd, ignorePaths) {
14873
14874
  else processedSources.push({
14874
14875
  type: "contents",
14875
14876
  id: absolutePath,
14876
- contents: fs$1.readFileSync(absolutePath, "utf-8"),
14877
+ contents: fs.readFileSync(absolutePath, "utf-8"),
14877
14878
  reasons: ["custom-user-config"]
14878
14879
  });
14879
14880
  }
@@ -14884,7 +14885,27 @@ function processExtraSources(extraSources, cwd, ignorePaths) {
14884
14885
  }
14885
14886
 
14886
14887
  //#endregion
14887
- //#region src/utils/fingerprint/index.ts
14888
+ //#region src/utils/fingerprint/common.ts
14889
+ const ensureFingerprintConfig = async () => {
14890
+ const config = await loadConfig(null);
14891
+ if (config.updateStrategy === "appVersion") {
14892
+ p$1.log.error("The updateStrategy in hot-updater.config.ts is set to 'appVersion'. This command only works with 'fingerprint' strategy.");
14893
+ process.exit(1);
14894
+ }
14895
+ return config.fingerprint;
14896
+ };
14897
+ function getFingerprintOptions(platform, path$11, options) {
14898
+ return {
14899
+ platforms: [platform],
14900
+ ignorePaths: [
14901
+ "**/android/**/strings.xml",
14902
+ "**/ios/**/*.plist",
14903
+ ...options.ignorePaths
14904
+ ],
14905
+ extraSources: processExtraSources(options.extraSources, path$11, options.ignorePaths),
14906
+ debug: options.debug
14907
+ };
14908
+ }
14888
14909
  function isFingerprintEquals(lhs, rhs) {
14889
14910
  if (!lhs || !rhs) return false;
14890
14911
  if (isFingerprintResultsObject(lhs) && isFingerprintResultsObject(rhs)) return lhs.android.hash === rhs.android.hash && lhs.ios.hash === rhs.ios.hash;
@@ -14894,36 +14915,45 @@ function isFingerprintEquals(lhs, rhs) {
14894
14915
  return typeof result["android"] === "object" && typeof result["ios"] === "object" && !!result["android"]?.hash && !!result["ios"]?.hash;
14895
14916
  }
14896
14917
  }
14918
+
14919
+ //#endregion
14920
+ //#region src/utils/fingerprint/diff.ts
14921
+ var import_picocolors = __toESM(require_picocolors());
14922
+ async function getFingerprintDiff(oldFingerprint, options) {
14923
+ const projectPath = getCwd();
14924
+ return await diffFingerprintChangesAsync(oldFingerprint, projectPath, getFingerprintOptions(options.platform, projectPath, options));
14925
+ }
14926
+ function getSourcePath(source) {
14927
+ if (source.type === "file" || source.type === "dir") return source.filePath;
14928
+ return source.id || source.type;
14929
+ }
14930
+ function showFingerprintDiff(diff, platform) {
14931
+ if (diff.length === 0) return;
14932
+ p.log.info(`${import_picocolors.default.bold(`${platform} Fingerprint Changes:`)}`);
14933
+ const added = diff.filter((item) => item.op === "added");
14934
+ const removed = diff.filter((item) => item.op === "removed");
14935
+ const changed = diff.filter((item) => item.op === "changed");
14936
+ if (added.length > 0) p.log.info(` ${import_picocolors.default.green("Added:")} ${added.map((item) => getSourcePath(item.addedSource)).join(", ")}`);
14937
+ if (removed.length > 0) p.log.info(` ${import_picocolors.default.red("Removed:")} ${removed.map((item) => getSourcePath(item.removedSource)).join(", ")}`);
14938
+ if (changed.length > 0) p.log.info(` ${import_picocolors.default.yellow("Changed:")} ${changed.map((item) => getSourcePath(item.beforeSource)).join(", ")}`);
14939
+ }
14940
+
14941
+ //#endregion
14942
+ //#region src/utils/fingerprint/index.ts
14897
14943
  /**
14898
14944
  * Calculates the fingerprint of the native parts project of the project.
14899
14945
  */
14900
14946
  async function nativeFingerprint(path$11, options) {
14901
14947
  const platform = options.platform;
14902
- return createFingerprintAsync(path$11, {
14903
- platforms: [platform],
14904
- ignorePaths: [
14905
- "**/android/**/strings.xml",
14906
- "**/ios/**/*.plist",
14907
- ...options.ignorePaths
14908
- ],
14909
- extraSources: processExtraSources(options.extraSources, path$11, options.ignorePaths),
14910
- debug: options.debug
14911
- });
14948
+ return createFingerprintAsync(path$11, getFingerprintOptions(platform, path$11, options));
14912
14949
  }
14913
- const ensureFingerprintConfig = async () => {
14914
- const config = await loadConfig(null);
14915
- if (config.updateStrategy === "appVersion") {
14916
- p.log.error("The updateStrategy in hot-updater.config.ts is set to 'appVersion'. This command only works with 'fingerprint' strategy.");
14917
- process.exit(1);
14918
- }
14919
- return config.fingerprint;
14920
- };
14921
14950
  const generateFingerprints = async () => {
14922
14951
  const fingerprintConfig = await ensureFingerprintConfig();
14923
- const [ios, android] = await Promise.all([nativeFingerprint(getCwd(), {
14952
+ const projectPath = getCwd();
14953
+ const [ios, android] = await Promise.all([nativeFingerprint(projectPath, {
14924
14954
  platform: "ios",
14925
14955
  ...fingerprintConfig
14926
- }), nativeFingerprint(getCwd(), {
14956
+ }), nativeFingerprint(projectPath, {
14927
14957
  platform: "android",
14928
14958
  ...fingerprintConfig
14929
14959
  })]);
@@ -14944,7 +14974,7 @@ const createAndInjectFingerprintFiles = async ({ platform } = {}) => {
14944
14974
  const FINGERPRINT_FILE_PATH = path.join(getCwd(), "fingerprint.json");
14945
14975
  const newFingerprint = await generateFingerprints();
14946
14976
  if (!localFingerprint || !platform) {
14947
- await fs.promises.writeFile(FINGERPRINT_FILE_PATH, JSON.stringify(newFingerprint, null, 2));
14977
+ await fs$1.promises.writeFile(FINGERPRINT_FILE_PATH, JSON.stringify(newFingerprint, null, 2));
14948
14978
  await setFingerprintHash("android", newFingerprint.android.hash);
14949
14979
  await setFingerprintHash("ios", newFingerprint.ios.hash);
14950
14980
  } else {
@@ -14953,7 +14983,7 @@ const createAndInjectFingerprintFiles = async ({ platform } = {}) => {
14953
14983
  ios: localFingerprint.ios || newFingerprint.ios,
14954
14984
  [platform]: newFingerprint[platform]
14955
14985
  };
14956
- await fs.promises.writeFile(FINGERPRINT_FILE_PATH, JSON.stringify(nextFingerprints, null, 2));
14986
+ await fs$1.promises.writeFile(FINGERPRINT_FILE_PATH, JSON.stringify(nextFingerprints, null, 2));
14957
14987
  await setFingerprintHash(platform, newFingerprint[platform].hash);
14958
14988
  }
14959
14989
  return newFingerprint;
@@ -14961,7 +14991,7 @@ const createAndInjectFingerprintFiles = async ({ platform } = {}) => {
14961
14991
  const readLocalFingerprint = async () => {
14962
14992
  const FINGERPRINT_FILE_PATH = path.join(getCwd(), "fingerprint.json");
14963
14993
  try {
14964
- const content = await fs.promises.readFile(FINGERPRINT_FILE_PATH, "utf-8");
14994
+ const content = await fs$1.promises.readFile(FINGERPRINT_FILE_PATH, "utf-8");
14965
14995
  return JSON.parse(content);
14966
14996
  } catch {
14967
14997
  return null;
@@ -14969,4 +14999,4 @@ const readLocalFingerprint = async () => {
14969
14999
  };
14970
15000
 
14971
15001
  //#endregion
14972
- export { AndroidConfigParser, IosConfigParser, createAndInjectFingerprintFiles, generateFingerprint, generateFingerprints, isFingerprintEquals, nativeFingerprint, readLocalFingerprint, require_base64_js, require_out, require_plist };
15002
+ export { AndroidConfigParser, IosConfigParser, createAndInjectFingerprintFiles, generateFingerprint, generateFingerprints, getFingerprintDiff, isFingerprintEquals, nativeFingerprint, readLocalFingerprint, require_base64_js, require_out, require_plist, showFingerprintDiff };