peachsim 0.1.2423 → 0.1.2426

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 (95) hide show
  1. package/cli/outbound-endpoints.ts +138 -23
  2. package/dist-lib/agent-daemon-client.cjs +1 -1
  3. package/dist-lib/agent-events.cjs +1 -1
  4. package/dist-lib/attached-projects.cjs +1 -1
  5. package/dist-lib/auth/shared-session.cjs +1 -1
  6. package/dist-lib/backend-origin.cjs +1 -1
  7. package/dist-lib/beta.cjs +1 -1
  8. package/dist-lib/beta.mjs +1 -1
  9. package/dist-lib/bridge-constants.cjs +1 -1
  10. package/dist-lib/bridge-contract-input.cjs +1 -1
  11. package/dist-lib/bridge-contract-input.mjs +1 -1
  12. package/dist-lib/bridge-contract.cjs +1 -1
  13. package/dist-lib/bridge-contract.mjs +1 -1
  14. package/dist-lib/bundle-channel.cjs +122 -29
  15. package/dist-lib/capture-contract.cjs +1 -1
  16. package/dist-lib/capture-contract.mjs +1 -1
  17. package/dist-lib/cloud-contract.cjs +1 -1
  18. package/dist-lib/cloud-contract.mjs +1 -1
  19. package/dist-lib/cloud-test-args.cjs +1 -1
  20. package/dist-lib/cloud-test-args.mjs +1 -1
  21. package/dist-lib/cloud.cjs +1 -1
  22. package/dist-lib/cloud.mjs +1 -1
  23. package/dist-lib/config.cjs +1 -1
  24. package/dist-lib/config.mjs +1 -1
  25. package/dist-lib/detox/index.cjs +1 -1
  26. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  27. package/dist-lib/expo-swift-bundle.cjs +121 -28
  28. package/dist-lib/expo-swift-metadata.cjs +1 -1
  29. package/dist-lib/expo-swift-metadata.mjs +1 -1
  30. package/dist-lib/home-paths.cjs +1 -1
  31. package/dist-lib/host/bridge-host.cjs +122 -29
  32. package/dist-lib/host/fetch-proxy-handler.cjs +3 -3
  33. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  34. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  35. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  36. package/dist-lib/host/websocket-proxy.cjs +1 -1
  37. package/dist-lib/index.cjs +24 -9
  38. package/dist-lib/jump-to-source-babel.cjs +1 -1
  39. package/dist-lib/jump-to-source-native.cjs +22 -7
  40. package/dist-lib/kotlin-host.cjs +1 -1
  41. package/dist-lib/menu.cjs +1 -1
  42. package/dist-lib/menu.mjs +1 -1
  43. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  44. package/dist-lib/metro-fingerprint-registry.mjs +1 -1
  45. package/dist-lib/metro-production-bundle.cjs +1 -1
  46. package/dist-lib/metro-production-bundle.mjs +1 -1
  47. package/dist-lib/metro.cjs +24 -9
  48. package/dist-lib/native-app-identity-project.cjs +2 -2
  49. package/dist-lib/native-app-identity-project.mjs +2 -2
  50. package/dist-lib/native-app-identity.cjs +1 -1
  51. package/dist-lib/native-app-identity.mjs +1 -1
  52. package/dist-lib/native-firebase-metadata.cjs +1 -1
  53. package/dist-lib/native-firebase-metadata.mjs +1 -1
  54. package/dist-lib/pdfium-raster.cjs +1 -1
  55. package/dist-lib/pdfium-raster.mjs +1 -1
  56. package/dist-lib/plist.cjs +1 -1
  57. package/dist-lib/plist.mjs +1 -1
  58. package/dist-lib/profiles.cjs +1 -1
  59. package/dist-lib/public-brand.cjs +1 -1
  60. package/dist-lib/public-origins-lib-esm.json +24 -24
  61. package/dist-lib/public-origins-lib.json +53 -53
  62. package/dist-lib/react-native-host-modules.cjs +1 -1
  63. package/dist-lib/react-native-host-modules.mjs +1 -1
  64. package/dist-lib/reap-browser.cjs +1 -1
  65. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  66. package/dist-lib/sdk.cjs +1 -1
  67. package/dist-lib/sdk.mjs +1 -1
  68. package/dist-lib/skills.cjs +140 -40
  69. package/dist-lib/swift-compile.cjs +87 -15
  70. package/dist-lib/swift-compile.mjs +87 -15
  71. package/dist-lib/swift-package.cjs +1 -1
  72. package/dist-lib/swift-package.mjs +1 -1
  73. package/dist-lib/swift-submit.cjs +1 -1
  74. package/dist-lib/swift-submit.mjs +1 -1
  75. package/dist-lib/swift-toolchain.cjs +1 -1
  76. package/dist-lib/swift.cjs +1 -1
  77. package/dist-lib/vite-swift.cjs +97 -19
  78. package/dist-lib/vite.cjs +24 -9
  79. package/dist-lib/worklet-executable.cjs +1 -1
  80. package/dist-lib/worklet-executable.mjs +1 -1
  81. package/dist-types/packages/peach-engine/src/engine/node.d.ts +1 -0
  82. package/dist-types/packages/peach-engine/src/engine/svg-native.d.ts +60 -0
  83. package/dist-types/packages/peach-globals/src/lockstepCaptureBridgeContract.d.ts +1 -0
  84. package/kotlin/README.md +4 -3
  85. package/kotlin/sdk.tar.gz +0 -0
  86. package/kotlin/toolchain.json +2 -2
  87. package/package.json +1 -1
  88. package/src/native-static-libraries.ts +2 -1
  89. package/src/swift-compile.ts +1 -0
  90. package/src/swift-guest-compile.ts +2 -0
  91. package/src/swift-guest-image-ledger.ts +37 -2
  92. package/src/swift-guest-source-inputs.ts +45 -6
  93. package/src/swift-standin-builtin-behavior.ts +3 -0
  94. package/src/swift-standin-emit.ts +10 -1
  95. package/src/visit-parsed-program.ts +21 -6
