@vercel/fs-detectors 5.8.2 → 5.8.3
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/services/resolve.js +8 -0
- package/package.json +3 -3
package/dist/services/resolve.js
CHANGED
|
@@ -38,7 +38,15 @@ var import_types = require("./types");
|
|
|
38
38
|
var import_utils = require("./utils");
|
|
39
39
|
var import_frameworks = __toESM(require("@vercel/frameworks"));
|
|
40
40
|
const frameworksBySlug = new Map(import_frameworks.default.map((f) => [f.slug, f]));
|
|
41
|
+
const SERVICE_NAME_REGEX = /^[a-zA-Z]([a-zA-Z0-9_-]*[a-zA-Z0-9])?$/;
|
|
41
42
|
function validateServiceConfig(name, config) {
|
|
43
|
+
if (!SERVICE_NAME_REGEX.test(name)) {
|
|
44
|
+
return {
|
|
45
|
+
code: "INVALID_SERVICE_NAME",
|
|
46
|
+
message: `Service name "${name}" is invalid. Names must start with a letter, end with an alphanumeric character, and contain only alphanumeric characters, hyphens, and underscores.`,
|
|
47
|
+
serviceName: name
|
|
48
|
+
};
|
|
49
|
+
}
|
|
42
50
|
if (!config || typeof config !== "object") {
|
|
43
51
|
return {
|
|
44
52
|
code: "INVALID_SERVICE_CONFIG",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vercel/fs-detectors",
|
|
3
|
-
"version": "5.8.
|
|
3
|
+
"version": "5.8.3",
|
|
4
4
|
"description": "Vercel filesystem detectors",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"minimatch": "3.1.2",
|
|
21
21
|
"semver": "6.3.1",
|
|
22
22
|
"@vercel/error-utils": "2.0.3",
|
|
23
|
-
"@vercel/frameworks": "3.17.
|
|
23
|
+
"@vercel/frameworks": "3.17.1",
|
|
24
24
|
"@vercel/routing-utils": "5.3.2"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"@types/semver": "7.3.10",
|
|
33
33
|
"jest-junit": "16.0.0",
|
|
34
34
|
"typescript": "4.9.5",
|
|
35
|
-
"@vercel/build-utils": "13.3.
|
|
35
|
+
"@vercel/build-utils": "13.3.3"
|
|
36
36
|
},
|
|
37
37
|
"scripts": {
|
|
38
38
|
"build": "node ../../utils/build.mjs",
|