peachsim 0.1.2438 → 0.1.2439
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/README.md +30 -98
- package/cli/app-catalog.ts +4 -73
- package/cli/catalog/content.ts +1 -1
- package/cli/cloud-box-artifact.ts +26 -39
- package/cli/cloud-client.ts +69 -117
- package/cli/cloud-session.ts +2 -9
- package/cli/commands/box.ts +6 -6
- package/cli/commands/control.ts +4 -11
- package/cli/commands/flow.ts +5 -9
- package/cli/commands/kotlin.ts +2 -1
- package/cli/commands/platform.ts +21 -39
- package/cli/commands/record-three.ts +1 -1
- package/cli/commands/shell-url.ts +29 -23
- package/cli/dev-build-freshness.ts +4 -3
- package/cli/native-input.ts +2 -2
- package/cli/outbound-endpoints.ts +20 -45
- package/cli/remote-project-bundle.ts +8 -14
- package/cli/remote-simulators.ts +1 -1
- package/cli/send-to-box.ts +2 -1
- package/detox/jest-preset.cjs +1 -1
- package/detox/jest-transform.cjs +40 -2
- package/dist-lib/agent-daemon-client.cjs +34 -24
- package/dist-lib/agent-events.cjs +1 -1
- package/dist-lib/attached-projects.cjs +19 -17
- package/dist-lib/auth/shared-session.cjs +18 -16
- package/dist-lib/backend-origin.cjs +1 -1
- package/dist-lib/beta.cjs +1 -1
- package/dist-lib/beta.mjs +2 -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 +20 -583
- package/dist-lib/bridge-contract.cjs +1 -1
- package/dist-lib/bridge-contract.mjs +17 -99
- package/dist-lib/bundle-channel.cjs +8718 -5552
- package/dist-lib/capture-contract.cjs +1 -1
- package/dist-lib/capture-contract.mjs +13 -363
- package/dist-lib/cloud-contract.cjs +1 -1
- package/dist-lib/cloud-contract.mjs +34 -155
- package/dist-lib/cloud-test-args.cjs +1 -1
- package/dist-lib/cloud-test-args.mjs +2 -1
- package/dist-lib/cloud.cjs +1 -1
- package/dist-lib/cloud.mjs +26 -155
- package/dist-lib/config.cjs +1 -4
- package/dist-lib/config.mjs +11 -30
- package/dist-lib/detox/index.cjs +2554 -230
- package/dist-lib/detox/jest-preset.cjs +1 -1
- package/dist-lib/detox/jest-transform.cjs +40 -2
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/esm-chunks/acorn-FGE4PYDJ.mjs +50 -0
- package/dist-lib/esm-chunks/chunk-2EUHEBIJ.mjs +664 -0
- package/dist-lib/esm-chunks/chunk-2NPABFPN.mjs +5719 -0
- package/dist-lib/esm-chunks/chunk-4ZFNH7TU.mjs +10 -0
- package/dist-lib/esm-chunks/chunk-5T4XBUJP.mjs +1353 -0
- package/dist-lib/esm-chunks/chunk-6VY6HTJC.mjs +18951 -0
- package/dist-lib/esm-chunks/chunk-7HANEMO4.mjs +188 -0
- package/dist-lib/esm-chunks/chunk-C3WBGYP6.mjs +186 -0
- package/dist-lib/esm-chunks/chunk-CVGDRROP.mjs +57 -0
- package/dist-lib/esm-chunks/chunk-DADGQELM.mjs +375 -0
- package/dist-lib/esm-chunks/chunk-DEGYKHN7.mjs +12 -0
- package/dist-lib/esm-chunks/chunk-HIDNO3RP.mjs +10992 -0
- package/dist-lib/esm-chunks/chunk-HSADZOVN.mjs +30 -0
- package/dist-lib/esm-chunks/chunk-IWJUYJQO.mjs +42 -0
- package/dist-lib/esm-chunks/chunk-JCKI3VZ6.mjs +10 -0
- package/dist-lib/esm-chunks/chunk-KSQ5KM5Y.mjs +17 -0
- package/dist-lib/esm-chunks/chunk-KVTIDLBK.mjs +598 -0
- package/dist-lib/esm-chunks/chunk-MIQSRBVU.mjs +10 -0
- package/dist-lib/esm-chunks/chunk-YB27R6JG.mjs +115 -0
- package/dist-lib/esm-chunks/metro-layout-parser-MVUAXRUJ.mjs +58 -0
- package/dist-lib/expo-swift-bundle.cjs +7856 -4707
- package/dist-lib/expo-swift-metadata.cjs +1 -1
- package/dist-lib/expo-swift-metadata.mjs +16 -165
- package/dist-lib/home-paths.cjs +1 -1
- package/dist-lib/host/bridge-host.cjs +15658 -11404
- package/dist-lib/host/fetch-proxy-handler.cjs +3927 -342
- package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
- package/dist-lib/host/fetch-proxy-overrides.mjs +2 -1
- package/dist-lib/host/replacement-module-handler.cjs +4 -4
- package/dist-lib/host/websocket-proxy.cjs +1 -1
- package/dist-lib/index.cjs +9145 -32150
- package/dist-lib/jump-to-source-babel.cjs +1 -1
- package/dist-lib/jump-to-source-native.cjs +2 -2
- package/dist-lib/kotlin-host.cjs +260 -253
- package/dist-lib/menu.cjs +1 -1
- package/dist-lib/menu.mjs +5 -13
- package/dist-lib/metro-fingerprint-registry.cjs +1 -1
- package/dist-lib/metro-fingerprint-registry.mjs +5 -6
- package/dist-lib/metro-production-bundle.cjs +22 -3
- package/dist-lib/metro-production-bundle.mjs +26 -92
- package/dist-lib/native-app-identity-project.cjs +663 -451
- package/dist-lib/native-app-identity-project.mjs +509 -2318
- package/dist-lib/native-app-identity.cjs +1 -1
- package/dist-lib/native-app-identity.mjs +27 -1340
- package/dist-lib/native-firebase-metadata.cjs +1 -1
- package/dist-lib/native-firebase-metadata.mjs +5 -18
- package/dist-lib/pdfium-raster.cjs +1 -1
- package/dist-lib/pdfium-raster.mjs +2 -1
- package/dist-lib/plist.cjs +2 -2
- package/dist-lib/plist.mjs +5 -7
- package/dist-lib/profiles.cjs +2 -1
- package/dist-lib/public-brand.cjs +1 -1
- package/dist-lib/public-origins-lib-esm.json +246 -187
- package/dist-lib/public-origins-lib-static.json +1 -1
- package/dist-lib/public-origins-lib.json +1059 -1238
- package/dist-lib/react-native-host-modules.cjs +1 -1
- package/dist-lib/react-native-host-modules.mjs +2 -1
- package/dist-lib/reap-browser.cjs +18 -7
- package/dist-lib/scripts/dev-server-scanner.cjs +6 -230
- package/dist-lib/sdk.cjs +1 -1
- package/dist-lib/sdk.mjs +22 -78
- package/dist-lib/skills.cjs +21657 -17374
- package/dist-lib/swift-compile.cjs +1343 -1318
- package/dist-lib/swift-compile.mjs +68 -19013
- package/dist-lib/swift-package.cjs +1 -1
- package/dist-lib/swift-package.mjs +35 -630
- package/dist-lib/swift-submit.cjs +1 -1
- package/dist-lib/swift-submit.mjs +9 -24
- package/dist-lib/swift-toolchain.cjs +1 -1
- package/dist-lib/swift.cjs +1 -1
- package/dist-lib/vendor/@peculiar/x509.cjs +18061 -0
- package/dist-lib/vendor/acorn.cjs +5699 -0
- package/dist-lib/vendor/bplist-parser.cjs +1589 -0
- package/dist-lib/vendor/ignore.cjs +455 -0
- package/dist-lib/vendor/magic-string.cjs +1693 -0
- package/dist-lib/vendor/plist.cjs +10978 -0
- package/dist-lib/vendor/smol-toml.cjs +768 -0
- package/dist-lib/vendor/stream-json.cjs +1997 -0
- package/dist-lib/vendor/sucrase/dist/index.js.cjs +23593 -0
- package/dist-lib/vendor/sucrase/dist/parser/index.js.cjs +15750 -0
- package/dist-lib/vendor/sucrase/dist/parser/tokenizer/index.js.cjs +11316 -0
- package/dist-lib/vendor/sucrase/dist/parser/tokenizer/types.js.cjs +482 -0
- package/dist-lib/vendor/sucrase.cjs +23593 -0
- package/dist-lib/vendor/terser.cjs +36874 -0
- package/dist-lib/vendor/valibot.cjs +6253 -0
- package/dist-lib/vendor/zod.cjs +23262 -0
- package/dist-lib/worklet-executable.cjs +3 -3
- package/dist-lib/worklet-executable.mjs +11 -16
- package/dist-types/packages/peach-engine/src/config.d.ts +1 -1
- package/kotlin/fork/NOTICE +3 -0
- package/kotlin/sdk.tar.gz +0 -0
- package/kotlin/toolchain.json +6 -6
- package/package.json +17 -121
- package/runtime-companion.json +1 -1
- package/scripts/dev-server-scanner.ts +13 -223
- package/src/android-autolinking.ts +2 -2
- package/src/bundle-channel.mjs +3 -15
- package/src/cloud-contract.ts +3 -4
- package/src/config.ts +0 -5
- package/src/host/bridge-host.ts +19 -1
- package/src/host/server-scan-handler.ts +1 -9
- package/src/index.ts +0 -2
- package/src/kotlin-host.ts +1 -2
- package/src/kotlinDiscoveryContract.ts +1 -0
- package/src/metro-production-bundle.ts +28 -6
- package/src/native-seam-manifest.ts +0 -13
- package/src/one-native-app-catalog.ts +8 -27
- package/src/one-native-app-config.ts +95 -0
- package/src/one-native-source.ts +250 -0
- package/src/one-widget-metadata.ts +45 -126
- package/src/oneWidgetContract.ts +80 -117
- package/src/serverDiscoveryContract.ts +0 -1
- package/src/simulator-route.ts +8 -0
- package/src/vite-plugin.ts +2 -2
- package/src/xcode-project.ts +1 -1
- package/dist-lib/metro.cjs +0 -27984
- package/dist-lib/vite-swift.cjs +0 -43376
- package/dist-lib/vite.cjs +0 -21456
- package/src/androidAutolinkingContract.ts +0 -48
- package/src/androidRootModuleContract.ts +0 -39
- package/src/dev-server-open.ts +0 -92
- package/src/metro-plugin.ts +0 -578
- package/src/one-widget-discovery.ts +0 -23
- package/src/swift-vite-lifetime.ts +0 -42
- package/src/vite-plugin-one.ts +0 -746
- package/src/vite-plugin-swift.ts +0 -225
- package/src/vite.d.ts +0 -10
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import fs from 'node:fs'
|
|
2
2
|
import os from 'node:os'
|
|
3
3
|
import path from 'node:path'
|
|
4
|
+
import { ANDROID_AUTOLINKED_QUERY_PARAM } from '@peach/globals/android-autolinking'
|
|
5
|
+
import { ANDROID_ROOT_MODULE_QUERY_PARAM } from '@peach/globals/android-root-module'
|
|
4
6
|
import { oneNativeAppIdentity } from '../../../contrast-bundler/src/oneViteAliases.ts'
|
|
5
7
|
import { pinSharedListenerScan, probePort } from '../../scripts/dev-server-scanner'
|
|
8
|
+
import { collectAndroidAutolinkedPackages } from '../../src/android-autolinking'
|
|
6
9
|
import { readAndroidLauncherRootModuleName } from '../../src/android-root-module'
|
|
7
|
-
import { ANDROID_ROOT_MODULE_QUERY_PARAM } from '../../src/androidRootModuleContract'
|
|
8
10
|
import { isLoopbackHost, loopbackOriginOf } from '../../src/backend-origin'
|
|
9
11
|
import { resolveSootsimShellBaseUrlForBridgePort } from '../../src/bridge-constants'
|
|
10
12
|
import { getCliRuntime } from '../../src/cli-runtime.ts'
|
|
@@ -31,6 +33,7 @@ import {
|
|
|
31
33
|
readInstalledNativePackageVersions,
|
|
32
34
|
readInstalledPackageVersions,
|
|
33
35
|
} from '../../src/installed-package-versions'
|
|
36
|
+
import { KOTLIN_GUEST_PATH } from '../../src/kotlinDiscoveryContract'
|
|
34
37
|
import { LAUNCH_METADATA_QUERY_PARAM } from '../../src/launchMetadataContract'
|
|
35
38
|
import { resolveMetroProjectRoot } from '../../src/metro-project-root'
|
|
36
39
|
import {
|
|
@@ -57,13 +60,9 @@ import {
|
|
|
57
60
|
isPeachSimulatorDocumentPath,
|
|
58
61
|
} from '../../src/simulator-route'
|
|
59
62
|
import { sleep } from '../../src/sleep'
|
|
63
|
+
import { SWIFT_GUEST_PATH } from '../../src/swiftDiscoveryContract'
|
|
60
64
|
import { stageAppBundleResources } from '../app-bundle-resources'
|
|
61
|
-
import {
|
|
62
|
-
discoverAppCatalog,
|
|
63
|
-
fetchOneNativeAppCatalogDeclaration,
|
|
64
|
-
oneDeclaredAppCatalog,
|
|
65
|
-
discoverProjectOneNativeAppCatalog,
|
|
66
|
-
} from '../app-catalog'
|
|
65
|
+
import { discoverAppCatalog, discoverProjectOneNativeAppCatalog } from '../app-catalog'
|
|
67
66
|
import { discoverNativeLinkedAppFonts } from '../app-fonts'
|
|
68
67
|
import {
|
|
69
68
|
findExpoAppConfig,
|
|
@@ -85,7 +84,6 @@ import {
|
|
|
85
84
|
} from '../ws-bridge'
|
|
86
85
|
import { readExpoNativeRenderer, readNativeProjectRenderer } from './detect'
|
|
87
86
|
import type { NitroBuildConfiguration } from '../../src/nitroContract'
|
|
88
|
-
import type { OneNativeAppCatalog } from '../../src/one-native-app-catalog'
|
|
89
87
|
|
|
90
88
|
// built-in shell apps use pathname-based routing, not ?bundle= params
|
|
91
89
|
const SHELL_APPS: Record<string, string> = {
|
|
@@ -486,26 +484,17 @@ async function stampAppSplash(
|
|
|
486
484
|
// colors and images and its declared accent reach the tenant, which applies
|
|
487
485
|
// them to the bundle this url opens. the catalog lives in the native binary,
|
|
488
486
|
// never in the js bundle, so read the app's native project, generated for a
|
|
489
|
-
// managed app, or the
|
|
487
|
+
// managed app, or the catalog its One config declares.
|
|
490
488
|
async function stampAppCatalog(
|
|
491
489
|
urlStr: string,
|
|
492
490
|
assetOrigin: string,
|
|
493
491
|
project?: ResolvedAppProject | null,
|
|
494
|
-
oneAppCatalog?: Promise<OneNativeAppCatalog | null>,
|
|
495
492
|
): Promise<string> {
|
|
496
|
-
const url = new URL(urlStr)
|
|
497
|
-
const bundleUrl = url.searchParams.get('bundle') ?? ''
|
|
498
|
-
const metroOrigin = loopbackOriginOf(bundleUrl)
|
|
499
493
|
if (!project) return urlStr
|
|
500
|
-
|
|
501
|
-
// project's One config
|
|
494
|
+
const url = new URL(urlStr)
|
|
502
495
|
const catalog =
|
|
503
496
|
(await discoverAppCatalog(project.appDir, assetOrigin)) ??
|
|
504
|
-
(
|
|
505
|
-
? await (oneAppCatalog ?? fetchOneNativeAppCatalogDeclaration(metroOrigin)).then(
|
|
506
|
-
(declared) => declared && oneDeclaredAppCatalog(declared, assetOrigin),
|
|
507
|
-
)
|
|
508
|
-
: await discoverProjectOneNativeAppCatalog(project.appDir, assetOrigin))
|
|
497
|
+
discoverProjectOneNativeAppCatalog(project.appDir, assetOrigin)
|
|
509
498
|
if (!catalog) return urlStr
|
|
510
499
|
url.searchParams.set(
|
|
511
500
|
'appCatalog',
|
|
@@ -593,8 +582,6 @@ export interface BuildShellUrlOptions {
|
|
|
593
582
|
// starts the read beside its early bundle request so the answer overlaps
|
|
594
583
|
// bridge and host setup instead of preceding the launch.
|
|
595
584
|
oneAppSplash?: Promise<DiscoveredAppSplashSpec | null>
|
|
596
|
-
// the same early read for the One app's asset catalog declaration
|
|
597
|
-
oneAppCatalog?: Promise<OneNativeAppCatalog | null>
|
|
598
585
|
// deterministic-capture mode, stamped onto the engine URL as ?proof=1. the
|
|
599
586
|
// shell worker, compositor worker and tenant worker each read it off the
|
|
600
587
|
// host page URL at boot (syncProofModeFromInitUrl) and pin everything that
|
|
@@ -781,6 +768,7 @@ export async function buildShellUrl(
|
|
|
781
768
|
'turbo',
|
|
782
769
|
'widgetExtension',
|
|
783
770
|
'expoKotlin',
|
|
771
|
+
'nativeSource',
|
|
784
772
|
].some((key) => supplied.searchParams.has(key))
|
|
785
773
|
)
|
|
786
774
|
return applyShellLaunchOptions(supplied, opts).toString()
|
|
@@ -847,7 +835,6 @@ export async function buildShellUrl(
|
|
|
847
835
|
),
|
|
848
836
|
nativeAssetOrigin,
|
|
849
837
|
project,
|
|
850
|
-
opts.oneAppCatalog,
|
|
851
838
|
)
|
|
852
839
|
const expoStamped = new URL(stamped)
|
|
853
840
|
expoStamped.searchParams.delete('nativeAppIdentity')
|
|
@@ -861,6 +848,7 @@ export async function buildShellUrl(
|
|
|
861
848
|
),
|
|
862
849
|
)
|
|
863
850
|
expoStamped.searchParams.delete(ANDROID_ROOT_MODULE_QUERY_PARAM)
|
|
851
|
+
expoStamped.searchParams.delete(ANDROID_AUTOLINKED_QUERY_PARAM)
|
|
864
852
|
expoStamped.searchParams.delete('appBundleResources')
|
|
865
853
|
if (project) {
|
|
866
854
|
if (nativeRenderer !== undefined) {
|
|
@@ -917,6 +905,12 @@ export async function buildShellUrl(
|
|
|
917
905
|
if (packageVersions) {
|
|
918
906
|
expoStamped.searchParams.set('packageVersions', JSON.stringify(packageVersions))
|
|
919
907
|
}
|
|
908
|
+
// the autolinkers resolve through the app's installed react-native
|
|
909
|
+
if (project && platform === 'android' && packageVersions?.['react-native'])
|
|
910
|
+
expoStamped.searchParams.set(
|
|
911
|
+
ANDROID_AUTOLINKED_QUERY_PARAM,
|
|
912
|
+
JSON.stringify(await collectAndroidAutolinkedPackages(project.appDir)),
|
|
913
|
+
)
|
|
920
914
|
const stampedBundle = expoStamped.searchParams.get('bundle')
|
|
921
915
|
if (project && !expoConfigRead && stampedBundle) {
|
|
922
916
|
// no Expo config tooling, but the native project still configures Firebase
|
|
@@ -981,7 +975,19 @@ export async function buildShellUrl(
|
|
|
981
975
|
'expoKotlin',
|
|
982
976
|
`${nativeAssetOrigin}/__peach/expo-kotlin?root=${encodeURIComponent(expoRoot)}`,
|
|
983
977
|
)
|
|
978
|
+
// One's direct Swift and Kotlin imports and its widget
|
|
979
|
+
expoStamped.searchParams.set(
|
|
980
|
+
'nativeSource',
|
|
981
|
+
`${nativeAssetOrigin}/?root=${encodeURIComponent(expoRoot)}`,
|
|
982
|
+
)
|
|
984
983
|
}
|
|
984
|
+
// a Swift or Kotlin guest's own server compiles its source
|
|
985
|
+
const guest = bundle ? new URL(bundle) : null
|
|
986
|
+
if (
|
|
987
|
+
guest &&
|
|
988
|
+
(guest.pathname === SWIFT_GUEST_PATH || guest.pathname === KOTLIN_GUEST_PATH)
|
|
989
|
+
)
|
|
990
|
+
expoStamped.searchParams.set('nativeSource', guest.origin)
|
|
985
991
|
const url = applyShellLaunchOptions(expoStamped, opts)
|
|
986
992
|
return opts.offline ? url.toString() : stageHostLaunchMetadata(url, nativeAssetOrigin)
|
|
987
993
|
}
|
|
@@ -67,6 +67,7 @@ const PEACHSIM_ENGINE_INPUTS = [
|
|
|
67
67
|
const ENGINE_SOURCES = [
|
|
68
68
|
'conformance-corpus/peach-engine/fixtures',
|
|
69
69
|
'packages/peach-engine/src',
|
|
70
|
+
'packages/peach-engine/plugins/recording',
|
|
70
71
|
'packages/peach-engine/public',
|
|
71
72
|
'packages/peach-engine/vendor',
|
|
72
73
|
'packages/peach-engine/scripts/license-banner.ts',
|
|
@@ -87,12 +88,12 @@ const ROUTES: DevBuildRoute[] = [
|
|
|
87
88
|
id: 'shell',
|
|
88
89
|
sources: [
|
|
89
90
|
'packages/peach-shell/src',
|
|
91
|
+
'packages/peach-shell/plugins',
|
|
92
|
+
'src/tamagui/peach',
|
|
90
93
|
'packages/peach-shell/index.html',
|
|
91
94
|
'packages/peach-shell/vite.build.config.ts',
|
|
92
95
|
'packages/peach-shell/package.json',
|
|
93
|
-
'packages/peach-
|
|
94
|
-
'packages/peach-plugin-screenshot/src',
|
|
95
|
-
'packages/peach-plugin-recording/src',
|
|
96
|
+
'packages/peach-engine/plugins/recording',
|
|
96
97
|
'packages/peachsim/src/vite-plugin.ts',
|
|
97
98
|
'packages/peachsim/src/bridge-constants.ts',
|
|
98
99
|
],
|
package/cli/native-input.ts
CHANGED
|
@@ -3,7 +3,7 @@ import path from 'node:path'
|
|
|
3
3
|
import { loadRNXAppConfig } from '../src/app-config'
|
|
4
4
|
import { produceConfiguredBundle } from '../src/configured-bundle-producer'
|
|
5
5
|
import { swiftGuestBundle, kotlinGuestBundle } from '../src/guest-bundle'
|
|
6
|
-
import { KOTLIN_GUEST_PATH } from '../src/kotlinDiscoveryContract'
|
|
6
|
+
import { KOTLIN_GUEST_PATH, KOTLIN_PACKAGE_PATH } from '../src/kotlinDiscoveryContract'
|
|
7
7
|
import { insertNativeAppIdentityFooter } from '../src/native-app-identity'
|
|
8
8
|
import { resolveSwiftModule } from '../src/swift-distribution'
|
|
9
9
|
import { SWIFT_HMR_PATH, SWIFT_PACKAGE_PATH } from '../src/swift-submit'
|
|
@@ -167,7 +167,7 @@ export async function prepareNativeInput(
|
|
|
167
167
|
name: path.basename(project.projectDir),
|
|
168
168
|
guestSource: kotlinGuestBundle(),
|
|
169
169
|
guestPath: KOTLIN_GUEST_PATH,
|
|
170
|
-
metadataPath:
|
|
170
|
+
metadataPath: KOTLIN_PACKAGE_PATH,
|
|
171
171
|
metadata: { ...metadata, hmrPath: '/__peach/kotlin-hmr' },
|
|
172
172
|
icon: null,
|
|
173
173
|
assets: new Map(
|
|
@@ -417,14 +417,6 @@ export const DECLARED_OUTBOUND_CALLS: Record<string, OutboundCallDeclaration> =
|
|
|
417
417
|
// closing a remote simulator deletes its box with the account's authority.
|
|
418
418
|
'packages/peachsim/cli/cloud-client.ts :: fetch :: `${session.apiOrigin}/v1/boxes/${encodeURIComponent()}/delete`':
|
|
419
419
|
{ category: 'peach_cloud_sim', count: 1 },
|
|
420
|
-
// the display grant is polled until the box hands one back; the body is
|
|
421
|
-
// empty, so the request carries no project or app data.
|
|
422
|
-
'packages/peachsim/cli/cloud-client.ts :: fetch :: `${options.apiOrigin}/v1/boxes/${encodeURIComponent()}/display-grant`':
|
|
423
|
-
{ category: 'peach_cloud_sim', count: 1 },
|
|
424
|
-
// the watch url the grant built is shortened into a peachsim.com link that
|
|
425
|
-
// expires with the grant; the body is that url and nothing else.
|
|
426
|
-
'packages/peachsim/cli/cloud-client.ts :: fetch :: `${options.apiOrigin}/api/v1/watch-links`':
|
|
427
|
-
{ category: 'peach_cloud_sim', count: 1 },
|
|
428
420
|
// a fresh box's boot receipts are read until its page loads or reports an
|
|
429
421
|
// error; the request carries no body.
|
|
430
422
|
'packages/peachsim/cli/cloud-client.ts :: fetch :: `${options.apiOrigin}/v1/boxes/${encodeURIComponent()}/lifecycle`':
|
|
@@ -483,9 +475,6 @@ export const DECLARED_OUTBOUND_CALLS: Record<string, OutboundCallDeclaration> =
|
|
|
483
475
|
{ category: 'tunnel_tool_download', count: 1 },
|
|
484
476
|
"packages/peachsim/cli/cloud-test-tunnel.ts :: node-request :: { host: 'localhost', port: selectedPort, path: req.url, method: req.method, headers, }":
|
|
485
477
|
{ category: 'local_development', count: 1 },
|
|
486
|
-
// the one dev server on loopback reports the catalog its config declares.
|
|
487
|
-
'packages/peachsim/cli/app-catalog.ts :: fetch :: `${metroOrigin}${ONE_NATIVE_APP_CATALOG_ROUTE}`':
|
|
488
|
-
{ category: 'local_development', count: 1 },
|
|
489
478
|
// compiling a project's .swift sources needs a swift toolchain, so the
|
|
490
479
|
// bundler posts them to the app's own /api/swift-compile. it only fires with
|
|
491
480
|
// a compile credential and only for a project that has .swift sources.
|
|
@@ -540,12 +529,12 @@ export const DECLARED_OUTBOUND_CALLS: Record<string, OutboundCallDeclaration> =
|
|
|
540
529
|
},
|
|
541
530
|
// `peach box create` uploads the checkout to the box service and then talks to
|
|
542
531
|
// it. the destination is whatever the user named; there is no default.
|
|
543
|
-
'packages/peach-
|
|
532
|
+
'packages/peach-box/cloud/src/client.ts :: fetch :: endpointOf(base, name, verb, search)':
|
|
544
533
|
{
|
|
545
534
|
category: 'peach_cloud_box',
|
|
546
535
|
count: 1,
|
|
547
536
|
},
|
|
548
|
-
'packages/peach-
|
|
537
|
+
'packages/peach-box/cloud/src/client.ts :: websocket :: url': {
|
|
549
538
|
category: 'peach_cloud_box',
|
|
550
539
|
count: 1,
|
|
551
540
|
},
|
|
@@ -553,47 +542,47 @@ export const DECLARED_OUTBOUND_CALLS: Record<string, OutboundCallDeclaration> =
|
|
|
553
542
|
// the binding routes on path alone and ignores the host, so `browser.invalid`
|
|
554
543
|
// is a placeholder that exists only so URL can parse the search parameters.
|
|
555
544
|
// nothing leaves Cloudflare and no project content is sent.
|
|
556
|
-
'packages/peach-
|
|
545
|
+
'packages/peach-box/cloud/src/browser-run.ts :: fetch :: sessionEndpoint(undefined, { keepAliveMs, includeTargets: true })':
|
|
557
546
|
{ category: 'peach_cloud_box', count: 1 },
|
|
558
|
-
'packages/peach-
|
|
547
|
+
'packages/peach-box/cloud/src/browser-run.ts :: fetch :: `https://browser.invalid/v1/devtools/browser/${sessionId}/json/list`':
|
|
559
548
|
{ category: 'peach_cloud_box', count: 1 },
|
|
560
549
|
// twice: closing the session, and the CDP websocket upgrade that navigates a
|
|
561
550
|
// target. both address the same session over the same binding.
|
|
562
|
-
'packages/peach-
|
|
551
|
+
'packages/peach-box/cloud/src/browser-run.ts :: fetch :: `https://browser.invalid/v1/devtools/browser/${sessionId}`':
|
|
563
552
|
{ category: 'peach_cloud_box', count: 2 },
|
|
564
553
|
// list the account sessions a cloud box is billed against. no project content.
|
|
565
554
|
"packages/peachsim/cli/remote-simulators.ts :: fetch :: `${account.apiOrigin.replace(/\\/+$/, '')}/api/v1/rnx/sessions?${query}`":
|
|
566
555
|
{ category: 'contrast_user_action', count: 1 },
|
|
567
|
-
"packages/peach-
|
|
556
|
+
"packages/peach-box/cloud/src/client.ts :: fetch :: `${options.apiOrigin.replace(/\\/+$/, '')}/api/v1/rnx/sessions?${search}`":
|
|
568
557
|
{ category: 'contrast_user_action', count: 1 },
|
|
569
558
|
// `peach box connect` asks the account service which box that ID or name is
|
|
570
559
|
// and for the box's own token. the account is the only thing that knows, so
|
|
571
560
|
// this is the one call that turns a name into an authorized Box reference.
|
|
572
|
-
'packages/peach-
|
|
561
|
+
'packages/peach-box/cloud/src/client.ts :: fetch :: connectUrl': {
|
|
573
562
|
category: 'contrast_user_action',
|
|
574
563
|
count: 1,
|
|
575
564
|
},
|
|
576
|
-
"packages/peach-
|
|
565
|
+
"packages/peach-box/cloud/src/box-do.ts :: fetch :: `${origin}/api/v1/rnx/sessions${serviceAuthorized ? '/internal' : ''}`":
|
|
577
566
|
{ category: 'contrast_user_action', count: 1 },
|
|
578
|
-
"packages/peach-
|
|
567
|
+
"packages/peach-box/cloud/src/box-do.ts :: fetch :: `${origin}/api/v1/rnx/sessions/${ serviceAuthority ? 'internal/' : '' }${encodeURIComponent()}${ accountId ? `?accountId=${encodeURIComponent()}` : '' }`":
|
|
579
568
|
{ category: 'contrast_user_action', count: 1 },
|
|
580
|
-
'packages/peach-
|
|
569
|
+
'packages/peach-box/cloud/src/box-do.ts :: fetch :: `${origin}/api/v1/rnx/sessions/internal/${encodeURIComponent()}`':
|
|
581
570
|
{ category: 'contrast_user_action', count: 1 },
|
|
582
571
|
// the stopped session's recording goes to the account that ran it, nowhere else.
|
|
583
|
-
'packages/peach-
|
|
572
|
+
'packages/peach-box/cloud/src/box-do.ts :: fetch :: `${origin}/api/v1/rnx/sessions/internal/${encodeURIComponent()}/recording`':
|
|
584
573
|
{ category: 'contrast_user_action', count: 1 },
|
|
585
574
|
// stop and delete authorize the caller against the account before any
|
|
586
575
|
// teardown. the account service owns the verdict on a key, its scope and the
|
|
587
576
|
// account it names; no project content is sent.
|
|
588
|
-
'packages/peach-
|
|
577
|
+
'packages/peach-box/cloud/src/box-do.ts :: fetch :: `${origin}/api/v1/rnx/sessions?accountId=${encodeURIComponent()}&kind=box&status=running`':
|
|
589
578
|
{ category: 'contrast_user_action', count: 1 },
|
|
590
|
-
'packages/peach-
|
|
579
|
+
'packages/peach-box/cloud/src/worker.ts :: fetch :: lookup': {
|
|
591
580
|
category: 'contrast_user_action',
|
|
592
581
|
count: 1,
|
|
593
582
|
},
|
|
594
583
|
// the Cloudflare Worker forwards the already-authenticated request to the
|
|
595
584
|
// selected Durable Object in the same service.
|
|
596
|
-
'packages/peach-
|
|
585
|
+
'packages/peach-box/cloud/src/worker.ts :: fetch :: request': {
|
|
597
586
|
category: 'same_origin_runtime',
|
|
598
587
|
count: 1,
|
|
599
588
|
},
|
|
@@ -638,11 +627,6 @@ export const DECLARED_OUTBOUND_CALLS: Record<string, OutboundCallDeclaration> =
|
|
|
638
627
|
category: 'local_development',
|
|
639
628
|
count: 1,
|
|
640
629
|
},
|
|
641
|
-
"packages/peachsim/src/one-widget-discovery.ts :: fetch-alias :: new URL('/__server-scan', bundle).href":
|
|
642
|
-
{
|
|
643
|
-
category: 'local_development',
|
|
644
|
-
count: 1,
|
|
645
|
-
},
|
|
646
630
|
'packages/peachsim/scripts/dev-server-scanner.ts :: http.request :: { hostname, port, path, method, headers }':
|
|
647
631
|
{
|
|
648
632
|
category: 'local_development',
|
|
@@ -1039,10 +1023,6 @@ export const DECLARED_OUTBOUND_CALLS: Record<string, OutboundCallDeclaration> =
|
|
|
1039
1023
|
category: 'contrast_user_action',
|
|
1040
1024
|
count: 1,
|
|
1041
1025
|
},
|
|
1042
|
-
'packages/peach-engine/src/engine/expo-app-config.ts :: fetch-alias :: requestUrl': {
|
|
1043
|
-
category: 'local_development',
|
|
1044
|
-
count: 1,
|
|
1045
|
-
},
|
|
1046
1026
|
'packages/peach-engine/src/engine/inspect-source-chain.ts :: fetch-alias :: symbolicateUrl':
|
|
1047
1027
|
{ category: 'local_development', count: 1 },
|
|
1048
1028
|
'packages/peach-engine/src/expo-kotlin-compilation.ts :: fetch-alias :: address': {
|
|
@@ -1079,14 +1059,6 @@ export const DECLARED_OUTBOUND_CALLS: Record<string, OutboundCallDeclaration> =
|
|
|
1079
1059
|
},
|
|
1080
1060
|
"packages/peachsim/src/host/fetch-proxy-handler.ts :: transport.request :: { hostname: normalizeHostname(targetUrl.hostname), port, path: targetUrl.pathname + targetUrl.search, method, headers: targetHeaders, ...(minimumVersion && targetUrl.protocol === 'https:' ? { agent: (() => { let agent = tlsMinimumAgents.get(minimumVersion) if (!agent) { agent = new https.Agent({ keepAlive: true, maxSockets: 256 }) tlsMinimumAgents.set(minimumVersion, agent) } return agent })(), minVersion: minimumVersion, rejectUnauthorized: true, } : { agent: fetchProxyAgentFor(targetUrl), ...loopbackTlsOptions(targetUrl), }), }":
|
|
1081
1061
|
{ category: 'guest_app_network', count: 1 },
|
|
1082
|
-
'packages/peachsim/src/vite-plugin-one.ts :: http.request :: options': {
|
|
1083
|
-
category: 'local_development',
|
|
1084
|
-
count: 1,
|
|
1085
|
-
},
|
|
1086
|
-
'packages/peachsim/src/vite-plugin-one.ts :: https.request :: options': {
|
|
1087
|
-
category: 'local_development',
|
|
1088
|
-
count: 1,
|
|
1089
|
-
},
|
|
1090
1062
|
'packages/peachsim/src/kotlin-toolchain.ts :: fetch :: download.url': {
|
|
1091
1063
|
category: 'kotlin_toolchain_download',
|
|
1092
1064
|
count: 1,
|
|
@@ -1129,8 +1101,11 @@ export const DECLARED_OUTBOUND_CALLS: Record<string, OutboundCallDeclaration> =
|
|
|
1129
1101
|
category: 'guest_app_network',
|
|
1130
1102
|
count: 1,
|
|
1131
1103
|
},
|
|
1132
|
-
'
|
|
1133
|
-
|
|
1104
|
+
// the launched app's One widget, from the loopback Peach host the launch names
|
|
1105
|
+
'packages/peach-engine/src/server-discovery.ts :: fetch-alias :: url.href': {
|
|
1106
|
+
category: 'local_development',
|
|
1107
|
+
count: 1,
|
|
1108
|
+
},
|
|
1134
1109
|
}
|
|
1135
1110
|
|
|
1136
1111
|
interface DetectedOutboundCall {
|
|
@@ -1478,7 +1453,7 @@ export function detectOutboundCalls(repositoryRoot: string): DetectedOutboundCal
|
|
|
1478
1453
|
'packages/peach-engine/src',
|
|
1479
1454
|
'packages/peach-engine/src-electron',
|
|
1480
1455
|
'packages/contrast-runtime-delivery/src',
|
|
1481
|
-
'packages/peach-
|
|
1456
|
+
'packages/peach-box/cloud/src',
|
|
1482
1457
|
]
|
|
1483
1458
|
const tracked = trackedSourceFiles(repositoryRoot, roots)
|
|
1484
1459
|
const sources = new Map<string, string>()
|
|
@@ -2,10 +2,7 @@ import { spawn } from 'node:child_process'
|
|
|
2
2
|
import { readFileSync, writeFileSync } from 'node:fs'
|
|
3
3
|
import { createRequire } from 'node:module'
|
|
4
4
|
import { dirname, join } from 'node:path'
|
|
5
|
-
import {
|
|
6
|
-
insertPackageVersionsFooter,
|
|
7
|
-
readPackageVersionsFooter,
|
|
8
|
-
} from '@peach/globals/package-versions'
|
|
5
|
+
import { insertPackageVersionsFooter } from '@peach/globals/package-versions'
|
|
9
6
|
import { readInstalledNativePackageVersionsAsync } from '../src/installed-package-versions'
|
|
10
7
|
import { detectProject } from './commands/detect'
|
|
11
8
|
import type { RemotePlatform } from './cloud-session'
|
|
@@ -69,15 +66,12 @@ export async function buildRemoteProjectBundle(
|
|
|
69
66
|
throw new Error(
|
|
70
67
|
`bundling ${projectRoot} exited ${code}:\n${Buffer.concat(output).toString('utf8').slice(-2000)}`,
|
|
71
68
|
)
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
await readInstalledNativePackageVersionsAsync(projectRoot),
|
|
80
|
-
),
|
|
81
|
-
)
|
|
69
|
+
writeFileSync(
|
|
70
|
+
bundleOutput,
|
|
71
|
+
insertPackageVersionsFooter(
|
|
72
|
+
readFileSync(bundleOutput, 'utf8'),
|
|
73
|
+
await readInstalledNativePackageVersionsAsync(projectRoot),
|
|
74
|
+
),
|
|
75
|
+
)
|
|
82
76
|
return bundleOutput
|
|
83
77
|
}
|
package/cli/remote-simulators.ts
CHANGED
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
cloudBoxConnectUrl,
|
|
3
3
|
deleteCloudBox,
|
|
4
4
|
resolveCloudBoxReference,
|
|
5
|
-
} from 'peach
|
|
5
|
+
} from '@peach/box/cloud-client'
|
|
6
6
|
import { isRecord } from '../src/is-record'
|
|
7
7
|
import { deleteRemoteSim, listRemoteSims } from './cloud-client'
|
|
8
8
|
import type {
|
package/cli/send-to-box.ts
CHANGED
|
@@ -8,6 +8,7 @@ import { getCliRuntime } from '../src/cli-runtime.ts'
|
|
|
8
8
|
import { DEFAULT_DEVICE_BY_PLATFORM, listDeviceModels } from '../src/device-catalog.ts'
|
|
9
9
|
import { isRecord } from '../src/is-record'
|
|
10
10
|
import { toPeachProductionBundleUrl } from '../src/metro-production-bundle.ts'
|
|
11
|
+
import { cloudSimulatorPath } from '../src/simulator-route.ts'
|
|
11
12
|
import { isStorageSnapshot } from '../src/storageSnapshotContract.ts'
|
|
12
13
|
import { StorageSnapshot } from '../src/storageSnapshotContract.ts'
|
|
13
14
|
import { createCloudBox } from './cloud-client.ts'
|
|
@@ -87,7 +88,7 @@ export async function sendToBox(options: SendToBoxOptions): Promise<SendToBoxRes
|
|
|
87
88
|
storage,
|
|
88
89
|
})
|
|
89
90
|
const simId = created.receipt.simulator.simId
|
|
90
|
-
const url =
|
|
91
|
+
const url = new URL(cloudSimulatorPath(simId), created.session.apiOrigin).href
|
|
91
92
|
// the local terminal is where an agent driving this checkout reads results,
|
|
92
93
|
// so the id and the URL land there whichever caller asked for the send.
|
|
93
94
|
console.log(` box simulator: ${simId}`)
|
package/detox/jest-preset.cjs
CHANGED
|
@@ -22,7 +22,7 @@ module.exports = {
|
|
|
22
22
|
// keep per-pixel arithmetic inside the module instead of the vm global proxy.
|
|
23
23
|
sandboxInjectedGlobals: ['Math'],
|
|
24
24
|
setupFilesAfterEnv: [path.join(PACKAGE_ROOT, 'detox', 'jest-setup-after-env.cjs')],
|
|
25
|
-
transform: require('./jest-transform.cjs'),
|
|
25
|
+
transform: require('./jest-transform.cjs').config,
|
|
26
26
|
// compiled runtime companions contain source-map text from bundled compilers.
|
|
27
27
|
transformIgnorePatterns: [
|
|
28
28
|
'/node_modules/',
|
package/detox/jest-transform.cjs
CHANGED
|
@@ -1,4 +1,42 @@
|
|
|
1
1
|
// native and peach conformance share module syntax, including esm helpers.
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
const { extname } = require('node:path')
|
|
3
|
+
const { transform } = require('sucrase')
|
|
4
|
+
|
|
5
|
+
exports.config = {
|
|
6
|
+
'^.+\\.(?:[jt]sx?|mjs)$': [__filename, { jsxRuntime: 'automatic' }],
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
exports.process = (source, filename, options) => {
|
|
10
|
+
const transforms = options.supportsStaticESM ? [] : ['imports']
|
|
11
|
+
switch (extname(filename)) {
|
|
12
|
+
case '.js':
|
|
13
|
+
case '.jsx':
|
|
14
|
+
case '.mjs':
|
|
15
|
+
case '.cjs':
|
|
16
|
+
transforms.push('flow', 'jsx', 'jest')
|
|
17
|
+
break
|
|
18
|
+
case '.ts':
|
|
19
|
+
transforms.push('typescript', 'jest')
|
|
20
|
+
break
|
|
21
|
+
case '.tsx':
|
|
22
|
+
case '.mts':
|
|
23
|
+
case '.cts':
|
|
24
|
+
transforms.push('typescript', 'jsx', 'jest')
|
|
25
|
+
break
|
|
26
|
+
default:
|
|
27
|
+
return { code: source }
|
|
28
|
+
}
|
|
29
|
+
const { code, sourceMap } = transform(source, {
|
|
30
|
+
transforms,
|
|
31
|
+
disableESTransforms: true,
|
|
32
|
+
preserveDynamicImport: options.supportsDynamicImport,
|
|
33
|
+
...options.transformerConfig,
|
|
34
|
+
sourceMapOptions: { compiledFilename: filename },
|
|
35
|
+
filePath: filename,
|
|
36
|
+
})
|
|
37
|
+
const encodedMap = Buffer.from(JSON.stringify(sourceMap)).toString('base64')
|
|
38
|
+
return {
|
|
39
|
+
code: `${code}\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,${encodedMap}`,
|
|
40
|
+
map: sourceMap,
|
|
41
|
+
}
|
|
4
42
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2439 | (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;
|
|
@@ -39,13 +39,16 @@ __export(agent_daemon_client_exports, {
|
|
|
39
39
|
isBridgeUp: () => isBridgeUp
|
|
40
40
|
});
|
|
41
41
|
module.exports = __toCommonJS(agent_daemon_client_exports);
|
|
42
|
-
var
|
|
42
|
+
var import_node_child_process2 = require("node:child_process");
|
|
43
43
|
var import_node_net = __toESM(require("node:net"), 1);
|
|
44
44
|
var import_ws = require("ws");
|
|
45
45
|
|
|
46
46
|
// src/agent-sessions.ts
|
|
47
|
-
var
|
|
48
|
-
var
|
|
47
|
+
var import_node_child_process = require("node:child_process");
|
|
48
|
+
var import_node_crypto3 = require("node:crypto");
|
|
49
|
+
var import_node_fs4 = __toESM(require("node:fs"), 1);
|
|
50
|
+
var import_node_path4 = __toESM(require("node:path"), 1);
|
|
51
|
+
var import_node_readline = __toESM(require("node:readline"), 1);
|
|
49
52
|
|
|
50
53
|
// cli/self-invocation.ts
|
|
51
54
|
var import_node_fs = require("node:fs");
|
|
@@ -76,8 +79,8 @@ function sourceEntryPath() {
|
|
|
76
79
|
return null;
|
|
77
80
|
}
|
|
78
81
|
}
|
|
79
|
-
function isCliEntry(
|
|
80
|
-
const name2 = (0, import_node_path.basename)(
|
|
82
|
+
function isCliEntry(path4) {
|
|
83
|
+
const name2 = (0, import_node_path.basename)(path4);
|
|
81
84
|
return name2 === "bin.ts" || name2 === "bin.js";
|
|
82
85
|
}
|
|
83
86
|
function rnxSelfInvocation() {
|
|
@@ -101,8 +104,15 @@ var MAX_NOTE_CROP_LENGTH = 2 * 1024 * 1024;
|
|
|
101
104
|
var MAX_CANVAS_AGENT_NOTE_BODY_BYTES = MAX_NOTE_CROP_LENGTH + 256 * 1024;
|
|
102
105
|
var AGENT_NOTE_TTL_MS = 24 * 60 * 60 * 1e3;
|
|
103
106
|
|
|
107
|
+
// src/attached-projects.ts
|
|
108
|
+
var import_node_crypto2 = require("node:crypto");
|
|
109
|
+
var import_node_fs3 = __toESM(require("node:fs"), 1);
|
|
110
|
+
var import_node_path3 = __toESM(require("node:path"), 1);
|
|
111
|
+
|
|
104
112
|
// src/home-paths.ts
|
|
113
|
+
var import_node_crypto = require("node:crypto");
|
|
105
114
|
var import_node_fs2 = __toESM(require("node:fs"), 1);
|
|
115
|
+
var import_node_os = require("node:os");
|
|
106
116
|
var import_node_path2 = __toESM(require("node:path"), 1);
|
|
107
117
|
function isSootsimDevCheckout() {
|
|
108
118
|
if (process.env.SOOTSIM_FORCE_DAEMON_INSTALL === "1") return false;
|
|
@@ -140,11 +150,11 @@ function resolveSootsimInvocation() {
|
|
|
140
150
|
const resourcesPath = process.resourcesPath;
|
|
141
151
|
if (resourcesPath) {
|
|
142
152
|
const candidates = [
|
|
143
|
-
|
|
144
|
-
|
|
153
|
+
import_node_path4.default.join(resourcesPath, "bin", "sootsim"),
|
|
154
|
+
import_node_path4.default.join(resourcesPath, "bin", `sootsim-${process.platform}-${process.arch}`)
|
|
145
155
|
];
|
|
146
156
|
for (const c of candidates) {
|
|
147
|
-
if (
|
|
157
|
+
if (import_node_fs4.default.existsSync(c)) return { executable: c, prefixArgs: [] };
|
|
148
158
|
}
|
|
149
159
|
}
|
|
150
160
|
}
|
|
@@ -163,15 +173,15 @@ function tryWorkspaceSootsim() {
|
|
|
163
173
|
const sootsimDir = resolveSootsimPackageDir();
|
|
164
174
|
if (!sootsimDir) return null;
|
|
165
175
|
const binaryName = `peach-${process.platform === "win32" ? "windows" : process.platform}-${process.arch}${process.platform === "win32" ? ".exe" : ""}`;
|
|
166
|
-
const distBinary =
|
|
167
|
-
if (
|
|
168
|
-
const distBin =
|
|
169
|
-
if (
|
|
176
|
+
const distBinary = import_node_path4.default.join(sootsimDir, "dist-bin", binaryName);
|
|
177
|
+
if (import_node_fs4.default.existsSync(distBinary)) return { executable: distBinary, prefixArgs: [] };
|
|
178
|
+
const distBin = import_node_path4.default.join(sootsimDir, "dist-cli", "bin.js");
|
|
179
|
+
if (import_node_fs4.default.existsSync(distBin)) {
|
|
170
180
|
try {
|
|
171
|
-
const src =
|
|
172
|
-
if (
|
|
173
|
-
const srcMtime =
|
|
174
|
-
const buildMtime =
|
|
181
|
+
const src = import_node_path4.default.join(sootsimDir, "cli", "commands", "agent-wrapper.ts");
|
|
182
|
+
if (import_node_fs4.default.existsSync(src)) {
|
|
183
|
+
const srcMtime = import_node_fs4.default.statSync(src).mtimeMs;
|
|
184
|
+
const buildMtime = import_node_fs4.default.statSync(distBin).mtimeMs;
|
|
175
185
|
if (buildMtime < srcMtime) {
|
|
176
186
|
console.warn(
|
|
177
187
|
`[peach] dist-cli/bin.js is older than agent-wrapper.ts \u2014 rebuild with \`bun run --cwd packages/peachsim build:cli\`.`
|
|
@@ -190,22 +200,22 @@ function tryWorkspaceSootsim() {
|
|
|
190
200
|
function resolveSootsimPackageDir() {
|
|
191
201
|
try {
|
|
192
202
|
const resolved = require.resolve(`${rnxPublicBrand.packageName}/package.json`);
|
|
193
|
-
return
|
|
203
|
+
return import_node_path4.default.dirname(resolved);
|
|
194
204
|
} catch {
|
|
195
205
|
}
|
|
196
206
|
const here = fileFromImportMeta();
|
|
197
207
|
if (!here) return null;
|
|
198
|
-
let cur =
|
|
208
|
+
let cur = import_node_path4.default.dirname(here);
|
|
199
209
|
for (let i = 0; i < 8; i++) {
|
|
200
|
-
const pkg =
|
|
210
|
+
const pkg = import_node_path4.default.join(cur, "package.json");
|
|
201
211
|
try {
|
|
202
|
-
if (
|
|
203
|
-
const parsed = JSON.parse(
|
|
212
|
+
if (import_node_fs4.default.existsSync(pkg)) {
|
|
213
|
+
const parsed = JSON.parse(import_node_fs4.default.readFileSync(pkg, "utf8"));
|
|
204
214
|
if (parsed.name === rnxPublicBrand.packageName) return cur;
|
|
205
215
|
}
|
|
206
216
|
} catch {
|
|
207
217
|
}
|
|
208
|
-
const parent =
|
|
218
|
+
const parent = import_node_path4.default.dirname(cur);
|
|
209
219
|
if (parent === cur) break;
|
|
210
220
|
cur = parent;
|
|
211
221
|
}
|
|
@@ -496,7 +506,7 @@ async function ensureDaemonRunning(opts = {}) {
|
|
|
496
506
|
if (port !== DEFAULT_SOOTSIM_BRIDGE_PORT) {
|
|
497
507
|
args.push("--port", String(port));
|
|
498
508
|
}
|
|
499
|
-
const child = (0,
|
|
509
|
+
const child = (0, import_node_child_process2.spawn)(executable, args, {
|
|
500
510
|
detached: true,
|
|
501
511
|
stdio: "ignore",
|
|
502
512
|
env: process.env,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2439 | (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;
|