peachsim 0.1.2442 → 0.1.2457
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 +2 -49
- package/cli/app-catalog.ts +8 -7
- package/cli/app-stubs.ts +98 -70
- package/cli/cloud-box-artifact.ts +2 -5
- package/cli/cloud-client.ts +12 -1
- package/cli/commands/box.ts +41 -2
- package/cli/commands/compat.ts +5 -3
- package/cli/commands/cpu-profile.ts +11 -14
- package/cli/commands/diagnose.ts +5 -18
- package/cli/commands/inspect/describe.ts +4 -8
- package/cli/commands/maestro-generate.ts +4 -8
- package/cli/commands/mode.ts +3 -19
- package/cli/commands/perf.ts +3 -19
- package/cli/commands/permissions.ts +2 -6
- package/cli/commands/platform.ts +22 -14
- package/cli/commands/react.ts +7 -21
- package/cli/commands/record-three.ts +6 -10
- package/cli/commands/record.ts +38 -62
- package/cli/commands/screenshot-command.ts +8 -25
- package/cli/commands/storage.ts +4 -16
- package/cli/commands/three-mode.ts +6 -10
- package/cli/outbound-endpoints.ts +4 -5
- package/cli/parse-args.ts +45 -0
- package/cli/remote-metro.ts +1 -1
- package/cli/remote-simulators.ts +5 -1
- package/cli/send-to-box.ts +3 -1
- 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 +204 -300
- package/dist-lib/capture-contract.cjs +1 -1
- package/dist-lib/capture-contract.mjs +3 -3
- package/dist-lib/cloud-contract.cjs +14 -1
- package/dist-lib/cloud-contract.mjs +5 -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 -6
- package/dist-lib/config.mjs +5 -9
- package/dist-lib/detox/index.cjs +1 -1
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/esm-chunks/{acorn-D5YJOCIH.mjs → acorn-73XUBXBT.mjs} +3 -3
- package/dist-lib/esm-chunks/{chunk-IL72GVD2.mjs → chunk-7V2QJGVI.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-CHX6MVMJ.mjs → chunk-BHQEYJAF.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-QUCZFE4Q.mjs → chunk-DSPFMVBM.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-VIB2KS3Z.mjs → chunk-GA73RJSG.mjs} +4 -4
- package/dist-lib/esm-chunks/{chunk-Q3B6RI26.mjs → chunk-IGBAFWZ3.mjs} +3 -3
- package/dist-lib/esm-chunks/{chunk-DGMP72J3.mjs → chunk-IKZDUGT6.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-2WXLADPB.mjs → chunk-IP5ZV36U.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-HBINLWOI.mjs → chunk-KGHQ4GK2.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-NZRT4DMX.mjs → chunk-KY63O76W.mjs} +2 -2
- package/dist-lib/esm-chunks/{chunk-AAUTS54C.mjs → chunk-LJ74MO6Y.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-COWKF3A3.mjs → chunk-LJX42YVT.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-S6SCCQXW.mjs → chunk-O4KAW2JJ.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-QZBKRPVC.mjs → chunk-OIFM356B.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-DSGMAFCS.mjs → chunk-P63DPATT.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-MYQU622L.mjs → chunk-SCCOZKCP.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-PTLTHUGX.mjs → chunk-TAZL253K.mjs} +10 -8
- package/dist-lib/esm-chunks/{chunk-ZTXYR22R.mjs → chunk-UBXCWZL3.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-NPSA7CAZ.mjs → chunk-ZQWWO33G.mjs} +14 -2
- package/dist-lib/esm-chunks/{metro-layout-parser-BIIH3PF6.mjs → metro-layout-parser-HNQRTPVE.mjs} +3 -3
- package/dist-lib/expo-swift-bundle.cjs +161 -326
- 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 +237 -362
- package/dist-lib/host/fetch-proxy-handler.cjs +33 -35
- 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 +3 -1
- package/dist-lib/index.cjs +1 -104
- package/dist-lib/kotlin-host.cjs +6 -4
- 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 +2 -2
- package/dist-lib/native-app-identity-project.mjs +12 -12
- 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 +64 -64
- package/dist-lib/public-origins-lib.json +73 -97
- 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 +7 -7
- package/dist-lib/skills.cjs +261 -281
- package/dist-lib/swift-compile.cjs +6 -4
- package/dist-lib/swift-compile.mjs +8 -8
- 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 +5 -5
- 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/bplist-parser.cjs +1 -1
- package/dist-lib/vendor/ignore.cjs +1 -1
- package/dist-lib/vendor/magic-string.cjs +1 -1
- package/dist-lib/vendor/plist.cjs +1 -1
- package/dist-lib/vendor/smol-toml.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/dist-types/packages/peach-compat/src/stubs/native-seams/react-native-gesture-handler.d.ts +0 -3
- package/dist-types/packages/peach-engine/src/config.d.ts +1 -1
- package/dist-types/packages/peach-engine/src/engine/scene-table.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/engine/text-line-break.d.ts +3 -1
- package/dist-types/packages/peach-engine/src/engine/text-paint.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/engine/text-runs.d.ts +6 -1
- package/kotlin/sdk.tar.gz +0 -0
- package/package.json +1 -12
- package/skills/peach-setup/references/native-config.md +3 -3
- package/src/app-config.ts +7 -15
- package/src/cloud-contract.ts +35 -0
- package/src/config.ts +2 -6
- package/src/estree-walk.ts +13 -0
- package/src/host/network-policy.ts +4 -1
- package/src/index.ts +0 -1
- package/src/one-native-app-config.ts +14 -15
- package/src/process-group.ts +4 -1
- package/src/process-table.ts +6 -1
- package/src/swift-host.ts +10 -4
- package/cli/commands/box/bundle-plane.ts +0 -154
- package/dist-lib/jump-to-source-babel.cjs +0 -131
- package/dist-lib/jump-to-source-native.cjs +0 -248
- package/dist-lib/vendor/jiti.cjs +0 -32732
- package/src/java-static-imports.ts +0 -68
- package/src/jump-to-source-babel.ts +0 -143
- package/src/jump-to-source-native.ts +0 -201
- package/src/kotlin-jvm-sources.ts +0 -35
- package/src/oxc-parser-peer.ts +0 -12
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { takeSubcommand } from '../parse-args'
|
|
1
2
|
import { runScreenshot } from './screenshot'
|
|
2
3
|
import { runScreenshots } from './screenshots'
|
|
3
4
|
import { runSlides } from './slides'
|
|
@@ -30,22 +31,6 @@ const VALUE_FLAGS = new Set([
|
|
|
30
31
|
])
|
|
31
32
|
const SUBCOMMANDS = new Set(['capture', 'slides', 'appstore', 'layers'])
|
|
32
33
|
|
|
33
|
-
function findSubcommand(args: string[]): { name: string; index: number } | null {
|
|
34
|
-
for (let i = 0; i < args.length; i++) {
|
|
35
|
-
const arg = args[i]
|
|
36
|
-
if (arg.startsWith('-')) {
|
|
37
|
-
if (VALUE_FLAGS.has(arg)) i++
|
|
38
|
-
continue
|
|
39
|
-
}
|
|
40
|
-
return SUBCOMMANDS.has(arg) ? { name: arg, index: i } : null
|
|
41
|
-
}
|
|
42
|
-
return null
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
function removeAt(args: string[], index: number): string[] {
|
|
46
|
-
return [...args.slice(0, index), ...args.slice(index + 1)]
|
|
47
|
-
}
|
|
48
|
-
|
|
49
34
|
function stripSimFlag(args: string[]): string[] {
|
|
50
35
|
const out: string[] = []
|
|
51
36
|
for (let i = 0; i < args.length; i++) {
|
|
@@ -62,25 +47,25 @@ export async function runScreenshotCommand(
|
|
|
62
47
|
args: string[],
|
|
63
48
|
opts: ScreenshotCommandOptions,
|
|
64
49
|
): Promise<number | void> {
|
|
65
|
-
const sub =
|
|
50
|
+
const sub = takeSubcommand(args, SUBCOMMANDS, VALUE_FLAGS)
|
|
66
51
|
if (!sub || sub.name === 'capture') {
|
|
67
|
-
await runScreenshot(sub
|
|
52
|
+
await runScreenshot(sub?.args ?? args, opts)
|
|
68
53
|
return
|
|
69
54
|
}
|
|
70
55
|
|
|
71
56
|
if (sub.name === 'slides') {
|
|
72
|
-
await runSlides(
|
|
57
|
+
await runSlides(sub.args, opts)
|
|
73
58
|
return
|
|
74
59
|
}
|
|
75
60
|
|
|
76
61
|
if (sub.name === 'layers') {
|
|
77
62
|
const { runScreenshotLayers } = await import('./screenshot-layers')
|
|
78
|
-
await runScreenshotLayers(
|
|
63
|
+
await runScreenshotLayers(sub.args, opts)
|
|
79
64
|
return
|
|
80
65
|
}
|
|
81
66
|
|
|
82
|
-
const appstoreArgs =
|
|
83
|
-
const nested =
|
|
67
|
+
const appstoreArgs = sub.args
|
|
68
|
+
const nested = takeSubcommand(appstoreArgs, SUBCOMMANDS, VALUE_FLAGS)
|
|
84
69
|
if (nested?.name === 'capture') {
|
|
85
70
|
// repo-only tooling: screenshots-capture statically imports playwright-core,
|
|
86
71
|
// which the published CLI never ships (it's external in build-cli.ts). a
|
|
@@ -89,9 +74,7 @@ export async function runScreenshotCommand(
|
|
|
89
74
|
// keep it a runtime dynamic import that only evaluates when capture runs.
|
|
90
75
|
try {
|
|
91
76
|
const { runScreenshotsCapture } = await import('./screenshots-capture')
|
|
92
|
-
return await runScreenshotsCapture(
|
|
93
|
-
stripSimFlag(removeAt(appstoreArgs, nested.index)),
|
|
94
|
-
)
|
|
77
|
+
return await runScreenshotsCapture(stripSimFlag(nested.args))
|
|
95
78
|
} catch (err) {
|
|
96
79
|
if (err instanceof Error && 'code' in err && err.code === 'ERR_MODULE_NOT_FOUND') {
|
|
97
80
|
console.error(
|
package/cli/commands/storage.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { readFile } from 'node:fs/promises'
|
|
2
2
|
import { extname } from 'node:path'
|
|
3
|
+
import { takeSubcommand } from '../parse-args'
|
|
3
4
|
import {
|
|
4
5
|
callInBridgeWrite,
|
|
5
6
|
createBridgeFromParsed,
|
|
@@ -13,21 +14,8 @@ interface StorageOptions {
|
|
|
13
14
|
verbose?: boolean
|
|
14
15
|
}
|
|
15
16
|
|
|
16
|
-
const VALUE_FLAGS = new Set(['--sim', '--port', '-p'])
|
|
17
17
|
const SUBCOMMANDS = new Set(['profile', 'clear', 'copy'])
|
|
18
18
|
|
|
19
|
-
function findSubcommand(args: string[]): { name: string; index: number } | null {
|
|
20
|
-
for (let i = 0; i < args.length; i++) {
|
|
21
|
-
const arg = args[i]
|
|
22
|
-
if (arg.startsWith('-')) {
|
|
23
|
-
if (VALUE_FLAGS.has(arg)) i++
|
|
24
|
-
continue
|
|
25
|
-
}
|
|
26
|
-
return SUBCOMMANDS.has(arg) ? { name: arg, index: i } : null
|
|
27
|
-
}
|
|
28
|
-
return null
|
|
29
|
-
}
|
|
30
|
-
|
|
31
19
|
function printHelp(): void {
|
|
32
20
|
console.log(`
|
|
33
21
|
peach storage — manage sim and app storage
|
|
@@ -53,12 +41,12 @@ export async function runStorage(args: string[], opts: StorageOptions): Promise<
|
|
|
53
41
|
return 0
|
|
54
42
|
}
|
|
55
43
|
|
|
56
|
-
const sub =
|
|
44
|
+
const sub = takeSubcommand(args, SUBCOMMANDS)
|
|
57
45
|
if (sub?.name === 'profile') {
|
|
58
|
-
return runProfile(
|
|
46
|
+
return runProfile(sub.args, opts)
|
|
59
47
|
}
|
|
60
48
|
if (sub?.name === 'clear') {
|
|
61
|
-
return runReset(
|
|
49
|
+
return runReset(sub.args, opts)
|
|
62
50
|
}
|
|
63
51
|
if (sub?.name === 'copy') {
|
|
64
52
|
const parsed = parseBridgeCliArgs(args, { port: opts.port })
|
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
isThreeModeSetting,
|
|
12
12
|
THREE_MODE_SETTING_IDS,
|
|
13
13
|
} from '../../src/screenshots/screenshotContract.ts'
|
|
14
|
+
import { readStringFlag } from '../parse-args'
|
|
14
15
|
import { peachExit } from '../run-rnx'
|
|
15
16
|
import { CliUsageError } from '../usage-error'
|
|
16
17
|
import {
|
|
@@ -322,13 +323,8 @@ function findTimelineAction(args: string[]): string | null {
|
|
|
322
323
|
return null
|
|
323
324
|
}
|
|
324
325
|
|
|
325
|
-
function readFlagValue(args: string[], flag: string) {
|
|
326
|
-
const index = args.indexOf(flag)
|
|
327
|
-
return index >= 0 ? args[index + 1] : undefined
|
|
328
|
-
}
|
|
329
|
-
|
|
330
326
|
function readNumberFlag(args: string[], flag: string, fallback: number, minimum = 0) {
|
|
331
|
-
const raw =
|
|
327
|
+
const raw = readStringFlag(args, flag)
|
|
332
328
|
if (raw === undefined) return fallback
|
|
333
329
|
const value = Number.parseFloat(raw)
|
|
334
330
|
if (!Number.isFinite(value) || value < minimum) {
|
|
@@ -571,7 +567,7 @@ async function runThreeModeTimelineAction(
|
|
|
571
567
|
const fps = readNumberFlag(args, '--fps', 30, 0.001)
|
|
572
568
|
const width = Math.round(readNumberFlag(args, '--width', 1_920, 1))
|
|
573
569
|
const height = Math.round(readNumberFlag(args, '--height', 1_080, 1))
|
|
574
|
-
const atValue =
|
|
570
|
+
const atValue = readStringFlag(args, '--at')
|
|
575
571
|
let measured: TimelineMeasuredFrames
|
|
576
572
|
if (atValue !== undefined) {
|
|
577
573
|
const times = atValue.split(',').map((token) => {
|
|
@@ -602,7 +598,7 @@ async function runThreeModeTimelineAction(
|
|
|
602
598
|
}
|
|
603
599
|
} else {
|
|
604
600
|
const from = readNumberFlag(args, '--from', 0, 0)
|
|
605
|
-
const countValue =
|
|
601
|
+
const countValue = readStringFlag(args, '--count')
|
|
606
602
|
const options: {
|
|
607
603
|
fps: number
|
|
608
604
|
width: number
|
|
@@ -629,7 +625,7 @@ async function runThreeModeTimelineAction(
|
|
|
629
625
|
)
|
|
630
626
|
}
|
|
631
627
|
const json = `${JSON.stringify(measured, null, 2)}\n`
|
|
632
|
-
const outputValue =
|
|
628
|
+
const outputValue = readStringFlag(args, '--output')
|
|
633
629
|
if (outputValue) {
|
|
634
630
|
const outputPath = resolve(outputValue)
|
|
635
631
|
mkdirSync(dirname(outputPath), { recursive: true })
|
|
@@ -644,7 +640,7 @@ async function runThreeModeTimelineAction(
|
|
|
644
640
|
return
|
|
645
641
|
}
|
|
646
642
|
|
|
647
|
-
const outputValue =
|
|
643
|
+
const outputValue = readStringFlag(args, '--output')
|
|
648
644
|
if (!outputValue) throw new CliUsageError('three-mode render requires --output <dir>')
|
|
649
645
|
const outputDirectory = resolve(outputValue)
|
|
650
646
|
const fps = readNumberFlag(args, '--fps', 30, 0.001)
|
|
@@ -529,11 +529,10 @@ export const DECLARED_OUTBOUND_CALLS: Record<string, OutboundCallDeclaration> =
|
|
|
529
529
|
},
|
|
530
530
|
// `peach box create` uploads the checkout to the box service and then talks to
|
|
531
531
|
// it. the destination is whatever the user named; there is no default.
|
|
532
|
-
'packages/peach-box/cloud/src/client.ts :: fetch ::
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
},
|
|
532
|
+
'packages/peach-box/cloud/src/client.ts :: fetch :: target': {
|
|
533
|
+
category: 'peach_cloud_box',
|
|
534
|
+
count: 1,
|
|
535
|
+
},
|
|
537
536
|
'packages/peach-box/cloud/src/client.ts :: websocket :: url': {
|
|
538
537
|
category: 'peach_cloud_box',
|
|
539
538
|
count: 1,
|
package/cli/parse-args.ts
CHANGED
|
@@ -205,3 +205,48 @@ export function extractStringFlag(args: string[], name: string): string | undefi
|
|
|
205
205
|
args.splice(idx, 2)
|
|
206
206
|
return value
|
|
207
207
|
}
|
|
208
|
+
|
|
209
|
+
const TARGET_VALUE_FLAGS = new Set(['--sim', '--port', '-p'])
|
|
210
|
+
|
|
211
|
+
export function takeSubcommand(
|
|
212
|
+
args: string[],
|
|
213
|
+
names: ReadonlySet<string>,
|
|
214
|
+
valueFlags: ReadonlySet<string> = TARGET_VALUE_FLAGS,
|
|
215
|
+
): { name: string; args: string[] } | null {
|
|
216
|
+
for (let i = 0; i < args.length; i++) {
|
|
217
|
+
const name = args[i]
|
|
218
|
+
if (name.startsWith('-')) {
|
|
219
|
+
if (valueFlags.has(name)) i++
|
|
220
|
+
continue
|
|
221
|
+
}
|
|
222
|
+
return names.has(name)
|
|
223
|
+
? { name, args: [...args.slice(0, i), ...args.slice(i + 1)] }
|
|
224
|
+
: null
|
|
225
|
+
}
|
|
226
|
+
return null
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
export function readStringFlag(args: string[], name: string): string | undefined {
|
|
230
|
+
const index = args.indexOf(name)
|
|
231
|
+
return index < 0 ? undefined : args[index + 1]
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
export function readStringFlagWithEquals(
|
|
235
|
+
args: string[],
|
|
236
|
+
name: string,
|
|
237
|
+
): string | undefined {
|
|
238
|
+
const prefix = name + '='
|
|
239
|
+
return (
|
|
240
|
+
readStringFlag(args, name) ??
|
|
241
|
+
args.find((arg) => arg.startsWith(prefix))?.slice(prefix.length)
|
|
242
|
+
)
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
export function readRoundedPositiveFlag(
|
|
246
|
+
args: string[],
|
|
247
|
+
name: string,
|
|
248
|
+
fallback: number,
|
|
249
|
+
): number {
|
|
250
|
+
const value = Number(readStringFlagWithEquals(args, name))
|
|
251
|
+
return Number.isFinite(value) && value > 0 ? Math.round(value) : fallback
|
|
252
|
+
}
|
package/cli/remote-metro.ts
CHANGED
|
@@ -3,9 +3,9 @@ import WebSocket from 'ws'
|
|
|
3
3
|
import { HmrClient } from '../../peach-kit/src/metro-hmr'
|
|
4
4
|
import { metroBundleHotUpdate } from '../src/metro-hot-update'
|
|
5
5
|
import type { CloudBoxArtifactProduction } from './cloud-box-artifact'
|
|
6
|
-
import type { BundleFilePlane } from './commands/box/bundle-plane'
|
|
7
6
|
import type { BoxHandle } from '@peach/box/client'
|
|
8
7
|
import type { BoxRevisionChange } from '@peach/box/revision'
|
|
8
|
+
import type { BundleFilePlane } from '@peach/box/cloud-bundle-plane'
|
|
9
9
|
|
|
10
10
|
export async function watchRemoteMetro(options: {
|
|
11
11
|
bundleUrl: URL
|
package/cli/remote-simulators.ts
CHANGED
|
@@ -4,6 +4,7 @@ import {
|
|
|
4
4
|
resolveCloudBoxReference,
|
|
5
5
|
} from '@peach/box/cloud-client'
|
|
6
6
|
import { isRecord } from '../src/is-record'
|
|
7
|
+
import { cloudBoxSimulatorId } from '../src/simulator-route'
|
|
7
8
|
import { deleteRemoteSim, listRemoteSims } from './cloud-client'
|
|
8
9
|
import type {
|
|
9
10
|
AccountRemoteSimulator,
|
|
@@ -88,7 +89,10 @@ export async function stopAccountRemoteSimulator(
|
|
|
88
89
|
simId: string,
|
|
89
90
|
): Promise<{ simId: string } | null> {
|
|
90
91
|
const hosted = await listHostedSimulators(account)
|
|
91
|
-
const sim = hosted.find(
|
|
92
|
+
const sim = hosted.find(
|
|
93
|
+
(candidate) =>
|
|
94
|
+
candidate.simId === simId || cloudBoxSimulatorId(candidate.simId) === simId,
|
|
95
|
+
)
|
|
92
96
|
if (!sim)
|
|
93
97
|
return deleteRemoteSim({
|
|
94
98
|
authorization: account.authorization,
|
package/cli/send-to-box.ts
CHANGED
|
@@ -6,12 +6,13 @@ import { getCliRuntime } from '../src/cli-runtime.ts'
|
|
|
6
6
|
// it directly; both hand it a way to run a bridge command against the sim that
|
|
7
7
|
// is running the app, and both get the same simulator id and URL back.
|
|
8
8
|
import { DEFAULT_DEVICE_BY_PLATFORM, listDeviceModels } from '../src/device-catalog.ts'
|
|
9
|
+
import { isSootsimDevCheckout } from '../src/home-paths.ts'
|
|
9
10
|
import { isRecord } from '../src/is-record'
|
|
10
11
|
import { toPeachProductionBundleUrl } from '../src/metro-production-bundle.ts'
|
|
11
12
|
import { cloudSimulatorPath } from '../src/simulator-route.ts'
|
|
12
13
|
import { isStorageSnapshot } from '../src/storageSnapshotContract.ts'
|
|
13
14
|
import { StorageSnapshot } from '../src/storageSnapshotContract.ts'
|
|
14
|
-
import { createCloudBox } from './cloud-client.ts'
|
|
15
|
+
import { createCloudBox, NanoDevelopmentOnlyError } from './cloud-client.ts'
|
|
15
16
|
import type { BridgeCommandType } from '../src/bridge-contract.ts'
|
|
16
17
|
import type { DeviceModel } from '../src/device-catalog.ts'
|
|
17
18
|
|
|
@@ -53,6 +54,7 @@ function cloudDevice(capturedModel: unknown): DeviceModel {
|
|
|
53
54
|
}
|
|
54
55
|
|
|
55
56
|
export async function sendToBox(options: SendToBoxOptions): Promise<SendToBoxResult> {
|
|
57
|
+
if (!isSootsimDevCheckout()) throw new NanoDevelopmentOnlyError()
|
|
56
58
|
const captured: unknown = await options.send({
|
|
57
59
|
type: 'evaluate',
|
|
58
60
|
simId: options.simId,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2457 | (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.2457 | (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.2457 | (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.2457 | (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.2457 | (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.2457 | (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,5 +1,5 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
2
|
-
import "./esm-chunks/chunk-
|
|
1
|
+
/*! peach v0.1.2457 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
|
+
import "./esm-chunks/chunk-LJ74MO6Y.mjs";
|
|
3
3
|
|
|
4
4
|
// src/beta.ts
|
|
5
5
|
var IS_BETA = true;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2457 | (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.2457 | (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.2457 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
import {
|
|
3
3
|
BridgeInputError,
|
|
4
4
|
SEMANTIC_WAIT_MAX_TIMEOUT_MS,
|
|
@@ -14,10 +14,10 @@ import {
|
|
|
14
14
|
parseSemanticWaitOptions,
|
|
15
15
|
parseStateOptions,
|
|
16
16
|
parseTapTarget
|
|
17
|
-
} from "./esm-chunks/chunk-
|
|
18
|
-
import "./esm-chunks/chunk-
|
|
19
|
-
import "./esm-chunks/chunk-
|
|
20
|
-
import "./esm-chunks/chunk-
|
|
17
|
+
} from "./esm-chunks/chunk-IGBAFWZ3.mjs";
|
|
18
|
+
import "./esm-chunks/chunk-P63DPATT.mjs";
|
|
19
|
+
import "./esm-chunks/chunk-UBXCWZL3.mjs";
|
|
20
|
+
import "./esm-chunks/chunk-LJ74MO6Y.mjs";
|
|
21
21
|
export {
|
|
22
22
|
BridgeInputError,
|
|
23
23
|
SEMANTIC_WAIT_MAX_TIMEOUT_MS,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2457 | (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.2457 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
import {
|
|
3
3
|
HEADLESS_TENANT_FETCH_HUNG_MARKER,
|
|
4
4
|
REFUSED_PERFORM_STEP_TYPES,
|
|
@@ -13,8 +13,8 @@ import {
|
|
|
13
13
|
readyProbeHasContent,
|
|
14
14
|
readyProbeIsReady,
|
|
15
15
|
refusedPerformStepReason
|
|
16
|
-
} from "./esm-chunks/chunk-
|
|
17
|
-
import "./esm-chunks/chunk-
|
|
16
|
+
} from "./esm-chunks/chunk-P63DPATT.mjs";
|
|
17
|
+
import "./esm-chunks/chunk-LJ74MO6Y.mjs";
|
|
18
18
|
export {
|
|
19
19
|
HEADLESS_TENANT_FETCH_HUNG_MARKER,
|
|
20
20
|
REFUSED_PERFORM_STEP_TYPES,
|