@storybook/core-server 6.4.12 → 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.
|
@@ -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
|
|
|
@@ -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, {
|
|
@@ -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",
|
|
@@ -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
|
}
|