@storybook/cli 10.5.0-alpha.6 → 10.5.0-alpha.7
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-KNOD2BWP.js → block-dependencies-versions-7OYN4OJ6.js} +11 -11
- package/dist/_node-chunks/{block-experimental-addon-test-I3NQZ67T.js → block-experimental-addon-test-2YUVRX5Y.js} +9 -9
- package/dist/_node-chunks/{block-major-version-DMTKXUJW.js → block-major-version-SNHXUXIT.js} +9 -9
- package/dist/_node-chunks/{block-node-version-SYSCMPRY.js → block-node-version-NPHJGOFN.js} +9 -9
- package/dist/_node-chunks/{block-webpack5-frameworks-DT3SZDJW.js → block-webpack5-frameworks-GZA34OZU.js} +11 -11
- package/dist/_node-chunks/{chunk-DN3UQRPJ.js → chunk-3OLDFVDH.js} +8 -8
- package/dist/_node-chunks/{chunk-4S7L4PUE.js → chunk-46TO6QSJ.js} +32 -109
- package/dist/_node-chunks/{chunk-5EYTFADV.js → chunk-7UM5AIIV.js} +11 -7
- package/dist/_node-chunks/{chunk-7T5TVMZN.js → chunk-QXN4FHHX.js} +10 -10
- package/dist/_node-chunks/chunk-RSLATG3U.js +11 -0
- package/dist/_node-chunks/{globby-N7FUCNB3.js → globby-SCRW7ORA.js} +8 -8
- package/dist/_node-chunks/{p-limit-T5KZSKYN.js → p-limit-EE6XMDEK.js} +7 -7
- package/dist/_node-chunks/{run-MGTW4EFF.js → run-XZO7FX4L.js} +115 -510
- package/dist/bin/index.js +7 -7
- package/package.json +7 -5
- package/dist/_node-chunks/chunk-C7NSVZ7N.js +0 -115
- package/dist/_node-chunks/chunk-DUE3AZ4P.js +0 -23
- package/dist/_node-chunks/chunk-EOXTAHPM.js +0 -11
- package/dist/_node-chunks/chunk-LRDUNZP3.js +0 -638
- package/dist/_node-chunks/chunk-MSLRLTEZ.js +0 -20
- package/dist/_node-chunks/monorepo-3AUONKTW.js +0 -119
- package/dist/_node-chunks/monorepo-optimized-tests-relaxed-limits-no-story-deletion-UJ6Z3SDQ.js +0 -119
- package/dist/_node-chunks/optimized-tests-ZFPEYEWX.js +0 -20
- package/dist/_node-chunks/pattern-copy-play-4RLZSOFB.js +0 -810
- package/dist/_node-chunks/relaxed-limits-RJIY3AVP.js +0 -115
- package/dist/_node-chunks/setup-YM2FCT2N.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_h4vun2izro9 from 'node:url';
|
|
3
|
+
import CJS_COMPAT_NODE_PATH_h4vun2izro9 from 'node:path';
|
|
4
|
+
import CJS_COMPAT_NODE_MODULE_h4vun2izro9 from "node:module";
|
|
5
5
|
|
|
6
|
-
var __filename =
|
|
7
|
-
var __dirname =
|
|
8
|
-
var require =
|
|
6
|
+
var __filename = CJS_COMPAT_NODE_URL_h4vun2izro9.fileURLToPath(import.meta.url);
|
|
7
|
+
var __dirname = CJS_COMPAT_NODE_PATH_h4vun2izro9.dirname(__filename);
|
|
8
|
+
var require = CJS_COMPAT_NODE_MODULE_h4vun2izro9.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-XZO7FX4L.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.7",
|
|
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.7",
|
|
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.7",
|
|
44
44
|
"jscodeshift": "^0.15.1",
|
|
45
|
-
"storybook": "10.5.0-alpha.
|
|
45
|
+
"storybook": "10.5.0-alpha.7",
|
|
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,115 +0,0 @@
|
|
|
1
|
-
import CJS_COMPAT_NODE_URL_mdwh1fp8wrg from 'node:url';
|
|
2
|
-
import CJS_COMPAT_NODE_PATH_mdwh1fp8wrg from 'node:path';
|
|
3
|
-
import CJS_COMPAT_NODE_MODULE_mdwh1fp8wrg from "node:module";
|
|
4
|
-
|
|
5
|
-
var __filename = CJS_COMPAT_NODE_URL_mdwh1fp8wrg.fileURLToPath(import.meta.url);
|
|
6
|
-
var __dirname = CJS_COMPAT_NODE_PATH_mdwh1fp8wrg.dirname(__filename);
|
|
7
|
-
var require = CJS_COMPAT_NODE_MODULE_mdwh1fp8wrg.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-LRDUNZP3.js";
|
|
39
|
-
import {
|
|
40
|
-
getDocsMarkdownUrl
|
|
41
|
-
} from "./chunk-DUE3AZ4P.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
|
-
};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import CJS_COMPAT_NODE_URL_mdwh1fp8wrg from 'node:url';
|
|
2
|
-
import CJS_COMPAT_NODE_PATH_mdwh1fp8wrg from 'node:path';
|
|
3
|
-
import CJS_COMPAT_NODE_MODULE_mdwh1fp8wrg from "node:module";
|
|
4
|
-
|
|
5
|
-
var __filename = CJS_COMPAT_NODE_URL_mdwh1fp8wrg.fileURLToPath(import.meta.url);
|
|
6
|
-
var __dirname = CJS_COMPAT_NODE_PATH_mdwh1fp8wrg.dirname(__filename);
|
|
7
|
-
var require = CJS_COMPAT_NODE_MODULE_mdwh1fp8wrg.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,11 +0,0 @@
|
|
|
1
|
-
import CJS_COMPAT_NODE_URL_mdwh1fp8wrg from 'node:url';
|
|
2
|
-
import CJS_COMPAT_NODE_PATH_mdwh1fp8wrg from 'node:path';
|
|
3
|
-
import CJS_COMPAT_NODE_MODULE_mdwh1fp8wrg from "node:module";
|
|
4
|
-
|
|
5
|
-
var __filename = CJS_COMPAT_NODE_URL_mdwh1fp8wrg.fileURLToPath(import.meta.url);
|
|
6
|
-
var __dirname = CJS_COMPAT_NODE_PATH_mdwh1fp8wrg.dirname(__filename);
|
|
7
|
-
var require = CJS_COMPAT_NODE_MODULE_mdwh1fp8wrg.createRequire(import.meta.url);
|
|
8
|
-
|
|
9
|
-
// ------------------------------------------------------------
|
|
10
|
-
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
|
-
// ------------------------------------------------------------
|