@vercel/static-build 2.9.2 → 2.9.4
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 +18 -45
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -21240,7 +21240,6 @@ var require_schemas = __commonJS({
|
|
|
21240
21240
|
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
21241
21241
|
var schemas_exports = {};
|
|
21242
21242
|
__export2(schemas_exports, {
|
|
21243
|
-
bulkRedirectsSchema: () => bulkRedirectsSchema,
|
|
21244
21243
|
cleanUrlsSchema: () => cleanUrlsSchema,
|
|
21245
21244
|
hasSchema: () => hasSchema,
|
|
21246
21245
|
headersSchema: () => headersSchema,
|
|
@@ -21801,7 +21800,7 @@ var require_schemas = __commonJS({
|
|
|
21801
21800
|
required: ["source", "destination"],
|
|
21802
21801
|
properties: {
|
|
21803
21802
|
source: {
|
|
21804
|
-
description: "A pattern that matches each incoming pathname (excluding querystring).",
|
|
21803
|
+
description: "A pattern that matches each incoming pathname (excluding querystring) or a full URL including domain.",
|
|
21805
21804
|
type: "string",
|
|
21806
21805
|
maxLength: 4096
|
|
21807
21806
|
},
|
|
@@ -21883,44 +21882,6 @@ var require_schemas = __commonJS({
|
|
|
21883
21882
|
description: "When `false`, visiting a path that ends with a forward slash will respond with a `308` status code and redirect to the path without the trailing slash.",
|
|
21884
21883
|
type: "boolean"
|
|
21885
21884
|
};
|
|
21886
|
-
var bulkRedirectsSchema = {
|
|
21887
|
-
type: "array",
|
|
21888
|
-
description: "A list of bulk redirect definitions.",
|
|
21889
|
-
items: {
|
|
21890
|
-
type: "object",
|
|
21891
|
-
additionalProperties: false,
|
|
21892
|
-
required: ["source", "destination"],
|
|
21893
|
-
properties: {
|
|
21894
|
-
source: {
|
|
21895
|
-
description: "The exact URL path or pattern to match.",
|
|
21896
|
-
type: "string",
|
|
21897
|
-
maxLength: 2048
|
|
21898
|
-
},
|
|
21899
|
-
destination: {
|
|
21900
|
-
description: "The target URL path where traffic should be redirected.",
|
|
21901
|
-
type: "string",
|
|
21902
|
-
maxLength: 2048
|
|
21903
|
-
},
|
|
21904
|
-
permanent: {
|
|
21905
|
-
description: "A boolean to toggle between permanent and temporary redirect. When `true`, the status code is `308`. When `false` the status code is `307`.",
|
|
21906
|
-
type: "boolean"
|
|
21907
|
-
},
|
|
21908
|
-
statusCode: {
|
|
21909
|
-
description: "An optional integer to define the status code of the redirect.",
|
|
21910
|
-
type: "integer",
|
|
21911
|
-
enum: [301, 302, 307, 308]
|
|
21912
|
-
},
|
|
21913
|
-
sensitive: {
|
|
21914
|
-
description: "A boolean to toggle between case-sensitive and case-insensitive redirect. When `true`, the redirect is case-sensitive. When `false` the redirect is case-insensitive.",
|
|
21915
|
-
type: "boolean"
|
|
21916
|
-
},
|
|
21917
|
-
query: {
|
|
21918
|
-
description: "Whether the query string should be preserved by the redirect. The default is `false`.",
|
|
21919
|
-
type: "boolean"
|
|
21920
|
-
}
|
|
21921
|
-
}
|
|
21922
|
-
}
|
|
21923
|
-
};
|
|
21924
21885
|
}
|
|
21925
21886
|
});
|
|
21926
21887
|
|
|
@@ -22869,12 +22830,13 @@ var require_resolve = __commonJS({
|
|
|
22869
22830
|
});
|
|
22870
22831
|
module2.exports = __toCommonJS2(resolve_exports);
|
|
22871
22832
|
var import_path7 = require("path");
|
|
22833
|
+
var import_build_utils5 = require("@vercel/build-utils");
|
|
22872
22834
|
var import_types = require_types3();
|
|
22873
22835
|
var import_utils = require_utils4();
|
|
22874
22836
|
var import_frameworks2 = require_frameworks();
|
|
22875
22837
|
var import_detect_framework = require_detect_framework();
|
|
22876
22838
|
var import_routing_utils = require_dist6();
|
|
22877
|
-
var
|
|
22839
|
+
var import_build_utils22 = require("@vercel/build-utils");
|
|
22878
22840
|
var frameworksBySlug = new Map(import_frameworks2.frameworkList.map((f) => [f.slug, f]));
|
|
22879
22841
|
var PYTHON_MODULE_ATTR_RE = /^([A-Za-z_][\w]*(?:\.[A-Za-z_][\w]*)*):([A-Za-z_][\w]*)$/;
|
|
22880
22842
|
function parsePyModuleAttrEntrypoint(entrypoint) {
|
|
@@ -22888,6 +22850,7 @@ var require_resolve = __commonJS({
|
|
|
22888
22850
|
}
|
|
22889
22851
|
var SERVICE_NAME_REGEX = /^[a-zA-Z]([a-zA-Z0-9_-]*[a-zA-Z0-9])?$/;
|
|
22890
22852
|
var DNS_LABEL_RE = /^(?!-)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$/i;
|
|
22853
|
+
var ENV_PREFIX_RE = /^[A-Z][A-Z0-9_]*_$/;
|
|
22891
22854
|
function normalizeServiceEntrypoint(entrypoint) {
|
|
22892
22855
|
const normalized = import_path7.posix.normalize(entrypoint);
|
|
22893
22856
|
return normalized === "" ? "." : normalized;
|
|
@@ -23062,6 +23025,15 @@ var require_resolve = __commonJS({
|
|
|
23062
23025
|
serviceName: name
|
|
23063
23026
|
};
|
|
23064
23027
|
}
|
|
23028
|
+
if (config.envPrefix !== void 0) {
|
|
23029
|
+
if (!ENV_PREFIX_RE.test(config.envPrefix)) {
|
|
23030
|
+
return {
|
|
23031
|
+
code: "INVALID_ENV_PREFIX",
|
|
23032
|
+
message: `Service "${name}" has invalid envPrefix "${config.envPrefix}". Must start with an uppercase letter, contain only uppercase letters, digits, and underscores, and end with "_" (e.g., "MY_SERVICE_").`,
|
|
23033
|
+
serviceName: name
|
|
23034
|
+
};
|
|
23035
|
+
}
|
|
23036
|
+
}
|
|
23065
23037
|
if (config.runtime && !(config.runtime in import_types.RUNTIME_BUILDERS)) {
|
|
23066
23038
|
return {
|
|
23067
23039
|
code: "INVALID_RUNTIME",
|
|
@@ -23175,7 +23147,7 @@ var require_resolve = __commonJS({
|
|
|
23175
23147
|
}
|
|
23176
23148
|
}
|
|
23177
23149
|
}
|
|
23178
|
-
const
|
|
23150
|
+
const topics = type === "worker" ? (0, import_build_utils5.getWorkerTopics)(config) : config.topics;
|
|
23179
23151
|
const consumer = type === "worker" ? config.consumer || "default" : config.consumer;
|
|
23180
23152
|
let builderUse;
|
|
23181
23153
|
let builderSrc;
|
|
@@ -23184,7 +23156,7 @@ var require_resolve = __commonJS({
|
|
|
23184
23156
|
builderUse = config.builder;
|
|
23185
23157
|
builderSrc = resolvedEntrypointFile || frameworkDefinition?.useRuntime?.src || "package.json";
|
|
23186
23158
|
} else if (config.framework) {
|
|
23187
|
-
if (type === "web" && (0,
|
|
23159
|
+
if (type === "web" && (0, import_build_utils22.isNodeBackendFramework)(config.framework)) {
|
|
23188
23160
|
builderUse = "@vercel/backends";
|
|
23189
23161
|
} else {
|
|
23190
23162
|
builderUse = frameworkDefinition?.useRuntime?.use || "@vercel/static-build";
|
|
@@ -23258,8 +23230,9 @@ var require_resolve = __commonJS({
|
|
|
23258
23230
|
installCommand: config.installCommand,
|
|
23259
23231
|
schedule: config.schedule,
|
|
23260
23232
|
handlerFunction: moduleAttrParsed?.attrName,
|
|
23261
|
-
|
|
23262
|
-
consumer
|
|
23233
|
+
topics,
|
|
23234
|
+
consumer,
|
|
23235
|
+
envPrefix: config.envPrefix
|
|
23263
23236
|
};
|
|
23264
23237
|
}
|
|
23265
23238
|
async function resolveAllConfiguredServices(services, fs5, routePrefixSource = "configured") {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vercel/static-build",
|
|
3
|
-
"version": "2.9.
|
|
3
|
+
"version": "2.9.4",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"main": "./dist/index",
|
|
6
6
|
"homepage": "https://vercel.com/docs/build-step",
|
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
16
|
"ts-morph": "12.0.0",
|
|
17
|
-
"@vercel/gatsby-plugin-vercel-builder": "2.1.2",
|
|
18
17
|
"@vercel/gatsby-plugin-vercel-analytics": "1.0.11",
|
|
18
|
+
"@vercel/gatsby-plugin-vercel-builder": "2.1.4",
|
|
19
19
|
"@vercel/static-config": "3.2.0"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
@@ -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/build-utils": "13.8.2",
|
|
42
|
-
"@vercel/frameworks": "3.21.1",
|
|
43
41
|
"@vercel/error-utils": "2.0.3",
|
|
44
|
-
"@vercel/
|
|
45
|
-
"@vercel/
|
|
42
|
+
"@vercel/build-utils": "13.10.0",
|
|
43
|
+
"@vercel/frameworks": "3.21.1",
|
|
44
|
+
"@vercel/fs-detectors": "5.12.0",
|
|
45
|
+
"@vercel/routing-utils": "6.1.1"
|
|
46
46
|
},
|
|
47
47
|
"scripts": {
|
|
48
48
|
"build": "node ../../utils/build-builder.mjs",
|