peachsim 0.1.655 → 0.1.657

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 (75) hide show
  1. package/README.md +1 -1
  2. package/cli/app-config.ts +9 -6
  3. package/cli/app-project.ts +6 -6
  4. package/cli/commands/control.ts +20 -20
  5. package/cli/commands/flow.ts +3 -3
  6. package/detox/config-loader.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 +25 -25
  31. package/dist-lib/detox/index.cjs +1 -1
  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 +14 -14
  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 +2 -2
  39. package/dist-lib/host/websocket-proxy.cjs +1 -1
  40. package/dist-lib/index.cjs +6 -13
  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 +2 -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/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 +13 -15
  59. package/dist-lib/sdk.cjs +1 -1
  60. package/dist-lib/sdk.mjs +1 -1
  61. package/dist-lib/skills.cjs +144 -116
  62. package/dist-lib/swift-compile.cjs +1 -1
  63. package/dist-lib/swift-compile.mjs +1 -1
  64. package/dist-lib/swift-package.cjs +1 -1
  65. package/dist-lib/swift-package.mjs +1 -1
  66. package/dist-lib/swift-submit.cjs +1 -1
  67. package/dist-lib/swift-submit.mjs +1 -1
  68. package/dist-lib/swift.cjs +1 -1
  69. package/dist-lib/vite-swift.cjs +1 -1
  70. package/dist-lib/vite.cjs +6 -13
  71. package/package.json +1 -1
  72. package/scripts/dev-server-scanner.ts +3 -3
  73. package/scripts/optional-demo-registry.ts +1 -1
  74. package/src/config.ts +26 -26
  75. package/src/dev-server-open.ts +4 -11
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.655 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.657 | (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.655 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.657 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/swift-compile.ts
4
4
  import { execFile as execFile2 } from "node:child_process";
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.655 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.657 | (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.655 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.657 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/swift-package.ts
4
4
  function isSwiftManifestFile(file) {
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.655 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.657 | (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.655 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.657 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/swift-submit.ts
4
4
  var SWIFT_COMPILE_PATH = "/api/swift-compile";
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.655 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.657 | (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.655 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.657 | (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;
package/dist-lib/vite.cjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.655 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.657 | (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;
@@ -54,7 +54,6 @@ var import_node_child_process = require("node:child_process");
54
54
  var import_node_crypto = require("node:crypto");
55
55
  var import_node_fs = __toESM(require("node:fs"), 1);
56
56
  var import_node_path = __toESM(require("node:path"), 1);
57
- var import_node_url = require("node:url");
58
57
  function resolveRnxDesktopAppName(open, projectRoot) {
59
58
  if (!open) return null;
60
59
  if (typeof open === "object") {
@@ -112,17 +111,11 @@ function observeRnxDesktopLaunch(child, appName) {
112
111
  });
113
112
  }
114
113
  function launchRnxDesktop(bundleUrl, appName) {
115
- const packageRoot = import_node_path.default.resolve(import_node_path.default.dirname((0, import_node_url.fileURLToPath)(__sootsim_import_meta_url)), "..");
116
- const binPath = import_node_path.default.join(packageRoot, "dist-cli", "bin.js");
117
114
  console.log(`[peach] opening ${appName} in the desktop simulator`);
118
- const child = (0, import_node_child_process.spawn)(
119
- process.execPath,
120
- [binPath, ...buildRnxDesktopOpenArgs(bundleUrl)],
121
- {
122
- stdio: ["ignore", "ignore", "pipe"],
123
- windowsHide: true
124
- }
125
- );
115
+ const child = (0, import_node_child_process.spawn)("peach", buildRnxDesktopOpenArgs(bundleUrl), {
116
+ stdio: ["ignore", "ignore", "pipe"],
117
+ windowsHide: true
118
+ });
126
119
  observeRnxDesktopLaunch(child, appName);
127
120
  }
128
121
 
@@ -325,7 +318,7 @@ function isContrastKitSpecifier(specifier) {
325
318
  }
326
319
  function unsupportedSpecifier(specifier) {
327
320
  return new Error(
328
- `replacement modules may only import react, react-native, contrast-kit, and the packages rnx stubs for this app; '${specifier}' is none of those. vendor the code into the replacement file, or add the package to rnx.config so the simulator bridges it.`
321
+ `replacement modules may only import react, react-native, contrast-kit, and the packages rnx stubs for this app; '${specifier}' is none of those. vendor the code into the replacement file, or add the package to peach.config so the simulator bridges it.`
329
322
  );
330
323
  }
331
324
  function bridgeDeclaration(name, specifier) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "peachsim",
3
- "version": "0.1.655",
3
+ "version": "0.1.657",
4
4
  "description": "Vite and Metro plugins, testing drivers, and SDK exports for peach.",
5
5
  "author": "Tamagui LLC",
6
6
  "license": "SEE LICENSE IN LICENSE",
@@ -14,19 +14,19 @@
14
14
  // pid changes. before any HTTP, a TCP connect gate skips unreachable ports.
15
15
 
16
16
  import { spawn } from 'child_process'
17
- import { terminateProcessGroup } from '../../contrast/src/runtime/process-group'
18
17
  import { readlink } from 'fs/promises'
19
18
  import http from 'http'
20
19
  import net from 'net'
21
20
  import { realpathSync } from 'node:fs'
22
21
  import { resolve } from 'node:path'
22
+ import { terminateProcessGroup } from '../../contrast/src/runtime/process-group'
23
23
  import {
24
24
  buildLoopbackProbeBaseUrl,
25
25
  isLoopbackHost,
26
26
  LOOPBACK_PROBE_HOSTNAMES,
27
27
  normalizeHostname,
28
28
  } from '../src/backend-origin.ts'
29
- import { applyRNXConfigToUrl } from '../src/config.ts'
29
+ import { applyPeachConfigToUrl } from '../src/config.ts'
30
30
  import {
31
31
  alignLoopbackBundleUrlWithProbe,
32
32
  normalizeNativeDevBundleUrl,
@@ -611,7 +611,7 @@ function withRuntimeConfig(port: number, bundleUrl: string, projectCwd?: string)
611
611
  ? knownApps[0]
612
612
  : undefined
613
613
  const configured = knownApp?.runtimeConfig
614
- ? applyRNXConfigToUrl(bundleUrl, knownApp.runtimeConfig)
614
+ ? applyPeachConfigToUrl(bundleUrl, knownApp.runtimeConfig)
615
615
  : bundleUrl
616
616
  return normalizeNativeDevBundleUrl(configured)
617
617
  }
@@ -63,7 +63,7 @@ export interface OptionalDemoApp {
63
63
  dir: string
64
64
  preferredPort: number
65
65
  framework: 'expo' | 'one' | 'rock'
66
- runtimeConfig?: import('../src/config.ts').RNXConfig
66
+ runtimeConfig?: import('../src/config.ts').PeachConfig
67
67
  }
68
68
 
69
69
  let cached: OptionalDemoApp[] | null = null
package/src/config.ts CHANGED
@@ -1,4 +1,4 @@
1
- // rnx.config.ts — per-app module resolution, turbo modules, env, state, and settings.
1
+ // peach.config.ts — per-app module resolution, turbo modules, env, state, and settings.
2
2
  //
3
3
  // usage:
4
4
  // import { defineConfig } from 'peachsim/config'
@@ -17,7 +17,7 @@ export type ModuleResolution =
17
17
 
18
18
  export type NativeModuleResolution = ModuleResolution | Record<string, any> // direct native module object for non-url configs
19
19
 
20
- export interface RNXConfig<Settings extends Record<string, any> = Record<string, any>> {
20
+ export interface PeachConfig<Settings extends Record<string, any> = Record<string, any>> {
21
21
  // host-only engine selection. omitted means the current stable runtime.
22
22
  runtimeVersion?: string
23
23
  modules?: Record<string, ModuleResolution>
@@ -46,11 +46,11 @@ export interface RNXConfig<Settings extends Record<string, any> = Record<string,
46
46
  }
47
47
  }
48
48
 
49
- export const RNX_CONFIG_QUERY_PARAM = 'rnxConfig'
49
+ export const PEACH_CONFIG_QUERY_PARAM = 'peachConfig'
50
50
 
51
51
  export function defineConfig<Settings extends Record<string, any> = Record<string, any>>(
52
- config: RNXConfig<Settings>,
53
- ): RNXConfig<Settings> {
52
+ config: PeachConfig<Settings>,
53
+ ): PeachConfig<Settings> {
54
54
  return config
55
55
  }
56
56
 
@@ -58,9 +58,9 @@ function hasOwnKeys(value: Record<string, unknown> | undefined): boolean {
58
58
  return !!value && Object.keys(value).length > 0
59
59
  }
60
60
 
61
- export function hasRNXConfig<Settings extends Record<string, any> = Record<string, any>>(
62
- config?: RNXConfig<Settings> | null,
63
- ): config is RNXConfig<Settings> {
61
+ export function hasPeachConfig<
62
+ Settings extends Record<string, any> = Record<string, any>,
63
+ >(config?: PeachConfig<Settings> | null): config is PeachConfig<Settings> {
64
64
  if (!config) return false
65
65
  return (
66
66
  (typeof config.runtimeVersion === 'string' && config.runtimeVersion.length > 0) ||
@@ -74,15 +74,15 @@ export function hasRNXConfig<Settings extends Record<string, any> = Record<strin
74
74
  )
75
75
  }
76
76
 
77
- export function mergeRNXConfig<
77
+ export function mergePeachConfig<
78
78
  Settings extends Record<string, any> = Record<string, any>,
79
79
  >(
80
- base?: RNXConfig<Settings> | null,
81
- override?: RNXConfig<Settings> | null,
82
- ): RNXConfig<Settings> | undefined {
83
- if (!hasRNXConfig(base) && !hasRNXConfig(override)) return undefined
84
- if (!hasRNXConfig(base)) return override ? { ...override } : undefined
85
- if (!hasRNXConfig(override)) return base ? { ...base } : undefined
80
+ base?: PeachConfig<Settings> | null,
81
+ override?: PeachConfig<Settings> | null,
82
+ ): PeachConfig<Settings> | undefined {
83
+ if (!hasPeachConfig(base) && !hasPeachConfig(override)) return undefined
84
+ if (!hasPeachConfig(base)) return override ? { ...override } : undefined
85
+ if (!hasPeachConfig(override)) return base ? { ...base } : undefined
86
86
 
87
87
  return {
88
88
  runtimeVersion: override.runtimeVersion ?? base.runtimeVersion,
@@ -104,29 +104,29 @@ export function mergeRNXConfig<
104
104
  }
105
105
  }
106
106
 
107
- export function readRNXConfigFromSearchParams<
107
+ export function readPeachConfigFromSearchParams<
108
108
  Settings extends Record<string, any> = Record<string, any>,
109
- >(searchParams: URLSearchParams): RNXConfig<Settings> | undefined {
110
- const raw = searchParams.get(RNX_CONFIG_QUERY_PARAM)
109
+ >(searchParams: URLSearchParams): PeachConfig<Settings> | undefined {
110
+ const raw = searchParams.get(PEACH_CONFIG_QUERY_PARAM)
111
111
  if (!raw) return undefined
112
112
  try {
113
- const parsed = JSON.parse(raw) as RNXConfig<Settings>
114
- return hasRNXConfig(parsed) ? parsed : undefined
113
+ const parsed = JSON.parse(raw) as PeachConfig<Settings>
114
+ return hasPeachConfig(parsed) ? parsed : undefined
115
115
  } catch (error) {
116
116
  const message = error instanceof Error ? error.message : String(error)
117
- console.warn(`[peach] invalid ${RNX_CONFIG_QUERY_PARAM}: ${message}`)
117
+ console.warn(`[peach] invalid ${PEACH_CONFIG_QUERY_PARAM}: ${message}`)
118
118
  return undefined
119
119
  }
120
120
  }
121
121
 
122
- export function applyRNXConfigToUrl<
122
+ export function applyPeachConfigToUrl<
123
123
  Settings extends Record<string, any> = Record<string, any>,
124
- >(url: string, config?: RNXConfig<Settings> | null): string {
124
+ >(url: string, config?: PeachConfig<Settings> | null): string {
125
125
  const parsed = new URL(url)
126
- if (hasRNXConfig(config)) {
127
- parsed.searchParams.set(RNX_CONFIG_QUERY_PARAM, JSON.stringify(config))
126
+ if (hasPeachConfig(config)) {
127
+ parsed.searchParams.set(PEACH_CONFIG_QUERY_PARAM, JSON.stringify(config))
128
128
  } else {
129
- parsed.searchParams.delete(RNX_CONFIG_QUERY_PARAM)
129
+ parsed.searchParams.delete(PEACH_CONFIG_QUERY_PARAM)
130
130
  }
131
131
  return parsed.toString()
132
132
  }
@@ -2,7 +2,6 @@ import { spawn, type ChildProcess } from 'node:child_process'
2
2
  import { createHash } from 'node:crypto'
3
3
  import fs from 'node:fs'
4
4
  import path from 'node:path'
5
- import { fileURLToPath } from 'node:url'
6
5
 
7
6
  export type RnxDesktopOpenOption = boolean | { appName: string }
8
7
 
@@ -84,16 +83,10 @@ export function observeRnxDesktopLaunch(child: ChildProcess, appName: string): v
84
83
  }
85
84
 
86
85
  export function launchRnxDesktop(bundleUrl: string, appName: string): void {
87
- const packageRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..')
88
- const binPath = path.join(packageRoot, 'dist-cli', 'bin.js')
89
86
  console.log(`[peach] opening ${appName} in the desktop simulator`)
90
- const child = spawn(
91
- process.execPath,
92
- [binPath, ...buildRnxDesktopOpenArgs(bundleUrl)],
93
- {
94
- stdio: ['ignore', 'ignore', 'pipe'],
95
- windowsHide: true,
96
- },
97
- )
87
+ const child = spawn('peach', buildRnxDesktopOpenArgs(bundleUrl), {
88
+ stdio: ['ignore', 'ignore', 'pipe'],
89
+ windowsHide: true,
90
+ })
98
91
  observeRnxDesktopLaunch(child, appName)
99
92
  }