peachsim 0.1.792 → 0.1.794

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 (84) hide show
  1. package/cli/app-config.ts +3 -7
  2. package/cli/commands/compat.ts +0 -6
  3. package/cli/desktop-companion.ts +3 -0
  4. package/cli/ws-bridge.ts +103 -3
  5. package/dist-lib/agent-daemon-client.cjs +2 -2
  6. package/dist-lib/agent-events.cjs +2 -2
  7. package/dist-lib/agent-identity.cjs +2 -2
  8. package/dist-lib/agent-sessions.cjs +2 -2
  9. package/dist-lib/attached-projects.cjs +2 -2
  10. package/dist-lib/auth/shared-session.cjs +2 -2
  11. package/dist-lib/backend-origin.cjs +2 -2
  12. package/dist-lib/beta.cjs +2 -2
  13. package/dist-lib/beta.mjs +1 -1
  14. package/dist-lib/bridge-constants.cjs +2 -2
  15. package/dist-lib/bridge-contract-input.cjs +2 -2
  16. package/dist-lib/bridge-contract-input.mjs +1 -1
  17. package/dist-lib/bridge-contract.cjs +2 -2
  18. package/dist-lib/bridge-contract.mjs +1 -1
  19. package/dist-lib/bundle-channel.cjs +9071 -0
  20. package/dist-lib/capture-contract.cjs +2 -2
  21. package/dist-lib/capture-contract.mjs +1 -1
  22. package/dist-lib/cli-constants.cjs +2 -2
  23. package/dist-lib/cloud-contract.cjs +2 -2
  24. package/dist-lib/cloud-contract.mjs +1 -1
  25. package/dist-lib/cloud-test-args.cjs +2 -2
  26. package/dist-lib/cloud-test-args.mjs +1 -1
  27. package/dist-lib/cloud.cjs +2 -2
  28. package/dist-lib/cloud.mjs +1 -1
  29. package/dist-lib/config.cjs +2 -2
  30. package/dist-lib/detox/index.cjs +5 -3
  31. package/dist-lib/dev-bundle-resolution.cjs +2 -2
  32. package/dist-lib/expo-swift-bundle.cjs +8419 -0
  33. package/dist-lib/expo-swift-metadata.cjs +91 -0
  34. package/dist-lib/expo-swift-metadata.mjs +63 -0
  35. package/dist-lib/home-paths.cjs +2 -2
  36. package/dist-lib/host/bridge-host.cjs +238 -130
  37. package/dist-lib/host/fetch-proxy-handler.cjs +2 -2
  38. package/dist-lib/host/fetch-proxy-overrides.cjs +2 -2
  39. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  40. package/dist-lib/host/replacement-module-handler.cjs +2 -2
  41. package/dist-lib/host/websocket-proxy.cjs +2 -2
  42. package/dist-lib/index.cjs +113 -13
  43. package/dist-lib/jump-to-source-babel.cjs +2 -2
  44. package/dist-lib/jump-to-source-native.cjs +2 -2
  45. package/dist-lib/kotlin-host.cjs +2 -2
  46. package/dist-lib/menu.cjs +2 -2
  47. package/dist-lib/menu.mjs +1 -1
  48. package/dist-lib/metro-fingerprint-registry.cjs +2 -2
  49. package/dist-lib/metro-fingerprint-registry.mjs +1 -1
  50. package/dist-lib/metro-production-bundle.cjs +2 -2
  51. package/dist-lib/metro-production-bundle.mjs +1 -1
  52. package/dist-lib/metro.cjs +110 -12
  53. package/dist-lib/native-app-identity.cjs +2 -2
  54. package/dist-lib/native-app-identity.mjs +1 -1
  55. package/dist-lib/native-firebase-metadata.cjs +2 -2
  56. package/dist-lib/native-firebase-metadata.mjs +1 -1
  57. package/dist-lib/plist.cjs +2 -2
  58. package/dist-lib/plist.mjs +1 -1
  59. package/dist-lib/profiles.cjs +2 -2
  60. package/dist-lib/public-brand.cjs +2 -2
  61. package/dist-lib/react-native-host-modules.cjs +2 -2
  62. package/dist-lib/react-native-host-modules.mjs +1 -1
  63. package/dist-lib/render-mode.cjs +2 -2
  64. package/dist-lib/scripts/dev-server-scanner.cjs +2 -2
  65. package/dist-lib/sdk.cjs +2 -2
  66. package/dist-lib/sdk.mjs +1 -1
  67. package/dist-lib/skills.cjs +462 -170
  68. package/dist-lib/swift-compile.cjs +105 -5
  69. package/dist-lib/swift-compile.mjs +101 -2
  70. package/dist-lib/swift-package.cjs +2 -2
  71. package/dist-lib/swift-package.mjs +1 -1
  72. package/dist-lib/swift-submit.cjs +2 -2
  73. package/dist-lib/swift-submit.mjs +1 -1
  74. package/dist-lib/swift-toolchain.cjs +2 -2
  75. package/dist-lib/swift.cjs +2 -2
  76. package/dist-lib/vite-swift.cjs +64 -8
  77. package/dist-lib/vite.cjs +2 -2
  78. package/package.json +20 -2
  79. package/src/bundle-channel.mjs +251 -0
  80. package/src/expo-swift-bundle.ts +32 -0
  81. package/src/expo-swift-host.ts +152 -128
  82. package/src/expoSwiftContract.ts +88 -0
  83. package/src/swift-compile.ts +111 -1
  84. package/src/swift-host.ts +4 -1
