@vercel/fs-detectors 7.15.1 → 7.15.2-snapshot-e19b51547eec

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.
@@ -1,5 +1,5 @@
1
1
  import type { Rewrite } from '@vercel/routing-utils';
2
- import type { BuilderFunctions, ExperimentalService, ExperimentalServiceGroups, ExperimentalServices, Services } from '@vercel/build-utils';
2
+ import { type BuilderFunctions, type ExperimentalService, type ExperimentalServiceGroups, type ExperimentalServices, type Services } from '@vercel/build-utils';
3
3
  import type { DetectorFilesystem } from '../detectors/filesystem';
4
4
  import type { ServiceDetectionError } from './types';
5
5
  /** Top-level build settings that are not allowed alongside `services`. */
@@ -24,6 +24,7 @@ __export(migrate_exports, {
24
24
  });
25
25
  module.exports = __toCommonJS(migrate_exports);
26
26
  var import_path = require("path");
27
+ var import_build_utils = require("@vercel/build-utils");
27
28
  var import_frameworks = require("@vercel/frameworks");
28
29
  var import_constants = require("./runtimes/constants");
29
30
  var import_resolve = require("./resolve");
@@ -116,11 +117,11 @@ function planExperimentalServicesMigration(config, resolvedServices) {
116
117
  continue;
117
118
  }
118
119
  const name = legacyName.toLowerCase();
119
- if (name.length > 64 || !/^[a-z]([a-z_-]*[a-z])?$/.test(name)) {
120
+ if (name.length > 64 || !new RegExp(import_build_utils.SERVICE_NAME_PATTERN).test(name)) {
120
121
  plan.errors.push({
121
122
  code: "INVALID_SERVICE_NAME",
122
123
  serviceName: legacyName,
123
- message: `Service name "${legacyName}" is not valid for \`services\`. Names must be 1-64 characters, start and end with a lowercase letter, and contain only lowercase letters, hyphens, and underscores. Rename it in \`experimentalServices\` first.`
124
+ message: `Service name "${legacyName}" is not valid for \`services\`. Names must be 1-64 characters, start with a lowercase letter, end with a lowercase letter or digit, and contain only lowercase letters, digits, hyphens, and underscores. Rename it in \`experimentalServices\` first.`
124
125
  });
125
126
  continue;
126
127
  }
@@ -36,12 +36,12 @@ var import_utils = require("./utils");
36
36
  var import_detect_builders = require("../detect-builders");
37
37
  const frameworksBySlug = new Map(import_frameworks.frameworkList.map((f) => [f.slug, f]));
38
38
  const MAX_SERVICE_NAME_LENGTH = 64;
39
- const SERVICE_NAME_REGEX = /^[a-z]([a-z_-]*[a-z])?$/;
39
+ const SERVICE_NAME_REGEX = new RegExp(import_build_utils.SERVICE_NAME_PATTERN);
40
40
  function isValidServiceName(name) {
41
41
  return name.length <= MAX_SERVICE_NAME_LENGTH && SERVICE_NAME_REGEX.test(name);
42
42
  }
43
43
  function getInvalidServiceNameMessage(name) {
44
- return `Service name "${name}" is invalid. Names must be 1-${MAX_SERVICE_NAME_LENGTH} characters, start and end with a lowercase letter, and contain only lowercase letters, hyphens, and underscores.`;
44
+ return `Service name "${name}" is invalid. Names must be 1-${MAX_SERVICE_NAME_LENGTH} characters, start with a lowercase letter, end with a lowercase letter or digit, and contain only lowercase letters, digits, hyphens, and underscores.`;
45
45
  }
46
46
  async function detectContainerEntrypoint(serviceFs) {
47
47
  for (const candidate of import_constants.CONTAINER_ENTRYPOINT_CANDIDATES) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vercel/fs-detectors",
3
- "version": "7.15.1",
3
+ "version": "7.15.2-snapshot-e19b51547eec",
4
4
  "description": "Vercel filesystem detectors",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -20,11 +20,11 @@
20
20
  "minimatch": "3.1.2",
21
21
  "semver": "6.3.1",
22
22
  "smol-toml": "1.5.2",
23
- "@vercel/build-utils": "15.9.0",
23
+ "@vercel/build-utils": "15.9.1-snapshot-e19b51547eec",
24
24
  "@vercel/error-utils": "2.2.1",
25
- "@vercel/frameworks": "3.35.1",
26
25
  "@vercel/python-analysis": "0.16.0",
27
- "@vercel/routing-utils": "6.6.1"
26
+ "@vercel/routing-utils": "6.6.1",
27
+ "@vercel/frameworks": "3.35.1"
28
28
  },
29
29
  "devDependencies": {
30
30
  "@types/glob": "7.2.0",
@@ -33,7 +33,7 @@
33
33
  "@types/node": "20.11.0",
34
34
  "@types/semver": "7.3.10",
35
35
  "vitest": "4.1.10",
36
- "@vercel-internals/runtimes": "1.2.16"
36
+ "@vercel-internals/runtimes": "1.2.17"
37
37
  },
38
38
  "scripts": {
39
39
  "build": "node build.mjs",