peachsim 0.1.2191 → 0.1.2192

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 (92) 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 +67 -55
  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 +62 -50
  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 -6
  30. package/dist-lib/host/bridge-host.cjs +67 -55
  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 +3 -3
  48. package/dist-lib/native-app-identity-project.mjs +3 -3
  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 +67 -56
  68. package/dist-lib/swift-compile.cjs +8 -17
  69. package/dist-lib/swift-compile.mjs +8 -17
  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 +41 -23
  75. package/dist-lib/swift.cjs +1 -1
  76. package/dist-lib/vite-swift.cjs +44 -32
  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/dist-types/packages/peach-engine/src/engine/scroll-momentum-math.d.ts +2 -1
  81. package/dist-types/packages/peach-engine/src/render-worker/compositor-protocol.d.ts +1 -0
  82. package/dist-types/packages/peach-engine/src/render-worker/scroll-mirror.d.ts +1 -0
  83. package/package.json +1 -1
  84. package/src/expo-native-workspace.ts +21 -20
  85. package/src/home-paths.ts +0 -5
  86. package/src/nitro-adapter.lock.json +265 -265
  87. package/src/nitro-superset.lock.json +4 -4
  88. package/src/swift-distribution.lock.json +17 -11
  89. package/src/swift-distribution.ts +3 -3
  90. package/src/swift-toolchain.ts +40 -30
  91. package/src/swift-wasm-prune.ts +3 -2
  92. package/src/turbo-runtime.lock.json +21 -21
