@shipvo/cli 0.1.5 → 0.1.6
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 +3 -0
- package/dist/adopt.js +1 -2
- package/dist/agents.d.ts +15 -0
- package/dist/agents.js +68 -9
- package/dist/approvals.d.ts +9 -0
- package/dist/approvals.js +106 -0
- package/dist/audit.d.ts +1 -1
- package/dist/audit.js +28 -11
- package/dist/autohalt.d.ts +1 -1
- package/dist/autohalt.js +28 -16
- package/dist/bsdiff.d.ts +4 -0
- package/dist/bsdiff.js +465 -0
- package/dist/ci-comment.d.ts +38 -0
- package/dist/ci-comment.js +169 -0
- package/dist/ci-compare.d.ts +10 -0
- package/dist/ci-compare.js +25 -0
- package/dist/ci-shots.d.ts +9 -0
- package/dist/ci-shots.js +81 -0
- package/dist/ci.d.ts +8 -0
- package/dist/ci.js +64 -6
- package/dist/cli.js +23 -1
- package/dist/config.d.ts +13 -0
- package/dist/config.js +43 -3
- package/dist/doctor.js +63 -7
- package/dist/ensure-playwright.d.ts +4 -0
- package/dist/ensure-playwright.js +7 -2
- package/dist/explore-issues.d.ts +12 -0
- package/dist/explore-issues.js +50 -0
- package/dist/explore.d.ts +83 -7
- package/dist/explore.js +326 -77
- package/dist/flows.d.ts +31 -0
- package/dist/flows.js +264 -0
- package/dist/help.d.ts +2 -2
- package/dist/help.js +19 -10
- package/dist/hermes.d.ts +10 -0
- package/dist/hermes.js +50 -0
- package/dist/init.d.ts +1 -0
- package/dist/init.js +41 -6
- package/dist/json-out.d.ts +53 -0
- package/dist/json-out.js +91 -0
- package/dist/keys-json.d.ts +1 -0
- package/dist/keys-json.js +71 -0
- package/dist/login.js +27 -11
- package/dist/lumi.d.ts +104 -0
- package/dist/lumi.js +364 -0
- package/dist/migrate.d.ts +27 -0
- package/dist/migrate.js +521 -0
- package/dist/preview.d.ts +1 -0
- package/dist/preview.js +4 -2
- package/dist/promote.d.ts +1 -1
- package/dist/promote.js +38 -16
- package/dist/publish.d.ts +14 -2
- package/dist/publish.js +126 -62
- package/dist/qr.d.ts +9 -0
- package/dist/qr.js +213 -0
- package/dist/report-md.d.ts +1 -0
- package/dist/report-md.js +1 -1
- package/dist/rotation.d.ts +57 -0
- package/dist/rotation.js +157 -0
- package/dist/run-bridge.js +356 -2
- package/dist/run-net.d.ts +39 -0
- package/dist/run-net.js +266 -0
- package/dist/run.d.ts +23 -0
- package/dist/run.js +101 -17
- package/dist/signing.js +13 -0
- package/dist/sim.js +7 -3
- package/dist/smoke.d.ts +28 -0
- package/dist/smoke.js +117 -0
- package/dist/spawn-bin.d.ts +11 -0
- package/dist/spawn-bin.js +21 -0
- package/dist/status.d.ts +26 -4
- package/dist/status.js +69 -5
- package/dist/templates/github-action/shipvo-check.yml +18 -0
- package/dist/test.d.ts +1 -1
- package/dist/test.js +81 -18
- package/package.json +4 -3
- package/skills/shipvo-cli/SKILL.md +31 -0
package/dist/explore.d.ts
CHANGED
|
@@ -8,6 +8,13 @@ export type Step = {
|
|
|
8
8
|
role: string;
|
|
9
9
|
name: string;
|
|
10
10
|
nth: number;
|
|
11
|
+
} | {
|
|
12
|
+
action: "type";
|
|
13
|
+
role: string;
|
|
14
|
+
name: string;
|
|
15
|
+
nth: number;
|
|
16
|
+
text: string;
|
|
17
|
+
enter?: boolean;
|
|
11
18
|
} | {
|
|
12
19
|
action: "back";
|
|
13
20
|
};
|
|
@@ -26,10 +33,19 @@ export type Driver = {
|
|
|
26
33
|
openUrl(url: string): Promise<Reply>;
|
|
27
34
|
tap(ref: string): Promise<Reply>;
|
|
28
35
|
back(): Promise<Reply>;
|
|
36
|
+
/** Type into a text field. Optional: without it the walker does not fill fields. `enter` presses Enter after the text. */
|
|
37
|
+
type?(ref: string, text: string, enter?: boolean): Promise<Reply>;
|
|
38
|
+
/** Look at the current screen again without acting. Optional: without it `stuck_loading` is not checked. */
|
|
39
|
+
snapshot?(): Promise<Reply>;
|
|
29
40
|
/** Uncaught page errors since the last call. */
|
|
30
41
|
errors(): Promise<string[]>;
|
|
42
|
+
/** Rendered size in px of each ref on the current screen. Optional: without it the size check is skipped. */
|
|
43
|
+
sizes?(): Promise<Record<string, [number, number]>>;
|
|
31
44
|
};
|
|
32
|
-
export type
|
|
45
|
+
export type Skin = "android" | "ios";
|
|
46
|
+
/** Smallest tap target: 44 x 44 pt on iOS (Apple HIG), 48 x 48 dp on Android (Material and Android accessibility guide). */
|
|
47
|
+
export declare const MIN_TARGET: Record<Skin, number>;
|
|
48
|
+
export type Kind = "error" | "not_delivered" | "action_failed" | "dead_end" | "unnamed" | "small_target" | "duplicate_name" | "network_failed" | "stuck_loading" | "blank_screen";
|
|
33
49
|
export type Finding = {
|
|
34
50
|
kind: Kind;
|
|
35
51
|
message: string;
|
|
@@ -49,6 +65,8 @@ export type Report = {
|
|
|
49
65
|
parityLimits: string[];
|
|
50
66
|
};
|
|
51
67
|
export declare const PARITY_LIMITS: string[];
|
|
68
|
+
/** A value for a field, from its label: one the field should accept, or one it should reject. */
|
|
69
|
+
export declare function sampleValue(name: string, invalid: boolean): string;
|
|
52
70
|
type El = {
|
|
53
71
|
role: string;
|
|
54
72
|
name: string;
|
|
@@ -56,29 +74,87 @@ type El = {
|
|
|
56
74
|
nth: number;
|
|
57
75
|
};
|
|
58
76
|
/** Actionable elements in a tree, in order. `nth` counts earlier elements with the same role and name. Disabled ones are left out. */
|
|
59
|
-
export declare
|
|
77
|
+
export declare const elements: (tree: string) => El[];
|
|
78
|
+
export declare const fieldElements: (tree: string) => El[];
|
|
60
79
|
/** The tree without refs, to tell whether two screens are the same. */
|
|
61
80
|
export declare const signature: (tree: string) => string;
|
|
62
81
|
/** Steps in plain lines, for the report. */
|
|
63
82
|
export declare const describeStep: (s: Step) => string;
|
|
64
|
-
export
|
|
83
|
+
export type WalkOptions = {
|
|
65
84
|
routes?: string[];
|
|
85
|
+
onlyRoutes?: boolean;
|
|
66
86
|
maxDepth?: number;
|
|
67
87
|
maxSteps?: number;
|
|
68
88
|
app?: string;
|
|
69
|
-
|
|
89
|
+
skin?: Skin;
|
|
90
|
+
/** Seed for tie-breaks and tap order. The same seed on the same app repeats the same walk. Default 1. */
|
|
91
|
+
seed?: number;
|
|
92
|
+
/** Wait in ms between looks at a screen that shows a loading indicator. Default 400. */
|
|
93
|
+
settleMs?: number;
|
|
94
|
+
/** Start paths to walk instead of the app's start screen and `routes`. Used by `shipvo lumi` to test one flow. */
|
|
95
|
+
startPaths?: Step[][];
|
|
96
|
+
/** "bad": only try invalid values in text fields, and try them first. Default "both". */
|
|
97
|
+
input?: "both" | "bad";
|
|
98
|
+
/** Called as the walk goes: each action taken, each new screen, each new finding. */
|
|
99
|
+
onEvent?: (e: WalkEvent) => void;
|
|
100
|
+
/** Checked before every action. When it returns true the walk ends and says it was stopped. */
|
|
101
|
+
shouldStop?: () => boolean;
|
|
102
|
+
};
|
|
103
|
+
export type WalkEvent = {
|
|
104
|
+
type: "step";
|
|
105
|
+
n: number;
|
|
106
|
+
step: Step;
|
|
107
|
+
text: string;
|
|
108
|
+
} | {
|
|
109
|
+
type: "screen";
|
|
110
|
+
screens: number;
|
|
111
|
+
sig: string;
|
|
112
|
+
controls: {
|
|
113
|
+
role: string;
|
|
114
|
+
name: string;
|
|
115
|
+
}[];
|
|
116
|
+
} | {
|
|
117
|
+
type: "finding";
|
|
118
|
+
n: number;
|
|
119
|
+
finding: Finding;
|
|
120
|
+
};
|
|
121
|
+
/**
|
|
122
|
+
* Walks the app. Each round it picks the screen to work on with an upper confidence bound: screens with nothing tried yet
|
|
123
|
+
* come first, then screens whose taps found new screens, with a bonus for rarely tried ones. On that screen it takes safe actions
|
|
124
|
+
* before risky ones (log out, delete, cancel, remove). Text fields get a valid value, then an invalid one.
|
|
125
|
+
*/
|
|
126
|
+
export declare function walk(driver: Driver, o?: WalkOptions): Promise<Report>;
|
|
70
127
|
export declare function renderMarkdown(r: Report): string;
|
|
71
128
|
/** Driver for a running simulator. */
|
|
72
|
-
export declare function simDriver(base: string, app: string, session?: string): Driver;
|
|
129
|
+
export declare function simDriver(base: string, app: string, session?: string, platform?: Skin): Driver;
|
|
73
130
|
/** Use the simulator at `--sim <url>`, or build the app and start one on `--port` (default 4546). `stop` kills the one we started. */
|
|
74
131
|
export declare function startSim(a: Record<string, string | undefined>, cfg: {
|
|
75
132
|
name: string;
|
|
76
133
|
appId: string;
|
|
77
134
|
controlPlane: string;
|
|
78
|
-
}): Promise<{
|
|
135
|
+
}, quiet?: boolean): Promise<{
|
|
79
136
|
base: string;
|
|
80
137
|
stop: () => void;
|
|
81
138
|
}>;
|
|
82
|
-
/** Returns the exit code. */
|
|
139
|
+
/** Returns the exit code. With `--json`, stdout is one envelope and everything else goes to stderr. */
|
|
83
140
|
export declare function explore(argv: string[]): Promise<number>;
|
|
141
|
+
/** The app's URL scheme: `expo.scheme` in app.json, else the scheme of a configured route such as "tide://cart". */
|
|
142
|
+
export declare function appScheme(routes: string[] | undefined, dir?: string): string | undefined;
|
|
143
|
+
/**
|
|
144
|
+
* Deep links to walk for `--changed-from <sha>`: the changed, routable screens (up to four), as `<scheme>://<screen>`.
|
|
145
|
+
* The walker opens them with the simulator's `open_url` action, which needs a URL the app's `onUrl` listener understands.
|
|
146
|
+
* If the diff cannot be read (for example a shallow checkout), or the app has no known scheme, say so and fall back to the full walk.
|
|
147
|
+
*/
|
|
148
|
+
export declare function routesFromChange(sha: string, log?: (s: string) => void, scheme?: string): Promise<{
|
|
149
|
+
routes?: string[];
|
|
150
|
+
onlyRoutes: boolean;
|
|
151
|
+
}>;
|
|
152
|
+
/** Exit code and `--json` code. A failed flow counts as a finding for `--fail-on-findings`; it has its own code when the walk found nothing. */
|
|
153
|
+
export declare function outcome(report: {
|
|
154
|
+
error?: string | null;
|
|
155
|
+
findings: unknown[];
|
|
156
|
+
}, flowsFailed: boolean, failOn: boolean): {
|
|
157
|
+
exit: number;
|
|
158
|
+
code: string;
|
|
159
|
+
};
|
|
84
160
|
export {};
|