@vercel/fs-detectors 5.8.2 → 5.8.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.
@@ -527,7 +527,7 @@ function checkUnusedFunctions(frontendBuilder, usedFunctions, options) {
527
527
  }
528
528
  }
529
529
  }
530
- if (frontendBuilder && ((0, import_is_official_runtime.isOfficialRuntime)("express", frontendBuilder.use) || (0, import_is_official_runtime.isOfficialRuntime)("hono", frontendBuilder.use))) {
530
+ if (frontendBuilder && ((0, import_is_official_runtime.isOfficialRuntime)("express", frontendBuilder.use) || (0, import_is_official_runtime.isOfficialRuntime)("hono", frontendBuilder.use) || (0, import_is_official_runtime.isOfficialRuntime)("backends", frontendBuilder.use))) {
531
531
  const validFilenames = [
532
532
  "app",
533
533
  "index",
@@ -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.2",
3
+ "version": "5.8.4",
4
4
  "description": "Vercel filesystem detectors",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -20,8 +20,8 @@
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.0",
24
- "@vercel/routing-utils": "5.3.2"
23
+ "@vercel/routing-utils": "5.3.2",
24
+ "@vercel/frameworks": "3.17.1"
25
25
  },
26
26
  "devDependencies": {
27
27
  "@types/glob": "7.2.0",
@@ -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.2"
35
+ "@vercel/build-utils": "13.3.4"
36
36
  },
37
37
  "scripts": {
38
38
  "build": "node ../../utils/build.mjs",