peachsim 0.1.2238 → 0.1.2242
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.
- package/cli/bridge-flow-runner.ts +10 -9
- package/cli/commands/inspect/settling.ts +491 -506
- package/cli/commands/platform.ts +2 -0
- package/cli/drivers/playwright-provisioning.ts +160 -37
- package/cli/internal-child.ts +5 -79
- package/dist-lib/agent-daemon-client.cjs +1 -1
- package/dist-lib/agent-events.cjs +1 -1
- package/dist-lib/attached-projects.cjs +1 -1
- package/dist-lib/auth/shared-session.cjs +1 -1
- package/dist-lib/backend-origin.cjs +1 -1
- package/dist-lib/beta.cjs +1 -1
- package/dist-lib/beta.mjs +1 -1
- package/dist-lib/bridge-constants.cjs +1 -1
- package/dist-lib/bridge-contract-input.cjs +1 -1
- package/dist-lib/bridge-contract-input.mjs +1 -1
- package/dist-lib/bridge-contract.cjs +1 -1
- package/dist-lib/bridge-contract.mjs +1 -1
- package/dist-lib/bundle-channel.cjs +115 -89
- package/dist-lib/capture-contract.cjs +1 -1
- package/dist-lib/capture-contract.mjs +1 -1
- package/dist-lib/cloud-contract.cjs +1 -1
- package/dist-lib/cloud-contract.mjs +1 -1
- package/dist-lib/cloud-test-args.cjs +1 -1
- package/dist-lib/cloud-test-args.mjs +1 -1
- package/dist-lib/cloud.cjs +1 -1
- package/dist-lib/cloud.mjs +1 -1
- package/dist-lib/config.cjs +1 -1
- package/dist-lib/config.mjs +1 -1
- package/dist-lib/detox/index.cjs +494 -510
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/expo-swift-bundle.cjs +101 -75
- package/dist-lib/expo-swift-metadata.cjs +1 -1
- package/dist-lib/expo-swift-metadata.mjs +1 -1
- package/dist-lib/home-paths.cjs +1 -1
- package/dist-lib/host/bridge-host.cjs +119 -93
- package/dist-lib/host/fetch-proxy-handler.cjs +4 -4
- package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
- package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
- package/dist-lib/host/replacement-module-handler.cjs +1 -1
- package/dist-lib/host/websocket-proxy.cjs +1 -1
- package/dist-lib/index.cjs +492 -508
- package/dist-lib/jump-to-source-babel.cjs +1 -1
- package/dist-lib/jump-to-source-native.cjs +1 -1
- package/dist-lib/kotlin-host.cjs +1 -1
- package/dist-lib/menu.cjs +1 -1
- package/dist-lib/menu.mjs +1 -1
- package/dist-lib/metro-fingerprint-registry.cjs +1 -1
- package/dist-lib/metro-fingerprint-registry.mjs +1 -1
- package/dist-lib/metro-production-bundle.cjs +1 -1
- package/dist-lib/metro-production-bundle.mjs +1 -1
- package/dist-lib/metro.cjs +4 -4
- package/dist-lib/native-app-identity-project.cjs +2 -2
- package/dist-lib/native-app-identity-project.mjs +7 -8
- package/dist-lib/native-app-identity.cjs +1 -1
- package/dist-lib/native-app-identity.mjs +1 -1
- package/dist-lib/native-firebase-metadata.cjs +1 -1
- package/dist-lib/native-firebase-metadata.mjs +1 -1
- package/dist-lib/pdfium-raster.cjs +1 -1
- package/dist-lib/pdfium-raster.mjs +1 -1
- package/dist-lib/plist.cjs +1 -1
- package/dist-lib/plist.mjs +1 -1
- package/dist-lib/profiles.cjs +1 -1
- package/dist-lib/public-brand.cjs +1 -1
- package/dist-lib/public-origins-lib-esm.json +24 -24
- package/dist-lib/public-origins-lib.json +53 -53
- package/dist-lib/react-native-host-modules.cjs +1 -1
- package/dist-lib/react-native-host-modules.mjs +1 -1
- package/dist-lib/reap-browser.cjs +1 -1
- package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
- package/dist-lib/sdk.cjs +487 -503
- package/dist-lib/sdk.mjs +487 -503
- package/dist-lib/skills.cjs +1327 -1235
- package/dist-lib/swift-compile.cjs +46 -27
- package/dist-lib/swift-compile.mjs +42 -23
- package/dist-lib/swift-package.cjs +1 -1
- package/dist-lib/swift-package.mjs +1 -1
- package/dist-lib/swift-submit.cjs +2 -2
- package/dist-lib/swift-submit.mjs +2 -2
- package/dist-lib/swift-toolchain.cjs +1 -1
- package/dist-lib/swift.cjs +1 -1
- package/dist-lib/vite-swift.cjs +89 -64
- package/dist-lib/vite.cjs +4 -4
- package/dist-lib/worklet-executable.cjs +1 -1
- package/dist-lib/worklet-executable.mjs +1 -1
- package/dist-types/packages/peach-engine/src/engine/node.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/engine/secureItemHostContract.d.ts +5 -1
- package/dist-types/packages/peach-engine/src/engine/types.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/ios/chrome-metrics.d.ts +6 -0
- package/dist-types/packages/peach-engine/src/render-worker/compositor-protocol.d.ts +4 -1
- package/dist-types/packages/peach-engine/src/render-worker/webview-capture-protocol.d.ts +14 -0
- package/dist-types/packages/peach-globals/src/nativeSurfaceContract.d.ts +1 -0
- package/dist-types/packages/peach-globals/src/secure-item-store.d.ts +2 -0
- package/kotlin/sdk.tar.gz +0 -0
- package/package.json +1 -1
- package/runtime-companion.json +1 -1
- package/src/native-static-libraries.ts +20 -20
- package/src/native-swift-slices.ts +1 -0
- package/src/nitro-adapter.lock.json +253 -253
- package/src/nitro-superset.lock.json +4 -4
- package/src/swift-compile.ts +10 -3
- package/src/swift-distribution.lock.json +11 -11
- package/src/swift-host.ts +2 -1
- package/src/swift-shared-sdk.ts +10 -1
- package/src/swift-standins.ts +5 -2
- package/src/swift-submit.ts +3 -1
- package/src/swift-wasm-prune.ts +23 -14
- package/src/turbo-runtime.lock.json +22 -22
package/src/swift-shared-sdk.ts
CHANGED
|
@@ -70,7 +70,12 @@ function readULEB(b: Uint8Array, o: number): [number, number] {
|
|
|
70
70
|
return [res, p]
|
|
71
71
|
}
|
|
72
72
|
|
|
73
|
+
// public runtimes pinned to a distribution before 7eb5f6473249e4be still
|
|
74
|
+
// override preferredLocalizations in PeachFoundation-Localization.o.
|
|
73
75
|
const WEAKEN_FOUNDATION_SYMS = new Set([
|
|
76
|
+
'$s10Foundation6BundleC22preferredLocalizations4from14forPreferencesSaySSGAG_AGSgtFZ',
|
|
77
|
+
'$s10Foundation6BundleC22preferredLocalizations4fromSaySSGAF_tFZ',
|
|
78
|
+
'$s10Foundation6BundleC22preferredLocalizationsSaySSGvg',
|
|
74
79
|
'$s10Foundation16NSSortDescriptorC3key9ascendingACSSSg_SbtcfC',
|
|
75
80
|
'$s10Foundation16NSSortDescriptorC3key9ascendingACSSSg_Sbtcfc',
|
|
76
81
|
'$s10Foundation16NSSortDescriptorC3keySSSgvg',
|
|
@@ -183,7 +188,7 @@ export function weakenFoundationOverridesInArchive(arBuf: Uint8Array): void {
|
|
|
183
188
|
} else if (name.endsWith('/')) {
|
|
184
189
|
name = name.slice(0, -1)
|
|
185
190
|
}
|
|
186
|
-
if (name.endsWith('NSSortDescriptor.o')) {
|
|
191
|
+
if (name.endsWith('Bundle.o') || name.endsWith('NSSortDescriptor.o')) {
|
|
187
192
|
weakenFoundationSymbolsInWasmObj(arBuf.subarray(bodyStart, bodyEnd))
|
|
188
193
|
}
|
|
189
194
|
pos = bodyEnd + (size & 1)
|
|
@@ -258,6 +263,10 @@ export function swiftSharedSdkViewOptions(
|
|
|
258
263
|
.sort()
|
|
259
264
|
const key = JSON.stringify([
|
|
260
265
|
'v23',
|
|
266
|
+
[...WEAKEN_FOUNDATION_SYMS],
|
|
267
|
+
readULEB.toString(),
|
|
268
|
+
weakenFoundationSymbolsInWasmObj.toString(),
|
|
269
|
+
weakenFoundationOverridesInArchive.toString(),
|
|
261
270
|
toolchainBin,
|
|
262
271
|
sdk,
|
|
263
272
|
frameworks,
|
package/src/swift-standins.ts
CHANGED
|
@@ -2451,10 +2451,13 @@ export function buildRustCrate(
|
|
|
2451
2451
|
},
|
|
2452
2452
|
)
|
|
2453
2453
|
if (result.error) throw result.error
|
|
2454
|
-
if (result.status !== 0)
|
|
2454
|
+
if (result.status !== 0) {
|
|
2455
|
+
const diagnostic = path.join(work, 'build.log')
|
|
2456
|
+
fs.writeFileSync(diagnostic, `${result.stderr}\n${result.stdout}`)
|
|
2455
2457
|
throw new Error(
|
|
2456
|
-
`Rust wasm64 could not build ${path.relative(searchRoot, manifest)}: ${failure(result)}`,
|
|
2458
|
+
`Rust wasm64 could not build ${path.relative(searchRoot, manifest)}: ${failure(result)}\nfull diagnostic: ${diagnostic}`,
|
|
2457
2459
|
)
|
|
2460
|
+
}
|
|
2458
2461
|
for (const line of result.stdout.split('\n')) {
|
|
2459
2462
|
if (!line.startsWith('{')) continue
|
|
2460
2463
|
const message: unknown = JSON.parse(line)
|
package/src/swift-submit.ts
CHANGED
|
@@ -147,7 +147,9 @@ export const MAX_SWIFT_COMPILE_IMAGE_TOTAL_BYTES = 16 * 1024 * 1024
|
|
|
147
147
|
// 69: `peach.icu_item_v1` replaces `icu_data_v1`: the host fills icu's table of
|
|
148
148
|
// contents and places each item's pack the first time icu opens it.
|
|
149
149
|
// 70: full Objective-C forwarding uses exact typed IMPs (`peach.imp_forwarder_mint`).
|
|
150
|
-
|
|
150
|
+
// 71: UIImage pixels register once through `peach.bitmap_register` and
|
|
151
|
+
// `peach.bitmap_release`; trees name them `peach-bitmap:<id>`.
|
|
152
|
+
export const SWIFT_HOST_ABI = 71
|
|
151
153
|
|
|
152
154
|
export interface SwiftImageUpload {
|
|
153
155
|
/** the raster file picked for the asset (has the extension). */
|
package/src/swift-wasm-prune.ts
CHANGED
|
@@ -20,10 +20,10 @@
|
|
|
20
20
|
import { execFileSync } from 'node:child_process'
|
|
21
21
|
import { createHash } from 'node:crypto'
|
|
22
22
|
import fs from 'node:fs'
|
|
23
|
-
import os from 'node:os'
|
|
24
23
|
import path from 'node:path'
|
|
25
24
|
import * as v from 'valibot'
|
|
26
25
|
import { foundationCategoryObjects } from './swift-foundation'
|
|
26
|
+
import { swiftCacheDir, swiftFileChecksum } from './swift-toolchain'
|
|
27
27
|
import {
|
|
28
28
|
SWIFT_FRAMEWORK_PRODUCT_FILE,
|
|
29
29
|
swiftFrameworkProductSchema,
|
|
@@ -863,11 +863,6 @@ export function guestWasmSymbols(bytes: Uint8Array): {
|
|
|
863
863
|
}
|
|
864
864
|
}
|
|
865
865
|
|
|
866
|
-
function peachHome(): string {
|
|
867
|
-
const override = process.env.PEACH_HOME
|
|
868
|
-
return override ? path.resolve(override) : path.join(os.homedir(), '.peach')
|
|
869
|
-
}
|
|
870
|
-
|
|
871
866
|
function sdkObjectName(archive: string, member: string, ordinal: number): string {
|
|
872
867
|
const base = archive.replace(/\.a$/, '')
|
|
873
868
|
const suffix = ordinal > 1 ? `_${ordinal}` : ''
|
|
@@ -1018,17 +1013,22 @@ export function swiftPrunedSdkObjectOrigins(
|
|
|
1018
1013
|
}
|
|
1019
1014
|
|
|
1020
1015
|
function ensureUnpackedSdkObjects(sdkWasiDir: string): string {
|
|
1021
|
-
const
|
|
1022
|
-
|
|
1016
|
+
const archives = fs
|
|
1017
|
+
.readdirSync(sdkWasiDir)
|
|
1018
|
+
.filter((file) => file.endsWith('.a'))
|
|
1019
|
+
.sort()
|
|
1020
|
+
const hash = createHash('sha256')
|
|
1021
|
+
for (const archive of archives) {
|
|
1022
|
+
hash.update(archive + '\0')
|
|
1023
|
+
hash.update(swiftFileChecksum(path.join(sdkWasiDir, archive)))
|
|
1024
|
+
}
|
|
1025
|
+
const sdkKey = hash.digest('hex')
|
|
1026
|
+
const outDir = path.join(swiftCacheDir(), 'swift-builds', `sdk-objs-${sdkKey}`)
|
|
1023
1027
|
const stamp = path.join(outDir, '.complete')
|
|
1024
1028
|
if (fs.existsSync(stamp)) return outDir
|
|
1025
1029
|
|
|
1026
1030
|
const tmpDir = `${outDir}.${process.pid}.${Date.now()}.tmp`
|
|
1027
1031
|
fs.mkdirSync(tmpDir, { recursive: true })
|
|
1028
|
-
const archives = fs
|
|
1029
|
-
.readdirSync(sdkWasiDir)
|
|
1030
|
-
.filter((f) => f.endsWith('.a'))
|
|
1031
|
-
.sort()
|
|
1032
1032
|
for (const archive of archives) {
|
|
1033
1033
|
const members = readArMembers(
|
|
1034
1034
|
new Uint8Array(fs.readFileSync(path.join(sdkWasiDir, archive))),
|
|
@@ -1047,8 +1047,12 @@ function ensureUnpackedSdkObjects(sdkWasiDir: string): string {
|
|
|
1047
1047
|
fs.rmSync(tmpDir, { recursive: true, force: true })
|
|
1048
1048
|
return outDir
|
|
1049
1049
|
}
|
|
1050
|
-
|
|
1051
|
-
|
|
1050
|
+
try {
|
|
1051
|
+
fs.renameSync(tmpDir, outDir)
|
|
1052
|
+
} catch (error) {
|
|
1053
|
+
if (!fs.existsSync(stamp)) throw error
|
|
1054
|
+
fs.rmSync(tmpDir, { recursive: true, force: true })
|
|
1055
|
+
}
|
|
1052
1056
|
return outDir
|
|
1053
1057
|
}
|
|
1054
1058
|
|
|
@@ -1705,6 +1709,11 @@ export function pruneSwiftWasmLink(
|
|
|
1705
1709
|
}
|
|
1706
1710
|
|
|
1707
1711
|
const WEAKEN_SDK_FOUNDATION_SYMS = new Set([
|
|
1712
|
+
'$s10Foundation6BundleC22preferredLocalizations4from14forPreferencesSaySSGAG_AGSgtFZ',
|
|
1713
|
+
'$s10Foundation6BundleC22preferredLocalizations4fromSaySSGAF_tFZ',
|
|
1714
|
+
'$s10Foundation6BundleC22preferredLocalizationsSaySSGvg',
|
|
1715
|
+
'$s10Foundation6BundleC22preferredLocalizations4from14forPreferencesSaySSGAG_AGSgtFZTf4nnd_n',
|
|
1716
|
+
'$s10Foundation6BundleC22preferredLocalizations4fromSaySSGAF_tFZTf4nd_n',
|
|
1708
1717
|
'$s10Foundation16NSSortDescriptorC3key9ascendingACSSSg_SbtcfC',
|
|
1709
1718
|
'$s10Foundation16NSSortDescriptorC3key9ascendingACSSSg_Sbtcfc',
|
|
1710
1719
|
'$s10Foundation16NSSortDescriptorC3keySSSgvg',
|
|
@@ -8,11 +8,11 @@
|
|
|
8
8
|
},
|
|
9
9
|
"compiler": "swift-6.4.0-RELEASE-custom-fb42d2535739dfd2",
|
|
10
10
|
"sdk": {
|
|
11
|
-
"id": "swift-6.4.0-RELEASE_wasm-peach-
|
|
12
|
-
"checksum": "
|
|
11
|
+
"id": "swift-6.4.0-RELEASE_wasm-peach-11784d37",
|
|
12
|
+
"checksum": "2f79c08f5df1a4c36803d1555e874d37d30c39f6f5f6c03c515812a5b71d2bbf"
|
|
13
13
|
},
|
|
14
14
|
"framework": {
|
|
15
|
-
"distribution": "
|
|
15
|
+
"distribution": "7eb5f6473249e4be",
|
|
16
16
|
"wireAbi": "38eed69f6b7391584112981b7892914e7033d7e0c17c2e8d4a4448030618bd2b"
|
|
17
17
|
},
|
|
18
18
|
"archives": [
|
|
@@ -20,71 +20,71 @@
|
|
|
20
20
|
"headers": {
|
|
21
21
|
"reactNativeJsi": "0f8c2defbca69a27a848a81ae72363073bf9602fd316e57a75811be1a0528358"
|
|
22
22
|
},
|
|
23
|
-
"sha256": "
|
|
24
|
-
"size":
|
|
23
|
+
"sha256": "ec1db15c0c1cdafcfbb0d6e46b70218479e7987e46db0fecbb12e3227fb557f0",
|
|
24
|
+
"size": 26171
|
|
25
25
|
},
|
|
26
26
|
{
|
|
27
27
|
"headers": {
|
|
28
28
|
"reactNativeJsi": "21a624ea24fd17d56bf26832d496fc1177067f89640414c20e6486c7984dfb0a"
|
|
29
29
|
},
|
|
30
|
-
"sha256": "
|
|
31
|
-
"size":
|
|
30
|
+
"sha256": "27eba9bd34fbdc8c80ebfc192b31b3ee89d027d2ae9816b7ada54e3de42c3d8b",
|
|
31
|
+
"size": 26913
|
|
32
32
|
},
|
|
33
33
|
{
|
|
34
34
|
"headers": {
|
|
35
35
|
"reactNativeJsi": "324aefd8591d9ce688bce7589c4c2b516cd33ecb95d35c47239a87a8fcf6a8da"
|
|
36
36
|
},
|
|
37
|
-
"sha256": "
|
|
37
|
+
"sha256": "78831ce6c2e1fe1d164998aead5bbfc1283c31250426f6ee06311ba56551f802",
|
|
38
38
|
"size": 26167
|
|
39
39
|
},
|
|
40
40
|
{
|
|
41
41
|
"headers": {
|
|
42
42
|
"reactNativeJsi": "33596664ee7d7a6623f0796a6feb429543316c3a41b211150acda6e1d835286c"
|
|
43
43
|
},
|
|
44
|
-
"sha256": "
|
|
45
|
-
"size":
|
|
44
|
+
"sha256": "9e64875f841d719b3f2b81fc2bd459e4c293f812a60c07d8b811991d443ec97d",
|
|
45
|
+
"size": 25954
|
|
46
46
|
},
|
|
47
47
|
{
|
|
48
48
|
"headers": {
|
|
49
49
|
"reactNativeJsi": "66b2cd5a38511195207f6c8a76aba735f9b9cc66a52a0d00780ffe5d331623f7"
|
|
50
50
|
},
|
|
51
|
-
"sha256": "
|
|
52
|
-
"size":
|
|
51
|
+
"sha256": "68b2b211a2f5c2ed00497fce5e0f433ce76afa96de2cc6ba934343e6e0de06f6",
|
|
52
|
+
"size": 26168
|
|
53
53
|
},
|
|
54
54
|
{
|
|
55
55
|
"headers": {
|
|
56
56
|
"reactNativeJsi": "96db4e758dd53e9320cef7cad485e00aa06e7a982cefd920f17007de8a5bd9f9"
|
|
57
57
|
},
|
|
58
|
-
"sha256": "
|
|
59
|
-
"size":
|
|
58
|
+
"sha256": "ee90b76a0d9ccbf7056451855820bfef97f39c9b45730155a1bfa160dba85b07",
|
|
59
|
+
"size": 26910
|
|
60
60
|
},
|
|
61
61
|
{
|
|
62
62
|
"headers": {
|
|
63
63
|
"reactNativeJsi": "aeab590ddd1218df963462242d3954ce467b0fa88f70e91429e4ffc74d230893"
|
|
64
64
|
},
|
|
65
|
-
"sha256": "
|
|
66
|
-
"size":
|
|
65
|
+
"sha256": "97881f12d2e6168645984291a920961f1667a61bd9c448e546a40456a4cfe9b3",
|
|
66
|
+
"size": 26911
|
|
67
67
|
},
|
|
68
68
|
{
|
|
69
69
|
"headers": {
|
|
70
70
|
"reactNativeJsi": "b5fb260522384dd7ab07d740cdc534b529922446fcec798341c7817d9eaa49f4"
|
|
71
71
|
},
|
|
72
|
-
"sha256": "
|
|
73
|
-
"size":
|
|
72
|
+
"sha256": "e97b334fd4105e356bb3958214b52b953928828f31f35c9d273b150736530be1",
|
|
73
|
+
"size": 26045
|
|
74
74
|
},
|
|
75
75
|
{
|
|
76
76
|
"headers": {
|
|
77
77
|
"reactNativeJsi": "c6b391a1e870ccf7cdd534be63582862840f8245b99ebd253317deece1e6ffd5"
|
|
78
78
|
},
|
|
79
|
-
"sha256": "
|
|
80
|
-
"size":
|
|
79
|
+
"sha256": "3be1e1c6f5dda70945a1afb2cea67fc1093704c71e20f4eb3d344371fdfea755",
|
|
80
|
+
"size": 26911
|
|
81
81
|
},
|
|
82
82
|
{
|
|
83
83
|
"headers": {
|
|
84
84
|
"reactNativeJsi": "c8270f1315745ecc204c4209a4f50f58ff6f14b4a385ad6820a69800270b53c6"
|
|
85
85
|
},
|
|
86
|
-
"sha256": "
|
|
87
|
-
"size":
|
|
86
|
+
"sha256": "76d5af4649ecf90a32a2c25739747e08deefeebe0054a030c6bc718d872c4625",
|
|
87
|
+
"size": 25918
|
|
88
88
|
}
|
|
89
89
|
]
|
|
90
90
|
}
|