peachsim 0.1.1619 → 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 (140) hide show
  1. package/README.md +35 -5
  2. package/cli/app-fonts.ts +2 -1
  3. package/cli/bridge-flow-runner.ts +222 -175
  4. package/cli/cloud-client.ts +81 -48
  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 +74 -17
  11. package/cli/commands/record.ts +20 -15
  12. package/cli/commands/upload.ts +5 -1
  13. package/cli/dev-build-freshness.ts +37 -2
  14. package/cli/drivers/playwright-sim-host.ts +18 -6
  15. package/cli/maestro-accessibility.ts +53 -0
  16. package/cli/maestro-compare.ts +24 -0
  17. package/cli/outbound-endpoints.ts +27 -8
  18. package/cli/parent-pid.ts +0 -9
  19. package/cli/remote-simulators.ts +112 -0
  20. package/cli/remoteSimulatorContract.ts +21 -0
  21. package/detox/expectations.ts +5 -1
  22. package/detox/index.ts +133 -98
  23. package/detox/motion-change.cjs +37 -0
  24. package/detox/motion-change.d.cts +16 -0
  25. package/detox/navigation-lifecycle.ts +22 -4
  26. package/dist-lib/agent-daemon-client.cjs +3 -2
  27. package/dist-lib/agent-events.cjs +1 -1
  28. package/dist-lib/attached-projects.cjs +1 -1
  29. package/dist-lib/auth/shared-session.cjs +3 -2
  30. package/dist-lib/backend-origin.cjs +1 -1
  31. package/dist-lib/beta.cjs +1 -1
  32. package/dist-lib/beta.mjs +1 -1
  33. package/dist-lib/bridge-constants.cjs +1 -1
  34. package/dist-lib/bridge-contract-input.cjs +1 -1
  35. package/dist-lib/bridge-contract-input.mjs +1 -1
  36. package/dist-lib/bridge-contract.cjs +1 -1
  37. package/dist-lib/bridge-contract.mjs +1 -1
  38. package/dist-lib/bundle-channel.cjs +1528 -937
  39. package/dist-lib/capture-contract.cjs +1 -1
  40. package/dist-lib/capture-contract.mjs +1 -1
  41. package/dist-lib/cloud-contract.cjs +1 -1
  42. package/dist-lib/cloud-contract.mjs +1 -1
  43. package/dist-lib/cloud-test-args.cjs +1 -1
  44. package/dist-lib/cloud-test-args.mjs +1 -1
  45. package/dist-lib/cloud.cjs +4 -3
  46. package/dist-lib/cloud.mjs +4 -3
  47. package/dist-lib/config.cjs +5 -4
  48. package/dist-lib/config.mjs +5 -4
  49. package/dist-lib/detox/index.cjs +1021 -364
  50. package/dist-lib/dev-bundle-resolution.cjs +51 -23
  51. package/dist-lib/expo-swift-bundle.cjs +1351 -804
  52. package/dist-lib/expo-swift-metadata.cjs +5 -4
  53. package/dist-lib/expo-swift-metadata.mjs +5 -4
  54. package/dist-lib/home-paths.cjs +1 -1
  55. package/dist-lib/host/bridge-host.cjs +2475 -1343
  56. package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
  57. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  58. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  59. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  60. package/dist-lib/host/websocket-proxy.cjs +1 -1
  61. package/dist-lib/index.cjs +1269 -300
  62. package/dist-lib/jump-to-source-babel.cjs +1 -1
  63. package/dist-lib/jump-to-source-native.cjs +1 -1
  64. package/dist-lib/kotlin-host.cjs +1 -1
  65. package/dist-lib/menu.cjs +3 -2
  66. package/dist-lib/menu.mjs +3 -2
  67. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  68. package/dist-lib/metro-fingerprint-registry.mjs +1 -1
  69. package/dist-lib/metro-production-bundle.cjs +5 -4
  70. package/dist-lib/metro-production-bundle.mjs +5 -4
  71. package/dist-lib/metro.cjs +806 -398
  72. package/dist-lib/native-app-identity-project.cjs +729 -21
  73. package/dist-lib/native-app-identity-project.mjs +728 -21
  74. package/dist-lib/native-app-identity.cjs +232 -9
  75. package/dist-lib/native-app-identity.mjs +230 -8
  76. package/dist-lib/native-firebase-metadata.cjs +5 -4
  77. package/dist-lib/native-firebase-metadata.mjs +5 -4
  78. package/dist-lib/plist.cjs +1 -1
  79. package/dist-lib/plist.mjs +1 -1
  80. package/dist-lib/profiles.cjs +1 -1
  81. package/dist-lib/public-brand.cjs +3 -2
  82. package/dist-lib/react-native-host-modules.cjs +4 -1
  83. package/dist-lib/react-native-host-modules.mjs +4 -1
  84. package/dist-lib/scripts/dev-server-scanner.cjs +94 -28
  85. package/dist-lib/sdk.cjs +89 -24
  86. package/dist-lib/sdk.mjs +89 -24
  87. package/dist-lib/skills.cjs +4471 -2394
  88. package/dist-lib/swift-compile.cjs +336 -145
  89. package/dist-lib/swift-compile.mjs +350 -150
  90. package/dist-lib/swift-package.cjs +1 -1
  91. package/dist-lib/swift-package.mjs +1 -1
  92. package/dist-lib/swift-submit.cjs +1 -1
  93. package/dist-lib/swift-submit.mjs +1 -1
  94. package/dist-lib/swift-toolchain.cjs +1 -1
  95. package/dist-lib/swift.cjs +1 -1
  96. package/dist-lib/vite-swift.cjs +891 -557
  97. package/dist-lib/vite.cjs +68 -14
  98. package/dist-lib/worklet-executable.cjs +25 -2
  99. package/dist-lib/worklet-executable.mjs +25 -2
  100. package/package.json +2 -2
  101. package/scripts/dev-server-scanner.ts +33 -13
  102. package/src/admitted-mac-build.ts +34 -8
  103. package/src/android-app-identity.ts +146 -0
  104. package/src/android-autolinking.ts +75 -0
  105. package/src/android-string-value.ts +36 -0
  106. package/src/android-strings.ts +5 -36
  107. package/src/androidAutolinkingContract.ts +40 -0
  108. package/src/bundleGlobalFooter.ts +26 -7
  109. package/src/cloud.ts +2 -2
  110. package/src/codex-client.ts +3 -2
  111. package/src/dev-bundle-resolution.ts +58 -25
  112. package/src/expo-kotlin-host.ts +6 -36
  113. package/src/expo-swift-bundle.ts +17 -12
  114. package/src/expo-swift-host.ts +477 -173
  115. package/src/expoSwiftContract.ts +6 -0
  116. package/src/host/bridge-host.ts +7 -55
  117. package/src/host/staged-host-files.ts +29 -2
  118. package/src/installed-package-versions.ts +54 -14
  119. package/src/launchMetadataContract.ts +24 -0
  120. package/src/metro-plugin.ts +37 -42
  121. package/src/native-app-identity-project.ts +118 -3
  122. package/src/native-app-identity.ts +103 -11
  123. package/src/nitro-compile.ts +2 -5
  124. package/src/nitro-source.ts +147 -63
  125. package/src/process-group.ts +90 -60
  126. package/src/process-output.ts +0 -9
  127. package/src/public-brand.ts +1 -0
  128. package/src/react-native-host-modules.ts +3 -0
  129. package/src/sim-client.ts +6 -4
  130. package/src/swift-compile.ts +185 -31
  131. package/src/swift-distribution.lock.json +37 -11
  132. package/src/swift-distribution.ts +61 -9
  133. package/src/swift-host.ts +58 -27
  134. package/src/swift-objc-standin.ts +13 -0
  135. package/src/swift-standin-emit.ts +1 -1
  136. package/src/swift-standins.ts +17 -5
  137. package/src/vite-plugin.ts +8 -19
  138. package/src/worklet-executable.ts +30 -3
  139. package/src/worklets-babel.ts +35 -14
  140. package/src/xcode-project.ts +10 -0