@@ -34,22 +34,7 @@ export function sourceSwiftCheckout(): string {
34
34
 
35
35
  /** swiftpm's SDK directory option, shared by discovery and compilation. */
36
36
  export function swiftSdkOptions(): string[] {
37
- const directory = process.env.PEACH_SWIFT_SDKS_PATH
38
- if (directory) return ['--swift-sdks-path', path.resolve(directory)]
39
- // child config is confined, but source checkouts still discover the SDK
40
- // from the caller's original linux default, including a custom xdg home.
41
- if (scratch && process.platform === 'linux') {
42
- const config = process.env.XDG_CONFIG_HOME
43
- if (config !== undefined && !path.isAbsolute(config))
44
- throw new Error('XDG_CONFIG_HOME must be an absolute path')
45
- return [
46
- '--swift-sdks-path',
47
- config === undefined
48
- ? path.join(os.userInfo().homedir, '.swiftpm', 'swift-sdks')
49
- : path.join(config, 'swiftpm', 'swift-sdks'),
50
- ]
51
- }
52
- return []
37
+ return ['--swift-sdks-path', path.resolve(peachSwiftSdksDir())]
53
38
  }
54
39
 
55
40
  // host archives include the official driver/runtime and the qualified patched frontend.
@@ -395,9 +380,22 @@ export function ensureSwiftLinuxRuntime(release: string): void {
395
380
  process.stderr.write(`peach: installing Linux runtime libxml2.so.2 into ${root}…\n`)
396
381
  const download = `${plan.dest}.${process.pid}.tmp`
397
382
  try {
398
- execFileSync('curl', ['-fsSL', '--show-error', plan.url, '-o', download], {
399
- stdio: 'inherit',
400
- })
383
+ execFileSync(
384
+ 'curl',
385
+ [
386
+ '-fsSL',
387
+ '--show-error',
388
+ '--retry',
389
+ '3',
390
+ '--retry-all-errors',
391
+ plan.url,
392
+ '-o',
393
+ download,
394
+ ],
395
+ {
396
+ stdio: 'inherit',
397
+ },
398
+ )
401
399
  if (swiftFileChecksum(download) !== plan.checksum)
402
400
  throw new Error('declared Linux runtime checksum mismatch')
403
401
  fs.renameSync(download, plan.dest)
@@ -573,6 +571,11 @@ export function peachHome(): string {
573
571
  return override ? path.resolve(override) : path.join(os.homedir(), '.peach')
574
572
  }
575
573
 
574
+ /** where the pinned wasm SDK installs unless PEACH_SWIFT_SDKS_PATH names another. */
575
+ export function peachSwiftSdksDir(): string {
576
+ return process.env.PEACH_SWIFT_SDKS_PATH ?? path.join(peachHome(), 'swift', 'sdks')
577
+ }
578
+
576
579
  export const BUILDERS_ROOT_ENV = 'CONTRAST_BUILDERS_ROOT'
577
580
 
578
581
  let agentBuildersRoot: string | undefined
@@ -935,10 +938,7 @@ function installSwiftSdkArchive(swift: string, sdk: SwiftWasmSdk, archive: strin
935
938
  store,
936
939
  ])
937
940
  const expected = swiftSdkPayloadChecksum(stagedBundle)
938
- const directory = process.env.PEACH_SWIFT_SDKS_PATH
939
- const locks = directory
940
- ? path.join(path.resolve(directory), '.peach-locks')
941
- : path.join(os.homedir(), '.swiftpm', 'builder-locks')
941
+ const locks = path.join(path.resolve(peachSwiftSdksDir()), '.peach-locks')
942
942
  fs.mkdirSync(locks, { recursive: true })
943
943
  execFileSync(
944
944
  'perl',
@@ -1004,9 +1004,22 @@ export function installSwiftWasmSdk(release: string, sdk: SwiftWasmSdk): void {
1004
1004
  if (sdk.wasmSdkUrl.startsWith('file:'))
1005
1005
  fs.copyFileSync(fileURLToPath(sdk.wasmSdkUrl), archive)
1006
1006
  else
1007
- execFileSync('curl', ['-fsSL', '--show-error', sdk.wasmSdkUrl, '-o', archive], {
1008
- stdio: 'inherit',
1009
- })
1007
+ execFileSync(
1008
+ 'curl',
1009
+ [
1010
+ '-fsSL',
1011
+ '--show-error',
1012
+ '--retry',
1013
+ '3',
1014
+ '--retry-all-errors',
1015
+ sdk.wasmSdkUrl,
1016
+ '-o',
1017
+ archive,
1018
+ ],
1019
+ {
1020
+ stdio: 'inherit',
1021
+ },
1022
+ )
1010
1023
  installSwiftSdkArchive(swift, sdk, archive)
1011
1024
  swiftToolchain(release, sdk)
1012
1025
  } finally {
@@ -1166,10 +1179,7 @@ export function swiftSdkInstallStep(release: string, wasmSdk: SwiftWasmSdk): str
1166
1179
  function swiftSdkInstallCommand(release: string, wasmSdk: SwiftWasmSdk): string {
1167
1180
  const { wasmSdkId, wasmSdkUrl, wasmSdkChecksum } = wasmSdk
1168
1181
  const program = `import { installSwiftWasmSdk } from "peachsim/swift-toolchain"; installSwiftWasmSdk(${JSON.stringify(release)}, ${JSON.stringify({ wasmSdkId, wasmSdkUrl, wasmSdkChecksum })})`
1169
- const directory = process.env.PEACH_SWIFT_SDKS_PATH
1170
- const environment = directory
1171
- ? `PEACH_SWIFT_SDKS_PATH='${path.resolve(directory).replaceAll("'", "'\\''")}' `
1172
- : ''
1182
+ const environment = `PEACH_SWIFT_SDKS_PATH='${path.resolve(peachSwiftSdksDir()).replaceAll("'", "'\\''")}' `
1173
1183
  return `${environment}node --input-type=module -e '${program.replaceAll("'", "'\\''")}'`
1174
1184
  }
1175
1185
 
@@ -1121,10 +1121,11 @@ export function pruneSwiftWasmLink(
1121
1121
  const distDir = path.join(moduleRoot, 'lib')
1122
1122
  // the app's own struct and class field descriptors stay: SwiftUI attaches
1123
1123
  // @State and @StateObject by reflecting the app's view structs.
1124
- // the shim reflects its own wrappers and views (State, ObservedObject, Published), so SwiftUI and Combine keep their descriptors
1124
+ // the shim reflects its own wrappers and views (State, ObservedObject, Published), so SwiftUI and Combine keep their descriptors.
1125
+ // a framework's SwiftUI overlay (_StoreKit_SwiftUI) declares views whose @State and @Environment attach the same way.
1125
1126
  const dropsReflection = (obj: ParsedObject, name: string | undefined) =>
1126
1127
  !!name &&
1127
- !/^(SwiftUI|Combine)-/.test(path.basename(obj.file)) &&
1128
+ !/^(SwiftUI|Combine|_[A-Za-z0-9]+_SwiftUI)-/.test(path.basename(obj.file)) &&
1128
1129
  (name.startsWith('l__swift5_reflection_descriptor') ||
1129
1130
  (name.startsWith('$s') &&
1130
1131
  (name.endsWith('CMF') || name.endsWith('VMF')) &&
@@ -8,11 +8,11 @@
8
8
  },
9
9
  "compiler": "swift-6.4.0-RELEASE-custom-11345d60dca47496",
10
10
  "sdk": {
11
- "id": "swift-6.4.0-RELEASE_wasm-peach-3452e5a2",
12
- "checksum": "fe042506d9418d5b73a3a30d62157931439c23e3bcb869871a0fcb8747223a02"
11
+ "id": "swift-6.4.0-RELEASE_wasm-peach-19471d4b",
12
+ "checksum": "764c16e7e34156bf90d6c3372a2b77b98b9d8c3470235520d0f9619f90f33456"
13
13
  },
14
14
  "framework": {
15
- "distribution": "2405235872029d30",
15
+ "distribution": "87fc4d2ff9d5d588",
16
16
  "wireAbi": "246b8412514b644113e6a26252c8ebd6de49ab4156ac5f5c98bb9e4c2ff2568b"
17
17
  },
18
18
  "archives": [
@@ -20,71 +20,71 @@
20
20
  "headers": {
21
21
  "reactNativeJsi": "0f8c2defbca69a27a848a81ae72363073bf9602fd316e57a75811be1a0528358"
22
22
  },
23
- "sha256": "038855e8522f39ea85557bcafc84eb64ec5d9b155c686dca3cff6fa397de0165",
24
- "size": 25395
23
+ "sha256": "6f416d065d88a6f592f0c34dca2d898f2c1adadeeacc07c2f8f4de453715f298",
24
+ "size": 25393
25
25
  },
26
26
  {
27
27
  "headers": {
28
28
  "reactNativeJsi": "21a624ea24fd17d56bf26832d496fc1177067f89640414c20e6486c7984dfb0a"
29
29
  },
30
- "sha256": "b815028eb321b50907658ba883329d13204d29368cc598dab5c39b2a249de88f",
30
+ "sha256": "0c68d14139a733fa990e55fa23224589fe9a74ce82db0ce5b9b52da51211390e",
31
31
  "size": 26139
32
32
  },
33
33
  {
34
34
  "headers": {
35
35
  "reactNativeJsi": "324aefd8591d9ce688bce7589c4c2b516cd33ecb95d35c47239a87a8fcf6a8da"
36
36
  },
37
- "sha256": "f8fd89f680b86d8abb42a644db8866eb33ff82b4370a7c373bc054efdec33095",
38
- "size": 25395
37
+ "sha256": "adba5b074a4fc2d6c367de74f24aa4b6273363f8b39c9ad9d15be2775f08a2e1",
38
+ "size": 25394
39
39
  },
40
40
  {
41
41
  "headers": {
42
42
  "reactNativeJsi": "33596664ee7d7a6623f0796a6feb429543316c3a41b211150acda6e1d835286c"
43
43
  },
44
- "sha256": "9190e3a9f312d8c156aacf727904cf1b9c543b30833f544164daa32e3c005d84",
45
- "size": 25168
44
+ "sha256": "778f943ad7fcfba7060e2f29d2bf9d3d7365c60d09b8e2fcccfe11f95920b321",
45
+ "size": 25165
46
46
  },
47
47
  {
48
48
  "headers": {
49
49
  "reactNativeJsi": "66b2cd5a38511195207f6c8a76aba735f9b9cc66a52a0d00780ffe5d331623f7"
50
50
  },
51
- "sha256": "89bc0c5214c848b06e50424dcecf1cb0d3b01b058270d606a86c2e799d529c15",
52
- "size": 25401
51
+ "sha256": "06cdf08b6f177a54dbf734f76f23ff192c4eb50238fae5207e923fa8e0cfb4bd",
52
+ "size": 25398
53
53
  },
54
54
  {
55
55
  "headers": {
56
56
  "reactNativeJsi": "96db4e758dd53e9320cef7cad485e00aa06e7a982cefd920f17007de8a5bd9f9"
57
57
  },
58
- "sha256": "8c0d4fa4b65b44dc649c7401df0832663c837098bb5794b143751073c800e66b",
59
- "size": 26139
58
+ "sha256": "62920d91d1805ae0df3ad0f672f6405575c04df4e66948ea37b4e165f39f8eb5",
59
+ "size": 26141
60
60
  },
61
61
  {
62
62
  "headers": {
63
63
  "reactNativeJsi": "aeab590ddd1218df963462242d3954ce467b0fa88f70e91429e4ffc74d230893"
64
64
  },
65
- "sha256": "ea3395926d0c9202404ca292fed40561c04537cbc11bb8b49ac8a7d9f983fa60",
65
+ "sha256": "fab02f584e10cee2197c10b5c488873d5203313e10f07b2940283bee3ae12a57",
66
66
  "size": 26138
67
67
  },
68
68
  {
69
69
  "headers": {
70
70
  "reactNativeJsi": "b5fb260522384dd7ab07d740cdc534b529922446fcec798341c7817d9eaa49f4"
71
71
  },
72
- "sha256": "7a17d6b3e143a8cf38d73b18b21e142b40fc2c0076d7a01dfb1837194c977f43",
73
- "size": 25268
72
+ "sha256": "72bbd117ff2d4495f46fceecd0959e8bd2a0647fdf514bf2e2e95922514bcb66",
73
+ "size": 25267
74
74
  },
75
75
  {
76
76
  "headers": {
77
77
  "reactNativeJsi": "c6b391a1e870ccf7cdd534be63582862840f8245b99ebd253317deece1e6ffd5"
78
78
  },
79
- "sha256": "96f6b7bb8bd33d20ee9b6249c0f747e2d160d80515efbf74f9a263f57d847667",
80
- "size": 26142
79
+ "sha256": "10e28d5ce3eb41c695bef897fa974f8919559558a2b847963047f13ce06dc6a0",
80
+ "size": 26144
81
81
  },
82
82
  {
83
83
  "headers": {
84
84
  "reactNativeJsi": "c8270f1315745ecc204c4209a4f50f58ff6f14b4a385ad6820a69800270b53c6"
85
85
  },
86
- "sha256": "bf587717d6b32d1e7abc630e952f0c70ea964488f87e83c20028b86781317b6f",
87
- "size": 25104
86
+ "sha256": "52226df9610d8b5f9b47fee6bedbdbaa04df7f2f562213bd8b433a5f998d8aa3",
87
+ "size": 25105
88
88
  }
89
89
  ]
90
90
  }