peachsim 0.1.2036 → 0.1.2038

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 (93) hide show
  1. package/cli/cloud-test-tunnel.ts +43 -6
  2. package/cli/outbound-endpoints.ts +4 -0
  3. package/dist-lib/agent-daemon-client.cjs +1 -1
  4. package/dist-lib/agent-events.cjs +1 -1
  5. package/dist-lib/attached-projects.cjs +1 -1
  6. package/dist-lib/auth/shared-session.cjs +1 -1
  7. package/dist-lib/backend-origin.cjs +1 -1
  8. package/dist-lib/beta.cjs +1 -1
  9. package/dist-lib/beta.mjs +1 -1
  10. package/dist-lib/bridge-constants.cjs +1 -1
  11. package/dist-lib/bridge-contract-input.cjs +1 -1
  12. package/dist-lib/bridge-contract-input.mjs +1 -1
  13. package/dist-lib/bridge-contract.cjs +1 -1
  14. package/dist-lib/bridge-contract.mjs +1 -1
  15. package/dist-lib/bundle-channel.cjs +3809 -3745
  16. package/dist-lib/capture-contract.cjs +1 -1
  17. package/dist-lib/capture-contract.mjs +1 -1
  18. package/dist-lib/cloud-contract.cjs +1 -1
  19. package/dist-lib/cloud-contract.mjs +1 -1
  20. package/dist-lib/cloud-test-args.cjs +1 -1
  21. package/dist-lib/cloud-test-args.mjs +1 -1
  22. package/dist-lib/cloud.cjs +1 -1
  23. package/dist-lib/cloud.mjs +1 -1
  24. package/dist-lib/config.cjs +1 -1
  25. package/dist-lib/config.mjs +1 -1
  26. package/dist-lib/detox/index.cjs +15 -7
  27. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  28. package/dist-lib/expo-swift-bundle.cjs +3082 -3031
  29. package/dist-lib/expo-swift-metadata.cjs +2 -2
  30. package/dist-lib/expo-swift-metadata.mjs +2 -2
  31. package/dist-lib/home-paths.cjs +1 -1
  32. package/dist-lib/host/bridge-host.cjs +3781 -3715
  33. package/dist-lib/host/fetch-proxy-handler.cjs +5119 -274
  34. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  35. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  36. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  37. package/dist-lib/host/websocket-proxy.cjs +1 -1
  38. package/dist-lib/index.cjs +16678 -16580
  39. package/dist-lib/jump-to-source-babel.cjs +1 -1
  40. package/dist-lib/jump-to-source-native.cjs +1 -1
  41. package/dist-lib/kotlin-host.cjs +1 -1
  42. package/dist-lib/menu.cjs +1 -1
  43. package/dist-lib/menu.mjs +1 -1
  44. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  45. package/dist-lib/metro-fingerprint-registry.mjs +1 -1
  46. package/dist-lib/metro-production-bundle.cjs +1 -1
  47. package/dist-lib/metro-production-bundle.mjs +1 -1
  48. package/dist-lib/metro.cjs +12463 -12361
  49. package/dist-lib/native-app-identity-project.cjs +1 -1
  50. package/dist-lib/native-app-identity-project.mjs +1 -1
  51. package/dist-lib/native-app-identity.cjs +1 -1
  52. package/dist-lib/native-app-identity.mjs +1 -1
  53. package/dist-lib/native-firebase-metadata.cjs +1 -1
  54. package/dist-lib/native-firebase-metadata.mjs +1 -1
  55. package/dist-lib/pdfium-raster.cjs +1 -1
  56. package/dist-lib/pdfium-raster.mjs +1 -1
  57. package/dist-lib/plist.cjs +1 -1
  58. package/dist-lib/plist.mjs +1 -1
  59. package/dist-lib/profiles.cjs +1 -1
  60. package/dist-lib/public-brand.cjs +1 -1
  61. package/dist-lib/public-origins-lib-esm.json +24 -24
  62. package/dist-lib/public-origins-lib.json +577 -181
  63. package/dist-lib/react-native-host-modules.cjs +1 -1
  64. package/dist-lib/react-native-host-modules.mjs +1 -1
  65. package/dist-lib/reap-browser.cjs +1 -1
  66. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  67. package/dist-lib/sdk.cjs +1 -1
  68. package/dist-lib/sdk.mjs +1 -1
  69. package/dist-lib/skills.cjs +4400 -4311
  70. package/dist-lib/swift-compile.cjs +1 -1
  71. package/dist-lib/swift-compile.mjs +1 -1
  72. package/dist-lib/swift-package.cjs +1 -1
  73. package/dist-lib/swift-package.mjs +1 -1
  74. package/dist-lib/swift-submit.cjs +1 -1
  75. package/dist-lib/swift-submit.mjs +1 -1
  76. package/dist-lib/swift-toolchain.cjs +1 -1
  77. package/dist-lib/swift.cjs +1 -1
  78. package/dist-lib/vite-swift.cjs +2 -2
  79. package/dist-lib/vite.cjs +5159 -342
  80. package/dist-lib/worklet-executable.cjs +1 -1
  81. package/dist-lib/worklet-executable.mjs +1 -1
  82. package/dist-types/packages/peach-globals/src/electronBridgeContract.d.ts +4 -0
  83. package/package.json +1 -1
  84. package/runtime-companion.json +1 -1
  85. package/src/expo-autolinking.ts +36 -13
  86. package/src/expo-native-workspace.ts +10 -9
  87. package/src/expo-pod-prebuilt.ts +122 -0
  88. package/src/expo-swift-host.ts +38 -8
  89. package/src/expo-swift-ready.ts +11 -5
  90. package/src/expoSwiftContract.ts +2 -1
  91. package/src/host/dev-server-package-versions.ts +20 -4
  92. package/src/native-failure-output.ts +34 -0
  93. package/src/native-prebuilt.ts +3 -3