@@ -54,10 +54,17 @@ const REANIMATED_IMPORT_REGEX =
54
54
  // app installed, so they compile with the engine's own plugin and carry no
55
55
  // version stamp. every other file is app code and compiles like it does on
56
56
  // device: with the plugin the app installed, stamped for the app's runtime.
57
- const ENGINE_STAND_IN_PATHS = ['/packages/peach-engine/src/', '/packages/peach-compat/src/']
57
+ const ENGINE_STAND_IN_PATHS = [
58
+ '/packages/peach-engine/src/',
59
+ '/packages/peach-compat/src/',
60
+ ]
58
61
 
59
62
  const workletsPlugins = new Map<string, { path: string; identity: string }>()
60
63
  let babelCorePromise: Promise<typeof import('@babel/core')> | null = null
64
+ const pendingWorkletTransforms = new Map<
65
+ string,
66
+ Promise<Pick<TransformResult, 'code' | 'map'> | null>
67
+ >()
61
68
 
62
69
  export function shouldApplyWorkletsPlugin(id: string, code: string): boolean {
63
70
  if (!/\.(tsx?|jsx?|mjs|cjs|mts|cts)$/.test(id)) return false
@@ -93,7 +100,10 @@ function getWorkletsPlugin(id: string): { path: string; identity: string } {
93
100
  const manifest = JSON.parse(
94
101
  fs.readFileSync(path.resolve(path.dirname(pluginPath), '..', 'package.json'), 'utf8'),
95
102
  ) as { version?: string }
96
- const plugin = { path: pluginPath, identity: `${pluginPath}@${manifest.version ?? '0'}` }
103
+ const plugin = {
104
+ path: pluginPath,
105
+ identity: `${pluginPath}@${manifest.version ?? '0'}`,
106
+ }
97
107
  workletsPlugins.set(fromDir, plugin)
98
108
  return plugin
99
109
  }
@@ -109,7 +119,7 @@ function isTypescriptFile(id: string): boolean {
109
119
  // normal dev rebuild changes a handful of files and replays the rest.
110
120
  export type WorkletBodyMode = 'executable' | 'transport'
111
121
 
112
- const CACHE_SCHEMA = 'v7'
122
+ const CACHE_SCHEMA = 'v8'
113
123
  const CACHE_ROOT = path.resolve(
114
124
  workspaceRoot,
115
125
  'node_modules',
@@ -321,23 +331,34 @@ export async function transformWorkletsCode(
321
331
  bodyMode: WorkletBodyMode = 'executable',
322
332
  ): Promise<Pick<TransformResult, 'code' | 'map'> | null> {
323
333
  const entryPath = getCacheEntryPath(code, id, sourceMaps, bodyMode)
334
+ const pending = entryPath && pendingWorkletTransforms.get(entryPath)
335
+ if (pending) return pending
324
336
  const cached = readCachedTransform(entryPath)
325
337
  if (cached) return cached
326
338
  if (!babelCorePromise) {
327
339
  babelCorePromise = import('@babel/core') as Promise<typeof import('@babel/core')>
328
340
  }
329
- const { transformAsync } = await babelCorePromise
330
- const result = await transformAsync(
331
- code,
332
- createWorkletsBabelOptions(id, sourceMaps, bodyMode),
333
- )
334
- if (!result?.code) return null
335
- const transformed = {
336
- code: result.code,
337
- map: (result.map ?? null) as TransformResult['map'],
341
+ // nested worker graphs can request the same cold transform before babel
342
+ // finishes. share only active work; watch edits must not retain old results.
343
+ const transform = babelCorePromise.then(async ({ transformAsync }) => {
344
+ const result = await transformAsync(
345
+ code,
346
+ createWorkletsBabelOptions(id, sourceMaps, bodyMode),
347
+ )
348
+ if (!result?.code) return null
349
+ const transformed = {
350
+ code: result.code,
351
+ map: (result.map ?? null) as TransformResult['map'],
352
+ }
353
+ writeCachedTransform(entryPath, transformed)
354
+ return transformed
355
+ })
356
+ if (entryPath) pendingWorkletTransforms.set(entryPath, transform)
357
+ try {
358
+ return await transform
359
+ } finally {
360
+ if (entryPath) pendingWorkletTransforms.delete(entryPath)
338
361
  }
339
- writeCachedTransform(entryPath, transformed)
340
- return transformed
341
362
  }
342
363
 
343
364
  export function transformWorkletsCodeSync(
@@ -940,6 +940,16 @@ export function readXcodeAppTarget(
940
940
  info[key.slice('INFOPLIST_KEY_'.length)] =
941
941
  value === 'YES' ? true : value === 'NO' ? false : value
942
942
  }
943
+ if (settings('GENERATE_INFOPLIST_FILE') === 'YES') {
944
+ const versions = {
945
+ CFBundleShortVersionString: 'MARKETING_VERSION',
946
+ CFBundleVersion: 'CURRENT_PROJECT_VERSION',
947
+ }
948
+ for (const [key, setting] of Object.entries(versions)) {
949
+ const value = settings(setting)
950
+ if (info[key] === undefined && value) info[key] = value
951
+ }
952
+ }
943
953
  if (
944
954
  settings('INFOPLIST_KEY_UIApplicationSceneManifest_Generation') === 'YES' &&
945
955
  info.UIApplicationSceneManifest === undefined