peachsim 0.1.1843 → 0.1.1845

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 (90) hide show
  1. package/cli/commands/shell-url.ts +1 -1
  2. package/dist-lib/agent-daemon-client.cjs +1 -1
  3. package/dist-lib/agent-events.cjs +1 -1
  4. package/dist-lib/attached-projects.cjs +1 -1
  5. package/dist-lib/auth/shared-session.cjs +1 -1
  6. package/dist-lib/backend-origin.cjs +1 -1
  7. package/dist-lib/beta.cjs +1 -1
  8. package/dist-lib/beta.mjs +1 -1
  9. package/dist-lib/bridge-constants.cjs +1 -1
  10. package/dist-lib/bridge-contract-input.cjs +1 -1
  11. package/dist-lib/bridge-contract-input.mjs +1 -1
  12. package/dist-lib/bridge-contract.cjs +1 -1
  13. package/dist-lib/bridge-contract.mjs +1 -1
  14. package/dist-lib/bundle-channel.cjs +65 -29
  15. package/dist-lib/capture-contract.cjs +1 -1
  16. package/dist-lib/capture-contract.mjs +1 -1
  17. package/dist-lib/cloud-contract.cjs +1 -1
  18. package/dist-lib/cloud-contract.mjs +1 -1
  19. package/dist-lib/cloud-test-args.cjs +1 -1
  20. package/dist-lib/cloud-test-args.mjs +1 -1
  21. package/dist-lib/cloud.cjs +1 -1
  22. package/dist-lib/cloud.mjs +1 -1
  23. package/dist-lib/config.cjs +1 -1
  24. package/dist-lib/config.mjs +1 -1
  25. package/dist-lib/detox/index.cjs +1 -1
  26. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  27. package/dist-lib/expo-swift-bundle.cjs +45 -19
  28. package/dist-lib/expo-swift-metadata.cjs +1 -1
  29. package/dist-lib/expo-swift-metadata.mjs +1 -1
  30. package/dist-lib/home-paths.cjs +1 -1
  31. package/dist-lib/host/bridge-host.cjs +69 -30
  32. package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
  33. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  34. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  35. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  36. package/dist-lib/host/websocket-proxy.cjs +1 -1
  37. package/dist-lib/index.cjs +207 -12
  38. package/dist-lib/jump-to-source-babel.cjs +1 -1
  39. package/dist-lib/jump-to-source-native.cjs +1 -1
  40. package/dist-lib/kotlin-host.cjs +1 -1
  41. package/dist-lib/menu.cjs +1 -1
  42. package/dist-lib/menu.mjs +1 -1
  43. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  44. package/dist-lib/metro-fingerprint-registry.mjs +1 -1
  45. package/dist-lib/metro-production-bundle.cjs +1 -1
  46. package/dist-lib/metro-production-bundle.mjs +1 -1
  47. package/dist-lib/metro.cjs +207 -12
  48. package/dist-lib/native-app-identity-project.cjs +10 -5
  49. package/dist-lib/native-app-identity-project.mjs +10 -5
  50. package/dist-lib/native-app-identity.cjs +1 -1
  51. package/dist-lib/native-app-identity.mjs +1 -1
  52. package/dist-lib/native-firebase-metadata.cjs +1 -1
  53. package/dist-lib/native-firebase-metadata.mjs +1 -1
  54. package/dist-lib/pdfium-raster.cjs +1 -1
  55. package/dist-lib/pdfium-raster.mjs +1 -1
  56. package/dist-lib/plist.cjs +1 -1
  57. package/dist-lib/plist.mjs +1 -1
  58. package/dist-lib/profiles.cjs +1 -1
  59. package/dist-lib/public-brand.cjs +1 -1
  60. package/dist-lib/public-origins-lib-esm.json +24 -24
  61. package/dist-lib/public-origins-lib.json +53 -53
  62. package/dist-lib/react-native-host-modules.cjs +1 -1
  63. package/dist-lib/react-native-host-modules.mjs +1 -1
  64. package/dist-lib/reap-browser.cjs +1 -1
  65. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  66. package/dist-lib/sdk.cjs +1 -1
  67. package/dist-lib/sdk.mjs +1 -1
  68. package/dist-lib/skills.cjs +269 -48
  69. package/dist-lib/swift-compile.cjs +1 -1
  70. package/dist-lib/swift-compile.mjs +1 -1
  71. package/dist-lib/swift-package.cjs +1 -1
  72. package/dist-lib/swift-package.mjs +1 -1
  73. package/dist-lib/swift-submit.cjs +1 -1
  74. package/dist-lib/swift-submit.mjs +1 -1
  75. package/dist-lib/swift-toolchain.cjs +1 -1
  76. package/dist-lib/swift.cjs +1 -1
  77. package/dist-lib/vite-swift.cjs +11 -3
  78. package/dist-lib/vite.cjs +1 -1
  79. package/dist-lib/worklet-executable.cjs +1 -1
  80. package/dist-lib/worklet-executable.mjs +1 -1
  81. package/dist-types/packages/peach-engine/src/engine/node.d.ts +6 -0
  82. package/dist-types/packages/peach-engine/src/engine/scene-table.d.ts +1 -0
  83. package/dist-types/packages/peach-engine/src/engine/text-line-break.d.ts +1 -1
  84. package/package.json +1 -1
  85. package/src/expo-swift-host.ts +36 -12
  86. package/src/expoSwiftContract.ts +1 -0
  87. package/src/native-firebase-config.ts +268 -9
  88. package/src/nitro-dependencies.ts +14 -0
  89. package/src/turbo-source.ts +12 -3
  90. package/src/xcode-project.ts +23 -5
