vercel-cli 47.1.3__py3-none-any.whl → 48.0.0__py3-none-any.whl

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.

Potentially problematic release.


This version of vercel-cli might be problematic. Click here for more details.

@@ -15,9 +15,9 @@
15
15
  "license": "Apache-2.0"
16
16
  },
17
17
  "node_modules/@vercel/python": {
18
- "version": "5.0.2",
19
- "resolved": "https://registry.npmjs.org/@vercel/python/-/python-5.0.2.tgz",
20
- "integrity": "sha512-r0AambeWu7DcPukIZZnBRIC5SSCkTKWfiAQESgfqdbCYVAVbYjjpCmZ83qBIlNAQbCMV4TRHgOLaVAUHhKppdQ==",
18
+ "version": "5.0.4",
19
+ "resolved": "https://registry.npmjs.org/@vercel/python/-/python-5.0.4.tgz",
20
+ "integrity": "sha512-QtwyRRjW3SB5K8QvXn4yI78gQusmdLXCwWa2kXdMwx53eln5UCuVCXrNpA3TASLIgbVQ6i7VFcVwdyFKt3qKcg==",
21
21
  "license": "Apache-2.0"
22
22
  }
23
23
  }
@@ -2967,6 +2967,23 @@ function isInstalled2({ pipPath, pythonPath }) {
2967
2967
  // src/index.ts
2968
2968
  var readFile = (0, import_util.promisify)(import_fs.default.readFile);
2969
2969
  var writeFile = (0, import_util.promisify)(import_fs.default.writeFile);
2970
+ var fastapiEntrypointFilenames = ["app", "index", "server", "main"];
2971
+ var fastapiEntrypointDirs = ["", "src", "app"];
2972
+ var fastapiContentRegex = /(from\s+fastapi\s+import\s+FastAPI|import\s+fastapi|FastAPI\s*\()/;
2973
+ var fastapiCandidateEntrypoints = fastapiEntrypointFilenames.flatMap(
2974
+ (filename) => fastapiEntrypointDirs.map((dir) => import_path2.posix.join(dir, `${filename}.py`))
2975
+ );
2976
+ function isFastapiEntrypoint(file) {
2977
+ try {
2978
+ const fsPath = file.fsPath;
2979
+ if (!fsPath)
2980
+ return false;
2981
+ const contents = import_fs.default.readFileSync(fsPath, "utf8");
2982
+ return fastapiContentRegex.test(contents);
2983
+ } catch {
2984
+ return false;
2985
+ }
2986
+ }
2970
2987
  async function pipenvConvert(cmd, srcDir, env) {
2971
2988
  (0, import_build_utils3.debug)("Running pipfile2req...");
2972
2989
  try {
@@ -3023,6 +3040,32 @@ var build = async ({
3023
3040
  throw err;
3024
3041
  }
3025
3042
  let fsFiles = await (0, import_build_utils3.glob)("**", workPath);
3043
+ if (!fsFiles[entrypoint]) {
3044
+ let discovered;
3045
+ if (config?.framework === "fastapi") {
3046
+ const entrypointCandidates = fastapiCandidateEntrypoints.filter(
3047
+ (c) => !!fsFiles[c]
3048
+ );
3049
+ if (entrypointCandidates.length) {
3050
+ const fastapiEntrypoint = entrypointCandidates.find(
3051
+ (c) => isFastapiEntrypoint(fsFiles[c])
3052
+ );
3053
+ discovered = fastapiEntrypoint || entrypointCandidates[0];
3054
+ }
3055
+ }
3056
+ if (discovered) {
3057
+ (0, import_build_utils3.debug)(
3058
+ `Resolved Python entrypoint to "${discovered}" (configured "${entrypoint}" not found).`
3059
+ );
3060
+ entrypoint = discovered;
3061
+ } else if (config?.framework === "fastapi") {
3062
+ const searchedList = fastapiCandidateEntrypoints.join(", ");
3063
+ throw new import_build_utils3.NowBuildError({
3064
+ code: "FASTAPI_ENTRYPOINT_NOT_FOUND",
3065
+ message: `No FastAPI entrypoint found. Searched for: ${searchedList}`
3066
+ });
3067
+ }
3068
+ }
3026
3069
  const entryDirectory = (0, import_path2.dirname)(entrypoint);
3027
3070
  const hasReqLocal = !!fsFiles[(0, import_path2.join)(entryDirectory, "requirements.txt")];
3028
3071
  const hasReqGlobal = !!fsFiles["requirements.txt"];
@@ -3083,7 +3126,6 @@ var build = async ({
3083
3126
  const vendorBaseDir = (0, import_path2.join)(
3084
3127
  workPath,
3085
3128
  ".vercel",
3086
- "cache",
3087
3129
  "python",
3088
3130
  `py${pythonVersion.version}`,
3089
3131
  entryDirectory
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vercel/python",
3
- "version": "5.0.2",
3
+ "version": "5.0.4",
4
4
  "main": "./dist/index.js",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://vercel.com/docs/runtimes#official-runtimes/python",
@@ -6,7 +6,7 @@
6
6
  "dependencies": {
7
7
  "@vercel/build-utils": "12.1.0",
8
8
  "@vercel/detect-agent": "0.2.0",
9
- "@vercel/python": "5.0.2"
9
+ "@vercel/python": "5.0.4"
10
10
  },
11
11
  "description": "The command-line interface for Vercel",
12
12
  "engines": {
@@ -37,5 +37,5 @@
37
37
  "vitest-run": "vitest --config ./vitest.config.mts",
38
38
  "vitest-unit": "jest test/unit/ --listTests"
39
39
  },
40
- "version": "47.1.3"
40
+ "version": "48.0.0"
41
41
  }
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: vercel-cli
3
- Version: 47.1.3
3
+ Version: 48.0.0
4
4
  Summary: Vercel CLI packaged for Python (bundled Node.js, vendored npm)
5
5
  Project-URL: Homepage, https://github.com/nuage-studio/vercel-cli-python
6
6
  Project-URL: Repository, https://github.com/nuage-studio/vercel-cli-python
@@ -1,12 +1,12 @@
1
1
  vercel_cli/vendor/LICENSE,sha256=sHDXe_ssUqHdaZbeDOX2TEmgylXIibFjqWPd9csAHuI,11343
2
2
  vercel_cli/vendor/README.md,sha256=2ZrJzd7x21xlpsOZ9QKG6478zbXb8-3YN8cPyzPxZNk,1799
3
- vercel_cli/vendor/package.json,sha256=9OIeFAAhgYxoGC-Eq6qPixwVJ2QshhAdh4-9yKPWjUk,1261
3
+ vercel_cli/vendor/package.json,sha256=a-Vv7n3HMuusPQ_6CLj8Goe95aGcUJcPheEXCn4li0I,1261
4
4
  vercel_cli/vendor/dist/VERCEL_DIR_README.txt,sha256=9dHtD1AyrhKJMfRkWbX6oa9jGfwt-z56X-VKhL-T29Y,520
5
5
  vercel_cli/vendor/dist/builder-worker.js,sha256=RgutTXJcurRisV2NtlruuPDtCBOi8eHSGCo3n4GcCIM,1969
6
6
  vercel_cli/vendor/dist/get-latest-worker.js,sha256=w7nK8nQtlYad_SKuFQGw_sg7_bb-p0uHOf1MYiwrUNs,7964
7
- vercel_cli/vendor/dist/index.js,sha256=UTBLbdGVK1s6BSNCNMi2XHMY7HadjgJ4onZ0kCeuXsQ,8858608
7
+ vercel_cli/vendor/dist/index.js,sha256=_ZYekg_694nd8xIvmFc-_QpSuo7Mv8FcJ0v3ITKD8Qs,8858217
8
8
  vercel_cli/vendor/dist/vc.js,sha256=AAC4u6uwjpO0KfFVuLRs5YWXjW4aMCkgSj_45hR3W8k,340
9
- vercel_cli/vendor/node_modules/.package-lock.json,sha256=9tUpGhTRwkOo09_ATkj7uJZKvRJrWopFduNwKY__NDA,1002
9
+ vercel_cli/vendor/node_modules/.package-lock.json,sha256=gfpJC3qtwTs1Lur0Dgt3ptrO4UwbX6YkqzhrKQgjY6o,1002
10
10
  vercel_cli/vendor/node_modules/@vercel/build-utils/CHANGELOG.md,sha256=ji-V7NgIUH1Fj-lmUh0LmIxhS6bq_0TW7xFH0e9yiF8,18051
11
11
  vercel_cli/vendor/node_modules/@vercel/build-utils/LICENSE,sha256=sHDXe_ssUqHdaZbeDOX2TEmgylXIibFjqWPd9csAHuI,11343
12
12
  vercel_cli/vendor/node_modules/@vercel/build-utils/build.mjs,sha256=UCAJgPaur_bxtLTnQxSkBwoq246SSCBvI-0w_PvbAVU,132
@@ -94,10 +94,10 @@ vercel_cli/vendor/node_modules/@vercel/detect-agent/package.json,sha256=Mt64aqQb
94
94
  vercel_cli/vendor/node_modules/@vercel/detect-agent/dist/index.d.ts,sha256=vmuS3wT5-mth54kB1N8ue-58SV_K6vMlaaZr3YPY30k,67
95
95
  vercel_cli/vendor/node_modules/@vercel/detect-agent/dist/index.js,sha256=WfZXin2E4GP1hNp0-jz3-XhHgFrbyp-wmGo-Mw0q3js,1973
96
96
  vercel_cli/vendor/node_modules/@vercel/python/LICENSE,sha256=sHDXe_ssUqHdaZbeDOX2TEmgylXIibFjqWPd9csAHuI,11343
97
- vercel_cli/vendor/node_modules/@vercel/python/package.json,sha256=e1jZpYxSi3Z3F7xHSHNoew33kVwjX8rBPry1jUwRfyo,1044
97
+ vercel_cli/vendor/node_modules/@vercel/python/package.json,sha256=7FIHqqKqng5jeEOZWZP516OdmJTyS4OM-r5Mhb8mSCo,1044
98
98
  vercel_cli/vendor/node_modules/@vercel/python/vc_init.py,sha256=A7949hQi18B9yqPkTr1bepToi7nKRh_yRP7GwmsI-Ww,28201
99
- vercel_cli/vendor/node_modules/@vercel/python/dist/index.js,sha256=8BleRWXE3Gba5VQiVpjfd65LyvWQMISClOq5CdShaxM,105445
100
- vercel_cli-47.1.3.dist-info/METADATA,sha256=UUA_FWYfkRvLwUsZmVqKyo0Bmw553WmPj9q6aKh9WhQ,7085
101
- vercel_cli-47.1.3.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
102
- vercel_cli-47.1.3.dist-info/entry_points.txt,sha256=3iHkg20gi2BZorK1g5UlyZY3tN5E1vJX6PX5-ibn9fI,83
103
- vercel_cli-47.1.3.dist-info/RECORD,,
99
+ vercel_cli/vendor/node_modules/@vercel/python/dist/index.js,sha256=G5daDqyPBQM_vPQGZC-OrHdYt3aKOuVUwvPKqeETjSU,107035
100
+ vercel_cli-48.0.0.dist-info/METADATA,sha256=aqnouXP4pEN2VLGAqKsiUIVT_HJDH08C9f3-Yd3V3x4,7085
101
+ vercel_cli-48.0.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
102
+ vercel_cli-48.0.0.dist-info/entry_points.txt,sha256=3iHkg20gi2BZorK1g5UlyZY3tN5E1vJX6PX5-ibn9fI,83
103
+ vercel_cli-48.0.0.dist-info/RECORD,,