@storybook/core-server 6.4.8 → 6.4.13
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/build-dev.js
CHANGED
|
@@ -131,11 +131,11 @@ async function buildDevStandalone(options) {
|
|
|
131
131
|
if (options.smokeTest) {
|
|
132
132
|
// @ts-ignore
|
|
133
133
|
var managerWarnings = managerStats && managerStats.toJson().warnings || [];
|
|
134
|
-
if (managerWarnings.length > 0) _nodeLogger.logger.warn(`manager: ${managerWarnings}`); // I'm a little reticent to import webpack types in this file :shrug:
|
|
134
|
+
if (managerWarnings.length > 0) _nodeLogger.logger.warn(`manager: ${JSON.stringify(managerWarnings, null, 2)}`); // I'm a little reticent to import webpack types in this file :shrug:
|
|
135
135
|
// @ts-ignore
|
|
136
136
|
|
|
137
137
|
var previewWarnings = previewStats && previewStats.toJson().warnings || [];
|
|
138
|
-
if (previewWarnings.length > 0) _nodeLogger.logger.warn(`preview: ${previewWarnings}`);
|
|
138
|
+
if (previewWarnings.length > 0) _nodeLogger.logger.warn(`preview: ${JSON.stringify(previewWarnings, null, 2)}`);
|
|
139
139
|
process.exit(managerWarnings.length > 0 || previewWarnings.length > 0 && !options.ignorePreview ? 1 : 0);
|
|
140
140
|
return;
|
|
141
141
|
} // Get package name and capitalize it e.g. @storybook/react -> React
|
|
@@ -56,33 +56,23 @@ async function useStatics(router, options) {
|
|
|
56
56
|
`);
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
var _await$parseStaticDir = await parseStaticDir((0, _coreCommon.getDirectoryFromWorkingDir)({
|
|
64
|
-
configDir: options.configDir,
|
|
65
|
-
workingDir: process.cwd(),
|
|
66
|
-
directory: staticDirAndTarget
|
|
67
|
-
})),
|
|
68
|
-
from = _await$parseStaticDir.staticPath,
|
|
69
|
-
to = _await$parseStaticDir.targetEndpoint;
|
|
70
|
-
|
|
71
|
-
_nodeLogger.logger.info((0, _chalk.default)`=> Serving static files from {cyan ${from}} at {cyan ${to}}`);
|
|
72
|
-
|
|
73
|
-
router.use(to, _express.default.static(from, {
|
|
74
|
-
index: false
|
|
75
|
-
}));
|
|
76
|
-
});
|
|
77
|
-
}
|
|
59
|
+
var statics = staticDirs ? staticDirs.map(function (dir) {
|
|
60
|
+
return typeof dir === 'string' ? dir : `${dir.from}:${dir.to}`;
|
|
61
|
+
}) : options.staticDir;
|
|
78
62
|
|
|
79
|
-
if (
|
|
80
|
-
await Promise.all(
|
|
63
|
+
if (statics && statics.length > 0) {
|
|
64
|
+
await Promise.all(statics.map(async function (dir) {
|
|
81
65
|
try {
|
|
82
|
-
var
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
66
|
+
var relativeDir = staticDirs ? (0, _coreCommon.getDirectoryFromWorkingDir)({
|
|
67
|
+
configDir: options.configDir,
|
|
68
|
+
workingDir: process.cwd(),
|
|
69
|
+
directory: dir
|
|
70
|
+
}) : dir;
|
|
71
|
+
|
|
72
|
+
var _await$parseStaticDir = await parseStaticDir(relativeDir),
|
|
73
|
+
staticDir = _await$parseStaticDir.staticDir,
|
|
74
|
+
staticPath = _await$parseStaticDir.staticPath,
|
|
75
|
+
targetEndpoint = _await$parseStaticDir.targetEndpoint;
|
|
86
76
|
|
|
87
77
|
_nodeLogger.logger.info((0, _chalk.default)`=> Serving static files from {cyan ${staticDir}} at {cyan ${targetEndpoint}}`);
|
|
88
78
|
|
package/dist/esm/build-dev.js
CHANGED
|
@@ -105,11 +105,11 @@ export async function buildDevStandalone(options) {
|
|
|
105
105
|
if (options.smokeTest) {
|
|
106
106
|
// @ts-ignore
|
|
107
107
|
var managerWarnings = managerStats && managerStats.toJson().warnings || [];
|
|
108
|
-
if (managerWarnings.length > 0) logger.warn(`manager: ${managerWarnings}`); // I'm a little reticent to import webpack types in this file :shrug:
|
|
108
|
+
if (managerWarnings.length > 0) logger.warn(`manager: ${JSON.stringify(managerWarnings, null, 2)}`); // I'm a little reticent to import webpack types in this file :shrug:
|
|
109
109
|
// @ts-ignore
|
|
110
110
|
|
|
111
111
|
var previewWarnings = previewStats && previewStats.toJson().warnings || [];
|
|
112
|
-
if (previewWarnings.length > 0) logger.warn(`preview: ${previewWarnings}`);
|
|
112
|
+
if (previewWarnings.length > 0) logger.warn(`preview: ${JSON.stringify(previewWarnings, null, 2)}`);
|
|
113
113
|
process.exit(managerWarnings.length > 0 || previewWarnings.length > 0 && !options.ignorePreview ? 1 : 0);
|
|
114
114
|
return;
|
|
115
115
|
} // Get package name and capitalize it e.g. @storybook/react -> React
|
|
@@ -37,32 +37,23 @@ export async function useStatics(router, options) {
|
|
|
37
37
|
`);
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
var _await$parseStaticDir = await parseStaticDir(getDirectoryFromWorkingDir({
|
|
45
|
-
configDir: options.configDir,
|
|
46
|
-
workingDir: process.cwd(),
|
|
47
|
-
directory: staticDirAndTarget
|
|
48
|
-
})),
|
|
49
|
-
from = _await$parseStaticDir.staticPath,
|
|
50
|
-
to = _await$parseStaticDir.targetEndpoint;
|
|
51
|
-
|
|
52
|
-
logger.info(chalk`=> Serving static files from {cyan ${from}} at {cyan ${to}}`);
|
|
53
|
-
router.use(to, express.static(from, {
|
|
54
|
-
index: false
|
|
55
|
-
}));
|
|
56
|
-
});
|
|
57
|
-
}
|
|
40
|
+
var statics = staticDirs ? staticDirs.map(function (dir) {
|
|
41
|
+
return typeof dir === 'string' ? dir : `${dir.from}:${dir.to}`;
|
|
42
|
+
}) : options.staticDir;
|
|
58
43
|
|
|
59
|
-
if (
|
|
60
|
-
await Promise.all(
|
|
44
|
+
if (statics && statics.length > 0) {
|
|
45
|
+
await Promise.all(statics.map(async function (dir) {
|
|
61
46
|
try {
|
|
62
|
-
var
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
47
|
+
var relativeDir = staticDirs ? getDirectoryFromWorkingDir({
|
|
48
|
+
configDir: options.configDir,
|
|
49
|
+
workingDir: process.cwd(),
|
|
50
|
+
directory: dir
|
|
51
|
+
}) : dir;
|
|
52
|
+
|
|
53
|
+
var _await$parseStaticDir = await parseStaticDir(relativeDir),
|
|
54
|
+
staticDir = _await$parseStaticDir.staticDir,
|
|
55
|
+
staticPath = _await$parseStaticDir.staticPath,
|
|
56
|
+
targetEndpoint = _await$parseStaticDir.targetEndpoint;
|
|
66
57
|
|
|
67
58
|
logger.info(chalk`=> Serving static files from {cyan ${staticDir}} at {cyan ${targetEndpoint}}`);
|
|
68
59
|
router.use(targetEndpoint, express.static(staticPath, {
|
package/dist/modern/build-dev.js
CHANGED
|
@@ -105,11 +105,11 @@ export async function buildDevStandalone(options) {
|
|
|
105
105
|
if (options.smokeTest) {
|
|
106
106
|
// @ts-ignore
|
|
107
107
|
var managerWarnings = managerStats && managerStats.toJson().warnings || [];
|
|
108
|
-
if (managerWarnings.length > 0) logger.warn(`manager: ${managerWarnings}`); // I'm a little reticent to import webpack types in this file :shrug:
|
|
108
|
+
if (managerWarnings.length > 0) logger.warn(`manager: ${JSON.stringify(managerWarnings, null, 2)}`); // I'm a little reticent to import webpack types in this file :shrug:
|
|
109
109
|
// @ts-ignore
|
|
110
110
|
|
|
111
111
|
var previewWarnings = previewStats && previewStats.toJson().warnings || [];
|
|
112
|
-
if (previewWarnings.length > 0) logger.warn(`preview: ${previewWarnings}`);
|
|
112
|
+
if (previewWarnings.length > 0) logger.warn(`preview: ${JSON.stringify(previewWarnings, null, 2)}`);
|
|
113
113
|
process.exit(managerWarnings.length > 0 || previewWarnings.length > 0 && !options.ignorePreview ? 1 : 0);
|
|
114
114
|
return;
|
|
115
115
|
} // Get package name and capitalize it e.g. @storybook/react -> React
|
|
@@ -37,32 +37,23 @@ export async function useStatics(router, options) {
|
|
|
37
37
|
`);
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
var _await$parseStaticDir = await parseStaticDir(getDirectoryFromWorkingDir({
|
|
45
|
-
configDir: options.configDir,
|
|
46
|
-
workingDir: process.cwd(),
|
|
47
|
-
directory: staticDirAndTarget
|
|
48
|
-
})),
|
|
49
|
-
from = _await$parseStaticDir.staticPath,
|
|
50
|
-
to = _await$parseStaticDir.targetEndpoint;
|
|
51
|
-
|
|
52
|
-
logger.info(chalk`=> Serving static files from {cyan ${from}} at {cyan ${to}}`);
|
|
53
|
-
router.use(to, express.static(from, {
|
|
54
|
-
index: false
|
|
55
|
-
}));
|
|
56
|
-
});
|
|
57
|
-
}
|
|
40
|
+
var statics = staticDirs ? staticDirs.map(function (dir) {
|
|
41
|
+
return typeof dir === 'string' ? dir : `${dir.from}:${dir.to}`;
|
|
42
|
+
}) : options.staticDir;
|
|
58
43
|
|
|
59
|
-
if (
|
|
60
|
-
await Promise.all(
|
|
44
|
+
if (statics && statics.length > 0) {
|
|
45
|
+
await Promise.all(statics.map(async function (dir) {
|
|
61
46
|
try {
|
|
62
|
-
var
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
47
|
+
var relativeDir = staticDirs ? getDirectoryFromWorkingDir({
|
|
48
|
+
configDir: options.configDir,
|
|
49
|
+
workingDir: process.cwd(),
|
|
50
|
+
directory: dir
|
|
51
|
+
}) : dir;
|
|
52
|
+
|
|
53
|
+
var _await$parseStaticDir = await parseStaticDir(relativeDir),
|
|
54
|
+
staticDir = _await$parseStaticDir.staticDir,
|
|
55
|
+
staticPath = _await$parseStaticDir.staticPath,
|
|
56
|
+
targetEndpoint = _await$parseStaticDir.targetEndpoint;
|
|
66
57
|
|
|
67
58
|
logger.info(chalk`=> Serving static files from {cyan ${staticDir}} at {cyan ${targetEndpoint}}`);
|
|
68
59
|
router.use(targetEndpoint, express.static(staticPath, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storybook/core-server",
|
|
3
|
-
"version": "6.4.
|
|
3
|
+
"version": "6.4.13",
|
|
4
4
|
"description": "Storybook framework-agnostic API",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"storybook"
|
|
@@ -41,16 +41,16 @@
|
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
43
|
"@discoveryjs/json-ext": "^0.5.3",
|
|
44
|
-
"@storybook/builder-webpack4": "6.4.
|
|
45
|
-
"@storybook/core-client": "6.4.
|
|
46
|
-
"@storybook/core-common": "6.4.
|
|
47
|
-
"@storybook/core-events": "6.4.
|
|
44
|
+
"@storybook/builder-webpack4": "6.4.13",
|
|
45
|
+
"@storybook/core-client": "6.4.13",
|
|
46
|
+
"@storybook/core-common": "6.4.13",
|
|
47
|
+
"@storybook/core-events": "6.4.13",
|
|
48
48
|
"@storybook/csf": "0.0.2--canary.87bc651.0",
|
|
49
|
-
"@storybook/csf-tools": "6.4.
|
|
50
|
-
"@storybook/manager-webpack4": "6.4.
|
|
51
|
-
"@storybook/node-logger": "6.4.
|
|
49
|
+
"@storybook/csf-tools": "6.4.13",
|
|
50
|
+
"@storybook/manager-webpack4": "6.4.13",
|
|
51
|
+
"@storybook/node-logger": "6.4.13",
|
|
52
52
|
"@storybook/semver": "^7.3.2",
|
|
53
|
-
"@storybook/store": "6.4.
|
|
53
|
+
"@storybook/store": "6.4.13",
|
|
54
54
|
"@types/node": "^14.0.10",
|
|
55
55
|
"@types/node-fetch": "^2.5.7",
|
|
56
56
|
"@types/pretty-hrtime": "^1.0.0",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"better-opn": "^2.1.1",
|
|
59
59
|
"boxen": "^5.1.2",
|
|
60
60
|
"chalk": "^4.1.0",
|
|
61
|
-
"cli-table3": "0.6.
|
|
61
|
+
"cli-table3": "^0.6.1",
|
|
62
62
|
"commander": "^6.2.1",
|
|
63
63
|
"compression": "^1.7.4",
|
|
64
64
|
"core-js": "^3.8.2",
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
"ws": "^8.2.3"
|
|
85
85
|
},
|
|
86
86
|
"devDependencies": {
|
|
87
|
-
"@storybook/builder-webpack5": "6.4.
|
|
87
|
+
"@storybook/builder-webpack5": "6.4.13",
|
|
88
88
|
"@types/compression": "^1.7.0",
|
|
89
89
|
"@types/ip": "^1.1.0",
|
|
90
90
|
"@types/serve-favicon": "^2.5.2",
|
|
@@ -92,8 +92,8 @@
|
|
|
92
92
|
"jest-specific-snapshot": "^4.0.0"
|
|
93
93
|
},
|
|
94
94
|
"peerDependencies": {
|
|
95
|
-
"@storybook/builder-webpack5": "6.4.
|
|
96
|
-
"@storybook/manager-webpack5": "6.4.
|
|
95
|
+
"@storybook/builder-webpack5": "6.4.13",
|
|
96
|
+
"@storybook/manager-webpack5": "6.4.13",
|
|
97
97
|
"react": "^16.8.0 || ^17.0.0",
|
|
98
98
|
"react-dom": "^16.8.0 || ^17.0.0"
|
|
99
99
|
},
|
|
@@ -111,6 +111,6 @@
|
|
|
111
111
|
"publishConfig": {
|
|
112
112
|
"access": "public"
|
|
113
113
|
},
|
|
114
|
-
"gitHead": "
|
|
114
|
+
"gitHead": "d0c1e8a2f33b515a945d1a1a83560ba7045f6a5e",
|
|
115
115
|
"sbmodern": "dist/modern/index.js"
|
|
116
116
|
}
|