peachsim 0.1.2624 → 0.1.2627
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/commands/diagnose-native.ts +717 -0
- package/cli/commands/perf-native.ts +120 -51
- 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 +2 -2
- package/dist-lib/bridge-constants.cjs +1 -1
- package/dist-lib/bridge-contract-input.cjs +1 -1
- package/dist-lib/bridge-contract-input.mjs +5 -5
- package/dist-lib/bridge-contract.cjs +1 -1
- package/dist-lib/bridge-contract.mjs +3 -3
- package/dist-lib/bundle-channel.cjs +424 -339
- package/dist-lib/capture-contract.cjs +1 -1
- package/dist-lib/capture-contract.mjs +3 -3
- package/dist-lib/cloud-contract.cjs +1 -1
- package/dist-lib/cloud-contract.mjs +3 -3
- package/dist-lib/cloud-test-args.cjs +1 -1
- package/dist-lib/cloud-test-args.mjs +2 -2
- package/dist-lib/cloud.cjs +1 -1
- package/dist-lib/cloud.mjs +7 -7
- package/dist-lib/config.cjs +1 -1
- package/dist-lib/config.mjs +5 -5
- package/dist-lib/detox/index.cjs +1 -1
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/esm-chunks/{acorn-DH6VFUJ3.mjs → acorn-D2TBEXUS.mjs} +3 -3
- package/dist-lib/esm-chunks/{chunk-3XA5HYI5.mjs → chunk-2Z47MJY7.mjs} +9 -8
- package/dist-lib/esm-chunks/{chunk-JHMD4G4V.mjs → chunk-3Z6TOSBM.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-LD7Z3NDO.mjs → chunk-4PPBABST.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-A2WMBGJO.mjs → chunk-6KAXUVL3.mjs} +3 -3
- package/dist-lib/esm-chunks/{chunk-LOQBWIPM.mjs → chunk-7WWBP4L4.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-OLAYY7SG.mjs → chunk-AE2VDAUH.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-XONCLAVA.mjs → chunk-BF54TN4C.mjs} +21 -13
- package/dist-lib/esm-chunks/{chunk-LCO2EXKF.mjs → chunk-D26XDATF.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-LMWSFXYN.mjs → chunk-M2K2SAAV.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-LT533AHJ.mjs → chunk-MMKRGY33.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-T7C6Z5UH.mjs → chunk-N75KNJIA.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-IMI2NE4A.mjs → chunk-NFO2NQR3.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-AV7G5PTE.mjs → chunk-OKKGDF2H.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-QNXV766K.mjs → chunk-OZDM3CIC.mjs} +81 -15
- package/dist-lib/esm-chunks/{chunk-YOD53JTM.mjs → chunk-PFIQXQK2.mjs} +2 -2
- package/dist-lib/esm-chunks/{chunk-VH4BJS5V.mjs → chunk-PNMDP4NZ.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-2YHIYKY2.mjs → chunk-PZAWOGX5.mjs} +4 -4
- package/dist-lib/esm-chunks/{chunk-EFQFJ7M6.mjs → chunk-SUBMWAYT.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-QZ5HTMWV.mjs → chunk-U5CS65KA.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-UJORQHAE.mjs → chunk-UTJKHY4H.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-HKPKCJI5.mjs → chunk-VLH5JM4H.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-265THLTP.mjs → chunk-WCQX636N.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-CM2NU5MS.mjs → chunk-XTQ3XPCU.mjs} +5 -5
- package/dist-lib/esm-chunks/{chunk-N4ZJZUCO.mjs → chunk-ZSEZ76MX.mjs} +1 -1
- package/dist-lib/esm-chunks/{metro-layout-parser-MDVTDJ65.mjs → metro-layout-parser-XZK47I2X.mjs} +3 -3
- package/dist-lib/esm-chunks/{swift-package-prebuilt-ZN7I4FYC.mjs → swift-package-prebuilt-G2TXZCDX.mjs} +12 -12
- package/dist-lib/esm-chunks/{swift-sdk-app-module-DUVE2OXH.mjs → swift-sdk-app-module-E47CAEFE.mjs} +16 -16
- package/dist-lib/esm-chunks/{swift-sdk-image-YSWQBCYV.mjs → swift-sdk-image-F4JLUOXQ.mjs} +16 -18
- package/dist-lib/esm-chunks/{swift-sdk-image-producer-MZ235WSK.mjs → swift-sdk-image-producer-4GDVFOQZ.mjs} +5 -5
- package/dist-lib/expo-swift-bundle.cjs +325 -240
- package/dist-lib/expo-swift-metadata.cjs +1 -1
- package/dist-lib/expo-swift-metadata.mjs +7 -7
- package/dist-lib/home-paths.cjs +1 -1
- package/dist-lib/host/bridge-host.cjs +489 -378
- package/dist-lib/host/fetch-proxy-handler.cjs +76 -8
- package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
- package/dist-lib/host/fetch-proxy-overrides.mjs +2 -2
- package/dist-lib/host/replacement-module-handler.cjs +1 -1
- package/dist-lib/host/websocket-proxy.cjs +1 -1
- package/dist-lib/index.cjs +1 -1
- package/dist-lib/kotlin-host.cjs +1 -1
- package/dist-lib/menu.cjs +1 -1
- package/dist-lib/menu.mjs +3 -3
- package/dist-lib/metro-fingerprint-registry.cjs +1 -1
- package/dist-lib/metro-fingerprint-registry.mjs +3 -3
- package/dist-lib/metro-production-bundle.cjs +1 -1
- package/dist-lib/metro-production-bundle.mjs +4 -4
- package/dist-lib/native-app-identity-project.cjs +4 -3
- package/dist-lib/native-app-identity-project.mjs +15 -15
- package/dist-lib/native-app-identity.cjs +1 -1
- package/dist-lib/native-app-identity.mjs +6 -6
- package/dist-lib/native-firebase-metadata.cjs +1 -1
- package/dist-lib/native-firebase-metadata.mjs +3 -3
- package/dist-lib/pdfium-raster.cjs +1 -1
- package/dist-lib/pdfium-raster.mjs +2 -2
- package/dist-lib/plist.cjs +1 -1
- package/dist-lib/plist.mjs +3 -3
- package/dist-lib/profiles.cjs +1 -1
- package/dist-lib/public-brand.cjs +1 -1
- package/dist-lib/public-origins-lib-esm.json +87 -86
- package/dist-lib/public-origins-lib.json +69 -64
- package/dist-lib/react-native-host-modules.cjs +1 -1
- package/dist-lib/react-native-host-modules.mjs +2 -2
- package/dist-lib/reap-browser.cjs +1 -1
- package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
- package/dist-lib/sdk.cjs +1 -1
- package/dist-lib/sdk.mjs +8 -8
- package/dist-lib/skills.cjs +526 -415
- package/dist-lib/swift-compile.cjs +142 -62
- package/dist-lib/swift-compile.mjs +12 -12
- package/dist-lib/swift-package.cjs +1 -1
- package/dist-lib/swift-package.mjs +3 -3
- package/dist-lib/swift-submit.cjs +1 -1
- package/dist-lib/swift-submit.mjs +6 -6
- package/dist-lib/swift-svg-raster.cjs +1 -1
- package/dist-lib/swift-svg-raster.mjs +2 -2
- package/dist-lib/swift-toolchain.cjs +1 -1
- package/dist-lib/swift.cjs +1 -1
- package/dist-lib/vendor/@peculiar/x509.cjs +1 -1
- package/dist-lib/vendor/@ruby/prism/src/nodes.js.cjs +1 -1
- package/dist-lib/vendor/@ruby/prism/src/parsePrism.js.cjs +1 -1
- package/dist-lib/vendor/acorn.cjs +1 -1
- package/dist-lib/vendor/magic-string.cjs +1 -1
- package/dist-lib/vendor/stream-json.cjs +1 -1
- package/dist-lib/vendor/sucrase/dist/index.js.cjs +1 -1
- package/dist-lib/vendor/sucrase/dist/parser/index.js.cjs +1 -1
- package/dist-lib/vendor/sucrase/dist/parser/tokenizer/index.js.cjs +1 -1
- package/dist-lib/vendor/sucrase/dist/parser/tokenizer/types.js.cjs +1 -1
- package/dist-lib/vendor/sucrase.cjs +1 -1
- package/dist-lib/vendor/terser.cjs +1 -1
- package/dist-lib/vendor/valibot.cjs +1 -1
- package/dist-lib/vendor/ws.cjs +1 -1
- package/dist-lib/vendor/zod.cjs +1 -1
- package/dist-lib/worklet-executable.cjs +1 -1
- package/dist-lib/worklet-executable.mjs +3 -3
- package/kotlin/sdk.tar.gz +0 -0
- package/package.json +1 -1
- package/src/native-package-slice-build.ts +28 -4
- package/src/one-native-controls-package.ts +61 -35
- package/src/react-native-core-build.ts +12 -12
- package/src/react-native-core.ts +3 -7
- package/src/swift-compiler-digest.ts +37 -10
- package/src/swift-distribution-contract.ts +6 -1
- package/src/swift-distribution.lock.json +4 -2
- package/src/swift-sdk-image-recipe.ts +20 -0
- package/src/swift-sdk-image.ts +2 -4
|
@@ -67,18 +67,45 @@ export const SWIFT_DIGEST_SOURCES = [
|
|
|
67
67
|
'swift-objc-sdk.ts',
|
|
68
68
|
]
|
|
69
69
|
|
|
70
|
-
//
|
|
71
|
-
const
|
|
70
|
+
// these sources run after link-only builds have emitted their static objects.
|
|
71
|
+
const LINKED_IMAGE_SOURCES = new Set([
|
|
72
|
+
'binaryen.lock.json',
|
|
73
|
+
'swift-sdk-app-module.ts',
|
|
74
|
+
'swift-sdk-image.ts',
|
|
75
|
+
'wasm-optimize.ts',
|
|
76
|
+
])
|
|
77
|
+
export const SWIFT_ARCHIVE_DIGEST_SOURCES = SWIFT_DIGEST_SOURCES.filter(
|
|
78
|
+
(file) => !LINKED_IMAGE_SOURCES.has(file),
|
|
79
|
+
)
|
|
80
|
+
|
|
81
|
+
const digests = new Map<string, { image: string; archive: string }>()
|
|
72
82
|
|
|
73
|
-
export function swiftCompilerSourceDigest(
|
|
83
|
+
export function swiftCompilerSourceDigest(
|
|
84
|
+
srcDir: string,
|
|
85
|
+
output: 'image' | 'archive' = 'image',
|
|
86
|
+
): string {
|
|
74
87
|
const known = digests.get(srcDir)
|
|
75
|
-
if (known
|
|
76
|
-
const
|
|
88
|
+
if (known) return known[output]
|
|
89
|
+
const image = createHash('sha256')
|
|
90
|
+
const archive = createHash('sha256')
|
|
77
91
|
for (const file of SWIFT_DIGEST_SOURCES) {
|
|
78
|
-
|
|
92
|
+
const bytes = readFileSync(path.join(srcDir, file))
|
|
93
|
+
image.update(bytes)
|
|
94
|
+
if (!LINKED_IMAGE_SOURCES.has(file)) archive.update(bytes)
|
|
79
95
|
}
|
|
80
|
-
|
|
81
|
-
const
|
|
82
|
-
|
|
83
|
-
|
|
96
|
+
const sdk = JSON.stringify(readIosSdkTree(path.join(srcDir, '..', 'sdk', 'ios')))
|
|
97
|
+
const result = {
|
|
98
|
+
image: image.update(sdk).digest('hex'),
|
|
99
|
+
archive: archive.update(sdk).digest('hex'),
|
|
100
|
+
}
|
|
101
|
+
digests.set(srcDir, result)
|
|
102
|
+
return result[output]
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
declare const __SWIFT_ARCHIVE_COMPILER_DIGEST__: string | undefined
|
|
106
|
+
|
|
107
|
+
export function swiftArchiveCompilerDigestValue(): string {
|
|
108
|
+
return typeof __SWIFT_ARCHIVE_COMPILER_DIGEST__ === 'string'
|
|
109
|
+
? __SWIFT_ARCHIVE_COMPILER_DIGEST__
|
|
110
|
+
: swiftCompilerSourceDigest(import.meta.dirname, 'archive')
|
|
84
111
|
}
|
|
@@ -57,6 +57,8 @@ export interface SwiftSdkRuntimePublication {
|
|
|
57
57
|
url: string
|
|
58
58
|
/** the startup module's SDK data plan, stored beside it under this digest. */
|
|
59
59
|
dataPlan?: string
|
|
60
|
+
/** SWIFT_SDK_IMAGE_RECIPE of the image keys it was published for. */
|
|
61
|
+
recipe?: string
|
|
60
62
|
}
|
|
61
63
|
|
|
62
64
|
/** the published archives one CLI build installs, committed beside this file. */
|
|
@@ -150,13 +152,16 @@ export function parseSwiftDistributionLock(value: unknown): SwiftDistributionLoc
|
|
|
150
152
|
) ||
|
|
151
153
|
(runtime.dataPlan !== undefined &&
|
|
152
154
|
(typeof runtime.dataPlan !== 'string' ||
|
|
153
|
-
!/^[a-f0-9]{64}$/.test(runtime.dataPlan)))
|
|
155
|
+
!/^[a-f0-9]{64}$/.test(runtime.dataPlan))) ||
|
|
156
|
+
(runtime.recipe !== undefined &&
|
|
157
|
+
(typeof runtime.recipe !== 'string' || !/^[a-f0-9]{16}$/.test(runtime.recipe)))
|
|
154
158
|
)
|
|
155
159
|
throw new Error('invalid shared SDK runtime publication in Swift distribution lock')
|
|
156
160
|
return {
|
|
157
161
|
source: runtime.source,
|
|
158
162
|
url: runtime.url,
|
|
159
163
|
...(runtime.dataPlan && { dataPlan: runtime.dataPlan }),
|
|
164
|
+
...(runtime.recipe && { recipe: runtime.recipe }),
|
|
160
165
|
}
|
|
161
166
|
}
|
|
162
167
|
const sdkRuntime = publication(value.sdkRuntime)
|
|
@@ -268,11 +268,13 @@
|
|
|
268
268
|
"sdkRuntime": {
|
|
269
269
|
"source": "b5e6ec52f2145c015849bbce6f01f05fbd198865ceb8f105c7d7bdb550c05d16",
|
|
270
270
|
"url": "https://contrast.dev/compile/asset/948e0531a049f9d644081d7b429dd993c2675b565aa4b2235339b05f6f27f044",
|
|
271
|
-
"dataPlan": "5f61114460c91def13fcc29d2572cfd6e71676771b522aa6ba06a8e4956698c9"
|
|
271
|
+
"dataPlan": "5f61114460c91def13fcc29d2572cfd6e71676771b522aa6ba06a8e4956698c9",
|
|
272
|
+
"recipe": "508824f6793f832a"
|
|
272
273
|
},
|
|
273
274
|
"sdkGuestRuntime": {
|
|
274
275
|
"source": "27bdb321ddbb93d92ec9b494b6c557bf557d24d930f968b90b7dd68f4cc9ada1",
|
|
275
276
|
"url": "https://contrast.dev/compile/asset/7dc3baaa584e6011c389d5f3ca9c327dd79bd9ac90c85b1169cf0f6cfb99effa",
|
|
276
|
-
"dataPlan": "d73b2fa3ffa6b0b6462b610b02d501e899b062113d961a6ed43d3030013e135c"
|
|
277
|
+
"dataPlan": "d73b2fa3ffa6b0b6462b610b02d501e899b062113d961a6ed43d3030013e135c",
|
|
278
|
+
"recipe": "508824f6793f832a"
|
|
277
279
|
}
|
|
278
280
|
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { createHash } from 'node:crypto'
|
|
2
|
+
import { WASM_LOWER_IDENTITY } from './wasm-optimize'
|
|
3
|
+
|
|
4
|
+
/** bump for changes to the sdk link recipe, interface or manifest. */
|
|
5
|
+
export const SWIFT_SDK_IMAGE_VERSION = 13
|
|
6
|
+
|
|
7
|
+
export const swiftSdkImageScope = (scopedLookups: boolean) =>
|
|
8
|
+
scopedLookups ? 'guest image scopes 9\n' : 'unscoped constructor order 1\n'
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* the part of every sdk image key that the distribution does not supply. a change
|
|
12
|
+
* re-keys every published image, so the lock's startup pins record it.
|
|
13
|
+
*/
|
|
14
|
+
export const SWIFT_SDK_IMAGE_RECIPE = createHash('sha256')
|
|
15
|
+
.update(`swift-sdk-image\n${SWIFT_SDK_IMAGE_VERSION}\n`)
|
|
16
|
+
.update(WASM_LOWER_IDENTITY)
|
|
17
|
+
.update(swiftSdkImageScope(false))
|
|
18
|
+
.update(swiftSdkImageScope(true))
|
|
19
|
+
.digest('hex')
|
|
20
|
+
.slice(0, 16)
|
package/src/swift-sdk-image.ts
CHANGED
|
@@ -27,6 +27,7 @@ import { SDK_DYLD_RESOLVER, type GuestImageObject } from './swift-guest-image-le
|
|
|
27
27
|
import { withSwiftRootLock } from './swift-root-lock'
|
|
28
28
|
import { swiftSdkGuestLookups } from './swift-sdk-guest-lookups'
|
|
29
29
|
import { chunkKey, readWasmLinkMap, type WasmLinkMap } from './swift-sdk-image-map'
|
|
30
|
+
import { SWIFT_SDK_IMAGE_VERSION, swiftSdkImageScope } from './swift-sdk-image-recipe'
|
|
30
31
|
import {
|
|
31
32
|
codeOnlySdkImage,
|
|
32
33
|
constructorKeys,
|
|
@@ -52,9 +53,6 @@ import type { SwiftDistributionWasm } from './swift-distribution-contract'
|
|
|
52
53
|
|
|
53
54
|
const run = promisify(execFile)
|
|
54
55
|
|
|
55
|
-
/** bump for changes to the sdk link recipe, interface or manifest. */
|
|
56
|
-
export const SWIFT_SDK_IMAGE_VERSION = 13
|
|
57
|
-
|
|
58
56
|
// the app owns memory between the main stack and the sdk; libc's heap follows both.
|
|
59
57
|
export const SWIFT_SDK_APP_MEMORY_BASE = 8372224
|
|
60
58
|
export const SWIFT_SDK_MEMORY_BASE = 128 * 1024 * 1024
|
|
@@ -184,7 +182,7 @@ export function swiftSdkImageKey(
|
|
|
184
182
|
.update(`swift-sdk-image\n${SWIFT_SDK_IMAGE_VERSION}\n`)
|
|
185
183
|
.update(WASM_LOWER_IDENTITY)
|
|
186
184
|
.update(KEEP_WASM_NAMES ? '\nnames\n' : '\n')
|
|
187
|
-
.update(scopedLookups
|
|
185
|
+
.update(swiftSdkImageScope(scopedLookups))
|
|
188
186
|
.update(inputs)
|
|
189
187
|
.update(products.length === 0 ? '' : `\nproducts ${products.join(' ')}`)
|
|
190
188
|
.digest('hex')
|