@vercel/static-build 28.0.0 → 28.0.1-snapshot-92f4d50bf3fb

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 +23 -0
  2. package/package.json +7 -7
package/dist/index.js CHANGED
@@ -32314,14 +32314,20 @@ var require_detect_builders = __commonJS({
32314
32314
  var __toCommonJS22 = (mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod);
32315
32315
  var entrypoint_exports = {};
32316
32316
  __export22(entrypoint_exports, {
32317
+ getScheduleEntrypointRuntime: () => getScheduleEntrypointRuntime,
32317
32318
  isDockerfileEntrypoint: () => isDockerfileEntrypoint,
32318
32319
  parsePyModuleAttrEntrypoint: () => parsePyModuleAttrEntrypoint2,
32320
+ parsePythonScheduleModule: () => parsePythonScheduleModule,
32319
32321
  stripTrailingSlash: () => stripTrailingSlash
32320
32322
  });
32321
32323
  module22.exports = __toCommonJS22(entrypoint_exports);
32322
32324
  var import_path22 = require("path");
32323
32325
  var import_constants2 = require_constants3();
32324
32326
  var PYTHON_MODULE_ATTR_RE = /^([A-Za-z_][\w]*(?:\.[A-Za-z_][\w]*)*):([A-Za-z_][\w]*)$/;
32327
+ var PYTHON_MODULE_RE = /^[A-Za-z_]\w*(?:\.[A-Za-z_]\w*)*$/;
32328
+ var SOURCE_FILE_RE = /\.(?:py|[cm]?[jt]s)$/;
32329
+ var NODE_SOURCE_FILE_RE = /\.(?:m?js|[cm]?ts)$/;
32330
+ var DOCKERFILE_NAME_RE = /^(docker|container)file(\..+)?$/i;
32325
32331
  function parsePyModuleAttrEntrypoint2(entrypoint) {
32326
32332
  const match = PYTHON_MODULE_ATTR_RE.exec(entrypoint);
32327
32333
  if (!match)
@@ -32335,6 +32341,23 @@ var require_detect_builders = __commonJS({
32335
32341
  moduleName: modulePart
32336
32342
  };
32337
32343
  }
32344
+ function parsePythonScheduleModule(entrypoint) {
32345
+ if (!PYTHON_MODULE_RE.test(entrypoint) || SOURCE_FILE_RE.test(entrypoint)) {
32346
+ return null;
32347
+ }
32348
+ const path6 = entrypoint.replace(/\./g, "/");
32349
+ return {
32350
+ moduleName: entrypoint,
32351
+ sourceFiles: [`${path6}/__init__.py`, `${path6}.py`]
32352
+ };
32353
+ }
32354
+ function getScheduleEntrypointRuntime(entrypoint) {
32355
+ if (NODE_SOURCE_FILE_RE.test(entrypoint))
32356
+ return "node";
32357
+ if (DOCKERFILE_NAME_RE.test(entrypoint))
32358
+ return void 0;
32359
+ return parsePythonScheduleModule(entrypoint) ? "python" : void 0;
32360
+ }
32338
32361
  var CONTAINER_ENTRYPOINT_BASENAMES = new Set(
32339
32362
  import_constants2.CONTAINER_ENTRYPOINT_CANDIDATES.map((name) => name.toLowerCase())
32340
32363
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vercel/static-build",
3
- "version": "28.0.0",
3
+ "version": "28.0.1-snapshot-92f4d50bf3fb",
4
4
  "license": "Apache-2.0",
5
5
  "main": "./dist/index",
6
6
  "homepage": "https://vercel.com/docs/build-step",
@@ -14,12 +14,12 @@
14
14
  },
15
15
  "dependencies": {
16
16
  "ts-morph": "12.0.0",
17
- "@vercel/gatsby-plugin-vercel-builder": "2.2.86",
18
17
  "@vercel/gatsby-plugin-vercel-analytics": "1.0.12",
19
- "@vercel/static-config": "3.4.4"
18
+ "@vercel/static-config": "3.4.4",
19
+ "@vercel/gatsby-plugin-vercel-builder": "2.2.87-snapshot-92f4d50bf3fb"
20
20
  },
21
21
  "peerDependencies": {
22
- "@vercel/build-utils": "15.4.0"
22
+ "@vercel/build-utils": "15.4.1-snapshot-92f4d50bf3fb"
23
23
  },
24
24
  "devDependencies": {
25
25
  "@types/aws-lambda": "8.10.64",
@@ -40,11 +40,11 @@
40
40
  "semver": "7.5.2",
41
41
  "tree-kill": "1.2.2",
42
42
  "vitest": "4.1.10",
43
- "@vercel/build-utils": "15.4.0",
43
+ "@vercel/build-utils": "15.4.1-snapshot-92f4d50bf3fb",
44
44
  "@vercel/error-utils": "2.2.1",
45
45
  "@vercel/frameworks": "3.35.0",
46
- "@vercel/routing-utils": "6.6.1",
47
- "@vercel/fs-detectors": "7.12.1"
46
+ "@vercel/fs-detectors": "7.12.2-snapshot-92f4d50bf3fb",
47
+ "@vercel/routing-utils": "6.6.1"
48
48
  },
49
49
  "scripts": {
50
50
  "build": "node ../../utils/build-builder.mjs",