@@ -1,5 +1,5 @@
1
- /*! rnx v0.1.792 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
1
+ /*! rnx v0.1.794 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
5
5
  var __defProp = Object.defineProperty;
@@ -40,6 +40,7 @@ __export(swift_compile_exports, {
40
40
  lowerAVAssetURLCluster: () => lowerAVAssetURLCluster,
41
41
  lowerAnyObjectDoubleValue: () => lowerAnyObjectDoubleValue,
42
42
  lowerNSValueTimeBox: () => lowerNSValueTimeBox,
43
+ lowerNotificationDelegate: () => lowerNotificationDelegate,
43
44
  missingSwiftModules: () => missingSwiftModules,
44
45
  objcExtensionMemberIndex: () => objcExtensionMemberIndex,
45
46
  prepareSwiftDependency: () => prepareSwiftDependency,
@@ -56,6 +57,7 @@ __export(swift_compile_exports, {
56
57
  swiftPeachModules: () => swiftPeachModules,
57
58
  swiftSdkPaths: () => swiftSdkPaths,
58
59
  swiftSourceAsIOS: () => swiftSourceAsIOS,
60
+ swiftSourceClosure: () => swiftSourceClosure,
59
61
  swiftTargetDependencies: () => swiftTargetDependencies,
60
62
  syncSwiftTree: () => syncSwiftTree,
61
63
  withNativeSourceGlue: () => withNativeSourceGlue,
@@ -307,7 +309,6 @@ function swiftPackagePartition(manifest, resourcePaths = []) {
307
309
  }
308
310
 
309
311
  // src/swift-compile.ts
310
- var import_meta = {};
311
312
  var run2 = (0, import_node_util2.promisify)(import_node_child_process2.execFile);
312
313
  var WASM_TRIPLE = "wasm32-unknown-wasip1";
313
314
  var cores = import_node_os.default.availableParallelism();
@@ -1181,6 +1182,57 @@ function lowerNSValueTimeBox(source) {
1181
1182
  out = out.slice(0, at) + insert + out.slice(at + remove);
1182
1183
  return out;
1183
1184
  }
1185
+ function lowerNotificationDelegate(source) {
1186
+ const code = swiftCodeMask(source);
1187
+ const selectors = {
1188
+ willPresent: "userNotificationCenter:willPresentNotification:withCompletionHandler:",
1189
+ didReceive: "userNotificationCenter:didReceiveNotificationResponse:withCompletionHandler:",
1190
+ openSettingsFor: "userNotificationCenter:openSettingsForNotification:"
1191
+ };
1192
+ const edits = [];
1193
+ const selector = /#(?:selector|Selector)\(\s*UNUserNotificationCenterDelegate\.userNotificationCenter\(\s*_\s*:\s*(willPresent|didReceive|openSettingsFor)\s*:[^)]*\)\s*\)/g;
1194
+ for (const match of code.matchAll(selector)) {
1195
+ edits.push([
1196
+ match.index,
1197
+ match[0].length,
1198
+ `NSSelectorFromString(${JSON.stringify(selectors[match[1]])})`
1199
+ ]);
1200
+ }
1201
+ const receivers = /* @__PURE__ */ new Set();
1202
+ for (const match of code.matchAll(
1203
+ /\b(?:var|let)\s+(\w+)\s*:\s*(?:any\s+)?UNUserNotificationCenterDelegate\??/g
1204
+ ))
1205
+ receivers.add(match[1]);
1206
+ for (const match of code.matchAll(/\blet\s+(\w+)\s*=\s*(?:self\.)?(\w+)\b/g)) {
1207
+ if (receivers.has(match[2])) receivers.add(match[1]);
1208
+ }
1209
+ for (const match of code.matchAll(
1210
+ /\b(\w+)(?:[?!])?\.userNotificationCenter\s*\?(?=\s*\()/g
1211
+ )) {
1212
+ if (receivers.has(match[1]))
1213
+ edits.push([match.index + match[0].lastIndexOf("?"), 1, " "]);
1214
+ }
1215
+ const braces = [...code.matchAll(/[{}]/g)].map((match) => match.index);
1216
+ for (const owner of code.matchAll(
1217
+ /\b(?:class|extension)\s+[A-Za-z_]\w*[^{}]*\bUNUserNotificationCenterDelegate\b[^{}]*\{/g
1218
+ )) {
1219
+ const open = owner.index + owner[0].length - 1;
1220
+ const close = closingBrace(code, braces, open);
1221
+ const body = code.slice(open + 1, close - 1);
1222
+ for (const method of body.matchAll(/\bfunc\s+userNotificationCenter\s*\(/g)) {
1223
+ const at = open + 1 + method.index;
1224
+ const signature = code.slice(at, code.indexOf("{", at));
1225
+ const label = Object.keys(selectors).find(
1226
+ (name) => new RegExp(`\\b${name}\\b`).test(signature)
1227
+ );
1228
+ if (label) edits.push([at, 0, `@ObjC(${JSON.stringify(selectors[label])}) `]);
1229
+ }
1230
+ }
1231
+ let result = source;
1232
+ for (const [at, count, text] of edits.sort((a, b) => b[0] - a[0]))
1233
+ result = result.slice(0, at) + text + result.slice(at + count);
1234
+ return result;
1235
+ }
1184
1236
  function swiftCodeMask(source) {
1185
1237
  const chars = source.split("");
1186
1238
  const blank = (from, to) => {
@@ -1285,7 +1337,10 @@ function swiftCodeMask(source) {
1285
1337
  return chars.join("");
1286
1338
  }
1287
1339
  function swiftSourceAsIOS(original, extraObjCExtensions) {
1288
- const source = liftExtensionOverrides(original, extraObjCExtensions);
1340
+ const source = liftExtensionOverrides(
1341
+ lowerNotificationDelegate(original),
1342
+ extraObjCExtensions
1343
+ );
1289
1344
  const { lineStarts, tokens } = swiftCodeScan(source);
1290
1345
  let offset = 0;
1291
1346
  const conditioned = source.split("\n").map((line) => {
@@ -1388,6 +1443,49 @@ function swiftSourceAsIOS(original, extraObjCExtensions) {
1388
1443
  lowerAVAssetURLCluster(lowerAnyObjectDoubleValue(out + conditioned.slice(copied)))
1389
1444
  );
1390
1445
  }
1446
+ function swiftSourceClosure(files, roots) {
1447
+ const sources = /* @__PURE__ */ new Map();
1448
+ const owners = /* @__PURE__ */ new Map();
1449
+ const extensions = /* @__PURE__ */ new Map();
1450
+ for (const [file, source] of Object.entries(files)) {
1451
+ if (!file.endsWith(".swift")) continue;
1452
+ const code = swiftCodeMask(source);
1453
+ const references = new Set(code.match(/[A-Za-z_]\w*/g) ?? []);
1454
+ const pattern = /[{}]|\b(class|struct|enum|protocol|actor|typealias|func|var|let|extension)\s+([A-Za-z_]\w*(?:\.[A-Za-z_]\w*)*)/g;
1455
+ let depth = 0;
1456
+ for (const match of code.matchAll(pattern)) {
1457
+ if (match[0] === "{") {
1458
+ depth++;
1459
+ continue;
1460
+ }
1461
+ if (match[0] === "}") {
1462
+ depth--;
1463
+ continue;
1464
+ }
1465
+ if (depth !== 0 || !match[2]) continue;
1466
+ const name = match[2].split(".").pop();
1467
+ const index = match[1] === "extension" ? extensions : owners;
1468
+ const set = index.get(name) ?? /* @__PURE__ */ new Set();
1469
+ set.add(file);
1470
+ index.set(name, set);
1471
+ }
1472
+ sources.set(file, references);
1473
+ }
1474
+ const included = /* @__PURE__ */ new Set();
1475
+ const pending = [...roots];
1476
+ const seen = /* @__PURE__ */ new Set();
1477
+ while (pending.length) {
1478
+ const name = pending.pop();
1479
+ if (seen.has(name)) continue;
1480
+ seen.add(name);
1481
+ for (const file of [...owners.get(name) ?? [], ...extensions.get(name) ?? []]) {
1482
+ if (included.has(file)) continue;
1483
+ included.add(file);
1484
+ for (const reference of sources.get(file)) pending.push(reference);
1485
+ }
1486
+ }
1487
+ return Object.fromEntries(Object.entries(files).filter(([file]) => included.has(file)));
1488
+ }
1391
1489
  function swiftApplicationEntry(file, source) {
1392
1490
  const { tokens } = swiftCodeScan(source);
1393
1491
  let depth = 0;
@@ -1710,7 +1808,7 @@ function compileSwiftProjectUnit(input, options) {
1710
1808
  };
1711
1809
  const hash = swiftArtifactHash(input, options.release, moduleRoot);
1712
1810
  return serialize(root, async () => {
1713
- if (process.platform === "darwin" && process.env.TM_SESSION && process.env.CI !== "true" && process.env.CONTRAST_HEAVY_ADMITTED !== "1" && moduleRoot === import_node_path2.default.resolve(import_meta.dirname, "../../sootsim-swift") && !swiftDistributionAt(moduleRoot)) {
1811
+ if (process.platform === "darwin" && process.env.TM_SESSION && process.env.CI !== "true" && process.env.CONTRAST_HEAVY_ADMITTED !== "1" && moduleRoot === import_node_path2.default.resolve(__sootsim_import_meta_dirname, "../../sootsim-swift") && !swiftDistributionAt(moduleRoot)) {
1714
1812
  const requestRoot = (0, import_node_fs2.mkdtempSync)(import_node_path2.default.join(root, ".builder-request-"));
1715
1813
  const output = import_node_path2.default.join(requestRoot, "output");
1716
1814
  const request = import_node_path2.default.join(requestRoot, "request.json");
@@ -1820,6 +1918,7 @@ function compileSwiftProjectUnit(input, options) {
1820
1918
  lowerAVAssetURLCluster,
1821
1919
  lowerAnyObjectDoubleValue,
1822
1920
  lowerNSValueTimeBox,
1921
+ lowerNotificationDelegate,
1823
1922
  missingSwiftModules,
1824
1923
  objcExtensionMemberIndex,
1825
1924
  prepareSwiftDependency,
@@ -1836,6 +1935,7 @@ function compileSwiftProjectUnit(input, options) {
1836
1935
  swiftPeachModules,
1837
1936
  swiftSdkPaths,
1838
1937
  swiftSourceAsIOS,
1938
+ swiftSourceClosure,
1839
1939
  swiftTargetDependencies,
1840
1940
  syncSwiftTree,
1841
1941
  withNativeSourceGlue,
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.792 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.794 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/swift-compile.ts
4
4
  import { execFile as execFile2, execFileSync } from "node:child_process";
@@ -1130,6 +1130,57 @@ function lowerNSValueTimeBox(source) {
1130
1130
  out = out.slice(0, at) + insert + out.slice(at + remove);
1131
1131
  return out;
1132
1132
  }
1133
+ function lowerNotificationDelegate(source) {
1134
+ const code = swiftCodeMask(source);
1135
+ const selectors = {
1136
+ willPresent: "userNotificationCenter:willPresentNotification:withCompletionHandler:",
1137
+ didReceive: "userNotificationCenter:didReceiveNotificationResponse:withCompletionHandler:",
1138
+ openSettingsFor: "userNotificationCenter:openSettingsForNotification:"
1139
+ };
1140
+ const edits = [];
1141
+ const selector = /#(?:selector|Selector)\(\s*UNUserNotificationCenterDelegate\.userNotificationCenter\(\s*_\s*:\s*(willPresent|didReceive|openSettingsFor)\s*:[^)]*\)\s*\)/g;
1142
+ for (const match of code.matchAll(selector)) {
1143
+ edits.push([
1144
+ match.index,
1145
+ match[0].length,
1146
+ `NSSelectorFromString(${JSON.stringify(selectors[match[1]])})`
1147
+ ]);
1148
+ }
1149
+ const receivers = /* @__PURE__ */ new Set();
1150
+ for (const match of code.matchAll(
1151
+ /\b(?:var|let)\s+(\w+)\s*:\s*(?:any\s+)?UNUserNotificationCenterDelegate\??/g
1152
+ ))
1153
+ receivers.add(match[1]);
1154
+ for (const match of code.matchAll(/\blet\s+(\w+)\s*=\s*(?:self\.)?(\w+)\b/g)) {
1155
+ if (receivers.has(match[2])) receivers.add(match[1]);
1156
+ }
1157
+ for (const match of code.matchAll(
1158
+ /\b(\w+)(?:[?!])?\.userNotificationCenter\s*\?(?=\s*\()/g
1159
+ )) {
1160
+ if (receivers.has(match[1]))
1161
+ edits.push([match.index + match[0].lastIndexOf("?"), 1, " "]);
1162
+ }
1163
+ const braces = [...code.matchAll(/[{}]/g)].map((match) => match.index);
1164
+ for (const owner of code.matchAll(
1165
+ /\b(?:class|extension)\s+[A-Za-z_]\w*[^{}]*\bUNUserNotificationCenterDelegate\b[^{}]*\{/g
1166
+ )) {
1167
+ const open = owner.index + owner[0].length - 1;
1168
+ const close = closingBrace(code, braces, open);
1169
+ const body = code.slice(open + 1, close - 1);
1170
+ for (const method of body.matchAll(/\bfunc\s+userNotificationCenter\s*\(/g)) {
1171
+ const at = open + 1 + method.index;
1172
+ const signature = code.slice(at, code.indexOf("{", at));
1173
+ const label = Object.keys(selectors).find(
1174
+ (name) => new RegExp(`\\b${name}\\b`).test(signature)
1175
+ );
1176
+ if (label) edits.push([at, 0, `@ObjC(${JSON.stringify(selectors[label])}) `]);
1177
+ }
1178
+ }
1179
+ let result = source;
1180
+ for (const [at, count, text] of edits.sort((a, b) => b[0] - a[0]))
1181
+ result = result.slice(0, at) + text + result.slice(at + count);
1182
+ return result;
1183
+ }
1133
1184
  function swiftCodeMask(source) {
1134
1185
  const chars = source.split("");
1135
1186
  const blank = (from, to) => {
@@ -1234,7 +1285,10 @@ function swiftCodeMask(source) {
1234
1285
  return chars.join("");
1235
1286
  }
1236
1287
  function swiftSourceAsIOS(original, extraObjCExtensions) {
1237
- const source = liftExtensionOverrides(original, extraObjCExtensions);
1288
+ const source = liftExtensionOverrides(
1289
+ lowerNotificationDelegate(original),
1290
+ extraObjCExtensions
1291
+ );
1238
1292
  const { lineStarts, tokens } = swiftCodeScan(source);
1239
1293
  let offset = 0;
1240
1294
  const conditioned = source.split("\n").map((line) => {
@@ -1337,6 +1391,49 @@ function swiftSourceAsIOS(original, extraObjCExtensions) {
1337
1391
  lowerAVAssetURLCluster(lowerAnyObjectDoubleValue(out + conditioned.slice(copied)))
1338
1392
  );
1339
1393
  }
1394
+ function swiftSourceClosure(files, roots) {
1395
+ const sources = /* @__PURE__ */ new Map();
1396
+ const owners = /* @__PURE__ */ new Map();
1397
+ const extensions = /* @__PURE__ */ new Map();
1398
+ for (const [file, source] of Object.entries(files)) {
1399
+ if (!file.endsWith(".swift")) continue;
1400
+ const code = swiftCodeMask(source);
1401
+ const references = new Set(code.match(/[A-Za-z_]\w*/g) ?? []);
1402
+ const pattern = /[{}]|\b(class|struct|enum|protocol|actor|typealias|func|var|let|extension)\s+([A-Za-z_]\w*(?:\.[A-Za-z_]\w*)*)/g;
1403
+ let depth = 0;
1404
+ for (const match of code.matchAll(pattern)) {
1405
+ if (match[0] === "{") {
1406
+ depth++;
1407
+ continue;
1408
+ }
1409
+ if (match[0] === "}") {
1410
+ depth--;
1411
+ continue;
1412
+ }
1413
+ if (depth !== 0 || !match[2]) continue;
1414
+ const name = match[2].split(".").pop();
1415
+ const index = match[1] === "extension" ? extensions : owners;
1416
+ const set = index.get(name) ?? /* @__PURE__ */ new Set();
1417
+ set.add(file);
1418
+ index.set(name, set);
1419
+ }
1420
+ sources.set(file, references);
1421
+ }
1422
+ const included = /* @__PURE__ */ new Set();
1423
+ const pending = [...roots];
1424
+ const seen = /* @__PURE__ */ new Set();
1425
+ while (pending.length) {
1426
+ const name = pending.pop();
1427
+ if (seen.has(name)) continue;
1428
+ seen.add(name);
1429
+ for (const file of [...owners.get(name) ?? [], ...extensions.get(name) ?? []]) {
1430
+ if (included.has(file)) continue;
1431
+ included.add(file);
1432
+ for (const reference of sources.get(file)) pending.push(reference);
1433
+ }
1434
+ }
1435
+ return Object.fromEntries(Object.entries(files).filter(([file]) => included.has(file)));
1436
+ }
1340
1437
  function swiftApplicationEntry(file, source) {
1341
1438
  const { tokens } = swiftCodeScan(source);
1342
1439
  let depth = 0;
@@ -1768,6 +1865,7 @@ export {
1768
1865
  lowerAVAssetURLCluster,
1769
1866
  lowerAnyObjectDoubleValue,
1770
1867
  lowerNSValueTimeBox,
1868
+ lowerNotificationDelegate,
1771
1869
  missingSwiftModules,
1772
1870
  objcExtensionMemberIndex,
1773
1871
  prepareSwiftDependency,
@@ -1784,6 +1882,7 @@ export {
1784
1882
  swiftPeachModules,
1785
1883
  swiftSdkPaths,
1786
1884
  swiftSourceAsIOS,
1885
+ swiftSourceClosure,
1787
1886
  swiftTargetDependencies,
1788
1887
  syncSwiftTree,
1789
1888
  withNativeSourceGlue,
@@ -1,5 +1,5 @@
1
- /*! rnx v0.1.792 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
1
+ /*! rnx v0.1.794 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
5
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.792 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.794 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/swift-package.ts
4
4
  function isSwiftManifestFile(file) {
@@ -1,5 +1,5 @@
1
- /*! rnx v0.1.792 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
1
+ /*! rnx v0.1.794 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
5
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.792 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.794 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/swift-submit.ts
4
4
  var SWIFT_COMPILE_PATH = "/api/swift-compile";
@@ -1,5 +1,5 @@
1
- /*! rnx v0.1.792 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
1
+ /*! rnx v0.1.794 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
5
5
  var __defProp = Object.defineProperty;
@@ -1,5 +1,5 @@
1
- /*! rnx v0.1.792 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
1
+ /*! rnx v0.1.794 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
5
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -1,5 +1,5 @@
1
- /*! rnx v0.1.792 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
1
+ /*! rnx v0.1.794 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
5
5
  var __defProp = Object.defineProperty;
@@ -1707,7 +1707,6 @@ function swiftPackagePartition(manifest, resourcePaths = []) {
1707
1707
  }
1708
1708
 
1709
1709
  // src/swift-compile.ts
1710
- var import_meta = {};
1711
1710
  var run2 = (0, import_node_util2.promisify)(import_node_child_process2.execFile);
1712
1711
  var WASM_TRIPLE = "wasm32-unknown-wasip1";
1713
1712
  var cores = import_node_os.default.availableParallelism();
@@ -2577,6 +2576,57 @@ function lowerNSValueTimeBox(source) {
2577
2576
  out = out.slice(0, at) + insert + out.slice(at + remove);
2578
2577
  return out;
2579
2578
  }
2579
+ function lowerNotificationDelegate(source) {
2580
+ const code = swiftCodeMask(source);
2581
+ const selectors = {
2582
+ willPresent: "userNotificationCenter:willPresentNotification:withCompletionHandler:",
2583
+ didReceive: "userNotificationCenter:didReceiveNotificationResponse:withCompletionHandler:",
2584
+ openSettingsFor: "userNotificationCenter:openSettingsForNotification:"
2585
+ };
2586
+ const edits = [];
2587
+ const selector = /#(?:selector|Selector)\(\s*UNUserNotificationCenterDelegate\.userNotificationCenter\(\s*_\s*:\s*(willPresent|didReceive|openSettingsFor)\s*:[^)]*\)\s*\)/g;
2588
+ for (const match of code.matchAll(selector)) {
2589
+ edits.push([
2590
+ match.index,
2591
+ match[0].length,
2592
+ `NSSelectorFromString(${JSON.stringify(selectors[match[1]])})`
2593
+ ]);
2594
+ }
2595
+ const receivers = /* @__PURE__ */ new Set();
2596
+ for (const match of code.matchAll(
2597
+ /\b(?:var|let)\s+(\w+)\s*:\s*(?:any\s+)?UNUserNotificationCenterDelegate\??/g
2598
+ ))
2599
+ receivers.add(match[1]);
2600
+ for (const match of code.matchAll(/\blet\s+(\w+)\s*=\s*(?:self\.)?(\w+)\b/g)) {
2601
+ if (receivers.has(match[2])) receivers.add(match[1]);
2602
+ }
2603
+ for (const match of code.matchAll(
2604
+ /\b(\w+)(?:[?!])?\.userNotificationCenter\s*\?(?=\s*\()/g
2605
+ )) {
2606
+ if (receivers.has(match[1]))
2607
+ edits.push([match.index + match[0].lastIndexOf("?"), 1, " "]);
2608
+ }
2609
+ const braces = [...code.matchAll(/[{}]/g)].map((match) => match.index);
2610
+ for (const owner of code.matchAll(
2611
+ /\b(?:class|extension)\s+[A-Za-z_]\w*[^{}]*\bUNUserNotificationCenterDelegate\b[^{}]*\{/g
2612
+ )) {
2613
+ const open = owner.index + owner[0].length - 1;
2614
+ const close = closingBrace(code, braces, open);
2615
+ const body = code.slice(open + 1, close - 1);
2616
+ for (const method of body.matchAll(/\bfunc\s+userNotificationCenter\s*\(/g)) {
2617
+ const at = open + 1 + method.index;
2618
+ const signature2 = code.slice(at, code.indexOf("{", at));
2619
+ const label = Object.keys(selectors).find(
2620
+ (name2) => new RegExp(`\\b${name2}\\b`).test(signature2)
2621
+ );
2622
+ if (label) edits.push([at, 0, `@ObjC(${JSON.stringify(selectors[label])}) `]);
2623
+ }
2624
+ }
2625
+ let result = source;
2626
+ for (const [at, count, text3] of edits.sort((a, b) => b[0] - a[0]))
2627
+ result = result.slice(0, at) + text3 + result.slice(at + count);
2628
+ return result;
2629
+ }
2580
2630
  function swiftCodeMask(source) {
2581
2631
  const chars = source.split("");
2582
2632
  const blank = (from, to) => {
@@ -2681,7 +2731,10 @@ function swiftCodeMask(source) {
2681
2731
  return chars.join("");
2682
2732
  }
2683
2733
  function swiftSourceAsIOS(original, extraObjCExtensions) {
2684
- const source = liftExtensionOverrides(original, extraObjCExtensions);
2734
+ const source = liftExtensionOverrides(
2735
+ lowerNotificationDelegate(original),
2736
+ extraObjCExtensions
2737
+ );
2685
2738
  const { lineStarts, tokens } = swiftCodeScan(source);
2686
2739
  let offset = 0;
2687
2740
  const conditioned = source.split("\n").map((line) => {
@@ -3073,7 +3126,7 @@ function compileSwiftProjectUnit(input, options) {
3073
3126
  };
3074
3127
  const hash = swiftArtifactHash(input, options.release, moduleRoot);
3075
3128
  return serialize(root, async () => {
3076
- if (process.platform === "darwin" && process.env.TM_SESSION && process.env.CI !== "true" && process.env.CONTRAST_HEAVY_ADMITTED !== "1" && moduleRoot === import_node_path2.default.resolve(import_meta.dirname, "../../sootsim-swift") && !swiftDistributionAt(moduleRoot)) {
3129
+ if (process.platform === "darwin" && process.env.TM_SESSION && process.env.CI !== "true" && process.env.CONTRAST_HEAVY_ADMITTED !== "1" && moduleRoot === import_node_path2.default.resolve(__sootsim_import_meta_dirname, "../../sootsim-swift") && !swiftDistributionAt(moduleRoot)) {
3077
3130
  const requestRoot = (0, import_node_fs2.mkdtempSync)(import_node_path2.default.join(root, ".builder-request-"));
3078
3131
  const output = import_node_path2.default.join(requestRoot, "output");
3079
3132
  const request = import_node_path2.default.join(requestRoot, "request.json");
@@ -4747,7 +4800,7 @@ var peachPublicBrand = Object.freeze({
4747
4800
  var rnxPublicBrand = peachPublicBrand;
4748
4801
 
4749
4802
  // src/cli-version.ts
4750
- var import_meta2 = {};
4803
+ var import_meta = {};
4751
4804
  var cached = null;
4752
4805
  function getCliVersion() {
4753
4806
  if (cached != null) return cached;
@@ -4756,7 +4809,7 @@ function getCliVersion() {
4756
4809
  return cached;
4757
4810
  }
4758
4811
  const candidates = [
4759
- () => (0, import_node_url.fileURLToPath)(import_meta2.resolve(`${rnxPublicBrand.packageName}/package.json`)),
4812
+ () => (0, import_node_url.fileURLToPath)(import_meta.resolve(`${rnxPublicBrand.packageName}/package.json`)),
4760
4813
  () => (0, import_node_url.fileURLToPath)(new URL("../package.json", __sootsim_import_meta_url))
4761
4814
  ];
4762
4815
  for (const resolve2 of candidates) {
@@ -7315,6 +7368,8 @@ function nativeSourceFiles(packagePath) {
7315
7368
  packagePath = import_node_fs13.default.realpathSync(packagePath);
7316
7369
  return [NATIVE_DESCRIPTOR, NATIVE_GLUE].map((name2) => import_node_path14.default.join(packagePath, name2)).filter((file) => import_node_fs13.default.existsSync(file));
7317
7370
  }
7371
+ var SwiftMissingModulesError = class extends Error {
7372
+ };
7318
7373
  var projects = /* @__PURE__ */ new Map();
7319
7374
  function projectFor(packagePath, hosted) {
7320
7375
  packagePath = import_node_fs13.default.realpathSync(packagePath);
@@ -7825,7 +7880,8 @@ async function compile(packagePath, entry, stamp, moduleRootOverride, hosted, sn
7825
7880
  ...targets.length > 0 ? targets : ["App"]
7826
7881
  ])
7827
7882
  );
7828
- if (missing.size > 0) throw new Error(await missingModulesMessage(packagePath, missing));
7883
+ if (missing.size > 0)
7884
+ throw new SwiftMissingModulesError(await missingModulesMessage(packagePath, missing));
7829
7885
  const artifact = await compileSwiftProjectUnit(input, {
7830
7886
  // the compile rewrites Sources/App in its root before swiftpm builds, and
7831
7887
  // its lock orders one process only: two vites on one root (a lane's dev
package/dist-lib/vite.cjs CHANGED
@@ -1,5 +1,5 @@
1
- /*! rnx v0.1.792 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
- let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
1
+ /*! rnx v0.1.794 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
5
5
  var __defProp = Object.defineProperty;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "peachsim",
3
- "version": "0.1.792",
3
+ "version": "0.1.794",
4
4
  "description": "Vite and Metro plugins, testing drivers, and SDK exports for peach.",
5
5
  "author": "Tamagui LLC",
6
6
  "license": "SEE LICENSE IN LICENSE",
@@ -66,6 +66,19 @@
66
66
  "import": "./dist-lib/swift-package.mjs",
67
67
  "default": "./dist-lib/swift-package.cjs"
68
68
  },
69
+ "./expo-swift-bundle": {
70
+ "types": "./src/expo-swift-bundle.ts",
71
+ "source": "./src/expo-swift-bundle.ts",
72
+ "bun": "./src/expo-swift-bundle.ts",
73
+ "default": "./dist-lib/expo-swift-bundle.cjs"
74
+ },
75
+ "./expo-swift-metadata": {
76
+ "types": "./src/expoSwiftContract.ts",
77
+ "source": "./src/expoSwiftContract.ts",
78
+ "bun": "./src/expoSwiftContract.ts",
79
+ "import": "./dist-lib/expo-swift-metadata.mjs",
80
+ "default": "./dist-lib/expo-swift-metadata.cjs"
81
+ },
69
82
  "./swift-compile": {
70
83
  "types": "./src/swift-compile.ts",
71
84
  "source": "./src/swift-compile.ts",
@@ -294,7 +307,12 @@
294
307
  "import": "./cli/rnx-in-process.ts",
295
308
  "default": "./cli/rnx-in-process.ts"
296
309
  },
297
- "./package.json": "./package.json"
310
+ "./package.json": "./package.json",
311
+ "./bundle-channel": {
312
+ "source": "./src/bundle-channel.mjs",
313
+ "bun": "./src/bundle-channel.mjs",
314
+ "default": "./dist-lib/bundle-channel.cjs"
315
+ }
298
316
  },
299
317
  "files": [
300
318
  "install.mjs",