@kaptures/cli 0.5.0 → 0.6.1
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 +34 -17
- package/dist/index.js +273 -65
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -9,14 +9,14 @@ matching `@kaptures/storybook@0.2.0` preview adapter. Kapture does not fall back
|
|
|
9
9
|
to Storybook private globals, legacy decorators, or Chromatic parameters.
|
|
10
10
|
|
|
11
11
|
```bash
|
|
12
|
-
npx -y @kaptures/cli@0.
|
|
13
|
-
npx -y @kaptures/cli@0.
|
|
12
|
+
npx -y @kaptures/cli@0.5.0 --help
|
|
13
|
+
npx -y @kaptures/cli@0.5.0 browser install
|
|
14
14
|
```
|
|
15
15
|
|
|
16
16
|
## Compare Storybooks
|
|
17
17
|
|
|
18
18
|
```bash
|
|
19
|
-
npx -y @kaptures/cli@0.
|
|
19
|
+
npx -y @kaptures/cli@0.5.0 test \
|
|
20
20
|
--base-dir .kapture/storybook/base \
|
|
21
21
|
--head-dir .kapture/storybook/head \
|
|
22
22
|
--base-revision "$BASE_SHA" \
|
|
@@ -25,7 +25,7 @@ npx -y @kaptures/cli@0.2.0 test \
|
|
|
25
25
|
--install-browser \
|
|
26
26
|
--output .kapture
|
|
27
27
|
|
|
28
|
-
npx -y @kaptures/cli@0.
|
|
28
|
+
npx -y @kaptures/cli@0.5.0 validate \
|
|
29
29
|
--report .kapture/report/report.json
|
|
30
30
|
```
|
|
31
31
|
|
|
@@ -37,6 +37,23 @@ base or head revision changes beyond the configured threshold, the snapshot is
|
|
|
37
37
|
reported as `unstable` with repeat and self-diff PNG evidence. Unstable
|
|
38
38
|
snapshots remain visible but do not block CI or enter the approval count.
|
|
39
39
|
|
|
40
|
+
## CI setup
|
|
41
|
+
|
|
42
|
+
The next minor release adds `kapture ci --package-manager npm|yarn|pnpm|bun`.
|
|
43
|
+
It generates complete capture, report, and approval workflows without
|
|
44
|
+
overwriting existing files. The same templates appear in the documentation's
|
|
45
|
+
package-manager tabs. Connect your own static deployment step before enabling
|
|
46
|
+
the report workflow; its placeholder intentionally fails until configured.
|
|
47
|
+
|
|
48
|
+
Kapture owns artifact validation, capture, review preparation and approval.
|
|
49
|
+
Your project owns dependency installation, Storybook builds, fonts, hosting
|
|
50
|
+
credentials and immutable deployment URLs. No external private Action
|
|
51
|
+
repository is required.
|
|
52
|
+
|
|
53
|
+
`test --github-artifacts` preserves capture-error reports for upload; a
|
|
54
|
+
successful capture job is not a passing visual review. The trusted report
|
|
55
|
+
workflow publishes the final status and independently finalizes failed runs.
|
|
56
|
+
|
|
40
57
|
## MCP for agents
|
|
41
58
|
|
|
42
59
|
Serve one local or public HTTPS report through the official Model Context
|
|
@@ -62,7 +79,7 @@ of project-relative Git diff paths to select only stories whose base or head
|
|
|
62
79
|
dependency graph is affected:
|
|
63
80
|
|
|
64
81
|
```bash
|
|
65
|
-
npx -y @kaptures/cli@0.
|
|
82
|
+
npx -y @kaptures/cli@0.5.0 plan \
|
|
66
83
|
--base-dir .kapture/storybook/base \
|
|
67
84
|
--head-dir .kapture/storybook/head \
|
|
68
85
|
--changed-files .kapture/changed-files.json \
|
|
@@ -83,7 +100,7 @@ artifact is downloaded. To publish a browser URL from a privileged workflow,
|
|
|
83
100
|
rebuild the untrusted artifact with the dashboard embedded in the pinned CLI:
|
|
84
101
|
|
|
85
102
|
```bash
|
|
86
|
-
npx -y @kaptures/cli@0.
|
|
103
|
+
npx -y @kaptures/cli@0.5.0 report build \
|
|
87
104
|
--input downloaded-kapture-report \
|
|
88
105
|
--output trusted-kapture-report
|
|
89
106
|
```
|
|
@@ -139,46 +156,46 @@ The raw branch ref remains report metadata; a separate collision-resistant
|
|
|
139
156
|
`preview-alias` is used only where a DNS-safe hosting branch is required.
|
|
140
157
|
|
|
141
158
|
```bash
|
|
142
|
-
npx -y @kaptures/cli@0.
|
|
159
|
+
npx -y @kaptures/cli@0.5.0 github reconcile-run \
|
|
143
160
|
--capture-workflow-path .github/workflows/visual-capture.yml \
|
|
144
161
|
--base-branch main \
|
|
145
162
|
--status-context "Kapture Visual Review"
|
|
146
163
|
|
|
147
|
-
npx -y @kaptures/cli@0.
|
|
164
|
+
npx -y @kaptures/cli@0.5.0 github prepare-run \
|
|
148
165
|
--capture-workflow-path .github/workflows/visual-capture.yml \
|
|
149
166
|
--base-branch main \
|
|
150
167
|
--output "$RUNNER_TEMP/kapture-trusted/report" \
|
|
151
168
|
--receipt "$RUNNER_TEMP/kapture-trusted/receipt.json" \
|
|
152
169
|
--storybook-url ./storybook/
|
|
153
170
|
|
|
154
|
-
npx -y @kaptures/cli@0.
|
|
171
|
+
npx -y @kaptures/cli@0.5.0 github prepare-storybook-run \
|
|
155
172
|
--capture-workflow-path .github/workflows/visual-capture.yml \
|
|
156
173
|
--base-branch main \
|
|
157
174
|
--receipt "$RUNNER_TEMP/kapture-trusted/receipt.json" \
|
|
158
175
|
--output "$RUNNER_TEMP/kapture-trusted/report/storybook"
|
|
159
176
|
|
|
160
|
-
npx -y @kaptures/cli@0.
|
|
177
|
+
npx -y @kaptures/cli@0.5.0 github publish-run \
|
|
161
178
|
--receipt "$RUNNER_TEMP/kapture-trusted/receipt.json" \
|
|
162
179
|
--report "$RUNNER_TEMP/kapture-trusted/report/report.json" \
|
|
163
|
-
--report-url "https://
|
|
180
|
+
--report-url "https://reports.example.com/builds/1a2b3c4d/" \
|
|
164
181
|
--status-context "Kapture Visual Review"
|
|
165
182
|
|
|
166
|
-
npx -y @kaptures/cli@0.
|
|
183
|
+
npx -y @kaptures/cli@0.5.0 github cleanup \
|
|
167
184
|
--receipt "$RUNNER_TEMP/kapture-trusted/receipt.json"
|
|
168
185
|
|
|
169
|
-
npx -y @kaptures/cli@0.
|
|
186
|
+
npx -y @kaptures/cli@0.5.0 github finalize-run \
|
|
170
187
|
--capture-workflow-path .github/workflows/visual-capture.yml \
|
|
171
188
|
--base-branch main \
|
|
172
189
|
--status-context "Kapture Visual Review"
|
|
173
190
|
|
|
174
|
-
npx -y @kaptures/cli@0.
|
|
191
|
+
npx -y @kaptures/cli@0.5.0 github verify \
|
|
175
192
|
--report .kapture/report/report.json
|
|
176
193
|
|
|
177
|
-
npx -y @kaptures/cli@0.
|
|
194
|
+
npx -y @kaptures/cli@0.5.0 github report \
|
|
178
195
|
--report trusted-kapture-report/report.json \
|
|
179
|
-
--report-url "https://
|
|
196
|
+
--report-url "https://reports.example.com/builds/1a2b3c4d/"
|
|
180
197
|
|
|
181
|
-
npx -y @kaptures/cli@0.
|
|
198
|
+
npx -y @kaptures/cli@0.5.0 github approve
|
|
182
199
|
```
|
|
183
200
|
|
|
184
201
|
GitHub commands read authentication and event data only from `GITHUB_TOKEN`
|