@@ -1173,27 +1173,70 @@ function isFetchBinding(node: Expression): boolean {
1173
1173
  )
1174
1174
  }
1175
1175
 
1176
+ const EMPTY_ALIASES: Set<string> = new Set()
1177
+ const EXPORT_VARIABLE_DECLARATION = /\bexport\s+(?:const|let|var)\b/
1178
+
1179
+ interface OutboundScanCaches {
1180
+ trackedSet: Set<string>
1181
+ sources: Map<string, string>
1182
+ diskFiles: Map<string, boolean>
1183
+ parsed: Map<string, { source: string; program: Program }>
1184
+ exportedFetchAliases: Map<string, Set<string>>
1185
+ networkNames: Map<string, NetworkNames>
1186
+ exporterScanDone: boolean
1187
+ }
1188
+
1189
+ function isCachedFile(candidate: string, caches: OutboundScanCaches): boolean {
1190
+ if (caches.trackedSet.has(candidate)) return true
1191
+ let found = caches.diskFiles.get(candidate)
1192
+ if (found === undefined) {
1193
+ found = fs.existsSync(candidate) && fs.statSync(candidate).isFile()
1194
+ caches.diskFiles.set(candidate, found)
1195
+ }
1196
+ return found
1197
+ }
1198
+
1199
+ function loadParsedFile(
1200
+ file: string,
1201
+ caches: OutboundScanCaches,
1202
+ ): { source: string; program: Program } {
1203
+ let cached = caches.parsed.get(file)
1204
+ if (!cached) {
1205
+ const source = caches.sources.get(file) ?? fs.readFileSync(file, 'utf8')
1206
+ const program = parseSync(file, source, {
1207
+ lang: file.endsWith('.tsx') ? 'tsx' : 'ts',
1208
+ }).program
1209
+ cached = { source, program }
1210
+ caches.parsed.set(file, cached)
1211
+ }
1212
+ return cached
1213
+ }
1214
+
1176
1215
  // names a relative module exports as fetch aliases, so a call through the
1177
1216
  // imported binding is declared like a direct fetch.
