peachsim 0.1.2103 → 0.1.2105

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 (95) hide show
  1. package/cli/commands/detect.ts +26 -5
  2. package/cli/commands/shell-url.ts +41 -4
  3. package/dist-lib/agent-daemon-client.cjs +1 -1
  4. package/dist-lib/agent-events.cjs +1 -1
  5. package/dist-lib/attached-projects.cjs +1 -1
  6. package/dist-lib/auth/shared-session.cjs +1 -1
  7. package/dist-lib/backend-origin.cjs +1 -1
  8. package/dist-lib/beta.cjs +1 -1
  9. package/dist-lib/beta.mjs +1 -1
  10. package/dist-lib/bridge-constants.cjs +1 -1
  11. package/dist-lib/bridge-contract-input.cjs +1 -1
  12. package/dist-lib/bridge-contract-input.mjs +1 -1
  13. package/dist-lib/bridge-contract.cjs +1 -1
  14. package/dist-lib/bridge-contract.mjs +1 -1
  15. package/dist-lib/bundle-channel.cjs +37 -33
  16. package/dist-lib/capture-contract.cjs +1 -1
  17. package/dist-lib/capture-contract.mjs +1 -1
  18. package/dist-lib/cloud-contract.cjs +1 -1
  19. package/dist-lib/cloud-contract.mjs +1 -1
  20. package/dist-lib/cloud-test-args.cjs +1 -1
  21. package/dist-lib/cloud-test-args.mjs +1 -1
  22. package/dist-lib/cloud.cjs +1 -1
  23. package/dist-lib/cloud.mjs +1 -1
  24. package/dist-lib/config.cjs +1 -1
  25. package/dist-lib/config.mjs +1 -1
  26. package/dist-lib/detox/index.cjs +1 -1
  27. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  28. package/dist-lib/expo-swift-bundle.cjs +17 -13
  29. package/dist-lib/expo-swift-metadata.cjs +1 -1
  30. package/dist-lib/expo-swift-metadata.mjs +1 -1
  31. package/dist-lib/home-paths.cjs +1 -1
  32. package/dist-lib/host/bridge-host.cjs +36 -33
  33. package/dist-lib/host/fetch-proxy-handler.cjs +4 -4
  34. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  35. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  36. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  37. package/dist-lib/host/websocket-proxy.cjs +1 -1
  38. package/dist-lib/index.cjs +6 -5
  39. package/dist-lib/jump-to-source-babel.cjs +1 -1
  40. package/dist-lib/jump-to-source-native.cjs +1 -1
  41. package/dist-lib/kotlin-host.cjs +1 -1
  42. package/dist-lib/menu.cjs +1 -1
  43. package/dist-lib/menu.mjs +1 -1
  44. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  45. package/dist-lib/metro-fingerprint-registry.mjs +1 -1
  46. package/dist-lib/metro-production-bundle.cjs +1 -1
  47. package/dist-lib/metro-production-bundle.mjs +1 -1
  48. package/dist-lib/metro.cjs +6 -5
  49. package/dist-lib/native-app-identity-project.cjs +5 -3
  50. package/dist-lib/native-app-identity-project.mjs +5 -3
  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/pdfium-raster.cjs +1 -1
  56. package/dist-lib/pdfium-raster.mjs +1 -1
  57. package/dist-lib/plist.cjs +1 -1
  58. package/dist-lib/plist.mjs +1 -1
  59. package/dist-lib/profiles.cjs +1 -1
  60. package/dist-lib/public-brand.cjs +1 -1
  61. package/dist-lib/public-origins-lib-esm.json +24 -24
  62. package/dist-lib/public-origins-lib.json +53 -53
  63. package/dist-lib/react-native-host-modules.cjs +1 -1
  64. package/dist-lib/react-native-host-modules.mjs +1 -1
  65. package/dist-lib/reap-browser.cjs +1 -1
  66. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  67. package/dist-lib/sdk.cjs +1 -1
  68. package/dist-lib/sdk.mjs +1 -1
  69. package/dist-lib/skills.cjs +92 -40
  70. package/dist-lib/swift-compile.cjs +9 -7
  71. package/dist-lib/swift-compile.mjs +6 -5
  72. package/dist-lib/swift-package.cjs +1 -1
  73. package/dist-lib/swift-package.mjs +1 -1
  74. package/dist-lib/swift-submit.cjs +1 -1
  75. package/dist-lib/swift-submit.mjs +1 -1
  76. package/dist-lib/swift-toolchain.cjs +1 -1
  77. package/dist-lib/swift.cjs +1 -1
  78. package/dist-lib/vite-swift.cjs +22 -18
  79. package/dist-lib/vite.cjs +4 -4
  80. package/dist-lib/worklet-executable.cjs +1 -1
  81. package/dist-lib/worklet-executable.mjs +1 -1
  82. package/dist-types/packages/peach-engine/src/render-worker/shell-protocol.d.ts +3 -0
  83. package/dist-types/packages/peach-engine/src/render-worker/tree-sync-port.d.ts +1 -1
  84. package/package.json +1 -1
  85. package/skills/peach-setup/SKILL.md +6 -0
  86. package/skills/peach-setup/references/native-config.md +7 -0
  87. package/src/expo-swift-host.ts +8 -4
  88. package/src/nitro-adapter.lock.json +233 -233
  89. package/src/nitro-superset.lock.json +4 -4
  90. package/src/swift-distribution.lock.json +8 -8
  91. package/src/swift-root-lock.ts +7 -6
  92. package/src/turbo-bundle.ts +2 -10
  93. package/src/turbo-runtime.lock.json +19 -19
  94. package/src/turbo-source.ts +22 -15
  95. package/src/xcode-project.ts +3 -0
