peachsim 0.1.1620 → 0.1.1625

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 (138) hide show
  1. package/README.md +35 -5
  2. package/cli/app-fonts.ts +2 -1
  3. package/cli/bridge-flow-runner.ts +184 -113
  4. package/cli/cloud-client.ts +68 -57
  5. package/cli/commands/box/search-command.ts +3 -2
  6. package/cli/commands/box.ts +10 -29
  7. package/cli/commands/control.ts +108 -43
  8. package/cli/commands/inspect/settling.ts +57 -20
  9. package/cli/commands/maestro-compare.ts +11 -32
  10. package/cli/commands/platform.ts +71 -36
  11. package/cli/commands/upload.ts +5 -1
  12. package/cli/dev-build-freshness.ts +37 -2
  13. package/cli/drivers/playwright-sim-host.ts +6 -5
  14. package/cli/maestro-accessibility.ts +53 -0
  15. package/cli/maestro-compare.ts +24 -0
  16. package/cli/outbound-endpoints.ts +22 -5
  17. package/cli/parent-pid.ts +0 -9
  18. package/cli/remote-simulators.ts +112 -0
  19. package/cli/remoteSimulatorContract.ts +21 -0
  20. package/detox/expectations.ts +5 -1
  21. package/detox/index.ts +133 -98
  22. package/detox/motion-change.cjs +37 -0
  23. package/detox/motion-change.d.cts +16 -0
  24. package/detox/navigation-lifecycle.ts +22 -4
  25. package/dist-lib/agent-daemon-client.cjs +3 -2
  26. package/dist-lib/agent-events.cjs +1 -1
  27. package/dist-lib/attached-projects.cjs +1 -1
  28. package/dist-lib/auth/shared-session.cjs +3 -2
  29. package/dist-lib/backend-origin.cjs +1 -1
  30. package/dist-lib/beta.cjs +1 -1
  31. package/dist-lib/beta.mjs +1 -1
  32. package/dist-lib/bridge-constants.cjs +1 -1
  33. package/dist-lib/bridge-contract-input.cjs +1 -1
  34. package/dist-lib/bridge-contract-input.mjs +1 -1
  35. package/dist-lib/bridge-contract.cjs +1 -1
  36. package/dist-lib/bridge-contract.mjs +1 -1
  37. package/dist-lib/bundle-channel.cjs +1520 -934
  38. package/dist-lib/capture-contract.cjs +1 -1
  39. package/dist-lib/capture-contract.mjs +1 -1
  40. package/dist-lib/cloud-contract.cjs +1 -1
  41. package/dist-lib/cloud-contract.mjs +1 -1
  42. package/dist-lib/cloud-test-args.cjs +1 -1
  43. package/dist-lib/cloud-test-args.mjs +1 -1
  44. package/dist-lib/cloud.cjs +3 -2
  45. package/dist-lib/cloud.mjs +3 -2
  46. package/dist-lib/config.cjs +5 -4
  47. package/dist-lib/config.mjs +5 -4
  48. package/dist-lib/detox/index.cjs +1021 -364
  49. package/dist-lib/dev-bundle-resolution.cjs +51 -23
  50. package/dist-lib/expo-swift-bundle.cjs +1343 -801
  51. package/dist-lib/expo-swift-metadata.cjs +5 -4
  52. package/dist-lib/expo-swift-metadata.mjs +5 -4
  53. package/dist-lib/home-paths.cjs +1 -1
  54. package/dist-lib/host/bridge-host.cjs +2468 -1341
  55. package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
  56. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  57. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  58. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  59. package/dist-lib/host/websocket-proxy.cjs +1 -1
  60. package/dist-lib/index.cjs +1262 -300
  61. package/dist-lib/jump-to-source-babel.cjs +1 -1
  62. package/dist-lib/jump-to-source-native.cjs +1 -1
  63. package/dist-lib/kotlin-host.cjs +1 -1
  64. package/dist-lib/menu.cjs +3 -2
  65. package/dist-lib/menu.mjs +3 -2
  66. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  67. package/dist-lib/metro-fingerprint-registry.mjs +1 -1
  68. package/dist-lib/metro-production-bundle.cjs +5 -4
  69. package/dist-lib/metro-production-bundle.mjs +5 -4
  70. package/dist-lib/metro.cjs +799 -398
  71. package/dist-lib/native-app-identity-project.cjs +728 -22
  72. package/dist-lib/native-app-identity-project.mjs +727 -22
  73. package/dist-lib/native-app-identity.cjs +224 -9
  74. package/dist-lib/native-app-identity.mjs +222 -8
  75. package/dist-lib/native-firebase-metadata.cjs +5 -4
  76. package/dist-lib/native-firebase-metadata.mjs +5 -4
  77. package/dist-lib/plist.cjs +1 -1
  78. package/dist-lib/plist.mjs +1 -1
  79. package/dist-lib/profiles.cjs +1 -1
  80. package/dist-lib/public-brand.cjs +3 -2
  81. package/dist-lib/react-native-host-modules.cjs +4 -1
  82. package/dist-lib/react-native-host-modules.mjs +4 -1
  83. package/dist-lib/scripts/dev-server-scanner.cjs +94 -28
  84. package/dist-lib/sdk.cjs +89 -24
  85. package/dist-lib/sdk.mjs +89 -24
  86. package/dist-lib/skills.cjs +4391 -2350
  87. package/dist-lib/swift-compile.cjs +328 -142
  88. package/dist-lib/swift-compile.mjs +342 -147
  89. package/dist-lib/swift-package.cjs +1 -1
  90. package/dist-lib/swift-package.mjs +1 -1
  91. package/dist-lib/swift-submit.cjs +1 -1
  92. package/dist-lib/swift-submit.mjs +1 -1
  93. package/dist-lib/swift-toolchain.cjs +1 -1
  94. package/dist-lib/swift.cjs +1 -1
  95. package/dist-lib/vite-swift.cjs +888 -559
  96. package/dist-lib/vite.cjs +68 -14
  97. package/dist-lib/worklet-executable.cjs +25 -2
  98. package/dist-lib/worklet-executable.mjs +25 -2
  99. package/package.json +2 -2
  100. package/scripts/dev-server-scanner.ts +33 -13
  101. package/src/admitted-mac-build.ts +34 -8
  102. package/src/android-app-identity.ts +146 -0
  103. package/src/android-autolinking.ts +75 -0
  104. package/src/android-string-value.ts +36 -0
  105. package/src/android-strings.ts +5 -36
  106. package/src/androidAutolinkingContract.ts +40 -0
  107. package/src/bundleGlobalFooter.ts +26 -7
  108. package/src/codex-client.ts +3 -2
  109. package/src/dev-bundle-resolution.ts +58 -25
  110. package/src/expo-kotlin-host.ts +6 -36
  111. package/src/expo-swift-bundle.ts +17 -12
  112. package/src/expo-swift-host.ts +477 -173
  113. package/src/expoSwiftContract.ts +6 -0
  114. package/src/host/bridge-host.ts +7 -55
  115. package/src/host/staged-host-files.ts +29 -2
  116. package/src/installed-package-versions.ts +54 -14
  117. package/src/launchMetadataContract.ts +24 -0
  118. package/src/metro-plugin.ts +37 -42
  119. package/src/native-app-identity-project.ts +116 -3
  120. package/src/native-app-identity.ts +86 -11
  121. package/src/nitro-compile.ts +2 -5
  122. package/src/nitro-source.ts +147 -63
  123. package/src/process-group.ts +90 -60
  124. package/src/process-output.ts +0 -9
  125. package/src/public-brand.ts +1 -0
  126. package/src/react-native-host-modules.ts +3 -0
  127. package/src/sim-client.ts +6 -4
  128. package/src/swift-compile.ts +176 -28
  129. package/src/swift-distribution.lock.json +37 -11
  130. package/src/swift-distribution.ts +61 -9
  131. package/src/swift-host.ts +58 -27
  132. package/src/swift-objc-standin.ts +13 -0
  133. package/src/swift-standin-emit.ts +1 -1
  134. package/src/swift-standins.ts +17 -5
  135. package/src/vite-plugin.ts +8 -19
  136. package/src/worklet-executable.ts +30 -3
  137. package/src/worklets-babel.ts +35 -14
  138. package/src/xcode-project.ts +10 -0
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1620 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1625 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
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;
@@ -24,6 +24,7 @@ var dev_bundle_resolution_exports = {};
24
24
  __export(dev_bundle_resolution_exports, {
25
25
  DEFAULT_TEST_DRIVE_PORT: () => DEFAULT_TEST_DRIVE_PORT,
26
26
  MANIFEST_PROBE_TIMEOUT_MS: () => MANIFEST_PROBE_TIMEOUT_MS,
27
+ fetchDevManifest: () => fetchDevManifest,
27
28
  inferManifestFramework: () => inferManifestFramework,
28
29
  probePortBundle: () => probePortBundle,
29
30
  resolveConnectionInput: () => resolveConnectionInput
@@ -160,40 +161,54 @@ async function resolvePortViaServerScan(port) {
160
161
  }
161
162
  }
162
163
  var MANIFEST_PROBE_TIMEOUT_MS = 3e4;
163
- async function probeExpoManifest(normalizedBaseUrl, port) {
164
- let body;
164
+ var manifestRequests = /* @__PURE__ */ new Map();
165
+ async function fetchDevManifest(baseUrl) {
166
+ const normalizedBaseUrl = baseUrl.replace(/\/+$/, "");
167
+ const existing = manifestRequests.get(normalizedBaseUrl);
168
+ if (existing) return (await existing)?.clone();
165
169
  const pending = fetchDevProbe(`${normalizedBaseUrl}/`, {
166
170
  headers: { "expo-platform": "ios" }
167
- }).then(async (res) => ({
168
- status: res.status,
169
- contentType: res.headers.get("content-type") || "",
170
- body: await res.text()
171
- })).catch(() => void 0);
171
+ }).then(async (res) => {
172
+ const body = await res.arrayBuffer();
173
+ return new Response(body.byteLength ? body : null, {
174
+ status: res.status,
175
+ headers: res.headers
176
+ });
177
+ }).catch(() => void 0);
172
178
  let probeDeadline;
173
- const answered = await Promise.race([
179
+ const request = Promise.race([
174
180
  pending,
175
181
  new Promise((resolve) => {
176
182
  probeDeadline = setTimeout(() => resolve("timeout"), MANIFEST_PROBE_TIMEOUT_MS);
177
183
  })
178
- ]);
179
- clearTimeout(probeDeadline);
180
- if (answered === "timeout")
181
- throw new Error(
182
- `Metro manifest request timed out after ${MANIFEST_PROBE_TIMEOUT_MS / 1e3}s: ${normalizedBaseUrl}/. Wait for the dev server to finish starting or check its manifest endpoint.`
183
- );
184
+ ]).then((answered) => {
185
+ if (answered === "timeout")
186
+ throw new Error(
187
+ `Metro manifest request timed out after ${MANIFEST_PROBE_TIMEOUT_MS / 1e3}s: ${normalizedBaseUrl}/. Wait for the dev server to finish starting or check its manifest endpoint.`
188
+ );
189
+ return answered;
190
+ }).finally(() => {
191
+ clearTimeout(probeDeadline);
192
+ manifestRequests.delete(normalizedBaseUrl);
193
+ });
194
+ manifestRequests.set(normalizedBaseUrl, request);
195
+ return (await request)?.clone();
196
+ }
197
+ async function probeExpoManifest(normalizedBaseUrl, port) {
198
+ const answered = await fetchDevManifest(normalizedBaseUrl);
184
199
  if (answered === void 0) return { state: "no-answer" };
185
200
  if (answered.status === 404 || answered.status === 405) return { state: "no-manifest" };
186
201
  if (answered.status < 200 || answered.status >= 300)
187
202
  throw new Error(
188
203
  `Metro manifest request failed: HTTP ${answered.status} at ${normalizedBaseUrl}/`
189
204
  );
190
- body = answered.body;
205
+ const body = await answered.text();
191
206
  if (!body.trim()) return { state: "no-answer" };
192
207
  let manifest;
193
208
  try {
194
209
  manifest = JSON.parse(body);
195
210
  } catch {
196
- if (answered.contentType.includes("json"))
211
+ if (answered.headers.get("content-type")?.includes("json"))
197
212
  throw new Error(`Metro returned invalid manifest JSON at ${normalizedBaseUrl}/`);
198
213
  return { state: "no-manifest" };
199
214
  }
@@ -257,12 +272,24 @@ async function probeBaseUrlBundle(baseUrl, port) {
257
272
  async function probePortBundle(port) {
258
273
  const viaScan = await resolvePortViaServerScan(port);
259
274
  if (viaScan) return viaScan;
260
- const candidates = await Promise.all(
261
- LOOPBACK_PROBE_HOSTNAMES.map(
262
- (hostname) => probeBaseUrlBundleDirect(buildLoopbackProbeBaseUrl("http:", hostname, port), port)
263
- )
264
- );
265
- return candidates.find((candidate) => candidate !== null) ?? null;
275
+ const unresolved = buildUnresolvedTargetError(`localhost:${port}`);
276
+ try {
277
+ return await Promise.any(
278
+ LOOPBACK_PROBE_HOSTNAMES.map(async (hostname) => {
279
+ const bundle = await probeBaseUrlBundleDirect(
280
+ buildLoopbackProbeBaseUrl("http:", hostname, port),
281
+ port
282
+ );
283
+ if (!bundle) throw unresolved;
284
+ return bundle;
285
+ })
286
+ );
287
+ } catch (error) {
288
+ if (!(error instanceof AggregateError)) throw error;
289
+ const failure = error.errors.find((candidate) => candidate !== unresolved);
290
+ if (failure !== void 0) throw failure;
291
+ return null;
292
+ }
266
293
  }
267
294
  async function resolveConnectionInput(input) {
268
295
  const trimmed = input.trim();
@@ -295,6 +322,7 @@ async function resolveConnectionInput(input) {
295
322
  0 && (module.exports = {
296
323
  DEFAULT_TEST_DRIVE_PORT,
297
324
  MANIFEST_PROBE_TIMEOUT_MS,
325
+ fetchDevManifest,
298
326
  inferManifestFramework,
299
327
  probePortBundle,
300
328
  resolveConnectionInput