peachsim 0.1.2185 → 0.1.2187

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.
Files changed (103) hide show
  1. package/cli/commands/cpu-profile.ts +6 -2
  2. package/cli/commands/shell-url.ts +3 -6
  3. package/dist-lib/agent-daemon-client.cjs +1 -1
  4. package/dist-lib/agent-events.cjs +1 -1
  5. package/dist-lib/attached-projects.cjs +1 -1
  6. package/dist-lib/auth/shared-session.cjs +1 -1
  7. package/dist-lib/backend-origin.cjs +1 -1
  8. package/dist-lib/beta.cjs +1 -1
  9. package/dist-lib/beta.mjs +1 -1
  10. package/dist-lib/bridge-constants.cjs +1 -1
  11. package/dist-lib/bridge-contract-input.cjs +1 -1
  12. package/dist-lib/bridge-contract-input.mjs +1 -1
  13. package/dist-lib/bridge-contract.cjs +1 -1
  14. package/dist-lib/bridge-contract.mjs +1 -1
  15. package/dist-lib/bundle-channel.cjs +2755 -2385
  16. package/dist-lib/capture-contract.cjs +1 -1
  17. package/dist-lib/capture-contract.mjs +1 -1
  18. package/dist-lib/cloud-contract.cjs +1 -1
  19. package/dist-lib/cloud-contract.mjs +1 -1
  20. package/dist-lib/cloud-test-args.cjs +1 -1
  21. package/dist-lib/cloud-test-args.mjs +1 -1
  22. package/dist-lib/cloud.cjs +1 -1
  23. package/dist-lib/cloud.mjs +1 -1
  24. package/dist-lib/config.cjs +1 -1
  25. package/dist-lib/config.mjs +1 -1
  26. package/dist-lib/detox/index.cjs +2 -2
  27. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  28. package/dist-lib/expo-swift-bundle.cjs +3265 -3223
  29. package/dist-lib/expo-swift-metadata.cjs +2 -1
  30. package/dist-lib/expo-swift-metadata.mjs +2 -1
  31. package/dist-lib/home-paths.cjs +1 -1
  32. package/dist-lib/host/bridge-host.cjs +4587 -4217
  33. package/dist-lib/host/fetch-proxy-handler.cjs +8 -7
  34. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  35. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  36. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  37. package/dist-lib/host/websocket-proxy.cjs +1 -1
  38. package/dist-lib/index.cjs +474 -283
  39. package/dist-lib/jump-to-source-babel.cjs +1 -1
  40. package/dist-lib/jump-to-source-native.cjs +1 -1
  41. package/dist-lib/kotlin-host.cjs +647 -284
  42. package/dist-lib/menu.cjs +1 -1
  43. package/dist-lib/menu.mjs +1 -1
  44. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  45. package/dist-lib/metro-fingerprint-registry.mjs +1 -1
  46. package/dist-lib/metro-production-bundle.cjs +1 -1
  47. package/dist-lib/metro-production-bundle.mjs +1 -1
  48. package/dist-lib/metro.cjs +775 -584
  49. package/dist-lib/native-app-identity-project.cjs +45 -4
  50. package/dist-lib/native-app-identity-project.mjs +45 -4
  51. package/dist-lib/native-app-identity.cjs +40 -2
  52. package/dist-lib/native-app-identity.mjs +40 -2
  53. package/dist-lib/native-firebase-metadata.cjs +1 -1
  54. package/dist-lib/native-firebase-metadata.mjs +1 -1
  55. package/dist-lib/pdfium-raster.cjs +1 -1
  56. package/dist-lib/pdfium-raster.mjs +1 -1
  57. package/dist-lib/plist.cjs +1 -1
  58. package/dist-lib/plist.mjs +1 -1
  59. package/dist-lib/profiles.cjs +1 -1
  60. package/dist-lib/public-brand.cjs +1 -1
  61. package/dist-lib/public-origins-lib-esm.json +24 -24
  62. package/dist-lib/public-origins-lib.json +99 -59
  63. package/dist-lib/react-native-host-modules.cjs +1 -1
  64. package/dist-lib/react-native-host-modules.mjs +1 -1
  65. package/dist-lib/reap-browser.cjs +1 -1
  66. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  67. package/dist-lib/sdk.cjs +1 -1
  68. package/dist-lib/sdk.mjs +1 -1
  69. package/dist-lib/skills.cjs +5257 -4878
  70. package/dist-lib/swift-compile.cjs +2 -2
  71. package/dist-lib/swift-compile.mjs +2 -2
  72. package/dist-lib/swift-package.cjs +1 -1
  73. package/dist-lib/swift-package.mjs +1 -1
  74. package/dist-lib/swift-submit.cjs +1 -1
  75. package/dist-lib/swift-submit.mjs +1 -1
  76. package/dist-lib/swift-toolchain.cjs +1 -1
  77. package/dist-lib/swift.cjs +1 -1
  78. package/dist-lib/vite-swift.cjs +3 -3
  79. package/dist-lib/vite.cjs +8 -7
  80. package/dist-lib/worklet-executable.cjs +1 -1
  81. package/dist-lib/worklet-executable.mjs +1 -1
  82. package/dist-types/packages/peach-engine/src/render-worker/compositor-backend.d.ts +1 -0
  83. package/kotlin/sdk.tar.gz +0 -0
  84. package/package.json +1 -1
  85. package/runtime-companion.json +1 -1
  86. package/sdk/ios/System/Library/Frameworks/CFNetwork.framework/Headers/CFNetwork.h +10 -0
  87. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIImageAsset.h +1 -1
  88. package/src/android-autolinking.ts +45 -4
  89. package/src/android-bridge-packages.ts +2 -2
  90. package/src/android-gradle-sources.ts +143 -0
  91. package/src/androidAutolinkingContract.ts +8 -0
  92. package/src/androidGradleContract.ts +14 -0
  93. package/src/expo-kotlin-host.ts +3 -0
  94. package/src/expo-native-workspace.ts +7 -1
  95. package/src/java-module-abi.ts +145 -0
  96. package/src/javaAbiContract.ts +14 -0
  97. package/src/kotlin-host.ts +57 -3
  98. package/src/native-app-identity-project.ts +10 -2
  99. package/src/native-app-identity.ts +15 -1
  100. package/src/nativeAppIconContract.ts +37 -0
  101. package/src/nitro-source.ts +2 -167
  102. package/src/react-native-autolinking.ts +153 -0
  103. package/src/swift-installed-targets.ts +8 -0
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2185 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2187 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -1474,17 +1474,17 @@ function visit(node, visitor) {
1474
1474
  } else
1475
1475
  visit_(null, node, visitor_, Object.freeze([]));
1476
1476
  }
