@vercel/python 6.43.0 → 6.43.2
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 +22 -4
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -3231,7 +3231,7 @@ var import_fs13 = __toESM(require("fs"));
|
|
|
3231
3231
|
var import_path13 = require("path");
|
|
3232
3232
|
|
|
3233
3233
|
// src/package-versions.ts
|
|
3234
|
-
var VERCEL_RUNTIME_VERSION = "0.14.
|
|
3234
|
+
var VERCEL_RUNTIME_VERSION = "0.14.1";
|
|
3235
3235
|
var VERCEL_WORKERS_VERSION = "0.0.24";
|
|
3236
3236
|
|
|
3237
3237
|
// src/index.ts
|
|
@@ -4461,6 +4461,23 @@ var import_path6 = require("path");
|
|
|
4461
4461
|
var import_build_utils6 = require("@vercel/build-utils");
|
|
4462
4462
|
var import_python_analysis3 = require("@vercel/python-analysis");
|
|
4463
4463
|
var readFile = (0, import_util.promisify)(import_fs5.default.readFile);
|
|
4464
|
+
var STRIP_BASENAMES = /* @__PURE__ */ new Set([
|
|
4465
|
+
"py.typed",
|
|
4466
|
+
"WHEEL",
|
|
4467
|
+
"INSTALLER",
|
|
4468
|
+
"direct_url.json"
|
|
4469
|
+
]);
|
|
4470
|
+
function shouldStripVendorFile(filePath) {
|
|
4471
|
+
const segments = filePath.split(import_path6.sep);
|
|
4472
|
+
if (segments.includes("__pycache__"))
|
|
4473
|
+
return true;
|
|
4474
|
+
const name = segments[segments.length - 1] ?? "";
|
|
4475
|
+
if (name.endsWith(".pyc") || name.endsWith(".pyi"))
|
|
4476
|
+
return true;
|
|
4477
|
+
if (STRIP_BASENAMES.has(name))
|
|
4478
|
+
return true;
|
|
4479
|
+
return false;
|
|
4480
|
+
}
|
|
4464
4481
|
var LAMBDA_SIZE_THRESHOLD_BYTES = 245 * 1024 * 1024;
|
|
4465
4482
|
var LAMBDA_EPHEMERAL_STORAGE_BYTES = 500 * 1024 * 1024;
|
|
4466
4483
|
var HIVE_LAMBDA_SIZE_BYTES = 1 * 1024 * 1024 * 1024;
|
|
@@ -4931,7 +4948,7 @@ splitting your application.`,
|
|
|
4931
4948
|
if (!(0, import_path6.resolve)(resolvedDir, filePath).startsWith(dirPrefix)) {
|
|
4932
4949
|
continue;
|
|
4933
4950
|
}
|
|
4934
|
-
if (
|
|
4951
|
+
if (shouldStripVendorFile(filePath)) {
|
|
4935
4952
|
continue;
|
|
4936
4953
|
}
|
|
4937
4954
|
const srcFsPath = (0, import_path6.join)(dir, filePath);
|
|
@@ -5000,7 +5017,7 @@ splitting your application.`,
|
|
|
5000
5017
|
if (!(0, import_path6.resolve)(resolvedDir, filePath).startsWith(dirPrefix)) {
|
|
5001
5018
|
continue;
|
|
5002
5019
|
}
|
|
5003
|
-
if (
|
|
5020
|
+
if (shouldStripVendorFile(filePath)) {
|
|
5004
5021
|
continue;
|
|
5005
5022
|
}
|
|
5006
5023
|
if (recordSize !== void 0 && recordSize !== null) {
|
|
@@ -5694,7 +5711,7 @@ async function detectPythonEntrypoint(framework, workPath, configuredEntrypoint,
|
|
|
5694
5711
|
}
|
|
5695
5712
|
let varName = configEntryVar ?? await checkEntrypoint(workPath, entrypoint);
|
|
5696
5713
|
if (!varName) {
|
|
5697
|
-
const needsDynamicApp = !!service && ((0, import_build_utils8.isScheduleTriggeredService)(service) || (0, import_build_utils8.isQueueTriggeredService)(service));
|
|
5714
|
+
const needsDynamicApp = !!service && ((0, import_build_utils8.isScheduleTriggeredService)(service) || (0, import_build_utils8.isQueueTriggeredService)(service) || (0, import_build_utils8.isWorkflowTriggeredService)(service));
|
|
5698
5715
|
if (needsDynamicApp) {
|
|
5699
5716
|
varName = "app";
|
|
5700
5717
|
}
|
|
@@ -7768,6 +7785,7 @@ from vercel_runtime.vc_init import vc_handler
|
|
|
7768
7785
|
];
|
|
7769
7786
|
const lambdaEnv = {};
|
|
7770
7787
|
lambdaEnv.PYTHONPATH = vendorDir;
|
|
7788
|
+
lambdaEnv.PYTHONDONTWRITEBYTECODE = "1";
|
|
7771
7789
|
Object.assign(lambdaEnv, quirksResult.env);
|
|
7772
7790
|
if (shouldInstallVercelWorkers) {
|
|
7773
7791
|
lambdaEnv.VERCEL_HAS_WORKER_SERVICES = "1";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vercel/python",
|
|
3
|
-
"version": "6.43.
|
|
3
|
+
"version": "6.43.2",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"homepage": "https://vercel.com/docs/runtimes#official-runtimes/python",
|
|
@@ -34,9 +34,9 @@
|
|
|
34
34
|
"smol-toml": "1.5.2",
|
|
35
35
|
"vitest": "2.1.4",
|
|
36
36
|
"which": "3.0.0",
|
|
37
|
-
"@vercel/build-utils": "13.26.
|
|
38
|
-
"@vercel/
|
|
39
|
-
"@vercel/
|
|
37
|
+
"@vercel/build-utils": "13.26.2",
|
|
38
|
+
"@vercel/error-utils": "2.1.0",
|
|
39
|
+
"@vercel/python-runtime": "0.14.1"
|
|
40
40
|
},
|
|
41
41
|
"scripts": {
|
|
42
42
|
"build": "node ../../utils/build-builder.mjs",
|