@vercel/static-build 2.7.21 → 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 +86 -12
- package/package.json +5 -5
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({
|
|
@@ -26756,15 +26812,17 @@ var require_get_monorepo_default_settings = __commonJS({
|
|
|
26756
26812
|
})
|
|
26757
26813
|
]);
|
|
26758
26814
|
if (monorepoManager === "turbo") {
|
|
26759
|
-
const [turboJSONBuf, packageJSONBuf] = await Promise.all([
|
|
26815
|
+
const [turboJSONBuf, turboJSONCBuf, packageJSONBuf] = await Promise.all([
|
|
26760
26816
|
detectorFilesystem.readFile("turbo.json").catch(() => null),
|
|
26817
|
+
detectorFilesystem.readFile("turbo.jsonc").catch(() => null),
|
|
26761
26818
|
detectorFilesystem.readFile("package.json").catch(() => null)
|
|
26762
26819
|
]);
|
|
26763
26820
|
let hasBuildPipeline = false;
|
|
26764
26821
|
let hasTurboTasks = false;
|
|
26765
26822
|
let turboSemVer = null;
|
|
26766
|
-
|
|
26767
|
-
|
|
26823
|
+
const turboConfigBuf = turboJSONBuf || turboJSONCBuf;
|
|
26824
|
+
if (turboConfigBuf !== null) {
|
|
26825
|
+
const turboJSON = import_json5.default.parse(turboConfigBuf.toString("utf-8"));
|
|
26768
26826
|
hasTurboTasks = "tasks" in (turboJSON || {});
|
|
26769
26827
|
if (turboJSON?.pipeline?.build || turboJSON?.tasks?.build) {
|
|
26770
26828
|
hasBuildPipeline = true;
|
|
@@ -27875,16 +27933,32 @@ async function checkForPort(port, timeout) {
|
|
|
27875
27933
|
await sleep(100);
|
|
27876
27934
|
}
|
|
27877
27935
|
}
|
|
27878
|
-
function validateDistDir(distDir) {
|
|
27936
|
+
function validateDistDir(distDir, workPath) {
|
|
27879
27937
|
const distDirName = import_path6.default.basename(distDir);
|
|
27880
27938
|
const exists = () => (0, import_fs4.existsSync)(distDir);
|
|
27881
27939
|
const isDirectory = () => (0, import_fs4.statSync)(distDir).isDirectory();
|
|
27882
27940
|
const isEmpty = () => (0, import_fs4.readdirSync)(distDir).length === 0;
|
|
27883
27941
|
const link = "https://vercel.link/missing-public-directory";
|
|
27884
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
|
+
}
|
|
27885
27959
|
throw new import_build_utils4.NowBuildError({
|
|
27886
27960
|
code: "STATIC_BUILD_NO_OUT_DIR",
|
|
27887
|
-
message
|
|
27961
|
+
message,
|
|
27888
27962
|
link
|
|
27889
27963
|
});
|
|
27890
27964
|
}
|
|
@@ -28424,7 +28498,7 @@ Details: https://err.sh/vercel/vercel/now-static-build-failed-to-detect-a-server
|
|
|
28424
28498
|
);
|
|
28425
28499
|
} else {
|
|
28426
28500
|
if (!extraOutputs.functions) {
|
|
28427
|
-
validateDistDir(distPath);
|
|
28501
|
+
validateDistDir(distPath, workPath);
|
|
28428
28502
|
}
|
|
28429
28503
|
if (framework && !extraOutputs.routes) {
|
|
28430
28504
|
const frameworkRoutes = await getFrameworkRoutes(
|
|
@@ -28465,7 +28539,7 @@ Details: https://err.sh/vercel/vercel/now-static-build-failed-to-detect-a-server
|
|
|
28465
28539
|
);
|
|
28466
28540
|
const spawnOpts = (0, import_build_utils4.getSpawnOptions)(meta, nodeVersion);
|
|
28467
28541
|
await (0, import_build_utils4.runShellScript)(import_path6.default.join(workPath, entrypoint), [], spawnOpts);
|
|
28468
|
-
validateDistDir(distPath);
|
|
28542
|
+
validateDistDir(distPath, workPath);
|
|
28469
28543
|
const output = await (0, import_build_utils4.glob)("**", distPath, mountpoint);
|
|
28470
28544
|
return {
|
|
28471
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",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
16
|
"@vercel/gatsby-plugin-vercel-analytics": "1.0.11",
|
|
17
|
-
"@vercel/gatsby-plugin-vercel-builder": "2.0.
|
|
17
|
+
"@vercel/gatsby-plugin-vercel-builder": "2.0.95",
|
|
18
18
|
"@vercel/static-config": "3.1.2",
|
|
19
19
|
"ts-morph": "12.0.0"
|
|
20
20
|
},
|
|
@@ -28,10 +28,10 @@
|
|
|
28
28
|
"@types/node-fetch": "2.5.4",
|
|
29
29
|
"@types/promise-timeout": "1.3.0",
|
|
30
30
|
"@types/semver": "7.3.13",
|
|
31
|
-
"@vercel/build-utils": "12.
|
|
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.
|
|
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",
|