@vercel/python 13.0.1 → 13.0.3
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.
- package/dist/index.js +8 -3
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -6669,6 +6669,10 @@ var RUNTIME_DEPS_DIR = "/tmp/_vc_deps";
|
|
|
6669
6669
|
var MAX_LARGE_FUNCTION_UNCOMPRESSED_SIZE = 5 * 1024 * 1024 * 1024;
|
|
6670
6670
|
var LARGE_FUNCTION_FILL_CEILING_BYTES = MAX_LARGE_FUNCTION_UNCOMPRESSED_SIZE - BYTECODE_FILL_MARGIN_BYTES;
|
|
6671
6671
|
var BUNDLING_DOCS_LINK = "https://vercel.com/docs/functions/runtimes/python#controlling-what-gets-bundled";
|
|
6672
|
+
function runtimeInstallDisabledByFlag() {
|
|
6673
|
+
const flag = process.env.VERCEL_PYTHON_DISABLE_RUNTIME_INSTALL?.toLowerCase();
|
|
6674
|
+
return flag === "1" || flag === "true";
|
|
6675
|
+
}
|
|
6672
6676
|
var PythonDependencyExternalizer = class {
|
|
6673
6677
|
constructor(options) {
|
|
6674
6678
|
this.allVendorFiles = {};
|
|
@@ -6682,10 +6686,11 @@ var PythonDependencyExternalizer = class {
|
|
|
6682
6686
|
this.projectName = options.projectName;
|
|
6683
6687
|
this.pythonVersion = options.pythonVersion;
|
|
6684
6688
|
this.hasCustomCommand = options.hasCustomCommand;
|
|
6689
|
+
this.runtimeInstallDisabled = runtimeInstallDisabledByFlag();
|
|
6685
6690
|
this.alwaysBundlePackages = options.alwaysBundlePackages ?? [];
|
|
6686
6691
|
}
|
|
6687
6692
|
shouldEnableRuntimeInstall() {
|
|
6688
|
-
if (this.hasCustomCommand) {
|
|
6693
|
+
if (this.hasCustomCommand || this.runtimeInstallDisabled) {
|
|
6689
6694
|
return false;
|
|
6690
6695
|
}
|
|
6691
6696
|
if (this.totalBundleSize <= LAMBDA_SIZE_THRESHOLD_BYTES || this.uvLockPath === null) {
|
|
@@ -6719,7 +6724,7 @@ var PythonDependencyExternalizer = class {
|
|
|
6719
6724
|
totalSizeBytes: this.totalBundleSize,
|
|
6720
6725
|
runtimeInstallEnabled
|
|
6721
6726
|
});
|
|
6722
|
-
if (this.totalBundleSize > LAMBDA_SIZE_THRESHOLD_BYTES && this.hasCustomCommand && !largeFunctionsEnabled) {
|
|
6727
|
+
if (this.totalBundleSize > LAMBDA_SIZE_THRESHOLD_BYTES && this.hasCustomCommand && !largeFunctionsEnabled && !this.runtimeInstallDisabled) {
|
|
6723
6728
|
const limitMB = (LAMBDA_SIZE_THRESHOLD_BYTES / (1024 * 1024)).toFixed(0);
|
|
6724
6729
|
throw new import_build_utils7.NowBuildError({
|
|
6725
6730
|
code: "LAMBDA_SIZE_EXCEEDED",
|
|
@@ -6734,7 +6739,7 @@ function bundle size automatically. To fix this, you can:
|
|
|
6734
6739
|
action: "Learn More"
|
|
6735
6740
|
});
|
|
6736
6741
|
}
|
|
6737
|
-
if (largeFunctionsEnabled && this.totalBundleSize >= MAX_LARGE_FUNCTION_UNCOMPRESSED_SIZE) {
|
|
6742
|
+
if ((largeFunctionsEnabled || this.runtimeInstallDisabled) && this.totalBundleSize >= MAX_LARGE_FUNCTION_UNCOMPRESSED_SIZE) {
|
|
6738
6743
|
const limitMB = (MAX_LARGE_FUNCTION_UNCOMPRESSED_SIZE / (1024 * 1024)).toFixed(0);
|
|
6739
6744
|
throw new import_build_utils7.NowBuildError({
|
|
6740
6745
|
code: "LAMBDA_SIZE_EXCEEDED",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vercel/python",
|
|
3
|
-
"version": "13.0.
|
|
3
|
+
"version": "13.0.3",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"homepage": "https://vercel.com/docs/runtimes#official-runtimes/python",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"@vercel/python-analysis": "0.14.0"
|
|
18
18
|
},
|
|
19
19
|
"peerDependencies": {
|
|
20
|
-
"@vercel/build-utils": "14.9.
|
|
20
|
+
"@vercel/build-utils": "14.9.3"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
23
|
"@renovatebot/pep440": "4.2.1",
|
|
@@ -38,9 +38,9 @@
|
|
|
38
38
|
"smol-toml": "1.5.2",
|
|
39
39
|
"vitest": "4.1.10",
|
|
40
40
|
"which": "3.0.0",
|
|
41
|
-
"@vercel/build-utils": "14.9.
|
|
42
|
-
"@vercel/
|
|
43
|
-
"@vercel/
|
|
41
|
+
"@vercel/build-utils": "14.9.3",
|
|
42
|
+
"@vercel/python-runtime": "0.22.1",
|
|
43
|
+
"@vercel/error-utils": "2.2.1"
|
|
44
44
|
},
|
|
45
45
|
"scripts": {
|
|
46
46
|
"build": "node ../../utils/build-builder.mjs",
|