@vercel/static-build 2.8.14 → 2.8.15

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.
Files changed (2) hide show
  1. package/dist/index.js +10 -2
  2. package/package.json +5 -5
package/dist/index.js CHANGED
@@ -19312,6 +19312,7 @@ var require_detect_builders = __commonJS({
19312
19312
  var import_path7 = require("path");
19313
19313
  var import_frameworks2 = __toESM2(require_frameworks());
19314
19314
  var import_is_official_runtime = require_is_official_runtime();
19315
+ var import_build_utils5 = require("@vercel/build-utils");
19315
19316
  var REGEX_MIDDLEWARE_FILES = "middleware.[jt]s";
19316
19317
  var REGEX_VERCEL_PLATFORM_FILES = `api/**,package.json,${REGEX_MIDDLEWARE_FILES}`;
19317
19318
  var REGEX_NON_VERCEL_PLATFORM_FILES2 = `!{${REGEX_VERCEL_PLATFORM_FILES}}`;
@@ -19396,7 +19397,7 @@ var require_detect_builders = __commonJS({
19396
19397
  const apiRoutes = [];
19397
19398
  const dynamicRoutes = [];
19398
19399
  for (const fileName of sortedFiles) {
19399
- const apiBuilder = maybeGetApiBuilder(fileName, apiMatches, options);
19400
+ const apiBuilder = await maybeGetApiBuilder(fileName, apiMatches, options);
19400
19401
  if (apiBuilder) {
19401
19402
  const { routeError, apiRoute, isDynamic } = getApiRoute(
19402
19403
  fileName,
@@ -19543,7 +19544,7 @@ var require_detect_builders = __commonJS({
19543
19544
  errorRoutes: routesResult.errorRoutes
19544
19545
  };
19545
19546
  }
19546
- function maybeGetApiBuilder(fileName, apiMatches, options) {
19547
+ async function maybeGetApiBuilder(fileName, apiMatches, options) {
19547
19548
  const middleware = fileName === "middleware.js" || fileName === "middleware.ts";
19548
19549
  if (middleware && options.projectSettings?.framework === "nextjs") {
19549
19550
  return null;
@@ -19563,6 +19564,13 @@ var require_detect_builders = __commonJS({
19563
19564
  if (fileName.endsWith(".d.ts")) {
19564
19565
  return null;
19565
19566
  }
19567
+ if (fileName.endsWith(".py") && options.workPath) {
19568
+ const fsPath = (0, import_path7.join)(options.workPath, fileName);
19569
+ const isEntrypoint = await (0, import_build_utils5.isPythonEntrypoint)({ fsPath });
19570
+ if (!isEntrypoint) {
19571
+ return null;
19572
+ }
19573
+ }
19566
19574
  const match = apiMatches.find(({ src = "**" }) => {
19567
19575
  return src === fileName || (0, import_minimatch.default)(fileName, src);
19568
19576
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vercel/static-build",
3
- "version": "2.8.14",
3
+ "version": "2.8.15",
4
4
  "license": "Apache-2.0",
5
5
  "main": "./dist/index",
6
6
  "homepage": "https://vercel.com/docs/build-step",
@@ -15,7 +15,7 @@
15
15
  "dependencies": {
16
16
  "ts-morph": "12.0.0",
17
17
  "@vercel/gatsby-plugin-vercel-analytics": "1.0.11",
18
- "@vercel/gatsby-plugin-vercel-builder": "2.0.113",
18
+ "@vercel/gatsby-plugin-vercel-builder": "2.0.114",
19
19
  "@vercel/static-config": "3.1.2"
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.2.3",
41
+ "@vercel/build-utils": "13.2.4",
42
42
  "@vercel/error-utils": "2.0.3",
43
+ "@vercel/fs-detectors": "5.7.11",
43
44
  "@vercel/frameworks": "3.15.4",
44
- "@vercel/fs-detectors": "5.7.9",
45
- "@vercel/routing-utils": "5.3.0"
45
+ "@vercel/routing-utils": "5.3.1"
46
46
  },
47
47
  "scripts": {
48
48
  "build": "node ../../utils/build-builder.mjs",