peachsim 0.1.571 → 0.1.572
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/LICENSE +1 -1
- package/README.md +106 -106
- package/cli/app-config.ts +1 -1
- package/cli/app-fonts.ts +4 -4
- package/cli/auth.ts +11 -11
- package/cli/bin.ts +4 -4
- package/cli/bridge-flow-runner.ts +13 -13
- package/cli/browser-evals.ts +2 -2
- package/cli/cli-update.ts +6 -6
- package/cli/cloud-client.ts +16 -16
- package/cli/cloud-dispatch.ts +2 -2
- package/cli/cloud-session.ts +12 -12
- package/cli/cloud-test-tunnel.ts +4 -4
- package/cli/command-registry.ts +7 -7
- package/cli/commands/agent-wrapper.ts +7 -7
- package/cli/commands/agent.ts +16 -16
- package/cli/commands/app-fonts.ts +3 -3
- package/cli/commands/assert.ts +10 -10
- package/cli/commands/auth.ts +5 -5
- package/cli/commands/box/checkout-plane.ts +1 -1
- package/cli/commands/box/plane-share.ts +2 -2
- package/cli/commands/box/rnx-command.ts +5 -5
- package/cli/commands/box.ts +38 -38
- package/cli/commands/camera.ts +13 -13
- package/cli/commands/cleanup.ts +13 -13
- package/cli/commands/compat.ts +7 -7
- package/cli/commands/config.ts +5 -5
- package/cli/commands/control.ts +63 -63
- package/cli/commands/cpu-profile.ts +11 -11
- package/cli/commands/daemon-mac-app.ts +10 -10
- package/cli/commands/daemon.ts +29 -27
- package/cli/commands/debug.ts +35 -35
- package/cli/commands/desktop.ts +3 -3
- package/cli/commands/detox.ts +33 -33
- package/cli/commands/device.ts +9 -9
- package/cli/commands/diagnose.ts +17 -17
- package/cli/commands/do-chain.ts +4 -4
- package/cli/commands/electron.ts +9 -9
- package/cli/commands/film.ts +9 -9
- package/cli/commands/flow.ts +49 -49
- package/cli/commands/inspect/core.ts +12 -12
- package/cli/commands/inspect/count.ts +1 -1
- package/cli/commands/inspect/describe.ts +1 -1
- package/cli/commands/inspect/env.ts +2 -2
- package/cli/commands/inspect/find.ts +2 -2
- package/cli/commands/inspect/get-layout.ts +2 -2
- package/cli/commands/inspect/keyboard.ts +1 -1
- package/cli/commands/inspect/list.ts +4 -4
- package/cli/commands/inspect/memory.ts +1 -1
- package/cli/commands/inspect/resolve-target.ts +1 -1
- package/cli/commands/inspect/screens.ts +1 -1
- package/cli/commands/inspect/shared.ts +1 -1
- package/cli/commands/inspect/tree.ts +1 -1
- package/cli/commands/inspect/url.ts +1 -1
- package/cli/commands/inspect/wait-event.ts +5 -5
- package/cli/commands/inspect.ts +82 -82
- package/cli/commands/install-cli.ts +16 -16
- package/cli/commands/install-desktop.ts +26 -26
- package/cli/commands/login.ts +11 -11
- package/cli/commands/maestro-generate.ts +10 -10
- package/cli/commands/maestro.ts +77 -67
- package/cli/commands/mode.ts +4 -4
- package/cli/commands/no-bridge-hint.ts +12 -12
- package/cli/commands/perf.ts +11 -11
- package/cli/commands/permissions.ts +5 -5
- package/cli/commands/platform.ts +21 -21
- package/cli/commands/preview.ts +5 -5
- package/cli/commands/profile.ts +12 -12
- package/cli/commands/react.ts +15 -15
- package/cli/commands/record.ts +31 -31
- package/cli/commands/report-issue.ts +4 -4
- package/cli/commands/reset.ts +2 -2
- package/cli/commands/runtime.ts +23 -23
- package/cli/commands/screenshot-command.ts +2 -2
- package/cli/commands/screenshot-layers.ts +5 -5
- package/cli/commands/screenshot-mode.ts +7 -7
- package/cli/commands/screenshot.ts +24 -24
- package/cli/commands/screenshots-capture.ts +13 -13
- package/cli/commands/screenshots.ts +6 -6
- package/cli/commands/serve.ts +12 -12
- package/cli/commands/setup.ts +25 -25
- package/cli/commands/skills.ts +30 -23
- package/cli/commands/slides.ts +20 -20
- package/cli/commands/state.ts +2 -2
- package/cli/commands/storage.ts +3 -3
- package/cli/commands/telemetry.ts +2 -2
- package/cli/commands/test.ts +15 -15
- package/cli/commands/three-mode.ts +17 -17
- package/cli/commands/timeline.ts +12 -12
- package/cli/commands/upgrade.ts +11 -11
- package/cli/commands/upload.ts +26 -26
- package/cli/commands/version.ts +7 -7
- package/cli/commands/what-happened.ts +20 -20
- package/cli/current-sim.ts +3 -3
- package/cli/desktop-companion.ts +16 -16
- package/cli/drivers/electron.ts +4 -4
- package/cli/drivers/playwright-sim-host.ts +7 -7
- package/cli/drivers/playwright.ts +4 -4
- package/cli/drivers/registry.ts +1 -1
- package/cli/drivers/types.ts +5 -5
- package/cli/flow-export.ts +1 -1
- package/cli/flow-file.ts +5 -5
- package/cli/flow-session.ts +1 -1
- package/cli/help-core.ts +13 -13
- package/cli/hints.ts +14 -14
- package/cli/inspect-notice-state.ts +1 -1
- package/cli/internal-child.ts +2 -2
- package/cli/maestro-js.ts +4 -4
- package/cli/maestro-report.ts +1 -1
- package/cli/main.ts +14 -14
- package/cli/outbound-endpoints.ts +30 -30
- package/cli/parse-args.ts +7 -7
- package/cli/privacy.ts +1 -1
- package/cli/recording-access.ts +10 -10
- package/cli/resolve-assets.ts +2 -2
- package/cli/rnx-in-process.ts +5 -5
- package/cli/run-registry.ts +1 -1
- package/cli/run-rnx-core.ts +3 -3
- package/cli/run-rnx.ts +1 -1
- package/cli/runtime-notes.ts +1 -1
- package/cli/self-invocation.ts +1 -1
- package/cli/send-to-box.ts +1 -1
- package/cli/shell-init.ts +40 -40
- package/cli/ui.ts +1 -1
- package/cli/ws-bridge.ts +22 -22
- package/detox/config-loader.ts +1 -1
- package/detox/index.ts +28 -28
- package/detox/navigation.ts +2 -2
- package/dist-lib/agent-daemon-client.cjs +12 -12
- package/dist-lib/agent-events.cjs +1 -1
- package/dist-lib/agent-identity.cjs +2 -2
- package/dist-lib/agent-sessions.cjs +12 -12
- package/dist-lib/attached-projects.cjs +4 -4
- package/dist-lib/auth/shared-session.cjs +4 -4
- 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 +4 -4
- package/dist-lib/bridge-contract-input.cjs +1 -1
- package/dist-lib/bridge-contract-input.mjs +1 -1
- package/dist-lib/bridge-contract.cjs +2 -2
- package/dist-lib/bridge-contract.mjs +2 -2
- package/dist-lib/capture-contract.cjs +1 -1
- package/dist-lib/capture-contract.mjs +1 -1
- package/dist-lib/cli-constants.cjs +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 +42 -42
- package/dist-lib/cloud.mjs +42 -42
- package/dist-lib/config.cjs +2 -2
- package/dist-lib/detox/index.cjs +29 -29
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/home-paths.cjs +12 -12
- package/dist-lib/host/bridge-host.cjs +72 -71
- package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
- 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 +6 -6
- package/dist-lib/host/websocket-proxy.cjs +1 -1
- package/dist-lib/index.cjs +48 -48
- package/dist-lib/jump-to-source-babel.cjs +1 -1
- package/dist-lib/jump-to-source-native.cjs +1 -1
- package/dist-lib/menu.cjs +5 -5
- package/dist-lib/menu.mjs +5 -5
- 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 +15 -15
- package/dist-lib/profiles.cjs +4 -4
- package/dist-lib/public-brand.cjs +3 -3
- package/dist-lib/react-native-host-modules.cjs +1 -1
- package/dist-lib/react-native-host-modules.mjs +1 -1
- package/dist-lib/render-mode.cjs +1 -1
- package/dist-lib/scripts/dev-server-scanner.cjs +2 -1
- package/dist-lib/sdk.cjs +9 -9
- package/dist-lib/sdk.mjs +9 -9
- package/dist-lib/skills.cjs +416 -415
- package/dist-lib/swift-compile.cjs +1 -1
- package/dist-lib/swift-compile.mjs +1 -1
- package/dist-lib/swift-package.cjs +1 -1
- package/dist-lib/swift-package.mjs +1 -1
- package/dist-lib/swift-submit.cjs +1 -1
- package/dist-lib/swift-submit.mjs +1 -1
- package/dist-lib/swift.cjs +1 -1
- package/dist-lib/vite.cjs +24 -24
- package/package.json +1 -1
- package/scripts/dev-server-scanner.ts +4 -3
- package/skills/contrast/SKILL.md +75 -75
- package/skills/{rnx-debug → peach-debug}/SKILL.md +90 -90
- package/skills/{rnx-perf → peach-perf}/SKILL.md +13 -13
- package/skills/{rnx-setup → peach-setup}/SKILL.md +60 -60
- package/skills/{rnx-test → peach-test}/SKILL.md +44 -44
- package/skills/{rnx-visual → peach-visual}/SKILL.md +26 -26
- package/src/agent-daemon-client.ts +5 -5
- package/src/agent-events.ts +1 -1
- package/src/agent-identity.ts +1 -1
- package/src/agent-sessions.ts +13 -13
- package/src/attached-projects.ts +1 -1
- package/src/auth/shared-session.ts +1 -1
- package/src/bridge-constants.ts +3 -3
- package/src/bridge-contract-input.ts +1 -1
- package/src/bridge-contract.ts +3 -3
- package/src/cli-version.ts +6 -6
- package/src/cloud.ts +40 -40
- package/src/config.ts +1 -1
- package/src/connect.ts +6 -6
- package/src/dev-server-open.ts +8 -8
- package/src/disk-cleanup.ts +3 -3
- package/src/home-paths.ts +26 -26
- package/src/host/agent-host.ts +3 -3
- package/src/host/bridge-host.ts +33 -33
- package/src/host/fetch-proxy-handler.ts +1 -1
- package/src/host/plane-host.ts +2 -2
- package/src/host/replacement-module-handler.ts +2 -2
- package/src/menu.ts +2 -2
- package/src/metro-plugin.ts +7 -7
- package/src/metro-production-bundle.ts +2 -2
- package/src/native-dev-bundle-url.ts +2 -2
- package/src/playwright-host-log.ts +1 -1
- package/src/public-brand.ts +2 -2
- package/src/react-native-host-modules.ts +1 -1
- package/src/rolldown-plugin-swift.ts +3 -3
- package/src/runtime-assets.ts +11 -11
- package/src/runtime-delivery.ts +6 -6
- package/src/screenshots/orchestrate.ts +1 -1
- package/src/screenshots/org-deck.ts +1 -1
- package/src/screenshots/schema.ts +2 -2
- package/src/sim-client.ts +1 -1
- package/src/skills/builtin/compat-check.ts +2 -2
- package/src/vite-plugin-one.ts +8 -8
- package/src/vite-plugin-swift.ts +3 -3
- package/src/vite-plugin.ts +6 -19
package/cli/commands/slides.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//
|
|
1
|
+
// peach screenshot slides — drive the live screenshot-mode composition from the
|
|
2
2
|
// terminal. same pipeline as the in-shell UI (rail/strip): every mutation
|
|
3
3
|
// goes through the shell's screenshotControl bridge so the browser UI
|
|
4
4
|
// reflects each step live, captures auto-upload, and exports are the
|
|
@@ -16,18 +16,18 @@ import {
|
|
|
16
16
|
} from '../ws-bridge'
|
|
17
17
|
|
|
18
18
|
const HELP = `
|
|
19
|
-
|
|
19
|
+
peach screenshot slides — compose App Store screenshots in the live sim
|
|
20
20
|
|
|
21
21
|
usage:
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
22
|
+
peach screenshot slides list slides (alias: slides list)
|
|
23
|
+
peach screenshot slides set <n> [fields] patch a slide's copy/colors
|
|
24
|
+
peach screenshot slides add append a blank slide (focuses it)
|
|
25
|
+
peach screenshot slides remove <n> delete a slide
|
|
26
|
+
peach screenshot slides move <n> <position> reorder a slide
|
|
27
|
+
peach screenshot slides focus <n> open a slide (device flips into it)
|
|
28
|
+
peach screenshot slides overview back to the gallery
|
|
29
|
+
peach screenshot slides capture [<n>] capture the live frame into a slide
|
|
30
|
+
peach screenshot slides export [<n>] [--out <dir>]
|
|
31
31
|
write composed App-Store PNG(s)
|
|
32
32
|
|
|
33
33
|
set fields:
|
|
@@ -43,12 +43,12 @@ set fields:
|
|
|
43
43
|
notes:
|
|
44
44
|
slides are addressed by 1-based index. screenshot mode is auto-enabled.
|
|
45
45
|
capture shoots whatever the sim currently shows — navigate the app first
|
|
46
|
-
(
|
|
46
|
+
(peach do tap-id …), then capture.
|
|
47
47
|
|
|
48
48
|
examples:
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
49
|
+
peach screenshot slides set 1 --title "The ultimate MMA community." --bg-top cyan --bg-bottom black
|
|
50
|
+
peach screenshot slides capture 1
|
|
51
|
+
peach screenshot slides export --out ./exports
|
|
52
52
|
`
|
|
53
53
|
|
|
54
54
|
interface SlideRow {
|
|
@@ -220,7 +220,7 @@ export async function runSlides(
|
|
|
220
220
|
}
|
|
221
221
|
case 'set': {
|
|
222
222
|
if (refArg == null)
|
|
223
|
-
throw new Error('usage:
|
|
223
|
+
throw new Error('usage: peach screenshot slides set <n> --title … (see --help)')
|
|
224
224
|
const patch: Record<string, string> = {}
|
|
225
225
|
for (const key of [
|
|
226
226
|
'title',
|
|
@@ -257,7 +257,7 @@ export async function runSlides(
|
|
|
257
257
|
break
|
|
258
258
|
}
|
|
259
259
|
case 'remove': {
|
|
260
|
-
if (refArg == null) throw new Error('usage:
|
|
260
|
+
if (refArg == null) throw new Error('usage: peach screenshot slides remove <n>')
|
|
261
261
|
emit(
|
|
262
262
|
await callInBridgeWrite<ControlState>(
|
|
263
263
|
bridge,
|
|
@@ -269,7 +269,7 @@ export async function runSlides(
|
|
|
269
269
|
}
|
|
270
270
|
case 'move': {
|
|
271
271
|
if (refArg == null || !Number.isInteger(positionArg) || positionArg < 1) {
|
|
272
|
-
throw new Error('usage:
|
|
272
|
+
throw new Error('usage: peach screenshot slides move <n> <position>')
|
|
273
273
|
}
|
|
274
274
|
emit(
|
|
275
275
|
await callInBridgeWrite<ControlState>(
|
|
@@ -282,7 +282,7 @@ export async function runSlides(
|
|
|
282
282
|
break
|
|
283
283
|
}
|
|
284
284
|
case 'focus': {
|
|
285
|
-
if (refArg == null) throw new Error('usage:
|
|
285
|
+
if (refArg == null) throw new Error('usage: peach screenshot slides focus <n>')
|
|
286
286
|
emit(
|
|
287
287
|
await callInBridgeWrite<ControlState>(
|
|
288
288
|
bridge,
|
|
@@ -349,7 +349,7 @@ export async function runSlides(
|
|
|
349
349
|
break
|
|
350
350
|
}
|
|
351
351
|
default:
|
|
352
|
-
throw new Error(`unknown subcommand "${sub}" — see
|
|
352
|
+
throw new Error(`unknown subcommand "${sub}" — see peach screenshot slides --help`)
|
|
353
353
|
}
|
|
354
354
|
} finally {
|
|
355
355
|
bridge.close()
|
package/cli/commands/state.ts
CHANGED
|
@@ -19,10 +19,10 @@ function isSimStateResult(value: unknown): value is SimStateResult {
|
|
|
19
19
|
|
|
20
20
|
function printHelp(): void {
|
|
21
21
|
console.log(`
|
|
22
|
-
|
|
22
|
+
peach state - capture the current app state in one call
|
|
23
23
|
|
|
24
24
|
usage:
|
|
25
|
-
|
|
25
|
+
peach state [--json] [--sim <id>]
|
|
26
26
|
|
|
27
27
|
options:
|
|
28
28
|
--json print the complete structured result, including the screenshot
|
package/cli/commands/storage.ts
CHANGED
|
@@ -23,11 +23,11 @@ function findSubcommand(args: string[]): { name: string; index: number } | null
|
|
|
23
23
|
|
|
24
24
|
function printHelp(): void {
|
|
25
25
|
console.log(`
|
|
26
|
-
|
|
26
|
+
peach storage — manage sim and app storage
|
|
27
27
|
|
|
28
28
|
usage:
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
peach storage profile <subcommand>
|
|
30
|
+
peach storage clear [--full] [--sim <id>] [--json]
|
|
31
31
|
|
|
32
32
|
subcommands:
|
|
33
33
|
profile list
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// `
|
|
1
|
+
// `peach config telemetry on|off` — retained as the command spelling for the
|
|
2
2
|
// product analytics preference shown by guided setup and Settings.
|
|
3
3
|
//
|
|
4
4
|
// this is the process-wide preference; `DO_NOT_TRACK=1` still forces opt-out
|
|
@@ -49,7 +49,7 @@ export async function runTelemetry(args: string[]): Promise<void> {
|
|
|
49
49
|
|
|
50
50
|
default:
|
|
51
51
|
console.error(` unknown telemetry action: ${sub}`)
|
|
52
|
-
console.error(' usage:
|
|
52
|
+
console.error(' usage: peach config telemetry [on|off|status]')
|
|
53
53
|
rnxExit(1)
|
|
54
54
|
}
|
|
55
55
|
}
|
package/cli/commands/test.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//
|
|
1
|
+
// peach test — choose Maestro or Detox, support local bundle loopback and standalone cloud execution.
|
|
2
2
|
|
|
3
3
|
import { existsSync, readdirSync, readFileSync, statSync } from 'node:fs'
|
|
4
4
|
import { createServer, type Server } from 'node:http'
|
|
@@ -32,7 +32,7 @@ interface TestAppTarget {
|
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
// every flag that swallows the token after it, so the positional scan finds
|
|
35
|
-
// the flow/suite target no matter where the flags sit (`
|
|
35
|
+
// the flow/suite target no matter where the flags sit (`peach test
|
|
36
36
|
// --include-tags smoke .maestro/` must not take `smoke` as the target).
|
|
37
37
|
// maestro compat flags live here alongside the flow-runner vocabulary;
|
|
38
38
|
// without them a flag-first maestro command line mis-resolves its target.
|
|
@@ -256,7 +256,7 @@ function withoutApp(args: string[]): string[] {
|
|
|
256
256
|
return result
|
|
257
257
|
}
|
|
258
258
|
|
|
259
|
-
// the maestro runner reads the app target as --url;
|
|
259
|
+
// the maestro runner reads the app target as --url; peach test spells it
|
|
260
260
|
// --app/--bundle/--bundle-url. map each spelling explicitly: a prefix
|
|
261
261
|
// replace would turn --bundle-url into --url-url.
|
|
262
262
|
function mapAppFlagToUrl(arg: string): string {
|
|
@@ -332,9 +332,9 @@ export async function resolveTestAppTarget(app: string): Promise<TestAppTarget>
|
|
|
332
332
|
|
|
333
333
|
function restoreRnxUrl(previous: string | undefined): void {
|
|
334
334
|
if (previous === undefined) {
|
|
335
|
-
delete process.env.
|
|
335
|
+
delete process.env.PEACH_URL
|
|
336
336
|
} else {
|
|
337
|
-
process.env.
|
|
337
|
+
process.env.PEACH_URL = previous
|
|
338
338
|
}
|
|
339
339
|
}
|
|
340
340
|
|
|
@@ -358,7 +358,7 @@ export function resolveTestCommand(args: string[], cwd = process.cwd()) {
|
|
|
358
358
|
// so reading only argv[0] breaks the exact pasted command line.
|
|
359
359
|
let target = targetFromArgs(forwarded) ?? undefined
|
|
360
360
|
if (!target && maestroConfig) {
|
|
361
|
-
// `
|
|
361
|
+
// `peach test --config e2e/config.yaml`: the config describes a workspace,
|
|
362
362
|
// so run the directory it lives in.
|
|
363
363
|
target = dirname(resolve(cwd, valueAfter(forwarded, '--config') as string))
|
|
364
364
|
}
|
|
@@ -531,7 +531,7 @@ function collectTestFiles(
|
|
|
531
531
|
const entryKey = keys[0] as string
|
|
532
532
|
const glob = entryKey.replace(/[\\*?[\]{}()!+@]/g, '\\$&')
|
|
533
533
|
files['config.yaml'] =
|
|
534
|
-
'# synthesized by
|
|
534
|
+
'# synthesized by peach test --cloud: run exactly the submitted entry flow.\n' +
|
|
535
535
|
`flows:\n - ${JSON.stringify(glob)}\n`
|
|
536
536
|
}
|
|
537
537
|
}
|
|
@@ -572,7 +572,7 @@ async function readJobStatus(
|
|
|
572
572
|
export async function cancelCloudTest(jobId: string, origin: string): Promise<number> {
|
|
573
573
|
const auth = resolveCliAuth()
|
|
574
574
|
if (!auth) {
|
|
575
|
-
console.error(' error: cancelling a cloud test requires `
|
|
575
|
+
console.error(' error: cancelling a cloud test requires `peach login` or PEACH_API_KEY')
|
|
576
576
|
return 1
|
|
577
577
|
}
|
|
578
578
|
const endpoint = `${origin.replace(/\/$/, '')}/api/sootsim/runner/jobs?id=${encodeURIComponent(jobId)}`
|
|
@@ -641,7 +641,7 @@ export async function runCloudTest(
|
|
|
641
641
|
const cancelId = valueAfter(forwarded, '--cancel')
|
|
642
642
|
if (forwarded.includes('--cancel') || cancelId !== null) {
|
|
643
643
|
if (!cancelId) {
|
|
644
|
-
console.error(' usage:
|
|
644
|
+
console.error(' usage: peach test --cancel <job-id>')
|
|
645
645
|
return 1
|
|
646
646
|
}
|
|
647
647
|
return cancelCloudTest(cancelId, origin)
|
|
@@ -676,7 +676,7 @@ export async function runCloudTest(
|
|
|
676
676
|
}
|
|
677
677
|
}
|
|
678
678
|
if (!target) {
|
|
679
|
-
console.error(' usage:
|
|
679
|
+
console.error(' usage: peach test <flow-or-suite> --app <bundle> --cloud')
|
|
680
680
|
return 1
|
|
681
681
|
}
|
|
682
682
|
|
|
@@ -688,7 +688,7 @@ export async function runCloudTest(
|
|
|
688
688
|
|
|
689
689
|
if (!app) {
|
|
690
690
|
console.error(
|
|
691
|
-
' error:
|
|
691
|
+
' error: peach test --cloud requires --app <bundle.js|https://bundle-url|http://localhost:port>',
|
|
692
692
|
)
|
|
693
693
|
return 1
|
|
694
694
|
}
|
|
@@ -723,7 +723,7 @@ export async function runCloudTest(
|
|
|
723
723
|
|
|
724
724
|
const auth = resolveCliAuth()
|
|
725
725
|
if (!auth) {
|
|
726
|
-
console.error(' error:
|
|
726
|
+
console.error(' error: peach test --cloud requires `peach login` or PEACH_API_KEY')
|
|
727
727
|
return 1
|
|
728
728
|
}
|
|
729
729
|
|
|
@@ -977,7 +977,7 @@ export async function runTest(
|
|
|
977
977
|
const { flowTimeoutScale } = await import('../../src/flow-timeout-scale')
|
|
978
978
|
if (flowTimeoutScale() !== 1) {
|
|
979
979
|
throw new Error(
|
|
980
|
-
'
|
|
980
|
+
'peach test requires original flow timeouts; unset SOOTSIM_FLOW_TIMEOUT_SCALE',
|
|
981
981
|
)
|
|
982
982
|
}
|
|
983
983
|
const { runMaestro } = await import('./maestro')
|
|
@@ -995,9 +995,9 @@ export async function runTest(
|
|
|
995
995
|
|
|
996
996
|
const { runDetox } = await import('./detox')
|
|
997
997
|
const detoxArgs = withoutApp(selected.args)
|
|
998
|
-
const previousRnxUrl = process.env.
|
|
998
|
+
const previousRnxUrl = process.env.PEACH_URL
|
|
999
999
|
if (appTarget.target) {
|
|
1000
|
-
process.env.
|
|
1000
|
+
process.env.PEACH_URL = await buildShellUrl(
|
|
1001
1001
|
appTarget.target,
|
|
1002
1002
|
resolveShellBaseUrlForBridgePort(
|
|
1003
1003
|
opts.port ?? (Number(process.env.SOOTSIM_PORT) || 5173),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//
|
|
1
|
+
// peach mode three — toggle the live browser 3d device stage.
|
|
2
2
|
//
|
|
3
3
|
// wraps the existing `toggle-three-mode` shell action so CLI, rail, and
|
|
4
4
|
// menu all use the same plugin-owned state path.
|
|
@@ -35,16 +35,16 @@ const TIMELINE_ACTIONS = new Set(['load', 'seek', 'play', 'pause', 'render', 'me
|
|
|
35
35
|
export async function runThreeMode(args: string[], opts: ShellBooleanModeOptions) {
|
|
36
36
|
if (args.includes('--help') || args.includes('-h')) {
|
|
37
37
|
console.log(`
|
|
38
|
-
|
|
38
|
+
peach mode three — toggle the 3d device stage
|
|
39
39
|
|
|
40
40
|
usage:
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
41
|
+
peach mode three [on|off|toggle]
|
|
42
|
+
peach mode three configure [options]
|
|
43
|
+
peach mode three load <timeline.json>
|
|
44
|
+
peach mode three seek <time-ms>
|
|
45
|
+
peach mode three play|pause
|
|
46
|
+
peach mode three render <timeline.json> --output <dir> [options]
|
|
47
|
+
peach mode three measure <timeline.json> [options]
|
|
48
48
|
|
|
49
49
|
arguments:
|
|
50
50
|
on enable 3d mode
|
|
@@ -98,13 +98,13 @@ measure options (projected bounds only — no pixels rendered):
|
|
|
98
98
|
--output <file.json> write the measurement JSON here instead of stdout
|
|
99
99
|
|
|
100
100
|
examples:
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
101
|
+
peach mode three
|
|
102
|
+
peach mode three on
|
|
103
|
+
peach mode three configure --script hero-arc --background gradient-tide
|
|
104
|
+
peach mode three configure --environment on --env-shape pane --setting room
|
|
105
|
+
peach mode three render ./cinematic.json --output ./frames --fps 30
|
|
106
|
+
peach mode three measure ./cinematic.json --width 450 --height 900 --at 0,1200
|
|
107
|
+
peach mode three off
|
|
108
108
|
`)
|
|
109
109
|
rnxExit(0)
|
|
110
110
|
}
|
|
@@ -243,7 +243,7 @@ export async function waitForThreeModeRuntimeReadyOnBridge(bridge: WsBridge) {
|
|
|
243
243
|
|
|
244
244
|
if (state?.ready === true) return state
|
|
245
245
|
if (state?.disabled) {
|
|
246
|
-
throw new Error('3d mode is off; run `
|
|
246
|
+
throw new Error('3d mode is off; run `peach mode three on` before configure')
|
|
247
247
|
}
|
|
248
248
|
throw new Error('3d mode runtime did not become ready')
|
|
249
249
|
}
|
package/cli/commands/timeline.ts
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
//
|
|
1
|
+
// peach timeline — control the semantic agent-facing event log
|
|
2
2
|
//
|
|
3
|
-
// `
|
|
3
|
+
// `peach record` is for video/screen capture; `peach debug record` is
|
|
4
4
|
// for the engine-internal debug-channel ring; this command is the third
|
|
5
5
|
// surface and explicitly distinct: it manages the SootSim.bridges.timeline API,
|
|
6
6
|
// the unified, agent-facing semantic event stream across host / shell
|
|
7
7
|
// worker / tenant worker.
|
|
8
8
|
//
|
|
9
9
|
// usage:
|
|
10
|
-
//
|
|
11
|
-
//
|
|
12
|
-
//
|
|
13
|
-
//
|
|
14
|
-
//
|
|
10
|
+
// peach timeline status # what's enabled
|
|
11
|
+
// peach timeline start [kinds] # enable kinds (default: opt-in defaults)
|
|
12
|
+
// peach timeline stop [kinds] # disable kinds (or 'all')
|
|
13
|
+
// peach timeline clear # drop all events + cursors
|
|
14
|
+
// peach timeline dump <file> # write current ring to JSON
|
|
15
15
|
//
|
|
16
|
-
// see `
|
|
16
|
+
// see `peach what-happened` for the read side.
|
|
17
17
|
|
|
18
18
|
import { writeFileSync } from 'fs'
|
|
19
19
|
import { rnxExit } from '../run-rnx'
|
|
@@ -26,10 +26,10 @@ interface TimelineOptions {
|
|
|
26
26
|
|
|
27
27
|
function printHelp() {
|
|
28
28
|
console.log(`
|
|
29
|
-
|
|
29
|
+
peach timeline — control the semantic event timeline
|
|
30
30
|
|
|
31
31
|
usage:
|
|
32
|
-
|
|
32
|
+
peach timeline <subcommand> [args]
|
|
33
33
|
|
|
34
34
|
subcommands:
|
|
35
35
|
status show enabled kinds and ring sizes
|
|
@@ -43,7 +43,7 @@ toast, notification, route, shell, actionsheet, picker) record at all times.
|
|
|
43
43
|
start/stop enables opt-in kinds (react-commit, scroll, gesture, text-input,
|
|
44
44
|
layout, reanimated, animation).
|
|
45
45
|
|
|
46
|
-
read the timeline with:
|
|
46
|
+
read the timeline with: peach what-happened
|
|
47
47
|
`)
|
|
48
48
|
}
|
|
49
49
|
|
|
@@ -97,7 +97,7 @@ export async function runTimeline(args: string[], opts: TimelineOptions) {
|
|
|
97
97
|
case 'dump': {
|
|
98
98
|
const outPath = rest[0]
|
|
99
99
|
if (!outPath) {
|
|
100
|
-
console.error(' usage:
|
|
100
|
+
console.error(' usage: peach timeline dump <file>')
|
|
101
101
|
rnxExit(1)
|
|
102
102
|
}
|
|
103
103
|
const result = await callInBridge<{ events: unknown[] }>(
|
package/cli/commands/upgrade.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//
|
|
1
|
+
// peach upgrade updates the separately delivered runtime first, then atomically
|
|
2
2
|
// replaces the standalone cli executable. runtime stays first because replacing
|
|
3
3
|
// the running cli's files before later dynamic imports can strand the command.
|
|
4
4
|
|
|
@@ -36,7 +36,7 @@ export async function runUpgrade(
|
|
|
36
36
|
const channel =
|
|
37
37
|
channelIdx >= 0 && args[channelIdx + 1] ? args[channelIdx + 1] : undefined
|
|
38
38
|
|
|
39
|
-
console.log('
|
|
39
|
+
console.log('peach upgrade\n')
|
|
40
40
|
|
|
41
41
|
console.log('runtime:')
|
|
42
42
|
const beforeRuntime = readActiveRuntime()
|
|
@@ -94,7 +94,7 @@ export async function upgradeCli(options: UpgradeOptions = {}): Promise<void> {
|
|
|
94
94
|
return
|
|
95
95
|
}
|
|
96
96
|
throw new Error(
|
|
97
|
-
'this is not the standalone
|
|
97
|
+
'this is not the standalone peach executable; reinstall from https://peachsim.com/install.sh',
|
|
98
98
|
)
|
|
99
99
|
}
|
|
100
100
|
|
|
@@ -115,7 +115,7 @@ export async function upgradeCli(options: UpgradeOptions = {}): Promise<void> {
|
|
|
115
115
|
.toString('utf8')
|
|
116
116
|
.trim()
|
|
117
117
|
if (!SHA256_PATTERN.test(expectedSha)) {
|
|
118
|
-
throw new Error('
|
|
118
|
+
throw new Error('peach update service returned an invalid executable checksum')
|
|
119
119
|
}
|
|
120
120
|
|
|
121
121
|
console.log(` v${current} → v${latest}`)
|
|
@@ -124,12 +124,12 @@ export async function upgradeCli(options: UpgradeOptions = {}): Promise<void> {
|
|
|
124
124
|
const actualSha = createHash('sha256').update(executable).digest('hex')
|
|
125
125
|
if (actualSha !== expectedSha) {
|
|
126
126
|
throw new Error(
|
|
127
|
-
`downloaded
|
|
127
|
+
`downloaded peach executable failed verification (expected ${expectedSha}, got ${actualSha})`,
|
|
128
128
|
)
|
|
129
129
|
}
|
|
130
130
|
|
|
131
131
|
const executablePath = path.resolve(options.cliExecutablePath ?? process.execPath)
|
|
132
|
-
const tempDir = fs.mkdtempSync(path.join(path.dirname(executablePath), '.
|
|
132
|
+
const tempDir = fs.mkdtempSync(path.join(path.dirname(executablePath), '.peach-update-'))
|
|
133
133
|
const candidatePath = path.join(tempDir, path.basename(executablePath))
|
|
134
134
|
try {
|
|
135
135
|
fs.writeFileSync(candidatePath, executable, { mode: 0o755 })
|
|
@@ -145,12 +145,12 @@ export async function upgradeCli(options: UpgradeOptions = {}): Promise<void> {
|
|
|
145
145
|
function cliArtifactName(): string {
|
|
146
146
|
const platform = process.platform === 'darwin' ? 'darwin' : process.platform
|
|
147
147
|
if (platform !== 'darwin' && platform !== 'linux') {
|
|
148
|
-
throw new Error('standalone
|
|
148
|
+
throw new Error('standalone peach self-update currently supports macOS and Linux')
|
|
149
149
|
}
|
|
150
150
|
if (process.arch !== 'arm64' && process.arch !== 'x64') {
|
|
151
|
-
throw new Error(`standalone
|
|
151
|
+
throw new Error(`standalone peach does not support ${process.arch}`)
|
|
152
152
|
}
|
|
153
|
-
return `
|
|
153
|
+
return `peach-${platform}-${process.arch}`
|
|
154
154
|
}
|
|
155
155
|
|
|
156
156
|
function verifyCandidate(candidatePath: string, expectedVersion: string): void {
|
|
@@ -158,10 +158,10 @@ function verifyCandidate(candidatePath: string, expectedVersion: string): void {
|
|
|
158
158
|
encoding: 'utf8',
|
|
159
159
|
timeout: 15_000,
|
|
160
160
|
})
|
|
161
|
-
const reported = result.stdout.match(/^
|
|
161
|
+
const reported = result.stdout.match(/^peach v([^\s]+)/m)?.[1]
|
|
162
162
|
if (result.status !== 0 || reported !== expectedVersion) {
|
|
163
163
|
throw new Error(
|
|
164
|
-
`downloaded
|
|
164
|
+
`downloaded peach executable reported ${reported ? `v${reported}` : 'no version'}; expected v${expectedVersion}`,
|
|
165
165
|
)
|
|
166
166
|
}
|
|
167
167
|
}
|
package/cli/commands/upload.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
//
|
|
2
|
-
// a running
|
|
1
|
+
// peach record upload — capture the currently-loaded bundle + device spec from
|
|
2
|
+
// a running peach sim and POST it to the Contrast upload endpoint. returns a
|
|
3
3
|
// /preview/<id> url that anyone can open to load this bundle in a frame.
|
|
4
4
|
//
|
|
5
5
|
// uploads are unlisted-public (unguessable id) but require a signed-in
|
|
@@ -113,16 +113,16 @@ function readSnapshotManifest(manifestPath: string): AttachedInteractionSnapshot
|
|
|
113
113
|
})
|
|
114
114
|
}
|
|
115
115
|
|
|
116
|
-
const REMOTE_DEFAULT_ORIGIN = process.env.
|
|
116
|
+
const REMOTE_DEFAULT_ORIGIN = process.env.PEACH_UPLOAD_ORIGIN || 'https://contrast.dev'
|
|
117
117
|
// the canonical public preview link. Uploads go to the contrast backend, but
|
|
118
118
|
// reviewers/users open rnx preview pages on rnxsim.com.
|
|
119
119
|
const REMOTE_DEFAULT_PUBLIC_PREVIEW_ORIGIN =
|
|
120
|
-
process.env.
|
|
120
|
+
process.env.PEACH_PREVIEW_ORIGIN || rnxPublicBrand.origin
|
|
121
121
|
export async function resolveDefaultUploadOrigin(
|
|
122
122
|
explicitOrigin?: string,
|
|
123
123
|
): Promise<string> {
|
|
124
124
|
if (explicitOrigin) return explicitOrigin
|
|
125
|
-
if (process.env.
|
|
125
|
+
if (process.env.PEACH_UPLOAD_ORIGIN) return process.env.PEACH_UPLOAD_ORIGIN
|
|
126
126
|
return REMOTE_DEFAULT_ORIGIN
|
|
127
127
|
}
|
|
128
128
|
|
|
@@ -160,8 +160,8 @@ export function resolvePublicPreviewOrigin(
|
|
|
160
160
|
explicitOrigin?: string,
|
|
161
161
|
): string {
|
|
162
162
|
if (explicitOrigin) return normalizeOrigin(explicitOrigin)
|
|
163
|
-
if (process.env.
|
|
164
|
-
return normalizeOrigin(process.env.
|
|
163
|
+
if (process.env.PEACH_PREVIEW_ORIGIN) {
|
|
164
|
+
return normalizeOrigin(process.env.PEACH_PREVIEW_ORIGIN)
|
|
165
165
|
}
|
|
166
166
|
if (isLoopbackOrigin(uploadOrigin)) return normalizeOrigin(uploadOrigin)
|
|
167
167
|
if (isContrastOrigin(uploadOrigin)) {
|
|
@@ -172,18 +172,18 @@ export function resolvePublicPreviewOrigin(
|
|
|
172
172
|
|
|
173
173
|
function printHelp() {
|
|
174
174
|
console.log(`
|
|
175
|
-
|
|
175
|
+
peach record upload — publish the current recorded bundle as a /preview/<id> link
|
|
176
176
|
|
|
177
177
|
usage:
|
|
178
|
-
|
|
178
|
+
peach record upload [--origin <url>] [--public-origin <url>] (--events <path> | --video <path>) [--screenshot <path>] [--owner <org> --repo <repo>] [--sim <sim>] [--open] [--assets-only]
|
|
179
179
|
|
|
180
180
|
options:
|
|
181
181
|
--origin <url> upload target (default: ${REMOTE_DEFAULT_ORIGIN})
|
|
182
|
-
override with
|
|
182
|
+
override with PEACH_UPLOAD_ORIGIN env var
|
|
183
183
|
--public-origin <url>
|
|
184
184
|
public /preview link origin (default: ${REMOTE_DEFAULT_PUBLIC_PREVIEW_ORIGIN}
|
|
185
185
|
for prod uploads, upload origin for localhost/custom origins).
|
|
186
|
-
override with
|
|
186
|
+
override with PEACH_PREVIEW_ORIGIN env var
|
|
187
187
|
--events <path> path to a gzipped events .jsonl.gz file to attach
|
|
188
188
|
required unless --video is present; previews must
|
|
189
189
|
have replay or recording playback data
|
|
@@ -210,7 +210,7 @@ options:
|
|
|
210
210
|
to the local/org team that owns the link
|
|
211
211
|
--billing-kind test_run
|
|
212
212
|
meter this upload as a natural-language test run
|
|
213
|
-
--sim <sim> target a specific sim (see:
|
|
213
|
+
--sim <sim> target a specific sim (see: peach list)
|
|
214
214
|
--open open the resulting /preview/<id> url in the browser
|
|
215
215
|
--assets-only drop API/JSON/HTML records before upload; keep images,
|
|
216
216
|
fonts, css, js, and binary blobs. live-data demos hit
|
|
@@ -219,9 +219,9 @@ options:
|
|
|
219
219
|
-h, --help
|
|
220
220
|
|
|
221
221
|
examples:
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
222
|
+
peach record upload --events ./my-session.jsonl.gz
|
|
223
|
+
peach record upload --origin https://contrast.localhost:3000 --events ./my-session.jsonl.gz --open
|
|
224
|
+
peach record upload --video /tmp/peach-flow.mp4 --video-duration-ms 12000
|
|
225
225
|
`)
|
|
226
226
|
}
|
|
227
227
|
|
|
@@ -494,8 +494,8 @@ export async function runUpload(
|
|
|
494
494
|
if (!eventsPath && !videoPath) {
|
|
495
495
|
console.error(
|
|
496
496
|
' preview uploads require playback data: pass --events or --video.\n' +
|
|
497
|
-
' for a normal local preview, use `
|
|
498
|
-
' or `
|
|
497
|
+
' for a normal local preview, use `peach record --mode combined --open`\n' +
|
|
498
|
+
' or `peach maestro test --preview` instead of uploading a bundle-only snapshot.',
|
|
499
499
|
)
|
|
500
500
|
rnxExit(1)
|
|
501
501
|
}
|
|
@@ -701,14 +701,14 @@ export async function runUpload(
|
|
|
701
701
|
|
|
702
702
|
if (!snapshot) {
|
|
703
703
|
console.error(
|
|
704
|
-
' could not read bundle snapshot — is
|
|
704
|
+
' could not read bundle snapshot — is peach running and is the bundle loaded?',
|
|
705
705
|
)
|
|
706
706
|
rnxExit(2)
|
|
707
707
|
}
|
|
708
708
|
if (!snapshot.bundleUrl) {
|
|
709
709
|
console.error(
|
|
710
|
-
' no ?bundle= URL on the current
|
|
711
|
-
' open the app you want to share first (e.g.
|
|
710
|
+
' no ?bundle= URL on the current peach tab.\n' +
|
|
711
|
+
' open the app you want to share first (e.g. peach open 8082), then run upload.',
|
|
712
712
|
)
|
|
713
713
|
rnxExit(2)
|
|
714
714
|
}
|
|
@@ -870,7 +870,7 @@ export async function runUpload(
|
|
|
870
870
|
)
|
|
871
871
|
}
|
|
872
872
|
|
|
873
|
-
// priority:
|
|
873
|
+
// priority: PEACH_API_KEY env → github runner token → saved credential
|
|
874
874
|
// file → session token. github runner auth is what keeps installed PR
|
|
875
875
|
// previews from requiring a new Contrast secret.
|
|
876
876
|
const cliAuth = resolveCliAuth()
|
|
@@ -879,7 +879,7 @@ export async function runUpload(
|
|
|
879
879
|
if (!cliAuth) {
|
|
880
880
|
console.error(' preview uploads need auth.')
|
|
881
881
|
console.error(
|
|
882
|
-
' set
|
|
882
|
+
' set PEACH_API_KEY=sk_rnx_..., run `peach login`, or use the Contrast github runner.',
|
|
883
883
|
)
|
|
884
884
|
rnxExit(1)
|
|
885
885
|
}
|
|
@@ -935,7 +935,7 @@ export async function runUpload(
|
|
|
935
935
|
// asset-registry and are fetched once at engine boot — before the recorder
|
|
936
936
|
// starts — so neither the manifest re-fetch nor recordedFetches captures
|
|
937
937
|
// them and the /preview replay 404s. backfill them here via the shared
|
|
938
|
-
// fetcher (same code path as the build's `
|
|
938
|
+
// fetcher (same code path as the build's `peach app-fonts stage`) so both
|
|
939
939
|
// pipelines store identical bytes keyed by sha256(url).
|
|
940
940
|
const appFontFiles: PreparedFile[] = []
|
|
941
941
|
const appFontsWire = appFontsWireFromPageHref(snapshot.pageHref) || ''
|
|
@@ -1039,11 +1039,11 @@ export async function runUpload(
|
|
|
1039
1039
|
bundleMinified: false,
|
|
1040
1040
|
bundleOrigin,
|
|
1041
1041
|
runtimeVersion: snapshot.runtimeVersion ?? undefined,
|
|
1042
|
-
// config-only fonts resolved by `
|
|
1042
|
+
// config-only fonts resolved by `peach open` and carried on the engine
|
|
1043
1043
|
// URL. persist them onto the share meta so /preview/<id> re-applies
|
|
1044
1044
|
// `?appFonts=` and registers the same typefaces.
|
|
1045
1045
|
appFonts: appFontsWire || undefined,
|
|
1046
|
-
// configured splash (image + bg) resolved by `
|
|
1046
|
+
// configured splash (image + bg) resolved by `peach open`. persist it so
|
|
1047
1047
|
// /preview/<id> re-applies `?appSplash=` and paints the same splash; the
|
|
1048
1048
|
// image bytes are staged above so the engine's <img> resolves in preview.
|
|
1049
1049
|
appSplash: appSplashWire || undefined,
|
|
@@ -1175,7 +1175,7 @@ export async function runUpload(
|
|
|
1175
1175
|
}
|
|
1176
1176
|
if (e.phase === 'init' && e.status === 401) {
|
|
1177
1177
|
console.error(' preview upload requires a valid login.')
|
|
1178
|
-
console.error(' run `
|
|
1178
|
+
console.error(' run `peach login` and retry.')
|
|
1179
1179
|
rnxExit(1)
|
|
1180
1180
|
}
|
|
1181
1181
|
if (e.status === 402) {
|
package/cli/commands/version.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
//
|
|
1
|
+
// peach version — one overview of both halves you're running.
|
|
2
2
|
//
|
|
3
|
-
// the
|
|
3
|
+
// the peach CLI and the engine runtime (versioned tarball
|
|
4
4
|
// rendered in the browser/electron shell) are versioned independently, which
|
|
5
5
|
// is a frequent "I upgraded but the version didn't change" trap. the terse
|
|
6
|
-
// `
|
|
6
|
+
// `peach --version` flag prints both for scripts; this command adds the
|
|
7
7
|
// channel, a "newer runtime available" hint, and a what's-new pointer.
|
|
8
8
|
|
|
9
9
|
import fs from 'node:fs'
|
|
@@ -22,7 +22,7 @@ export async function runVersion(_args: string[]): Promise<void> {
|
|
|
22
22
|
: Promise.resolve(null)
|
|
23
23
|
const { IS_BETA, BETA_LABEL } = await import('../../src/beta')
|
|
24
24
|
const suffix = IS_BETA ? ` · ${BETA_LABEL}` : ''
|
|
25
|
-
console.log(`
|
|
25
|
+
console.log(`peach v${getCliVersion()}${suffix}`)
|
|
26
26
|
|
|
27
27
|
const runtime = getRuntimeSummary()
|
|
28
28
|
const channel = rnxRuntime.resolveChannel()
|
|
@@ -30,7 +30,7 @@ export async function runVersion(_args: string[]): Promise<void> {
|
|
|
30
30
|
console.log(runtime.primary)
|
|
31
31
|
if (runtime.installedRuntime) console.log(`${runtime.installedRuntime} · ${channel}`)
|
|
32
32
|
} else if (runtime.primary === 'runtime not installed') {
|
|
33
|
-
console.log(`runtime not installed — run \`
|
|
33
|
+
console.log(`runtime not installed — run \`peach runtime install\``)
|
|
34
34
|
} else {
|
|
35
35
|
console.log(`${runtime.primary} · ${channel}`)
|
|
36
36
|
}
|
|
@@ -53,10 +53,10 @@ export async function runVersion(_args: string[]): Promise<void> {
|
|
|
53
53
|
cliUpdatePromise,
|
|
54
54
|
])
|
|
55
55
|
if (cliUpdate?.outdated) {
|
|
56
|
-
console.log(`\n ↑ CLI v${cliUpdate.latestVersion} available; run \`
|
|
56
|
+
console.log(`\n ↑ CLI v${cliUpdate.latestVersion} available; run \`peach upgrade\``)
|
|
57
57
|
}
|
|
58
58
|
if (check.outdated && check.latest) {
|
|
59
|
-
console.log(`\n ↑ default runtime v${check.latest} available; run \`
|
|
59
|
+
console.log(`\n ↑ default runtime v${check.latest} available; run \`peach upgrade\``)
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
console.log(`\n what's new: ${RNX_CHANGELOG_URL}`)
|