peachsim 0.1.714 → 0.1.716

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 (76) hide show
  1. package/cli/commands/install-desktop.ts +74 -20
  2. package/cli/desktop-companion.ts +11 -6
  3. package/dist-lib/agent-daemon-client.cjs +1 -1
  4. package/dist-lib/agent-events.cjs +1 -1
  5. package/dist-lib/agent-identity.cjs +1 -1
  6. package/dist-lib/agent-sessions.cjs +1 -1
  7. package/dist-lib/attached-projects.cjs +1 -1
  8. package/dist-lib/auth/shared-session.cjs +1 -1
  9. package/dist-lib/backend-origin.cjs +1 -1
  10. package/dist-lib/beta.cjs +1 -1
  11. package/dist-lib/beta.mjs +1 -1
  12. package/dist-lib/bridge-constants.cjs +1 -1
  13. package/dist-lib/bridge-contract-input.cjs +1 -1
  14. package/dist-lib/bridge-contract-input.mjs +1 -1
  15. package/dist-lib/bridge-contract.cjs +1 -1
  16. package/dist-lib/bridge-contract.mjs +1 -1
  17. package/dist-lib/capture-contract.cjs +1 -1
  18. package/dist-lib/capture-contract.mjs +1 -1
  19. package/dist-lib/cli-constants.cjs +1 -1
  20. package/dist-lib/cloud-contract.cjs +1 -1
  21. package/dist-lib/cloud-contract.mjs +1 -1
  22. package/dist-lib/cloud-test-args.cjs +1 -1
  23. package/dist-lib/cloud-test-args.mjs +1 -1
  24. package/dist-lib/cloud.cjs +1 -1
  25. package/dist-lib/cloud.mjs +1 -1
  26. package/dist-lib/config.cjs +1 -1
  27. package/dist-lib/detox/index.cjs +1 -1
  28. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  29. package/dist-lib/home-paths.cjs +1 -1
  30. package/dist-lib/host/bridge-host.cjs +71 -25
  31. package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
  32. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  33. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  34. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  35. package/dist-lib/host/websocket-proxy.cjs +1 -1
  36. package/dist-lib/index.cjs +1 -1
  37. package/dist-lib/jump-to-source-babel.cjs +1 -1
  38. package/dist-lib/jump-to-source-native.cjs +1 -1
  39. package/dist-lib/kotlin-host.cjs +1 -1
  40. package/dist-lib/menu.cjs +1 -1
  41. package/dist-lib/menu.mjs +1 -1
  42. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  43. package/dist-lib/metro-fingerprint-registry.mjs +1 -1
  44. package/dist-lib/metro-production-bundle.cjs +1 -1
  45. package/dist-lib/metro-production-bundle.mjs +1 -1
  46. package/dist-lib/metro.cjs +1 -1
  47. package/dist-lib/native-app-identity.cjs +1 -1
  48. package/dist-lib/native-app-identity.mjs +1 -1
  49. package/dist-lib/native-firebase-metadata.cjs +1 -1
  50. package/dist-lib/native-firebase-metadata.mjs +1 -1
  51. package/dist-lib/plist.cjs +1 -1
  52. package/dist-lib/plist.mjs +1 -1
  53. package/dist-lib/profiles.cjs +1 -1
  54. package/dist-lib/public-brand.cjs +1 -1
  55. package/dist-lib/react-native-host-modules.cjs +1 -1
  56. package/dist-lib/react-native-host-modules.mjs +1 -1
  57. package/dist-lib/render-mode.cjs +1 -1
  58. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  59. package/dist-lib/sdk.cjs +1 -1
  60. package/dist-lib/sdk.mjs +1 -1
  61. package/dist-lib/skills.cjs +82 -31
  62. package/dist-lib/swift-compile.cjs +56 -21
  63. package/dist-lib/swift-compile.mjs +56 -21
  64. package/dist-lib/swift-package.cjs +27 -5
  65. package/dist-lib/swift-package.mjs +26 -5
  66. package/dist-lib/swift-submit.cjs +1 -1
  67. package/dist-lib/swift-submit.mjs +1 -1
  68. package/dist-lib/swift-toolchain.cjs +1 -1
  69. package/dist-lib/swift.cjs +1 -1
  70. package/dist-lib/vite-swift.cjs +63 -21
  71. package/dist-lib/vite.cjs +1 -1
  72. package/package.json +1 -1
  73. package/src/swift-compile.ts +43 -20
  74. package/src/swift-host.ts +9 -0
  75. package/src/swift-package.ts +42 -5
  76. package/src/swift-submit.ts +4 -0
