@vercel/static-build 2.8.17 → 2.8.19
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 +202 -29
- package/package.json +7 -7
package/dist/index.js
CHANGED
|
@@ -11113,6 +11113,191 @@ var require_frameworks = __commonJS({
|
|
|
11113
11113
|
dependency: "h3",
|
|
11114
11114
|
getOutputDirName: async () => "public"
|
|
11115
11115
|
},
|
|
11116
|
+
{
|
|
11117
|
+
name: "Koa",
|
|
11118
|
+
slug: "koa",
|
|
11119
|
+
logo: "https://api-frameworks.vercel.sh/framework-logos/koa.svg",
|
|
11120
|
+
tagline: "Expressive middleware for Node.js using ES2017 async functions",
|
|
11121
|
+
description: "Koa is a new web framework designed by the team behind Express, which aims to be a smaller, more expressive, and more robust foundation for web applications and APIs.",
|
|
11122
|
+
website: "https://koajs.com",
|
|
11123
|
+
useRuntime: { src: "index.js", use: "@vercel/koa" },
|
|
11124
|
+
defaultRoutes: [
|
|
11125
|
+
{
|
|
11126
|
+
handle: "filesystem"
|
|
11127
|
+
},
|
|
11128
|
+
{
|
|
11129
|
+
src: "/(.*)",
|
|
11130
|
+
dest: "/"
|
|
11131
|
+
}
|
|
11132
|
+
],
|
|
11133
|
+
detectors: {
|
|
11134
|
+
every: [{ matchPackage: "koa" }],
|
|
11135
|
+
some: [
|
|
11136
|
+
{
|
|
11137
|
+
path: "app.cjs",
|
|
11138
|
+
matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']koa["']\\s*(?:\\))?`
|
|
11139
|
+
},
|
|
11140
|
+
{
|
|
11141
|
+
path: "app.js",
|
|
11142
|
+
matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']koa["']\\s*(?:\\))?`
|
|
11143
|
+
},
|
|
11144
|
+
{
|
|
11145
|
+
path: "app.mjs",
|
|
11146
|
+
matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']koa["']\\s*(?:\\))?`
|
|
11147
|
+
},
|
|
11148
|
+
{
|
|
11149
|
+
path: "app.mts",
|
|
11150
|
+
matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']koa["']\\s*(?:\\))?`
|
|
11151
|
+
},
|
|
11152
|
+
{
|
|
11153
|
+
path: "app.ts",
|
|
11154
|
+
matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']koa["']\\s*(?:\\))?`
|
|
11155
|
+
},
|
|
11156
|
+
{
|
|
11157
|
+
path: "app.cts",
|
|
11158
|
+
matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']koa["']\\s*(?:\\))?`
|
|
11159
|
+
},
|
|
11160
|
+
{
|
|
11161
|
+
path: "index.cjs",
|
|
11162
|
+
matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']koa["']\\s*(?:\\))?`
|
|
11163
|
+
},
|
|
11164
|
+
{
|
|
11165
|
+
path: "index.js",
|
|
11166
|
+
matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']koa["']\\s*(?:\\))?`
|
|
11167
|
+
},
|
|
11168
|
+
{
|
|
11169
|
+
path: "index.mjs",
|
|
11170
|
+
matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']koa["']\\s*(?:\\))?`
|
|
11171
|
+
},
|
|
11172
|
+
{
|
|
11173
|
+
path: "index.mts",
|
|
11174
|
+
matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']koa["']\\s*(?:\\))?`
|
|
11175
|
+
},
|
|
11176
|
+
{
|
|
11177
|
+
path: "index.ts",
|
|
11178
|
+
matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']koa["']\\s*(?:\\))?`
|
|
11179
|
+
},
|
|
11180
|
+
{
|
|
11181
|
+
path: "index.cts",
|
|
11182
|
+
matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']koa["']\\s*(?:\\))?`
|
|
11183
|
+
},
|
|
11184
|
+
{
|
|
11185
|
+
path: "server.cjs",
|
|
11186
|
+
matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']koa["']\\s*(?:\\))?`
|
|
11187
|
+
},
|
|
11188
|
+
{
|
|
11189
|
+
path: "server.js",
|
|
11190
|
+
matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']koa["']\\s*(?:\\))?`
|
|
11191
|
+
},
|
|
11192
|
+
{
|
|
11193
|
+
path: "server.mjs",
|
|
11194
|
+
matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']koa["']\\s*(?:\\))?`
|
|
11195
|
+
},
|
|
11196
|
+
{
|
|
11197
|
+
path: "server.mts",
|
|
11198
|
+
matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']koa["']\\s*(?:\\))?`
|
|
11199
|
+
},
|
|
11200
|
+
{
|
|
11201
|
+
path: "server.ts",
|
|
11202
|
+
matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']koa["']\\s*(?:\\))?`
|
|
11203
|
+
},
|
|
11204
|
+
{
|
|
11205
|
+
path: "server.cts",
|
|
11206
|
+
matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']koa["']\\s*(?:\\))?`
|
|
11207
|
+
},
|
|
11208
|
+
{
|
|
11209
|
+
path: "src/index.cjs",
|
|
11210
|
+
matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']koa["']\\s*(?:\\))?`
|
|
11211
|
+
},
|
|
11212
|
+
{
|
|
11213
|
+
path: "src/index.js",
|
|
11214
|
+
matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']koa["']\\s*(?:\\))?`
|
|
11215
|
+
},
|
|
11216
|
+
{
|
|
11217
|
+
path: "src/index.mjs",
|
|
11218
|
+
matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']koa["']\\s*(?:\\))?`
|
|
11219
|
+
},
|
|
11220
|
+
{
|
|
11221
|
+
path: "src/index.mts",
|
|
11222
|
+
matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']koa["']\\s*(?:\\))?`
|
|
11223
|
+
},
|
|
11224
|
+
{
|
|
11225
|
+
path: "src/index.ts",
|
|
11226
|
+
matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']koa["']\\s*(?:\\))?`
|
|
11227
|
+
},
|
|
11228
|
+
{
|
|
11229
|
+
path: "src/index.cts",
|
|
11230
|
+
matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']koa["']\\s*(?:\\))?`
|
|
11231
|
+
},
|
|
11232
|
+
{
|
|
11233
|
+
path: "src/app.cjs",
|
|
11234
|
+
matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']koa["']\\s*(?:\\))?`
|
|
11235
|
+
},
|
|
11236
|
+
{
|
|
11237
|
+
path: "src/app.js",
|
|
11238
|
+
matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']koa["']\\s*(?:\\))?`
|
|
11239
|
+
},
|
|
11240
|
+
{
|
|
11241
|
+
path: "src/app.mjs",
|
|
11242
|
+
matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']koa["']\\s*(?:\\))?`
|
|
11243
|
+
},
|
|
11244
|
+
{
|
|
11245
|
+
path: "src/app.mts",
|
|
11246
|
+
matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']koa["']\\s*(?:\\))?`
|
|
11247
|
+
},
|
|
11248
|
+
{
|
|
11249
|
+
path: "src/app.ts",
|
|
11250
|
+
matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']koa["']\\s*(?:\\))?`
|
|
11251
|
+
},
|
|
11252
|
+
{
|
|
11253
|
+
path: "src/app.cts",
|
|
11254
|
+
matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']koa["']\\s*(?:\\))?`
|
|
11255
|
+
},
|
|
11256
|
+
{
|
|
11257
|
+
path: "src/server.cjs",
|
|
11258
|
+
matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']koa["']\\s*(?:\\))?`
|
|
11259
|
+
},
|
|
11260
|
+
{
|
|
11261
|
+
path: "src/server.js",
|
|
11262
|
+
matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']koa["']\\s*(?:\\))?`
|
|
11263
|
+
},
|
|
11264
|
+
{
|
|
11265
|
+
path: "src/server.mjs",
|
|
11266
|
+
matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']koa["']\\s*(?:\\))?`
|
|
11267
|
+
},
|
|
11268
|
+
{
|
|
11269
|
+
path: "src/server.mts",
|
|
11270
|
+
matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']koa["']\\s*(?:\\))?`
|
|
11271
|
+
},
|
|
11272
|
+
{
|
|
11273
|
+
path: "src/server.ts",
|
|
11274
|
+
matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']koa["']\\s*(?:\\))?`
|
|
11275
|
+
},
|
|
11276
|
+
{
|
|
11277
|
+
path: "src/server.cts",
|
|
11278
|
+
matchContent: `(?:from|require|import)\\s*(?:\\(\\s*)?["']koa["']\\s*(?:\\))?`
|
|
11279
|
+
}
|
|
11280
|
+
]
|
|
11281
|
+
},
|
|
11282
|
+
settings: {
|
|
11283
|
+
installCommand: {
|
|
11284
|
+
placeholder: "`yarn install`, `pnpm install`, `npm install`, or `bun install`"
|
|
11285
|
+
},
|
|
11286
|
+
buildCommand: {
|
|
11287
|
+
placeholder: "None",
|
|
11288
|
+
value: null
|
|
11289
|
+
},
|
|
11290
|
+
devCommand: {
|
|
11291
|
+
placeholder: "None",
|
|
11292
|
+
value: null
|
|
11293
|
+
},
|
|
11294
|
+
outputDirectory: {
|
|
11295
|
+
value: "N/A"
|
|
11296
|
+
}
|
|
11297
|
+
},
|
|
11298
|
+
dependency: "koa",
|
|
11299
|
+
getOutputDirName: async () => "public"
|
|
11300
|
+
},
|
|
11116
11301
|
{
|
|
11117
11302
|
name: "NestJS",
|
|
11118
11303
|
slug: "nestjs",
|
|
@@ -29157,33 +29342,29 @@ var build = async ({
|
|
|
29157
29342
|
}
|
|
29158
29343
|
}
|
|
29159
29344
|
}
|
|
29160
|
-
const nodeVersion = await (0, import_build_utils4.
|
|
29345
|
+
const nodeVersion = await (0, import_build_utils4.getRuntimeNodeVersion)(
|
|
29161
29346
|
entrypointDir,
|
|
29162
29347
|
void 0,
|
|
29163
29348
|
config,
|
|
29164
29349
|
meta
|
|
29165
29350
|
);
|
|
29166
|
-
const spawnOpts = (0, import_build_utils4.getSpawnOptions)(meta, nodeVersion);
|
|
29167
|
-
if (!spawnOpts.env) {
|
|
29168
|
-
spawnOpts.env = {};
|
|
29169
|
-
}
|
|
29170
|
-
if (framework?.slug === "create-react-app") {
|
|
29171
|
-
spawnOpts.env.CI = "false";
|
|
29172
|
-
}
|
|
29173
29351
|
const {
|
|
29174
29352
|
cliType,
|
|
29175
29353
|
lockfileVersion,
|
|
29176
29354
|
packageJsonPackageManager,
|
|
29177
29355
|
turboSupportsCorepackHome
|
|
29178
29356
|
} = await (0, import_build_utils4.scanParentDirs)(entrypointDir, true);
|
|
29179
|
-
|
|
29357
|
+
const spawnEnv = (0, import_build_utils4.getEnvForPackageManager)({
|
|
29180
29358
|
cliType,
|
|
29181
29359
|
lockfileVersion,
|
|
29182
29360
|
packageJsonPackageManager,
|
|
29183
|
-
env:
|
|
29361
|
+
env: process.env,
|
|
29184
29362
|
turboSupportsCorepackHome,
|
|
29185
29363
|
projectCreatedAt: config.projectSettings?.createdAt
|
|
29186
29364
|
});
|
|
29365
|
+
if (framework?.slug === "create-react-app") {
|
|
29366
|
+
spawnEnv.CI = "false";
|
|
29367
|
+
}
|
|
29187
29368
|
if (meta.isDev) {
|
|
29188
29369
|
(0, import_build_utils4.debug)("Skipping dependency installation because dev mode is enabled");
|
|
29189
29370
|
} else {
|
|
@@ -29199,7 +29380,7 @@ var build = async ({
|
|
|
29199
29380
|
await (0, import_build_utils4.runNpmInstall)(
|
|
29200
29381
|
entrypointDir,
|
|
29201
29382
|
[],
|
|
29202
|
-
|
|
29383
|
+
{ env: spawnEnv },
|
|
29203
29384
|
meta,
|
|
29204
29385
|
config.projectSettings?.createdAt
|
|
29205
29386
|
);
|
|
@@ -29208,7 +29389,7 @@ var build = async ({
|
|
|
29208
29389
|
if (installCommand.trim()) {
|
|
29209
29390
|
console.log(`Running "install" command: \`${installCommand}\`...`);
|
|
29210
29391
|
await (0, import_build_utils4.execCommand)(installCommand, {
|
|
29211
|
-
|
|
29392
|
+
env: spawnEnv,
|
|
29212
29393
|
cwd: entrypointDir
|
|
29213
29394
|
});
|
|
29214
29395
|
isNpmInstall = true;
|
|
@@ -29252,7 +29433,7 @@ var build = async ({
|
|
|
29252
29433
|
await (0, import_build_utils4.runNpmInstall)(
|
|
29253
29434
|
entrypointDir,
|
|
29254
29435
|
[],
|
|
29255
|
-
|
|
29436
|
+
{ env: spawnEnv },
|
|
29256
29437
|
meta,
|
|
29257
29438
|
config.projectSettings?.createdAt
|
|
29258
29439
|
);
|
|
@@ -29294,11 +29475,11 @@ var build = async ({
|
|
|
29294
29475
|
}
|
|
29295
29476
|
if (isPipInstall) {
|
|
29296
29477
|
}
|
|
29297
|
-
if (
|
|
29298
|
-
pathList.push(
|
|
29478
|
+
if (spawnEnv.PATH) {
|
|
29479
|
+
pathList.push(spawnEnv.PATH);
|
|
29299
29480
|
}
|
|
29300
|
-
|
|
29301
|
-
...
|
|
29481
|
+
const cliEnv = {
|
|
29482
|
+
...process.env,
|
|
29302
29483
|
PATH: pathList.join(import_path6.default.delimiter),
|
|
29303
29484
|
GEM_HOME: gemHome
|
|
29304
29485
|
};
|
|
@@ -29316,7 +29497,7 @@ var build = async ({
|
|
|
29316
29497
|
const opts = {
|
|
29317
29498
|
cwd: entrypointDir,
|
|
29318
29499
|
stdio: "inherit",
|
|
29319
|
-
env: { ...
|
|
29500
|
+
env: { ...cliEnv, PORT: String(devPort) }
|
|
29320
29501
|
};
|
|
29321
29502
|
const cmd = devCommand || `yarn run ${devScript}`;
|
|
29322
29503
|
const child = (0, import_build_utils4.spawnCommand)(cmd, opts);
|
|
@@ -29351,18 +29532,17 @@ Details: https://err.sh/vercel/vercel/now-static-build-failed-to-detect-a-server
|
|
|
29351
29532
|
}
|
|
29352
29533
|
try {
|
|
29353
29534
|
const found = typeof buildCommand === "string" ? await (0, import_build_utils4.execCommand)(buildCommand, {
|
|
29354
|
-
...spawnOpts,
|
|
29355
29535
|
// Yarn v2 PnP mode may be activated, so force
|
|
29356
29536
|
// "node-modules" linker style
|
|
29357
29537
|
env: {
|
|
29358
29538
|
YARN_NODE_LINKER: "node-modules",
|
|
29359
|
-
...
|
|
29539
|
+
...cliEnv
|
|
29360
29540
|
},
|
|
29361
29541
|
cwd: entrypointDir
|
|
29362
29542
|
}) : await (0, import_build_utils4.runPackageJsonScript)(
|
|
29363
29543
|
entrypointDir,
|
|
29364
29544
|
["vercel-build", "now-build", "build"],
|
|
29365
|
-
|
|
29545
|
+
{ env: cliEnv },
|
|
29366
29546
|
config.projectSettings?.createdAt
|
|
29367
29547
|
);
|
|
29368
29548
|
if (!found) {
|
|
@@ -29447,14 +29627,7 @@ Details: https://err.sh/vercel/vercel/now-static-build-failed-to-detect-a-server
|
|
|
29447
29627
|
}
|
|
29448
29628
|
if (!config.zeroConfig && entrypoint.endsWith(".sh")) {
|
|
29449
29629
|
(0, import_build_utils4.debug)(`Running build script "${entrypoint}"`);
|
|
29450
|
-
|
|
29451
|
-
entrypointDir,
|
|
29452
|
-
void 0,
|
|
29453
|
-
config,
|
|
29454
|
-
meta
|
|
29455
|
-
);
|
|
29456
|
-
const spawnOpts = (0, import_build_utils4.getSpawnOptions)(meta, nodeVersion);
|
|
29457
|
-
await (0, import_build_utils4.runShellScript)(import_path6.default.join(workPath, entrypoint), [], spawnOpts);
|
|
29630
|
+
await (0, import_build_utils4.runShellScript)(import_path6.default.join(workPath, entrypoint));
|
|
29458
29631
|
validateDistDir(distPath, workPath);
|
|
29459
29632
|
const output = await (0, import_build_utils4.glob)("**", distPath, mountpoint);
|
|
29460
29633
|
return {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vercel/static-build",
|
|
3
|
-
"version": "2.8.
|
|
3
|
+
"version": "2.8.19",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"main": "./dist/index",
|
|
6
6
|
"homepage": "https://vercel.com/docs/build-step",
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
"dependencies": {
|
|
16
16
|
"ts-morph": "12.0.0",
|
|
17
17
|
"@vercel/gatsby-plugin-vercel-analytics": "1.0.11",
|
|
18
|
-
"@vercel/
|
|
19
|
-
"@vercel/
|
|
18
|
+
"@vercel/static-config": "3.1.2",
|
|
19
|
+
"@vercel/gatsby-plugin-vercel-builder": "2.0.118"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
22
|
"@types/aws-lambda": "8.10.64",
|
|
@@ -38,11 +38,11 @@
|
|
|
38
38
|
"rc9": "1.2.0",
|
|
39
39
|
"semver": "7.5.2",
|
|
40
40
|
"tree-kill": "1.2.2",
|
|
41
|
-
"@vercel/
|
|
42
|
-
"@vercel/
|
|
43
|
-
"@vercel/
|
|
41
|
+
"@vercel/build-utils": "13.2.8",
|
|
42
|
+
"@vercel/frameworks": "3.15.5",
|
|
43
|
+
"@vercel/fs-detectors": "5.7.13",
|
|
44
44
|
"@vercel/routing-utils": "5.3.2",
|
|
45
|
-
"@vercel/
|
|
45
|
+
"@vercel/error-utils": "2.0.3"
|
|
46
46
|
},
|
|
47
47
|
"scripts": {
|
|
48
48
|
"build": "node ../../utils/build-builder.mjs",
|