peachsim 0.1.781 → 0.1.783

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. package/cli/commands/detox.ts +6 -0
  2. package/cli/main.ts +1 -0
  3. package/detox/expectations.ts +1 -1
  4. package/detox/gestures.ts +1 -1
  5. package/detox/index.ts +27 -3
  6. package/detox/navigation-lifecycle.ts +1 -1
  7. package/dist-lib/agent-daemon-client.cjs +1 -1
  8. package/dist-lib/agent-events.cjs +1 -1
  9. package/dist-lib/agent-identity.cjs +1 -1
  10. package/dist-lib/agent-sessions.cjs +1 -1
  11. package/dist-lib/attached-projects.cjs +1 -1
  12. package/dist-lib/auth/shared-session.cjs +1 -1
  13. package/dist-lib/backend-origin.cjs +1 -1
  14. package/dist-lib/beta.cjs +1 -1
  15. package/dist-lib/beta.mjs +1 -1
  16. package/dist-lib/bridge-constants.cjs +1 -1
  17. package/dist-lib/bridge-contract-input.cjs +1 -1
  18. package/dist-lib/bridge-contract-input.mjs +1 -1
  19. package/dist-lib/bridge-contract.cjs +1 -1
  20. package/dist-lib/bridge-contract.mjs +1 -1
  21. package/dist-lib/capture-contract.cjs +1 -1
  22. package/dist-lib/capture-contract.mjs +1 -1
  23. package/dist-lib/cli-constants.cjs +1 -1
  24. package/dist-lib/cloud-contract.cjs +1 -1
  25. package/dist-lib/cloud-contract.mjs +1 -1
  26. package/dist-lib/cloud-test-args.cjs +1 -1
  27. package/dist-lib/cloud-test-args.mjs +1 -1
  28. package/dist-lib/cloud.cjs +1 -1
  29. package/dist-lib/cloud.mjs +1 -1
  30. package/dist-lib/config.cjs +1 -1
  31. package/dist-lib/detox/index.cjs +3534 -134
  32. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  33. package/dist-lib/home-paths.cjs +1 -1
  34. package/dist-lib/host/bridge-host.cjs +6975 -2893
  35. package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
  36. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  37. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  38. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  39. package/dist-lib/host/websocket-proxy.cjs +1 -1
  40. package/dist-lib/index.cjs +4664 -1266
  41. package/dist-lib/jump-to-source-babel.cjs +1 -1
  42. package/dist-lib/jump-to-source-native.cjs +1 -1
  43. package/dist-lib/kotlin-host.cjs +1 -1
  44. package/dist-lib/menu.cjs +1 -1
  45. package/dist-lib/menu.mjs +1 -1
  46. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  47. package/dist-lib/metro-fingerprint-registry.mjs +1 -1
  48. package/dist-lib/metro-production-bundle.cjs +1 -1
  49. package/dist-lib/metro-production-bundle.mjs +1 -1
  50. package/dist-lib/metro.cjs +1114 -2
  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/plist.cjs +1 -1
  56. package/dist-lib/plist.mjs +1 -1
  57. package/dist-lib/profiles.cjs +1 -1
  58. package/dist-lib/public-brand.cjs +1 -1
  59. package/dist-lib/react-native-host-modules.cjs +1 -1
  60. package/dist-lib/react-native-host-modules.mjs +1 -1
  61. package/dist-lib/render-mode.cjs +1 -1
  62. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  63. package/dist-lib/sdk.cjs +1 -1
  64. package/dist-lib/sdk.mjs +1 -1
  65. package/dist-lib/skills.cjs +8560 -166
  66. package/dist-lib/swift-compile.cjs +1 -1
  67. package/dist-lib/swift-compile.mjs +1 -1
  68. package/dist-lib/swift-package.cjs +1 -1
  69. package/dist-lib/swift-package.mjs +1 -1
  70. package/dist-lib/swift-submit.cjs +1 -1
  71. package/dist-lib/swift-submit.mjs +1 -1
  72. package/dist-lib/swift-toolchain.cjs +1 -1
  73. package/dist-lib/swift.cjs +1 -1
  74. package/dist-lib/vite-swift.cjs +1810 -413
  75. package/dist-lib/vite.cjs +38 -16
  76. package/package.json +1 -1
  77. package/skills/contrast/SKILL.md +2 -0
  78. package/src/one-widget-package.ts +202 -0
  79. package/src/oneWidgetContract.ts +16 -0
  80. package/src/swift-host.ts +1 -1
  81. package/src/swift-standin-emit.ts +149 -39
  82. package/src/swift-standins.ts +3 -0
  83. package/src/vite-plugin-one.ts +45 -17
  84. package/src/vite-plugin-swift.ts +2 -0
