@vercel/fs-detectors 7.12.1 → 7.12.2-snapshot-c7f6a2a993e4

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.
@@ -158,12 +158,15 @@ var require_entrypoint = __commonJS({
158
158
  __export2(entrypoint_exports, {
159
159
  isDockerfileEntrypoint: () => isDockerfileEntrypoint,
160
160
  parsePyModuleAttrEntrypoint: () => parsePyModuleAttrEntrypoint2,
161
+ parsePythonScheduleModule: () => parsePythonScheduleModule,
161
162
  stripTrailingSlash: () => stripTrailingSlash
162
163
  });
163
164
  module2.exports = __toCommonJS2(entrypoint_exports);
164
165
  var import_path2 = require("path");
165
166
  var import_constants2 = require_constants();
166
167
  var PYTHON_MODULE_ATTR_RE = /^([A-Za-z_][\w]*(?:\.[A-Za-z_][\w]*)*):([A-Za-z_][\w]*)$/;
168
+ var PYTHON_MODULE_RE = /^[A-Za-z_]\w*(?:\.[A-Za-z_]\w*)*$/;
169
+ var SOURCE_FILE_RE = /\.(?:py|[cm]?[jt]s)$/;
167
170
  function parsePyModuleAttrEntrypoint2(entrypoint) {
168
171
  const match = PYTHON_MODULE_ATTR_RE.exec(entrypoint);
169
172
  if (!match)
@@ -177,6 +180,16 @@ var require_entrypoint = __commonJS({
177
180
  moduleName: modulePart
178
181
  };
179
182
  }
183
+ function parsePythonScheduleModule(entrypoint) {
184
+ if (!PYTHON_MODULE_RE.test(entrypoint) || SOURCE_FILE_RE.test(entrypoint)) {
185
+ return null;
186
+ }
187
+ const path = entrypoint.replace(/\./g, "/");
188
+ return {
189
+ moduleName: entrypoint,
190
+ sourceFiles: [`${path}/__init__.py`, `${path}.py`]
191
+ };
192
+ }
180
193
  var CONTAINER_ENTRYPOINT_BASENAMES = new Set(
181
194
  import_constants2.CONTAINER_ENTRYPOINT_CANDIDATES.map((name) => name.toLowerCase())
182
195
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vercel/fs-detectors",
3
- "version": "7.12.1",
3
+ "version": "7.12.2-snapshot-c7f6a2a993e4",
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.4.0",
23
+ "@vercel/build-utils": "15.4.1-snapshot-c7f6a2a993e4",
24
+ "@vercel/error-utils": "2.2.1",
24
25
  "@vercel/frameworks": "3.35.0",
25
- "@vercel/routing-utils": "6.6.1",
26
26
  "@vercel/python-analysis": "0.15.3",
27
- "@vercel/error-utils": "2.2.1"
27
+ "@vercel/routing-utils": "6.6.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.9"
36
+ "@vercel-internals/runtimes": "1.2.10"
37
37
  },
38
38
  "scripts": {
39
39
  "build": "node build.mjs",