peachsim 0.1.2379 → 0.1.2382

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 (86) hide show
  1. package/dist-lib/agent-daemon-client.cjs +1 -1
  2. package/dist-lib/agent-events.cjs +1 -1
  3. package/dist-lib/attached-projects.cjs +1 -1
  4. package/dist-lib/auth/shared-session.cjs +1 -1
  5. package/dist-lib/backend-origin.cjs +1 -1
  6. package/dist-lib/beta.cjs +1 -1
  7. package/dist-lib/beta.mjs +1 -1
  8. package/dist-lib/bridge-constants.cjs +1 -1
  9. package/dist-lib/bridge-contract-input.cjs +1 -1
  10. package/dist-lib/bridge-contract-input.mjs +1 -1
  11. package/dist-lib/bridge-contract.cjs +1 -1
  12. package/dist-lib/bridge-contract.mjs +1 -1
  13. package/dist-lib/bundle-channel.cjs +40 -26
  14. package/dist-lib/capture-contract.cjs +1 -1
  15. package/dist-lib/capture-contract.mjs +1 -1
  16. package/dist-lib/cloud-contract.cjs +1 -1
  17. package/dist-lib/cloud-contract.mjs +1 -1
  18. package/dist-lib/cloud-test-args.cjs +1 -1
  19. package/dist-lib/cloud-test-args.mjs +1 -1
  20. package/dist-lib/cloud.cjs +1 -1
  21. package/dist-lib/cloud.mjs +1 -1
  22. package/dist-lib/config.cjs +1 -1
  23. package/dist-lib/config.mjs +1 -1
  24. package/dist-lib/detox/index.cjs +1 -1
  25. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  26. package/dist-lib/expo-swift-bundle.cjs +39 -25
  27. package/dist-lib/expo-swift-metadata.cjs +1 -1
  28. package/dist-lib/expo-swift-metadata.mjs +1 -1
  29. package/dist-lib/home-paths.cjs +1 -1
  30. package/dist-lib/host/bridge-host.cjs +40 -26
  31. package/dist-lib/host/fetch-proxy-handler.cjs +4 -4
  32. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  33. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  34. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  35. package/dist-lib/host/websocket-proxy.cjs +1 -1
  36. package/dist-lib/index.cjs +4 -4
  37. package/dist-lib/jump-to-source-babel.cjs +1 -1
  38. package/dist-lib/jump-to-source-native.cjs +1 -1
  39. package/dist-lib/kotlin-host.cjs +1 -1
  40. package/dist-lib/menu.cjs +1 -1
  41. package/dist-lib/menu.mjs +1 -1
  42. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  43. package/dist-lib/metro-fingerprint-registry.mjs +1 -1
  44. package/dist-lib/metro-production-bundle.cjs +1 -1
  45. package/dist-lib/metro-production-bundle.mjs +1 -1
  46. package/dist-lib/metro.cjs +4 -4
  47. package/dist-lib/native-app-identity-project.cjs +2 -2
  48. package/dist-lib/native-app-identity-project.mjs +2 -2
  49. package/dist-lib/native-app-identity.cjs +1 -1
  50. package/dist-lib/native-app-identity.mjs +1 -1
  51. package/dist-lib/native-firebase-metadata.cjs +1 -1
  52. package/dist-lib/native-firebase-metadata.mjs +1 -1
  53. package/dist-lib/pdfium-raster.cjs +1 -1
  54. package/dist-lib/pdfium-raster.mjs +1 -1
  55. package/dist-lib/plist.cjs +1 -1
  56. package/dist-lib/plist.mjs +1 -1
  57. package/dist-lib/profiles.cjs +1 -1
  58. package/dist-lib/public-brand.cjs +1 -1
  59. package/dist-lib/public-origins-lib-esm.json +24 -24
  60. package/dist-lib/public-origins-lib.json +53 -53
  61. package/dist-lib/react-native-host-modules.cjs +1 -1
  62. package/dist-lib/react-native-host-modules.mjs +1 -1
  63. package/dist-lib/reap-browser.cjs +1 -1
  64. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  65. package/dist-lib/sdk.cjs +1 -1
  66. package/dist-lib/sdk.mjs +1 -1
  67. package/dist-lib/skills.cjs +40 -26
  68. package/dist-lib/swift-compile.cjs +12 -5
  69. package/dist-lib/swift-compile.mjs +12 -5
  70. package/dist-lib/swift-package.cjs +1 -1
  71. package/dist-lib/swift-package.mjs +1 -1
  72. package/dist-lib/swift-submit.cjs +1 -1
  73. package/dist-lib/swift-submit.mjs +1 -1
  74. package/dist-lib/swift-toolchain.cjs +1 -1
  75. package/dist-lib/swift.cjs +1 -1
  76. package/dist-lib/vite-swift.cjs +31 -19
  77. package/dist-lib/vite.cjs +4 -4
  78. package/dist-lib/worklet-executable.cjs +1 -1
  79. package/dist-lib/worklet-executable.mjs +1 -1
  80. package/kotlin/sdk.tar.gz +0 -0
  81. package/node-runtime.json +1 -1
  82. package/package.json +1 -1
  83. package/src/expo-swift-host.ts +5 -3
  84. package/src/react-native-core-build.ts +3 -2
  85. package/src/swift-compile.ts +14 -8
  86. package/src/swift-host.ts +24 -20