@@ -554,6 +554,27 @@ function evaluatePodfileNewArch(statements: string[], properties: unknown): bool
554
554
  return enabled
555
555
  }
556
556
 
557
+ export function readExpoNativeRenderer(
558
+ config: unknown,
559
+ platform: 'ios' | 'android',
560
+ ): NativeRenderer | undefined {
561
+ const values = [
562
+ metadataValue(config, 'newArchEnabled'),
563
+ metadataValue(metadataValue(config, platform), 'newArchEnabled'),
564
+ ]
565
+ const plugins = metadataValue(config, 'plugins')
566
+ if (Array.isArray(plugins))
567
+ for (const plugin of plugins)
568
+ if (Array.isArray(plugin) && plugin[0] === 'expo-build-properties')
569
+ values.push(metadataValue(metadataValue(plugin[1], platform), 'newArchEnabled'))
570
+ const declared = values.filter((value) => value !== undefined)
571
+ if (declared.some((value) => typeof value !== 'boolean'))
572
+ throw new Error('Expo newArchEnabled must be true or false')
573
+ if (declared.some((value) => value !== declared[0]))
574
+ throw new Error('contradictory Expo native renderer metadata')
575
+ return declared.length === 0 ? undefined : declared[0] ? 'fabric' : 'paper'
576
+ }
577
+
557
578
  // read only explicit static native build settings for the selected platform.
558
579
  // `appJson: false` leaves out app.json, which a dynamic app config can override.
559
580
  export function readNativeProjectRenderer(
@@ -584,12 +605,12 @@ export function readNativeProjectRenderer(
584
605
  }
585
606
  }
