peachsim 0.1.2065 → 0.1.2066

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 (99) 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 +1950 -1782
  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 +1435 -1284
  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 +2137 -1967
  31. package/dist-lib/host/fetch-proxy-handler.cjs +3 -3
  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 +3 -3
  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 +3 -3
  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 +60 -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 +2660 -2481
  68. package/dist-lib/swift-compile.cjs +27 -9
  69. package/dist-lib/swift-compile.mjs +26 -9
  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 +1054 -917
  77. package/dist-lib/vite.cjs +3 -3
  78. package/dist-lib/worklet-executable.cjs +1 -1
  79. package/dist-lib/worklet-executable.mjs +1 -1
  80. package/package.json +1 -1
  81. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAMediaTiming.h +4 -4
  82. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Modules/module.modulemap +1 -0
  83. package/src/expo-pod-prebuilt.ts +21 -4
  84. package/src/expo-swift-host.ts +12 -0
  85. package/src/host/dev-server-package-versions.ts +5 -1
  86. package/src/native-swift-slices.ts +130 -0
  87. package/src/nitro-adapter.lock.json +280 -280
  88. package/src/nitro-compile.ts +2 -0
  89. package/src/nitro-source.ts +1 -0
  90. package/src/nitro-superset.lock.json +4 -4
  91. package/src/swift-compile.ts +47 -19
  92. package/src/swift-distribution.lock.json +11 -11
  93. package/src/swift-host.ts +24 -0
  94. package/src/swift-installed-targets.ts +5 -0
  95. package/src/swift-standins.ts +29 -11
  96. package/src/swift-xcframework.ts +4 -0
  97. package/src/turbo-compile.ts +2 -0
  98. package/src/turbo-runtime.lock.json +23 -23
  99. package/src/turbo-source.ts +1 -0