1477
- function visit_(key, node, visitor, path31) {
1478
- const ctrl = callVisitor(key, node, visitor, path31);
1477
+ function visit_(key, node, visitor, path32) {
1478
+ const ctrl = callVisitor(key, node, visitor, path32);
1479
1479
  if (isNode(ctrl) || isPair(ctrl)) {
1480
- replaceNode(key, path31, ctrl);
1481
- return visit_(key, ctrl, visitor, path31);
1480
+ replaceNode(key, path32, ctrl);
1481
+ return visit_(key, ctrl, visitor, path32);
1482
1482
  }
1483
1483
  if (typeof ctrl !== "symbol") {
1484
1484
  if (isCollection(node)) {
1485
- path31 = Object.freeze(path31.concat(node));
1485
+ path32 = Object.freeze(path32.concat(node));
1486
1486
  for (let i = 0; i < node.items.length; ++i) {
1487
- const ci = visit_(i, node.items[i], visitor, path31);
1487
+ const ci = visit_(i, node.items[i], visitor, path32);
1488
1488
  if (typeof ci === "number")
1489
1489
  i = ci - 1;
1490
1490
  else if (ci === BREAK)
@@ -1495,13 +1495,13 @@ function visit_(key, node, visitor, path31) {
1495
1495
  }
1496
1496
  }
1497
1497
  } else if (isPair(node)) {
1498
- path31 = Object.freeze(path31.concat(node));
1499
- const ck = visit_("key", node.key, visitor, path31);
1498
+ path32 = Object.freeze(path32.concat(node));
1499
+ const ck = visit_("key", node.key, visitor, path32);
1500
1500
  if (ck === BREAK)
1501
1501
  return BREAK;
1502
1502
  else if (ck === REMOVE)
1503
1503
  node.key = null;
1504
- const cv = visit_("value", node.value, visitor, path31);
1504
+ const cv = visit_("value", node.value, visitor, path32);
1505
1505
  if (cv === BREAK)
1506
1506
  return BREAK;
1507
1507
  else if (cv === REMOVE)
@@ -1519,17 +1519,17 @@ async function visitAsync(node, visitor) {
1519
1519
  } else
1520
1520
  await visitAsync_(null, node, visitor_, Object.freeze([]));
1521
1521
  }
1522
- async function visitAsync_(key, node, visitor, path31) {
1523
- const ctrl = await callVisitor(key, node, visitor, path31);
1522
+ async function visitAsync_(key, node, visitor, path32) {
1523
+ const ctrl = await callVisitor(key, node, visitor, path32);
1524
1524
  if (isNode(ctrl) || isPair(ctrl)) {
1525
- replaceNode(key, path31, ctrl);
1526
- return visitAsync_(key, ctrl, visitor, path31);
1525
+ replaceNode(key, path32, ctrl);
1526
+ return visitAsync_(key, ctrl, visitor, path32);
1527
1527
  }
1528
1528
  if (typeof ctrl !== "symbol") {
1529
1529
  if (isCollection(node)) {
1530
- path31 = Object.freeze(path31.concat(node));
1530
+ path32 = Object.freeze(path32.concat(node));
1531
1531
  for (let i = 0; i < node.items.length; ++i) {
1532
- const ci = await visitAsync_(i, node.items[i], visitor, path31);
1532
+ const ci = await visitAsync_(i, node.items[i], visitor, path32);
1533
1533
  if (typeof ci === "number")
1534
1534
  i = ci - 1;
1535
1535
  else if (ci === BREAK)
@@ -1540,13 +1540,13 @@ async function visitAsync_(key, node, visitor, path31) {
1540
1540
  }
1541
1541
  }
1542
1542
  } else if (isPair(node)) {
1543
- path31 = Object.freeze(path31.concat(node));
1544
- const ck = await visitAsync_("key", node.key, visitor, path31);
1543
+ path32 = Object.freeze(path32.concat(node));
1544
+ const ck = await visitAsync_("key", node.key, visitor, path32);
1545
1545
  if (ck === BREAK)
1546
1546
  return BREAK;
1547
1547
  else if (ck === REMOVE)
1548
1548
  node.key = null;
1549
- const cv = await visitAsync_("value", node.value, visitor, path31);
1549
+ const cv = await visitAsync_("value", node.value, visitor, path32);
1550
1550
  if (cv === BREAK)
1551
1551
  return BREAK;
1552
1552
  else if (cv === REMOVE)
@@ -1573,23 +1573,23 @@ function initVisitor(visitor) {
1573
1573
  }
1574
1574
  return visitor;
1575
1575
  }
1576
- function callVisitor(key, node, visitor, path31) {
1576
+ function callVisitor(key, node, visitor, path32) {
1577
1577
  if (typeof visitor === "function")
1578
- return visitor(key, node, path31);
1578
+ return visitor(key, node, path32);
1579
1579
  if (isMap(node))
1580
- return visitor.Map?.(key, node, path31);
1580
+ return visitor.Map?.(key, node, path32);
1581
1581
  if (isSeq(node))
1582
- return visitor.Seq?.(key, node, path31);
1582
+ return visitor.Seq?.(key, node, path32);
1583
1583
  if (isPair(node))
1584
- return visitor.Pair?.(key, node, path31);
1584
+ return visitor.Pair?.(key, node, path32);
1585
1585
  if (isScalar(node))
1586
- return visitor.Scalar?.(key, node, path31);
1586
+ return visitor.Scalar?.(key, node, path32);
1587
1587
  if (isAlias(node))
1588
- return visitor.Alias?.(key, node, path31);
1588
+ return visitor.Alias?.(key, node, path32);
1589
1589
  return void 0;
1590
1590
  }
1591
- function replaceNode(key, path31, node) {
1592
- const parent = path31[path31.length - 1];
1591
+ function replaceNode(key, path32, node) {
1592
+ const parent = path32[path32.length - 1];
1593
1593
  if (isCollection(parent)) {
1594
1594
  parent.items[key] = node;
1595
1595
  } else if (isPair(parent)) {
@@ -2149,10 +2149,10 @@ var init_createNode = __esm({
2149
2149
  });
2150
2150
 
2151
2151
  // ../../node_modules/yaml/browser/dist/nodes/Collection.js
2152
- function collectionFromPath(schema4, path31, value) {
2152
+ function collectionFromPath(schema4, path32, value) {
2153
2153
  let v6 = value;
2154
- for (let i = path31.length - 1; i >= 0; --i) {
2155
- const k = path31[i];
2154
+ for (let i = path32.length - 1; i >= 0; --i) {
2155
+ const k = path32[i];
2156
2156
  if (typeof k === "number" && Number.isInteger(k) && k >= 0) {
2157
2157
  const a = [];
2158
2158
  a[k] = v6;
@@ -2178,7 +2178,7 @@ var init_Collection = __esm({
2178
2178
  init_createNode();
2179
2179
  init_identity();
2180
2180
  init_Node();
2181
- isEmptyPath = (path31) => path31 == null || typeof path31 === "object" && !!path31[Symbol.iterator]().next().done;
2181
+ isEmptyPath = (path32) => path32 == null || typeof path32 === "object" && !!path32[Symbol.iterator]().next().done;
2182
2182
  Collection = class extends NodeBase {
2183
2183
  constructor(type, schema4) {
2184
2184
  super(type);
@@ -2208,11 +2208,11 @@ var init_Collection = __esm({
2208
2208
  * be a Pair instance or a `{ key, value }` object, which may not have a key
2209
2209
  * that already exists in the map.
2210
2210
  */
2211
- addIn(path31, value) {
2212
- if (isEmptyPath(path31))
2211
+ addIn(path32, value) {
2212
+ if (isEmptyPath(path32))
2213
2213
  this.add(value);
2214
2214
  else {
2215
- const [key, ...rest] = path31;
2215
+ const [key, ...rest] = path32;
2216
2216
  const node = this.get(key, true);
2217
2217
  if (isCollection(node))
2218
2218
  node.addIn(rest, value);
@@ -2226,8 +2226,8 @@ var init_Collection = __esm({
2226
2226
  * Removes a value from the collection.
2227
2227
  * @returns `true` if the item was found and removed.
2228
2228
  */
2229
- deleteIn(path31) {
2230
- const [key, ...rest] = path31;
2229
+ deleteIn(path32) {
2230
+ const [key, ...rest] = path32;
2231
2231
  if (rest.length === 0)
2232
2232
  return this.delete(key);
2233
2233
  const node = this.get(key, true);
@@ -2241,8 +2241,8 @@ var init_Collection = __esm({
2241
2241
  * scalar values from their surrounding node; to disable set `keepScalar` to
2242
2242
  * `true` (collections are always returned intact).
2243
2243
  */
2244
- getIn(path31, keepScalar) {
2245
- const [key, ...rest] = path31;
2244
+ getIn(path32, keepScalar) {
2245
+ const [key, ...rest] = path32;
2246
2246
  const node = this.get(key, true);
2247
2247
  if (rest.length === 0)
2248
2248
  return !keepScalar && isScalar(node) ? node.value : node;
@@ -2260,8 +2260,8 @@ var init_Collection = __esm({
2260
2260
  /**
2261
2261
  * Checks if the collection includes a value with the key `key`.
2262
2262
  */
2263
- hasIn(path31) {
2264
- const [key, ...rest] = path31;
2263
+ hasIn(path32) {
2264
+ const [key, ...rest] = path32;
2265
2265
  if (rest.length === 0)
2266
2266
  return this.has(key);
2267
2267
  const node = this.get(key, true);
@@ -2271,8 +2271,8 @@ var init_Collection = __esm({
2271
2271
  * Sets a value in this collection. For `!!set`, `value` needs to be a
2272
2272
  * boolean to add/remove the item from the set.
2273
2273
  */
2274
- setIn(path31, value) {
2275
- const [key, ...rest] = path31;
2274
+ setIn(path32, value) {
2275
+ const [key, ...rest] = path32;
2276
2276
  if (rest.length === 0) {
2277
2277
  this.set(key, value);
2278
2278
  } else {
@@ -4245,15 +4245,15 @@ function visit2(cst, visitor) {
4245
4245
  cst = { start: cst.start, value: cst.value };
4246
4246
  _visit(Object.freeze([]), cst, visitor);
4247
4247
  }
4248
- function _visit(path31, item, visitor) {
4249
- let ctrl = visitor(item, path31);
4248
+ function _visit(path32, item, visitor) {
4249
+ let ctrl = visitor(item, path32);
4250
4250
  if (typeof ctrl === "symbol")
4251
4251
  return ctrl;
4252
4252
  for (const field of ["key", "value"]) {
4253
4253
  const token = item[field];
4254
4254
  if (token && "items" in token) {
4255
4255
  for (let i = 0; i < token.items.length; ++i) {
4256
- const ci = _visit(Object.freeze(path31.concat([[field, i]])), token.items[i], visitor);
4256
+ const ci = _visit(Object.freeze(path32.concat([[field, i]])), token.items[i], visitor);
4257
4257
  if (typeof ci === "number")
4258
4258
  i = ci - 1;
4259
4259
  else if (ci === BREAK2)
@@ -4264,10 +4264,10 @@ function _visit(path31, item, visitor) {
4264
4264
  }
4265
4265
  }
4266
4266
  if (typeof ctrl === "function" && field === "key")
4267
- ctrl = ctrl(item, path31);
4267
+ ctrl = ctrl(item, path32);
4268
4268
  }
4269
4269
  }
4270
- return typeof ctrl === "function" ? ctrl(item, path31) : ctrl;
4270
+ return typeof ctrl === "function" ? ctrl(item, path32) : ctrl;
4271
4271
  }
4272
4272
  var BREAK2, SKIP2, REMOVE2;
4273
4273
  var init_cst_visit = __esm({
@@ -4279,9 +4279,9 @@ var init_cst_visit = __esm({
4279
4279
  visit2.BREAK = BREAK2;
4280
4280
  visit2.SKIP = SKIP2;
4281
4281
  visit2.REMOVE = REMOVE2;
4282
- visit2.itemAtPath = (cst, path31) => {
4282
+ visit2.itemAtPath = (cst, path32) => {
4283
4283
  let item = cst;
4284
- for (const [field, index] of path31) {
4284
+ for (const [field, index] of path32) {
4285
4285
  const tok = item?.[field];
4286
4286
  if (tok && "items" in tok) {
4287
4287
  item = tok.items[index];
@@ -4290,9 +4290,9 @@ var init_cst_visit = __esm({
4290
4290
  }
4291
4291
  return item;
4292
4292
  };
4293
- visit2.parentCollection = (cst, path31) => {
4294
- const parent = visit2.itemAtPath(cst, path31.slice(0, -1));
4295
- const field = path31[path31.length - 1][0];
4293
+ visit2.parentCollection = (cst, path32) => {
4294
+ const parent = visit2.itemAtPath(cst, path32.slice(0, -1));
4295
+ const field = path32[path32.length - 1][0];
4296
4296
  const coll = parent?.[field];
4297
4297
  if (coll && "items" in coll)
4298
4298
  return coll;
@@ -4462,8 +4462,8 @@ function metadataValue(value, key) {
4462
4462
  if (!value || typeof value !== "object") return void 0;
4463
4463
  return Object.getOwnPropertyDescriptor(value, key)?.value;
4464
4464
  }
4465
- function readProjectJson(path31, files = nodeRepoFileReader) {
4466
- const text2 = readProjectMetadata(path31, files);
4465
+ function readProjectJson(path32, files = nodeRepoFileReader) {
4466
+ const text2 = readProjectMetadata(path32, files);
4467
4467
  if (text2 === null) return null;
4468
4468
  try {
4469
4469
  const value = JSON.parse(text2);
@@ -4746,6 +4746,121 @@ var init_nitro_dependencies = __esm({
4746
4746
  }
4747
4747
  });
4748
4748
 
4749
+ // src/react-native-autolinking.ts
4750
+ function autolinkerJson(command, output2) {
4751
+ try {
4752
+ return JSON.parse(output2.stdout);
4753
+ } catch (cause) {
4754
+ throw new Error(
4755
+ `${command} exited 0 with ${output2.stdout.length} bytes of stdout that is not JSON (${cause instanceof Error ? cause.message : cause}); stderr: ${output2.stderr.trim().slice(0, 500) || "(empty)"}; stdout: ${output2.stdout.slice(0, 200) || "(empty)"}`,
4756
+ { cause }
4757
+ );
4758
+ }
4759
+ }
4760
+ async function cliAdvertises(cli, args, token, appRoot, signal) {
4761
+ const { stdout, stderr } = await run5("node", [cli, ...args], {
4762
+ cwd: appRoot,
4763
+ signal,
4764
+ timeout: 3e4,
4765
+ maxBuffer: 1 * 1024 * 1024,
4766
+ env: { ...process.env, [PEACH_FORKED_SCRIPT_ENV]: "1" }
4767
+ });
4768
+ if (!stdout.trim())
4769
+ throw new Error(
4770
+ `${cli} ${args.join(" ")} returned empty help output${stderr.trim() ? `: ${stderr.trim()}` : ""}`
4771
+ );
4772
+ return stdout.includes(token);
4773
+ }
4774
+ function declaresDependency(appRoot, name2) {
4775
+ const manifest = JSON.parse(
4776
+ import_node_fs18.default.readFileSync(import_node_path20.default.join(appRoot, "package.json"), "utf8")
4777
+ );
4778
+ return isRecord(manifest) && ["dependencies", "devDependencies"].some((field) => {
4779
+ const group = manifest[field];
4780
+ return isRecord(group) && Object.hasOwn(group, name2);
4781
+ });
4782
+ }
4783
+ async function reactNativeAutolinkingConfig(appRoot, platform, signal) {
4784
+ appRoot = import_node_fs18.default.realpathSync(appRoot);
4785
+ const appRequire = (0, import_node_module2.createRequire)(import_node_path20.default.join(appRoot, "package.json"));
4786
+ const expoManifest = appRequire.resolve.paths("expo")?.map((directory) => import_node_path20.default.join(directory, "expo/package.json")).find((manifest) => import_node_fs18.default.existsSync(manifest));
4787
+ const expoRequire = expoManifest ? (0, import_node_module2.createRequire)(import_node_fs18.default.realpathSync(expoManifest)) : appRequire;
4788
+ const nativeFile = (platform === "ios" ? ["ios/Podfile"] : ["android/settings.gradle", "android/settings.gradle.kts"]).map((name2) => import_node_path20.default.join(appRoot, name2)).find((file) => import_node_fs18.default.existsSync(file));
4789
+ const nativeSource = nativeFile ? import_node_fs18.default.readFileSync(nativeFile, "utf8") : null;
4790
+ const asksExpo = process.env.EXPO_USE_COMMUNITY_AUTOLINKING !== "1" && (nativeSource === null ? declaresDependency(appRoot, "expo") : nativeSource.includes("expo-modules-autolinking") || platform === "android" && nativeSource.includes("expoAutolinking.rnConfigCommand"));
4791
+ const expoAutolinker = asksExpo ? [appRequire, expoRequire].flatMap((req) => req.resolve.paths("expo-modules-autolinking") ?? []).map((directory) => import_node_path20.default.join(directory, "expo-modules-autolinking/package.json")).find((manifest) => import_node_fs18.default.existsSync(manifest)) : void 0;
4792
+ if (expoAutolinker) {
4793
+ const cli2 = import_node_path20.default.join(import_node_path20.default.dirname(expoAutolinker), "bin/expo-modules-autolinking.js");
4794
+ if (await cliAdvertises(cli2, ["--help"], "react-native-config", appRoot, signal)) {
4795
+ const args = [
4796
+ cli2,
4797
+ "react-native-config",
4798
+ "--json",
4799
+ "--platform",
4800
+ platform,
4801
+ "--project-root",
4802
+ appRoot
4803
+ ];
4804
+ return autolinkerJson(
4805
+ "expo-modules-autolinking react-native-config",
4806
+ await run5("node", args, {
4807
+ timeout: 3e4,
4808
+ maxBuffer: 8 * 1024 * 1024,
4809
+ env: { ...process.env, [PEACH_FORKED_SCRIPT_ENV]: "1" },
4810
+ // expo configuration resolves its project from cwd.
4811
+ cwd: appRoot,
4812
+ signal
4813
+ })
4814
+ );
4815
+ }
4816
+ }
4817
+ const cliRequire = declaresDependency(appRoot, "one") ? (0, import_node_module2.createRequire)(
4818
+ (0, import_node_module2.createRequire)(appRequire.resolve("one/package.json")).resolve(
4819
+ "vxrn/package.json"
4820
+ )
4821
+ ) : appRequire;
4822
+ const cliManifest = cliRequire.resolve("@react-native-community/cli/package.json");
4823
+ const cli = JSON.parse(import_node_fs18.default.readFileSync(cliManifest, "utf8"));
4824
+ const bins = isRecord(cli) && isRecord(cli.bin) ? cli.bin : void 0;
4825
+ const bin = [bins?.["rnc-cli"], bins?.["react-native"]].find(
4826
+ (entry) => typeof entry === "string"
4827
+ );
4828
+ if (bin === void 0) throw new Error(`${cliManifest} declares no CLI bin`);
4829
+ const cliPath = import_node_path20.default.join(import_node_path20.default.dirname(cliManifest), bin);
4830
+ const configArgs = await cliAdvertises(
4831
+ cliPath,
4832
+ ["config", "--help"],
4833
+ "--platform",
4834
+ appRoot,
4835
+ signal
4836
+ ) ? ["config", "--platform", platform] : ["config"];
4837
+ return autolinkerJson(
4838
+ `react-native ${configArgs.join(" ")}`,
4839
+ await run5("node", [cliPath, ...configArgs], {
4840
+ cwd: appRoot,
4841
+ signal,
4842
+ timeout: 3e4,
4843
+ maxBuffer: 16 * 1024 * 1024,
4844
+ env: { ...process.env, [PEACH_FORKED_SCRIPT_ENV]: "1", NO_COLOR: "1" }
4845
+ })
4846
+ );
4847
+ }
4848
+ var import_node_child_process10, import_node_fs18, import_node_module2, import_node_path20, import_node_util6, run5;
4849
+ var init_react_native_autolinking = __esm({
4850
+ "src/react-native-autolinking.ts"() {
4851
+ "use strict";
4852
+ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
4853
+ import_node_child_process10 = require("node:child_process");
4854
+ import_node_fs18 = __toESM(require("node:fs"), 1);
4855
+ import_node_module2 = require("node:module");
4856
+ import_node_path20 = __toESM(require("node:path"), 1);
4857
+ import_node_util6 = require("node:util");
4858
+ init_forked_script_contract();
4859
+ init_is_record();
4860
+ run5 = (0, import_node_util6.promisify)(import_node_child_process10.execFile);
4861
+ }
4862
+ });
4863
+
4749
4864
  // src/nitro-source.ts
4750
4865
  function object3(value) {
4751
4866
  return value !== null && typeof value === "object" && !Array.isArray(value);
@@ -4754,19 +4869,19 @@ function readJson(root, relative3) {
4754
4869
  return JSON.parse(
4755
4870
  readPackageFile(
4756
4871
  root,
4757
- import_node_path20.default.join(root, relative3),
4872
+ import_node_path21.default.join(root, relative3),
4758
4873
  MAX_SWIFT_COMPILE_SOURCE_BYTES
4759
4874
  ).toString("utf8")
4760
4875
  );
4761
4876
  }
4762
4877
  function registrations(root) {
4763
- const directory = import_node_path20.default.join(root, "nitrogen/generated/ios");
4764
- const initializers = import_node_fs18.default.readdirSync(directory).filter((file) => file.endsWith("Autolinking.mm"));
4878
+ const directory = import_node_path21.default.join(root, "nitrogen/generated/ios");
4879
+ const initializers = import_node_fs19.default.readdirSync(directory).filter((file) => file.endsWith("Autolinking.mm"));
4765
4880
  if (initializers.length !== 1)
4766
4881
  throw new Error(`${root}: expected one generated Nitro iOS initializer`);
4767
4882
  const source = readPackageFile(
4768
4883
  root,
4769
- import_node_path20.default.join(directory, initializers[0]),
4884
+ import_node_path21.default.join(directory, initializers[0]),
4770
4885
  MAX_SWIFT_COMPILE_SOURCE_BYTES
4771
4886
  ).toString("utf8");
4772
4887
  const namespaces = [
@@ -4829,18 +4944,18 @@ function registrations(root) {
4829
4944
  if (new Set(classes.map(({ name: name2 }) => name2)).size !== classes.length)
4830
4945
  throw new Error(`${root}: duplicate generated Nitro iOS registration`);
4831
4946
  classes.sort((a, b) => a.name.localeCompare(b.name));
4832
- const ios = import_node_path20.default.join(root, "ios");
4833
- if (swiftModule === null && import_node_fs18.default.existsSync(ios) && import_node_fs18.default.readdirSync(ios, { recursive: true, encoding: "utf8" }).some((file) => file.endsWith(".swift") && !file.startsWith("Tests")))
4947
+ const ios = import_node_path21.default.join(root, "ios");
4948
+ if (swiftModule === null && import_node_fs19.default.existsSync(ios) && import_node_fs19.default.readdirSync(ios, { recursive: true, encoding: "utf8" }).some((file) => file.endsWith(".swift") && !file.startsWith("Tests")))
4834
4949
  swiftModule = initializers[0].slice(0, -"Autolinking.mm".length);
4835
4950
  return { namespace, swiftModule, classes, views: viewNames(root, classes) };
4836
4951
  }
4837
4952
  function viewNames(root, classes) {
4838
- const directory = import_node_path20.default.join(root, "nitrogen/generated/shared/json");
4839
- if (!import_node_fs18.default.existsSync(directory)) return /* @__PURE__ */ new Set();
4953
+ const directory = import_node_path21.default.join(root, "nitrogen/generated/shared/json");
4954
+ if (!import_node_fs19.default.existsSync(directory)) return /* @__PURE__ */ new Set();
4840
4955
  const views = /* @__PURE__ */ new Set();
4841
- for (const file of import_node_fs18.default.readdirSync(directory)) {
4956
+ for (const file of import_node_fs19.default.readdirSync(directory)) {
4842
4957
  if (!file.endsWith("Config.json")) continue;
4843
- const config = readJson(root, import_node_path20.default.join("nitrogen/generated/shared/json", file));
4958
+ const config = readJson(root, import_node_path21.default.join("nitrogen/generated/shared/json", file));
4844
4959
  const name2 = object3(config) ? config.uiViewClassName : void 0;
4845
4960
  if (typeof name2 === "string" && classes.some((entry) => entry.name === name2))
4846
4961
  views.add(name2);
@@ -4848,28 +4963,25 @@ function viewNames(root, classes) {
4848
4963
  return views;
4849
4964
  }
4850
4965
  function hasNitroIosInitializer(root) {
4851
- const generated = import_node_path20.default.join(root, "nitrogen/generated/ios");
4852
- return import_node_fs18.default.existsSync(generated) && import_node_fs18.default.readdirSync(generated).some((file) => file.endsWith("Autolinking.mm"));
4966
+ const generated = import_node_path21.default.join(root, "nitrogen/generated/ios");
4967
+ return import_node_fs19.default.existsSync(generated) && import_node_fs19.default.readdirSync(generated).some((file) => file.endsWith("Autolinking.mm"));
4853
4968
  }
4854
4969
  function nitroRegisteredNames(root) {
4855
4970
  if (!hasNitroIosInitializer(root)) return null;
4856
4971
  const { classes, views } = registrations(root);
4857
4972
  return { names: classes.map(({ name: name2 }) => name2), views: [...views].sort() };
4858
4973
  }
4859
- var import_node_child_process10, import_node_fs18, import_node_path20, import_node_util6, run5;
4974
+ var import_node_fs19, import_node_path21;
4860
4975
  var init_nitro_source = __esm({
4861
4976
  "src/nitro-source.ts"() {
4862
4977
  "use strict";
4863
4978
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
4864
- import_node_child_process10 = require("node:child_process");
4865
- import_node_fs18 = __toESM(require("node:fs"), 1);
4866
- import_node_path20 = __toESM(require("node:path"), 1);
4867
- import_node_util6 = require("node:util");
4868
- init_forked_script_contract();
4979
+ import_node_fs19 = __toESM(require("node:fs"), 1);
4980
+ import_node_path21 = __toESM(require("node:path"), 1);
4869
4981
  init_nitro_dependencies();
4982
+ init_react_native_autolinking();
4870
4983
  init_swift_source_file();
4871
4984
  init_swift_submit();
4872
- run5 = (0, import_node_util6.promisify)(import_node_child_process10.execFile);
4873
4985
  }
4874
4986
  });
4875
4987
 
@@ -5752,16 +5864,16 @@ function sendJavaScript(req, res, source) {
5752
5864
  res.end(req.method === "HEAD" ? void 0 : source);
5753
5865
  }
5754
5866
  function resolveReplacementModuleFile(fromFile, specifier) {
5755
- const base = import_node_path25.default.resolve(import_node_path25.default.dirname(fromFile), specifier);
5867
+ const base = import_node_path26.default.resolve(import_node_path26.default.dirname(fromFile), specifier);
5756
5868
  const candidates = [
5757
5869
  ...REPLACEMENT_MODULE_EXTENSIONS.some(
5758
- (ext) => ext === import_node_path25.default.extname(base).toLowerCase()
5870
+ (ext) => ext === import_node_path26.default.extname(base).toLowerCase()
5759
5871
  ) ? [base] : [],
5760
5872
  ...REPLACEMENT_MODULE_EXTENSIONS.map((ext) => base + ext),
5761
- ...REPLACEMENT_MODULE_EXTENSIONS.map((ext) => import_node_path25.default.join(base, `index${ext}`))
5873
+ ...REPLACEMENT_MODULE_EXTENSIONS.map((ext) => import_node_path26.default.join(base, `index${ext}`))
5762
5874
  ];
5763
5875
  const found = candidates.find(
5764
- (candidate) => (0, import_node_fs22.statSync)(candidate, { throwIfNoEntry: false })?.isFile()
5876
+ (candidate) => (0, import_node_fs23.statSync)(candidate, { throwIfNoEntry: false })?.isFile()
5765
5877
  );
5766
5878
  if (!found) {
5767
5879
  throw new Error(
@@ -5772,8 +5884,8 @@ function resolveReplacementModuleFile(fromFile, specifier) {
5772
5884
  }
5773
5885
  function isInsideAny(roots, file) {
5774
5886
  return roots.some((root) => {
5775
- const relative3 = import_node_path25.default.relative(root, file);
5776
- return !relative3.startsWith("..") && !import_node_path25.default.isAbsolute(relative3);
5887
+ const relative3 = import_node_path26.default.relative(root, file);
5888
+ return !relative3.startsWith("..") && !import_node_path26.default.isAbsolute(relative3);
5777
5889
  });
5778
5890
  }
5779
5891
  function isReplacementModuleRequestUrl(rawUrl) {
@@ -5822,19 +5934,19 @@ async function handleReplacementModuleRequest(req, res, options = {}) {
5822
5934
  res.end("missing path param");
5823
5935
  return true;
5824
5936
  }
5825
- const extension = import_node_path25.default.extname(targetPath).toLowerCase();
5937
+ const extension = import_node_path26.default.extname(targetPath).toLowerCase();
5826
5938
  if (!REPLACEMENT_MODULE_EXTENSIONS.some((allowed) => allowed === extension)) {
5827
5939
  res.writeHead(400, { "Content-Type": "text/plain; charset=utf-8" });
5828
5940
  res.end(`replacement files must be ${REPLACEMENT_MODULE_EXTENSIONS.join(", ")}`);
5829
5941
  return true;
5830
5942
  }
5831
- if (!import_node_path25.default.isAbsolute(targetPath)) {
5943
+ if (!import_node_path26.default.isAbsolute(targetPath)) {
5832
5944
  res.writeHead(400, { "Content-Type": "text/plain; charset=utf-8" });
5833
5945
  res.end("replacement file path must be absolute");
5834
5946
  return true;
5835
5947
  }
5836
5948
  const runtimePackages = new Set(url.searchParams.getAll("runtimePackage"));
5837
- const servedRoots = options.servedRoots?.map((root) => import_node_path25.default.resolve(root));
5949
+ const servedRoots = options.servedRoots?.map((root) => import_node_path26.default.resolve(root));
5838
5950
  if (servedRoots && !isInsideAny(servedRoots, targetPath)) {
5839
5951
  res.writeHead(403, { "Content-Type": "text/plain; charset=utf-8" });
5840
5952
  res.end("replacement file must be inside a folder the bundler serves");
@@ -5886,14 +5998,14 @@ async function handleReplacementModuleRequest(req, res, options = {}) {
5886
5998
  }
5887
5999
  return true;
5888
6000
  }
5889
- var import_node_fs22, import_promises5, import_node_path25, REPLACEMENT_MODULE_ROUTE;
6001
+ var import_node_fs23, import_promises5, import_node_path26, REPLACEMENT_MODULE_ROUTE;
5890
6002
  var init_replacement_module_handler = __esm({
5891
6003
  "src/host/replacement-module-handler.ts"() {
5892
6004
  "use strict";
5893
6005
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
5894
- import_node_fs22 = require("node:fs");
6006
+ import_node_fs23 = require("node:fs");
5895
6007
  import_promises5 = __toESM(require("node:fs/promises"), 1);
5896
- import_node_path25 = __toESM(require("node:path"), 1);
6008
+ import_node_path26 = __toESM(require("node:path"), 1);
5897
6009
  init_replacementModule();
5898
6010
  init_backend_origin();
5899
6011
  REPLACEMENT_MODULE_ROUTE = "/__sootsim-replacement-module";
@@ -5903,9 +6015,9 @@ var init_replacement_module_handler = __esm({
5903
6015
  // cli/app-project.ts
5904
6016
  function firstNamedFile(dir, names) {
5905
6017
  for (const name2 of names) {
5906
- const candidate = import_node_path28.default.join(dir, name2);
6018
+ const candidate = import_node_path29.default.join(dir, name2);
5907
6019
  try {
5908
- if (import_node_fs24.default.statSync(candidate).isFile()) return candidate;
6020
+ if (import_node_fs25.default.statSync(candidate).isFile()) return candidate;
5909
6021
  } catch {
5910
6022
  }
5911
6023
  }
@@ -5918,25 +6030,25 @@ function findRNXAppConfig(dir) {
5918
6030
  return firstNamedFile(dir, PEACH_APP_CONFIG_NAMES);
5919
6031
  }
5920
6032
  function resolveAppProject(projectRoot) {
5921
- const appDir = import_node_path28.default.resolve(projectRoot);
6033
+ const appDir = import_node_path29.default.resolve(projectRoot);
5922
6034
  try {
5923
- if (!import_node_fs24.default.statSync(appDir).isDirectory()) return null;
6035
+ if (!import_node_fs25.default.statSync(appDir).isDirectory()) return null;
5924
6036
  } catch {
5925
6037
  return null;
5926
6038
  }
5927
6039
  const configPath = findRNXAppConfig(appDir);
5928
- if (!configPath && !findExpoAppConfig(appDir) && !import_node_fs24.default.existsSync(import_node_path28.default.join(appDir, "package.json"))) {
6040
+ if (!configPath && !findExpoAppConfig(appDir) && !import_node_fs25.default.existsSync(import_node_path29.default.join(appDir, "package.json"))) {
5929
6041
  return null;
5930
6042
  }
5931
6043
  return { appDir, configPath };
5932
6044
  }
5933
- var import_node_fs24, import_node_path28, EXPO_APP_CONFIG_NAMES, PEACH_APP_CONFIG_NAMES;
6045
+ var import_node_fs25, import_node_path29, EXPO_APP_CONFIG_NAMES, PEACH_APP_CONFIG_NAMES;
5934
6046
  var init_app_project = __esm({
5935
6047
  "cli/app-project.ts"() {
5936
6048
  "use strict";
5937
6049
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
5938
- import_node_fs24 = __toESM(require("node:fs"), 1);
5939
- import_node_path28 = __toESM(require("node:path"), 1);
6050
+ import_node_fs25 = __toESM(require("node:fs"), 1);
6051
+ import_node_path29 = __toESM(require("node:path"), 1);
5940
6052
  EXPO_APP_CONFIG_NAMES = [
5941
6053
  "app.config.js",
5942
6054
  "app.config.ts",
@@ -6069,7 +6181,7 @@ function resolveAppStubs(appDir, config, configDir) {
6069
6181
  const { modules, views, hybridObjects } = expandStubs(appDir, source);
6070
6182
  assertRegisteredHybridObjects(appDir, source, hybridObjects);
6071
6183
  for (const [name2, answer] of Object.entries(hybridObjects))
6072
- nativeHybridObjects[name2] = answer === "unsupported" ? answer : { file: (0, import_node_path31.resolve)(source.baseDir, answer) };
6184
+ nativeHybridObjects[name2] = answer === "unsupported" ? answer : { file: (0, import_node_path32.resolve)(source.baseDir, answer) };
6073
6185
  for (const [name2, stub] of Object.entries(modules))
6074
6186
  nativeModules[name2] = lowerStub(stub, source.baseDir);
6075
6187
  for (const [name2, stub] of Object.entries(views))
@@ -6134,10 +6246,10 @@ function assertRegisteredHybridObjects(appDir, source, hybridObjects) {
6134
6246
  );
6135
6247
  }
6136
6248
  function lowerStub(stub, baseDir) {
6137
- return stub === "noop" ? stub : { file: (0, import_node_path31.resolve)(baseDir, stub) };
6249
+ return stub === "noop" ? stub : { file: (0, import_node_path32.resolve)(baseDir, stub) };
6138
6250
  }
6139
6251
  function readPackageJson(dir) {
6140
- const text2 = readSmallFile((0, import_node_path31.join)(dir, "package.json"));
6252
+ const text2 = readSmallFile((0, import_node_path32.join)(dir, "package.json"));
6141
6253
  if (!text2) return null;
6142
6254
  try {
6143
6255
  const parsed = JSON.parse(text2);
@@ -6149,9 +6261,9 @@ function readPackageJson(dir) {
6149
6261
  function installedPackageDir(appDir, name2) {
6150
6262
  let current = appDir;
6151
6263
  while (true) {
6152
- const dir = (0, import_node_path31.join)(current, "node_modules", name2);
6153
- if ((0, import_node_fs27.existsSync)((0, import_node_path31.join)(dir, "package.json"))) return (0, import_node_fs27.realpathSync)(dir);
6154
- const parent = (0, import_node_path31.dirname)(current);
6264
+ const dir = (0, import_node_path32.join)(current, "node_modules", name2);
6265
+ if ((0, import_node_fs28.existsSync)((0, import_node_path32.join)(dir, "package.json"))) return (0, import_node_fs28.realpathSync)(dir);
6266
+ const parent = (0, import_node_path32.dirname)(current);
6155
6267
  if (parent === current) return null;
6156
6268
  current = parent;
6157
6269
  }
@@ -6255,7 +6367,7 @@ function mergeRequests(previous, next) {
6255
6367
  function packageNativeRequests(dir) {
6256
6368
  const found = /* @__PURE__ */ new Map();
6257
6369
  const directories = scanRepository(dir).directories.filter((sub) => {
6258
- const segments = (0, import_node_path31.relative)(dir, sub).split("/");
6370
+ const segments = (0, import_node_path32.relative)(dir, sub).split("/");
6259
6371
  return !NATIVE_SOURCE_DIRS.has(segments[0]) && !segments.some((segment) => PACKAGE_SKIP_DIRS.has(segment));
6260
6372
  });
6261
6373
  let files = 0;
@@ -6263,7 +6375,7 @@ function packageNativeRequests(dir) {
6263
6375
  for (const name2 of listDir(sub)) {
6264
6376
  if (!SOURCE_FILE.test(name2) || name2.endsWith(".d.ts") || files >= 2e3) continue;
6265
6377
  files++;
6266
- const file = (0, import_node_path31.join)(sub, name2);
6378
+ const file = (0, import_node_path32.join)(sub, name2);
6267
6379
  const text2 = readSmallFile(file);
6268
6380
  if (!text2) continue;
6269
6381
  for (const { line: _line, ...request } of sourceNativeRequests(file, text2, true)) {
@@ -6381,27 +6493,27 @@ function wireSlotMigration(appDir, configPath, wire, kept = []) {
6381
6493
  }
6382
6494
  function listDir(dir) {
6383
6495
  try {
6384
- return (0, import_node_fs27.readdirSync)(dir);
6496
+ return (0, import_node_fs28.readdirSync)(dir);
6385
6497
  } catch {
6386
6498
  return [];
6387
6499
  }
6388
6500
  }
6389
6501
  function readSmallFile(file) {
6390
6502
  try {
6391
- return (0, import_node_fs27.statSync)(file).size <= 1024 * 1024 ? (0, import_node_fs27.readFileSync)(file, "utf8") : null;
6503
+ return (0, import_node_fs28.statSync)(file).size <= 1024 * 1024 ? (0, import_node_fs28.readFileSync)(file, "utf8") : null;
6392
6504
  } catch {
6393
6505
  return null;
6394
6506
  }
6395
6507
  }
6396
6508
  function hasNativeCode(dir, platform) {
6397
- const expoConfig = (0, import_node_path31.join)(dir, "expo-module.config.json");
6509
+ const expoConfig = (0, import_node_path32.join)(dir, "expo-module.config.json");
6398
6510
  const platforms = metadataValue(readProjectJson(expoConfig), "platforms");
6399
6511
  if (Array.isArray(platforms))
6400
6512
  return platforms.includes(platform) || platform === "ios" && platforms.includes("apple");
6401
- if ([platform, "expo-module.config.json"].some((entry) => (0, import_node_fs27.existsSync)((0, import_node_path31.join)(dir, entry))))
6513
+ if ([platform, "expo-module.config.json"].some((entry) => (0, import_node_fs28.existsSync)((0, import_node_path32.join)(dir, entry))))
6402
6514
  return true;
6403
6515
  if (listDir(dir).some((name2) => name2.endsWith(".podspec"))) return true;
6404
- const manifest = readSmallFile((0, import_node_path31.join)(dir, "package.json"));
6516
+ const manifest = readSmallFile((0, import_node_path32.join)(dir, "package.json"));
6405
6517
  return manifest !== null && manifest.includes('"codegenConfig"');
6406
6518
  }
6407
6519
  function scanLocalNative(appDir, pkg, answered, platform, knownPackages = /* @__PURE__ */ new Set(), includeLegacy = false, providers) {
@@ -6414,7 +6526,7 @@ function scanLocalNative(appDir, pkg, answered, platform, knownPackages = /* @__
6414
6526
  (excluded) => dir === excluded || dir.startsWith(`${excluded}/`)
6415
6527
  ))
6416
6528
  continue;
6417
- if ((0, import_node_fs27.existsSync)((0, import_node_path31.join)(dir, "expo-module.config.json"))) {
6529
+ if ((0, import_node_fs28.existsSync)((0, import_node_path32.join)(dir, "expo-module.config.json"))) {
6418
6530
  if (platform && !hasNativeCode(dir, platform)) {
6419
6531
  excludedModuleDirs.push(dir);
6420
6532
  continue;
@@ -6423,7 +6535,7 @@ function scanLocalNative(appDir, pkg, answered, platform, knownPackages = /* @__
6423
6535
  }
6424
6536
  for (const name2 of listDir(dir)) {
6425
6537
  if (SOURCE_FILE.test(name2) && !name2.endsWith(".d.ts"))
6426
- sourceFiles.push((0, import_node_path31.join)(dir, name2));
6538
+ sourceFiles.push((0, import_node_path32.join)(dir, name2));
6427
6539
  }
6428
6540
  }
6429
6541
  }
@@ -6433,7 +6545,7 @@ function scanLocalNative(appDir, pkg, answered, platform, knownPackages = /* @__
6433
6545
  scanRepository(dir).directories.flatMap(
6434
6546
  (sub) => listDir(sub).filter(
6435
6547
  (name2) => NATIVE_SOURCE_FILE.test(name2) && (!platform || (platform === "ios" ? name2.endsWith(".swift") : name2.endsWith(".kt")))
6436
- ).map((name2) => (0, import_node_path31.join)(sub, name2))
6548
+ ).map((name2) => (0, import_node_path32.join)(sub, name2))
6437
6549
  )
6438
6550
  ])
6439
6551
  );
@@ -6442,7 +6554,7 @@ function scanLocalNative(appDir, pkg, answered, platform, knownPackages = /* @__
6442
6554
  const known = owners.get(dir);
6443
6555
  if (known) return known;
6444
6556
  const name2 = readPackageJson(dir)?.name;
6445
- const parent = (0, import_node_path31.dirname)(dir);
6557
+ const parent = (0, import_node_path32.dirname)(dir);
6446
6558
  const result = typeof name2 === "string" ? name2 : parent === dir ? pkg.name ?? "app" : owner(parent);
6447
6559
  owners.set(dir, result);
6448
6560
  return result;
@@ -6456,25 +6568,25 @@ function scanLocalNative(appDir, pkg, answered, platform, knownPackages = /* @__
6456
6568
  else {
6457
6569
  const moduleDir2 = expoModuleDirs.find((dir) => file.startsWith(`${dir}/`));
6458
6570
  if (moduleDir2 && (file.endsWith(".swift") || !known.expoModule)) {
6459
- known.expoModule = (0, import_node_path31.relative)(appDir, moduleDir2) || ".";
6571
+ known.expoModule = (0, import_node_path32.relative)(appDir, moduleDir2) || ".";
6460
6572
  known.swift = file.endsWith(".swift");
6461
6573
  }
6462
6574
  }
6463
6575
  return;
6464
6576
  }
6465
6577
  providers ??= dependencyNativeOwners(appDir, pkg);
6466
- const packageName = providers.get(key) ?? owner((0, import_node_path31.dirname)(file));
6578
+ const packageName = providers.get(key) ?? owner((0, import_node_path32.dirname)(file));
6467
6579
  if (knownPackages.has(packageName)) return;
6468
6580
  const moduleDir = expoModuleDirs.find((dir) => file.startsWith(`${dir}/`)) ?? null;
6469
6581
  found.set(key, {
6470
6582
  kind,
6471
6583
  name: name2,
6472
6584
  package: packageName,
6473
- path: `${(0, import_node_path31.relative)(appDir, file)}:${line}`,
6474
- expoModule: moduleDir ? (0, import_node_path31.relative)(appDir, moduleDir) || "." : null,
6585
+ path: `${(0, import_node_path32.relative)(appDir, file)}:${line}`,
6586
+ expoModule: moduleDir ? (0, import_node_path32.relative)(appDir, moduleDir) || "." : null,
6475
6587
  optional: optional3,
6476
6588
  swift: moduleDir ? (nativeFilesByModule.get(moduleDir) ?? []).some(
6477
- (path31) => path31.endsWith(".swift") && [...(readSmallFile(path31) ?? "").matchAll(/\bName\(\s*"(\w+)"\s*\)/g)].some(
6589
+ (path32) => path32.endsWith(".swift") && [...(readSmallFile(path32) ?? "").matchAll(/\bName\(\s*"(\w+)"\s*\)/g)].some(
6478
6590
  (match) => match[1] === name2
6479
6591
  )
6480
6592
  ) : false,
@@ -6522,30 +6634,30 @@ function workspacePackageDirs(appDir, pkg) {
6522
6634
  for (const name2 of Object.keys({ ...pkg.dependencies, ...pkg.devDependencies })) {
6523
6635
  let current = appDir;
6524
6636
  while (true) {
6525
- const link = (0, import_node_path31.join)(current, "node_modules", name2);
6526
- if ((0, import_node_fs27.existsSync)(link)) {
6527
- if ((0, import_node_fs27.lstatSync)(link).isSymbolicLink()) {
6528
- const target = (0, import_node_fs27.realpathSync)(link);
6637
+ const link = (0, import_node_path32.join)(current, "node_modules", name2);
6638
+ if ((0, import_node_fs28.existsSync)(link)) {
6639
+ if ((0, import_node_fs28.lstatSync)(link).isSymbolicLink()) {
6640
+ const target = (0, import_node_fs28.realpathSync)(link);
6529
6641
  if (!target.split("/").includes("node_modules") && !target.startsWith(`${appDir}/`)) {
6530
6642
  dirs.add(target);
6531
6643
  }
6532
6644
  }
6533
6645
  break;
6534
6646
  }
6535
- const parent = (0, import_node_path31.dirname)(current);
6647
+ const parent = (0, import_node_path32.dirname)(current);
6536
6648
  if (parent === current) break;
6537
6649
  current = parent;
6538
6650
  }
6539
6651
  }
6540
6652
  return [...dirs];
6541
6653
  }
6542
- var import_node_fs27, import_node_path31, import_oxc_parser2, import_sucrase, SOURCE_FILE, NATIVE_LOOKUP, NATIVE_SOURCE_DIRS, PACKAGE_SKIP_DIRS, NATIVE_SOURCE_FILE;
6654
+ var import_node_fs28, import_node_path32, import_oxc_parser2, import_sucrase, SOURCE_FILE, NATIVE_LOOKUP, NATIVE_SOURCE_DIRS, PACKAGE_SKIP_DIRS, NATIVE_SOURCE_FILE;
6543
6655
  var init_app_stubs = __esm({
6544
6656
  "cli/app-stubs.ts"() {
6545
6657
  "use strict";
6546
6658
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
6547
- import_node_fs27 = require("node:fs");
6548
- import_node_path31 = require("node:path");
6659
+ import_node_fs28 = require("node:fs");
6660
+ import_node_path32 = require("node:path");
6549
6661
  init_version_range();
6550
6662
  import_oxc_parser2 = require("oxc-parser");
6551
6663
  import_sucrase = require("sucrase");
@@ -6581,12 +6693,12 @@ function resolveFileEntries(entries, configDir) {
6581
6693
  return Object.fromEntries(
6582
6694
  Object.entries(entries).map(([name2, resolution]) => [
6583
6695
  name2,
6584
- resolution && typeof resolution === "object" && "file" in resolution && typeof resolution.file === "string" ? { ...resolution, file: import_node_path32.default.resolve(configDir, resolution.file) } : resolution
6696
+ resolution && typeof resolution === "object" && "file" in resolution && typeof resolution.file === "string" ? { ...resolution, file: import_node_path33.default.resolve(configDir, resolution.file) } : resolution
6585
6697
  ])
6586
6698
  );
6587
6699
  }
6588
6700
  function resolveConfigReplacementFiles(config, configPath) {
6589
- const configDir = import_node_path32.default.dirname(configPath);
6701
+ const configDir = import_node_path33.default.dirname(configPath);
6590
6702
  return {
6591
6703
  ...config,
6592
6704
  modules: resolveFileEntries(config.modules, configDir)
@@ -6602,7 +6714,7 @@ async function loadRNXAppStubs(project) {
6602
6714
  return resolveAppStubs(
6603
6715
  project.appDir,
6604
6716
  config,
6605
- project.configPath ? import_node_path32.default.dirname(project.configPath) : project.appDir
6717
+ project.configPath ? import_node_path33.default.dirname(project.configPath) : project.appDir
6606
6718
  );
6607
6719
  } catch (error) {
6608
6720
  const message = error instanceof Error ? error.message : String(error);
@@ -6621,7 +6733,7 @@ async function loadConfigFile(project) {
6621
6733
  [`${rnxPublicBrand.packageName}/config`]: config_exports
6622
6734
  }
6623
6735
  });
6624
- const loaded3 = project.configPath.endsWith(".json") ? JSON.parse((0, import_node_fs28.readFileSync)(project.configPath, "utf8")) : await jiti.import(project.configPath, { default: true });
6736
+ const loaded3 = project.configPath.endsWith(".json") ? JSON.parse((0, import_node_fs29.readFileSync)(project.configPath, "utf8")) : await jiti.import(project.configPath, { default: true });
6625
6737
  if (!isPeachConfig(loaded3)) {
6626
6738
  throw new Error("the default export must be a peach config object");
6627
6739
  }
@@ -6657,13 +6769,13 @@ async function resolveRNXAppConfig(startDir = process.cwd()) {
6657
6769
  const project = resolveAppProject(startDir);
6658
6770
  return { project, ...await loadRNXAppStubs(project) };
6659
6771
  }
6660
- var import_node_fs28, import_node_path32, import_jiti, WIRE_SLOTS;
6772
+ var import_node_fs29, import_node_path33, import_jiti, WIRE_SLOTS;
6661
6773
  var init_app_config = __esm({
6662
6774
  "cli/app-config.ts"() {
6663
6775
  "use strict";
6664
6776
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
6665
- import_node_fs28 = require("node:fs");
6666
- import_node_path32 = __toESM(require("node:path"), 1);
6777
+ import_node_fs29 = require("node:fs");
6778
+ import_node_path33 = __toESM(require("node:path"), 1);
6667
6779
  import_jiti = require("jiti");
6668
6780
  init_config();
6669
6781
  init_config();
@@ -6763,14 +6875,14 @@ async function produceConfiguredBundle(source, config, runtimePackages) {
6763
6875
  const neededPackages = /* @__PURE__ */ new Set();
6764
6876
  const factories = [];
6765
6877
  const visit3 = (filePath) => {
6766
- const real = import_node_fs29.default.realpathSync(filePath);
6878
+ const real = import_node_fs30.default.realpathSync(filePath);
6767
6879
  const previous = files.get(real);
6768
6880
  if (previous !== void 0) return previous;
6769
6881
  const id = "peach-config-file:" + files.size;
6770
6882
  files.set(real, id);
6771
6883
  const compiled = compileReplacementModule({
6772
6884
  filePath: real,
6773
- source: import_node_fs29.default.readFileSync(real, "utf8"),
6885
+ source: import_node_fs30.default.readFileSync(real, "utf8"),
6774
6886
  runtimePackages,
6775
6887
  localModuleUrl: (specifier) => visit3(resolveReplacementModuleFile(real, specifier))
6776
6888
  });
@@ -6794,7 +6906,7 @@ async function produceConfiguredBundle(source, config, runtimePackages) {
6794
6906
  if (!entries || typeof entries !== "object") continue;
6795
6907
  for (const resolution of Object.values(entries)) {
6796
6908
  if (resolution && typeof resolution === "object" && "file" in resolution && typeof resolution.file === "string") {
6797
- resolution.file = visit3(import_node_path33.default.resolve(resolution.file));
6909
+ resolution.file = visit3(import_node_path34.default.resolve(resolution.file));
6798
6910
  }
6799
6911
  }
6800
6912
  }
@@ -6818,13 +6930,13 @@ async function produceConfiguredBundle(source, config, runtimePackages) {
6818
6930
  const identityStart = findBundleFooter(source, "globalThis.__sootsimModulePaths=");
6819
6931
  return prefix2 + (identityStart < 0 ? source + footer : source.slice(0, identityStart) + footer + source.slice(identityStart));
6820
6932
  }
6821
- var import_node_fs29, import_node_path33, import_sucrase2, import_terser, PREFIX_START, PREFIX_END;
6933
+ var import_node_fs30, import_node_path34, import_sucrase2, import_terser, PREFIX_START, PREFIX_END;
6822
6934
  var init_configured_bundle_producer = __esm({
6823
6935
  "src/configured-bundle-producer.ts"() {
6824
6936
  "use strict";
6825
6937
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
6826
- import_node_fs29 = __toESM(require("node:fs"), 1);
6827
- import_node_path33 = __toESM(require("node:path"), 1);
6938
+ import_node_fs30 = __toESM(require("node:fs"), 1);
6939
+ import_node_path34 = __toESM(require("node:path"), 1);
6828
6940
  init_bundle_global_footer();
6829
6941
  import_sucrase2 = require("sucrase");
6830
6942
  import_terser = require("terser");
@@ -6961,7 +7073,7 @@ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
6961
7073
  init_version();
6962
7074
 
6963
7075
  // runtime-companion.json
6964
- var runtime_companion_default = { abi: 1, sha256: "d1826a4d4d05c87a157d5b160177de9cd6f1fd10a3d142804a92a0d57ff3060f", file: "node/cli-d1826a4d4d05c87a157d5b160177de9cd6f1fd10a3d142804a92a0d57ff3060f.cjs" };
7076
+ var runtime_companion_default = { abi: 1, sha256: "c63f83dd24fd36986b72da8da6b6a51edce0a2d061e3bc05d3439d22b1a86c91", file: "node/cli-c63f83dd24fd36986b72da8da6b6a51edce0a2d061e3bc05d3439d22b1a86c91.cjs" };
6965
7077
 
6966
7078
  // src/answeredNativePackages.ts
6967
7079
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
@@ -12120,7 +12232,7 @@ function readIosSdkTree(root) {
12120
12232
 
12121
12233
  // src/swift-standin-digest.ts
12122
12234
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
12123
- var STANDIN_SOURCE_DIGEST = true ? "0981767eef4ad46fe5cb602ee15f1de9ea06dac3a2edb4dab0f6d5279b018a3b" : standinSourceDigest();
12235
+ var STANDIN_SOURCE_DIGEST = true ? "62c7fc880aa6efc985c4786587cb8441b81094e44c28f8d65e1d6dffda9c24f4" : standinSourceDigest();
12124
12236
 
12125
12237
  // src/expo-native-workspace.ts
12126
12238
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
@@ -12392,6 +12504,34 @@ init_is_record();
12392
12504
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
12393
12505
  init_assetCatalogContract();
12394
12506
  init_is_record();
12507
+ function resolveNativeBundleIcons(icons, catalogNames, resolveReference) {
12508
+ if (!isRecord(icons) && catalogNames.length === 0) return void 0;
12509
+ const resolve5 = (value) => {
12510
+ if (typeof value === "string") return resolveReference(value);
12511
+ if (Array.isArray(value)) return value.map(resolve5);
12512
+ if (isRecord(value))
12513
+ return Object.fromEntries(
12514
+ Object.entries(value).map(([key, entry]) => [
12515
+ resolveReference(key),
12516
+ resolve5(entry)
12517
+ ])
12518
+ );
12519
+ return value;
12520
+ };
12521
+ const dictionary = isRecord(icons) ? Object.fromEntries(
12522
+ Object.entries(icons).map(([key, value]) => [key, resolve5(value)])
12523
+ ) : {};
12524
+ if (catalogNames.length === 0) return dictionary;
12525
+ return {
12526
+ ...dictionary,
12527
+ CFBundleAlternateIcons: {
12528
+ ...Object.fromEntries(
12529
+ catalogNames.map((name2) => [name2, { CFBundleIconName: name2 }])
12530
+ ),
12531
+ ...isRecord(dictionary.CFBundleAlternateIcons) ? dictionary.CFBundleAlternateIcons : {}
12532
+ }
12533
+ };
12534
+ }
12395
12535
  function resolveNativeAppIconArtwork(resources, readText, resourceUri, icons, primaryName, alternateNames, resolveReference) {
12396
12536
  const members = new Set(resources);
12397
12537
  const dictionary = isRecord(icons) ? icons : {};
@@ -12815,10 +12955,10 @@ function appTargetReleaseSettings(pbxproj, targetName, infoPlistRelativePath) {
12815
12955
  var APP_DELEGATE_PATH_RE = /(?:^|\/)(?:ios\/)?([^/]+)\/AppDelegate\.(?:swift|mm|m)$/;
12816
12956
  function nativeAppIdentityFromIos(files, parseInfoPlist, iosTarget, resourceUri) {
12817
12957
  const pbxprojPath = Object.keys(files).find(
12818
- (path31) => /(?:^|\/)ios\/[^/]+\.xcodeproj\/project\.pbxproj$/.test(path31)
12958
+ (path32) => /(?:^|\/)ios\/[^/]+\.xcodeproj\/project\.pbxproj$/.test(path32)
12819
12959
  ) ?? Object.keys(files).find(
12820
- (path31) => /(?:^|\/)[^/]+\.xcodeproj\/project\.pbxproj$/.test(path31)
12821
- ) ?? Object.keys(files).find((path31) => /(?:^|\/)project\.pbxproj$/.test(path31));
12960
+ (path32) => /(?:^|\/)[^/]+\.xcodeproj\/project\.pbxproj$/.test(path32)
12961
+ ) ?? Object.keys(files).find((path32) => /(?:^|\/)project\.pbxproj$/.test(path32));
12822
12962
  if (!pbxprojPath) return null;
12823
12963
  const pbxproj = files[pbxprojPath];
12824
12964
  let objects = {};
@@ -12860,7 +13000,7 @@ function nativeAppIdentityFromIos(files, parseInfoPlist, iosTarget, resourceUri)
12860
13000
  } else if (applicationTargetNames.size === 1) {
12861
13001
  targetName = [...applicationTargetNames][0];
12862
13002
  } else if (applicationTargetNames.size > 1) {
12863
- const delegateTargets = Object.keys(files).filter((path31) => !path31.includes("/Pods/")).map((path31) => path31.match(APP_DELEGATE_PATH_RE)?.[1]).filter(
13003
+ const delegateTargets = Object.keys(files).filter((path32) => !path32.includes("/Pods/")).map((path32) => path32.match(APP_DELEGATE_PATH_RE)?.[1]).filter(
12864
13004
  (name2) => typeof name2 === "string" && applicationTargetNames.has(name2)
12865
13005
  );
12866
13006
  if (delegateTargets.length === 1) {
@@ -12989,8 +13129,11 @@ function nativeAppIdentityFromIos(files, parseInfoPlist, iosTarget, resourceUri)
12989
13129
  );
12990
13130
  if (alternateSetting === null)
12991
13131
  throw new Error("native alternate icon setting is unresolved");
13132
+ const catalogAlternateNames = [];
12992
13133
  for (const match of alternateSetting.replace(/\\"/g, '"').matchAll(/"([^"]*)"|([^\s(),]+)/g)) {
12993
- alternateIconNames.add(match[1] ?? match[2]);
13134
+ const name2 = match[1] ?? match[2];
13135
+ alternateIconNames.add(name2);
13136
+ catalogAlternateNames.push(name2);
12994
13137
  }
12995
13138
  const intentIds = dictionary.OneAppIntentIdentifiers;
12996
13139
  const appIntentIdentifiers = Array.isArray(intentIds) && intentIds.every((value) => typeof value === "string") ? intentIds.map((value) => resolveBuildSetting(value, settings)) : [];
@@ -13098,7 +13241,7 @@ function nativeAppIdentityFromIos(files, parseInfoPlist, iosTarget, resourceUri)
13098
13241
  if (Object.hasOwn(files, file)) return [file];
13099
13242
  const prefix2 = file === "" ? "" : `${file.replace(/\/$/, "")}/`;
13100
13243
  return paths.filter(
13101
- (path31) => path31.startsWith(prefix2) && !/(?:^|\/)\./.test(path31.slice(prefix2.length))
13244
+ (path32) => path32.startsWith(prefix2) && !/(?:^|\/)\./.test(path32.slice(prefix2.length))
13102
13245
  );
13103
13246
  },
13104
13247
  join9,
@@ -13109,7 +13252,7 @@ function nativeAppIdentityFromIos(files, parseInfoPlist, iosTarget, resourceUri)
13109
13252
  }
13110
13253
  const rootModuleName = readRootModuleName(
13111
13254
  Object.entries(files).filter(
13112
- ([path31]) => !path31.includes("/Pods/") && (/(?:^|\/)(?:ios\/)?AppDelegate\.(?:swift|mm|m)$/.test(path31) || path31.match(APP_DELEGATE_PATH_RE)?.[1] === targetName)
13255
+ ([path32]) => !path32.includes("/Pods/") && (/(?:^|\/)(?:ios\/)?AppDelegate\.(?:swift|mm|m)$/.test(path32) || path32.match(APP_DELEGATE_PATH_RE)?.[1] === targetName)
13113
13256
  ).map(([, source]) => source)
13114
13257
  );
13115
13258
  return {
@@ -13138,6 +13281,11 @@ function nativeAppIdentityFromIos(files, parseInfoPlist, iosTarget, resourceUri)
13138
13281
  ipadSupportedInterfaceOrientations,
13139
13282
  ...defaultScreenOrientationMask === void 0 ? {} : { defaultScreenOrientationMask },
13140
13283
  alternateIconNames: [...alternateIconNames],
13284
+ bundleIcons: resolveNativeBundleIcons(icons, catalogAlternateNames, (value) => {
13285
+ const resolved = resolveBuildSetting(value, settings);
13286
+ if (resolved === null) throw new Error("native bundle icon reference is unresolved");
13287
+ return resolved;
13288
+ }),
13141
13289
  ...resourceUri ? {
13142
13290
  appIconArtwork: resolveNativeAppIconArtwork(
13143
13291
  [...resources],
@@ -14249,7 +14397,7 @@ var FOUNDATION_IMPLICIT_MODULES = [
14249
14397
  var FOUNDATION_IMPLICIT_FLAGS = FOUNDATION_IMPLICIT_MODULES.map(
14250
14398
  (module2) => `, "-Xfrontend", "-import-module", "-Xfrontend", "${module2}"`
14251
14399
  ).join("");
14252
- var compilerSourceDigest = true ? "e48d05f659c020e9d4ddc0f6a17da7924aae807faacd6bef7cbed911c43d08cc" : swiftCompilerSourceDigest2(__sootsim_import_meta_dirname);
14400
+ var compilerSourceDigest = true ? "08a3436f8de8fff57c3ffe7822dc37ac9addd391678cb64d73212534a6e94aa1" : swiftCompilerSourceDigest2(__sootsim_import_meta_dirname);
14253
14401
  var CORE_FOUNDATION_HANDLE_IMPORTS = [
14254
14402
  "CFAllocator",
14255
14403
  "CFArray",
@@ -17373,9 +17521,9 @@ init_is_record();
17373
17521
 
17374
17522
  // src/native-app-identity-project.ts
17375
17523
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
17376
- var import_node_fs19 = __toESM(require("node:fs"), 1);
17377
- var import_node_module2 = require("node:module");
17378
- var import_node_path21 = __toESM(require("node:path"), 1);
17524
+ var import_node_fs20 = __toESM(require("node:fs"), 1);
17525
+ var import_node_module3 = require("node:module");
17526
+ var import_node_path22 = __toESM(require("node:path"), 1);
17379
17527
  init_is_record();
17380
17528
  function nonEmptyString2(value) {
17381
17529
  return typeof value === "string" && value.length > 0 ? value : void 0;
@@ -17423,9 +17571,13 @@ function readNativeAppIdentityFromXcodeTarget(app, parseInfoPlist = parsePlistSo
17423
17571
  }
17424
17572
  }
17425
17573
  const alternateSetting = settings?.("ASSETCATALOG_COMPILER_ALTERNATE_APPICON_NAMES") ?? "";
17574
+ const catalogAlternateNames = [];
17426
17575
  for (const match of alternateSetting.replace(/\\"/g, '"').matchAll(/"([^"]*)"|([^\s(),]+)/g)) {
17427
17576
  const val = match[1] ?? match[2];
17428
- if (val) alternateIconNames.add(val);
17577
+ if (val) {
17578
+ alternateIconNames.add(val);
17579
+ catalogAlternateNames.push(val);
17580
+ }
17429
17581
  }
17430
17582
  const permissionUsageDescriptions = {};
17431
17583
  for (const [key, value] of Object.entries(dictionary)) {
@@ -17459,7 +17611,7 @@ function readNativeAppIdentityFromXcodeTarget(app, parseInfoPlist = parsePlistSo
17459
17611
  const rtcAppGroupIdentifier = nonEmptyString2(dictionary.RTCAppGroupIdentifier);
17460
17612
  const screenShareExtensionBundleId = typeof dictionary.ScreenShareExtensionBundleId === "string" ? dictionary.ScreenShareExtensionBundleId : void 0;
17461
17613
  const rootModuleName = readRootModuleName(
17462
- app.allSources.filter((file) => /Delegate\.(?:swift|mm|m)$/.test(file) && import_node_fs19.default.existsSync(file)).map((file) => import_node_fs19.default.readFileSync(file, "utf8"))
17614
+ app.allSources.filter((file) => /Delegate\.(?:swift|mm|m)$/.test(file) && import_node_fs20.default.existsSync(file)).map((file) => import_node_fs20.default.readFileSync(file, "utf8"))
17463
17615
  );
17464
17616
  return stampNativeBuildSdk({
17465
17617
  ...app.keychainAccessGroups === void 0 ? {} : { keychainAccessGroups: app.keychainAccessGroups },
@@ -17481,20 +17633,21 @@ function readNativeAppIdentityFromXcodeTarget(app, parseInfoPlist = parsePlistSo
17481
17633
  googleSignIn: readGoogleSignInConfiguration(
17482
17634
  dictionary,
17483
17635
  Object.fromEntries(
17484
- app.resources.filter((file) => file.endsWith(".plist")).map((file) => [file, parseInfoPlist(import_node_fs19.default.readFileSync(file, "utf8"))])
17636
+ app.resources.filter((file) => file.endsWith(".plist")).map((file) => [file, parseInfoPlist(import_node_fs20.default.readFileSync(file, "utf8"))])
17485
17637
  )
17486
17638
  ),
17487
17639
  supportedInterfaceOrientations,
17488
17640
  ipadSupportedInterfaceOrientations,
17489
17641
  ...defaultScreenOrientationMask ? { defaultScreenOrientationMask } : {},
17490
17642
  alternateIconNames: [...alternateIconNames],
17643
+ bundleIcons: resolveNativeBundleIcons(icons, catalogAlternateNames, (value) => value),
17491
17644
  appIconArtwork: resolveNativeAppIconArtwork(
17492
17645
  app.resources,
17493
- (file) => import_node_fs19.default.readFileSync(file, "utf8"),
17646
+ (file) => import_node_fs20.default.readFileSync(file, "utf8"),
17494
17647
  (file) => {
17495
- const extension = import_node_path21.default.extname(file).toLowerCase();
17648
+ const extension = import_node_path22.default.extname(file).toLowerCase();
17496
17649
  const contentType = extension === ".jpg" || extension === ".jpeg" ? "image/jpeg" : extension === ".webp" ? "image/webp" : "image/png";
17497
- return `data:${contentType};base64,${import_node_fs19.default.readFileSync(file).toString("base64")}`;
17650
+ return `data:${contentType};base64,${import_node_fs20.default.readFileSync(file).toString("base64")}`;
17498
17651
  },
17499
17652
  icons,
17500
17653
  app.appIconName,
@@ -17524,11 +17677,11 @@ function readNativeAppIdentityFromSources(projectRoot, platform, parseInfoPlist,
17524
17677
  const read = selectNativeAppIdentityReader(platform, {
17525
17678
  android: () => null,
17526
17679
  ios: () => {
17527
- const nested = import_node_path21.default.join(projectRoot, "ios");
17528
- const iosRoot = import_node_fs19.default.existsSync(nested) ? nested : projectRoot;
17680
+ const nested = import_node_path22.default.join(projectRoot, "ios");
17681
+ const iosRoot = import_node_fs20.default.existsSync(nested) ? nested : projectRoot;
17529
17682
  const prefix2 = iosRoot === nested ? "ios/" : "";
17530
17683
  const files = {};
17531
- for (const entry of import_node_fs19.default.readdirSync(iosRoot, { withFileTypes: true })) {
17684
+ for (const entry of import_node_fs20.default.readdirSync(iosRoot, { withFileTypes: true })) {
17532
17685
  if (entry.name === "Pods") continue;
17533
17686
  if (entry.isDirectory()) {
17534
17687
  const names = entry.name.endsWith(".xcodeproj") ? ["project.pbxproj"] : [
@@ -17536,17 +17689,17 @@ function readNativeAppIdentityFromSources(projectRoot, platform, parseInfoPlist,
17536
17689
  "AppDelegate.swift",
17537
17690
  "AppDelegate.mm",
17538
17691
  "AppDelegate.m",
17539
- ...import_node_fs19.default.readdirSync(import_node_path21.default.join(iosRoot, entry.name)).filter((name2) => name2.endsWith(".entitlements"))
17692
+ ...import_node_fs20.default.readdirSync(import_node_path22.default.join(iosRoot, entry.name)).filter((name2) => name2.endsWith(".entitlements"))
17540
17693
  ];
17541
17694
  for (const name2 of names) {
17542
17695
  const relative3 = `${prefix2}${entry.name}/${name2}`;
17543
- const file = import_node_path21.default.join(projectRoot, relative3);
17544
- if (import_node_fs19.default.existsSync(file)) files[relative3] = import_node_fs19.default.readFileSync(file, "utf8");
17696
+ const file = import_node_path22.default.join(projectRoot, relative3);
17697
+ if (import_node_fs20.default.existsSync(file)) files[relative3] = import_node_fs20.default.readFileSync(file, "utf8");
17545
17698
  }
17546
17699
  } else if (/AppDelegate\.(?:swift|mm|m)$|\.entitlements$/.test(entry.name)) {
17547
17700
  const relative3 = `${prefix2}${entry.name}`;
17548
- const file = import_node_path21.default.join(projectRoot, relative3);
17549
- if (import_node_fs19.default.existsSync(file)) files[relative3] = import_node_fs19.default.readFileSync(file, "utf8");
17701
+ const file = import_node_path22.default.join(projectRoot, relative3);
17702
+ if (import_node_fs20.default.existsSync(file)) files[relative3] = import_node_fs20.default.readFileSync(file, "utf8");
17550
17703
  }
17551
17704
  }
17552
17705
  const identity = extractNativeAppIdentityFromFiles(
@@ -17563,41 +17716,41 @@ function readNativeAppIdentityFromSources(projectRoot, platform, parseInfoPlist,
17563
17716
  function readAndroidNativeAppIdentity(projectRoot, androidMergedManifest) {
17564
17717
  const files = {};
17565
17718
  if (androidMergedManifest) {
17566
- const file = import_node_path21.default.resolve(projectRoot, androidMergedManifest);
17567
- if (!import_node_fs19.default.existsSync(file)) return null;
17568
- files[androidMergedManifest] = import_node_fs19.default.readFileSync(file, "utf8");
17719
+ const file = import_node_path22.default.resolve(projectRoot, androidMergedManifest);
17720
+ if (!import_node_fs20.default.existsSync(file)) return null;
17721
+ files[androidMergedManifest] = import_node_fs20.default.readFileSync(file, "utf8");
17569
17722
  } else {
17570
- const androidRoot = import_node_path21.default.join(projectRoot, "android");
17571
- if (!import_node_fs19.default.existsSync(androidRoot)) return null;
17723
+ const androidRoot = import_node_path22.default.join(projectRoot, "android");
17724
+ if (!import_node_fs20.default.existsSync(androidRoot)) return null;
17572
17725
  const collect = (directory) => {
17573
- for (const entry of import_node_fs19.default.readdirSync(directory, { withFileTypes: true })) {
17574
- const file = import_node_path21.default.join(directory, entry.name);
17726
+ for (const entry of import_node_fs20.default.readdirSync(directory, { withFileTypes: true })) {
17727
+ const file = import_node_path22.default.join(directory, entry.name);
17575
17728
  if (entry.isDirectory()) collect(file);
17576
17729
  else if (entry.isFile() && entry.name === "AndroidManifest.xml")
17577
- files[import_node_path21.default.relative(projectRoot, file).split(import_node_path21.default.sep).join("/")] = import_node_fs19.default.readFileSync(file, "utf8");
17730
+ files[import_node_path22.default.relative(projectRoot, file).split(import_node_path22.default.sep).join("/")] = import_node_fs20.default.readFileSync(file, "utf8");
17578
17731
  }
17579
17732
  };
17580
- for (const module2 of import_node_fs19.default.readdirSync(androidRoot, { withFileTypes: true })) {
17733
+ for (const module2 of import_node_fs20.default.readdirSync(androidRoot, { withFileTypes: true })) {
17581
17734
  if (!module2.isDirectory()) continue;
17582
- const outputs = import_node_path21.default.join(
17735
+ const outputs = import_node_path22.default.join(
17583
17736
  androidRoot,
17584
17737
  module2.name,
17585
17738
  "build/intermediates/merged_manifests"
17586
17739
  );
17587
- if (import_node_fs19.default.existsSync(outputs)) collect(outputs);
17740
+ if (import_node_fs20.default.existsSync(outputs)) collect(outputs);
17588
17741
  }
17589
17742
  }
17590
17743
  for (const manifest of Object.keys(files)) {
17591
17744
  const resourceDirectory = androidMergedResourceValuesDirectory(manifest);
17592
17745
  if (!resourceDirectory) continue;
17593
- const absolute = import_node_path21.default.resolve(projectRoot, resourceDirectory);
17594
- if (!import_node_fs19.default.existsSync(absolute)) continue;
17595
- for (const entry of import_node_fs19.default.readdirSync(absolute, { withFileTypes: true })) {
17746
+ const absolute = import_node_path22.default.resolve(projectRoot, resourceDirectory);
17747
+ if (!import_node_fs20.default.existsSync(absolute)) continue;
17748
+ for (const entry of import_node_fs20.default.readdirSync(absolute, { withFileTypes: true })) {
17596
17749
  if (!entry.isDirectory() || !/^values(?:-|$)/.test(entry.name)) continue;
17597
- for (const resource of import_node_fs19.default.readdirSync(import_node_path21.default.join(absolute, entry.name))) {
17750
+ for (const resource of import_node_fs20.default.readdirSync(import_node_path22.default.join(absolute, entry.name))) {
17598
17751
  if (!resource.endsWith(".xml")) continue;
17599
17752
  const file = `${resourceDirectory}/${entry.name}/${resource}`;
17600
- files[file] = import_node_fs19.default.readFileSync(import_node_path21.default.resolve(projectRoot, file), "utf8");
17753
+ files[file] = import_node_fs20.default.readFileSync(import_node_path22.default.resolve(projectRoot, file), "utf8");
17601
17754
  }
17602
17755
  }
17603
17756
  }
@@ -17614,8 +17767,8 @@ function readIosNativeAppIdentity(projectRoot, parseInfoPlist, iosTarget, enviro
17614
17767
  const app = readIosAppTarget(projectRoot, iosTarget, environment);
17615
17768
  if (!app) return null;
17616
17769
  const identity = readNativeAppIdentityFromXcodeTarget(app, parseInfoPlist);
17617
- const projectManifestPath = import_node_path21.default.join(projectRoot, "package.json");
17618
- const projectRequire = (0, import_node_module2.createRequire)(projectManifestPath);
17770
+ const projectManifestPath = import_node_path22.default.join(projectRoot, "package.json");
17771
+ const projectRequire = (0, import_node_module3.createRequire)(projectManifestPath);
17619
17772
  let reanimatedManifestPath;
17620
17773
  try {
17621
17774
  reanimatedManifestPath = projectRequire.resolve(
@@ -17628,22 +17781,22 @@ function readIosNativeAppIdentity(projectRoot, parseInfoPlist, iosTarget, enviro
17628
17781
  throw error;
17629
17782
  }
17630
17783
  const installedManifest = JSON.parse(
17631
- import_node_fs19.default.readFileSync(reanimatedManifestPath, "utf8")
17784
+ import_node_fs20.default.readFileSync(reanimatedManifestPath, "utf8")
17632
17785
  );
17633
17786
  const installedVersion = isRecord(installedManifest) ? nonEmptyString2(installedManifest.version) : void 0;
17634
17787
  if (!installedVersion) throw new Error("Reanimated package version is malformed");
17635
17788
  if (Number.parseInt(installedVersion, 10) < 4) return identity;
17636
17789
  const defaults = JSON.parse(
17637
- import_node_fs19.default.readFileSync(
17638
- import_node_path21.default.join(
17639
- import_node_path21.default.dirname(reanimatedManifestPath),
17790
+ import_node_fs20.default.readFileSync(
17791
+ import_node_path22.default.join(
17792
+ import_node_path22.default.dirname(reanimatedManifestPath),
17640
17793
  "src/featureFlags/staticFlags.json"
17641
17794
  ),
17642
17795
  "utf8"
17643
17796
  )
17644
17797
  );
17645
17798
  if (!isRecord(defaults)) throw new Error("Reanimated static flags are malformed");
17646
- const manifest = JSON.parse(import_node_fs19.default.readFileSync(projectManifestPath, "utf8"));
17799
+ const manifest = JSON.parse(import_node_fs20.default.readFileSync(projectManifestPath, "utf8"));
17647
17800
  const reanimated = isRecord(manifest) ? manifest.reanimated : void 0;
17648
17801
  const overrides = isRecord(reanimated) ? reanimated.staticFeatureFlags : void 0;
17649
17802
  if (overrides !== void 0 && !isRecord(overrides)) {
@@ -20525,8 +20678,8 @@ var COMPAT_STUBS = {
20525
20678
 
20526
20679
  // src/installed-native-build-options.ts
20527
20680
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
20528
- var import_node_fs20 = __toESM(require("node:fs"), 1);
20529
- var import_node_path22 = __toESM(require("node:path"), 1);
20681
+ var import_node_fs21 = __toESM(require("node:fs"), 1);
20682
+ var import_node_path23 = __toESM(require("node:path"), 1);
20530
20683
  init_version_range();
20531
20684
  var RIVE_PACKAGE = "@rive-app/react-native";
20532
20685
  var RIVE_05 = [">=0.5.0 <0.6.0"];
@@ -20535,10 +20688,10 @@ function missing(error) {
20535
20688
  }
20536
20689
  function answerSync(step) {
20537
20690
  try {
20538
- if (step.type === "realpath") return import_node_fs20.default.realpathSync(step.path);
20539
- if (step.type === "read") return import_node_fs20.default.readFileSync(step.path, "utf8");
20540
- if (step.type === "isDirectory") return import_node_fs20.default.statSync(step.path).isDirectory();
20541
- return import_node_fs20.default.readdirSync(step.path, { withFileTypes: true }).map((entry) => ({
20691
+ if (step.type === "realpath") return import_node_fs21.default.realpathSync(step.path);
20692
+ if (step.type === "read") return import_node_fs21.default.readFileSync(step.path, "utf8");
20693
+ if (step.type === "isDirectory") return import_node_fs21.default.statSync(step.path).isDirectory();
20694
+ return import_node_fs21.default.readdirSync(step.path, { withFileTypes: true }).map((entry) => ({
20542
20695
  name: entry.name,
20543
20696
  directory: entry.isDirectory(),
20544
20697
  symbolicLink: entry.isSymbolicLink()
@@ -20550,11 +20703,11 @@ function answerSync(step) {
20550
20703
  }
20551
20704
  async function answerAsync(step) {
20552
20705
  try {
20553
- if (step.type === "realpath") return await import_node_fs20.default.promises.realpath(step.path);
20554
- if (step.type === "read") return await import_node_fs20.default.promises.readFile(step.path, "utf8");
20706
+ if (step.type === "realpath") return await import_node_fs21.default.promises.realpath(step.path);
20707
+ if (step.type === "read") return await import_node_fs21.default.promises.readFile(step.path, "utf8");
20555
20708
  if (step.type === "isDirectory")
20556
- return (await import_node_fs20.default.promises.stat(step.path)).isDirectory();
20557
- return (await import_node_fs20.default.promises.readdir(step.path, { withFileTypes: true })).map(
20709
+ return (await import_node_fs21.default.promises.stat(step.path)).isDirectory();
20710
+ return (await import_node_fs21.default.promises.readdir(step.path, { withFileTypes: true })).map(
20558
20711
  (entry) => ({
20559
20712
  name: entry.name,
20560
20713
  directory: entry.isDirectory(),
@@ -20587,7 +20740,7 @@ function* rubyFiles(directory, seen, iosRoot = false) {
20587
20740
  const files = [];
20588
20741
  for (const entry of entries.sort((a, b) => a.name.localeCompare(b.name))) {
20589
20742
  if (iosRoot && (entry.name === "Pods" || entry.name === "build")) continue;
20590
- const target = import_node_path22.default.join(directory, entry.name);
20743
+ const target = import_node_path23.default.join(directory, entry.name);
20591
20744
  let isDirectory2 = entry.directory;
20592
20745
  if (entry.symbolicLink)
20593
20746
  isDirectory2 = (yield { type: "isDirectory", path: target }) === true;
@@ -20600,7 +20753,7 @@ function* nativeBuildOptionsWalk(projectRoot, versions, environment) {
20600
20753
  let sensorOptions = {};
20601
20754
  const sensors = versions["expo-sensors"];
20602
20755
  if (sensors && resolveCompatVersionRange([">=58.0.4 <59.0.0"], sensors).status === "matched") {
20603
- const file = import_node_path22.default.join(projectRoot, "ios", "Podfile.properties.json");
20756
+ const file = import_node_path23.default.join(projectRoot, "ios", "Podfile.properties.json");
20604
20757
  const source = yield { type: "read", path: file };
20605
20758
  if (source !== null && typeof source !== "string")
20606
20759
  throw new Error(`cannot inspect ${file}`);
@@ -20616,8 +20769,8 @@ function* nativeBuildOptionsWalk(projectRoot, versions, environment) {
20616
20769
  if (!needsRiveOptions(versions)) return sensorOptions;
20617
20770
  if (environment.USE_RIVE_LEGACY === "1" || environment.USE_RIVE_LEGACY === "true")
20618
20771
  return { ...sensorOptions, [RIVE_PACKAGE]: { USE_RIVE_LEGACY: true } };
20619
- const ios = import_node_path22.default.join(projectRoot, "ios");
20620
- const podfile = import_node_path22.default.join(ios, "Podfile");
20772
+ const ios = import_node_path23.default.join(projectRoot, "ios");
20773
+ const podfile = import_node_path23.default.join(ios, "Podfile");
20621
20774
  const files = [podfile, ...yield* rubyFiles(ios, /* @__PURE__ */ new Set(), true)];
20622
20775
  let value = false;
20623
20776
  let assigned = false;
@@ -20890,9 +21043,9 @@ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
20890
21043
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
20891
21044
  var import_child_process2 = require("child_process");
20892
21045
  var import_promises = require("fs/promises");
20893
- var import_node_fs21 = require("node:fs");
21046
+ var import_node_fs22 = require("node:fs");
20894
21047
  var import_node_os4 = require("node:os");
20895
- var import_node_path23 = require("node:path");
21048
+ var import_node_path24 = require("node:path");
20896
21049
  init_backend_origin();
20897
21050
  init_config();
20898
21051
 
@@ -21041,8 +21194,8 @@ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
21041
21194
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
21042
21195
 
21043
21196
  // scripts/dev-server-scanner.ts
21044
- var LISTENER_LOCK_PATH = (0, import_node_path23.join)((0, import_node_os4.tmpdir)(), "peach-listener-scan.lock");
21045
- var LISTENER_RESULT_PATH = (0, import_node_path23.join)((0, import_node_os4.tmpdir)(), "peach-listener-scan.result");
21197
+ var LISTENER_LOCK_PATH = (0, import_node_path24.join)((0, import_node_os4.tmpdir)(), "peach-listener-scan.lock");
21198
+ var LISTENER_RESULT_PATH = (0, import_node_path24.join)((0, import_node_os4.tmpdir)(), "peach-listener-scan.result");
21046
21199
  var LISTENER_LOCK_STALE_MS = 25e3;
21047
21200
  var LISTENER_LOCK_WAIT_MS = 8e3;
21048
21201
  function sleep2(ms) {
@@ -21060,8 +21213,8 @@ function pidIsAlive(pid) {
21060
21213
  }
21061
21214
  function readLockOwner() {
21062
21215
  try {
21063
- const raw = (0, import_node_fs21.readFileSync)(LISTENER_LOCK_PATH, "utf8");
21064
- const mtimeMs = (0, import_node_fs21.statSync)(LISTENER_LOCK_PATH).mtimeMs;
21216
+ const raw = (0, import_node_fs22.readFileSync)(LISTENER_LOCK_PATH, "utf8");
21217
+ const mtimeMs = (0, import_node_fs22.statSync)(LISTENER_LOCK_PATH).mtimeMs;
21065
21218
  const pid = Number(raw.split("-")[0]);
21066
21219
  return { raw, pid: Number.isInteger(pid) ? pid : -1, mtimeMs };
21067
21220
  } catch {
@@ -21074,15 +21227,15 @@ function lockIsAbandoned(owner) {
21074
21227
  }
21075
21228
  function clearLock(raw) {
21076
21229
  try {
21077
- if ((0, import_node_fs21.readFileSync)(LISTENER_LOCK_PATH, "utf8") !== raw) return;
21078
- (0, import_node_fs21.unlinkSync)(LISTENER_LOCK_PATH);
21230
+ if ((0, import_node_fs22.readFileSync)(LISTENER_LOCK_PATH, "utf8") !== raw) return;
21231
+ (0, import_node_fs22.unlinkSync)(LISTENER_LOCK_PATH);
21079
21232
  } catch {
21080
21233
  }
21081
21234
  }
21082
21235
  function readResult() {
21083
21236
  try {
21084
21237
  const parsed = JSON.parse(
21085
- (0, import_node_fs21.readFileSync)(LISTENER_RESULT_PATH, "utf8")
21238
+ (0, import_node_fs22.readFileSync)(LISTENER_RESULT_PATH, "utf8")
21086
21239
  );
21087
21240
  if (!parsed || typeof parsed.token !== "string" || typeof parsed.key !== "string")
21088
21241
  return null;
@@ -21093,8 +21246,8 @@ function readResult() {
21093
21246
  }
21094
21247
  function publishResult(payload) {
21095
21248
  const tmp = `${LISTENER_RESULT_PATH}.${process.pid}.tmp`;
21096
- (0, import_node_fs21.writeFileSync)(tmp, JSON.stringify(payload));
21097
- (0, import_node_fs21.renameSync)(tmp, LISTENER_RESULT_PATH);
21249
+ (0, import_node_fs22.writeFileSync)(tmp, JSON.stringify(payload));
21250
+ (0, import_node_fs22.renameSync)(tmp, LISTENER_RESULT_PATH);
21098
21251
  }
21099
21252
  function throwPublished(payload) {
21100
21253
  throw Object.assign(new Error(payload.message || "listener scan failed"), {
@@ -21137,7 +21290,7 @@ async function withListenerLock(key, body) {
21137
21290
  for (; ; ) {
21138
21291
  let fd = null;
21139
21292
  try {
21140
- fd = (0, import_node_fs21.openSync)(LISTENER_LOCK_PATH, "wx");
21293
+ fd = (0, import_node_fs22.openSync)(LISTENER_LOCK_PATH, "wx");
21141
21294
  } catch (error) {
21142
21295
  const code = error instanceof Error && "code" in error ? error.code : "";
21143
21296
  if (code !== "EEXIST") throw error;
@@ -21146,7 +21299,7 @@ async function withListenerLock(key, body) {
21146
21299
  if (owner) clearLock(owner.raw);
21147
21300
  else {
21148
21301
  try {
21149
- (0, import_node_fs21.unlinkSync)(LISTENER_LOCK_PATH);
21302
+ (0, import_node_fs22.unlinkSync)(LISTENER_LOCK_PATH);
21150
21303
  } catch {
21151
21304
  }
21152
21305
  }
@@ -21162,7 +21315,7 @@ async function withListenerLock(key, body) {
21162
21315
  }
21163
21316
  if (fd === null) continue;
21164
21317
  try {
21165
- (0, import_node_fs21.writeSync)(fd, token);
21318
+ (0, import_node_fs22.writeSync)(fd, token);
21166
21319
  try {
21167
21320
  const value = await body();
21168
21321
  publishResult({ token, key, ok: true, value });
@@ -21179,7 +21332,7 @@ async function withListenerLock(key, body) {
21179
21332
  }
21180
21333
  } finally {
21181
21334
  try {
21182
- (0, import_node_fs21.closeSync)(fd);
21335
+ (0, import_node_fs22.closeSync)(fd);
21183
21336
  } catch {
21184
21337
  }
21185
21338
  clearLock(token);
@@ -21706,7 +21859,7 @@ function parseIpv6(text2) {
21706
21859
 
21707
21860
  // src/host/network-policy.ts
21708
21861
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
21709
- var import_node_path24 = require("node:path");
21862
+ var import_node_path25 = require("node:path");
21710
21863
  var import_node_url = require("node:url");
21711
21864
  var NETWORK_POLICY_TIMEOUT_MS = 1e4;
21712
21865
  var NetworkPolicyDeniedError = class extends Error {
@@ -21759,7 +21912,7 @@ function createNetworkAuthorizer(policy) {
21759
21912
  };
21760
21913
  }
21761
21914
  async function loadNetworkPolicy(file) {
21762
- if (!(0, import_node_path24.isAbsolute)(file)) {
21915
+ if (!(0, import_node_path25.isAbsolute)(file)) {
21763
21916
  throw new Error(`PEACH_NETWORK_POLICY must be an absolute path: ${file}`);
21764
21917
  }
21765
21918
  const loaded3 = await import(
@@ -22315,7 +22468,7 @@ init_replacement_module_handler();
22315
22468
 
22316
22469
  // src/one-native-app-catalog.ts
22317
22470
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
22318
- var import_node_path26 = __toESM(require("node:path"), 1);
22471
+ var import_node_path27 = __toESM(require("node:path"), 1);
22319
22472
  init_is_record();
22320
22473
  var ONE_NATIVE_APP_CATALOG_ROUTE = "/__peach/native-app-catalog";
22321
22474
  var HEX_COLOR = /^#[\da-f]{6}$/i;
@@ -22328,7 +22481,7 @@ function parseAccent(value) {
22328
22481
  function parseOneNativeAppCatalog(value) {
22329
22482
  if (!isRecord(value)) return null;
22330
22483
  const accentColor = parseAccent(value.accentColor);
22331
- const assetCatalog = typeof value.assetCatalog === "string" && import_node_path26.default.isAbsolute(value.assetCatalog) ? value.assetCatalog : null;
22484
+ const assetCatalog = typeof value.assetCatalog === "string" && import_node_path27.default.isAbsolute(value.assetCatalog) ? value.assetCatalog : null;
22332
22485
  return accentColor || assetCatalog ? { accentColor, assetCatalog } : null;
22333
22486
  }
22334
22487
  function readOneNativeAppCatalog(entryConfig, root) {
@@ -22337,7 +22490,7 @@ function readOneNativeAppCatalog(entryConfig, root) {
22337
22490
  if (!isRecord(ios)) return null;
22338
22491
  return parseOneNativeAppCatalog({
22339
22492
  accentColor: ios.accentColor,
22340
- assetCatalog: typeof ios.assetCatalog === "string" ? import_node_path26.default.resolve(root, ios.assetCatalog) : null
22493
+ assetCatalog: typeof ios.assetCatalog === "string" ? import_node_path27.default.resolve(root, ios.assetCatalog) : null
22341
22494
  });
22342
22495
  }
22343
22496
 
@@ -22345,9 +22498,9 @@ function readOneNativeAppCatalog(entryConfig, root) {
22345
22498
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
22346
22499
  var import_node_child_process11 = require("node:child_process");
22347
22500
  var import_node_crypto10 = require("node:crypto");
22348
- var import_node_fs23 = __toESM(require("node:fs"), 1);
22349
- var import_node_module3 = require("node:module");
22350
- var import_node_path27 = __toESM(require("node:path"), 1);
22501
+ var import_node_fs24 = __toESM(require("node:fs"), 1);
22502
+ var import_node_module4 = require("node:module");
22503
+ var import_node_path28 = __toESM(require("node:path"), 1);
22351
22504
  var import_node_util7 = require("node:util");
22352
22505
  init_forked_script_contract();
22353
22506
  init_is_record();
@@ -22373,8 +22526,8 @@ fs.writeFileSync(process.argv[2], JSON.stringify({
22373
22526
  function configStamp(files) {
22374
22527
  return JSON.stringify(
22375
22528
  files.map((file) => {
22376
- if (!import_node_fs23.default.existsSync(file)) return [file, null];
22377
- const stat = import_node_fs23.default.statSync(file);
22529
+ if (!import_node_fs24.default.existsSync(file)) return [file, null];
22530
+ const stat = import_node_fs24.default.statSync(file);
22378
22531
  return [file, stat.mtimeMs, stat.ctimeMs, stat.size];
22379
22532
  })
22380
22533
  );
@@ -22385,13 +22538,13 @@ async function readConfig(root) {
22385
22538
  const reading = reads.get(root);
22386
22539
  if (reading) return reading;
22387
22540
  const promise = (async () => {
22388
- (0, import_node_module3.createRequire)(import_node_path27.default.join(root, "package.json")).resolve("one/vite");
22389
- const cache = import_node_path27.default.join(root, "node_modules/.cache/peach-widget-config");
22390
- import_node_fs23.default.mkdirSync(cache, { recursive: true });
22391
- const directory = import_node_fs23.default.mkdtempSync(import_node_path27.default.join(cache, "read-"));
22392
- const script = import_node_path27.default.join(directory, "read.mjs");
22393
- const result = import_node_path27.default.join(directory, "result.json");
22394
- import_node_fs23.default.writeFileSync(script, CONFIG_CHILD);
22541
+ (0, import_node_module4.createRequire)(import_node_path28.default.join(root, "package.json")).resolve("one/vite");
22542
+ const cache = import_node_path28.default.join(root, "node_modules/.cache/peach-widget-config");
22543
+ import_node_fs24.default.mkdirSync(cache, { recursive: true });
22544
+ const directory = import_node_fs24.default.mkdtempSync(import_node_path28.default.join(cache, "read-"));
22545
+ const script = import_node_path28.default.join(directory, "read.mjs");
22546
+ const result = import_node_path28.default.join(directory, "result.json");
22547
+ import_node_fs24.default.writeFileSync(script, CONFIG_CHILD);
22395
22548
  try {
22396
22549
  await run6(process.execPath, [script, result], {
22397
22550
  cwd: root,
@@ -22399,7 +22552,7 @@ async function readConfig(root) {
22399
22552
  timeout: 3e4,
22400
22553
  maxBuffer: 1024 * 1024
22401
22554
  });
22402
- const value = JSON.parse(import_node_fs23.default.readFileSync(result, "utf8"));
22555
+ const value = JSON.parse(import_node_fs24.default.readFileSync(result, "utf8"));
22403
22556
  if (!isRecord(value) || !Array.isArray(value.watched) || !value.watched.every((file) => typeof file === "string"))
22404
22557
  throw new Error("One config loader returned invalid dependencies");
22405
22558
  if (!Array.isArray(value.urlSchemes) || !value.urlSchemes.every(
@@ -22422,8 +22575,8 @@ async function readConfig(root) {
22422
22575
  }
22423
22576
  const watched = [
22424
22577
  .../* @__PURE__ */ new Set([
22425
- import_node_path27.default.join(root, "package.json"),
22426
- ...value.watched.map((file) => import_node_path27.default.resolve(root, file))
22578
+ import_node_path28.default.join(root, "package.json"),
22579
+ ...value.watched.map((file) => import_node_path28.default.resolve(root, file))
22427
22580
  ])
22428
22581
  ];
22429
22582
  const loaded3 = {
@@ -22435,7 +22588,7 @@ async function readConfig(root) {
22435
22588
  configs.set(root, loaded3);
22436
22589
  return loaded3;
22437
22590
  } finally {
22438
- import_node_fs23.default.rmSync(directory, { recursive: true, force: true });
22591
+ import_node_fs24.default.rmSync(directory, { recursive: true, force: true });
22439
22592
  }
22440
22593
  })();
22441
22594
  reads.set(root, promise);
@@ -22456,13 +22609,13 @@ function declaredFamilies(source) {
22456
22609
  return home;
22457
22610
  }
22458
22611
  async function readOneWidgetSources(appRoot) {
22459
- const root = import_node_fs23.default.realpathSync(appRoot);
22612
+ const root = import_node_fs24.default.realpathSync(appRoot);
22460
22613
  const config = await readConfig(root);
22461
22614
  if (!config.widget) return null;
22462
22615
  const widget = config.widget;
22463
22616
  const sourceFiles = {
22464
- "OneWidget.swift": import_node_path27.default.join(root, "ios/OneWidgets/OneWidget.swift"),
22465
- "OneWidgetContract.swift": import_node_path27.default.join(
22617
+ "OneWidget.swift": import_node_path28.default.join(root, "ios/OneWidgets/OneWidget.swift"),
22618
+ "OneWidgetContract.swift": import_node_path28.default.join(
22466
22619
  root,
22467
22620
  "ios",
22468
22621
  widget.appName,
@@ -22472,14 +22625,14 @@ async function readOneWidgetSources(appRoot) {
22472
22625
  const files = /* @__PURE__ */ new Map();
22473
22626
  const sources = {};
22474
22627
  for (const [name2, file] of Object.entries(sourceFiles)) {
22475
- if (!import_node_fs23.default.existsSync(file))
22628
+ if (!import_node_fs24.default.existsSync(file))
22476
22629
  throw new Error(`missing One widget prebuild source ${file}; run one prebuild`);
22477
22630
  const bytes = readPackageFile(root, file, MAX_SWIFT_COMPILE_SOURCE_BYTES);
22478
22631
  const text2 = bytes.toString("utf8");
22479
22632
  if (!Buffer.from(text2).equals(bytes))
22480
22633
  throw new Error(`One widget prebuild source is not UTF-8: ${file}`);
22481
22634
  files.set(name2, text2);
22482
- sources[import_node_path27.default.relative(root, file).split(import_node_path27.default.sep).join("/")] = (0, import_node_crypto10.createHash)("sha256").update(bytes).digest("hex");
22635
+ sources[import_node_path28.default.relative(root, file).split(import_node_path28.default.sep).join("/")] = (0, import_node_crypto10.createHash)("sha256").update(bytes).digest("hex");
22483
22636
  }
22484
22637
  const contract = files.get("OneWidgetContract.swift") ?? "";
22485
22638
  const source = files.get("OneWidget.swift") ?? "";
@@ -23033,16 +23186,17 @@ init_app_project();
23033
23186
  // src/android-autolinking.ts
23034
23187
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
23035
23188
  var import_node_child_process12 = require("node:child_process");
23036
- var import_node_fs25 = __toESM(require("node:fs"), 1);
23037
- var import_node_module4 = require("node:module");
23038
- var import_node_path29 = __toESM(require("node:path"), 1);
23189
+ var import_node_fs26 = __toESM(require("node:fs"), 1);
23190
+ var import_node_module5 = require("node:module");
23191
+ var import_node_path30 = __toESM(require("node:path"), 1);
23039
23192
  var import_node_util8 = require("node:util");
23040
23193
  init_forked_script_contract();
23041
23194
  init_is_record();
23195
+ init_react_native_autolinking();
23042
23196
  var run7 = (0, import_node_util8.promisify)(import_node_child_process12.execFile);
23043
23197
  var resolving = /* @__PURE__ */ new Map();
23044
23198
  async function resolveExpoAndroidAutolinking(appRoot) {
23045
- const root = import_node_fs25.default.realpathSync(appRoot);
23199
+ const root = import_node_fs26.default.realpathSync(appRoot);
23046
23200
  const existing = resolving.get(root);
23047
23201
  if (existing) return existing;
23048
23202
  const pending = resolveAndroidModules(root);
@@ -23056,7 +23210,7 @@ async function resolveExpoAndroidAutolinking(appRoot) {
23056
23210
  async function resolveAndroidModules(appRoot) {
23057
23211
  let autolinker;
23058
23212
  try {
23059
- autolinker = (0, import_node_module4.createRequire)(import_node_path29.default.join(appRoot, "package.json")).resolve(
23213
+ autolinker = (0, import_node_module5.createRequire)(import_node_path30.default.join(appRoot, "package.json")).resolve(
23060
23214
  "expo-modules-autolinking/package.json"
23061
23215
  );
23062
23216
  } catch (error) {
@@ -23066,7 +23220,7 @@ async function resolveAndroidModules(appRoot) {
23066
23220
  const { stdout } = await run7(
23067
23221
  process.execPath,
23068
23222
  [
23069
- import_node_path29.default.join(import_node_path29.default.dirname(autolinker), "bin/expo-modules-autolinking.js"),
23223
+ import_node_path30.default.join(import_node_path30.default.dirname(autolinker), "bin/expo-modules-autolinking.js"),
23070
23224
  "resolve",
23071
23225
  "--platform",
23072
23226
  "android",
@@ -23089,14 +23243,51 @@ async function resolveAndroidModules(appRoot) {
23089
23243
  return resolved.modules;
23090
23244
  }
23091
23245
  async function collectAndroidAutolinkedPackages(appRoot) {
23092
- const modules = await resolveExpoAndroidAutolinking(appRoot);
23093
- return readAndroidAutolinkedPackages(modules.map((entry) => entry.packageName));
23246
+ const [modules, dependencies] = await Promise.all([
23247
+ resolveExpoAndroidAutolinking(appRoot),
23248
+ resolveReactNativeAndroidAutolinking(appRoot)
23249
+ ]);
23250
+ return readAndroidAutolinkedPackages([
23251
+ ...modules.map((entry) => entry.packageName),
23252
+ ...dependencies.map((entry) => entry.name)
23253
+ ]);
23254
+ }
23255
+ async function resolveReactNativeAndroidAutolinking(appRoot) {
23256
+ const config = await reactNativeAutolinkingConfig(appRoot, "android");
23257
+ if (!isRecord(config) || !isRecord(config.dependencies))
23258
+ throw new Error(`${appRoot}: React Native autolinking config has no dependencies`);
23259
+ const linked = [];
23260
+ for (const [name2, dependency] of Object.entries(config.dependencies)) {
23261
+ if (!isRecord(dependency) || !isRecord(dependency.platforms))
23262
+ throw new Error(
23263
+ `${appRoot}: React Native autolinking dependency ${name2} is malformed`
23264
+ );
23265
+ const android = dependency.platforms.android;
23266
+ if (android == null) continue;
23267
+ if (!isRecord(android) || typeof dependency.root !== "string")
23268
+ throw new Error(
23269
+ `${appRoot}: React Native autolinking dependency ${name2} has no Android project`
23270
+ );
23271
+ const string4 = (field) => {
23272
+ const value = android[field];
23273
+ if (value == null || typeof value === "string") return value ?? null;
23274
+ throw new Error(`${appRoot}: Android dependency ${name2} has invalid ${field}`);
23275
+ };
23276
+ linked.push({
23277
+ name: name2,
23278
+ root: dependency.root,
23279
+ sourceDir: string4("sourceDir"),
23280
+ packageImportPath: string4("packageImportPath"),
23281
+ packageInstance: string4("packageInstance")
23282
+ });
23283
+ }
23284
+ return linked;
23094
23285
  }
23095
23286
 
23096
23287
  // src/android-root-module.ts
23097
23288
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
23098
- var import_node_fs26 = __toESM(require("node:fs"), 1);
23099
- var import_node_path30 = __toESM(require("node:path"), 1);
23289
+ var import_node_fs27 = __toESM(require("node:fs"), 1);
23290
+ var import_node_path31 = __toESM(require("node:path"), 1);
23100
23291
  var STRINGS_AND_COMMENTS = /"(?:\\.|[^"\\])*"|\/\/[^\n]*|\/\*[\s\S]*?\*\//g;
23101
23292
  var DECLARATION = /\b(?:fun|String)\s+getMainComponentName\s*\(/g;
23102
23293
  var KOTLIN_LITERAL = /^override\s+fun\s+getMainComponentName\s*\(\s*\)\s*(?::\s*String\s*)?(?:=\s*|\{\s*return\s+)"([^"\\$]+)"(?=\s*(?:;|\}|override\b|fun\b|private\b|public\b|protected\b|@|$))/;
@@ -23133,29 +23324,29 @@ function launcherActivities(application) {
23133
23324
  function readModuleNamespace(moduleRoot, manifest) {
23134
23325
  if (manifest.attributes.package) return manifest.attributes.package;
23135
23326
  for (const name2 of ["build.gradle", "build.gradle.kts"]) {
23136
- const file = import_node_path30.default.join(moduleRoot, name2);
23137
- if (!import_node_fs26.default.existsSync(file)) continue;
23327
+ const file = import_node_path31.default.join(moduleRoot, name2);
23328
+ if (!import_node_fs27.default.existsSync(file)) continue;
23138
23329
  const match = /\bnamespace\s*=?\s*["']([\w.]+)["']/.exec(
23139
- import_node_fs26.default.readFileSync(file, "utf8")
23330
+ import_node_fs27.default.readFileSync(file, "utf8")
23140
23331
  );
23141
23332
  if (match) return match[1];
23142
23333
  }
23143
23334
  return void 0;
23144
23335
  }
23145
23336
  function readModuleRootModuleName(moduleRoot) {
23146
- const sourceSets = import_node_path30.default.join(moduleRoot, "src");
23147
- const manifestFile = import_node_path30.default.join(sourceSets, "main/AndroidManifest.xml");
23148
- if (!import_node_fs26.default.existsSync(manifestFile)) return null;
23149
- const document = parseXml(import_node_fs26.default.readFileSync(manifestFile, "utf8"), manifestFile);
23337
+ const sourceSets = import_node_path31.default.join(moduleRoot, "src");
23338
+ const manifestFile = import_node_path31.default.join(sourceSets, "main/AndroidManifest.xml");
23339
+ if (!import_node_fs27.default.existsSync(manifestFile)) return null;
23340
+ const document = parseXml(import_node_fs27.default.readFileSync(manifestFile, "utf8"), manifestFile);
23150
23341
  const manifest = document.children[0];
23151
23342
  const application = manifest?.children.find((child) => child.name === "application");
23152
23343
  if (manifest?.name !== "manifest" || !application) return null;
23153
23344
  const launchers = launcherActivities(application);
23154
23345
  if (launchers.length === 0) return null;
23155
- for (const set2 of import_node_fs26.default.readdirSync(sourceSets, { withFileTypes: true })) {
23156
- const file = import_node_path30.default.join(sourceSets, set2.name, "AndroidManifest.xml");
23157
- if (!set2.isDirectory() || set2.name === "main" || !import_node_fs26.default.existsSync(file)) continue;
23158
- if (import_node_fs26.default.readFileSync(file, "utf8").includes("<activity")) return void 0;
23346
+ for (const set2 of import_node_fs27.default.readdirSync(sourceSets, { withFileTypes: true })) {
23347
+ const file = import_node_path31.default.join(sourceSets, set2.name, "AndroidManifest.xml");
23348
+ if (!set2.isDirectory() || set2.name === "main" || !import_node_fs27.default.existsSync(file)) continue;
23349
+ if (import_node_fs27.default.readFileSync(file, "utf8").includes("<activity")) return void 0;
23159
23350
  }
23160
23351
  const launcher = launchers[0];
23161
23352
  const enabled = launcher.attributes["android:enabled"];
@@ -23167,23 +23358,23 @@ function readModuleRootModuleName(moduleRoot) {
23167
23358
  const qualified = declared.startsWith(".") ? namespace && `${namespace}${declared}` : declared.includes(".") ? declared : namespace && `${namespace}.${declared}`;
23168
23359
  if (!qualified || qualified.includes("$")) return void 0;
23169
23360
  const relative3 = qualified.split(".").join("/");
23170
- const files = import_node_fs26.default.readdirSync(sourceSets, { withFileTypes: true }).filter((set2) => set2.isDirectory()).flatMap(
23361
+ const files = import_node_fs27.default.readdirSync(sourceSets, { withFileTypes: true }).filter((set2) => set2.isDirectory()).flatMap(
23171
23362
  (set2) => ["java", "kotlin"].flatMap(
23172
23363
  (language) => ["kt", "java"].map(
23173
- (extension) => import_node_path30.default.join(sourceSets, set2.name, language, `${relative3}.${extension}`)
23364
+ (extension) => import_node_path31.default.join(sourceSets, set2.name, language, `${relative3}.${extension}`)
23174
23365
  )
23175
23366
  )
23176
- ).filter((file) => import_node_fs26.default.existsSync(file));
23367
+ ).filter((file) => import_node_fs27.default.existsSync(file));
23177
23368
  if (files.length !== 1) return void 0;
23178
23369
  return readAndroidRootModuleFromActivitySource(
23179
- import_node_fs26.default.readFileSync(files[0], "utf8"),
23370
+ import_node_fs27.default.readFileSync(files[0], "utf8"),
23180
23371
  qualified.slice(qualified.lastIndexOf(".") + 1)
23181
23372
  );
23182
23373
  }
23183
23374
  function readAndroidLauncherRootModuleName(projectRoot) {
23184
- const androidRoot = import_node_path30.default.join(projectRoot, "android");
23185
- if (!import_node_fs26.default.existsSync(androidRoot)) return void 0;
23186
- const names = import_node_fs26.default.readdirSync(androidRoot, { withFileTypes: true }).filter((entry) => entry.isDirectory()).map((entry) => readModuleRootModuleName(import_node_path30.default.join(androidRoot, entry.name))).filter((name2) => name2 !== null);
23375
+ const androidRoot = import_node_path31.default.join(projectRoot, "android");
23376
+ if (!import_node_fs27.default.existsSync(androidRoot)) return void 0;
23377
+ const names = import_node_fs27.default.readdirSync(androidRoot, { withFileTypes: true }).filter((entry) => entry.isDirectory()).map((entry) => readModuleRootModuleName(import_node_path31.default.join(androidRoot, entry.name))).filter((name2) => name2 !== null);
23187
23378
  return names.length === 1 ? names[0] : void 0;
23188
23379
  }
23189
23380
 
@@ -23633,13 +23824,13 @@ var metro_plugin_default = withPeach;
23633
23824
 
23634
23825
  // src/jump-to-source-babel.ts
23635
23826
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
23636
- function normalizeSourcePath(path31) {
23637
- const queryStart = path31.indexOf("?");
23638
- const clean = queryStart >= 0 ? path31.slice(0, queryStart) : path31;
23827
+ function normalizeSourcePath(path32) {
23828
+ const queryStart = path32.indexOf("?");
23829
+ const clean = queryStart >= 0 ? path32.slice(0, queryStart) : path32;
23639
23830
  return clean.replace(/\\/g, "/");
23640
23831
  }
23641
- function matchesPath(path31, matcher) {
23642
- return typeof matcher === "string" ? path31.includes(matcher) : matcher.test(path31);
23832
+ function matchesPath(path32, matcher) {
23833
+ return typeof matcher === "string" ? path32.includes(matcher) : matcher.test(path32);
23643
23834
  }
23644
23835
  function shouldStampFile(filename, options) {
23645
23836
  const normalized = normalizeSourcePath(filename);
@@ -23659,11 +23850,11 @@ function sootsimJumpToSourceBabelPlugin(api, options = {}) {
23659
23850
  name: "sootsim-jump-to-source",
23660
23851
  visitor: {
23661
23852
  JSXElement: {
23662
- exit(path31, state) {
23853
+ exit(path32, state) {
23663
23854
  if (options.enabled === false) return;
23664
23855
  const filename = state.filename;
23665
23856
  if (!filename || !shouldStampFile(filename, options)) return;
23666
- const node = path31.node;
23857
+ const node = path32.node;
23667
23858
  if (stamped.has(node)) return;
23668
23859
  stamped.add(node);
23669
23860
  const opening = node.openingElement;
@@ -23682,12 +23873,12 @@ function sootsimJumpToSourceBabelPlugin(api, options = {}) {
23682
23873
  );
23683
23874
  return;
23684
23875
  }
23685
- const fn = path31.getFunctionParent();
23876
+ const fn = path32.getFunctionParent();
23686
23877
  const parameterDefault = Boolean(
23687
23878
  fn && opening.start != null && fn.node.body.start != null && opening.start < fn.node.body.start
23688
23879
  );
23689
- const type = path31.scope.generateUidIdentifier("PeachSourceType");
23690
- if (!parameterDefault) path31.scope.push({ id: type });
23880
+ const type = path32.scope.generateUidIdentifier("PeachSourceType");
23881
+ if (!parameterDefault) path32.scope.push({ id: type });
23691
23882
  function expression(tag) {
23692
23883
  return t.isJSXIdentifier(tag) ? t.identifier(tag.name) : t.memberExpression(
23693
23884
  expression(tag.object),
@@ -23722,10 +23913,10 @@ function sootsimJumpToSourceBabelPlugin(api, options = {}) {
23722
23913
  ),
23723
23914
  node
23724
23915
  );
23725
- if (path31.parentPath.isJSXElement() || path31.parentPath.isJSXFragment()) {
23726
- path31.replaceWith(t.jsxExpressionContainer(replacement));
23916
+ if (path32.parentPath.isJSXElement() || path32.parentPath.isJSXFragment()) {
23917
+ path32.replaceWith(t.jsxExpressionContainer(replacement));
23727
23918
  } else {
23728
- path31.replaceWith(replacement);
23919
+ path32.replaceWith(replacement);
23729
23920
  }
23730
23921
  }
23731
23922
  }