@vercel/static-build 2.7.22 → 2.7.23
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 +81 -9
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -9713,14 +9713,14 @@ var require_frameworks = __commonJS({
|
|
|
9713
9713
|
]
|
|
9714
9714
|
},
|
|
9715
9715
|
{
|
|
9716
|
-
name: "Nuxt
|
|
9716
|
+
name: "Nuxt",
|
|
9717
9717
|
slug: "nuxtjs",
|
|
9718
9718
|
demo: "https://nuxtjs-template.vercel.app",
|
|
9719
9719
|
logo: "https://api-frameworks.vercel.sh/framework-logos/nuxt.svg",
|
|
9720
9720
|
screenshot: "https://assets.vercel.com/image/upload/v1647366075/front/import/nuxtjs.png",
|
|
9721
|
-
tagline: "Nuxt
|
|
9722
|
-
description: "A Nuxt
|
|
9723
|
-
website: "https://
|
|
9721
|
+
tagline: "Nuxt is the open source framework that makes full-stack development with Vue.js intuitive.",
|
|
9722
|
+
description: "A Nuxt app, bootstrapped with create-nuxt-app.",
|
|
9723
|
+
website: "https://nuxt.com",
|
|
9724
9724
|
sort: 2,
|
|
9725
9725
|
envPrefix: "NUXT_ENV_",
|
|
9726
9726
|
supersedes: ["nitro"],
|
|
@@ -9734,6 +9734,9 @@ var require_frameworks = __commonJS({
|
|
|
9734
9734
|
},
|
|
9735
9735
|
{
|
|
9736
9736
|
matchPackage: "nuxt-edge"
|
|
9737
|
+
},
|
|
9738
|
+
{
|
|
9739
|
+
matchPackage: "nuxt-nightly"
|
|
9737
9740
|
}
|
|
9738
9741
|
]
|
|
9739
9742
|
},
|
|
@@ -9746,7 +9749,7 @@ var require_frameworks = __commonJS({
|
|
|
9746
9749
|
value: "nuxt build"
|
|
9747
9750
|
},
|
|
9748
9751
|
devCommand: {
|
|
9749
|
-
value: "nuxt"
|
|
9752
|
+
value: "nuxt dev"
|
|
9750
9753
|
},
|
|
9751
9754
|
outputDirectory: {
|
|
9752
9755
|
value: "dist"
|
|
@@ -10192,6 +10195,49 @@ var require_frameworks = __commonJS({
|
|
|
10192
10195
|
}
|
|
10193
10196
|
]
|
|
10194
10197
|
},
|
|
10198
|
+
{
|
|
10199
|
+
name: "FastAPI (Experimental)",
|
|
10200
|
+
slug: "fastapi",
|
|
10201
|
+
logo: "https://api-frameworks.vercel.sh/framework-logos/fastapi.svg",
|
|
10202
|
+
darkModeLogo: "https://api-frameworks.vercel.sh/framework-logos/fastapi.svg",
|
|
10203
|
+
tagline: "FastAPI framework, high performance, easy to learn, fast to code, ready for production",
|
|
10204
|
+
description: "FastAPI framework, high performance, easy to learn, fast to code, ready for production",
|
|
10205
|
+
website: "https://fastapi.tiangolo.com",
|
|
10206
|
+
useRuntime: { src: "main.py", use: "@vercel/python" },
|
|
10207
|
+
detectors: {
|
|
10208
|
+
every: [
|
|
10209
|
+
{
|
|
10210
|
+
path: "requirements.txt",
|
|
10211
|
+
matchContent: "fastapi"
|
|
10212
|
+
}
|
|
10213
|
+
]
|
|
10214
|
+
},
|
|
10215
|
+
settings: {
|
|
10216
|
+
installCommand: {
|
|
10217
|
+
placeholder: "`pip install -r requirements.txt`"
|
|
10218
|
+
},
|
|
10219
|
+
buildCommand: {
|
|
10220
|
+
placeholder: "None",
|
|
10221
|
+
value: null
|
|
10222
|
+
},
|
|
10223
|
+
devCommand: {
|
|
10224
|
+
value: "uvicorn main:app --reload --port $PORT"
|
|
10225
|
+
},
|
|
10226
|
+
outputDirectory: {
|
|
10227
|
+
value: "N/A"
|
|
10228
|
+
}
|
|
10229
|
+
},
|
|
10230
|
+
getOutputDirName: async () => "",
|
|
10231
|
+
defaultRoutes: [
|
|
10232
|
+
{
|
|
10233
|
+
handle: "filesystem"
|
|
10234
|
+
},
|
|
10235
|
+
{
|
|
10236
|
+
src: "/(.*)",
|
|
10237
|
+
dest: "/main"
|
|
10238
|
+
}
|
|
10239
|
+
]
|
|
10240
|
+
},
|
|
10195
10241
|
{
|
|
10196
10242
|
name: "FastHTML (Experimental)",
|
|
10197
10243
|
slug: "fasthtml",
|
|
@@ -18575,6 +18621,16 @@ var require_detect_builders = __commonJS({
|
|
|
18575
18621
|
builders.push(...apiBuilders);
|
|
18576
18622
|
}
|
|
18577
18623
|
if (frontendBuilder) {
|
|
18624
|
+
if (frontendBuilder?.use === "@vercel/express") {
|
|
18625
|
+
builders.push({
|
|
18626
|
+
src: "public/**/*",
|
|
18627
|
+
use: "@vercel/static",
|
|
18628
|
+
config: {
|
|
18629
|
+
zeroConfig: true,
|
|
18630
|
+
outputDirectory: "public"
|
|
18631
|
+
}
|
|
18632
|
+
});
|
|
18633
|
+
}
|
|
18578
18634
|
builders.push(frontendBuilder);
|
|
18579
18635
|
if (hasNextApiFiles && apiBuilders.some((b) => (0, import_is_official_runtime.isOfficialRuntime)("node", b.use))) {
|
|
18580
18636
|
warnings.push({
|
|
@@ -27877,16 +27933,32 @@ async function checkForPort(port, timeout) {
|
|
|
27877
27933
|
await sleep(100);
|
|
27878
27934
|
}
|
|
27879
27935
|
}
|
|
27880
|
-
function validateDistDir(distDir) {
|
|
27936
|
+
function validateDistDir(distDir, workPath) {
|
|
27881
27937
|
const distDirName = import_path6.default.basename(distDir);
|
|
27882
27938
|
const exists = () => (0, import_fs4.existsSync)(distDir);
|
|
27883
27939
|
const isDirectory = () => (0, import_fs4.statSync)(distDir).isDirectory();
|
|
27884
27940
|
const isEmpty = () => (0, import_fs4.readdirSync)(distDir).length === 0;
|
|
27885
27941
|
const link = "https://vercel.link/missing-public-directory";
|
|
27886
27942
|
if (!exists()) {
|
|
27943
|
+
const vercelJsonPath = import_path6.default.join(workPath, "vercel.json");
|
|
27944
|
+
const vercelJsonExists = (0, import_fs4.existsSync)(vercelJsonPath);
|
|
27945
|
+
let buildCommandExists = false;
|
|
27946
|
+
if (vercelJsonExists) {
|
|
27947
|
+
try {
|
|
27948
|
+
const vercelJson = JSON.parse((0, import_fs4.readFileSync)(vercelJsonPath, "utf8"));
|
|
27949
|
+
buildCommandExists = vercelJson.buildCommand !== void 0;
|
|
27950
|
+
} catch (e) {
|
|
27951
|
+
}
|
|
27952
|
+
}
|
|
27953
|
+
let message = `No Output Directory named "${distDirName}" found after the Build completed.`;
|
|
27954
|
+
if (vercelJsonExists && buildCommandExists) {
|
|
27955
|
+
message += ` Update vercel.json#outputDirectory to ensure the correct output directory is generated.`;
|
|
27956
|
+
} else {
|
|
27957
|
+
message += ` Configure the Output Directory in your Project Settings. Alternatively, configure vercel.json#outputDirectory.`;
|
|
27958
|
+
}
|
|
27887
27959
|
throw new import_build_utils4.NowBuildError({
|
|
27888
27960
|
code: "STATIC_BUILD_NO_OUT_DIR",
|
|
27889
|
-
message
|
|
27961
|
+
message,
|
|
27890
27962
|
link
|
|
27891
27963
|
});
|
|
27892
27964
|
}
|
|
@@ -28426,7 +28498,7 @@ Details: https://err.sh/vercel/vercel/now-static-build-failed-to-detect-a-server
|
|
|
28426
28498
|
);
|
|
28427
28499
|
} else {
|
|
28428
28500
|
if (!extraOutputs.functions) {
|
|
28429
|
-
validateDistDir(distPath);
|
|
28501
|
+
validateDistDir(distPath, workPath);
|
|
28430
28502
|
}
|
|
28431
28503
|
if (framework && !extraOutputs.routes) {
|
|
28432
28504
|
const frameworkRoutes = await getFrameworkRoutes(
|
|
@@ -28467,7 +28539,7 @@ Details: https://err.sh/vercel/vercel/now-static-build-failed-to-detect-a-server
|
|
|
28467
28539
|
);
|
|
28468
28540
|
const spawnOpts = (0, import_build_utils4.getSpawnOptions)(meta, nodeVersion);
|
|
28469
28541
|
await (0, import_build_utils4.runShellScript)(import_path6.default.join(workPath, entrypoint), [], spawnOpts);
|
|
28470
|
-
validateDistDir(distPath);
|
|
28542
|
+
validateDistDir(distPath, workPath);
|
|
28471
28543
|
const output = await (0, import_build_utils4.glob)("**", distPath, mountpoint);
|
|
28472
28544
|
return {
|
|
28473
28545
|
output,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vercel/static-build",
|
|
3
|
-
"version": "2.7.
|
|
3
|
+
"version": "2.7.23",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"main": "./dist/index",
|
|
6
6
|
"homepage": "https://vercel.com/docs/build-step",
|
|
@@ -30,8 +30,8 @@
|
|
|
30
30
|
"@types/semver": "7.3.13",
|
|
31
31
|
"@vercel/build-utils": "12.1.0",
|
|
32
32
|
"@vercel/error-utils": "2.0.3",
|
|
33
|
-
"@vercel/frameworks": "3.8.
|
|
34
|
-
"@vercel/fs-detectors": "5.5.
|
|
33
|
+
"@vercel/frameworks": "3.8.4",
|
|
34
|
+
"@vercel/fs-detectors": "5.5.2",
|
|
35
35
|
"@vercel/routing-utils": "5.1.1",
|
|
36
36
|
"execa": "3.2.0",
|
|
37
37
|
"fs-extra": "10.0.0",
|