@vercel/static-build 26.0.1 → 27.0.0-snapshot-f37009a35593
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 +52 -15
- package/package.json +7 -7
package/dist/index.js
CHANGED
|
@@ -29633,6 +29633,7 @@ var require_dist5 = __commonJS({
|
|
|
29633
29633
|
isWheelCompatible: () => isWheelCompatible,
|
|
29634
29634
|
normalizePackageName: () => normalizePackageName2,
|
|
29635
29635
|
parsePep508: () => parsePep508,
|
|
29636
|
+
parseRequirementsFile: () => parseRequirementsFile,
|
|
29636
29637
|
parseUvLock: () => parseUvLock,
|
|
29637
29638
|
scanDistributions: () => scanDistributions,
|
|
29638
29639
|
selectPython: () => selectPython,
|
|
@@ -32633,12 +32634,12 @@ var require_detect_builders = __commonJS({
|
|
|
32633
32634
|
};
|
|
32634
32635
|
const absolutePathCache = /* @__PURE__ */ new Map();
|
|
32635
32636
|
const proxy = resolveProxy(files, options);
|
|
32636
|
-
const
|
|
32637
|
+
const reservedFiles = getReservedFiles(options);
|
|
32637
32638
|
const claimedFiles = /* @__PURE__ */ new Set([
|
|
32638
32639
|
...proxy?.source === "vercel-config" ? [proxy.file] : [],
|
|
32639
|
-
...
|
|
32640
|
+
...reservedFiles
|
|
32640
32641
|
]);
|
|
32641
|
-
const hasReservedFunctions =
|
|
32642
|
+
const hasReservedFunctions = reservedFiles.length > 0;
|
|
32642
32643
|
const { buildCommand, outputDirectory } = projectSettings;
|
|
32643
32644
|
const frameworkConfig = import_framework.frameworksBySlug.get(framework || "");
|
|
32644
32645
|
const rustStaticOutput = isRustStaticOutput(framework, projectSettings);
|
|
@@ -32943,7 +32944,7 @@ var require_detect_builders = __commonJS({
|
|
|
32943
32944
|
if (framework === "nextjs" || import_framework.frameworksBySlug.get(framework || "")?.disableRootMiddleware) {
|
|
32944
32945
|
return null;
|
|
32945
32946
|
}
|
|
32946
|
-
const reserved = new Set(options
|
|
32947
|
+
const reserved = new Set(getReservedFiles(options));
|
|
32947
32948
|
const file = ROOT_PROXY_FILES.find(
|
|
32948
32949
|
(f) => files.includes(f) && !reserved.has(f)
|
|
32949
32950
|
);
|
|
@@ -33245,12 +33246,21 @@ var require_detect_builders = __commonJS({
|
|
|
33245
33246
|
}
|
|
33246
33247
|
return null;
|
|
33247
33248
|
}
|
|
33249
|
+
function getReservedFiles(options) {
|
|
33250
|
+
return [
|
|
33251
|
+
...options.reservedFunctionFiles ?? [],
|
|
33252
|
+
...options.reservedServiceFiles ?? []
|
|
33253
|
+
];
|
|
33254
|
+
}
|
|
33248
33255
|
function checkUnusedFunctions(frontendBuilder, usedFunctions, claimedFiles, options) {
|
|
33249
33256
|
const unusedFunctions = new Set(
|
|
33250
33257
|
Object.keys(options.functions || {}).filter((key) => !usedFunctions.has(key))
|
|
33251
33258
|
);
|
|
33259
|
+
const serviceFiles = new Set(options.reservedServiceFiles);
|
|
33252
33260
|
for (const fnKey of unusedFunctions) {
|
|
33253
33261
|
for (const filePath of claimedFiles) {
|
|
33262
|
+
if (serviceFiles.has(filePath))
|
|
33263
|
+
continue;
|
|
33254
33264
|
if (filePath === fnKey || (0, import_minimatch.default)(filePath, fnKey)) {
|
|
33255
33265
|
unusedFunctions.delete(fnKey);
|
|
33256
33266
|
break;
|
|
@@ -39001,8 +39011,10 @@ var require_resolve_v2 = __commonJS({
|
|
|
39001
39011
|
const isRoot = normalizedRoot === ".";
|
|
39002
39012
|
const entrypoint = config.entrypoint;
|
|
39003
39013
|
let dockerfile;
|
|
39014
|
+
let buildTarget;
|
|
39004
39015
|
if (typeof entrypoint === "string") {
|
|
39005
|
-
|
|
39016
|
+
const { path: path6, buildTarget: stage } = (0, import_build_utils5.splitDockerfileEntrypoint)(entrypoint);
|
|
39017
|
+
if (!(0, import_entrypoint.isDockerfileEntrypoint)(path6)) {
|
|
39006
39018
|
return {
|
|
39007
39019
|
error: {
|
|
39008
39020
|
code: "INVALID_SERVICE_CONFIG",
|
|
@@ -39011,7 +39023,17 @@ var require_resolve_v2 = __commonJS({
|
|
|
39011
39023
|
}
|
|
39012
39024
|
};
|
|
39013
39025
|
}
|
|
39014
|
-
|
|
39026
|
+
if (stage !== void 0 && !(0, import_build_utils5.isValidDockerfileStage)(stage)) {
|
|
39027
|
+
return {
|
|
39028
|
+
error: {
|
|
39029
|
+
code: "INVALID_SERVICE_CONFIG",
|
|
39030
|
+
message: `Container service "${name}" has invalid "entrypoint" "${entrypoint}". ${import_build_utils5.DOCKERFILE_STAGE_HINT}`,
|
|
39031
|
+
serviceName: name
|
|
39032
|
+
}
|
|
39033
|
+
};
|
|
39034
|
+
}
|
|
39035
|
+
dockerfile = import_path7.posix.normalize(path6);
|
|
39036
|
+
buildTarget = stage;
|
|
39015
39037
|
} else {
|
|
39016
39038
|
dockerfile = await detectContainerEntrypoint(serviceFs);
|
|
39017
39039
|
if (!dockerfile) {
|
|
@@ -39035,6 +39057,9 @@ var require_resolve_v2 = __commonJS({
|
|
|
39035
39057
|
if (command) {
|
|
39036
39058
|
builderConfig.command = command;
|
|
39037
39059
|
}
|
|
39060
|
+
if (buildTarget) {
|
|
39061
|
+
builderConfig.buildTarget = buildTarget;
|
|
39062
|
+
}
|
|
39038
39063
|
return {
|
|
39039
39064
|
service: {
|
|
39040
39065
|
schema: "experimentalServicesV2",
|
|
@@ -39129,7 +39154,9 @@ var require_resolve_v2 = __commonJS({
|
|
|
39129
39154
|
return { error: serviceFsResult.error };
|
|
39130
39155
|
}
|
|
39131
39156
|
const serviceFs = serviceFsResult.fs;
|
|
39132
|
-
const isContainer = config.runtime === "container" || typeof config.entrypoint === "string" && (0, import_entrypoint.isDockerfileEntrypoint)(
|
|
39157
|
+
const isContainer = config.runtime === "container" || typeof config.entrypoint === "string" && (0, import_entrypoint.isDockerfileEntrypoint)(
|
|
39158
|
+
(0, import_build_utils5.splitDockerfileEntrypoint)(config.entrypoint).path
|
|
39159
|
+
);
|
|
39133
39160
|
if (isContainer) {
|
|
39134
39161
|
return resolveContainerServiceV2(name, config, normalizedRoot, serviceFs);
|
|
39135
39162
|
}
|
|
@@ -50758,19 +50785,29 @@ Details: https://err.sh/vercel/vercel/now-static-build-failed-to-detect-a-server
|
|
|
50758
50785
|
throw new Error(message);
|
|
50759
50786
|
};
|
|
50760
50787
|
async function collectStaticFiles(distPath, meta, mountpoint, ignore = [], serviceName) {
|
|
50761
|
-
if (!meta?.daemonContext)
|
|
50788
|
+
if (!meta?.daemonContext && !meta?.servicesContext)
|
|
50762
50789
|
return (0, import_build_utils4.glob)("**", { cwd: distPath, ignore }, mountpoint);
|
|
50763
|
-
const
|
|
50764
|
-
|
|
50790
|
+
const filter = await (0, import_build_utils4.createStaticPublishFilter)({
|
|
50791
|
+
meta,
|
|
50765
50792
|
publishPath: distPath,
|
|
50766
50793
|
serviceName
|
|
50767
50794
|
});
|
|
50768
|
-
const output = await (0, import_build_utils4.glob)(
|
|
50769
|
-
|
|
50770
|
-
|
|
50795
|
+
const output = await (0, import_build_utils4.glob)(
|
|
50796
|
+
"**",
|
|
50797
|
+
{ cwd: distPath, ignore: [...ignore, ...filter.getIgnorePatterns()] },
|
|
50798
|
+
mountpoint
|
|
50799
|
+
);
|
|
50800
|
+
const entries = Object.entries(output);
|
|
50801
|
+
const publishable = await Promise.all(
|
|
50802
|
+
entries.map(
|
|
50803
|
+
([, file]) => file.type !== "FileFsRef" || filter.canPublish(file.fsPath)
|
|
50804
|
+
)
|
|
50805
|
+
);
|
|
50806
|
+
entries.forEach(([name], i) => {
|
|
50807
|
+
if (!publishable[i])
|
|
50771
50808
|
delete output[name];
|
|
50772
|
-
|
|
50773
|
-
}
|
|
50809
|
+
});
|
|
50810
|
+
filter.report({ published: Object.keys(output).length });
|
|
50774
50811
|
return output;
|
|
50775
50812
|
}
|
|
50776
50813
|
var prepareCache = async ({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vercel/static-build",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "27.0.0-snapshot-f37009a35593",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"main": "./dist/index",
|
|
6
6
|
"homepage": "https://vercel.com/docs/build-step",
|
|
@@ -15,11 +15,11 @@
|
|
|
15
15
|
"dependencies": {
|
|
16
16
|
"ts-morph": "12.0.0",
|
|
17
17
|
"@vercel/gatsby-plugin-vercel-analytics": "1.0.12",
|
|
18
|
-
"@vercel/gatsby-plugin-vercel-builder": "2.2.
|
|
18
|
+
"@vercel/gatsby-plugin-vercel-builder": "2.2.85-snapshot-f37009a35593",
|
|
19
19
|
"@vercel/static-config": "3.4.4"
|
|
20
20
|
},
|
|
21
21
|
"peerDependencies": {
|
|
22
|
-
"@vercel/build-utils": "15.
|
|
22
|
+
"@vercel/build-utils": "15.3.0-snapshot-f37009a35593"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"@types/aws-lambda": "8.10.64",
|
|
@@ -40,11 +40,11 @@
|
|
|
40
40
|
"semver": "7.5.2",
|
|
41
41
|
"tree-kill": "1.2.2",
|
|
42
42
|
"vitest": "4.1.10",
|
|
43
|
-
"@vercel/build-utils": "15.
|
|
44
|
-
"@vercel/error-utils": "2.2.1",
|
|
43
|
+
"@vercel/build-utils": "15.3.0-snapshot-f37009a35593",
|
|
45
44
|
"@vercel/frameworks": "3.35.0",
|
|
46
|
-
"@vercel/
|
|
47
|
-
"@vercel/fs-detectors": "7.
|
|
45
|
+
"@vercel/error-utils": "2.2.1",
|
|
46
|
+
"@vercel/fs-detectors": "7.12.0-snapshot-f37009a35593",
|
|
47
|
+
"@vercel/routing-utils": "6.6.1"
|
|
48
48
|
},
|
|
49
49
|
"scripts": {
|
|
50
50
|
"build": "node ../../utils/build-builder.mjs",
|