@vercel/static-build 1.3.26 → 1.3.28
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/index.js +49 -5
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -239174,6 +239174,37 @@ exports.frameworks = [
|
|
|
239174
239174
|
},
|
|
239175
239175
|
],
|
|
239176
239176
|
},
|
|
239177
|
+
{
|
|
239178
|
+
name: 'Storybook',
|
|
239179
|
+
slug: 'storybook',
|
|
239180
|
+
logo: 'https://api-frameworks.vercel.sh/framework-logos/storybook.svg',
|
|
239181
|
+
tagline: 'Frontend workshop for UI development',
|
|
239182
|
+
description: 'Storybook is a frontend workshop for building UI components and pages in isolation.',
|
|
239183
|
+
website: 'https://storybook.js.org',
|
|
239184
|
+
ignoreRuntimes: ['@vercel/next', '@vercel/node'],
|
|
239185
|
+
disableRootMiddleware: true,
|
|
239186
|
+
detectors: {
|
|
239187
|
+
every: [
|
|
239188
|
+
{
|
|
239189
|
+
matchPackage: 'storybook',
|
|
239190
|
+
},
|
|
239191
|
+
],
|
|
239192
|
+
},
|
|
239193
|
+
settings: {
|
|
239194
|
+
installCommand: {
|
|
239195
|
+
placeholder: '`yarn install`, `pnpm install`, or `npm install`',
|
|
239196
|
+
},
|
|
239197
|
+
buildCommand: {
|
|
239198
|
+
value: 'storybook build',
|
|
239199
|
+
},
|
|
239200
|
+
devCommand: {
|
|
239201
|
+
value: `storybook dev -p $PORT`,
|
|
239202
|
+
},
|
|
239203
|
+
outputDirectory: {
|
|
239204
|
+
value: 'storybook-static',
|
|
239205
|
+
},
|
|
239206
|
+
},
|
|
239207
|
+
},
|
|
239177
239208
|
{
|
|
239178
239209
|
name: 'Other',
|
|
239179
239210
|
slug: null,
|
|
@@ -239352,10 +239383,15 @@ async function detectBuilders(files, pkg, options = {}) {
|
|
|
239352
239383
|
const absolutePathCache = new Map();
|
|
239353
239384
|
const { projectSettings = {} } = options;
|
|
239354
239385
|
const { buildCommand, outputDirectory, framework } = projectSettings;
|
|
239355
|
-
const
|
|
239386
|
+
const frameworkConfig = slugToFramework.get(framework || '');
|
|
239387
|
+
const ignoreRuntimes = new Set(frameworkConfig?.ignoreRuntimes);
|
|
239356
239388
|
const withTag = options.tag ? `@${options.tag}` : '';
|
|
239357
239389
|
const apiMatches = getApiMatches()
|
|
239358
|
-
.filter(b =>
|
|
239390
|
+
.filter(b =>
|
|
239391
|
+
// Root-level middleware is enabled, unless `disableRootMiddleware: true`
|
|
239392
|
+
(b.config?.middleware && !frameworkConfig?.disableRootMiddleware) ||
|
|
239393
|
+
// "api" dir runtimes are enabled, unless opted-out via `ignoreRuntimes`
|
|
239394
|
+
!ignoreRuntimes.has(b.use))
|
|
239359
239395
|
.map(b => {
|
|
239360
239396
|
b.use = `${b.use}${withTag}`;
|
|
239361
239397
|
return b;
|
|
@@ -239582,7 +239618,11 @@ function getFunction(fileName, { functions = {} }) {
|
|
|
239582
239618
|
function getApiMatches() {
|
|
239583
239619
|
const config = { zeroConfig: true };
|
|
239584
239620
|
return [
|
|
239585
|
-
{
|
|
239621
|
+
{
|
|
239622
|
+
src: 'middleware.[jt]s',
|
|
239623
|
+
use: `@vercel/node`,
|
|
239624
|
+
config: { ...config, middleware: true },
|
|
239625
|
+
},
|
|
239586
239626
|
{ src: 'api/**/*.+(js|mjs|ts|tsx)', use: `@vercel/node`, config },
|
|
239587
239627
|
{ src: 'api/**/!(*_test).go', use: `@vercel/go`, config },
|
|
239588
239628
|
{ src: 'api/**/*.py', use: `@vercel/python`, config },
|
|
@@ -239617,7 +239657,8 @@ function detectFrontBuilder(pkg, files, usedFunctions, fallbackEntrypoint, optio
|
|
|
239617
239657
|
config.outputDirectory = projectSettings.outputDirectory;
|
|
239618
239658
|
}
|
|
239619
239659
|
if (pkg &&
|
|
239620
|
-
(framework === undefined ||
|
|
239660
|
+
(framework === undefined ||
|
|
239661
|
+
(framework !== 'storybook' && createdAt < Date.parse('2020-03-01')))) {
|
|
239621
239662
|
const deps = {
|
|
239622
239663
|
...pkg.dependencies,
|
|
239623
239664
|
...pkg.devDependencies,
|
|
@@ -239748,7 +239789,10 @@ function checkUnusedFunctions(frontendBuilder, usedFunctions, options) {
|
|
|
239748
239789
|
// Next.js can use functions only for `src/pages` or `pages`
|
|
239749
239790
|
if (frontendBuilder && (0, is_official_runtime_1.isOfficialRuntime)('next', frontendBuilder.use)) {
|
|
239750
239791
|
for (const fnKey of unusedFunctions.values()) {
|
|
239751
|
-
if (fnKey.startsWith('pages/') ||
|
|
239792
|
+
if (fnKey.startsWith('pages/') ||
|
|
239793
|
+
fnKey.startsWith('src/pages') ||
|
|
239794
|
+
fnKey.startsWith('app/') ||
|
|
239795
|
+
fnKey.startsWith('src/app/')) {
|
|
239752
239796
|
unusedFunctions.delete(fnKey);
|
|
239753
239797
|
}
|
|
239754
239798
|
else {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vercel/static-build",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.28",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"main": "./dist/index",
|
|
6
6
|
"homepage": "https://vercel.com/docs/build-step",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@vercel/gatsby-plugin-vercel-analytics": "1.0.10",
|
|
23
|
-
"@vercel/gatsby-plugin-vercel-builder": "1.3.
|
|
23
|
+
"@vercel/gatsby-plugin-vercel-builder": "1.3.2"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"@types/aws-lambda": "8.10.64",
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
"@types/semver": "7.3.13",
|
|
35
35
|
"@vercel/build-utils": "6.7.2",
|
|
36
36
|
"@vercel/error-utils": "1.0.10",
|
|
37
|
-
"@vercel/frameworks": "1.
|
|
38
|
-
"@vercel/fs-detectors": "3.
|
|
37
|
+
"@vercel/frameworks": "1.4.0",
|
|
38
|
+
"@vercel/fs-detectors": "3.9.0",
|
|
39
39
|
"@vercel/ncc": "0.24.0",
|
|
40
40
|
"@vercel/routing-utils": "2.2.1",
|
|
41
41
|
"@vercel/static-config": "2.0.17",
|
|
@@ -50,5 +50,5 @@
|
|
|
50
50
|
"tree-kill": "1.2.2",
|
|
51
51
|
"ts-morph": "12.0.0"
|
|
52
52
|
},
|
|
53
|
-
"gitHead": "
|
|
53
|
+
"gitHead": "672c1681cc453744e30f985d3e532111d4d7b120"
|
|
54
54
|
}
|