peachsim 0.1.1728 → 0.1.1738
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/control.ts +1 -0
- package/cli/commands/coverage-swift.ts +112 -4
- package/cli/commands/package.ts +11 -1
- package/cli/commands/shell-url.ts +4 -0
- package/cli/scene-video.ts +24 -7
- package/detox/index.ts +9 -1
- package/dist-lib/agent-daemon-client.cjs +1 -1
- package/dist-lib/agent-events.cjs +1 -1
- package/dist-lib/attached-projects.cjs +5 -2
- package/dist-lib/auth/shared-session.cjs +5 -2
- 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 +3592 -1918
- 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 +13 -5
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/expo-swift-bundle.cjs +1329 -1022
- package/dist-lib/expo-swift-metadata.cjs +2 -2
- package/dist-lib/expo-swift-metadata.mjs +2 -2
- package/dist-lib/home-paths.cjs +7 -2
- package/dist-lib/host/bridge-host.cjs +3773 -2149
- package/dist-lib/host/fetch-proxy-handler.cjs +16 -5
- 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 +97 -68
- 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 +209 -32
- package/dist-lib/menu.cjs +7 -1
- package/dist-lib/menu.mjs +7 -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 +93 -65
- package/dist-lib/native-app-identity-project.cjs +37 -31
- package/dist-lib/native-app-identity-project.mjs +37 -31
- 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/plist.cjs +1 -1
- package/dist-lib/plist.mjs +1 -1
- package/dist-lib/profiles.cjs +5 -2
- package/dist-lib/public-brand.cjs +1 -1
- package/dist-lib/public-origins-lib-esm.json +23 -23
- package/dist-lib/public-origins-lib.json +79 -53
- package/dist-lib/react-native-host-modules.cjs +5 -2
- package/dist-lib/react-native-host-modules.mjs +5 -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 +1 -1
- package/dist-lib/skills.cjs +4486 -2789
- package/dist-lib/swift-compile.cjs +53 -60
- package/dist-lib/swift-compile.mjs +52 -60
- 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 +17 -17
- package/dist-lib/swift.cjs +1 -1
- package/dist-lib/vite-swift.cjs +1056 -870
- package/dist-lib/vite.cjs +20 -8
- package/dist-lib/worklet-executable.cjs +1 -1
- package/dist-lib/worklet-executable.mjs +1 -1
- package/dist-types/packages/peach-engine/src/engine/font-config.d.ts +7 -4
- package/dist-types/packages/peach-engine/src/engine/image-loader.d.ts +2 -1
- package/dist-types/packages/peach-engine/src/engine/liquid-glass.d.ts +0 -5
- package/dist-types/packages/peach-engine/src/engine/memory-counts.d.ts +8 -0
- package/dist-types/packages/peach-engine/src/engine/node.d.ts +4 -1
- package/dist-types/packages/peach-engine/src/engine/render-damage.d.ts +2 -2
- package/dist-types/packages/peach-engine/src/engine/text-first-baseline.d.ts +5 -0
- package/dist-types/packages/peach-engine/src/engine/text-paragraph.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/native-preview-bundle.d.ts +2 -0
- package/dist-types/packages/peach-engine/src/render-worker/protocol.d.ts +7 -2
- package/dist-types/packages/peach-engine/src/render-worker/shell-protocol.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/render-worker/worklet-runtime.d.ts +13 -1
- package/dist-types/packages/peach-kit/src/capabilities.d.ts +1 -0
- package/kotlin/README.md +3 -0
- package/kotlin/sdk.tar.gz +0 -0
- package/package.json +1 -1
- package/runtime-companion.json +1 -1
- package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/ACAccount.h +55 -0
- package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/ACAccountCredential.h +35 -0
- package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/ACAccountStore.h +94 -0
- package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/ACAccountType.h +53 -0
- package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/ACError.h +37 -0
- package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/Accounts.h +13 -0
- package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/AccountsDefines.h +13 -0
- package/sdk/ios/System/Library/Frameworks/Accounts.framework/Modules/module.modulemap +5 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.h +1 -1
- package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes +58 -3
- package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h +636 -37
- package/sdk/ios/usr/include/os/signpost.h +414 -0
- package/sdk/ios/usr/include/os.modulemap +5 -0
- package/sdk/ios/wasm/include/errno.h +4 -20
- package/sdk/ios/wasm/include/pthread.h +3 -0
- package/sdk/ios/wasm/include/setjmp.h +57 -0
- package/sdk/ios/wasm/include/sys/resource.h +2 -2
- package/sdk/native-hashes.json +3 -3
- package/skills/peach-debug/SKILL.md +0 -1
- package/skills/peach-perf/SKILL.md +0 -1
- package/skills/peach-setup/SKILL.md +0 -1
- package/skills/peach-test/SKILL.md +0 -1
- package/skills/peach-visual/SKILL.md +0 -1
- package/src/android-autolinking.ts +1 -0
- package/src/android-bridge-packages.ts +279 -0
- package/src/appPackageContract.ts +2 -0
- package/src/bundle-channel.mjs +20 -2
- package/src/cli-runtime.ts +9 -5
- package/src/expo-discovery-cache.ts +7 -3
- package/src/expo-kotlin-host.ts +97 -26
- package/src/expo-native-workspace.ts +135 -40
- package/src/expo-swift-host.ts +93 -20
- package/src/expo-swift-ready.ts +5 -1
- package/src/expoKotlinContract.ts +12 -2
- package/src/expoSwiftContract.ts +9 -2
- package/src/generated/swift-c-predefines.json +1 -1
- package/src/home-paths.ts +6 -1
- package/src/host/bridge-host.ts +5 -0
- package/src/host/fetch-proxy-handler.ts +10 -0
- package/src/kotlin-host.ts +204 -30
- package/src/kotlinSdkContract.ts +2 -1
- package/src/menu.ts +7 -0
- package/src/native-prebuilt.ts +154 -0
- package/src/nitro-adapter.lock.json +251 -251
- package/src/nitro-adapter.ts +56 -50
- package/src/nitro-bundle.ts +84 -74
- package/src/nitro-compile.ts +10 -5
- package/src/nitro-dependencies.ts +43 -28
- package/src/nitro-source.ts +60 -26
- package/src/nitroAdapterContract.ts +146 -98
- package/src/nitroContract.ts +64 -21
- package/src/react-native-bridge-modules.ts +2 -0
- package/src/react-native-host-modules.ts +4 -1
- package/src/settingsContract.ts +11 -0
- package/src/storageSnapshotContract.ts +29 -81
- package/src/swift-compile.ts +49 -50
- package/src/swift-coverage/indexdump.ts +22 -6
- package/src/swift-coverage/indexing.ts +4 -4
- package/src/swift-coverage/sdk.ts +104 -20
- package/src/swift-coverage/types.ts +34 -0
- package/src/swift-coverage/xcode.ts +9 -1
- package/src/swift-distribution.lock.json +15 -12
- package/src/swift-host.ts +3 -0
- package/src/swift-standin-emit.ts +6 -1
- package/src/swift-standins.ts +172 -10
- package/src/swift-submit.ts +5 -1
- package/src/swift-toolchain.ts +16 -16
- package/src/turbo-bundle.ts +81 -0
- package/src/turbo-compile.ts +120 -0
- package/src/turbo-runtime.lock.json +69 -0
- package/src/turbo-source.ts +754 -0
- package/src/vite-plugin-one.ts +4 -3
package/cli/commands/control.ts
CHANGED
|
@@ -9,8 +9,15 @@ import { loadSwiftSdkInventoryFragment } from '../../../peach-compat/src/capabil
|
|
|
9
9
|
import { swiftSdkIdentity } from '../../src/swift-coverage/indexing'
|
|
10
10
|
import { indexSwiftPackage } from '../../src/swift-coverage/package'
|
|
11
11
|
import { buildSwiftIndexReader } from '../../src/swift-coverage/reader'
|
|
12
|
-
import {
|
|
12
|
+
import {
|
|
13
|
+
readSwiftSdkPeachStates,
|
|
14
|
+
readSwiftSdkSymbolCache,
|
|
15
|
+
} from '../../src/swift-coverage/sdk'
|
|
13
16
|
import { resolveSwiftFrontDoors } from '../../src/swift-coverage/source'
|
|
17
|
+
import {
|
|
18
|
+
SWIFT_SDK_LEDGER_STATES,
|
|
19
|
+
SWIFT_SDK_PEACH_STATES,
|
|
20
|
+
} from '../../src/swift-coverage/types'
|
|
14
21
|
import { indexSwiftXcodeApp, xcodeMetadataFiles } from '../../src/swift-coverage/xcode'
|
|
15
22
|
import { swiftTargetDependencyModules } from '../../src/swift-coverage/xcode-packages'
|
|
16
23
|
import { localPackageModules } from '../../src/swift-coverage/xcode-packages'
|
|
@@ -306,8 +313,77 @@ async function swiftSdkReach(
|
|
|
306
313
|
VERIFIED_SURFACES.flatMap<VerifiedFeature>((surface) => surface.features),
|
|
307
314
|
tools.sdkSymbols,
|
|
308
315
|
)
|
|
309
|
-
const
|
|
316
|
+
const data = await verifiedFeatureCellData()
|
|
317
|
+
const cells = reachedFeatureCells(data, reach.features)
|
|
310
318
|
const states = cells.flatMap((feature) => feature.cells.map((cell) => cell.state))
|
|
319
|
+
// each site's verified sdk state from the embedded ledger: the strongest
|
|
320
|
+
// state of the doors it reaches in a measured module, unverified when it
|
|
321
|
+
// has none, and null outside the measured modules
|
|
322
|
+
const ledgerMatched = data.sdk.sdk.fingerprint === tools.sdkFingerprint
|
|
323
|
+
const ledger = new Map(
|
|
324
|
+
data.sdk.symbols.map(([module, usr, state]) => [`swift:${module}:${usr}`, state]),
|
|
325
|
+
)
|
|
326
|
+
const measured = (door: string) =>
|
|
327
|
+
data.sdk.modules.includes(
|
|
328
|
+
door.slice('swift:'.length, door.indexOf(':', 'swift:'.length)),
|
|
329
|
+
)
|
|
330
|
+
// what Peach has for each door, from the sdk-states cache swift:yet writes
|
|
331
|
+
// on a host that runs it; elsewhere Peach states stay unknown
|
|
332
|
+
let peachStates: Map<string, string> | null = null
|
|
333
|
+
let peachUnknown: string | null = null
|
|
334
|
+
try {
|
|
335
|
+
peachStates = new Map(
|
|
336
|
+
readSwiftSdkPeachStates(tools.sdkFingerprint).symbols.map(
|
|
337
|
+
([module, usr, state]) => [`swift:${module}:${usr}`, state],
|
|
338
|
+
),
|
|
339
|
+
)
|
|
340
|
+
} catch (error) {
|
|
341
|
+
peachUnknown = `${error instanceof Error ? error.message : error}; Peach SDK states remain unknown.`
|
|
342
|
+
}
|
|
343
|
+
const strongest = <State extends string>(
|
|
344
|
+
states: readonly State[],
|
|
345
|
+
doors: string[],
|
|
346
|
+
of: Map<string, string>,
|
|
347
|
+
) => states.find((state) => doors.some((door) => of.get(door) === state)) ?? null
|
|
348
|
+
const sites = reach.sites.map((site) => {
|
|
349
|
+
const verifiedState =
|
|
350
|
+
ledgerMatched && site.frontDoorIds.some(measured)
|
|
351
|
+
? (strongest(SWIFT_SDK_LEDGER_STATES, site.frontDoorIds, ledger) ?? 'unverified')
|
|
352
|
+
: null
|
|
353
|
+
const peachState = peachStates
|
|
354
|
+
? strongest(SWIFT_SDK_PEACH_STATES, site.frontDoorIds, peachStates)
|
|
355
|
+
: null
|
|
356
|
+
return {
|
|
357
|
+
...site,
|
|
358
|
+
verifiedState,
|
|
359
|
+
peachState,
|
|
360
|
+
// the verified evidence when there is any, else what Peach has
|
|
361
|
+
sdkState:
|
|
362
|
+
verifiedState !== null && verifiedState !== 'unverified'
|
|
363
|
+
? verifiedState
|
|
364
|
+
: (peachState ?? verifiedState),
|
|
365
|
+
}
|
|
366
|
+
})
|
|
367
|
+
const countBy = (
|
|
368
|
+
states: readonly string[],
|
|
369
|
+
pick: (site: (typeof sites)[number]) => string | null,
|
|
370
|
+
) =>
|
|
371
|
+
Object.fromEntries(
|
|
372
|
+
states.map((state) => {
|
|
373
|
+
const reached = sites.filter((site) => pick(site) === state)
|
|
374
|
+
return [
|
|
375
|
+
state,
|
|
376
|
+
{
|
|
377
|
+
symbols: new Set(reached.map((site) => site.usr)).size,
|
|
378
|
+
sites: reached.length,
|
|
379
|
+
},
|
|
380
|
+
]
|
|
381
|
+
}),
|
|
382
|
+
)
|
|
383
|
+
const verifiedStates = countBy(
|
|
384
|
+
[...SWIFT_SDK_LEDGER_STATES, 'unverified'],
|
|
385
|
+
(site) => site.verifiedState,
|
|
386
|
+
)
|
|
311
387
|
return {
|
|
312
388
|
summary: {
|
|
313
389
|
symbolicReferences: index.sites.length,
|
|
@@ -324,6 +400,15 @@ async function swiftSdkReach(
|
|
|
324
400
|
},
|
|
325
401
|
mapped: null,
|
|
326
402
|
verified: null,
|
|
403
|
+
verifiedSdk: ledgerMatched
|
|
404
|
+
? { modules: data.sdk.modules, states: verifiedStates }
|
|
405
|
+
: null,
|
|
406
|
+
sdkStates: peachStates
|
|
407
|
+
? countBy(
|
|
408
|
+
[...SWIFT_SDK_LEDGER_STATES, ...SWIFT_SDK_PEACH_STATES, 'unverified'],
|
|
409
|
+
(site) => site.sdkState,
|
|
410
|
+
)
|
|
411
|
+
: null,
|
|
327
412
|
},
|
|
328
413
|
sdk: {
|
|
329
414
|
...tools.sdkIdentity,
|
|
@@ -332,13 +417,19 @@ async function swiftSdkReach(
|
|
|
332
417
|
},
|
|
333
418
|
possibleFeatures: reach.features,
|
|
334
419
|
features: cells,
|
|
335
|
-
index: { ...index, sites
|
|
420
|
+
index: { ...index, sites },
|
|
336
421
|
unknowns: [
|
|
337
422
|
...(reach.sdkMatched
|
|
338
423
|
? []
|
|
339
424
|
: [
|
|
340
425
|
'The installed SDK build and compiler do not match the retained Swift SDK inventory; all front doors remain unknown.',
|
|
341
426
|
]),
|
|
427
|
+
...(ledgerMatched
|
|
428
|
+
? []
|
|
429
|
+
: [
|
|
430
|
+
`The installed SDK build and compiler do not match the verified SDK ledger (${data.sdk.sdk.version}); verified SDK states remain unknown.`,
|
|
431
|
+
]),
|
|
432
|
+
...(peachUnknown ? [peachUnknown] : []),
|
|
342
433
|
],
|
|
343
434
|
}
|
|
344
435
|
}
|
|
@@ -401,7 +492,24 @@ export async function runSwiftCoverage(
|
|
|
401
492
|
console.log(
|
|
402
493
|
`SDK front doors: ${report.summary.frontDoors}; possible features: ${report.summary.possibleFeatures}. Mapped and verified shares: unknown.`,
|
|
403
494
|
)
|
|
404
|
-
const { cells } = report.summary
|
|
495
|
+
const { cells, verifiedSdk, sdkStates } = report.summary
|
|
496
|
+
if (verifiedSdk)
|
|
497
|
+
console.log(
|
|
498
|
+
`Verified SDK states (${verifiedSdk.modules.join(', ')}), symbols at sites: ${Object.entries(
|
|
499
|
+
verifiedSdk.states,
|
|
500
|
+
)
|
|
501
|
+
.map(([state, count]) => `${count.symbols} ${state} at ${count.sites}`)
|
|
502
|
+
.join(', ')}.`,
|
|
503
|
+
)
|
|
504
|
+
if (sdkStates)
|
|
505
|
+
console.log(
|
|
506
|
+
`SDK states, verified evidence first and then what Peach has, symbols at sites: ${Object.entries(
|
|
507
|
+
sdkStates,
|
|
508
|
+
)
|
|
509
|
+
.filter(([, count]) => count.sites > 0)
|
|
510
|
+
.map(([state, count]) => `${count.symbols} ${state} at ${count.sites}`)
|
|
511
|
+
.join(', ')}.`,
|
|
512
|
+
)
|
|
405
513
|
if (cells)
|
|
406
514
|
console.log(
|
|
407
515
|
`Cells of the possible features: ${cells.verified} verified, ${cells.failing} failing, ${cells.unknown} unknown.`,
|
package/cli/commands/package.ts
CHANGED
|
@@ -32,7 +32,7 @@ import { readInstalledNativePackageVersionsAsync } from '../../src/installed-pac
|
|
|
32
32
|
import { isRecord } from '../../src/is-record'
|
|
33
33
|
import { readNativeAppIdentityFromProject } from '../../src/native-app-identity-project'
|
|
34
34
|
import { readExpoConfigAsync } from '../../src/native-firebase-config'
|
|
35
|
-
import { insertNitroFooter } from '../../src/nitroContract'
|
|
35
|
+
import { insertNitroFooter, insertTurboFooter } from '../../src/nitroContract'
|
|
36
36
|
import {
|
|
37
37
|
insertPackageVersionsFooter,
|
|
38
38
|
readPackageVersions,
|
|
@@ -289,6 +289,7 @@ export async function runPackage(args: string[]): Promise<void> {
|
|
|
289
289
|
source = detachBundleGlobalFooter(source, '__peachExpoSwift').source
|
|
290
290
|
source = detachBundleGlobalFooter(source, '__peachExpoKotlin').source
|
|
291
291
|
source = stripBundleMetadataFooter(source, 'nitro')
|
|
292
|
+
source = stripBundleMetadataFooter(source, 'turbo')
|
|
292
293
|
if (channel.platform === 'android') {
|
|
293
294
|
const native = await (
|
|
294
295
|
await import('../../src/expo-kotlin-bundle')
|
|
@@ -315,6 +316,14 @@ export async function runPackage(args: string[]): Promise<void> {
|
|
|
315
316
|
route('/' + asset.path, asset.bytes, asset.contentType)
|
|
316
317
|
source = insertNitroFooter(source, nitro.metadata)
|
|
317
318
|
}
|
|
319
|
+
const turbo = await (
|
|
320
|
+
await import('../../src/turbo-bundle')
|
|
321
|
+
).buildTurboBundle(root)
|
|
322
|
+
if (turbo) {
|
|
323
|
+
for (const asset of turbo.assets)
|
|
324
|
+
route('/' + asset.path, asset.bytes, asset.contentType)
|
|
325
|
+
source = insertTurboFooter(source, turbo.metadata)
|
|
326
|
+
}
|
|
318
327
|
}
|
|
319
328
|
source = await produceConfiguredBundle(
|
|
320
329
|
source,
|
|
@@ -325,6 +334,7 @@ export async function runPackage(args: string[]): Promise<void> {
|
|
|
325
334
|
visit(channel.expoSwift)
|
|
326
335
|
visit(channel.expoKotlin)
|
|
327
336
|
visit(channel.nitro)
|
|
337
|
+
visit(channel.turbo)
|
|
328
338
|
}
|
|
329
339
|
for (const descriptor of extractAssetDescriptors(source)) {
|
|
330
340
|
if (!descriptor.httpServerLocation) continue
|
|
@@ -797,6 +797,10 @@ export async function buildShellUrl(
|
|
|
797
797
|
'nitro',
|
|
798
798
|
`${nativeAssetOrigin}/__peach/nitro?root=${encodeURIComponent(expoRoot)}`,
|
|
799
799
|
)
|
|
800
|
+
expoStamped.searchParams.set(
|
|
801
|
+
'turbo',
|
|
802
|
+
`${nativeAssetOrigin}/__peach/turbo?root=${encodeURIComponent(expoRoot)}`,
|
|
803
|
+
)
|
|
800
804
|
// the engine fetches only its device platform's build
|
|
801
805
|
expoStamped.searchParams.set(
|
|
802
806
|
'expoKotlin',
|
package/cli/scene-video.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { writeFile } from 'node:fs/promises'
|
|
2
|
+
import { createServer } from 'node:http'
|
|
2
3
|
import { createRequire } from 'node:module'
|
|
3
4
|
import { getCliRuntime } from '../src/cli-runtime.ts'
|
|
4
5
|
import { launchReapedChrome } from '../src/reap-browser'
|
|
@@ -43,6 +44,27 @@ export async function renderSceneToVideo(options: {
|
|
|
43
44
|
undefined,
|
|
44
45
|
{ software: process.platform !== 'darwin' },
|
|
45
46
|
)
|
|
47
|
+
// the viewer fetches the scene from loopback: a body fulfilled through
|
|
48
|
+
// devtools travels base64 over chrome's pipe, which drops the connection
|
|
49
|
+
// past 100 MB, so a large scene closed the browser before it booted.
|
|
50
|
+
const sceneServer = createServer((_request, response) => {
|
|
51
|
+
response.writeHead(200, {
|
|
52
|
+
'access-control-allow-origin': '*',
|
|
53
|
+
'content-type': 'application/vnd.peach.scene-stream+gzip',
|
|
54
|
+
'content-length': options.scene.byteLength,
|
|
55
|
+
})
|
|
56
|
+
response.end(options.scene)
|
|
57
|
+
})
|
|
58
|
+
const port = await new Promise<number>((resolve, reject) => {
|
|
59
|
+
sceneServer.once('error', reject)
|
|
60
|
+
sceneServer.listen(0, '127.0.0.1', () => {
|
|
61
|
+
sceneServer.off('error', reject)
|
|
62
|
+
const address = sceneServer.address()
|
|
63
|
+
if (address === null || typeof address === 'string')
|
|
64
|
+
reject(new Error('scene server has no tcp port'))
|
|
65
|
+
else resolve(address.port)
|
|
66
|
+
})
|
|
67
|
+
})
|
|
46
68
|
try {
|
|
47
69
|
const source = new URL(options.shellUrl)
|
|
48
70
|
const url = new URL(source.pathname, source.origin)
|
|
@@ -52,17 +74,11 @@ export async function renderSceneToVideo(options: {
|
|
|
52
74
|
const value = source.searchParams.get(key)
|
|
53
75
|
if (value) url.searchParams.set(key, value)
|
|
54
76
|
}
|
|
55
|
-
const sceneUrl =
|
|
77
|
+
const sceneUrl = `http://127.0.0.1:${port}/scene.psr.gz`
|
|
56
78
|
const page = await browser.newPage({
|
|
57
79
|
viewport: { width: 600, height: 1000 },
|
|
58
80
|
deviceScaleFactor: 3,
|
|
59
81
|
})
|
|
60
|
-
await page.route(sceneUrl, (route) =>
|
|
61
|
-
route.fulfill({
|
|
62
|
-
contentType: 'application/vnd.peach.scene-stream+gzip',
|
|
63
|
-
body: Buffer.from(options.scene),
|
|
64
|
-
}),
|
|
65
|
-
)
|
|
66
82
|
url.searchParams.set(
|
|
67
83
|
'remoteEngine',
|
|
68
84
|
JSON.stringify({ url: sceneUrl, expectedPeer: header.peer, autoplay: false }),
|
|
@@ -97,5 +113,6 @@ export async function renderSceneToVideo(options: {
|
|
|
97
113
|
return { ...result, sizeBytes: video.byteLength }
|
|
98
114
|
} finally {
|
|
99
115
|
await browser.close()
|
|
116
|
+
sceneServer.close()
|
|
100
117
|
}
|
|
101
118
|
}
|
package/detox/index.ts
CHANGED
|
@@ -1754,7 +1754,15 @@ function createSootSimElement(matcher: Matcher): SootSimElement {
|
|
|
1754
1754
|
const node = await findNodeByMatcher(matcher)
|
|
1755
1755
|
if (!node)
|
|
1756
1756
|
throw new Error(`element not found for getAttributes: ${JSON.stringify(matcher)}`)
|
|
1757
|
-
|
|
1757
|
+
// detox reports the window point a tap on the element lands on. unlike
|
|
1758
|
+
// frame, it follows presentation transforms, so it moves while a sheet or
|
|
1759
|
+
// push is still sliding and a caller can wait for it to rest.
|
|
1760
|
+
const observation = await getPage().evaluate(
|
|
1761
|
+
(observed) =>
|
|
1762
|
+
window.__sootsimTest!.observeTapTarget(observed, { includeUnreachable: true }),
|
|
1763
|
+
matcher,
|
|
1764
|
+
)
|
|
1765
|
+
return { ...attributesOf(node), activationPoint: observation?.tapPoint ?? null }
|
|
1758
1766
|
},
|
|
1759
1767
|
|
|
1760
1768
|
atIndex(index: number) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.1738 | (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;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.1738 | (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.
|
|
1
|
+
/*! peach v0.1.1738 | (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;
|
|
@@ -127,10 +127,13 @@ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
|
127
127
|
var import_node_os = require("node:os");
|
|
128
128
|
var import_node_path = __toESM(require("node:path"), 1);
|
|
129
129
|
var PEACH_HOME_ENV = "PEACH_HOME";
|
|
130
|
+
function ambientHomeDir() {
|
|
131
|
+
return import_node_path.default.join((0, import_node_os.homedir)(), ".peach");
|
|
132
|
+
}
|
|
130
133
|
function rnxHomeDir() {
|
|
131
134
|
const override = process.env[PEACH_HOME_ENV];
|
|
132
135
|
if (override && override.length > 0) return import_node_path.default.resolve(override);
|
|
133
|
-
return
|
|
136
|
+
return ambientHomeDir();
|
|
134
137
|
}
|
|
135
138
|
function electronDir() {
|
|
136
139
|
return import_node_path.default.join(rnxHomeDir(), "electron");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.1738 | (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;
|
|
@@ -49,10 +49,13 @@ var import_node_path2 = require("node:path");
|
|
|
49
49
|
var import_node_os = require("node:os");
|
|
50
50
|
var import_node_path = __toESM(require("node:path"), 1);
|
|
51
51
|
var PEACH_HOME_ENV = "PEACH_HOME";
|
|
52
|
+
function ambientHomeDir() {
|
|
53
|
+
return import_node_path.default.join((0, import_node_os.homedir)(), ".peach");
|
|
54
|
+
}
|
|
52
55
|
function rnxHomeDir() {
|
|
53
56
|
const override = process.env[PEACH_HOME_ENV];
|
|
54
57
|
if (override && override.length > 0) return import_node_path.default.resolve(override);
|
|
55
|
-
return
|
|
58
|
+
return ambientHomeDir();
|
|
56
59
|
}
|
|
57
60
|
function electronDir() {
|
|
58
61
|
return import_node_path.default.join(rnxHomeDir(), "electron");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.1738 | (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;
|
package/dist-lib/beta.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.1738 | (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;
|
package/dist-lib/beta.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.1738 | (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.
|
|
1
|
+
/*! peach v0.1.1738 | (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.
|
|
1
|
+
/*! peach v0.1.1738 | (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;
|