package/dist-lib/vite.cjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2065 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2066 | (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;
@@ -1905,7 +1905,7 @@ function readIosSdkTree(root) {
1905
1905
 
1906
1906
  // src/swift-standin-digest.ts
1907
1907
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
1908
- var STANDIN_SOURCE_DIGEST = true ? "d3989025f0bd01881a5114ec49ccc0f742ec0a93aba1a3e3271f90514c18d6de" : standinSourceDigest();
1908
+ var STANDIN_SOURCE_DIGEST = true ? "31b9ce94fe9f9a6733e36b8ef97b9464a0f7dc44fcb4ee3bcdd143b626a5e1c5" : standinSourceDigest();
1909
1909
 
1910
1910
  // src/expo-native-workspace.ts
1911
1911
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
@@ -5403,7 +5403,7 @@ var FOUNDATION_IMPLICIT_MODULES = [
5403
5403
  var FOUNDATION_IMPLICIT_FLAGS = FOUNDATION_IMPLICIT_MODULES.map(
5404
5404
  (module2) => `, "-Xfrontend", "-import-module", "-Xfrontend", "${module2}"`
5405
5405
  ).join("");
5406
- var compilerSourceDigest = true ? "555575a6058c9d394e29b534e122eb377fda824fe2b515277a16896fa6fa02c4" : swiftCompilerSourceDigest2(__sootsim_import_meta_dirname);
5406
+ var compilerSourceDigest = true ? "e94b86c87d63b484a0d1e9d964eba432b5169d3abe3717f7b360aa31e14b9556" : swiftCompilerSourceDigest2(__sootsim_import_meta_dirname);
5407
5407
  var CORE_FOUNDATION_HANDLE_IMPORTS = [
5408
5408
  "CFAllocator",
5409
5409
  "CFArray",
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2065 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2066 | (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.2065 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2066 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
 
3
3
  // src/worklet-executable.ts
4
4
  import { parse } from "acorn";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "peachsim",
3
- "version": "0.1.2065",
3
+ "version": "0.1.2066",
4
4
  "description": "Vite and Metro plugins, testing drivers, and SDK exports for peach.",
5
5
  "author": "Tamagui LLC",
6
6
  "license": "SEE LICENSE IN LICENSE",
@@ -83,13 +83,13 @@ API_AVAILABLE(macos(10.5), ios(2.0), tvos(9.0)) API_UNAVAILABLE(watchos)
83
83
 
84
84
  /* `fillMode' options. */
85
85
 
86
- CA_EXTERN CAMediaTimingFillMode const kCAFillModeForwards
86
+ CA_EXTERN CAMediaTimingFillMode const kCAFillModeForwards NS_SWIFT_NAME(CAMediaTimingFillMode.forwards)
87
87
  API_AVAILABLE(macos(10.5), ios(2.0), tvos(9.0)) API_UNAVAILABLE(watchos);
88
- CA_EXTERN CAMediaTimingFillMode const kCAFillModeBackwards
88
+ CA_EXTERN CAMediaTimingFillMode const kCAFillModeBackwards NS_SWIFT_NAME(CAMediaTimingFillMode.backwards)
89
89
  API_AVAILABLE(macos(10.5), ios(2.0), tvos(9.0)) API_UNAVAILABLE(watchos);
90
- CA_EXTERN CAMediaTimingFillMode const kCAFillModeBoth
90
+ CA_EXTERN CAMediaTimingFillMode const kCAFillModeBoth NS_SWIFT_NAME(CAMediaTimingFillMode.both)
91
91
  API_AVAILABLE(macos(10.5), ios(2.0), tvos(9.0)) API_UNAVAILABLE(watchos);
92
- CA_EXTERN CAMediaTimingFillMode const kCAFillModeRemoved
92
+ CA_EXTERN CAMediaTimingFillMode const kCAFillModeRemoved NS_SWIFT_NAME(CAMediaTimingFillMode.removed)
93
93
  API_AVAILABLE(macos(10.5), ios(2.0), tvos(9.0)) API_UNAVAILABLE(watchos);
94
94
 
95
95
  NS_HEADER_AUDIT_END(nullability, sendability)
@@ -4,6 +4,7 @@ framework module QuartzCore [system] {
4
4
  // rate range without importing all of QuartzCore, whose Swift overlay sits
5
5
  // above UIKitCore.
6
6
  exclude header "CADisplayLink.h"
7
+ exclude header "CAMediaTiming.h"
7
8
  exclude header "CAFrameRateRange.h"
8
9
  exclude header "CATransform3D.h"
9
10
  exclude header "CABase.h"
@@ -83,11 +83,23 @@ function lookup(url: string) {
83
83
  if (!pending) {
84
84
  pending = fetch(url)
85
85
  .then(async (response) => {
86
- if (!response.ok) return null
86
+ if (!response.ok) {
87
+ console.error(`expo pod miss: ${response.status} ${url}`)
88
+ return null
89
+ }
87
90
  const entry: unknown = await response.json()
88
- return isExpoSwiftCompilationResult(entry) ? entry : null
91
+ if (!isExpoSwiftCompilationResult(entry)) {
92
+ console.error(`expo pod miss: invalid ${url}`)
93
+ return null
94
+ }
95
+ return entry
96
+ })
97
+ .catch((error: unknown) => {
98
+ console.error(
99
+ `expo pod miss: ${error instanceof Error ? error.message : error} ${url}`,
100
+ )
101
+ return null
89
102
  })
90
- .catch(() => null)
91
103
  published.set(url, pending)
92
104
  }
93
105
  return pending
@@ -101,8 +113,13 @@ function lookup(url: string) {
101
113
  export async function prebuiltExpoPods(
102
114
  appRoot: string,
103
115
  ): Promise<ExpoSwiftCompilationResult | null> {
116
+ const pods = await expoPodPackages(fs.realpathSync(appRoot))
117
+ if (pods.length === 0) {
118
+ console.error(`expo pod miss: no packages at ${appRoot}`)
119
+ return null
120
+ }
104
121
  const entries = await Promise.all(
105
- (await expoPodPackages(fs.realpathSync(appRoot))).map(async (pod) =>
122
+ pods.map(async (pod) =>
106
123
  lookup(
107
124
  expoPodEntryUrl(
108
125
  pod.name,
@@ -2341,6 +2341,7 @@ async function compileExpoSwiftModulesTraced(
2341
2341
  const generations = new Map<ExpoSwiftSourceUnit, string>()
2342
2342
  const gaps = new Map<ExpoSwiftSourceUnit, string[]>()
2343
2343
  const libraries = new Map<ExpoSwiftSourceUnit, Record<string, string>>()
2344
+ const binaryModules = new Map<ExpoSwiftSourceUnit, Record<string, string>>()
2344
2345
  const [firstSharedLibrary, ...otherSharedLibraries] = nonmodularFrameworkLibraries(
2345
2346
  [...new Set(units.flatMap((unit) => unit.frameworks))],
2346
2347
  module.root,
@@ -2431,6 +2432,9 @@ async function compileExpoSwiftModulesTraced(
2431
2432
  projectFor(packagePath).oneModule = false
2432
2433
  projectFor(packagePath).optimize = true
2433
2434
  projectFor(packagePath).staticClangTargets = provider?.staticClangTargets
2435
+ projectFor(packagePath).binaryModules = Object.fromEntries(
2436
+ linked.flatMap((unit) => Object.entries(binaryModules.get(unit) ?? {})),
2437
+ )
2434
2438
  projectFor(packagePath).libraries =
2435
2439
  linkedLibraries.size > 0 ? Object.fromEntries(linkedLibraries) : undefined
2436
2440
  projectFor(packagePath).nativeTargets = inheritExecutableFloor([
@@ -2525,6 +2529,14 @@ async function compileExpoSwiftModulesTraced(
2525
2529
  }
2526
2530
  const generation = standinGenerationInputs(reached, toolchain)
2527
2531
  const built = await swiftStandins(reached, toolchain, provided)
2532
+ binaryModules.set(
2533
+ unit,
2534
+ Object.fromEntries(
2535
+ built.standins.flatMap((standin) =>
2536
+ standin.prebuilt ? [[standin.module, standin.prebuilt.module]] : [],
2537
+ ),
2538
+ ),
2539
+ )
2528
2540
  const linkedLibraries = standinLibraries(
2529
2541
  reached,
2530
2542
  built.standins,
@@ -35,5 +35,9 @@ export async function readDevServerExpoPods(
35
35
  bundleUrl: URL,
36
36
  ): Promise<ExpoSwiftCompilationResult | null> {
37
37
  const projectRoot = await devServerProjectRoot(bundleUrl)
38
- return projectRoot ? prebuiltExpoPods(projectRoot) : null
38
+ if (!projectRoot) {
39
+ console.error(`expo pod miss: no project root for ${bundleUrl.href}`)
40
+ return null
41
+ }
42
+ return prebuiltExpoPods(projectRoot)
39
43
  }
@@ -0,0 +1,130 @@
1
+ import { createHash } from 'node:crypto'
2
+ import fs from 'node:fs'
3
+ import path from 'node:path'
4
+ import { fetchNativeEntry, nativeEntryKey } from './native-prebuilt'
5
+ import {
6
+ swiftDistributionAt,
7
+ swiftInterfaceDeclarations,
8
+ withoutSwiftDeclarations,
9
+ } from './swift-compile'
10
+ import { simulatorNativeLibrary } from './swift-xcframework'
11
+ import type { SwiftStandin } from './swift-standins'
12
+
13
+ export const SENTRY_SWIFT_SLICE = {
14
+ name: 'Sentry',
15
+ upstream: '05d3ce8332097ff0b2347231ac66476fd7d2f4d8',
16
+ repository: 'https://github.com/getsentry/sentry-cocoa.git',
17
+ checksum: '17b5cdca223d333f21609c59b97afe26b964eddba3b89186033386d7ba22024d',
18
+ nativeSha256: 'c0935ec6243f706cafa25666fe53267ae166e43d49771240d88ae9f5b0886671',
19
+ url: 'https://github.com/getsentry/sentry-cocoa/releases/download/9.8.0/Sentry.xcframework.zip',
20
+ recipe: 'b93503e2cdaacc14076b45e0a1f72baccc1b117f138d4728acf46184e59f30c3',
21
+ }
22
+
23
+ export function nativeSwiftSliceEntry(
24
+ distribution: {
25
+ id: string
26
+ release: string
27
+ wasmSdkId: string
28
+ wasmSdkChecksum: string
29
+ },
30
+ generator: string,
31
+ ) {
32
+ const inputs = {
33
+ upstream: SENTRY_SWIFT_SLICE.upstream,
34
+ nativeChecksum: SENTRY_SWIFT_SLICE.checksum,
35
+ nativeSha256: SENTRY_SWIFT_SLICE.nativeSha256,
36
+ recipe: SENTRY_SWIFT_SLICE.recipe,
37
+ generator,
38
+ compiler: distribution.release,
39
+ sdk: distribution.wasmSdkId,
40
+ sdkChecksum: distribution.wasmSdkChecksum,
41
+ distribution: distribution.id,
42
+ target: 'wasm32-wasip1',
43
+ }
44
+ return { name: SENTRY_SWIFT_SLICE.name, inputs, key: nativeEntryKey(inputs) }
45
+ }
46
+
47
+ export function nativeSwiftSlice(
48
+ standin: SwiftStandin,
49
+ moduleRoot: string,
50
+ generator: string,
51
+ configured: boolean,
52
+ artifact: () => string,
53
+ ): SwiftStandin {
54
+ if (standin.module !== SENTRY_SWIFT_SLICE.name) return standin
55
+ const native = simulatorNativeLibrary(artifact())
56
+ if (
57
+ !native ||
58
+ createHash('sha256').update(fs.readFileSync(native.file)).digest('hex') !==
59
+ SENTRY_SWIFT_SLICE.nativeSha256
60
+ )
61
+ return standin
62
+ if (configured)
63
+ throw new Error(
64
+ `${standin.module}: configured binary behavior cannot replace a compiled native slice`,
65
+ )
66
+ const distribution = swiftDistributionAt(moduleRoot)
67
+ if (!distribution) throw new Error('native Swift slices need a compiled distribution')
68
+ const entry = nativeSwiftSliceEntry(distribution, generator)
69
+ const directory = fetchNativeEntry('slice', entry.name, entry.key)
70
+ if (!directory)
71
+ throw new Error(
72
+ `native Swift slice ${entry.name}/${entry.key} is not built for this compiler and SDK`,
73
+ )
74
+ const header = fs.readFileSync(
75
+ path.join(directory, `${standin.module}-Swift.h`),
76
+ 'utf8',
77
+ )
78
+ const declared = swiftInterfaceDeclarations(header)
79
+ const headers = path.join(path.dirname(native.file), 'Headers')
80
+ const originals = fs
81
+ .readdirSync(headers)
82
+ .filter((file) => file.endsWith('.h') && file !== `${standin.module}-Swift.h`)
83
+ const enums = new Map<string, string>()
84
+ for (const file of originals)
85
+ for (const match of fs
86
+ .readFileSync(path.join(headers, file), 'utf8')
87
+ .matchAll(/typedef\s+(?:NS_ENUM|NS_OPTIONS)\s*\(\s*\w+\s*,\s*(\w+)\s*\)\s*\{/g))
88
+ enums.set(match[1]!, file)
89
+ const files: Record<string, string> = {
90
+ [`${standin.module}.c`]: '\n',
91
+ [`include/${standin.module}/${standin.module}-Swift.h`]: withoutSwiftDeclarations(
92
+ header,
93
+ new Set(enums.keys()),
94
+ `#import <${standin.module}/PeachEnums.h>`,
95
+ ),
96
+ [`include/${standin.module}/PeachEnums.h`]: [...new Set(enums.values())]
97
+ .map((file) => `#import <${standin.module}/${file}>`)
98
+ .join('\n'),
99
+ 'include/module.modulemap': fs
100
+ .readFileSync(
101
+ path.join(path.dirname(native.file), 'Modules/module.modulemap'),
102
+ 'utf8',
103
+ )
104
+ .replace(/\bframework module\b/g, 'module')
105
+ .replace(/module\s+\w+\.Swift\s*\{[^}]*\}/g, '')
106
+ .replace(/umbrella header "([^"]+)"/, `umbrella header "${standin.module}/$1"`),
107
+ }
108
+ for (const file of originals)
109
+ files[`include/${standin.module}/${file}`] =
110
+ '#import <UIKit/UIKit.h>\n' +
111
+ withoutSwiftDeclarations(
112
+ fs.readFileSync(path.join(headers, file), 'utf8'),
113
+ declared,
114
+ `#import <${standin.module}/${standin.module}-Swift.h>`,
115
+ )
116
+ return {
117
+ module: standin.module,
118
+ target: standin.target,
119
+ publicHeadersPath: 'include',
120
+ files,
121
+ prebuilt: {
122
+ module: fs
123
+ .readFileSync(path.join(directory, `${standin.module}.swiftmodule`))
124
+ .toString('base64'),
125
+ library: fs
126
+ .readFileSync(path.join(directory, `lib${standin.module}.a`))
127
+ .toString('base64'),
128
+ },
129
+ }
130
+ }