@cappa/plugin-storybook 0.0.19 → 0.0.21
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/.turbo/turbo-build.log +6 -6
- package/CHANGELOG.md +16 -0
- package/dist/index.js +7 -3
- package/dist/index.mjs +7 -3
- package/package.json +6 -5
- package/src/cappa/plugin.ts +6 -3
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
|
-
> @cappa/plugin-storybook@0.0.
|
|
3
|
+
> @cappa/plugin-storybook@0.0.20 build /home/tim/code/work/cappa/packages/plugins/plugin-storybook
|
|
4
4
|
> tsup
|
|
5
5
|
|
|
6
6
|
[34mCLI[39m Building entry: src/index.ts
|
|
@@ -27,13 +27,13 @@
|
|
|
27
27
|
[34mESM[39m Build start
|
|
28
28
|
[32mESM[39m [1mdist/browser.mjs [22m[32m138.00 B[39m
|
|
29
29
|
[32mESM[39m ⚡️ Build success in 6ms
|
|
30
|
+
[32mESM[39m [1mdist/index.mjs [22m[32m6.75 KB[39m
|
|
31
|
+
[32mESM[39m ⚡️ Build success in 9ms
|
|
30
32
|
[32mESM[39m [1mdist/preview.mjs [22m[32m1.34 KB[39m
|
|
31
33
|
[32mESM[39m ⚡️ Build success in 8ms
|
|
32
|
-
[32mCJS[39m [1mdist/index.js [22m[
|
|
33
|
-
[32mCJS[39m ⚡️ Build success in
|
|
34
|
-
[32mESM[39m [1mdist/index.mjs [22m[32m6.57 KB[39m
|
|
35
|
-
[32mESM[39m ⚡️ Build success in 9ms
|
|
34
|
+
[32mCJS[39m [1mdist/index.js [22m[32m8.11 KB[39m
|
|
35
|
+
[32mCJS[39m ⚡️ Build success in 10ms
|
|
36
36
|
DTS Build start
|
|
37
|
-
DTS ⚡️ Build success in
|
|
37
|
+
DTS ⚡️ Build success in 807ms
|
|
38
38
|
DTS dist/index.d.ts 593.00 B
|
|
39
39
|
DTS dist/index.d.mts 593.00 B
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @cappa/plugin-storybook
|
|
2
2
|
|
|
3
|
+
## 0.0.21
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- e01e7c5: Add better report output
|
|
8
|
+
- Updated dependencies [e01e7c5]
|
|
9
|
+
- @cappa/core@0.0.21
|
|
10
|
+
|
|
11
|
+
## 0.0.20
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- eb34ecb: Add clean option to cli
|
|
16
|
+
- Updated dependencies [eb34ecb]
|
|
17
|
+
- @cappa/core@0.0.20
|
|
18
|
+
|
|
3
19
|
## 0.0.19
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
package/dist/index.js
CHANGED
|
@@ -59,6 +59,7 @@ var buildFilename = (story) => {
|
|
|
59
59
|
};
|
|
60
60
|
|
|
61
61
|
// src/cappa/plugin.ts
|
|
62
|
+
var import_chalk = __toESM(require("chalk"));
|
|
62
63
|
function createLatch() {
|
|
63
64
|
let resolve;
|
|
64
65
|
const p = new Promise((r) => resolve = r);
|
|
@@ -203,9 +204,12 @@ ${results.filter((r) => r.error).map((r) => `${r.storyName}: ${r.error}`).join("
|
|
|
203
204
|
${results.filter((r) => r.skipped).map((r) => `${r.storyName}`).join("\n")}`
|
|
204
205
|
);
|
|
205
206
|
}
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
207
|
+
logger.box({
|
|
208
|
+
title: "StorybookReport",
|
|
209
|
+
message: `${import_chalk.default.yellow("Skipped stories:")} ${results.filter((r) => r.skipped).length}
|
|
210
|
+
${import_chalk.default.red("Failed stories:")} ${results.filter((r) => r.error).length}
|
|
211
|
+
${import_chalk.default.green("Successful screenshots:")} ${results.length}`
|
|
212
|
+
});
|
|
209
213
|
return results;
|
|
210
214
|
} catch (error) {
|
|
211
215
|
console.error("Error in Storybook plugin:", error.message);
|
package/dist/index.mjs
CHANGED
|
@@ -29,6 +29,7 @@ var buildFilename = (story) => {
|
|
|
29
29
|
};
|
|
30
30
|
|
|
31
31
|
// src/cappa/plugin.ts
|
|
32
|
+
import chalk from "chalk";
|
|
32
33
|
function createLatch() {
|
|
33
34
|
let resolve;
|
|
34
35
|
const p = new Promise((r) => resolve = r);
|
|
@@ -173,9 +174,12 @@ ${results.filter((r) => r.error).map((r) => `${r.storyName}: ${r.error}`).join("
|
|
|
173
174
|
${results.filter((r) => r.skipped).map((r) => `${r.storyName}`).join("\n")}`
|
|
174
175
|
);
|
|
175
176
|
}
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
177
|
+
logger.box({
|
|
178
|
+
title: "StorybookReport",
|
|
179
|
+
message: `${chalk.yellow("Skipped stories:")} ${results.filter((r) => r.skipped).length}
|
|
180
|
+
${chalk.red("Failed stories:")} ${results.filter((r) => r.error).length}
|
|
181
|
+
${chalk.green("Successful screenshots:")} ${results.length}`
|
|
182
|
+
});
|
|
179
183
|
return results;
|
|
180
184
|
} catch (error) {
|
|
181
185
|
console.error("Error in Storybook plugin:", error.message);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cappa/plugin-storybook",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.21",
|
|
4
4
|
"description": "Storybook plugin for Cappa - takes screenshots of Storybook stories",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -29,16 +29,17 @@
|
|
|
29
29
|
"license": "MIT",
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@swc/core": "^1.13.5",
|
|
32
|
+
"chalk": "^5.6.2",
|
|
32
33
|
"storybook": "^9.1.5",
|
|
33
|
-
"@cappa/core": "0.0.
|
|
34
|
+
"@cappa/core": "0.0.21"
|
|
34
35
|
},
|
|
35
36
|
"devDependencies": {
|
|
37
|
+
"@vitest/coverage-v8": "3.2.4",
|
|
38
|
+
"@vitest/ui": "3.2.4",
|
|
36
39
|
"playwright-core": "^1.55.0",
|
|
37
40
|
"tsup": "8.5.0",
|
|
38
41
|
"typescript": "5.7.3",
|
|
39
|
-
"vitest": "3.2.4"
|
|
40
|
-
"@vitest/coverage-v8": "3.2.4",
|
|
41
|
-
"@vitest/ui": "3.2.4"
|
|
42
|
+
"vitest": "3.2.4"
|
|
42
43
|
},
|
|
43
44
|
"scripts": {
|
|
44
45
|
"test": "vitest",
|
package/src/cappa/plugin.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { Plugin, ScreenshotOptions } from "@cappa/core";
|
|
2
2
|
import { buildFilename, freezeUI, waitForVisualIdle } from "./util";
|
|
3
|
+
import chalk from "chalk";
|
|
3
4
|
|
|
4
5
|
export interface StorybookStory {
|
|
5
6
|
id: string;
|
|
@@ -235,9 +236,11 @@ export const cappaPluginStorybook: Plugin<StorybookPluginOptions> = (
|
|
|
235
236
|
);
|
|
236
237
|
}
|
|
237
238
|
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
239
|
+
logger.box({
|
|
240
|
+
title: "StorybookReport",
|
|
241
|
+
message: `${chalk.yellow("Skipped stories:")} ${results.filter((r) => r.skipped).length}\n${chalk.red("Failed stories:")} ${results.filter((r) => r.error).length}\n${chalk.green("Successful screenshots:")} ${results.length}`,
|
|
242
|
+
});
|
|
243
|
+
|
|
241
244
|
return results;
|
|
242
245
|
} catch (error) {
|
|
243
246
|
console.error("Error in Storybook plugin:", (error as Error).message);
|