@storybook/core-server 6.5.0-alpha.13 → 6.5.0-alpha.17
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.5.0-alpha.
|
|
3
|
+
"version": "6.5.0-alpha.17",
|
|
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.5.0-alpha.
|
|
45
|
-
"@storybook/core-client": "6.5.0-alpha.
|
|
46
|
-
"@storybook/core-common": "6.5.0-alpha.
|
|
47
|
-
"@storybook/core-events": "6.5.0-alpha.
|
|
44
|
+
"@storybook/builder-webpack4": "6.5.0-alpha.17",
|
|
45
|
+
"@storybook/core-client": "6.5.0-alpha.17",
|
|
46
|
+
"@storybook/core-common": "6.5.0-alpha.17",
|
|
47
|
+
"@storybook/core-events": "6.5.0-alpha.17",
|
|
48
48
|
"@storybook/csf": "0.0.2--canary.87bc651.0",
|
|
49
|
-
"@storybook/csf-tools": "6.5.0-alpha.
|
|
50
|
-
"@storybook/manager-webpack4": "6.5.0-alpha.
|
|
51
|
-
"@storybook/node-logger": "6.5.0-alpha.
|
|
49
|
+
"@storybook/csf-tools": "6.5.0-alpha.17",
|
|
50
|
+
"@storybook/manager-webpack4": "6.5.0-alpha.17",
|
|
51
|
+
"@storybook/node-logger": "6.5.0-alpha.17",
|
|
52
52
|
"@storybook/semver": "^7.3.2",
|
|
53
|
-
"@storybook/store": "6.5.0-alpha.
|
|
53
|
+
"@storybook/store": "6.5.0-alpha.17",
|
|
54
54
|
"@types/node": "^14.0.10 || ^16.0.0",
|
|
55
55
|
"@types/node-fetch": "^2.5.7",
|
|
56
56
|
"@types/pretty-hrtime": "^1.0.0",
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
"x-default-browser": "^0.4.0"
|
|
87
87
|
},
|
|
88
88
|
"devDependencies": {
|
|
89
|
-
"@storybook/builder-webpack5": "6.5.0-alpha.
|
|
89
|
+
"@storybook/builder-webpack5": "6.5.0-alpha.17",
|
|
90
90
|
"@types/compression": "^1.7.0",
|
|
91
91
|
"@types/ip": "^1.1.0",
|
|
92
92
|
"@types/serve-favicon": "^2.5.2",
|
|
@@ -94,8 +94,8 @@
|
|
|
94
94
|
"jest-specific-snapshot": "^4.0.0"
|
|
95
95
|
},
|
|
96
96
|
"peerDependencies": {
|
|
97
|
-
"@storybook/builder-webpack5": "6.5.0-alpha.
|
|
98
|
-
"@storybook/manager-webpack5": "6.5.0-alpha.
|
|
97
|
+
"@storybook/builder-webpack5": "6.5.0-alpha.17",
|
|
98
|
+
"@storybook/manager-webpack5": "6.5.0-alpha.17",
|
|
99
99
|
"react": "^16.8.0 || ^17.0.0",
|
|
100
100
|
"react-dom": "^16.8.0 || ^17.0.0"
|
|
101
101
|
},
|
|
@@ -113,6 +113,6 @@
|
|
|
113
113
|
"publishConfig": {
|
|
114
114
|
"access": "public"
|
|
115
115
|
},
|
|
116
|
-
"gitHead": "
|
|
116
|
+
"gitHead": "26e445b71ae37aeb97e0207cb5139666e7071c06",
|
|
117
117
|
"sbmodern": "dist/modern/index.js"
|
|
118
118
|
}
|