1178
1217
  function exportedFetchAliases(
1179
1218
  importer: string,
1180
1219
  specifier: string,
1181
- exportedFetchAliasCache: Map<string, Set<string>>,
1220
+ caches: OutboundScanCaches,
1182
1221
  ): Set<string> {
1183
- if (!specifier.startsWith('.')) return new Set()
1222
+ if (!specifier.startsWith('.')) return EMPTY_ALIASES
1184
1223
  const base = path.resolve(path.dirname(importer), specifier)
1185
1224
  const file = [`${base}.ts`, `${base}.tsx`, base, path.join(base, 'index.ts')].find(
1186
- (candidate) => fs.existsSync(candidate) && fs.statSync(candidate).isFile(),
1225
+ (candidate) => isCachedFile(candidate, caches),
1187
1226
  )
1188
- if (!file) return new Set()
1189
- const cached = exportedFetchAliasCache.get(file)
1227
+ if (!file) return EMPTY_ALIASES
1228
+ const cached = caches.exportedFetchAliases.get(file)
1190
1229
  if (cached) return cached
1230
+ if (caches.exporterScanDone && caches.trackedSet.has(file)) return EMPTY_ALIASES
1231
+ const text = caches.sources.get(file) ?? fs.readFileSync(file, 'utf8')
1232
+ if (!EXPORT_VARIABLE_DECLARATION.test(text)) {
1233
+ caches.exportedFetchAliases.set(file, EMPTY_ALIASES)
1234
+ return EMPTY_ALIASES
1235
+ }
1191
1236
  const aliases = new Set<string>()
1192
- exportedFetchAliasCache.set(file, aliases)
1193
- const program = parseSync(file, fs.readFileSync(file, 'utf8'), {
1194
- lang: file.endsWith('.tsx') ? 'tsx' : 'ts',
1195
- }).program
1196
- const names = networkNames(program, file, exportedFetchAliasCache)
1237
+ caches.exportedFetchAliases.set(file, aliases)
1238
+ const { program } = loadParsedFile(file, caches)
1239
+ const names = networkNames(program, file, caches)
1197
1240
  for (const statement of program.body) {
1198
1241
  if (statement.type !== 'ExportNamedDeclaration') continue
1199
1242
  if (statement.declaration?.type !== 'VariableDeclaration') continue
@@ -1208,8 +1251,10 @@ function exportedFetchAliases(
1208
1251
  function networkNames(
1209
1252
  source: Program,
1210
1253
  file: string,
1211
- exportedFetchAliasCache: Map<string, Set<string>>,
1254
+ caches: OutboundScanCaches,
1212
1255
  ): NetworkNames {
1256
+ const existing = caches.networkNames.get(file)
1257
+ if (existing) return existing
1213
1258
  const names: NetworkNames = {
1214
1259
  fetch: new Set(['fetch', 'fetchWithRetries']),
1215
1260
  httpClient: new Set(['http', 'https']),
@@ -1218,6 +1263,7 @@ function networkNames(
1218
1263
  nodeRequest: new Set(),
1219
1264
  nodeGet: new Set(),
1220
1265
  }
1266
+ caches.networkNames.set(file, names)
1221
1267
  const isClientExpression = (node: Expression, clients: Set<string>): boolean => {
1222
1268
  if (node.type === 'Identifier') return clients.has(node.name)
1223
1269
  if (node.type === 'ParenthesizedExpression')
@@ -1252,11 +1298,7 @@ function networkNames(
1252
1298
  },
1253
1299
  ImportDeclaration(node) {
1254
1300
  const moduleName = node.source.value.replace(/^node:/, '')
1255
- const fetchAliases = exportedFetchAliases(
1256
- file,
1257
- node.source.value,
1258
- exportedFetchAliasCache,
1259
- )
1301
+ const fetchAliases = exportedFetchAliases(file, node.source.value, caches)
1260
1302
  for (const specifier of node.specifiers) {
1261
1303
  if (
1262
1304
  specifier.type === 'ImportSpecifier' &&
@@ -1430,15 +1472,88 @@ export function detectOutboundCalls(repositoryRoot: string): DetectedOutboundCal
1430
1472
  'packages/contrast-runtime-delivery/src',
1431
1473
  'packages/peach-cloud-box/src',
1432
1474
  ]
1475
+ const tracked = trackedSourceFiles(repositoryRoot, roots)
1476
+ const sources = new Map<string, string>()
1477
+ for (const file of tracked) sources.set(file, fs.readFileSync(file, 'utf8'))
1478
+
1479
+ const caches: OutboundScanCaches = {
1480
+ trackedSet: new Set(tracked),
1481
+ sources,
1482
+ diskFiles: new Map(),
1483
+ parsed: new Map(),
1484
+ exportedFetchAliases: new Map(),
1485
+ networkNames: new Map(),
1486
+ exporterScanDone: false,
1487
+ }
1488
+
1489
+ const escapeRegExp = (value: string): string =>
1490
+ value.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')
1491
+ const fetchTokens = new Set(['fetch', 'fetchWithRetries'])
1492
+ const checkedExporters = new Set<string>()
1493
+ let fetchTokenPattern = new RegExp(
1494
+ `\\b(?:${[...fetchTokens].map(escapeRegExp).join('|')})\\b`,
1495
+ )
1496
+ while (true) {
1497
+ let added = false
1498
+ for (const file of tracked) {
1499
+ if (checkedExporters.has(file) || file.endsWith('/outbound-endpoints.ts')) continue
1500
+ const text = sources.get(file)!
1501
+ if (!EXPORT_VARIABLE_DECLARATION.test(text) || !fetchTokenPattern.test(text))
1502
+ continue
1503
+ checkedExporters.add(file)
1504
+ const aliases = new Set<string>()
1505
+ caches.exportedFetchAliases.set(file, aliases)
1506
+ const { program } = loadParsedFile(file, caches)
1507
+ const names = networkNames(program, file, caches)
1508
+ for (const statement of program.body) {
1509
+ if (
1510
+ statement.type !== 'ExportNamedDeclaration' ||
1511
+ statement.declaration?.type !== 'VariableDeclaration'
1512
+ )
1513
+ continue
1514
+ for (const declarator of statement.declaration.declarations) {
1515
+ if (
1516
+ declarator.id.type === 'Identifier' &&
1517
+ names.fetch.has(declarator.id.name)
1518
+ ) {
1519
+ aliases.add(declarator.id.name)
1520
+ if (!fetchTokens.has(declarator.id.name)) {
1521
+ fetchTokens.add(declarator.id.name)
1522
+ added = true
1523
+ }
1524
+ }
1525
+ }
1526
+ }
1527
+ }
1528
+ if (!added) break
1529
+ fetchTokenPattern = new RegExp(
1530
+ `\\b(?:${[...fetchTokens].map(escapeRegExp).join('|')})\\b`,
1531
+ )
1532
+ }
1533
+ caches.exporterScanDone = true
1534
+
1535
+ const activeTokens = new Set([
1536
+ ...fetchTokens,
1537
+ 'WebSocket',
1538
+ 'NativeWebSocket',
1539
+ 'EventSource',
1540
+ 'XMLHttpRequest',
1541
+ 'sendBeacon',
1542
+ 'http',
1543
+ 'https',
1544
+ 'net',
1545
+ 'transport',
1546
+ ])
1547
+ const tokenPattern = new RegExp(
1548
+ `\\b(?:${[...activeTokens].map(escapeRegExp).join('|')})\\b`,
1549
+ )
1550
+
1433
1551
  const counts = new Map<string, number>()
1434
- const exportedFetchAliasCache = new Map<string, Set<string>>()
1435
- for (const file of trackedSourceFiles(repositoryRoot, roots)) {
1552
+ for (const file of tracked) {
1436
1553
  if (file.endsWith('/outbound-endpoints.ts')) continue
1437
- const source = fs.readFileSync(file, 'utf8')
1438
- const program = parseSync(file, source, {
1439
- lang: file.endsWith('.tsx') ? 'tsx' : 'ts',
1440
- }).program
1441
- const names = networkNames(program, file, exportedFetchAliasCache)
1554
+ if (!tokenPattern.test(sources.get(file)!)) continue
1555
+ const { source, program } = loadParsedFile(file, caches)
1556
+ const names = networkNames(program, file, caches)
1442
1557
  const relative = path.relative(repositoryRoot, file).split(path.sep).join('/')
1443
1558
  const recordCall = (node: CallExpression | NewExpression): void => {
1444
1559
  const kind = callKind(node, names, source)
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2423 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2426 | (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;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2423 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2426 | (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 __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2423 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2426 | (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;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2423 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2426 | (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;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2423 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2426 | (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 __defProp = Object.defineProperty;
package/dist-lib/beta.cjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2423 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2426 | (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 __defProp = Object.defineProperty;
package/dist-lib/beta.mjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2423 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2426 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
 
3
3
  // src/beta.ts
4
4
  var IS_BETA = true;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2423 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2426 | (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 __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2423 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2426 | (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 __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2423 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2426 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
 
3
3
  // src/bridge-contract.ts
4
4
  var SIM_LONG_PRESS_MAX_MS = 5e3;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2423 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2426 | (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 __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2423 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2426 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
 
3
3
  // src/bridge-contract.ts
4
4
  var REFUSED_PERFORM_STEP_TYPES = [
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2423 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2426 | (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;
@@ -20117,7 +20117,10 @@ function emitSwiftStandin(sourceGraphs, options) {
20117
20117
  /@(\w+)(?:\([^)]*\))?\s*/g,
20118
20118
  (attr, name3) => typeByPath.has(name3) ? "" : attr
20119
20119
  ) : spelledAttrs;
20120
- const attrs = options.unobjc?.has(path111) ? wrapped.replace(/@objc(?:\([^)]*\))?\s*/g, "") : wrapped;
20120
+ const selector = context.inClass && !options.inert && member.kind.identifier === "swift.type.method" && !/\basync\b/.test(rest) ? /^c:objc\(cs\)\w+\(cm\)([A-Za-z_][A-Za-z_0-9:]*)$/.exec(
20121
+ member.identifier.precise
20122
+ )?.[1] : void 0;
20123
+ const attrs = options.unobjc?.has(path111) ? wrapped.replace(/@objc(?:\([^)]*\))?\s*/g, "") : `${wrapped}${selector ? `@objc(${selector}) ` : ""}`;
20121
20124
  const modifiers = /^((?:(?:required|final|override|convenience|unowned(?:\(\w+\))?|weak|lazy|nonisolated|mutating|nonmutating) )*)(.*)$/s.exec(
20122
20125
  rest
20123
20126
  );
@@ -25603,7 +25606,8 @@ function rewriteObject(bytes, names, callerAlias, binding, instrumentDynamicLook
25603
25606
  if (sectionName === "linking") {
25604
25607
  const version2 = number3();
25605
25608
  if (version2 !== 2) throw new Error("unsupported wasm linking version");
25606
- const parts = [encodedString(sectionName), encodeNumber(version2)];
25609
+ const subsections = [];
25610
+ let objcLoader;
25607
25611
  while (offset < section.length) {
25608
25612
  const kind = section[offset++];
25609
25613
  const length = number3();
@@ -25666,6 +25670,9 @@ function rewriteObject(bytes, names, callerAlias, binding, instrumentDynamicLook
25666
25670
  }
25667
25671
  } else if (symbolKind === 3) number3();
25668
25672
  else throw new Error("unsupported wasm symbol kind");
25673
+ if (name3 === OBJC_LOAD_FUNCTION && symbolKind === 0 && !(flags & 16)) {
25674
+ objcLoader = i;
25675
+ }
25669
25676
  const alias = names.get(name3);
25670
25677
  if (flags & 16 && symbolKind === 1 && alias) usedSymbols.add(name3);
25671
25678
  if ((name3 === "dlsym" && usesDlsym || name3 === "dlerror" && usesDlerror) && flags & 16 && flags & 64 && symbolKind === 0) {
@@ -25715,7 +25722,36 @@ function rewriteObject(bytes, names, callerAlias, binding, instrumentDynamicLook
25715
25722
  content = Buffer.concat([...entries, ...extraEntries]);
25716
25723
  }
25717
25724
  offset = stop;
25718
- parts.push(Buffer.from([kind]), encodeNumber(content.length), content);
25725
+ subsections.push({ kind, content });
25726
+ }
25727
+ const parts = [encodedString(sectionName), encodeNumber(version2)];
25728
+ for (const subsection of subsections) {
25729
+ let content = subsection.content;
25730
+ if (subsection.kind === 6 && objcLoader !== void 0) {
25731
+ const [count, entriesStart] = readNumber(content, 0);
25732
+ const entries = [content.subarray(0, entriesStart)];
25733
+ let entryStart = entriesStart;
25734
+ for (let i = 0; i < count; i++) {
25735
+ const [, symbolStart] = readNumber(content, entryStart);
25736
+ const [symbol2, entryEnd] = readNumber(content, symbolStart);
25737
+ if (symbol2 === objcLoader) entries.push(encodeNumber(1));
25738
+ entries.push(
25739
+ content.subarray(
25740
+ symbol2 === objcLoader ? symbolStart : entryStart,
25741
+ entryEnd
25742
+ )
25743
+ );
25744
+ entryStart = entryEnd;
25745
+ }
25746
+ if (entryStart !== content.length)
25747
+ throw new Error("invalid init functions subsection");
25748
+ content = Buffer.concat(entries);
25749
+ }
25750
+ parts.push(
25751
+ Buffer.from([subsection.kind]),
25752
+ encodeNumber(content.length),
25753
+ content
25754
+ );
25719
25755
  }
25720
25756
  section = Buffer.concat(parts);
25721
25757
  }
@@ -26009,11 +26045,12 @@ function createGuestImageLedger(input) {
26009
26045
  llvmIR: ir.join("\n") + "\n"
26010
26046
  };
26011
26047
  }
26012
- var OBJC_INIT_RECORD;
26048
+ var OBJC_INIT_RECORD, OBJC_LOAD_FUNCTION;
26013
26049
  var init_swift_guest_image_ledger = __esm({
26014
26050
  "src/swift-guest-image-ledger.ts"() {
26015
26051
  "use strict";
26016
26052
  OBJC_INIT_RECORD = ".objc_init";
26053
+ OBJC_LOAD_FUNCTION = ".objcv2_load_function";
26017
26054
  }
26018
26055
  });
26019
26056
 
@@ -28670,7 +28707,7 @@ function sourceGuestClangLinkOptions(options) {
28670
28707
  commands.set(file, { tool, args: value });
28671
28708
  }
28672
28709
  }
28673
- const result = /* @__PURE__ */ new Map();
28710
+ const replays = [];
28674
28711
  for (const [index, file] of [...wanted].entries()) {
28675
28712
  const command = commands.get(file);
28676
28713
  if (!command) throw new Error(`missing source object producer ${file}`);
@@ -28696,16 +28733,33 @@ function sourceGuestClangLinkOptions(options) {
28696
28733
  throw new Error(`missing clang ${flag} for ${file}`);
28697
28734
  args[index2 + 1] = flag === "-o" ? output2 : `${output2}.d`;
28698
28735
  }
28699
- (0, import_node_child_process19.execFileSync)(
28700
- command.args[0],
28701
- [...args, "-S", "-emit-llvm", "-Xclang", "-disable-llvm-passes"],
28702
- { stdio: "inherit" }
28703
- );
28736
+ replays.push({
28737
+ file,
28738
+ compiler: command.args[0],
28739
+ args: [...args, "-S", "-emit-llvm", "-Xclang", "-disable-llvm-passes"],
28740
+ output: output2
28741
+ });
28742
+ }
28743
+ const plan = import_node_path33.default.join(options.directory, "clang-link-replays.json");
28744
+ (0, import_node_fs34.writeFileSync)(
28745
+ plan,
28746
+ JSON.stringify(replays.map(({ compiler, args }) => [compiler, ...args]))
28747
+ );
28748
+ (0, import_node_child_process19.execFileSync)(process.execPath, ["-e", PARALLEL_REPLAY], {
28749
+ stdio: "inherit",
28750
+ env: {
28751
+ ...process.env,
28752
+ PEACH_CLANG_REPLAYS: plan,
28753
+ PEACH_CLANG_JOBS: String(options.jobs)
28754
+ }
28755
+ });
28756
+ const result = /* @__PURE__ */ new Map();
28757
+ for (const { file, output: output2 } of replays) {
28704
28758
  const flags = clangIrLinkOptions((0, import_node_fs34.readFileSync)(output2, "utf8"));
28705
- for (let index2 = 0; index2 < flags.length; index2++) {
28706
- const flag = flags[index2];
28759
+ for (let index = 0; index < flags.length; index++) {
28760
+ const flag = flags[index];
28707
28761
  if (flag === "-framework" || flag === "-l" || flag === "--library") {
28708
- const name3 = flags[++index2];
28762
+ const name3 = flags[++index];
28709
28763
  if (!name3 || name3.startsWith("-"))
28710
28764
  throw new Error(`missing clang link name after ${flag}`);
28711
28765
  } else if (!/^(-l.+|--library=.+)$/.test(flag)) {
@@ -28931,7 +28985,7 @@ function logicalGuestLinkOptions(args, identities, roots) {
28931
28985
  }
28932
28986
  return output2;
28933
28987
  }
28934
- var import_node_child_process19, import_node_crypto18, import_node_fs34, import_node_path33, CLANG_TARGET_MODULE_WRAPPER;
28988
+ var import_node_child_process19, import_node_crypto18, import_node_fs34, import_node_path33, CLANG_TARGET_MODULE_WRAPPER, PARALLEL_REPLAY;
28935
28989
  var init_swift_guest_source_inputs = __esm({
28936
28990
  "src/swift-guest-source-inputs.ts"() {
28937
28991
  "use strict";
@@ -28942,6 +28996,25 @@ var init_swift_guest_source_inputs = __esm({
28942
28996
  init_swift_guest_source_plan();
28943
28997
  init_swift_runtime_products();
28944
28998
  CLANG_TARGET_MODULE_WRAPPER = ".peach-clang";
28999
+ PARALLEL_REPLAY = `
29000
+ const { spawn } = require('node:child_process')
29001
+ const commands = JSON.parse(require('node:fs').readFileSync(process.env.PEACH_CLANG_REPLAYS, 'utf8'))
29002
+ let next = 0
29003
+ const run = () => {
29004
+ if (next >= commands.length) return Promise.resolve()
29005
+ const [file, ...args] = commands[next++]
29006
+ return new Promise((resolve, reject) => {
29007
+ const child = spawn(file, args, { stdio: 'inherit' })
29008
+ child.on('error', reject)
29009
+ child.on('close', (code) => (code === 0 ? resolve() : reject(new Error('clang link replay failed: ' + file))))
29010
+ }).then(run)
29011
+ }
29012
+ const jobs = Math.max(1, Number(process.env.PEACH_CLANG_JOBS) || 1)
29013
+ Promise.all(Array.from({ length: jobs }, run)).catch((error) => {
29014
+ console.error(error.message)
29015
+ process.exit(1)
29016
+ })
29017
+ `;
28945
29018
  }
28946
29019
  });
28947
29020
 
@@ -29516,7 +29589,8 @@ async function compileGuestLink(options) {
29516
29589
  directory: directory2,
29517
29590
  toolchainBin: options.toolchainBin,
29518
29591
  swiftCompiler: options.swiftCompiler,
29519
- objects: selectedSource.map((artifact) => artifact.path)
29592
+ objects: selectedSource.map((artifact) => artifact.path),
29593
+ jobs: options.jobs
29520
29594
  });
29521
29595
  const links = sourceGuestRuntimeLinks({
29522
29596
  toolchainBin: options.toolchainBin,
@@ -36161,7 +36235,8 @@ function compileSwiftProjectOnce(input, options) {
36161
36235
  generatedOwners: preparation.generatedOwners,
36162
36236
  output: output2,
36163
36237
  optimized,
36164
- optimize: input.optimize === true
36238
+ optimize: input.optimize === true,
36239
+ jobs: swiftBuildJobs()
36165
36240
  });
36166
36241
  else
36167
36242
  await lowerWasm(output2, optimized, { optimize: input.optimize === true });
@@ -36431,7 +36506,7 @@ int EXUpdatesApplyBSDiffPatch(const char * _Nonnull oldFilePath,
36431
36506
  REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
36432
36507
  MULTI_MANIFEST_VERSION = 72;
36433
36508
  SWIFT_HEADER_PRODUCTS_TARGET = "PeachHeaderProducts";
36434
- compilerSourceDigest = true ? "886349932526d72a5a1493acbcd1799ec941afd89998ad0eab64bbe9c48afb95" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
36509
+ compilerSourceDigest = true ? "714dbca336e958240697a0238ee5b0640b2b212c34df4843e82d0c1abe3e8c43" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
36435
36510
  nativeCxxCompilerFlags = ["-fno-cxx-modules"];
36436
36511
  cFlagArray = (flags) => JSON.stringify(withoutGlogModuleMap(flags));
36437
36512
  cxxFlagArray = (flags) => JSON.stringify([...nativeCxxCompilerFlags, ...withoutGlogModuleMap(flags)]);
@@ -52232,19 +52307,34 @@ var init_public_brand = __esm({
52232
52307
 
52233
52308
  // src/visit-parsed-program.ts
52234
52309
  function visitParsedProgram(program, visitor) {
52310
+ const enterByType = /* @__PURE__ */ new Map();
52311
+ const exitByType = /* @__PURE__ */ new Map();
52312
+ for (const key2 of Object.keys(visitor)) {
52313
+ const handler = Reflect.get(visitor, key2);
52314
+ if (typeof handler !== "function") continue;
52315
+ const invoke = (node) => {
52316
+ handler(node);
52317
+ };
52318
+ if (key2.endsWith(":exit")) exitByType.set(key2.slice(0, -5), invoke);
52319
+ else enterByType.set(key2, invoke);
52320
+ }
52321
+ if (enterByType.size === 0 && exitByType.size === 0) return;
52322
+ const hasExit = exitByType.size > 0;
52235
52323
  function visit3(value) {
52236
52324
  if (Array.isArray(value)) {
52237
- for (const child of value) visit3(child);
52325
+ for (let i = 0; i < value.length; i++) visit3(value[i]);
52238
52326
  return;
52239
52327
  }
52240
52328
  if (!isRecord(value) || typeof value.type !== "string") return;
52241
52329
  const keys = import_oxc_parser.visitorKeys[value.type];
52242
52330
  if (!keys) return;
52243
- const enter = Reflect.get(visitor, value.type);
52244
- if (typeof enter === "function") enter(value);
52245
- for (const key2 of keys) visit3(value[key2]);
52246
- const exit = Reflect.get(visitor, `${value.type}:exit`);
52247
- if (typeof exit === "function") exit(value);
52331
+ const enter = enterByType.get(value.type);
52332
+ if (enter) enter(value);
52333
+ for (let i = 0; i < keys.length; i++) visit3(value[keys[i]]);
52334
+ if (hasExit) {
52335
+ const exit = exitByType.get(value.type);
52336
+ if (exit) exit(value);
52337
+ }
52248
52338
  }
52249
52339
  visit3(program);
52250
52340
  }
@@ -54805,11 +54895,11 @@ function nativeStaticLibrary(file, recipe2, moduleRoot) {
54805
54895
  return "runtime" in recipe2 ? rustStaticLibrary(archive, moduleRoot) : archive;
54806
54896
  }
54807
54897
  function isRustSymbol(name3, demangled) {
54808
- return (name3.startsWith("_R") || /^_ZN.*17h[0-9a-f]{16}E$/.test(name3)) && demangled !== name3 || name3 === "rust_eh_personality" || name3 === "__getrandom_v03_custom";
54898
+ return (name3.startsWith("_R") || /^_ZN.*17h[0-9a-f]{16}E$/.test(name3)) && demangled !== name3 || name3 === "rust_eh_personality" || name3 === "__getrandom_custom" || name3 === "__getrandom_v03_custom";
54809
54899
  }
54810
54900
  function rustStaticLibrary(file, moduleRoot) {
54811
54901
  const toolchain = swiftModuleToolchain(moduleRoot);
54812
- const key2 = (0, import_node_crypto39.createHash)("sha256").update("rust-c-abi-v2\0").update(toolchain.release).update("\0").update(import_node_fs72.default.readFileSync(file)).digest("hex");
54902
+ const key2 = (0, import_node_crypto39.createHash)("sha256").update("rust-c-abi-v3\0").update(toolchain.release).update("\0").update(import_node_fs72.default.readFileSync(file)).digest("hex");
54813
54903
  const directory2 = import_node_path73.default.join(cacheDir(), "native-archives", key2);
54814
54904
  const archive = import_node_path73.default.join(directory2, "library.a");
54815
54905
  if (import_node_fs72.default.existsSync(archive)) return archive;
@@ -58936,7 +59026,7 @@ var init_swift_standin_digest = __esm({
58936
59026
  STANDIN_DIGEST_ENTRYPOINTS = ["swift-standins.ts", "swift-objc-compile.ts"];
58937
59027
  SPECIFIER = /from\s*['"]([^'"]+)['"]|import\s*\(\s*['"]([^'"]+)['"]\s*\)/g;
58938
59028
  standinSourceDigest = (srcDir = __sootsim_import_meta_dirname) => sourceClosureDigest(srcDir, STANDIN_DIGEST_ENTRYPOINTS);
58939
- STANDIN_SOURCE_DIGEST = true ? "2913d6a693b8a1c42193c1962c3468c2f8bc68c78a2f2f52961ca5efe03d1e67" : standinSourceDigest();
59029
+ STANDIN_SOURCE_DIGEST = true ? "76ba6566c9c2d1f2324dcae610243363f830f57e3753da053da53d749835e23a" : standinSourceDigest();
58940
59030
  }
58941
59031
  });
58942
59032
 
@@ -59476,6 +59566,9 @@ var init_swift_standin_builtin_behavior = __esm({
59476
59566
  "src/swift-standin-builtin-behavior.ts"() {
59477
59567
  "use strict";
59478
59568
  BUILTIN_STANDIN_BEHAVIOR = {
59569
+ FirebaseAnalytics: {
59570
+ "Analytics.logEvent(_:parameters:)": { body: "" }
59571
+ },
59479
59572
  GoogleCast: {
59480
59573
  kGCKCastDeviceCategory: { body: 'return "com.google.cast.CastDevice"' },
59481
59574
  kGCKDefaultMediaReceiverApplicationID: { body: 'return "CC1AD845"' },
@@ -73589,7 +73682,7 @@ var init_nitro_superset = __esm({
73589
73682
  init_nitroContract();
73590
73683
  init_swift_standin_digest();
73591
73684
  NITRO_SUPERSET_ENTRY_NAME = "superset";
73592
- NITRO_COMPILER_DIGEST = true ? "a6905cb4da4fec9b5ef03b34b0b2891e3ed553f5571d77e24e075fa7c483b0a9" : nitroCompilerSourceDigest(__sootsim_import_meta_dirname, STANDIN_SOURCE_DIGEST2);
73685
+ NITRO_COMPILER_DIGEST = true ? "8fdfc68d42fcc8dc68e86c44b43f11e69e48240a6cfcce40075612773e7133f4" : nitroCompilerSourceDigest(__sootsim_import_meta_dirname, STANDIN_SOURCE_DIGEST2);
73593
73686
  nitroSupersetLock = parseLock(nitro_superset_lock_default);
73594
73687
  nitroSupersetKey = (inputs) => nativeEntryKey({ ...inputs, compiler: NITRO_COMPILER_DIGEST });
73595
73688
  published = /* @__PURE__ */ new Map();
@@ -74828,7 +74921,7 @@ var init_expo_native_compiler_digest = __esm({
74828
74921
 
74829
74922
  // src/expo-native-prebuilt.ts
74830
74923
  function expoNativeCompilerDigestValue() {
74831
- return true ? "5a193936cb2c362dd919d9127e9318122bd8e86f9c6e05cbe56c4c6580a4636a" : expoNativeCompilerDigest(__sootsim_import_meta_dirname);
74924
+ return true ? "95d2f7fa52acb2c71a46d85b46df4e8307bc027d7bdcfed61fe9ce704175db4b" : expoNativeCompilerDigest(__sootsim_import_meta_dirname);
74832
74925
  }
74833
74926
  function readSources(value) {
74834
74927
  const sources = isRecord(value) ? value.sources : null;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2423 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2426 | (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 __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2423 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2426 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
 
3
3
  // src/capture-contract.ts
4
4
  var RNX_SCREEN_CAPTURE_VERSION = 1;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2423 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2426 | (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 __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2423 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2426 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
 
3
3
  // src/cloud-contract.ts
4
4
  var AGENT_IDENTITY_MAX_CHARS = 200;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2423 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2426 | (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 __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2423 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2426 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
 
3
3
  // src/cloud-test-args.ts
4
4
  var CLOUD_TEST_ARGS_MAX_COUNT = 32;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2423 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2426 | (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 __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2423 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2426 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  var __defProp = Object.defineProperty;
3
3
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
4
4
  var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);