package/src/swift-host.ts CHANGED
@@ -2605,17 +2605,16 @@ export function icuUrl(origin: string, artifact: SwiftArtifact): string {
2605
2605
  : `${origin}${ICU_PATH}${swiftIcuAddress(artifact.icu)}`
2606
2606
  }
2607
2607
 
2608
- // a c stand-in whose framework has a WebAssembly build links that library,
2609
- // keyed by the stand-in target it links into; its own source then defines
2610
- // nothing, so the library's functions run instead of the traps. one library
2611
- // links once, through the first module its framework ships.
2608
+ // a framework's WebAssembly library supplies the implementations its
2609
+ // stand-ins would define. an explicit crate also links when the app's
2610
+ // original native targets consume it through their own headers.
2612
2611
  export function standinLibraries(
2613
2612
  binaries: readonly SwiftPackageBinary[],
2614
2613
  standins: readonly SwiftStandin[],
2615
2614
  rootDir: string,
2616
2615
  toolchain?: { moduleRoot: string; release: string },
2617
- ): Map<string, SwiftStandin[]> {
2618
- const linked = new Map<string, SwiftStandin[]>()
2616
+ ) {
2617
+ const linked = new Map<string, { name: string; standins: SwiftStandin[] }>()
2619
2618
  for (const standin of standins) {
2620
2619
  if (!standin.prebuilt) continue
2621
2620
  const bytes = Buffer.from(standin.prebuilt.library, 'base64')
@@ -2624,7 +2623,7 @@ export function standinLibraries(
2624
2623
  fs.mkdirSync(dir, { recursive: true })
2625
2624
  const library = path.join(dir, `lib${standin.module}.a`)
2626
2625
  if (!fs.existsSync(library)) fs.writeFileSync(library, bytes)
2627
- linked.set(library, [standin])
2626
+ linked.set(library, { name: standin.module, standins: [standin] })
2628
2627
  }
2629
2628
  for (const binary of binaries) {
2630
2629
  const modules = standins.filter(
@@ -2634,10 +2633,13 @@ export function standinLibraries(
2634
2633
  (`${standin.module}.c` in standin.files ||
2635
2634
  `${standin.module}.cpp` in standin.files),
2636
2635
  )
2637
- if (modules.length === 0) continue
2636
+ if (modules.length === 0 && !binary.rustCrate) continue
2638
2637
  const library = standinLibrary(binary, rootDir, toolchain)
2639
2638
  if (!library) continue
2640
- linked.set(library, modules)
2639
+ linked.set(library, {
2640
+ name: modules[0]?.module ?? swiftTargetModuleName(binary.target),
2641
+ standins: modules,
2642
+ })
2641
2643
  }
2642
2644
  return linked
2643
2645
  }
@@ -2724,17 +2726,19 @@ function packageSnapshot(
2724
2726
  JSON.parse(fs.readFileSync(path.join(moduleRoot, 'toolchain.json'), 'utf8')))
2725
2727
  : null
2726
2728
  const linked = layout
2727
- ? standinLibraries(
2728
- layout.binaries,
2729
- layout.standins,
2730
- layout.app.rootDir,
2731
- pin && moduleRoot ? { moduleRoot, release: pin.release } : undefined,
2732
- )
2733
- : new Map<string, SwiftStandin[]>()
2729
+ ? [
2730
+ ...standinLibraries(
2731
+ layout.binaries,
2732
+ layout.standins,
2733
+ layout.app.rootDir,
2734
+ pin && moduleRoot ? { moduleRoot, release: pin.release } : undefined,
2735
+ ),
2736
+ ]
2737
+ : []
2734
2738
  const files = packageSources(
2735
2739
  project.packagePath,
2736
2740
  Boolean(project.hosted),
2737
- new Set([...linked.values()].flat()),
2741
+ new Set(linked.flatMap(([, { standins }]) => standins)),
2738
2742
  )
2739
2743
  Object.assign(files, project.nativeFiles)
2740
2744
  const native = nativeSourceDescriptor(project.packagePath)
@@ -2864,13 +2868,13 @@ function packageSnapshot(
2864
2868
  ],
2865
2869
  }
2866
2870
  : {}),
2867
- ...(linked.size > 0 || project.libraries
2871
+ ...(linked.length > 0 || project.libraries
2868
2872
  ? {
2869
2873
  libraries: {
2870
2874
  ...project.libraries,
2871
2875
  ...Object.fromEntries(
2872
- [...linked].map(([library, [first]]) => [
2873
- first!.module,
2876
+ linked.map(([library, { name }]) => [
2877
+ name,
2874
2878
  fs.readFileSync(library).toString('base64'),
2875
2879
  ]),
2876
2880
  ),