peachsim 0.1.656 → 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 (74) 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 +2 -2
  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 +94 -70
  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 +2 -2
  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
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
  }