@vercel/static-build 2.11.12 → 2.12.1
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 +32 -26
- package/package.json +9 -9
package/dist/index.js
CHANGED
|
@@ -23504,8 +23504,8 @@ var require_resolve = __commonJS({
|
|
|
23504
23504
|
let reachedRoot = false;
|
|
23505
23505
|
while (!reachedRoot) {
|
|
23506
23506
|
for (const manifest of manifests) {
|
|
23507
|
-
const
|
|
23508
|
-
if (await (0, import_utils.hasFile)(fs5,
|
|
23507
|
+
const manifestPath = dir === "." ? manifest : import_path7.posix.join(dir, manifest);
|
|
23508
|
+
if (await (0, import_utils.hasFile)(fs5, manifestPath)) {
|
|
23509
23509
|
return dir;
|
|
23510
23510
|
}
|
|
23511
23511
|
}
|
|
@@ -29294,6 +29294,7 @@ var require_detect_builders = __commonJS({
|
|
|
29294
29294
|
REGEX_MIDDLEWARE_FILES: () => REGEX_MIDDLEWARE_FILES,
|
|
29295
29295
|
REGEX_NON_VERCEL_PLATFORM_FILES: () => REGEX_NON_VERCEL_PLATFORM_FILES2,
|
|
29296
29296
|
REGEX_VERCEL_PLATFORM_FILES: () => REGEX_VERCEL_PLATFORM_FILES,
|
|
29297
|
+
builderToFrameworks: () => builderToFrameworks2,
|
|
29297
29298
|
detectApiDirectory: () => detectApiDirectory2,
|
|
29298
29299
|
detectApiExtensions: () => detectApiExtensions2,
|
|
29299
29300
|
detectBuilders: () => detectBuilders2,
|
|
@@ -29338,6 +29339,21 @@ var require_detect_builders = __commonJS({
|
|
|
29338
29339
|
var slugToFramework = new Map(
|
|
29339
29340
|
import_frameworks2.frameworkList.map((f) => [f.slug, f])
|
|
29340
29341
|
);
|
|
29342
|
+
var builderToFrameworks2 = (() => {
|
|
29343
|
+
const map = /* @__PURE__ */ new Map();
|
|
29344
|
+
for (const f of import_frameworks2.frameworkList) {
|
|
29345
|
+
if (!f.useRuntime?.use)
|
|
29346
|
+
continue;
|
|
29347
|
+
const builder = f.useRuntime.use;
|
|
29348
|
+
const entry = map.get(builder);
|
|
29349
|
+
if (entry) {
|
|
29350
|
+
entry.push(f);
|
|
29351
|
+
} else {
|
|
29352
|
+
map.set(builder, [f]);
|
|
29353
|
+
}
|
|
29354
|
+
}
|
|
29355
|
+
return map;
|
|
29356
|
+
})();
|
|
29341
29357
|
function sortFiles(fileA, fileB) {
|
|
29342
29358
|
return fileA.localeCompare(fileB);
|
|
29343
29359
|
}
|
|
@@ -34837,6 +34853,7 @@ var require_dist8 = __commonJS({
|
|
|
34837
34853
|
Workspace: () => import_get_workspaces.Workspace,
|
|
34838
34854
|
WorkspaceType: () => import_get_workspaces.WorkspaceType,
|
|
34839
34855
|
autoDetectServices: () => import_auto_detect.autoDetectServices,
|
|
34856
|
+
builderToFrameworks: () => import_detect_builders.builderToFrameworks,
|
|
34840
34857
|
detectApiDirectory: () => import_detect_builders.detectApiDirectory,
|
|
34841
34858
|
detectApiExtensions: () => import_detect_builders.detectApiExtensions,
|
|
34842
34859
|
detectBuilders: () => import_detect_builders.detectBuilders,
|
|
@@ -35114,6 +35131,9 @@ function parseFunctionConfig(data) {
|
|
|
35114
35131
|
if (typeof data.maxDuration === "number" || data.maxDuration === "max") {
|
|
35115
35132
|
config.maxDuration = data.maxDuration;
|
|
35116
35133
|
}
|
|
35134
|
+
if (typeof data.maxConcurrency === "number" && Number.isInteger(data.maxConcurrency) && data.maxConcurrency >= 1) {
|
|
35135
|
+
config.maxConcurrency = data.maxConcurrency;
|
|
35136
|
+
}
|
|
35117
35137
|
if (typeof data.runtime === "string" && typeof data.handler === "string") {
|
|
35118
35138
|
config.runtime = data.runtime;
|
|
35119
35139
|
config.handler = data.handler;
|
|
@@ -35224,13 +35244,13 @@ async function readBuildOutputDirectory2({
|
|
|
35224
35244
|
return outputs;
|
|
35225
35245
|
}
|
|
35226
35246
|
async function getMiddleware(workPath) {
|
|
35227
|
-
const
|
|
35247
|
+
const manifestPath = import_path3.default.join(
|
|
35228
35248
|
workPath,
|
|
35229
35249
|
BUILD_OUTPUT_DIR,
|
|
35230
35250
|
"functions-manifest.json"
|
|
35231
35251
|
);
|
|
35232
35252
|
try {
|
|
35233
|
-
const manifest = await (0, import_fs_extra.readJson)(
|
|
35253
|
+
const manifest = await (0, import_fs_extra.readJson)(manifestPath);
|
|
35234
35254
|
if (manifest.pages["_middleware.js"].runtime !== "web") {
|
|
35235
35255
|
return;
|
|
35236
35256
|
}
|
|
@@ -36469,7 +36489,7 @@ var prepareCache = async ({
|
|
|
36469
36489
|
}
|
|
36470
36490
|
return cacheFiles;
|
|
36471
36491
|
};
|
|
36472
|
-
var
|
|
36492
|
+
var STATIC_BUILD_MANIFEST_RUNTIME = "static-build";
|
|
36473
36493
|
async function generateStaticBuildManifest({
|
|
36474
36494
|
framework,
|
|
36475
36495
|
service,
|
|
@@ -36501,7 +36521,7 @@ async function generateStaticBuildManifest({
|
|
|
36501
36521
|
]
|
|
36502
36522
|
},
|
|
36503
36523
|
entrypointDir,
|
|
36504
|
-
|
|
36524
|
+
STATIC_BUILD_MANIFEST_RUNTIME
|
|
36505
36525
|
);
|
|
36506
36526
|
} catch (err) {
|
|
36507
36527
|
(0, import_build_utils4.debug)(
|
|
@@ -36530,7 +36550,7 @@ async function generateStaticBuildManifest({
|
|
|
36530
36550
|
]
|
|
36531
36551
|
},
|
|
36532
36552
|
entrypointDir,
|
|
36533
|
-
|
|
36553
|
+
STATIC_BUILD_MANIFEST_RUNTIME
|
|
36534
36554
|
);
|
|
36535
36555
|
} catch (err) {
|
|
36536
36556
|
(0, import_build_utils4.debug)(
|
|
@@ -36542,7 +36562,8 @@ async function generateStaticBuildManifest({
|
|
|
36542
36562
|
workPath: entrypointDir,
|
|
36543
36563
|
gemfileLockPath: import_path6.default.join(entrypointDir, "Gemfile.lock"),
|
|
36544
36564
|
framework: framework.slug,
|
|
36545
|
-
serviceType: service ? (0, import_build_utils4.getReportedServiceType)(service) : void 0
|
|
36565
|
+
serviceType: service ? (0, import_build_utils4.getReportedServiceType)(service) : void 0,
|
|
36566
|
+
outputRuntime: STATIC_BUILD_MANIFEST_RUNTIME
|
|
36546
36567
|
});
|
|
36547
36568
|
} else if (framework?.slug) {
|
|
36548
36569
|
try {
|
|
@@ -36553,7 +36574,8 @@ async function generateStaticBuildManifest({
|
|
|
36553
36574
|
lockfilePath,
|
|
36554
36575
|
lockfileVersion,
|
|
36555
36576
|
framework: framework.slug,
|
|
36556
|
-
serviceType: service ? (0, import_build_utils4.getReportedServiceType)(service) : void 0
|
|
36577
|
+
serviceType: service ? (0, import_build_utils4.getReportedServiceType)(service) : void 0,
|
|
36578
|
+
outputRuntime: STATIC_BUILD_MANIFEST_RUNTIME
|
|
36557
36579
|
});
|
|
36558
36580
|
} catch (err) {
|
|
36559
36581
|
(0, import_build_utils4.debug)(
|
|
@@ -36562,23 +36584,7 @@ async function generateStaticBuildManifest({
|
|
|
36562
36584
|
}
|
|
36563
36585
|
}
|
|
36564
36586
|
}
|
|
36565
|
-
var diagnostics =
|
|
36566
|
-
const files = {};
|
|
36567
|
-
await Promise.all(
|
|
36568
|
-
STATIC_BUILD_MANIFEST_RUNTIMES.map(async (runtime) => {
|
|
36569
|
-
const relPath = (0, import_build_utils4.manifestPath)(runtime);
|
|
36570
|
-
try {
|
|
36571
|
-
const data = await import_fs4.promises.readFile(
|
|
36572
|
-
import_path6.default.join(workPath, relPath),
|
|
36573
|
-
"utf-8"
|
|
36574
|
-
);
|
|
36575
|
-
files[relPath] = new import_build_utils4.FileBlob({ data });
|
|
36576
|
-
} catch {
|
|
36577
|
-
}
|
|
36578
|
-
})
|
|
36579
|
-
);
|
|
36580
|
-
return files;
|
|
36581
|
-
};
|
|
36587
|
+
var diagnostics = (0, import_build_utils4.createDiagnostics)(STATIC_BUILD_MANIFEST_RUNTIME);
|
|
36582
36588
|
// Annotate the CommonJS export names for ESM import in node:
|
|
36583
36589
|
0 && (module.exports = {
|
|
36584
36590
|
build,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vercel/static-build",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.12.1",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"main": "./dist/index",
|
|
6
6
|
"homepage": "https://vercel.com/docs/build-step",
|
|
@@ -14,9 +14,9 @@
|
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
16
|
"ts-morph": "12.0.0",
|
|
17
|
-
"@vercel/
|
|
18
|
-
"@vercel/
|
|
19
|
-
"@vercel/gatsby-plugin-vercel-
|
|
17
|
+
"@vercel/static-config": "3.4.1",
|
|
18
|
+
"@vercel/gatsby-plugin-vercel-builder": "2.2.35",
|
|
19
|
+
"@vercel/gatsby-plugin-vercel-analytics": "1.0.12"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
22
|
"@types/aws-lambda": "8.10.64",
|
|
@@ -37,11 +37,11 @@
|
|
|
37
37
|
"semver": "7.5.2",
|
|
38
38
|
"tree-kill": "1.2.2",
|
|
39
39
|
"vitest": "2.0.3",
|
|
40
|
-
"@vercel/
|
|
41
|
-
"@vercel/
|
|
42
|
-
"@vercel/
|
|
43
|
-
"@vercel/fs-detectors": "6.
|
|
44
|
-
"@vercel/routing-utils": "6.4.
|
|
40
|
+
"@vercel/error-utils": "2.2.1",
|
|
41
|
+
"@vercel/frameworks": "3.30.8",
|
|
42
|
+
"@vercel/build-utils": "14.0.1",
|
|
43
|
+
"@vercel/fs-detectors": "6.15.1",
|
|
44
|
+
"@vercel/routing-utils": "6.4.1"
|
|
45
45
|
},
|
|
46
46
|
"scripts": {
|
|
47
47
|
"build": "node ../../utils/build-builder.mjs",
|