@vercel/python 14.1.0 → 14.1.1
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 +15 -6
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -3328,9 +3328,9 @@ var require_pep440 = __commonJS({
|
|
|
3328
3328
|
var require_lib = __commonJS({
|
|
3329
3329
|
"../../node_modules/.pnpm/which@3.0.0/node_modules/which/lib/index.js"(exports, module2) {
|
|
3330
3330
|
var isexe = require_isexe();
|
|
3331
|
-
var { join: join21, delimiter: delimiter2, sep: sep6, posix } = require("path");
|
|
3331
|
+
var { join: join21, delimiter: delimiter2, sep: sep6, posix: posix4 } = require("path");
|
|
3332
3332
|
var isWindows = process.platform === "win32";
|
|
3333
|
-
var rSlash = new RegExp(`[${
|
|
3333
|
+
var rSlash = new RegExp(`[${posix4.sep}${sep6 === posix4.sep ? "" : sep6}]`.replace(/(\\)/g, "\\$1"));
|
|
3334
3334
|
var rRel = new RegExp(`^\\.${rSlash.source}`);
|
|
3335
3335
|
var getNotFoundError = (cmd) => Object.assign(new Error(`not found: ${cmd}`), { code: "ENOENT" });
|
|
3336
3336
|
var getPathInfo = (cmd, {
|
|
@@ -10864,6 +10864,9 @@ function installGlobalCleanupHandlers() {
|
|
|
10864
10864
|
killAll();
|
|
10865
10865
|
});
|
|
10866
10866
|
}
|
|
10867
|
+
function escapePythonStringContents(value) {
|
|
10868
|
+
return JSON.stringify(value).slice(1, -1);
|
|
10869
|
+
}
|
|
10867
10870
|
function createDevShim(workPath, entry, modulePath, serviceName, framework, variableName) {
|
|
10868
10871
|
try {
|
|
10869
10872
|
const vercelPythonDir = serviceName ? (0, import_path13.join)(workPath, ".vercel", "python", "services", serviceName) : (0, import_path13.join)(workPath, ".vercel", "python");
|
|
@@ -10875,7 +10878,7 @@ function createDevShim(workPath, entry, modulePath, serviceName, framework, vari
|
|
|
10875
10878
|
qualifiedModule = `${pkgName}.${modulePath}`;
|
|
10876
10879
|
extraPythonPath = (0, import_path13.dirname)(workPath);
|
|
10877
10880
|
}
|
|
10878
|
-
const entryAbs =
|
|
10881
|
+
const entryAbs = import_path13.posix.join(workPath.replace(/\\/g, "/"), entry);
|
|
10879
10882
|
const shimPath = (0, import_path13.join)(vercelPythonDir, `${DEV_SHIM_MODULE}.py`);
|
|
10880
10883
|
const templatePath = (0, import_path13.join)(
|
|
10881
10884
|
__dirname,
|
|
@@ -10884,7 +10887,13 @@ function createDevShim(workPath, entry, modulePath, serviceName, framework, vari
|
|
|
10884
10887
|
`${DEV_SHIM_MODULE}.py`
|
|
10885
10888
|
);
|
|
10886
10889
|
const template = (0, import_fs13.readFileSync)(templatePath, "utf8");
|
|
10887
|
-
const shimSource = template.replace(
|
|
10890
|
+
const shimSource = template.replace(
|
|
10891
|
+
/__VC_DEV_MODULE_NAME__/g,
|
|
10892
|
+
escapePythonStringContents(qualifiedModule)
|
|
10893
|
+
).replace(/__VC_DEV_ENTRY_ABS__/g, escapePythonStringContents(entryAbs)).replace(/__VC_DEV_FRAMEWORK__/g, escapePythonStringContents(framework)).replace(
|
|
10894
|
+
/__VC_DEV_VARIABLE_NAME__/g,
|
|
10895
|
+
escapePythonStringContents(variableName)
|
|
10896
|
+
);
|
|
10888
10897
|
(0, import_fs13.writeFileSync)(shimPath, shimSource, "utf8");
|
|
10889
10898
|
(0, import_build_utils15.debug)(`Prepared Python dev shim at ${shimPath}`);
|
|
10890
10899
|
return {
|
|
@@ -11418,7 +11427,7 @@ var litellmQuirk = {
|
|
|
11418
11427
|
if (configName) {
|
|
11419
11428
|
(0, import_build_utils16.debug)(`LiteLLM quirk: found config at ${configName}`);
|
|
11420
11429
|
buildEnv.CONFIG_FILE_PATH = (0, import_path14.join)(ctx.workPath, configName);
|
|
11421
|
-
env.CONFIG_FILE_PATH =
|
|
11430
|
+
env.CONFIG_FILE_PATH = import_path14.posix.join(LAMBDA_ROOT, configName);
|
|
11422
11431
|
}
|
|
11423
11432
|
} else {
|
|
11424
11433
|
(0, import_build_utils16.debug)(
|
|
@@ -11546,7 +11555,7 @@ var prismaQuirk = {
|
|
|
11546
11555
|
async run(ctx) {
|
|
11547
11556
|
const { venvPath, pythonEnv, workPath } = ctx;
|
|
11548
11557
|
const pythonPath = getVenvPythonBin(venvPath);
|
|
11549
|
-
const runtimeCacheDir =
|
|
11558
|
+
const runtimeCacheDir = import_path15.posix.join(
|
|
11550
11559
|
LAMBDA_ROOT2,
|
|
11551
11560
|
resolveVendorDir(),
|
|
11552
11561
|
"prisma",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vercel/python",
|
|
3
|
-
"version": "14.1.
|
|
3
|
+
"version": "14.1.1",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"homepage": "https://vercel.com/docs/runtimes#official-runtimes/python",
|
|
@@ -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.10.1",
|
|
41
42
|
"@vercel/error-utils": "2.2.1",
|
|
42
|
-
"@vercel/python-runtime": "0.23.0"
|
|
43
|
-
"@vercel/build-utils": "14.10.1"
|
|
43
|
+
"@vercel/python-runtime": "0.23.0"
|
|
44
44
|
},
|
|
45
45
|
"scripts": {
|
|
46
46
|
"build": "node ../../utils/build-builder.mjs",
|