@@ -27,8 +27,9 @@ import { createServer, request as httpRequest } from 'node:http'
27
27
  import { tmpdir } from 'node:os'
28
28
  import { join } from 'node:path'
29
29
  import { pipeline } from 'node:stream'
30
+ import { text } from 'node:stream/consumers'
30
31
  import { isLoopbackHost } from '../src/backend-origin'
31
- import { readDevServerPackageVersions } from '../src/host/dev-server-package-versions'
32
+ import { insertExpoSwiftFooter, readExpoSwiftFooter } from '../src/expoSwiftContract'
32
33
  import { PACKAGE_VERSIONS_HEADER } from '../src/packageVersionsContract'
33
34
  import { sleep } from '../src/sleep'
34
35
 
@@ -149,13 +150,37 @@ export function startCloudTestTokenProxy(
149
150
  }
150
151
  // read the serving project's install while Metro builds, never the CLI's cwd.
151
152
  // sidecars and non-bundle requests keep their original response metadata.
152
- const packageVersionsRead =
153
- selectedPort === upstreamPort && req.method === 'GET'
154
- ? readDevServerPackageVersions(
155
- new URL(req.url || '/', `http://localhost:${upstreamPort}`),
156
- )
153
+ // the helpers load on a bundle request only: they reach the Swift compiler
154
+ // graph, which a plain proxy request must not initialize.
155
+ const bundleUrl = new URL(req.url || '/', `http://localhost:${upstreamPort}`)
156
+ const devServerHelpers =
157
+ selectedPort === upstreamPort &&
158
+ req.method === 'GET' &&
159
+ bundleUrl.pathname.endsWith('.bundle')
160
+ ? import('../src/host/dev-server-package-versions')
157
161
  : null
162
+ const packageVersionsRead =
163
+ devServerHelpers?.then((helpers) =>
164
+ helpers.readDevServerPackageVersions(bundleUrl),
165
+ ) ?? null
158
166
  packageVersionsRead?.catch(() => {})
167
+ // the Expo Swift footer goes into the bundle text, so a bundle comes back
168
+ // whole and unencoded rather than multipart.
169
+ const podsRead = devServerHelpers
170
+ ? devServerHelpers
171
+ .then((helpers) => helpers.readDevServerExpoPods(bundleUrl))
172
+ .catch((error) => {
173
+ // a lookup only adds modules; the bundle is served without them
174
+ console.error(
175
+ `expo pod lookup failed: ${error instanceof Error ? error.message : error}`,
176
+ )
177
+ return null
178
+ })
179
+ : null
180
+ if (podsRead) {
181
+ delete headers['accept-encoding']
182
+ delete headers.accept
183
+ }
159
184
  const up = httpRequest(
160
185
  {
161
186
  host: 'localhost',
@@ -176,6 +201,18 @@ export function startCloudTestTokenProxy(
176
201
  upRes.headers[PACKAGE_VERSIONS_HEADER.toLowerCase()] =
177
202
  JSON.stringify(versions)
178
203
  }
204
+ const pods = podsRead && upRes.statusCode === 200 ? await podsRead : null
205
+ if (pods) {
206
+ const source = await text(upRes)
207
+ const stamped = readExpoSwiftFooter(source)
208
+ ? source
209
+ : insertExpoSwiftFooter(source, pods)
210
+ delete upRes.headers['content-length']
211
+ delete upRes.headers['content-encoding']
212
+ res.writeHead(200, upRes.headers)
213
+ res.end(stamped)
214
+ return
215
+ }
179
216
  res.writeHead(upRes.statusCode || 502, upRes.headers)
180
217
  // a broken upstream body must break the downstream response too. pipe()
181
218
  // leaves it open after an aborted transfer, stranding the tester.
@@ -529,6 +529,10 @@ export const DECLARED_OUTBOUND_CALLS: Record<string, OutboundCallDeclaration> =
529
529
  category: 'runtime_delivery',
530
530
  count: 1,
531
531
  },
532
+ 'packages/peachsim/src/expo-pod-prebuilt.ts :: fetch :: url': {
533
+ category: 'runtime_delivery',
534
+ count: 1,
535
+ },
532
536
  'packages/contrast-runtime-delivery/src/index.ts :: fetch :: url': {
533
537
  category: 'runtime_delivery',
534
538
  count: 2,
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2036 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2038 | (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.2036 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2038 | (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.2036 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2038 | (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.2036 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2038 | (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.2036 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2038 | (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.2036 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2038 | (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.2036 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2038 | (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.2036 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2038 | (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.2036 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2038 | (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.2036 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2038 | (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.2036 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2038 | (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.2036 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2038 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
 
3
3
  // src/bridge-contract.ts
4
4
  var REFUSED_PERFORM_STEP_TYPES = [