@@ -48,6 +48,10 @@ it warns when none is reachable; --no-launch skips that check.
48
48
  `
49
49
 
50
50
  export async function runDetox(args: string[], opts: RunDetoxOpts = {}): Promise<void> {
51
+ const separator = args.indexOf('--')
52
+ const positionalArgs = separator < 0 ? [] : args.slice(separator + 1)
53
+ if (separator >= 0) args = args.slice(0, separator)
54
+
51
55
  if (args.includes('--help') || args.includes('-h')) {
52
56
  console.log(HELP)
53
57
  rnxExit(0)
@@ -261,6 +265,8 @@ export async function runDetox(args: string[], opts: RunDetoxOpts = {}): Promise
261
265
  // execution stays on the stable Ignition + TurboFan pipeline under Node 24.
262
266
  // normal user detox runs retain their node defaults and resolve jest through npx.
263
267
  const command = proofCapture ? 'node' : 'npx'
268
+ // generated jest options must precede its positional-only separator.
269
+ if (separator >= 0) jestArgs.push('--', ...positionalArgs)
264
270
  const commandArgs = proofCapture
265
271
  ? [
266
272
  '--no-maglev',
package/cli/main.ts CHANGED
@@ -46,6 +46,7 @@ async function handleTopLevelError(err: unknown): Promise<never> {
46
46
  msg.startsWith(`${rnxPublicBrand.commandName} open: requested bridge port`) ||
47
47
  msg.startsWith('background daemon setup is unavailable') ||
48
48
  msg.startsWith('non-interactive setup requires ') ||
49
+ msg.startsWith('no live peach world serves ') ||
49
50
  msg.startsWith('peach bridge did not start within') ||
50
51
  msg.startsWith(
51
52
  `package.json already defines scripts.${rnxPublicBrand.commandName} as `,
@@ -6,7 +6,7 @@ import { dragScrollNode } from './gestures'
6
6
  import type { SootSimElement } from './element-types'
7
7
  import type { Matcher } from './matchers'
8
8
  import type { SootSimNodeInfo } from '@peach/globals'
9
- import type { Page } from 'playwright'
9
+ import type { Page } from 'playwright-core'
10
10
 
11
11
  type FindFn = (matcher: Matcher) => Promise<any>
12
12
  type GetPageFn = () => Page
package/detox/gestures.ts CHANGED
@@ -5,7 +5,7 @@ import { pollUntil } from '../src/poll-until'
5
5
  // bodies. all sootsim-namespaced globals are declared canonically there —
6
6
  // add new entries to packages/peach-globals/src/index.ts, not here.
7
7
  import type {} from '@peach/globals'
8
- import type { Page } from 'playwright'
8
+ import type { Page } from 'playwright-core'
9
9
 
10
10
  export const DETOX_PLATFORM =
11
11
  process.env.PEACH_PLATFORM === 'android' ? ('android' as const) : ('ios' as const)
package/detox/index.ts CHANGED
@@ -4,8 +4,11 @@
4
4
 
5
5
  import { randomBytes } from 'crypto'
6
6
  import * as fs from 'fs'
7
+ import { execFile } from 'node:child_process'
8
+ import { createRequire } from 'node:module'
9
+ import { promisify } from 'node:util'
7
10
  import * as path from 'path'
8
- import { chromium } from 'playwright'
11
+ import { chromium } from 'playwright-core'
9
12
  import { launchReapedChromeScoped } from '../../../scripts/lib/reap-browser'
10
13
  import {
11
14
  readBrowserCompositeCaptureRequest,
@@ -49,7 +52,7 @@ import { describeSootsimBridgeFailure, navigateSootsimPage } from './navigation-
49
52
  import { REQUIRED_IDENTICAL_PROOF_FRAMES, framesIdentical } from './proof-frame.cjs'
50
53
  import type { SootSimInteractBridge } from '../../peach-globals/src/index'
51
54
  import type { SootSimElement } from './element-types'
52
- import type { Browser, BrowserContext, Page } from 'playwright'
55
+ import type { Browser, BrowserContext, Page } from 'playwright-core'
53
56
 
54
57
  export { by }
55
58
  export type { SootSimElement } from './element-types'
@@ -1834,6 +1837,24 @@ export const device = {
1834
1837
  }
1835
1838
 
1836
1839
  if (!_browser) {
1840
+ const executablePath = chromium.executablePath()
1841
+ if (!fs.existsSync(executablePath)) {
1842
+ const requireDriver = createRequire(path.join(__dirname, 'index.cjs'))
1843
+ const cliPath = path.join(
1844
+ path.dirname(requireDriver.resolve('playwright-core/package.json')),
1845
+ 'cli.js',
1846
+ )
1847
+ try {
1848
+ await promisify(execFile)(process.execPath, [cliPath, 'install', 'chromium'], {
1849
+ timeout: 600_000,
1850
+ maxBuffer: 4 * 1024 * 1024,
1851
+ })
1852
+ } catch (error) {
1853
+ throw new Error('Peach Detox could not install its Chromium browser', {
1854
+ cause: error,
1855
+ })
1856
+ }
1857
+ }
1837
1858
  // Conformance renders CanvasKit and must use the real platform GPU. The
1838
1859
  // bundled chromium_headless_shell has no GPU and silently falls back to
1839
1860
  // SwiftShader, invalidating visual/perf results while pegging the box.
@@ -1842,7 +1863,10 @@ export const device = {
1842
1863
  // scoped reaper owns the whole Chrome process tree if Detox is interrupted.
1843
1864
  const launched = await launchReapedChromeScoped(
1844
1865
  (options) => chromium.launch(options),
1845
- { headless: true, ignoreDefaultArgs: ['--disable-popup-blocking'] },
1866
+ {
1867
+ headless: true,
1868
+ ignoreDefaultArgs: ['--disable-popup-blocking'],
1869
+ },
1846
1870
  )
1847
1871
  _browser = launched.browser
1848
1872
  _reapBrowserNow = launched.reapNow
@@ -1,5 +1,5 @@
1
1
  import { writeAttemptEvent } from './attempt-events.cjs'
2
- import type { Page, Request, Response } from 'playwright'
2
+ import type { Page, Request, Response } from 'playwright-core'
3
3
 
4
4
  export type SootsimNavigationIdentity = {
5
5
  browserId: number
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.781 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.783 | (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.781 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.783 | (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.781 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.783 | (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.781 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.783 | (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.781 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.783 | (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.781 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.783 | (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.781 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.783 | (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.781 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.783 | (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.781 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.783 | (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.781 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.783 | (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.781 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.783 | (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.781 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.783 | (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.781 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.783 | (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.781 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.783 | (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.781 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.783 | (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.781 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.783 | (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.781 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.783 | (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.781 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.783 | (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.781 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.783 | (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.781 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.783 | (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.781 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.783 | (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.781 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.783 | (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.781 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.783 | (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.781 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.783 | (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;