@@ -24,8 +24,12 @@ import {
24
24
  unlinkSync,
25
25
  } from 'fs'
26
26
  import { tmpdir } from 'os'
27
- import { dirname, join, resolve } from 'path'
28
- import { findInstalledDesktopCompanion } from '../desktop-companion'
27
+ import { basename, dirname, join, resolve } from 'path'
28
+ import {
29
+ findDesktopCompanion,
30
+ findInstalledDesktopCompanion,
31
+ getNativeDesktopAppPath,
32
+ } from '../desktop-companion'
29
33
  import { confirm } from '../prompt'
30
34
  import { rnxExit } from '../run-rnx'
31
35
  import { accent, bold, failure, muted, success, withSpinner } from '../ui'
@@ -43,6 +47,18 @@ interface Target {
43
47
 
44
48
  function detectTarget(): Target | null {
45
49
  const arch = process.arch
50
+ const nativeApp = getNativeDesktopAppPath()
51
+ if (nativeApp) {
52
+ if (arch !== 'arm64')
53
+ throw new Error('native staging is available only on macOS arm64')
54
+ const filename = 'PeachDesktop-latest-mac-arm64.dmg'
55
+ return {
56
+ platform: 'mac-arm64',
57
+ filename,
58
+ url: 'https://r2.rnxsim.com/releases/native/staging/' + filename,
59
+ install: (downloaded) => installMacDmg(downloaded, nativeApp),
60
+ }
61
+ }
46
62
  if (process.platform === 'darwin') {
47
63
  const platform: TargetPlatform = arch === 'arm64' ? 'mac-arm64' : 'mac-x64'
48
64
  const filename = `peach-latest-${platform}.dmg`
@@ -128,7 +144,7 @@ function renderProgress(received: number, total: number | null): string {
128
144
  return ` ${bar} ${pct}% ${mb} / ${totalMb} MB`
129
145
  }
130
146
 
131
- async function installMacDmg(dmgPath: string): Promise<string> {
147
+ async function installMacDmg(dmgPath: string, nativeApp?: string): Promise<string> {
132
148
  const mountOutput = spawnSync(
133
149
  'hdiutil',
134
150
  ['attach', '-nobrowse', '-readonly', dmgPath],
@@ -148,36 +164,61 @@ async function installMacDmg(dmgPath: string): Promise<string> {
148
164
  throw new Error(`could not determine dmg mount point (output: ${mountOutput.stdout})`)
149
165
  }
150
166
 
151
- const appSource = join(mountPoint, 'peach.app')
167
+ const appName = nativeApp ? 'PeachDesktop.app' : 'peach.app'
168
+ const appSource = join(mountPoint, appName)
152
169
  if (!existsSync(appSource)) {
153
170
  spawnSync('hdiutil', ['detach', '-force', mountPoint])
154
- throw new Error(`peach.app not found inside ${mountPoint}`)
171
+ throw new Error(`${appName} not found inside ${mountPoint}`)
172
+ }
173
+
174
+ if (nativeApp) {
175
+ const requirement =
176
+ '=anchor apple generic and identifier "dev.contrast.peach-desktop" and certificate leaf[subject.OU] = "399WY8X9HY" and certificate leaf[field.1.2.840.113635.100.6.1.13] exists'
177
+ const signature = spawnSync('codesign', [
178
+ '--verify',
179
+ '--deep',
180
+ '--strict',
181
+ '-R',
182
+ requirement,
183
+ appSource,
184
+ ])
185
+ const notarization = spawnSync('spctl', ['--assess', '--type', 'execute', appSource])
186
+ if (signature.status !== 0 || notarization.status !== 0) {
187
+ spawnSync('hdiutil', ['detach', '-force', mountPoint])
188
+ throw new Error(
189
+ 'native staging app failed Developer ID or notarization verification',
190
+ )
191
+ }
155
192
  }
156
193
 
157
194
  // prefer /Applications if writable, otherwise ~/Applications (same paths
158
195
  // findInstalledDesktopCompanion checks, so no extra config needed post-install).
159
196
  const systemApps = '/Applications'
160
197
  const userApps = resolve(process.env.HOME || '', 'Applications')
161
- let destRoot = systemApps
162
- try {
163
- const probe = join(systemApps, `.peach-write-probe-${process.pid}`)
164
- spawnSync('touch', [probe])
165
- if (existsSync(probe)) rmSync(probe, { force: true })
166
- else destRoot = userApps
167
- } catch {
168
- destRoot = userApps
169
- }
170
- if (destRoot === userApps) {
198
+ let destRoot = nativeApp ? dirname(nativeApp) : systemApps
199
+ if (!nativeApp)
200
+ try {
201
+ const probe = join(systemApps, `.peach-write-probe-${process.pid}`)
202
+ spawnSync('touch', [probe])
203
+ if (existsSync(probe)) rmSync(probe, { force: true })
204
+ else destRoot = userApps
205
+ } catch {
206
+ destRoot = userApps
207
+ }
208
+ if (nativeApp || destRoot === userApps) {
171
209
  mkdirSync(destRoot, { recursive: true })
172
210
  }
173
211
 
174
- const appDest = join(destRoot, 'peach.app')
212
+ const appDest = nativeApp || join(destRoot, 'peach.app')
175
213
 
176
214
  // copy alongside the destination and swap, rather than deleting the installed
177
215
  // app first. removing it up front means a failed copy leaves the user with no
178
216
  // app at all, having destroyed a working install to do it. the staging path is
179
217
  // in the same directory so the swap is a rename on one volume.
180
- const staging = join(destRoot, `.peach-incoming-${process.pid}.app`)
218
+ const staging = join(
219
+ destRoot,
220
+ `.${basename(appDest, '.app')}-incoming-${process.pid}.app`,
221
+ )
181
222
  rmSync(staging, { recursive: true, force: true })
182
223
 
183
224
  const copy = spawnSync('cp', ['-R', appSource, staging])
@@ -188,7 +229,10 @@ async function installMacDmg(dmgPath: string): Promise<string> {
188
229
  }
189
230
  const detach = spawnSync('hdiutil', ['detach', '-force', mountPoint])
190
231
 
191
- const previous = join(destRoot, `.peach-previous-${process.pid}.app`)
232
+ const previous = join(
233
+ destRoot,
234
+ `.${basename(appDest, '.app')}-previous-${process.pid}.app`,
235
+ )
192
236
  if (existsSync(appDest)) {
193
237
  const park = spawnSync('mv', [appDest, previous])
194
238
  if (park.status !== 0) {
@@ -271,6 +315,9 @@ options:
271
315
  -y, --yes skip confirmation and install immediately
272
316
  --force reinstall even if the companion is already present
273
317
 
318
+ Set PEACH_DESKTOP_APP=/absolute/PeachDesktop.app to install native staging there.
319
+ The same variable selects that app when launching. Without it, install uses Electron.
320
+
274
321
  examples:
275
322
  peach desktop install
276
323
  peach desktop install --yes
@@ -286,7 +333,12 @@ examples:
286
333
  !process.stdin.isTTY
287
334
  const force = args.includes('--force')
288
335
 
289
- const existing = findInstalledDesktopCompanion()
336
+ const nativeApp = getNativeDesktopAppPath()
337
+ const existing = nativeApp
338
+ ? existsSync(nativeApp)
339
+ ? findDesktopCompanion()
340
+ : null
341
+ : findInstalledDesktopCompanion()
290
342
  if (existing && !force) {
291
343
  console.log(` ${success('✓')} Desktop app is already installed at ${existing.path}`)
292
344
  console.log(` ${muted('Pass --force to reinstall.')}`)
@@ -371,7 +423,9 @@ examples:
371
423
  // the download is good, only placing the app failed. on macOS the disk
372
424
  // image installs itself perfectly well by hand, so open it and let the user
373
425
  // drag rather than leaving them at a dead end. keep workDir for that.
374
- if (process.platform === 'darwin') {
426
+ if (nativeApp) {
427
+ rmSync(workDir, { recursive: true, force: true })
428
+ } else if (process.platform === 'darwin') {
375
429
  spawnSync('open', [downloadPath])
376
430
  console.error(` Opened ${target.filename} — drag peach to Applications to finish.`)
377
431
  } else {
@@ -229,13 +229,18 @@ function findWindowsInstall(): DesktopCompanionInstall | null {
229
229
  return null
230
230
  }
231
231
 
232
- export function findDesktopCompanion(): DesktopCompanionInstall | null {
232
+ export function getNativeDesktopAppPath(): string | null {
233
233
  const explicitApp = process.env.PEACH_DESKTOP_APP
234
- if (explicitApp) {
235
- if (process.platform !== 'darwin' || !explicitApp.endsWith('.app')) {
236
- throw new Error('PEACH_DESKTOP_APP must name a Mac .app bundle')
237
- }
238
- const appPath = resolve(explicitApp)
234
+ if (!explicitApp) return null
235
+ if (process.platform !== 'darwin' || !explicitApp.endsWith('.app')) {
236
+ throw new Error('PEACH_DESKTOP_APP must name a Mac .app bundle')
237
+ }
238
+ return resolve(explicitApp)
239
+ }
240
+
241
+ export function findDesktopCompanion(): DesktopCompanionInstall | null {
242
+ const appPath = getNativeDesktopAppPath()
243
+ if (appPath) {
239
244
  if (!existsSync(join(appPath, 'Contents/MacOS/PeachDesktop'))) {
240
245
  throw new Error(`native desktop executable missing in ${appPath}`)
241
246
  }
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.714 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.716 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.714 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.716 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.714 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.716 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.714 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.716 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.714 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.716 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.714 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.716 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.714 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.716 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
package/dist-lib/beta.cjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.714 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.716 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
package/dist-lib/beta.mjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.714 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.716 | (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
- /*! rnx v0.1.714 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.716 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.714 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.716 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.714 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.716 | (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
- /*! rnx v0.1.714 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.716 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.714 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.716 | (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
- /*! rnx v0.1.714 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.716 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.714 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.716 | (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
- /*! rnx v0.1.714 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.716 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.714 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.716 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.714 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.716 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/cloud-contract.ts
4
4
  var RNX_CLOUD_MAX_ARTIFACT_BYTES = 20 * 1024 * 1024;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.714 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.716 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.714 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.716 | (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
- /*! rnx v0.1.714 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.716 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.714 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.716 | (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);
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.714 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.716 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.714 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.716 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.714 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.716 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.714 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.716 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.714 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.716 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -1389,7 +1389,8 @@ var init_devices = __esm({
1389
1389
  width: 402,
1390
1390
  height: 874,
1391
1391
  scale: 3,
1392
- statusBarHeight: 59,
1392
+ // 62, the 17 pro's measured top: the same 402x874 panel and island.
1393
+ statusBarHeight: 62,
1393
1394
  landscapeStatusBarHeight: 0,
1394
1395
  homeIndicatorHeight: 34,
1395
1396
  cornerRadius: cornerRadii(61),
@@ -1398,7 +1399,7 @@ var init_devices = __esm({
1398
1399
  frameInsets: uniformFrameInsets(15.3),
1399
1400
  dynamicIsland: { width: 125, height: 110 / 3, top: 14 },
1400
1401
  statusRowCenter: 32.65,
1401
- safeAreaInsets: { top: 59, bottom: 34, left: 0, right: 0 },
1402
+ safeAreaInsets: { top: 62, bottom: 34, left: 0, right: 0 },
1402
1403
  iosVersion: "27.0",
1403
1404
  keyboardPanelHeights: { qwerty: 301, pad: 301, emoji: 395 },
1404
1405
  physicalPPI: 460,
@@ -1418,7 +1419,10 @@ var init_devices = __esm({
1418
1419
  width: 420,
1419
1420
  height: 912,
1420
1421
  scale: 3,
1421
- statusBarHeight: 59,
1422
+ // 68: the island and status row sit 6pt lower than the 17 pro's, and the
1423
+ // simulator reports a 68pt top safe area (useyourloaf, iphone 17 screen
1424
+ // sizes), so a navigation bar starts 9pt lower than it did at 59.
1425
+ statusBarHeight: 68,
1422
1426
  landscapeStatusBarHeight: 0,
1423
1427
  homeIndicatorHeight: 34,
1424
1428
  cornerRadius: cornerRadii(64.6),
@@ -1441,7 +1445,7 @@ var init_devices = __esm({
1441
1445
  frameInsets: uniformFrameInsets(10.7),
1442
1446
  dynamicIsland: { width: 125, height: 110 / 3, top: 20 },
1443
1447
  statusRowCenter: 39,
1444
- safeAreaInsets: { top: 59, bottom: 34, left: 0, right: 0 },
1448
+ safeAreaInsets: { top: 68, bottom: 34, left: 0, right: 0 },
1445
1449
  iosVersion: "27.0",
1446
1450
  keyboardPanelHeights: { qwerty: 311, pad: 311, emoji: 405 },
1447
1451
  physicalPPI: 460,
@@ -6268,7 +6272,15 @@ function icuSegment(object) {
6268
6272
  }
6269
6273
 
6270
6274
  // src/swift-package.ts
6271
- function swiftManifestTargets(manifest) {
6275
+ function swiftImplicitResourcePaths(paths) {
6276
+ return paths.filter(
6277
+ (file) => !file.endsWith(".swift") && (/\.(xcassets|xcstrings|nib|xib|storyboard|xcdatamodeld|xcdatamodel|xcmappingmodel|metal|xcprivacy)(?:\/|$)/.test(
6278
+ file
6279
+ ) || /(?:^|\/)[^/]+\.lproj\/[^/]+$/.test(file))
6280
+ ).sort();
6281
+ }
6282
+ function swiftManifestTargets(manifest, resourcePaths = []) {
6283
+ const implicitResources = swiftImplicitResourcePaths(resourcePaths);
6272
6284
  const code = manifest.replace(/\/\*[\s\S]*?\*\//g, "").replace(/\/\/[^\n]*/g, "");
6273
6285
  const targets = [];
6274
6286
  const pattern = /\.(executableTarget|target)\s*\(/g;
@@ -6311,7 +6323,19 @@ function swiftManifestTargets(manifest) {
6311
6323
  /\.swiftLanguageMode\(\s*\.v(\d+)\s*\)/.exec(call)?.[1] ?? "5"
6312
6324
  );
6313
6325
  const mainActorIsolation = /\.defaultIsolation\(\s*MainActor\.self\s*\)/.test(call);
6314
- const resources = /\bresources\s*:/.test(flat);
6326
+ const excluded = [
6327
+ ...(/\bexclude\s*:\s*\[([^\]]*)\]/.exec(flat)?.[1] ?? "").matchAll(/"([^"]+)"/g)
6328
+ ].map((match2) => match2[1].replace(/^\.\//, "").replace(/\/+$/, ""));
6329
+ const prefix = targetPath === "." ? "" : `${targetPath}/`;
6330
+ const resources = /\bresources\s*:/.test(flat) || implicitResources.some((file) => {
6331
+ if (!file.startsWith(prefix)) return false;
6332
+ const relative2 = file.slice(prefix.length);
6333
+ if (excluded.some(
6334
+ (exclude) => relative2 === exclude || relative2.startsWith(`${exclude}/`)
6335
+ ))
6336
+ return false;
6337
+ return true;
6338
+ });
6315
6339
  targets.push({
6316
6340
  name: name2,
6317
6341
  path: targetPath,
@@ -6323,8 +6347,8 @@ function swiftManifestTargets(manifest) {
6323
6347
  }
6324
6348
  return targets;
6325
6349
  }
6326
- function swiftPackagePartition(manifest) {
6327
- const targets = swiftManifestTargets(manifest);
6350
+ function swiftPackagePartition(manifest, resourcePaths = []) {
6351
+ const targets = swiftManifestTargets(manifest, resourcePaths);
6328
6352
  return targets.length === 1 && targets[0].executable && targets[0].path === "." ? [] : targets;
6329
6353
  }
6330
6354
 
@@ -6422,7 +6446,7 @@ function swiftModuleDigest(root) {
6422
6446
  }
6423
6447
  function compileTargets(input) {
6424
6448
  const manifest = input.files["Package.swift"];
6425
- return manifest === void 0 ? [] : swiftPackagePartition(manifest);
6449
+ return manifest === void 0 ? [] : swiftPackagePartition(manifest, input.resourcePaths);
6426
6450
  }
6427
6451
  function withNativeSourceGlue(input, glue) {
6428
6452
  const targets = compileTargets(input);
@@ -6487,7 +6511,7 @@ var ONE_IMPLICIT_FLAGS = ', "-Xfrontend", "-import-module", "-Xfrontend", "One"'
6487
6511
  var MULTI_MANIFEST_VERSION = 10;
6488
6512
  function swiftArtifactHash(input, release, moduleRoot) {
6489
6513
  const hash = (0, import_node_crypto3.createHash)("sha256");
6490
- hash.update(`swift-compile/v12
6514
+ hash.update(`swift-compile/v13
6491
6515
  ${release}
6492
6516
  `);
6493
6517
  if (input.oneModule) hash.update("one-module\n");
@@ -6509,6 +6533,10 @@ ${release}
6509
6533
  hash.update((0, import_node_crypto3.createHash)("sha256").update(image.file).digest());
6510
6534
  hash.update((0, import_node_crypto3.createHash)("sha256").update(image.data).digest());
6511
6535
  }
6536
+ for (const file of [...new Set(input.resourcePaths ?? [])].sort()) {
6537
+ hash.update("resource-path\n");
6538
+ hash.update((0, import_node_crypto3.createHash)("sha256").update(file).digest());
6539
+ }
6512
6540
  const targets = compileTargets(input);
6513
6541
  if (targets.length > 0) {
6514
6542
  hash.update(`swift-multi/v${MULTI_MANIFEST_VERSION}
@@ -6960,6 +6988,10 @@ function swiftCodeScan(source) {
6960
6988
  }
6961
6989
  var compiledSource = (file, contents) => file.endsWith(".swift") ? swiftSourceAsIOS(contents) : contents;
6962
6990
  function writeSwiftProject(layout, input, moduleRoot) {
6991
+ const resourceTargets = swiftManifestTargets(
6992
+ input.files["Package.swift"] ?? "",
6993
+ input.resourcePaths
6994
+ );
6963
6995
  const distribution = swiftDistributionAt(moduleRoot);
6964
6996
  const targets = distribution && compileTargets(input).length === 0 ? [
6965
6997
  {
@@ -6978,8 +7010,14 @@ function writeSwiftProject(layout, input, moduleRoot) {
6978
7010
  if (!distribution) {
6979
7011
  modulePlan.update((0, import_node_fs7.readFileSync)(import_node_path7.default.join(moduleRoot, "Package.swift")));
6980
7012
  }
7013
+ const resourcePlan = (0, import_node_crypto3.createHash)("sha256").update(
7014
+ JSON.stringify(
7015
+ resourceTargets.filter((target) => target.resources).map((target) => [target.name, target.path])
7016
+ )
7017
+ ).digest("hex").slice(0, 16);
6981
7018
  const moduleFiles = `
6982
7019
  // sootsim-swift files ${modulePlan.digest("hex").slice(0, 16)}
7020
+ // resource accessors ${resourcePlan}
6983
7021
  `;
6984
7022
  if (targets.length === 0) {
6985
7023
  for (const [file, contents] of Object.entries(input.files)) {
@@ -7032,20 +7070,6 @@ function writeSwiftProject(layout, input, moduleRoot) {
7032
7070
  if (file === "Package.swift") continue;
7033
7071
  files.set(import_node_path7.default.join(base, file), compiledSource(file, contents));
7034
7072
  }
7035
- for (const target of targets) {
7036
- if (!target.resources) continue;
7037
- files.set(
7038
- import_node_path7.default.join(layout.root, target.path, "ResourceBundleAccessor.generated.swift"),
7039
- [
7040
- "import Foundation",
7041
- "",
7042
- "extension Foundation.Bundle {",
7043
- " static let module: Bundle = Bundle.main",
7044
- "}",
7045
- ""
7046
- ].join("\n")
7047
- );
7048
- }
7049
7073
  files.set(
7050
7074
  import_node_path7.default.join(layout.root, "Package.swift"),
7051
7075
  emitSwiftPackageManifest({
@@ -7061,6 +7085,21 @@ function writeSwiftProject(layout, input, moduleRoot) {
7061
7085
  }) + moduleFiles
7062
7086
  );
7063
7087
  }
7088
+ for (const target of resourceTargets) {
7089
+ if (!target.resources) continue;
7090
+ const directory = layout.multi ? import_node_path7.default.join(layout.root, target.path) : layout.sources;
7091
+ files.set(
7092
+ import_node_path7.default.join(directory, "ResourceBundleAccessor.generated.swift"),
7093
+ [
7094
+ "import Foundation",
7095
+ "",
7096
+ "extension Foundation.Bundle {",
7097
+ " static let module: Bundle = Bundle.main",
7098
+ "}",
7099
+ ""
7100
+ ].join("\n")
7101
+ );
7102
+ }
7064
7103
  syncSwiftTree(layout.root, files);
7065
7104
  }
7066
7105
  function streamText(value) {
@@ -8479,6 +8518,11 @@ function packageSnapshot(project) {
8479
8518
  const native = nativeSourceDescriptor(project.packagePath);
8480
8519
  return {
8481
8520
  files,
8521
+ resourcePaths: swiftImplicitResourcePaths(
8522
+ resourceCandidateFiles(project.packagePath).map(
8523
+ (file) => import_node_path13.default.relative(project.packagePath, file).split(import_node_path13.default.sep).join(import_node_path13.default.posix.sep)
8524
+ )
8525
+ ),
8482
8526
  resources: buildSwiftResourceTable(project, ""),
8483
8527
  bundleFiles: buildSwiftBundleFiles(project.packagePath),
8484
8528
  native,
@@ -8494,6 +8538,7 @@ function packageSnapshot(project) {
8494
8538
  function snapshotCompileInput(snapshot, entry) {
8495
8539
  const input = {
8496
8540
  files: snapshot.files,
8541
+ resourcePaths: snapshot.resourcePaths,
8497
8542
  resources: snapshot.bundleFiles.files,
8498
8543
  images: snapshot.resources.images,
8499
8544
  entry,
@@ -8569,6 +8614,7 @@ async function compileRemote(packagePath, entry, snapshot, hosted) {
8569
8614
  submit,
8570
8615
  {
8571
8616
  files: snapshot.files,
8617
+ resourcePaths: snapshot.resourcePaths,
8572
8618
  resources: snapshot.bundleFiles.files,
8573
8619
  images: snapshot.resources.images,
8574
8620
  entry,
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.714 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.716 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.714 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.716 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.714 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.716 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/host/fetch-proxy-overrides.ts
4
4
  var FETCH_PROXY_NATIVE_USER_AGENT_HEADER = "x-sootsim-native-user-agent";
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.714 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.716 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.714 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.716 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;