@storybook/cli 7.0.0-alpha.17 → 7.0.0-alpha.18
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/cjs/generate.js +20 -4
- package/dist/cjs/link.js +8 -5
- package/dist/cjs/repro-generators/scripts.js +7 -4
- package/dist/cjs/repro-next.js +173 -0
- package/dist/cjs/repro-templates.js +28 -0
- package/dist/cjs/versions.js +75 -75
- package/dist/esm/generate.js +16 -4
- package/dist/esm/link.js +9 -5
- package/dist/esm/repro-generators/scripts.js +7 -4
- package/dist/esm/repro-next.js +154 -0
- package/dist/esm/repro-templates.js +21 -0
- package/dist/esm/versions.js +75 -75
- package/dist/types/link.d.ts +2 -1
- package/dist/types/repro-generators/scripts.d.ts +2 -1
- package/dist/types/repro-next.d.ts +7 -0
- package/dist/types/repro-templates.d.ts +21 -0
- package/package.json +13 -9
package/dist/cjs/generate.js
CHANGED
|
@@ -26,6 +26,8 @@ var _upgrade = require("./upgrade");
|
|
|
26
26
|
|
|
27
27
|
var _repro = require("./repro");
|
|
28
28
|
|
|
29
|
+
var _reproNext = require("./repro-next");
|
|
30
|
+
|
|
29
31
|
var _link = require("./link");
|
|
30
32
|
|
|
31
33
|
var _automigrate = require("./automigrate");
|
|
@@ -50,7 +52,11 @@ process.env.STORYBOOK_DISABLE_TELEMETRY && process.env.STORYBOOK_DISABLE_TELEMET
|
|
|
50
52
|
|
|
51
53
|
_commander.default.option('--enable-crash-reports', 'enable sending crash reports to telemetry data');
|
|
52
54
|
|
|
53
|
-
_commander.default.command('init').description('Initialize Storybook into your project.').option('-f --force', 'Force add Storybook').option('-s --skip-install', 'Skip installing deps').option('-N --use-npm', 'Use npm to install deps').option('--use-pnp', 'Enable pnp mode').option('-p --parser <babel | babylon | flow | ts | tsx>', 'jscodeshift parser').option('-t --type <type>', 'Add Storybook for a specific project type').option('-y --yes', 'Answer yes to all prompts').option('-b --builder <builder>', 'Builder library').option('-l --linkable', 'Prepare installation for link (contributor helper)').action(options => (0, _initiate.initiate)(options, pkg)
|
|
55
|
+
_commander.default.command('init').description('Initialize Storybook into your project.').option('-f --force', 'Force add Storybook').option('-s --skip-install', 'Skip installing deps').option('-N --use-npm', 'Use npm to install deps').option('--use-pnp', 'Enable pnp mode').option('-p --parser <babel | babylon | flow | ts | tsx>', 'jscodeshift parser').option('-t --type <type>', 'Add Storybook for a specific project type').option('-y --yes', 'Answer yes to all prompts').option('-b --builder <builder>', 'Builder library').option('-l --linkable', 'Prepare installation for link (contributor helper)').action(options => (0, _initiate.initiate)(options, pkg).catch(err => {
|
|
56
|
+
_nodeLogger.logger.error(err);
|
|
57
|
+
|
|
58
|
+
process.exit(1);
|
|
59
|
+
}));
|
|
54
60
|
|
|
55
61
|
_commander.default.command('add <addon>').description('Add an addon to your Storybook').option('-N --use-npm', 'Use NPM to build the Storybook server').option('-s --skip-postinstall', 'Skip package specific postinstall config modifications').action((addonName, options) => (0, _add.add)(addonName, options));
|
|
56
62
|
|
|
@@ -122,11 +128,21 @@ _commander.default.command('repro [outputDirectory]').description('Create a repr
|
|
|
122
128
|
process.exit(1);
|
|
123
129
|
}));
|
|
124
130
|
|
|
125
|
-
_commander.default.command('
|
|
126
|
-
|
|
131
|
+
_commander.default.command('repro-next [filterValue]').description('Create a reproduction from a set of possible templates').option('-o --output <outDir>', 'Define an output directory').option('-b --branch <branch>', 'Define the branch to degit from', 'next').action((filterValue, options) => (0, _reproNext.reproNext)(Object.assign({
|
|
132
|
+
filterValue
|
|
133
|
+
}, options)).catch(e => {
|
|
134
|
+
_nodeLogger.logger.error(e);
|
|
135
|
+
|
|
136
|
+
process.exit(1);
|
|
137
|
+
}));
|
|
138
|
+
|
|
139
|
+
_commander.default.command('link <repo-url-or-directory>').description('Pull down a repro from a URL (or a local directory), link it, and run storybook').option('--local', 'Link a local directory already in your file system').option('--no-start', 'Start the storybook', true).action((target, {
|
|
140
|
+
local,
|
|
141
|
+
start
|
|
127
142
|
}) => (0, _link.link)({
|
|
128
143
|
target,
|
|
129
|
-
local
|
|
144
|
+
local,
|
|
145
|
+
start
|
|
130
146
|
}).catch(e => {
|
|
131
147
|
_nodeLogger.logger.error(e);
|
|
132
148
|
|
package/dist/cjs/link.js
CHANGED
|
@@ -19,7 +19,8 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
19
19
|
|
|
20
20
|
const link = async ({
|
|
21
21
|
target,
|
|
22
|
-
local
|
|
22
|
+
local,
|
|
23
|
+
start
|
|
23
24
|
}) => {
|
|
24
25
|
const storybookDir = process.cwd();
|
|
25
26
|
|
|
@@ -86,11 +87,13 @@ const link = async ({
|
|
|
86
87
|
cwd: reproDir
|
|
87
88
|
});
|
|
88
89
|
|
|
89
|
-
|
|
90
|
+
if (start) {
|
|
91
|
+
_nodeLogger.logger.info(`Running ${reproName} storybook`);
|
|
90
92
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
93
|
+
await (0, _scripts.exec)(`yarn run storybook`, {
|
|
94
|
+
cwd: reproDir
|
|
95
|
+
});
|
|
96
|
+
}
|
|
94
97
|
};
|
|
95
98
|
|
|
96
99
|
exports.link = link;
|
|
@@ -29,10 +29,14 @@ const logger = console;
|
|
|
29
29
|
|
|
30
30
|
const exec = async (command, options = {}, {
|
|
31
31
|
startMessage,
|
|
32
|
-
errorMessage
|
|
32
|
+
errorMessage,
|
|
33
|
+
dryRun
|
|
33
34
|
} = {}) => {
|
|
34
|
-
if (startMessage)
|
|
35
|
-
|
|
35
|
+
if (startMessage) logger.info(startMessage);
|
|
36
|
+
|
|
37
|
+
if (dryRun) {
|
|
38
|
+
logger.info(`\n> ${command}\n`);
|
|
39
|
+
return undefined;
|
|
36
40
|
}
|
|
37
41
|
|
|
38
42
|
logger.debug(command);
|
|
@@ -47,7 +51,6 @@ const exec = async (command, options = {}, {
|
|
|
47
51
|
}));
|
|
48
52
|
|
|
49
53
|
child.stderr.pipe(process.stderr);
|
|
50
|
-
child.stdout.pipe(process.stdout);
|
|
51
54
|
child.on('exit', code => {
|
|
52
55
|
if (code === 0) {
|
|
53
56
|
resolve(undefined);
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.reproNext = void 0;
|
|
7
|
+
|
|
8
|
+
var _prompts = _interopRequireDefault(require("prompts"));
|
|
9
|
+
|
|
10
|
+
var _fs = _interopRequireDefault(require("fs"));
|
|
11
|
+
|
|
12
|
+
var _path = _interopRequireDefault(require("path"));
|
|
13
|
+
|
|
14
|
+
var _chalk = _interopRequireDefault(require("chalk"));
|
|
15
|
+
|
|
16
|
+
var _boxen = _interopRequireDefault(require("boxen"));
|
|
17
|
+
|
|
18
|
+
var _tsDedent = require("ts-dedent");
|
|
19
|
+
|
|
20
|
+
var _degit = _interopRequireDefault(require("degit"));
|
|
21
|
+
|
|
22
|
+
var _reproTemplates = _interopRequireDefault(require("./repro-templates"));
|
|
23
|
+
|
|
24
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25
|
+
|
|
26
|
+
const logger = console;
|
|
27
|
+
|
|
28
|
+
const toChoices = c => ({
|
|
29
|
+
title: _reproTemplates.default[c].name,
|
|
30
|
+
value: c
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
const reproNext = async ({
|
|
34
|
+
output: outputDirectory,
|
|
35
|
+
filterValue,
|
|
36
|
+
branch
|
|
37
|
+
}) => {
|
|
38
|
+
const keys = Object.keys(_reproTemplates.default); // get value from template and reduce through TEMPLATES to filter out the correct template
|
|
39
|
+
|
|
40
|
+
const choices = keys.reduce((acc, group) => {
|
|
41
|
+
const current = _reproTemplates.default[group];
|
|
42
|
+
const filterRegex = new RegExp(filterValue, 'i');
|
|
43
|
+
|
|
44
|
+
if (!filterValue) {
|
|
45
|
+
acc.push(group);
|
|
46
|
+
return acc;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
if (current.name.match(filterRegex) || group.match(filterRegex) || current.expected.builder.match(filterRegex) || current.expected.framework.match(filterRegex) || current.expected.renderer.match(filterRegex)) {
|
|
50
|
+
acc.push(group);
|
|
51
|
+
return acc;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
return acc;
|
|
55
|
+
}, []);
|
|
56
|
+
|
|
57
|
+
if (choices.length === 0) {
|
|
58
|
+
logger.info((0, _boxen.default)((0, _tsDedent.dedent)`
|
|
59
|
+
🔎 You filtered out all templates. 🔍
|
|
60
|
+
After filtering all the templates with "${_chalk.default.yellow(filterValue)}", we found no templates.
|
|
61
|
+
|
|
62
|
+
Available templates:
|
|
63
|
+
${keys.map(key => _chalk.default.blue`- ${key}`).join('\n')}
|
|
64
|
+
`.trim(), {
|
|
65
|
+
borderStyle: 'round',
|
|
66
|
+
padding: 1,
|
|
67
|
+
borderColor: '#F1618C'
|
|
68
|
+
}));
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
let selectedTemplate = null;
|
|
73
|
+
|
|
74
|
+
if (choices.length === 1) {
|
|
75
|
+
[selectedTemplate] = choices;
|
|
76
|
+
} else {
|
|
77
|
+
logger.info((0, _boxen.default)((0, _tsDedent.dedent)`
|
|
78
|
+
🤗 Welcome to ${_chalk.default.yellow('sb repro NEXT')}! 🤗
|
|
79
|
+
|
|
80
|
+
Create a ${_chalk.default.green('new project')} to minimally reproduce Storybook issues.
|
|
81
|
+
|
|
82
|
+
1. select an environment that most closely matches your project setup.
|
|
83
|
+
2. select a location for the reproduction, outside of your project.
|
|
84
|
+
|
|
85
|
+
After the reproduction is ready, we'll guide you through the next steps.
|
|
86
|
+
`.trim(), {
|
|
87
|
+
borderStyle: 'round',
|
|
88
|
+
padding: 1,
|
|
89
|
+
borderColor: '#F1618C'
|
|
90
|
+
}));
|
|
91
|
+
selectedTemplate = await promptSelectedTemplate(choices);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
const hasSelectedTemplate = !!(selectedTemplate ?? null);
|
|
95
|
+
|
|
96
|
+
if (!hasSelectedTemplate) {
|
|
97
|
+
logger.error('Somehow we got no templates. Please rerun this command!');
|
|
98
|
+
return;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
const selectedConfig = _reproTemplates.default[selectedTemplate];
|
|
102
|
+
|
|
103
|
+
if (!selectedConfig) {
|
|
104
|
+
throw new Error('🚨 Repro: please specify a valid template type');
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
let selectedDirectory = outputDirectory;
|
|
108
|
+
|
|
109
|
+
if (!selectedDirectory) {
|
|
110
|
+
const {
|
|
111
|
+
directory
|
|
112
|
+
} = await (0, _prompts.default)({
|
|
113
|
+
type: 'text',
|
|
114
|
+
message: 'Enter the output directory',
|
|
115
|
+
name: 'directory',
|
|
116
|
+
initial: selectedTemplate,
|
|
117
|
+
validate: directoryName => _fs.default.existsSync(directoryName) ? `${directoryName} already exists. Please choose another name.` : true
|
|
118
|
+
});
|
|
119
|
+
selectedDirectory = directory;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
try {
|
|
123
|
+
const cwd = _path.default.isAbsolute(selectedDirectory) ? selectedDirectory : _path.default.join(process.cwd(), selectedDirectory);
|
|
124
|
+
logger.info(`🏃 Adding ${selectedConfig.name} into ${cwd}`);
|
|
125
|
+
logger.log('📦 Downloading repro template...');
|
|
126
|
+
|
|
127
|
+
try {
|
|
128
|
+
// Download the repro based on subfolder "after-storybook" and selected branch
|
|
129
|
+
await (0, _degit.default)(`storybookjs/repro-templates-temp/${selectedTemplate}/after-storybook#${branch}`, {
|
|
130
|
+
force: true
|
|
131
|
+
}).clone(selectedTemplate.replace('/', '-'));
|
|
132
|
+
} catch (err) {
|
|
133
|
+
logger.error(`🚨 Failed to download repro template: ${err.message}`);
|
|
134
|
+
return;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
logger.info((0, _boxen.default)((0, _tsDedent.dedent)`
|
|
138
|
+
🎉 Your Storybook reproduction project is ready to use! 🎉
|
|
139
|
+
|
|
140
|
+
${_chalk.default.yellow(`cd ${selectedDirectory}`)}
|
|
141
|
+
${_chalk.default.yellow(`yarn storybook`)}
|
|
142
|
+
|
|
143
|
+
Once you've recreated the problem you're experiencing, please:
|
|
144
|
+
|
|
145
|
+
1. Document any additional steps in ${_chalk.default.cyan('README.md')}
|
|
146
|
+
2. Publish the repository to github
|
|
147
|
+
3. Link to the repro repository in your issue
|
|
148
|
+
|
|
149
|
+
Having a clean repro helps us solve your issue faster! 🙏
|
|
150
|
+
`.trim(), {
|
|
151
|
+
borderStyle: 'round',
|
|
152
|
+
padding: 1,
|
|
153
|
+
borderColor: '#F1618C'
|
|
154
|
+
}));
|
|
155
|
+
} catch (error) {
|
|
156
|
+
logger.error('🚨 Failed to create repro');
|
|
157
|
+
throw error;
|
|
158
|
+
}
|
|
159
|
+
};
|
|
160
|
+
|
|
161
|
+
exports.reproNext = reproNext;
|
|
162
|
+
|
|
163
|
+
async function promptSelectedTemplate(choices) {
|
|
164
|
+
const {
|
|
165
|
+
template
|
|
166
|
+
} = await (0, _prompts.default)({
|
|
167
|
+
type: 'select',
|
|
168
|
+
message: '🌈 Select the template',
|
|
169
|
+
name: 'template',
|
|
170
|
+
choices: choices.map(toChoices)
|
|
171
|
+
});
|
|
172
|
+
return template || null;
|
|
173
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
// auto generated file, do not edit
|
|
8
|
+
var _default = {
|
|
9
|
+
'cra/default-js': {
|
|
10
|
+
name: 'Create React App (Javascript)',
|
|
11
|
+
script: 'npx create-react-app .',
|
|
12
|
+
expected: {
|
|
13
|
+
framework: '@storybook/cra',
|
|
14
|
+
renderer: '@storybook/react',
|
|
15
|
+
builder: '@storybook/builder-webpack5'
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
'cra/default-ts': {
|
|
19
|
+
name: 'Create React App (Typescript)',
|
|
20
|
+
script: 'npx create-react-app . --template typescript',
|
|
21
|
+
expected: {
|
|
22
|
+
framework: '@storybook/cra',
|
|
23
|
+
renderer: '@storybook/react',
|
|
24
|
+
builder: '@storybook/builder-webpack5'
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
exports.default = _default;
|
package/dist/cjs/versions.js
CHANGED
|
@@ -6,80 +6,80 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
// auto generated file, do not edit
|
|
8
8
|
var _default = {
|
|
9
|
-
'@storybook/addon-a11y': '7.0.0-alpha.
|
|
10
|
-
'@storybook/addon-actions': '7.0.0-alpha.
|
|
11
|
-
'@storybook/addon-backgrounds': '7.0.0-alpha.
|
|
12
|
-
'@storybook/addon-controls': '7.0.0-alpha.
|
|
13
|
-
'@storybook/addon-docs': '7.0.0-alpha.
|
|
14
|
-
'@storybook/addon-essentials': '7.0.0-alpha.
|
|
15
|
-
'@storybook/addon-highlight': '7.0.0-alpha.
|
|
16
|
-
'@storybook/addon-interactions': '7.0.0-alpha.
|
|
17
|
-
'@storybook/addon-jest': '7.0.0-alpha.
|
|
18
|
-
'@storybook/addon-links': '7.0.0-alpha.
|
|
19
|
-
'@storybook/addon-measure': '7.0.0-alpha.
|
|
20
|
-
'@storybook/addon-outline': '7.0.0-alpha.
|
|
21
|
-
'@storybook/addon-storyshots': '7.0.0-alpha.
|
|
22
|
-
'@storybook/addon-storyshots-puppeteer': '7.0.0-alpha.
|
|
23
|
-
'@storybook/addon-storysource': '7.0.0-alpha.
|
|
24
|
-
'@storybook/addon-toolbars': '7.0.0-alpha.
|
|
25
|
-
'@storybook/addon-viewport': '7.0.0-alpha.
|
|
26
|
-
'@storybook/addons': '7.0.0-alpha.
|
|
27
|
-
'@storybook/angular': '7.0.0-alpha.
|
|
28
|
-
'@storybook/api': '7.0.0-alpha.
|
|
29
|
-
'@storybook/blocks': '7.0.0-alpha.
|
|
30
|
-
'@storybook/builder-manager': '7.0.0-alpha.
|
|
31
|
-
'@storybook/builder-webpack5': '7.0.0-alpha.
|
|
32
|
-
'@storybook/channel-postmessage': '7.0.0-alpha.
|
|
33
|
-
'@storybook/channel-websocket': '7.0.0-alpha.
|
|
34
|
-
'@storybook/channels': '7.0.0-alpha.
|
|
35
|
-
'@storybook/cli': '7.0.0-alpha.
|
|
36
|
-
'@storybook/client-api': '7.0.0-alpha.
|
|
37
|
-
'@storybook/client-logger': '7.0.0-alpha.
|
|
38
|
-
'@storybook/codemod': '7.0.0-alpha.
|
|
39
|
-
'@storybook/components': '7.0.0-alpha.
|
|
40
|
-
'@storybook/core-client': '7.0.0-alpha.
|
|
41
|
-
'@storybook/core-common': '7.0.0-alpha.
|
|
42
|
-
'@storybook/core-events': '7.0.0-alpha.
|
|
43
|
-
'@storybook/core-server': '7.0.0-alpha.
|
|
44
|
-
'@storybook/core-webpack': '7.0.0-alpha.
|
|
45
|
-
'@storybook/csf-tools': '7.0.0-alpha.
|
|
46
|
-
'@storybook/docs-tools': '7.0.0-alpha.
|
|
47
|
-
'@storybook/ember': '7.0.0-alpha.
|
|
48
|
-
'@storybook/html': '7.0.0-alpha.
|
|
49
|
-
'@storybook/html-webpack5': '7.0.0-alpha.
|
|
50
|
-
'@storybook/instrumenter': '7.0.0-alpha.
|
|
51
|
-
'@storybook/node-logger': '7.0.0-alpha.
|
|
52
|
-
'@storybook/postinstall': '7.0.0-alpha.
|
|
53
|
-
'@storybook/preact': '7.0.0-alpha.
|
|
54
|
-
'@storybook/preact-webpack5': '7.0.0-alpha.
|
|
55
|
-
'@storybook/preset-html-webpack': '7.0.0-alpha.
|
|
56
|
-
'@storybook/preset-preact-webpack': '7.0.0-alpha.
|
|
57
|
-
'@storybook/preset-react-webpack': '7.0.0-alpha.
|
|
58
|
-
'@storybook/preset-server-webpack': '7.0.0-alpha.
|
|
59
|
-
'@storybook/preset-svelte-webpack': '7.0.0-alpha.
|
|
60
|
-
'@storybook/preset-vue-webpack': '7.0.0-alpha.
|
|
61
|
-
'@storybook/preset-vue3-webpack': '7.0.0-alpha.
|
|
62
|
-
'@storybook/preset-web-components-webpack': '7.0.0-alpha.
|
|
63
|
-
'@storybook/preview-web': '7.0.0-alpha.
|
|
64
|
-
'@storybook/react': '7.0.0-alpha.
|
|
65
|
-
'@storybook/react-webpack5': '7.0.0-alpha.
|
|
66
|
-
'@storybook/router': '7.0.0-alpha.
|
|
67
|
-
'@storybook/server': '7.0.0-alpha.
|
|
68
|
-
'@storybook/server-webpack5': '7.0.0-alpha.
|
|
69
|
-
'@storybook/source-loader': '7.0.0-alpha.
|
|
70
|
-
'@storybook/store': '7.0.0-alpha.
|
|
71
|
-
'@storybook/svelte': '7.0.0-alpha.
|
|
72
|
-
'@storybook/svelte-webpack5': '7.0.0-alpha.
|
|
73
|
-
'@storybook/telemetry': '7.0.0-alpha.
|
|
74
|
-
'@storybook/theming': '7.0.0-alpha.
|
|
75
|
-
'@storybook/ui': '7.0.0-alpha.
|
|
76
|
-
'@storybook/vue': '7.0.0-alpha.
|
|
77
|
-
'@storybook/vue-webpack5': '7.0.0-alpha.
|
|
78
|
-
'@storybook/vue3': '7.0.0-alpha.
|
|
79
|
-
'@storybook/vue3-webpack5': '7.0.0-alpha.
|
|
80
|
-
'@storybook/web-components': '7.0.0-alpha.
|
|
81
|
-
'@storybook/web-components-webpack5': '7.0.0-alpha.
|
|
82
|
-
sb: '7.0.0-alpha.
|
|
83
|
-
storybook: '7.0.0-alpha.
|
|
9
|
+
'@storybook/addon-a11y': '7.0.0-alpha.18',
|
|
10
|
+
'@storybook/addon-actions': '7.0.0-alpha.18',
|
|
11
|
+
'@storybook/addon-backgrounds': '7.0.0-alpha.18',
|
|
12
|
+
'@storybook/addon-controls': '7.0.0-alpha.18',
|
|
13
|
+
'@storybook/addon-docs': '7.0.0-alpha.18',
|
|
14
|
+
'@storybook/addon-essentials': '7.0.0-alpha.18',
|
|
15
|
+
'@storybook/addon-highlight': '7.0.0-alpha.18',
|
|
16
|
+
'@storybook/addon-interactions': '7.0.0-alpha.18',
|
|
17
|
+
'@storybook/addon-jest': '7.0.0-alpha.18',
|
|
18
|
+
'@storybook/addon-links': '7.0.0-alpha.18',
|
|
19
|
+
'@storybook/addon-measure': '7.0.0-alpha.18',
|
|
20
|
+
'@storybook/addon-outline': '7.0.0-alpha.18',
|
|
21
|
+
'@storybook/addon-storyshots': '7.0.0-alpha.18',
|
|
22
|
+
'@storybook/addon-storyshots-puppeteer': '7.0.0-alpha.18',
|
|
23
|
+
'@storybook/addon-storysource': '7.0.0-alpha.18',
|
|
24
|
+
'@storybook/addon-toolbars': '7.0.0-alpha.18',
|
|
25
|
+
'@storybook/addon-viewport': '7.0.0-alpha.18',
|
|
26
|
+
'@storybook/addons': '7.0.0-alpha.18',
|
|
27
|
+
'@storybook/angular': '7.0.0-alpha.18',
|
|
28
|
+
'@storybook/api': '7.0.0-alpha.18',
|
|
29
|
+
'@storybook/blocks': '7.0.0-alpha.18',
|
|
30
|
+
'@storybook/builder-manager': '7.0.0-alpha.18',
|
|
31
|
+
'@storybook/builder-webpack5': '7.0.0-alpha.18',
|
|
32
|
+
'@storybook/channel-postmessage': '7.0.0-alpha.18',
|
|
33
|
+
'@storybook/channel-websocket': '7.0.0-alpha.18',
|
|
34
|
+
'@storybook/channels': '7.0.0-alpha.18',
|
|
35
|
+
'@storybook/cli': '7.0.0-alpha.18',
|
|
36
|
+
'@storybook/client-api': '7.0.0-alpha.18',
|
|
37
|
+
'@storybook/client-logger': '7.0.0-alpha.18',
|
|
38
|
+
'@storybook/codemod': '7.0.0-alpha.18',
|
|
39
|
+
'@storybook/components': '7.0.0-alpha.18',
|
|
40
|
+
'@storybook/core-client': '7.0.0-alpha.18',
|
|
41
|
+
'@storybook/core-common': '7.0.0-alpha.18',
|
|
42
|
+
'@storybook/core-events': '7.0.0-alpha.18',
|
|
43
|
+
'@storybook/core-server': '7.0.0-alpha.18',
|
|
44
|
+
'@storybook/core-webpack': '7.0.0-alpha.18',
|
|
45
|
+
'@storybook/csf-tools': '7.0.0-alpha.18',
|
|
46
|
+
'@storybook/docs-tools': '7.0.0-alpha.18',
|
|
47
|
+
'@storybook/ember': '7.0.0-alpha.18',
|
|
48
|
+
'@storybook/html': '7.0.0-alpha.18',
|
|
49
|
+
'@storybook/html-webpack5': '7.0.0-alpha.18',
|
|
50
|
+
'@storybook/instrumenter': '7.0.0-alpha.18',
|
|
51
|
+
'@storybook/node-logger': '7.0.0-alpha.18',
|
|
52
|
+
'@storybook/postinstall': '7.0.0-alpha.18',
|
|
53
|
+
'@storybook/preact': '7.0.0-alpha.18',
|
|
54
|
+
'@storybook/preact-webpack5': '7.0.0-alpha.18',
|
|
55
|
+
'@storybook/preset-html-webpack': '7.0.0-alpha.18',
|
|
56
|
+
'@storybook/preset-preact-webpack': '7.0.0-alpha.18',
|
|
57
|
+
'@storybook/preset-react-webpack': '7.0.0-alpha.18',
|
|
58
|
+
'@storybook/preset-server-webpack': '7.0.0-alpha.18',
|
|
59
|
+
'@storybook/preset-svelte-webpack': '7.0.0-alpha.18',
|
|
60
|
+
'@storybook/preset-vue-webpack': '7.0.0-alpha.18',
|
|
61
|
+
'@storybook/preset-vue3-webpack': '7.0.0-alpha.18',
|
|
62
|
+
'@storybook/preset-web-components-webpack': '7.0.0-alpha.18',
|
|
63
|
+
'@storybook/preview-web': '7.0.0-alpha.18',
|
|
64
|
+
'@storybook/react': '7.0.0-alpha.18',
|
|
65
|
+
'@storybook/react-webpack5': '7.0.0-alpha.18',
|
|
66
|
+
'@storybook/router': '7.0.0-alpha.18',
|
|
67
|
+
'@storybook/server': '7.0.0-alpha.18',
|
|
68
|
+
'@storybook/server-webpack5': '7.0.0-alpha.18',
|
|
69
|
+
'@storybook/source-loader': '7.0.0-alpha.18',
|
|
70
|
+
'@storybook/store': '7.0.0-alpha.18',
|
|
71
|
+
'@storybook/svelte': '7.0.0-alpha.18',
|
|
72
|
+
'@storybook/svelte-webpack5': '7.0.0-alpha.18',
|
|
73
|
+
'@storybook/telemetry': '7.0.0-alpha.18',
|
|
74
|
+
'@storybook/theming': '7.0.0-alpha.18',
|
|
75
|
+
'@storybook/ui': '7.0.0-alpha.18',
|
|
76
|
+
'@storybook/vue': '7.0.0-alpha.18',
|
|
77
|
+
'@storybook/vue-webpack5': '7.0.0-alpha.18',
|
|
78
|
+
'@storybook/vue3': '7.0.0-alpha.18',
|
|
79
|
+
'@storybook/vue3-webpack5': '7.0.0-alpha.18',
|
|
80
|
+
'@storybook/web-components': '7.0.0-alpha.18',
|
|
81
|
+
'@storybook/web-components-webpack5': '7.0.0-alpha.18',
|
|
82
|
+
sb: '7.0.0-alpha.18',
|
|
83
|
+
storybook: '7.0.0-alpha.18'
|
|
84
84
|
};
|
|
85
85
|
exports.default = _default;
|
package/dist/esm/generate.js
CHANGED
|
@@ -11,6 +11,7 @@ import { migrate } from './migrate';
|
|
|
11
11
|
import { extract } from './extract';
|
|
12
12
|
import { upgrade } from './upgrade';
|
|
13
13
|
import { repro } from './repro';
|
|
14
|
+
import { reproNext } from './repro-next';
|
|
14
15
|
import { link } from './link';
|
|
15
16
|
import { automigrate } from './automigrate';
|
|
16
17
|
import { generateStorybookBabelConfigInCWD } from './babel-config';
|
|
@@ -24,7 +25,10 @@ const consoleLogger = console;
|
|
|
24
25
|
program.option('--disable-telemetry', 'disable sending telemetry data', // default value is false, but if the user sets STORYBOOK_DISABLE_TELEMETRY, it can be true
|
|
25
26
|
process.env.STORYBOOK_DISABLE_TELEMETRY && process.env.STORYBOOK_DISABLE_TELEMETRY !== 'false');
|
|
26
27
|
program.option('--enable-crash-reports', 'enable sending crash reports to telemetry data');
|
|
27
|
-
program.command('init').description('Initialize Storybook into your project.').option('-f --force', 'Force add Storybook').option('-s --skip-install', 'Skip installing deps').option('-N --use-npm', 'Use npm to install deps').option('--use-pnp', 'Enable pnp mode').option('-p --parser <babel | babylon | flow | ts | tsx>', 'jscodeshift parser').option('-t --type <type>', 'Add Storybook for a specific project type').option('-y --yes', 'Answer yes to all prompts').option('-b --builder <builder>', 'Builder library').option('-l --linkable', 'Prepare installation for link (contributor helper)').action(options => initiate(options, pkg)
|
|
28
|
+
program.command('init').description('Initialize Storybook into your project.').option('-f --force', 'Force add Storybook').option('-s --skip-install', 'Skip installing deps').option('-N --use-npm', 'Use npm to install deps').option('--use-pnp', 'Enable pnp mode').option('-p --parser <babel | babylon | flow | ts | tsx>', 'jscodeshift parser').option('-t --type <type>', 'Add Storybook for a specific project type').option('-y --yes', 'Answer yes to all prompts').option('-b --builder <builder>', 'Builder library').option('-l --linkable', 'Prepare installation for link (contributor helper)').action(options => initiate(options, pkg).catch(err => {
|
|
29
|
+
logger.error(err);
|
|
30
|
+
process.exit(1);
|
|
31
|
+
}));
|
|
28
32
|
program.command('add <addon>').description('Add an addon to your Storybook').option('-N --use-npm', 'Use NPM to build the Storybook server').option('-s --skip-postinstall', 'Skip package specific postinstall config modifications').action((addonName, options) => add(addonName, options));
|
|
29
33
|
program.command('babelrc').description('generate the default storybook babel config into your current working directory').action(() => generateStorybookBabelConfigInCWD());
|
|
30
34
|
program.command('upgrade').description('Upgrade your Storybook packages to the latest').option('-N --use-npm', 'Use NPM to build the Storybook server').option('-y --yes', 'Skip prompting the user').option('-n --dry-run', 'Only check for upgrades, do not install').option('-p --prerelease', 'Upgrade to the pre-release packages').option('-s --skip-check', 'Skip postinstall version and automigration checks').action(options => upgrade(options));
|
|
@@ -84,11 +88,19 @@ program.command('repro [outputDirectory]').description('Create a reproduction fr
|
|
|
84
88
|
logger.error(e);
|
|
85
89
|
process.exit(1);
|
|
86
90
|
}));
|
|
87
|
-
program.command('
|
|
88
|
-
|
|
91
|
+
program.command('repro-next [filterValue]').description('Create a reproduction from a set of possible templates').option('-o --output <outDir>', 'Define an output directory').option('-b --branch <branch>', 'Define the branch to degit from', 'next').action((filterValue, options) => reproNext(Object.assign({
|
|
92
|
+
filterValue
|
|
93
|
+
}, options)).catch(e => {
|
|
94
|
+
logger.error(e);
|
|
95
|
+
process.exit(1);
|
|
96
|
+
}));
|
|
97
|
+
program.command('link <repo-url-or-directory>').description('Pull down a repro from a URL (or a local directory), link it, and run storybook').option('--local', 'Link a local directory already in your file system').option('--no-start', 'Start the storybook', true).action((target, {
|
|
98
|
+
local,
|
|
99
|
+
start
|
|
89
100
|
}) => link({
|
|
90
101
|
target,
|
|
91
|
-
local
|
|
102
|
+
local,
|
|
103
|
+
start
|
|
92
104
|
}).catch(e => {
|
|
93
105
|
logger.error(e);
|
|
94
106
|
process.exit(1);
|
package/dist/esm/link.js
CHANGED
|
@@ -5,7 +5,8 @@ import { logger } from '@storybook/node-logger';
|
|
|
5
5
|
import { exec } from './repro-generators/scripts';
|
|
6
6
|
export const link = async ({
|
|
7
7
|
target,
|
|
8
|
-
local
|
|
8
|
+
local,
|
|
9
|
+
start
|
|
9
10
|
}) => {
|
|
10
11
|
const storybookDir = process.cwd();
|
|
11
12
|
|
|
@@ -58,8 +59,11 @@ export const link = async ({
|
|
|
58
59
|
await exec(`yarn add -D webpack-hot-middleware`, {
|
|
59
60
|
cwd: reproDir
|
|
60
61
|
});
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
62
|
+
|
|
63
|
+
if (start) {
|
|
64
|
+
logger.info(`Running ${reproName} storybook`);
|
|
65
|
+
await exec(`yarn run storybook`, {
|
|
66
|
+
cwd: reproDir
|
|
67
|
+
});
|
|
68
|
+
}
|
|
65
69
|
};
|
|
@@ -13,10 +13,14 @@ import storybookVersions from '../versions';
|
|
|
13
13
|
const logger = console;
|
|
14
14
|
export const exec = async (command, options = {}, {
|
|
15
15
|
startMessage,
|
|
16
|
-
errorMessage
|
|
16
|
+
errorMessage,
|
|
17
|
+
dryRun
|
|
17
18
|
} = {}) => {
|
|
18
|
-
if (startMessage)
|
|
19
|
-
|
|
19
|
+
if (startMessage) logger.info(startMessage);
|
|
20
|
+
|
|
21
|
+
if (dryRun) {
|
|
22
|
+
logger.info(`\n> ${command}\n`);
|
|
23
|
+
return undefined;
|
|
20
24
|
}
|
|
21
25
|
|
|
22
26
|
logger.debug(command);
|
|
@@ -29,7 +33,6 @@ export const exec = async (command, options = {}, {
|
|
|
29
33
|
silent: false
|
|
30
34
|
}));
|
|
31
35
|
child.stderr.pipe(process.stderr);
|
|
32
|
-
child.stdout.pipe(process.stdout);
|
|
33
36
|
child.on('exit', code => {
|
|
34
37
|
if (code === 0) {
|
|
35
38
|
resolve(undefined);
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import prompts from 'prompts';
|
|
2
|
+
import fs from 'fs';
|
|
3
|
+
import path from 'path';
|
|
4
|
+
import chalk from 'chalk';
|
|
5
|
+
import boxen from 'boxen';
|
|
6
|
+
import { dedent } from 'ts-dedent';
|
|
7
|
+
import degit from 'degit';
|
|
8
|
+
import TEMPLATES from './repro-templates';
|
|
9
|
+
const logger = console;
|
|
10
|
+
|
|
11
|
+
const toChoices = c => ({
|
|
12
|
+
title: TEMPLATES[c].name,
|
|
13
|
+
value: c
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
export const reproNext = async ({
|
|
17
|
+
output: outputDirectory,
|
|
18
|
+
filterValue,
|
|
19
|
+
branch
|
|
20
|
+
}) => {
|
|
21
|
+
const keys = Object.keys(TEMPLATES); // get value from template and reduce through TEMPLATES to filter out the correct template
|
|
22
|
+
|
|
23
|
+
const choices = keys.reduce((acc, group) => {
|
|
24
|
+
const current = TEMPLATES[group];
|
|
25
|
+
const filterRegex = new RegExp(filterValue, 'i');
|
|
26
|
+
|
|
27
|
+
if (!filterValue) {
|
|
28
|
+
acc.push(group);
|
|
29
|
+
return acc;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
if (current.name.match(filterRegex) || group.match(filterRegex) || current.expected.builder.match(filterRegex) || current.expected.framework.match(filterRegex) || current.expected.renderer.match(filterRegex)) {
|
|
33
|
+
acc.push(group);
|
|
34
|
+
return acc;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
return acc;
|
|
38
|
+
}, []);
|
|
39
|
+
|
|
40
|
+
if (choices.length === 0) {
|
|
41
|
+
logger.info(boxen(dedent`
|
|
42
|
+
🔎 You filtered out all templates. 🔍
|
|
43
|
+
After filtering all the templates with "${chalk.yellow(filterValue)}", we found no templates.
|
|
44
|
+
|
|
45
|
+
Available templates:
|
|
46
|
+
${keys.map(key => chalk.blue`- ${key}`).join('\n')}
|
|
47
|
+
`.trim(), {
|
|
48
|
+
borderStyle: 'round',
|
|
49
|
+
padding: 1,
|
|
50
|
+
borderColor: '#F1618C'
|
|
51
|
+
}));
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
let selectedTemplate = null;
|
|
56
|
+
|
|
57
|
+
if (choices.length === 1) {
|
|
58
|
+
[selectedTemplate] = choices;
|
|
59
|
+
} else {
|
|
60
|
+
logger.info(boxen(dedent`
|
|
61
|
+
🤗 Welcome to ${chalk.yellow('sb repro NEXT')}! 🤗
|
|
62
|
+
|
|
63
|
+
Create a ${chalk.green('new project')} to minimally reproduce Storybook issues.
|
|
64
|
+
|
|
65
|
+
1. select an environment that most closely matches your project setup.
|
|
66
|
+
2. select a location for the reproduction, outside of your project.
|
|
67
|
+
|
|
68
|
+
After the reproduction is ready, we'll guide you through the next steps.
|
|
69
|
+
`.trim(), {
|
|
70
|
+
borderStyle: 'round',
|
|
71
|
+
padding: 1,
|
|
72
|
+
borderColor: '#F1618C'
|
|
73
|
+
}));
|
|
74
|
+
selectedTemplate = await promptSelectedTemplate(choices);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
const hasSelectedTemplate = !!(selectedTemplate ?? null);
|
|
78
|
+
|
|
79
|
+
if (!hasSelectedTemplate) {
|
|
80
|
+
logger.error('Somehow we got no templates. Please rerun this command!');
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
const selectedConfig = TEMPLATES[selectedTemplate];
|
|
85
|
+
|
|
86
|
+
if (!selectedConfig) {
|
|
87
|
+
throw new Error('🚨 Repro: please specify a valid template type');
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
let selectedDirectory = outputDirectory;
|
|
91
|
+
|
|
92
|
+
if (!selectedDirectory) {
|
|
93
|
+
const {
|
|
94
|
+
directory
|
|
95
|
+
} = await prompts({
|
|
96
|
+
type: 'text',
|
|
97
|
+
message: 'Enter the output directory',
|
|
98
|
+
name: 'directory',
|
|
99
|
+
initial: selectedTemplate,
|
|
100
|
+
validate: directoryName => fs.existsSync(directoryName) ? `${directoryName} already exists. Please choose another name.` : true
|
|
101
|
+
});
|
|
102
|
+
selectedDirectory = directory;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
try {
|
|
106
|
+
const cwd = path.isAbsolute(selectedDirectory) ? selectedDirectory : path.join(process.cwd(), selectedDirectory);
|
|
107
|
+
logger.info(`🏃 Adding ${selectedConfig.name} into ${cwd}`);
|
|
108
|
+
logger.log('📦 Downloading repro template...');
|
|
109
|
+
|
|
110
|
+
try {
|
|
111
|
+
// Download the repro based on subfolder "after-storybook" and selected branch
|
|
112
|
+
await degit(`storybookjs/repro-templates-temp/${selectedTemplate}/after-storybook#${branch}`, {
|
|
113
|
+
force: true
|
|
114
|
+
}).clone(selectedTemplate.replace('/', '-'));
|
|
115
|
+
} catch (err) {
|
|
116
|
+
logger.error(`🚨 Failed to download repro template: ${err.message}`);
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
logger.info(boxen(dedent`
|
|
121
|
+
🎉 Your Storybook reproduction project is ready to use! 🎉
|
|
122
|
+
|
|
123
|
+
${chalk.yellow(`cd ${selectedDirectory}`)}
|
|
124
|
+
${chalk.yellow(`yarn storybook`)}
|
|
125
|
+
|
|
126
|
+
Once you've recreated the problem you're experiencing, please:
|
|
127
|
+
|
|
128
|
+
1. Document any additional steps in ${chalk.cyan('README.md')}
|
|
129
|
+
2. Publish the repository to github
|
|
130
|
+
3. Link to the repro repository in your issue
|
|
131
|
+
|
|
132
|
+
Having a clean repro helps us solve your issue faster! 🙏
|
|
133
|
+
`.trim(), {
|
|
134
|
+
borderStyle: 'round',
|
|
135
|
+
padding: 1,
|
|
136
|
+
borderColor: '#F1618C'
|
|
137
|
+
}));
|
|
138
|
+
} catch (error) {
|
|
139
|
+
logger.error('🚨 Failed to create repro');
|
|
140
|
+
throw error;
|
|
141
|
+
}
|
|
142
|
+
};
|
|
143
|
+
|
|
144
|
+
async function promptSelectedTemplate(choices) {
|
|
145
|
+
const {
|
|
146
|
+
template
|
|
147
|
+
} = await prompts({
|
|
148
|
+
type: 'select',
|
|
149
|
+
message: '🌈 Select the template',
|
|
150
|
+
name: 'template',
|
|
151
|
+
choices: choices.map(toChoices)
|
|
152
|
+
});
|
|
153
|
+
return template || null;
|
|
154
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// auto generated file, do not edit
|
|
2
|
+
export default {
|
|
3
|
+
'cra/default-js': {
|
|
4
|
+
name: 'Create React App (Javascript)',
|
|
5
|
+
script: 'npx create-react-app .',
|
|
6
|
+
expected: {
|
|
7
|
+
framework: '@storybook/cra',
|
|
8
|
+
renderer: '@storybook/react',
|
|
9
|
+
builder: '@storybook/builder-webpack5'
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
'cra/default-ts': {
|
|
13
|
+
name: 'Create React App (Typescript)',
|
|
14
|
+
script: 'npx create-react-app . --template typescript',
|
|
15
|
+
expected: {
|
|
16
|
+
framework: '@storybook/cra',
|
|
17
|
+
renderer: '@storybook/react',
|
|
18
|
+
builder: '@storybook/builder-webpack5'
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
};
|
package/dist/esm/versions.js
CHANGED
|
@@ -1,78 +1,78 @@
|
|
|
1
1
|
// auto generated file, do not edit
|
|
2
2
|
export default {
|
|
3
|
-
'@storybook/addon-a11y': '7.0.0-alpha.
|
|
4
|
-
'@storybook/addon-actions': '7.0.0-alpha.
|
|
5
|
-
'@storybook/addon-backgrounds': '7.0.0-alpha.
|
|
6
|
-
'@storybook/addon-controls': '7.0.0-alpha.
|
|
7
|
-
'@storybook/addon-docs': '7.0.0-alpha.
|
|
8
|
-
'@storybook/addon-essentials': '7.0.0-alpha.
|
|
9
|
-
'@storybook/addon-highlight': '7.0.0-alpha.
|
|
10
|
-
'@storybook/addon-interactions': '7.0.0-alpha.
|
|
11
|
-
'@storybook/addon-jest': '7.0.0-alpha.
|
|
12
|
-
'@storybook/addon-links': '7.0.0-alpha.
|
|
13
|
-
'@storybook/addon-measure': '7.0.0-alpha.
|
|
14
|
-
'@storybook/addon-outline': '7.0.0-alpha.
|
|
15
|
-
'@storybook/addon-storyshots': '7.0.0-alpha.
|
|
16
|
-
'@storybook/addon-storyshots-puppeteer': '7.0.0-alpha.
|
|
17
|
-
'@storybook/addon-storysource': '7.0.0-alpha.
|
|
18
|
-
'@storybook/addon-toolbars': '7.0.0-alpha.
|
|
19
|
-
'@storybook/addon-viewport': '7.0.0-alpha.
|
|
20
|
-
'@storybook/addons': '7.0.0-alpha.
|
|
21
|
-
'@storybook/angular': '7.0.0-alpha.
|
|
22
|
-
'@storybook/api': '7.0.0-alpha.
|
|
23
|
-
'@storybook/blocks': '7.0.0-alpha.
|
|
24
|
-
'@storybook/builder-manager': '7.0.0-alpha.
|
|
25
|
-
'@storybook/builder-webpack5': '7.0.0-alpha.
|
|
26
|
-
'@storybook/channel-postmessage': '7.0.0-alpha.
|
|
27
|
-
'@storybook/channel-websocket': '7.0.0-alpha.
|
|
28
|
-
'@storybook/channels': '7.0.0-alpha.
|
|
29
|
-
'@storybook/cli': '7.0.0-alpha.
|
|
30
|
-
'@storybook/client-api': '7.0.0-alpha.
|
|
31
|
-
'@storybook/client-logger': '7.0.0-alpha.
|
|
32
|
-
'@storybook/codemod': '7.0.0-alpha.
|
|
33
|
-
'@storybook/components': '7.0.0-alpha.
|
|
34
|
-
'@storybook/core-client': '7.0.0-alpha.
|
|
35
|
-
'@storybook/core-common': '7.0.0-alpha.
|
|
36
|
-
'@storybook/core-events': '7.0.0-alpha.
|
|
37
|
-
'@storybook/core-server': '7.0.0-alpha.
|
|
38
|
-
'@storybook/core-webpack': '7.0.0-alpha.
|
|
39
|
-
'@storybook/csf-tools': '7.0.0-alpha.
|
|
40
|
-
'@storybook/docs-tools': '7.0.0-alpha.
|
|
41
|
-
'@storybook/ember': '7.0.0-alpha.
|
|
42
|
-
'@storybook/html': '7.0.0-alpha.
|
|
43
|
-
'@storybook/html-webpack5': '7.0.0-alpha.
|
|
44
|
-
'@storybook/instrumenter': '7.0.0-alpha.
|
|
45
|
-
'@storybook/node-logger': '7.0.0-alpha.
|
|
46
|
-
'@storybook/postinstall': '7.0.0-alpha.
|
|
47
|
-
'@storybook/preact': '7.0.0-alpha.
|
|
48
|
-
'@storybook/preact-webpack5': '7.0.0-alpha.
|
|
49
|
-
'@storybook/preset-html-webpack': '7.0.0-alpha.
|
|
50
|
-
'@storybook/preset-preact-webpack': '7.0.0-alpha.
|
|
51
|
-
'@storybook/preset-react-webpack': '7.0.0-alpha.
|
|
52
|
-
'@storybook/preset-server-webpack': '7.0.0-alpha.
|
|
53
|
-
'@storybook/preset-svelte-webpack': '7.0.0-alpha.
|
|
54
|
-
'@storybook/preset-vue-webpack': '7.0.0-alpha.
|
|
55
|
-
'@storybook/preset-vue3-webpack': '7.0.0-alpha.
|
|
56
|
-
'@storybook/preset-web-components-webpack': '7.0.0-alpha.
|
|
57
|
-
'@storybook/preview-web': '7.0.0-alpha.
|
|
58
|
-
'@storybook/react': '7.0.0-alpha.
|
|
59
|
-
'@storybook/react-webpack5': '7.0.0-alpha.
|
|
60
|
-
'@storybook/router': '7.0.0-alpha.
|
|
61
|
-
'@storybook/server': '7.0.0-alpha.
|
|
62
|
-
'@storybook/server-webpack5': '7.0.0-alpha.
|
|
63
|
-
'@storybook/source-loader': '7.0.0-alpha.
|
|
64
|
-
'@storybook/store': '7.0.0-alpha.
|
|
65
|
-
'@storybook/svelte': '7.0.0-alpha.
|
|
66
|
-
'@storybook/svelte-webpack5': '7.0.0-alpha.
|
|
67
|
-
'@storybook/telemetry': '7.0.0-alpha.
|
|
68
|
-
'@storybook/theming': '7.0.0-alpha.
|
|
69
|
-
'@storybook/ui': '7.0.0-alpha.
|
|
70
|
-
'@storybook/vue': '7.0.0-alpha.
|
|
71
|
-
'@storybook/vue-webpack5': '7.0.0-alpha.
|
|
72
|
-
'@storybook/vue3': '7.0.0-alpha.
|
|
73
|
-
'@storybook/vue3-webpack5': '7.0.0-alpha.
|
|
74
|
-
'@storybook/web-components': '7.0.0-alpha.
|
|
75
|
-
'@storybook/web-components-webpack5': '7.0.0-alpha.
|
|
76
|
-
sb: '7.0.0-alpha.
|
|
77
|
-
storybook: '7.0.0-alpha.
|
|
3
|
+
'@storybook/addon-a11y': '7.0.0-alpha.18',
|
|
4
|
+
'@storybook/addon-actions': '7.0.0-alpha.18',
|
|
5
|
+
'@storybook/addon-backgrounds': '7.0.0-alpha.18',
|
|
6
|
+
'@storybook/addon-controls': '7.0.0-alpha.18',
|
|
7
|
+
'@storybook/addon-docs': '7.0.0-alpha.18',
|
|
8
|
+
'@storybook/addon-essentials': '7.0.0-alpha.18',
|
|
9
|
+
'@storybook/addon-highlight': '7.0.0-alpha.18',
|
|
10
|
+
'@storybook/addon-interactions': '7.0.0-alpha.18',
|
|
11
|
+
'@storybook/addon-jest': '7.0.0-alpha.18',
|
|
12
|
+
'@storybook/addon-links': '7.0.0-alpha.18',
|
|
13
|
+
'@storybook/addon-measure': '7.0.0-alpha.18',
|
|
14
|
+
'@storybook/addon-outline': '7.0.0-alpha.18',
|
|
15
|
+
'@storybook/addon-storyshots': '7.0.0-alpha.18',
|
|
16
|
+
'@storybook/addon-storyshots-puppeteer': '7.0.0-alpha.18',
|
|
17
|
+
'@storybook/addon-storysource': '7.0.0-alpha.18',
|
|
18
|
+
'@storybook/addon-toolbars': '7.0.0-alpha.18',
|
|
19
|
+
'@storybook/addon-viewport': '7.0.0-alpha.18',
|
|
20
|
+
'@storybook/addons': '7.0.0-alpha.18',
|
|
21
|
+
'@storybook/angular': '7.0.0-alpha.18',
|
|
22
|
+
'@storybook/api': '7.0.0-alpha.18',
|
|
23
|
+
'@storybook/blocks': '7.0.0-alpha.18',
|
|
24
|
+
'@storybook/builder-manager': '7.0.0-alpha.18',
|
|
25
|
+
'@storybook/builder-webpack5': '7.0.0-alpha.18',
|
|
26
|
+
'@storybook/channel-postmessage': '7.0.0-alpha.18',
|
|
27
|
+
'@storybook/channel-websocket': '7.0.0-alpha.18',
|
|
28
|
+
'@storybook/channels': '7.0.0-alpha.18',
|
|
29
|
+
'@storybook/cli': '7.0.0-alpha.18',
|
|
30
|
+
'@storybook/client-api': '7.0.0-alpha.18',
|
|
31
|
+
'@storybook/client-logger': '7.0.0-alpha.18',
|
|
32
|
+
'@storybook/codemod': '7.0.0-alpha.18',
|
|
33
|
+
'@storybook/components': '7.0.0-alpha.18',
|
|
34
|
+
'@storybook/core-client': '7.0.0-alpha.18',
|
|
35
|
+
'@storybook/core-common': '7.0.0-alpha.18',
|
|
36
|
+
'@storybook/core-events': '7.0.0-alpha.18',
|
|
37
|
+
'@storybook/core-server': '7.0.0-alpha.18',
|
|
38
|
+
'@storybook/core-webpack': '7.0.0-alpha.18',
|
|
39
|
+
'@storybook/csf-tools': '7.0.0-alpha.18',
|
|
40
|
+
'@storybook/docs-tools': '7.0.0-alpha.18',
|
|
41
|
+
'@storybook/ember': '7.0.0-alpha.18',
|
|
42
|
+
'@storybook/html': '7.0.0-alpha.18',
|
|
43
|
+
'@storybook/html-webpack5': '7.0.0-alpha.18',
|
|
44
|
+
'@storybook/instrumenter': '7.0.0-alpha.18',
|
|
45
|
+
'@storybook/node-logger': '7.0.0-alpha.18',
|
|
46
|
+
'@storybook/postinstall': '7.0.0-alpha.18',
|
|
47
|
+
'@storybook/preact': '7.0.0-alpha.18',
|
|
48
|
+
'@storybook/preact-webpack5': '7.0.0-alpha.18',
|
|
49
|
+
'@storybook/preset-html-webpack': '7.0.0-alpha.18',
|
|
50
|
+
'@storybook/preset-preact-webpack': '7.0.0-alpha.18',
|
|
51
|
+
'@storybook/preset-react-webpack': '7.0.0-alpha.18',
|
|
52
|
+
'@storybook/preset-server-webpack': '7.0.0-alpha.18',
|
|
53
|
+
'@storybook/preset-svelte-webpack': '7.0.0-alpha.18',
|
|
54
|
+
'@storybook/preset-vue-webpack': '7.0.0-alpha.18',
|
|
55
|
+
'@storybook/preset-vue3-webpack': '7.0.0-alpha.18',
|
|
56
|
+
'@storybook/preset-web-components-webpack': '7.0.0-alpha.18',
|
|
57
|
+
'@storybook/preview-web': '7.0.0-alpha.18',
|
|
58
|
+
'@storybook/react': '7.0.0-alpha.18',
|
|
59
|
+
'@storybook/react-webpack5': '7.0.0-alpha.18',
|
|
60
|
+
'@storybook/router': '7.0.0-alpha.18',
|
|
61
|
+
'@storybook/server': '7.0.0-alpha.18',
|
|
62
|
+
'@storybook/server-webpack5': '7.0.0-alpha.18',
|
|
63
|
+
'@storybook/source-loader': '7.0.0-alpha.18',
|
|
64
|
+
'@storybook/store': '7.0.0-alpha.18',
|
|
65
|
+
'@storybook/svelte': '7.0.0-alpha.18',
|
|
66
|
+
'@storybook/svelte-webpack5': '7.0.0-alpha.18',
|
|
67
|
+
'@storybook/telemetry': '7.0.0-alpha.18',
|
|
68
|
+
'@storybook/theming': '7.0.0-alpha.18',
|
|
69
|
+
'@storybook/ui': '7.0.0-alpha.18',
|
|
70
|
+
'@storybook/vue': '7.0.0-alpha.18',
|
|
71
|
+
'@storybook/vue-webpack5': '7.0.0-alpha.18',
|
|
72
|
+
'@storybook/vue3': '7.0.0-alpha.18',
|
|
73
|
+
'@storybook/vue3-webpack5': '7.0.0-alpha.18',
|
|
74
|
+
'@storybook/web-components': '7.0.0-alpha.18',
|
|
75
|
+
'@storybook/web-components-webpack5': '7.0.0-alpha.18',
|
|
76
|
+
sb: '7.0.0-alpha.18',
|
|
77
|
+
storybook: '7.0.0-alpha.18'
|
|
78
78
|
};
|
package/dist/types/link.d.ts
CHANGED
|
@@ -35,9 +35,10 @@ export interface Options extends Parameters {
|
|
|
35
35
|
e2e: boolean;
|
|
36
36
|
pnp: boolean;
|
|
37
37
|
}
|
|
38
|
-
export declare const exec: (command: string, options?: ExecOptions, { startMessage, errorMessage }?: {
|
|
38
|
+
export declare const exec: (command: string, options?: ExecOptions, { startMessage, errorMessage, dryRun, }?: {
|
|
39
39
|
startMessage?: string;
|
|
40
40
|
errorMessage?: string;
|
|
41
|
+
dryRun?: boolean;
|
|
41
42
|
}) => Promise<unknown>;
|
|
42
43
|
export declare const createAndInit: (cwd: string, { name, version, ...rest }: Parameters, { e2e, pnp, local, registry }: Configuration) => Promise<void>;
|
|
43
44
|
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
readonly 'cra/default-js': {
|
|
3
|
+
readonly name: "Create React App (Javascript)";
|
|
4
|
+
readonly script: "npx create-react-app .";
|
|
5
|
+
readonly expected: {
|
|
6
|
+
readonly framework: "@storybook/cra";
|
|
7
|
+
readonly renderer: "@storybook/react";
|
|
8
|
+
readonly builder: "@storybook/builder-webpack5";
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
readonly 'cra/default-ts': {
|
|
12
|
+
readonly name: "Create React App (Typescript)";
|
|
13
|
+
readonly script: "npx create-react-app . --template typescript";
|
|
14
|
+
readonly expected: {
|
|
15
|
+
readonly framework: "@storybook/cra";
|
|
16
|
+
readonly renderer: "@storybook/react";
|
|
17
|
+
readonly builder: "@storybook/builder-webpack5";
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
export default _default;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storybook/cli",
|
|
3
|
-
"version": "7.0.0-alpha.
|
|
3
|
+
"version": "7.0.0-alpha.18",
|
|
4
4
|
"description": "Storybook's CLI - easiest method of adding storybook to your projects",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cli",
|
|
@@ -42,24 +42,26 @@
|
|
|
42
42
|
],
|
|
43
43
|
"scripts": {
|
|
44
44
|
"check": "tsc --noEmit",
|
|
45
|
+
"preprepare": "node ./scripts/generate-repro-templates-list.js",
|
|
45
46
|
"prepare": "node ../../../scripts/prepare.js",
|
|
46
47
|
"test": "jest test/**/*.test.js"
|
|
47
48
|
},
|
|
48
49
|
"dependencies": {
|
|
49
50
|
"@babel/core": "^7.12.10",
|
|
50
51
|
"@babel/preset-env": "^7.12.11",
|
|
51
|
-
"@storybook/codemod": "7.0.0-alpha.
|
|
52
|
-
"@storybook/core-common": "7.0.0-alpha.
|
|
53
|
-
"@storybook/core-server": "7.0.0-alpha.
|
|
54
|
-
"@storybook/csf-tools": "7.0.0-alpha.
|
|
55
|
-
"@storybook/node-logger": "7.0.0-alpha.
|
|
52
|
+
"@storybook/codemod": "7.0.0-alpha.18",
|
|
53
|
+
"@storybook/core-common": "7.0.0-alpha.18",
|
|
54
|
+
"@storybook/core-server": "7.0.0-alpha.18",
|
|
55
|
+
"@storybook/csf-tools": "7.0.0-alpha.18",
|
|
56
|
+
"@storybook/node-logger": "7.0.0-alpha.18",
|
|
56
57
|
"@storybook/semver": "^7.3.2",
|
|
57
|
-
"@storybook/telemetry": "7.0.0-alpha.
|
|
58
|
+
"@storybook/telemetry": "7.0.0-alpha.18",
|
|
58
59
|
"boxen": "^5.1.2",
|
|
59
60
|
"chalk": "^4.1.0",
|
|
60
61
|
"commander": "^6.2.1",
|
|
61
62
|
"core-js": "^3.8.2",
|
|
62
63
|
"cross-spawn": "^7.0.3",
|
|
64
|
+
"degit": "^2.8.4",
|
|
63
65
|
"envinfo": "^7.7.3",
|
|
64
66
|
"execa": "^5.0.0",
|
|
65
67
|
"express": "^4.17.1",
|
|
@@ -67,6 +69,7 @@
|
|
|
67
69
|
"fs-extra": "^9.0.1",
|
|
68
70
|
"get-port": "^5.1.1",
|
|
69
71
|
"globby": "^11.0.2",
|
|
72
|
+
"js-yaml": "^3.14.1",
|
|
70
73
|
"jscodeshift": "^0.13.1",
|
|
71
74
|
"json5": "^2.1.3",
|
|
72
75
|
"leven": "^3.1.0",
|
|
@@ -79,8 +82,9 @@
|
|
|
79
82
|
"update-notifier": "^5.0.1"
|
|
80
83
|
},
|
|
81
84
|
"devDependencies": {
|
|
82
|
-
"@storybook/client-api": "7.0.0-alpha.
|
|
85
|
+
"@storybook/client-api": "7.0.0-alpha.18",
|
|
83
86
|
"@types/cross-spawn": "^6.0.2",
|
|
87
|
+
"@types/degit": "^2.8.3",
|
|
84
88
|
"@types/prompts": "^2.0.9",
|
|
85
89
|
"@types/puppeteer-core": "^2.1.0",
|
|
86
90
|
"@types/semver": "^7.3.4",
|
|
@@ -93,5 +97,5 @@
|
|
|
93
97
|
"publishConfig": {
|
|
94
98
|
"access": "public"
|
|
95
99
|
},
|
|
96
|
-
"gitHead": "
|
|
100
|
+
"gitHead": "bd59f1eef0f644175abdb0d9873ed0553f431f53"
|
|
97
101
|
}
|