@storybook/cli 10.5.0-alpha.0 → 10.5.0-alpha.10
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/dist/_node-chunks/{block-dependencies-versions-LUVHGQ4E.js → block-dependencies-versions-2DQ2VEG3.js} +11 -11
- package/dist/_node-chunks/{block-experimental-addon-test-CHFA7UJX.js → block-experimental-addon-test-FKSLCDFD.js} +9 -9
- package/dist/_node-chunks/{block-major-version-BCRBPIJN.js → block-major-version-JNXQTLXR.js} +9 -9
- package/dist/_node-chunks/{block-node-version-INMOTWO3.js → block-node-version-MDTEO7VH.js} +9 -9
- package/dist/_node-chunks/{block-webpack5-frameworks-DX5DWEVX.js → block-webpack5-frameworks-EMNMS74R.js} +11 -11
- package/dist/_node-chunks/{chunk-NRI6BMUA.js → chunk-H2QEOWWV.js} +38 -110
- package/dist/_node-chunks/{chunk-O742WTRJ.js → chunk-PT3MXNEM.js} +11 -7
- package/dist/_node-chunks/{chunk-F42YSFSV.js → chunk-SJTBUTPZ.js} +8 -8
- package/dist/_node-chunks/{chunk-M5QQDXN6.js → chunk-TZ6JQ5LP.js} +10 -10
- package/dist/_node-chunks/chunk-VRQFGBTP.js +11 -0
- package/dist/_node-chunks/{globby-2HVZ2ZNF.js → globby-UOXIA73E.js} +8 -8
- package/dist/_node-chunks/{p-limit-R3TFM55B.js → p-limit-NMGCOA4E.js} +7 -7
- package/dist/_node-chunks/{run-EBHH7HHT.js → run-7RKYWUHX.js} +2115 -2072
- package/dist/bin/index.js +7 -7
- package/package.json +7 -5
- package/dist/_node-chunks/chunk-3QR4IT74.js +0 -20
- package/dist/_node-chunks/chunk-6OBL3T7Z.js +0 -23
- package/dist/_node-chunks/chunk-HUPLWBFO.js +0 -115
- package/dist/_node-chunks/chunk-PYN6FCLA.js +0 -638
- package/dist/_node-chunks/chunk-TKMYHIJB.js +0 -11
- package/dist/_node-chunks/monorepo-RQIE2IMN.js +0 -119
- package/dist/_node-chunks/monorepo-optimized-tests-relaxed-limits-no-story-deletion-JXYX5YCE.js +0 -119
- package/dist/_node-chunks/optimized-tests-XVG66FTS.js +0 -20
- package/dist/_node-chunks/pattern-copy-play-GVQ5PPKC.js +0 -810
- package/dist/_node-chunks/relaxed-limits-QHWS5F3H.js +0 -115
- package/dist/_node-chunks/setup-UOG35KQ6.js +0 -281
package/dist/bin/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
2
|
+
import CJS_COMPAT_NODE_URL_jirv11fh85q from 'node:url';
|
|
3
|
+
import CJS_COMPAT_NODE_PATH_jirv11fh85q from 'node:path';
|
|
4
|
+
import CJS_COMPAT_NODE_MODULE_jirv11fh85q from "node:module";
|
|
5
5
|
|
|
6
|
-
var __filename =
|
|
7
|
-
var __dirname =
|
|
8
|
-
var require =
|
|
6
|
+
var __filename = CJS_COMPAT_NODE_URL_jirv11fh85q.fileURLToPath(import.meta.url);
|
|
7
|
+
var __dirname = CJS_COMPAT_NODE_PATH_jirv11fh85q.dirname(__filename);
|
|
8
|
+
var require = CJS_COMPAT_NODE_MODULE_jirv11fh85q.createRequire(import.meta.url);
|
|
9
9
|
|
|
10
10
|
// ------------------------------------------------------------
|
|
11
11
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -20,4 +20,4 @@ isNodeVersionSupported(major, minor, patch) || (logger.error(
|
|
|
20
20
|
dedent`To run Storybook, you need Node.js version ${MIN_SUPPORTED_NODE_DESCRIPTION}.
|
|
21
21
|
You are currently running Node.js ${process.version}. Please upgrade your Node.js installation.`
|
|
22
22
|
), process.exit(1));
|
|
23
|
-
import("../_node-chunks/run-
|
|
23
|
+
import("../_node-chunks/run-7RKYWUHX.js");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storybook/cli",
|
|
3
|
-
"version": "10.5.0-alpha.
|
|
3
|
+
"version": "10.5.0-alpha.10",
|
|
4
4
|
"description": "Storybook CLI: Develop, document, and test UI components in isolation",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"storybook",
|
|
@@ -37,12 +37,12 @@
|
|
|
37
37
|
"!src/**/*"
|
|
38
38
|
],
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@storybook/codemod": "10.5.0-alpha.
|
|
40
|
+
"@storybook/codemod": "10.5.0-alpha.10",
|
|
41
41
|
"@types/semver": "^7.7.1",
|
|
42
42
|
"commander": "^14.0.2",
|
|
43
|
-
"create-storybook": "10.5.0-alpha.
|
|
43
|
+
"create-storybook": "10.5.0-alpha.10",
|
|
44
44
|
"jscodeshift": "^0.15.1",
|
|
45
|
-
"storybook": "10.5.0-alpha.
|
|
45
|
+
"storybook": "10.5.0-alpha.10",
|
|
46
46
|
"ts-dedent": "^2.0.0"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
@@ -54,13 +54,15 @@
|
|
|
54
54
|
"envinfo": "^7.14.0",
|
|
55
55
|
"globby": "^14.1.0",
|
|
56
56
|
"leven": "^4.0.0",
|
|
57
|
+
"memfs": "^4.11.1",
|
|
57
58
|
"p-limit": "^7.2.0",
|
|
58
59
|
"picocolors": "^1.1.0",
|
|
59
60
|
"semver": "^7.7.3",
|
|
60
61
|
"slash": "^5.0.0",
|
|
61
62
|
"tiny-invariant": "^1.3.3",
|
|
62
63
|
"tinyclip": "^0.1.12",
|
|
63
|
-
"typescript": "^5.8.3"
|
|
64
|
+
"typescript": "^5.8.3",
|
|
65
|
+
"valibot": "^1.4.0"
|
|
64
66
|
},
|
|
65
67
|
"publishConfig": {
|
|
66
68
|
"access": "public"
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import CJS_COMPAT_NODE_URL_xw50atswt2 from 'node:url';
|
|
2
|
-
import CJS_COMPAT_NODE_PATH_xw50atswt2 from 'node:path';
|
|
3
|
-
import CJS_COMPAT_NODE_MODULE_xw50atswt2 from "node:module";
|
|
4
|
-
|
|
5
|
-
var __filename = CJS_COMPAT_NODE_URL_xw50atswt2.fileURLToPath(import.meta.url);
|
|
6
|
-
var __dirname = CJS_COMPAT_NODE_PATH_xw50atswt2.dirname(__filename);
|
|
7
|
-
var require = CJS_COMPAT_NODE_MODULE_xw50atswt2.createRequire(import.meta.url);
|
|
8
|
-
|
|
9
|
-
// ------------------------------------------------------------
|
|
10
|
-
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
|
-
// ------------------------------------------------------------
|
|
12
|
-
|
|
13
|
-
// src/ai/utils/type-import-source.ts
|
|
14
|
-
function getTypeImportSource(projectInfo) {
|
|
15
|
-
return projectInfo.framework || projectInfo.rendererPackage || "@storybook/react";
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export {
|
|
19
|
-
getTypeImportSource
|
|
20
|
-
};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import CJS_COMPAT_NODE_URL_xw50atswt2 from 'node:url';
|
|
2
|
-
import CJS_COMPAT_NODE_PATH_xw50atswt2 from 'node:path';
|
|
3
|
-
import CJS_COMPAT_NODE_MODULE_xw50atswt2 from "node:module";
|
|
4
|
-
|
|
5
|
-
var __filename = CJS_COMPAT_NODE_URL_xw50atswt2.fileURLToPath(import.meta.url);
|
|
6
|
-
var __dirname = CJS_COMPAT_NODE_PATH_xw50atswt2.dirname(__filename);
|
|
7
|
-
var require = CJS_COMPAT_NODE_MODULE_xw50atswt2.createRequire(import.meta.url);
|
|
8
|
-
|
|
9
|
-
// ------------------------------------------------------------
|
|
10
|
-
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
|
-
// ------------------------------------------------------------
|
|
12
|
-
|
|
13
|
-
// src/ai/utils/docs-markdown-url.ts
|
|
14
|
-
function getDocsMarkdownUrl(path, projectInfo) {
|
|
15
|
-
let { majorVersion, renderer = "react", language = "ts" } = projectInfo ?? {}, versionSegment = majorVersion ? `/${majorVersion}` : "", params = new URLSearchParams();
|
|
16
|
-
renderer && params.set("renderer", renderer), params.set("language", language);
|
|
17
|
-
let query = params.toString();
|
|
18
|
-
return `https://storybook.js.org/docs${versionSegment}/${path}.md${query ? `?${query}` : ""}`;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export {
|
|
22
|
-
getDocsMarkdownUrl
|
|
23
|
-
};
|
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
import CJS_COMPAT_NODE_URL_xw50atswt2 from 'node:url';
|
|
2
|
-
import CJS_COMPAT_NODE_PATH_xw50atswt2 from 'node:path';
|
|
3
|
-
import CJS_COMPAT_NODE_MODULE_xw50atswt2 from "node:module";
|
|
4
|
-
|
|
5
|
-
var __filename = CJS_COMPAT_NODE_URL_xw50atswt2.fileURLToPath(import.meta.url);
|
|
6
|
-
var __dirname = CJS_COMPAT_NODE_PATH_xw50atswt2.dirname(__filename);
|
|
7
|
-
var require = CJS_COMPAT_NODE_MODULE_xw50atswt2.createRequire(import.meta.url);
|
|
8
|
-
|
|
9
|
-
// ------------------------------------------------------------
|
|
10
|
-
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
|
-
// ------------------------------------------------------------
|
|
12
|
-
import {
|
|
13
|
-
batchTestsRule,
|
|
14
|
-
buildPortalStep,
|
|
15
|
-
buildSharedPreviewStep,
|
|
16
|
-
cleanupStep,
|
|
17
|
-
cssCheckDOD,
|
|
18
|
-
discoveryStepStrict,
|
|
19
|
-
editOverWriteRule,
|
|
20
|
-
ext,
|
|
21
|
-
interactionPlayStep,
|
|
22
|
-
listDOD,
|
|
23
|
-
listRules,
|
|
24
|
-
listSteps,
|
|
25
|
-
mswStep,
|
|
26
|
-
noPolishRule,
|
|
27
|
-
nodeModuleReadsRule,
|
|
28
|
-
packageManagerRule,
|
|
29
|
-
preferSharedFixesRule,
|
|
30
|
-
readBudgetRule,
|
|
31
|
-
sharedPreviewDOD,
|
|
32
|
-
storyTagsV1DOD,
|
|
33
|
-
toolsVsShellRule,
|
|
34
|
-
typeCheckPassesStrictDOD,
|
|
35
|
-
verifyStep,
|
|
36
|
-
vitestPassesStrictDOD,
|
|
37
|
-
writeStoriesStep
|
|
38
|
-
} from "./chunk-PYN6FCLA.js";
|
|
39
|
-
import {
|
|
40
|
-
getDocsMarkdownUrl
|
|
41
|
-
} from "./chunk-6OBL3T7Z.js";
|
|
42
|
-
|
|
43
|
-
// src/ai/setup-prompts/optimized-tests.ts
|
|
44
|
-
import { dedent } from "ts-dedent";
|
|
45
|
-
function instructions(projectInfo) {
|
|
46
|
-
let { configDir, language, needsUserOnboarding, packageManager, packageManagerName } = projectInfo, tsx = ext(language, !0), ts = ext(language, !1), docsUrl = (path) => getDocsMarkdownUrl(path, projectInfo), mswInstall = packageManager.getInstallCommand(
|
|
47
|
-
["msw", "msw-storybook-addon", "mockdate"],
|
|
48
|
-
!0
|
|
49
|
-
), ctx = {
|
|
50
|
-
configDir,
|
|
51
|
-
docsUrl,
|
|
52
|
-
mswInstall,
|
|
53
|
-
needsUserOnboarding,
|
|
54
|
-
packageManager,
|
|
55
|
-
packageManagerName,
|
|
56
|
-
tsx,
|
|
57
|
-
ts
|
|
58
|
-
};
|
|
59
|
-
return dedent`
|
|
60
|
-
Your goal is to make Storybook fully functional in this project: configure \`${configDir}/preview.${tsx}\` with the right decorators, add MSW for data, and write up to 10 colocated \`*.stories.${tsx}\` files. Add \`play\` functions only where they prove something non-trivial.
|
|
61
|
-
|
|
62
|
-
## Rules of engagement (follow strictly — these are time budgets, not suggestions)
|
|
63
|
-
|
|
64
|
-
${listRules([
|
|
65
|
-
toolsVsShellRule(ctx),
|
|
66
|
-
nodeModuleReadsRule(ctx),
|
|
67
|
-
readBudgetRule(ctx),
|
|
68
|
-
editOverWriteRule(ctx),
|
|
69
|
-
batchTestsRule(ctx),
|
|
70
|
-
packageManagerRule(ctx),
|
|
71
|
-
preferSharedFixesRule(ctx),
|
|
72
|
-
noPolishRule(ctx)
|
|
73
|
-
])}
|
|
74
|
-
|
|
75
|
-
## Plan (do not skip steps, but keep each step lean)
|
|
76
|
-
|
|
77
|
-
${listSteps(
|
|
78
|
-
[
|
|
79
|
-
discoveryStepStrict(projectInfo, ctx),
|
|
80
|
-
buildSharedPreviewStep(projectInfo, ctx),
|
|
81
|
-
buildPortalStep(projectInfo, ctx),
|
|
82
|
-
mswStep(projectInfo, ctx),
|
|
83
|
-
writeStoriesStep(projectInfo, ctx),
|
|
84
|
-
interactionPlayStep(projectInfo, ctx),
|
|
85
|
-
verifyStep(projectInfo, ctx),
|
|
86
|
-
cleanupStep(projectInfo, ctx)
|
|
87
|
-
],
|
|
88
|
-
{ level: 3 }
|
|
89
|
-
)}
|
|
90
|
-
|
|
91
|
-
## Done when
|
|
92
|
-
|
|
93
|
-
${listDOD([
|
|
94
|
-
cssCheckDOD(ctx),
|
|
95
|
-
storyTagsV1DOD(ctx),
|
|
96
|
-
vitestPassesStrictDOD(ctx),
|
|
97
|
-
typeCheckPassesStrictDOD(ctx),
|
|
98
|
-
sharedPreviewDOD(ctx)
|
|
99
|
-
])}
|
|
100
|
-
|
|
101
|
-
## Reference (only fetch if stuck)
|
|
102
|
-
|
|
103
|
-
- Docs index: https://storybook.js.org/llms.txt
|
|
104
|
-
- Writing stories: ${docsUrl("writing-stories")}
|
|
105
|
-
- Decorators: ${docsUrl("writing-stories/decorators")}
|
|
106
|
-
- Play functions: ${docsUrl("writing-stories/play-function")}
|
|
107
|
-
- Vitest integration: ${docsUrl("writing-tests/vitest-plugin")}
|
|
108
|
-
|
|
109
|
-
Append \`?codeOnly=true\` to any docs URL for code-only snippets. Don't fetch unless a specific question can't be answered from this prompt.
|
|
110
|
-
`;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
export {
|
|
114
|
-
instructions
|
|
115
|
-
};
|