@@ -115,6 +115,19 @@ const RN_FMT_11_DEPENDENCIES: NitroDependency[] = [
115
115
  },
116
116
  ]
117
117
 
118
+ // react-native 0.78 and 0.79 pin the same archives except fast_float 6.1.4
119
+ const RN_FAST_FLOAT_6_DEPENDENCIES: NitroDependency[] = RN_FMT_11_DEPENDENCIES.map(
120
+ (dependency) =>
121
+ dependency.name === 'fast_float'
122
+ ? {
123
+ ...dependency,
124
+ url: 'https://github.com/fastfloat/fast_float/archive/v6.1.4.tar.gz',
125
+ sha256: '12cb6d250824160ca16bcb9d51f0ca7693d0d10cb444f34f1093bc02acfce704',
126
+ prefix: 'fast_float-6.1.4',
127
+ }
128
+ : dependency,
129
+ )
130
+
118
131
  const RN_FMT_12_DEPENDENCIES: NitroDependency[] = [
119
132
  ...RN_SHARED_DEPENDENCIES,
120
133
  {
@@ -178,6 +191,7 @@ function rnDependencies(
178
191
  const minor = Number(/^0\.(\d+)\./.exec(reactNativeVersion)?.[1])
179
192
  if (minor >= 85) return RN_FMT_12_DEPENDENCIES
180
193
  if (minor >= 80) return RN_FMT_11_DEPENDENCIES
194
+ if (minor >= 78) return RN_FAST_FLOAT_6_DEPENDENCIES
181
195
  return []
182
196
  }
183
197
 
@@ -1039,6 +1039,7 @@ export async function collectTurboSources(options: {
1039
1039
  readPod(provider, options.appRoot, options.installedPods?.get(provider.name)),
1040
1040
  )
1041
1041
  let codegen: string | null = null
1042
+ let moduleProviders = false
1042
1043
  const installedCodegenNames = new Set(
1043
1044
  installedHeaderPods.flatMap((pod) => {
1044
1045
  const manifest: unknown = JSON.parse(
@@ -2090,6 +2091,7 @@ export async function collectTurboSources(options: {
2090
2091
  const generated = codegenSpecRoot(codegen)
2091
2092
  // some releases (0.78) emit no central provider file; their specs self-register
2092
2093
  if (fs.existsSync(path.join(generated, 'RCTModuleProviders.mm'))) {
2094
+ moduleProviders = true
2093
2095
  original(TURBO_CORE_TARGET, 'ReactCodegen', generated, 'RCTModuleProviders.mm')
2094
2096
  alias(
2095
2097
  `${core}/include/ReactCodegen/RCTModuleProviders.h`,
@@ -2156,6 +2158,7 @@ export async function collectTurboSources(options: {
2156
2158
  [...unregisteredObjcClasses].sort(),
2157
2159
  decoratorHasPerformanceLogger,
2158
2160
  managerHasDevMenuDecorator,
2161
+ moduleProviders,
2159
2162
  )
2160
2163
  : turboHostSource(withRuntime),
2161
2164
  )
@@ -2298,6 +2301,7 @@ function turboObjCHostSource(
2298
2301
  unregisteredClasses: readonly string[],
2299
2302
  decoratorHasPerformanceLogger: boolean,
2300
2303
  managerHasDevMenuDecorator: boolean,
2304
+ moduleProviders: boolean,
2301
2305
  ): string {
2302
2306
  const classNamesList = objcClasses.map((name) => `@${JSON.stringify(name)}`).join(', ')
2303
2307
  const unregisteredList = unregisteredClasses
@@ -2321,7 +2325,7 @@ function turboObjCHostSource(
2321
2325
  ${decoratorHasPerformanceLogger ? '#import <React/RCTPerformanceLogger.h>' : ''}
2322
2326
  #import <React/RCTBridgeModule.h>
2323
2327
  #import <React/RCTEventDispatcherProtocol.h>
2324
- #import <ReactCodegen/RCTModuleProviders.h>
2328
+ ${moduleProviders ? '#import <ReactCodegen/RCTModuleProviders.h>' : ''}
2325
2329
  #import <ReactCommon/CxxTurboModuleUtils.h>
2326
2330
  #import <ReactCommon/RCTTurboModuleManager.h>
2327
2331
  #include <os/log.h>
@@ -2564,10 +2568,15 @@ static RCTTurboModuleManager *manager;
2564
2568
  return module;
2565
2569
  }
2566
2570
 
2567
- - (id<RCTModuleProvider>)getModuleProvider:(const char *)name
2571
+ ${
2572
+ moduleProviders
2573
+ ? `- (id<RCTModuleProvider>)getModuleProvider:(const char *)name
2568
2574
  {
2569
2575
  return RCTModuleProviders.moduleProviders[@(name)];
2570
2576
  }
2577
+ `
2578
+ : ''
2579
+ }
2571
2580
 
2572
2581
  - (std::shared_ptr<react::TurboModule>)getTurboModule:(const std::string &)name
2573
2582
  jsInvoker:(std::shared_ptr<react::CallInvoker>)jsInvoker
@@ -2655,7 +2664,7 @@ extern "C" __attribute__((export_name("peach_turbo_module_names"))) const char*
2655
2664
  NSMutableOrderedSet<NSString *> *found = [NSMutableOrderedSet new];
2656
2665
  for (const auto& [name, provider] : react::globalExportedCxxTurboModuleMap())
2657
2666
  [found addObject:@(name.c_str())];
2658
- [found addObjectsFromArray:RCTModuleProviders.moduleProviders.allKeys];
2667
+ ${moduleProviders ? ' [found addObjectsFromArray:RCTModuleProviders.moduleProviders.allKeys];' : ''}
2659
2668
  for (Class moduleClass in RCTGetModuleClasses())
2660
2669
  if (moduleClass != [PeachTurboRegistry class] &&
2661
2670
  moduleClass != [PeachImageURLLoading class] &&
@@ -1542,9 +1542,27 @@ export function selectIosAppTarget(
1542
1542
  // react native's own repo keeps its xcode project beside package.json
1543
1543
  const nested = path.join(projectRoot, 'ios')
1544
1544
  const iosRoot = fs.existsSync(nested) ? nested : projectRoot
1545
- const projects = fs
1546
- .readdirSync(iosRoot, { withFileTypes: true })
1547
- .filter((entry) => entry.isDirectory() && entry.name.endsWith('.xcodeproj'))
1545
+ const entries = fs.readdirSync(iosRoot, { withFileTypes: true })
1546
+ // a workspace-only layout keeps its app project in a subfolder the workspace lists
1547
+ const projects = (
1548
+ entries.some((entry) => entry.isDirectory() && entry.name.endsWith('.xcodeproj'))
1549
+ ? entries
1550
+ .filter((entry) => entry.isDirectory() && entry.name.endsWith('.xcodeproj'))
1551
+ .map((entry) => path.join(iosRoot, entry.name))
1552
+ : entries
1553
+ .filter((entry) => entry.isDirectory() && entry.name.endsWith('.xcworkspace'))
1554
+ .flatMap((entry) => workspaceReferences(path.join(iosRoot, entry.name)))
1555
+ .filter(
1556
+ (xcodeproj) =>
1557
+ xcodeproj.endsWith('.xcodeproj') &&
1558
+ !xcodeproj.split(path.sep).includes('Pods') &&
1559
+ fs.existsSync(xcodeproj),
1560
+ )
1561
+ .filter(
1562
+ (xcodeproj) =>
1563
+ listXcodeAppTargets(xcodeproj, { requireSources: false }).length > 0,
1564
+ )
1565
+ ).map((xcodeproj) => ({ xcodeproj, name: path.basename(xcodeproj) }))
1548
1566
  if (projects.length === 0) return null
1549
1567
  if (projects.length > 1 && !iosTarget) {
1550
1568
  throw new NativeAppTargetSelectionError(
@@ -1554,7 +1572,7 @@ export function selectIosAppTarget(
1554
1572
  let project = projects[0]!
1555
1573
  if (iosTarget && projects.length > 1) {
1556
1574
  const matches = projects.filter((entry) =>
1557
- listXcodeAppTargets(path.join(iosRoot, entry.name), {
1575
+ listXcodeAppTargets(entry.xcodeproj, {
1558
1576
  requireSources: false,
1559
1577
  }).includes(iosTarget),
1560
1578
  )
@@ -1566,7 +1584,7 @@ export function selectIosAppTarget(
1566
1584
  )
1567
1585
  project = matches[0]!
1568
1586
  }
1569
- const xcodeproj = path.join(iosRoot, project.name)
1587
+ const xcodeproj = project.xcodeproj
1570
1588
  const appTargets = listXcodeAppTargets(xcodeproj, { requireSources: false })
1571
1589
  let target = iosTarget ?? defaultXcodeAppTarget(xcodeproj)
1572
1590
  if (!target) throw new Error('native app identity has no iOS application target')