586
607
  if (appJson) {
587
- const expo = metadataValue(json('app.json'), 'expo')
588
- add(metadataValue(expo, 'newArchEnabled'), 'app.json expo.newArchEnabled')
589
- add(
590
- metadataValue(metadataValue(expo, platform), 'newArchEnabled'),
591
- `app.json expo.${platform}.newArchEnabled`,
608
+ const renderer = readExpoNativeRenderer(
609
+ metadataValue(json('app.json'), 'expo'),
610
+ platform,
592
611
  )
612
+ if (renderer !== undefined)
613
+ add(renderer === 'fabric', 'app.json Expo new architecture')
593
614
  }
594
615
  if (platform === 'ios') {
595
616
  const podfileProperties = json('ios/Podfile.properties.json')
@@ -25,7 +25,10 @@ import {
25
25
  stageHostFile,
26
26
  stageHostLaunchMetadata,
27
27
  } from '../../src/host/staged-host-files'
28
- import { readInstalledNativePackageVersions } from '../../src/installed-package-versions'
28
+ import {
29
+ readInstalledNativePackageVersions,
30
+ readInstalledPackageVersions,
31
+ } from '../../src/installed-package-versions'
29
32
  import { resolveMetroProjectRoot } from '../../src/metro-project-root'
30
33
  import {
31
34
  canExtractNativeAppIdentity,
@@ -67,7 +70,7 @@ import {
67
70
  resolveBridgeWorld,
68
71
  worldForBridgePort,
69
72
  } from '../ws-bridge'
70
- import { readNativeProjectRenderer } from './detect'
73
+ import { readExpoNativeRenderer, readNativeProjectRenderer } from './detect'
71
74
  import type { NitroBuildConfiguration } from '../../src/nitroContract'
72
75
 
73
76
  // built-in shell apps use pathname-based routing, not ?bundle= params
@@ -737,6 +740,42 @@ export async function buildShellUrl(
737
740
  const nativeAssetOrigin = `http://127.0.0.1:${port.port}`
738
741
  const bundle = bundleUrlOf(resolved)
739
742
  const platform = shellUrlPlatform(resolved, opts.device)
743
+ const expoConfigRead = await takeExpoConfigRead(project)
744
+ const nativeRenderer = project
745
+ ? readNativeProjectRenderer(project.appDir, platform, undefined, {
746
+ appJson: !expoConfigRead || !('config' in expoConfigRead),
747
+ })
748
+ : undefined
749
+ if (project && bundle) {
750
+ const expoConfig =
751
+ expoConfigRead && 'config' in expoConfigRead ? expoConfigRead.config : undefined
752
+ const expoRenderer = readExpoNativeRenderer(expoConfig, platform)
753
+ const version = readInstalledPackageVersions(project.appDir, [
754
+ 'node_modules/react-native',
755
+ ])['react-native']
756
+ const minor = version && /^0\.(\d+)\./.exec(version)?.[1]
757
+ const legacyDefault =
758
+ nativeRenderer === undefined &&
759
+ expoRenderer === undefined &&
760
+ minor !== undefined &&
761
+ Number(minor) < 76
762
+ const configuredRenderer = readPeachConfigFromSearchParams(
763
+ new URL(resolved).searchParams,
764
+ )?.nativeRenderer
765
+ if (
766
+ nativeRenderer === 'paper' ||
767
+ expoRenderer === 'paper' ||
768
+ legacyDefault ||
769
+ configuredRenderer === 'paper'
770
+ )
771
+ throw new Error(
772
+ 'unsupported-architecture: React Native apps require the new architecture. ' +
773
+ (legacyDefault
774
+ ? 'React Native ' + version + ' defaults to the legacy architecture. '
775
+ : 'This app disables the new architecture. ') +
776
+ 'Upgrade or explicitly enable the new architecture in the app before opening it.',
777
+ )
778
+ }
740
779
  const stamped = await stampAppCatalog(
741
780
  await stampAppSplash(
742
781
  stampAppFonts(resolved, platform, nativeAssetOrigin, project),
@@ -751,7 +790,6 @@ export async function buildShellUrl(
751
790
  expoStamped.searchParams.delete(ANDROID_ROOT_MODULE_QUERY_PARAM)
752
791
  expoStamped.searchParams.delete('appBundleResources')
753
792
  if (project) {
754
- const nativeRenderer = readNativeProjectRenderer(project.appDir, platform)
755
793
  if (nativeRenderer !== undefined) {
756
794
  const config = readPeachConfigFromSearchParams(expoStamped.searchParams)
757
795
  if (
@@ -801,7 +839,6 @@ export async function buildShellUrl(
801
839
  if (packageVersions) {
802
840
  expoStamped.searchParams.set('packageVersions', JSON.stringify(packageVersions))
803
841
  }
804
- const expoConfigRead = await takeExpoConfigRead(project)
805
842
  const stampedBundle = expoStamped.searchParams.get('bundle')
806
843
  if (project && !expoConfigRead && stampedBundle) {
807
844
  // no Expo config tooling, but the native project still configures Firebase
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2103 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2105 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2103 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2105 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2103 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2105 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2103 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2105 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2103 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2105 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
package/dist-lib/beta.cjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2103 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2105 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
package/dist-lib/beta.mjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2103 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2105 | (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
- /*! peach v0.1.2103 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2105 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2103 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2105 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2103 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2105 | (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
- /*! peach v0.1.2103 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2105 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2103 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2105 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
 
3
3
  // src/bridge-contract.ts
4
4
  var REFUSED_PERFORM_STEP_TYPES = [