@storybook/cli 10.4.0-alpha.9 → 10.4.0
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-ZBEFJKRH.js → block-dependencies-versions-2FUXZ5CY.js} +11 -11
- package/dist/_node-chunks/{block-experimental-addon-test-2J2EI26J.js → block-experimental-addon-test-OLXMV4WY.js} +9 -9
- package/dist/_node-chunks/{block-major-version-T2HMVIXA.js → block-major-version-3ONUXRX7.js} +9 -9
- package/dist/_node-chunks/{block-node-version-B7D6ADCG.js → block-node-version-72NZK3TH.js} +9 -9
- package/dist/_node-chunks/{block-webpack5-frameworks-735HFPAS.js → block-webpack5-frameworks-ZYQRFEAY.js} +11 -11
- package/dist/_node-chunks/{chunk-KMOZMHXY.js → chunk-5CZRH4L2.js} +6 -6
- package/dist/_node-chunks/chunk-BAB7TWIX.js +20 -0
- package/dist/_node-chunks/{chunk-CM5XGY6F.js → chunk-BRMCKSDM.js} +7 -7
- package/dist/_node-chunks/chunk-BYULXXYI.js +11 -0
- package/dist/_node-chunks/chunk-DYSRKIJT.js +23 -0
- package/dist/_node-chunks/chunk-L5XJ6BK3.js +638 -0
- package/dist/_node-chunks/chunk-OCLBRGHS.js +115 -0
- package/dist/_node-chunks/{chunk-HNY2PNPG.js → chunk-UCOB2TZD.js} +7 -7
- package/dist/_node-chunks/{chunk-TOPUV6KI.js → chunk-UI4WZ34X.js} +28 -17
- package/dist/_node-chunks/{globby-GGFRIMJG.js → globby-4NOR2DQO.js} +8 -8
- package/dist/_node-chunks/monorepo-UN2SFOKP.js +119 -0
- package/dist/_node-chunks/monorepo-optimized-tests-relaxed-limits-no-story-deletion-5YVGNWCV.js +119 -0
- package/dist/_node-chunks/optimized-tests-JK7ONDR4.js +20 -0
- package/dist/_node-chunks/{p-limit-SUJZ4KSM.js → p-limit-BPN7VYEH.js} +7 -7
- package/dist/_node-chunks/pattern-copy-play-7YSOSVSA.js +810 -0
- package/dist/_node-chunks/relaxed-limits-JZ6RZ46W.js +115 -0
- package/dist/_node-chunks/{run-2DIHBNRR.js → run-CMSUW4EI.js} +1158 -295
- package/dist/_node-chunks/setup-WU7VMOU5.js +281 -0
- package/dist/bin/index.js +7 -7
- package/package.json +5 -4
- package/dist/_node-chunks/chunk-KV24PD3C.js +0 -11
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import CJS_COMPAT_NODE_URL_qwqib56gpq from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_qwqib56gpq from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_qwqib56gpq from "node:module";
|
|
4
|
+
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_qwqib56gpq.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_qwqib56gpq.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_qwqib56gpq.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-L5XJ6BK3.js";
|
|
39
|
+
import {
|
|
40
|
+
getDocsMarkdownUrl
|
|
41
|
+
} from "./chunk-DYSRKIJT.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,17 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_qwqib56gpq from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_qwqib56gpq from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_qwqib56gpq from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_qwqib56gpq.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_qwqib56gpq.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_qwqib56gpq.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
11
|
// ------------------------------------------------------------
|
|
12
12
|
import {
|
|
13
13
|
__commonJS
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-5CZRH4L2.js";
|
|
15
15
|
|
|
16
16
|
// ../../../node_modules/semver/internal/constants.js
|
|
17
17
|
var require_constants = __commonJS({
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_qwqib56gpq from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_qwqib56gpq from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_qwqib56gpq from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_qwqib56gpq.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_qwqib56gpq.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_qwqib56gpq.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -12,14 +12,14 @@ var require = CJS_COMPAT_NODE_MODULE_r0u17tnf7k.createRequire(import.meta.url);
|
|
|
12
12
|
import {
|
|
13
13
|
globby,
|
|
14
14
|
globbySync
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-BRMCKSDM.js";
|
|
16
16
|
import {
|
|
17
17
|
require_semver
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-UCOB2TZD.js";
|
|
19
19
|
import {
|
|
20
20
|
__commonJS,
|
|
21
21
|
__toESM
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-5CZRH4L2.js";
|
|
23
23
|
|
|
24
24
|
// ../../../node_modules/picocolors/picocolors.js
|
|
25
25
|
var require_picocolors = __commonJS({
|
|
@@ -123,11 +123,11 @@ var import_picocolors2 = __toESM(require_picocolors(), 1), import_semver = __toE
|
|
|
123
123
|
// src/autoblock/index.ts
|
|
124
124
|
var blockers = () => [
|
|
125
125
|
// add/remove blockers here
|
|
126
|
-
import("./block-dependencies-versions-
|
|
127
|
-
import("./block-node-version-
|
|
128
|
-
import("./block-webpack5-frameworks-
|
|
129
|
-
import("./block-major-version-
|
|
130
|
-
import("./block-experimental-addon-test-
|
|
126
|
+
import("./block-dependencies-versions-2FUXZ5CY.js"),
|
|
127
|
+
import("./block-node-version-72NZK3TH.js"),
|
|
128
|
+
import("./block-webpack5-frameworks-ZYQRFEAY.js"),
|
|
129
|
+
import("./block-major-version-3ONUXRX7.js"),
|
|
130
|
+
import("./block-experimental-addon-test-OLXMV4WY.js")
|
|
131
131
|
], autoblock = async (options, list = blockers()) => list.length === 0 ? null : await Promise.all(
|
|
132
132
|
list.map(async (i) => {
|
|
133
133
|
let blocker = (await i).blocker;
|
|
@@ -166,7 +166,12 @@ var getStorybookData = async ({
|
|
|
166
166
|
mainConfigPath,
|
|
167
167
|
configDir: configDirFromScript,
|
|
168
168
|
previewConfigPath,
|
|
169
|
-
versionSpecifier
|
|
169
|
+
versionSpecifier,
|
|
170
|
+
frameworkPackage,
|
|
171
|
+
rendererPackage,
|
|
172
|
+
renderer,
|
|
173
|
+
builderPackage,
|
|
174
|
+
addons
|
|
170
175
|
} = await getStorybookInfo(
|
|
171
176
|
userDefinedConfigDir,
|
|
172
177
|
userDefinedConfigDir ? dirname2(userDefinedConfigDir) : void 0
|
|
@@ -200,7 +205,12 @@ var getStorybookData = async ({
|
|
|
200
205
|
previewConfigPath,
|
|
201
206
|
packageManager,
|
|
202
207
|
storiesPaths,
|
|
203
|
-
hasCsfFactoryPreview
|
|
208
|
+
hasCsfFactoryPreview,
|
|
209
|
+
frameworkPackage,
|
|
210
|
+
rendererPackage,
|
|
211
|
+
renderer,
|
|
212
|
+
builderPackage,
|
|
213
|
+
addons
|
|
204
214
|
};
|
|
205
215
|
}, updateMainConfig = async ({ mainConfigPath, dryRun }, callback) => {
|
|
206
216
|
try {
|
|
@@ -341,7 +351,7 @@ var processProject = async ({
|
|
|
341
351
|
};
|
|
342
352
|
}
|
|
343
353
|
}, collectProjects = async (options, configDirs, onProjectScanStart) => {
|
|
344
|
-
let { default: pLimit } = await import("./p-limit-
|
|
354
|
+
let { default: pLimit } = await import("./p-limit-BPN7VYEH.js"), currentCLIVersion = versions.storybook, limit = pLimit(5), projectPromises = configDirs.map(
|
|
345
355
|
(configDir) => limit(
|
|
346
356
|
() => processProject({
|
|
347
357
|
configDir,
|
|
@@ -592,6 +602,7 @@ After addressing this, you can try running the upgrade command again. You can al
|
|
|
592
602
|
|
|
593
603
|
export {
|
|
594
604
|
require_picocolors,
|
|
605
|
+
up,
|
|
595
606
|
findOutdatedPackage,
|
|
596
607
|
processAutoblockerResults,
|
|
597
608
|
upgradeStorybookDependencies,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_qwqib56gpq from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_qwqib56gpq from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_qwqib56gpq from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_qwqib56gpq.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_qwqib56gpq.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_qwqib56gpq.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -21,8 +21,8 @@ import {
|
|
|
21
21
|
isGitIgnoredSync,
|
|
22
22
|
isIgnoredByIgnoreFiles,
|
|
23
23
|
isIgnoredByIgnoreFilesSync
|
|
24
|
-
} from "./chunk-
|
|
25
|
-
import "./chunk-
|
|
24
|
+
} from "./chunk-BRMCKSDM.js";
|
|
25
|
+
import "./chunk-5CZRH4L2.js";
|
|
26
26
|
export {
|
|
27
27
|
convertPathToPattern,
|
|
28
28
|
generateGlobTasks,
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import CJS_COMPAT_NODE_URL_qwqib56gpq from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_qwqib56gpq from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_qwqib56gpq from "node:module";
|
|
4
|
+
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_qwqib56gpq.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_qwqib56gpq.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_qwqib56gpq.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
|
+
monorepoRule,
|
|
26
|
+
monorepoStep,
|
|
27
|
+
mswStep,
|
|
28
|
+
noPolishRule,
|
|
29
|
+
nodeModuleReadsRule,
|
|
30
|
+
packageManagerRule,
|
|
31
|
+
preferSharedFixesRule,
|
|
32
|
+
readBudgetRule,
|
|
33
|
+
sharedPreviewDOD,
|
|
34
|
+
storyTagsV1DOD,
|
|
35
|
+
toolsVsShellRule,
|
|
36
|
+
typeCheckPassesStrictDOD,
|
|
37
|
+
verifyStep,
|
|
38
|
+
vitestPassesStrictDOD,
|
|
39
|
+
writeStoriesStep
|
|
40
|
+
} from "./chunk-L5XJ6BK3.js";
|
|
41
|
+
import {
|
|
42
|
+
getDocsMarkdownUrl
|
|
43
|
+
} from "./chunk-DYSRKIJT.js";
|
|
44
|
+
import "./chunk-5CZRH4L2.js";
|
|
45
|
+
|
|
46
|
+
// src/ai/setup-prompts/monorepo.ts
|
|
47
|
+
import { dedent } from "ts-dedent";
|
|
48
|
+
function instructions(projectInfo) {
|
|
49
|
+
let { configDir, language, needsUserOnboarding, packageManager, packageManagerName } = projectInfo, tsx = ext(language, !0), ts = ext(language, !1), docsUrl = (path) => getDocsMarkdownUrl(path, projectInfo), mswInstall = packageManager.getInstallCommand(
|
|
50
|
+
["msw", "msw-storybook-addon", "mockdate"],
|
|
51
|
+
!0
|
|
52
|
+
), ctx = {
|
|
53
|
+
configDir,
|
|
54
|
+
docsUrl,
|
|
55
|
+
mswInstall,
|
|
56
|
+
needsUserOnboarding,
|
|
57
|
+
packageManager,
|
|
58
|
+
packageManagerName,
|
|
59
|
+
tsx,
|
|
60
|
+
ts
|
|
61
|
+
};
|
|
62
|
+
return dedent`
|
|
63
|
+
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.
|
|
64
|
+
|
|
65
|
+
## Rules of engagement (follow strictly — these are time budgets, not suggestions)
|
|
66
|
+
|
|
67
|
+
${listRules([
|
|
68
|
+
toolsVsShellRule(ctx),
|
|
69
|
+
nodeModuleReadsRule(ctx),
|
|
70
|
+
monorepoRule(ctx),
|
|
71
|
+
readBudgetRule(ctx),
|
|
72
|
+
editOverWriteRule(ctx),
|
|
73
|
+
batchTestsRule(ctx),
|
|
74
|
+
packageManagerRule(ctx),
|
|
75
|
+
preferSharedFixesRule(ctx),
|
|
76
|
+
noPolishRule(ctx)
|
|
77
|
+
])}
|
|
78
|
+
|
|
79
|
+
## Plan (do not skip steps, but keep each step lean)
|
|
80
|
+
|
|
81
|
+
${listSteps(
|
|
82
|
+
[
|
|
83
|
+
discoveryStepStrict(projectInfo, ctx),
|
|
84
|
+
monorepoStep(projectInfo, ctx),
|
|
85
|
+
buildSharedPreviewStep(projectInfo, ctx),
|
|
86
|
+
buildPortalStep(projectInfo, ctx),
|
|
87
|
+
mswStep(projectInfo, ctx),
|
|
88
|
+
writeStoriesStep(projectInfo, ctx),
|
|
89
|
+
interactionPlayStep(projectInfo, ctx),
|
|
90
|
+
verifyStep(projectInfo, ctx),
|
|
91
|
+
cleanupStep(projectInfo, ctx)
|
|
92
|
+
],
|
|
93
|
+
{ level: 3 }
|
|
94
|
+
)}
|
|
95
|
+
|
|
96
|
+
## Done when
|
|
97
|
+
|
|
98
|
+
${listDOD([
|
|
99
|
+
cssCheckDOD(ctx),
|
|
100
|
+
storyTagsV1DOD(ctx),
|
|
101
|
+
vitestPassesStrictDOD(ctx),
|
|
102
|
+
typeCheckPassesStrictDOD(ctx),
|
|
103
|
+
sharedPreviewDOD(ctx)
|
|
104
|
+
])}
|
|
105
|
+
|
|
106
|
+
## Reference (only fetch if stuck)
|
|
107
|
+
|
|
108
|
+
- Docs index: https://storybook.js.org/llms.txt
|
|
109
|
+
- Writing stories: ${docsUrl("writing-stories")}
|
|
110
|
+
- Decorators: ${docsUrl("writing-stories/decorators")}
|
|
111
|
+
- Play functions: ${docsUrl("writing-stories/play-function")}
|
|
112
|
+
- Vitest integration: ${docsUrl("writing-tests/vitest-plugin")}
|
|
113
|
+
|
|
114
|
+
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.
|
|
115
|
+
`;
|
|
116
|
+
}
|
|
117
|
+
export {
|
|
118
|
+
instructions
|
|
119
|
+
};
|
package/dist/_node-chunks/monorepo-optimized-tests-relaxed-limits-no-story-deletion-5YVGNWCV.js
ADDED
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import CJS_COMPAT_NODE_URL_qwqib56gpq from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_qwqib56gpq from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_qwqib56gpq from "node:module";
|
|
4
|
+
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_qwqib56gpq.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_qwqib56gpq.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_qwqib56gpq.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
|
+
discoveryStepRelaxed,
|
|
19
|
+
editOverWriteRule,
|
|
20
|
+
ext,
|
|
21
|
+
interactionPlayStep,
|
|
22
|
+
listDOD,
|
|
23
|
+
listRules,
|
|
24
|
+
listSteps,
|
|
25
|
+
monorepoRule,
|
|
26
|
+
monorepoStep,
|
|
27
|
+
mswStep,
|
|
28
|
+
noPolishRule,
|
|
29
|
+
nodeModuleReadsRule,
|
|
30
|
+
packageManagerRule,
|
|
31
|
+
preferSharedFixesRule,
|
|
32
|
+
readBudgetRuleRelaxed,
|
|
33
|
+
sharedPreviewDOD,
|
|
34
|
+
storyTagsV2DOD,
|
|
35
|
+
toolsVsShellRule,
|
|
36
|
+
typeCheckPassesWhenExpectedDOD,
|
|
37
|
+
verifyWithAllowedFailureStep,
|
|
38
|
+
vitestPassesWhenExpectedDOD,
|
|
39
|
+
writeStoriesWithAllowedFailuresStep
|
|
40
|
+
} from "./chunk-L5XJ6BK3.js";
|
|
41
|
+
import {
|
|
42
|
+
getDocsMarkdownUrl
|
|
43
|
+
} from "./chunk-DYSRKIJT.js";
|
|
44
|
+
import "./chunk-5CZRH4L2.js";
|
|
45
|
+
|
|
46
|
+
// src/ai/setup-prompts/monorepo-optimized-tests-relaxed-limits-no-story-deletion.ts
|
|
47
|
+
import { dedent } from "ts-dedent";
|
|
48
|
+
function instructions(projectInfo) {
|
|
49
|
+
let { configDir, language, needsUserOnboarding, packageManager, packageManagerName } = projectInfo, tsx = ext(language, !0), ts = ext(language, !1), docsUrl = (path) => getDocsMarkdownUrl(path, projectInfo), mswInstall = packageManager.getInstallCommand(
|
|
50
|
+
["msw", "msw-storybook-addon", "mockdate"],
|
|
51
|
+
!0
|
|
52
|
+
), ctx = {
|
|
53
|
+
configDir,
|
|
54
|
+
docsUrl,
|
|
55
|
+
mswInstall,
|
|
56
|
+
needsUserOnboarding,
|
|
57
|
+
packageManager,
|
|
58
|
+
packageManagerName,
|
|
59
|
+
tsx,
|
|
60
|
+
ts
|
|
61
|
+
};
|
|
62
|
+
return dedent`
|
|
63
|
+
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.
|
|
64
|
+
|
|
65
|
+
## Rules of engagement (follow strictly — these are time budgets, not suggestions)
|
|
66
|
+
|
|
67
|
+
${listRules([
|
|
68
|
+
toolsVsShellRule(ctx),
|
|
69
|
+
nodeModuleReadsRule(ctx),
|
|
70
|
+
monorepoRule(ctx),
|
|
71
|
+
readBudgetRuleRelaxed(ctx),
|
|
72
|
+
editOverWriteRule(ctx),
|
|
73
|
+
batchTestsRule(ctx),
|
|
74
|
+
packageManagerRule(ctx),
|
|
75
|
+
preferSharedFixesRule(ctx),
|
|
76
|
+
noPolishRule(ctx)
|
|
77
|
+
])}
|
|
78
|
+
|
|
79
|
+
## Plan (do not skip steps, but keep each step lean)
|
|
80
|
+
|
|
81
|
+
${listSteps(
|
|
82
|
+
[
|
|
83
|
+
discoveryStepRelaxed(projectInfo, ctx),
|
|
84
|
+
monorepoStep(projectInfo, ctx),
|
|
85
|
+
buildSharedPreviewStep(projectInfo, ctx),
|
|
86
|
+
buildPortalStep(projectInfo, ctx),
|
|
87
|
+
mswStep(projectInfo, ctx),
|
|
88
|
+
writeStoriesWithAllowedFailuresStep(projectInfo, ctx),
|
|
89
|
+
interactionPlayStep(projectInfo, ctx),
|
|
90
|
+
verifyWithAllowedFailureStep(projectInfo, ctx),
|
|
91
|
+
cleanupStep(projectInfo, ctx)
|
|
92
|
+
],
|
|
93
|
+
{ level: 3 }
|
|
94
|
+
)}
|
|
95
|
+
|
|
96
|
+
## Done when
|
|
97
|
+
|
|
98
|
+
${listDOD([
|
|
99
|
+
cssCheckDOD(ctx),
|
|
100
|
+
storyTagsV2DOD(ctx),
|
|
101
|
+
vitestPassesWhenExpectedDOD(ctx),
|
|
102
|
+
typeCheckPassesWhenExpectedDOD(ctx),
|
|
103
|
+
sharedPreviewDOD(ctx)
|
|
104
|
+
])}
|
|
105
|
+
|
|
106
|
+
## Reference (only fetch if stuck)
|
|
107
|
+
|
|
108
|
+
- Docs index: https://storybook.js.org/llms.txt
|
|
109
|
+
- Writing stories: ${docsUrl("writing-stories")}
|
|
110
|
+
- Decorators: ${docsUrl("writing-stories/decorators")}
|
|
111
|
+
- Play functions: ${docsUrl("writing-stories/play-function")}
|
|
112
|
+
- Vitest integration: ${docsUrl("writing-tests/vitest-plugin")}
|
|
113
|
+
|
|
114
|
+
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.
|
|
115
|
+
`;
|
|
116
|
+
}
|
|
117
|
+
export {
|
|
118
|
+
instructions
|
|
119
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import CJS_COMPAT_NODE_URL_qwqib56gpq from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_qwqib56gpq from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_qwqib56gpq from "node:module";
|
|
4
|
+
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_qwqib56gpq.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_qwqib56gpq.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_qwqib56gpq.createRequire(import.meta.url);
|
|
8
|
+
|
|
9
|
+
// ------------------------------------------------------------
|
|
10
|
+
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
|
+
// ------------------------------------------------------------
|
|
12
|
+
import {
|
|
13
|
+
instructions
|
|
14
|
+
} from "./chunk-OCLBRGHS.js";
|
|
15
|
+
import "./chunk-L5XJ6BK3.js";
|
|
16
|
+
import "./chunk-DYSRKIJT.js";
|
|
17
|
+
import "./chunk-5CZRH4L2.js";
|
|
18
|
+
export {
|
|
19
|
+
instructions
|
|
20
|
+
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_qwqib56gpq from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_qwqib56gpq from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_qwqib56gpq from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_qwqib56gpq.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_qwqib56gpq.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_qwqib56gpq.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
11
|
// ------------------------------------------------------------
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-5CZRH4L2.js";
|
|
13
13
|
|
|
14
14
|
// ../../../node_modules/yocto-queue/index.js
|
|
15
15
|
var Node = class {
|