@vercel/python 4.1.0 → 4.2.0
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 +14 -7
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -2742,10 +2742,10 @@ __export(src_exports, {
|
|
|
2742
2742
|
version: () => version
|
|
2743
2743
|
});
|
|
2744
2744
|
module.exports = __toCommonJS(src_exports);
|
|
2745
|
-
var import_path = require("path");
|
|
2746
|
-
var import_execa2 = __toESM(require_execa());
|
|
2747
2745
|
var import_fs = __toESM(require("fs"));
|
|
2746
|
+
var import_execa2 = __toESM(require_execa());
|
|
2748
2747
|
var import_util = require("util");
|
|
2748
|
+
var import_path = require("path");
|
|
2749
2749
|
var import_build_utils3 = require("@vercel/build-utils");
|
|
2750
2750
|
|
|
2751
2751
|
// src/install.ts
|
|
@@ -2852,6 +2852,12 @@ async function installRequirementsFile({
|
|
|
2852
2852
|
var import_build_utils2 = require("@vercel/build-utils");
|
|
2853
2853
|
var import_which = __toESM(require_lib());
|
|
2854
2854
|
var allOptions = [
|
|
2855
|
+
{
|
|
2856
|
+
version: "3.12",
|
|
2857
|
+
pipPath: "pip3.12",
|
|
2858
|
+
pythonPath: "python3.12",
|
|
2859
|
+
runtime: "python3.12"
|
|
2860
|
+
},
|
|
2855
2861
|
{
|
|
2856
2862
|
version: "3.11",
|
|
2857
2863
|
pipPath: "pip3.11",
|
|
@@ -3075,19 +3081,20 @@ var build = async ({
|
|
|
3075
3081
|
const entrypointWithSuffix = `${entrypoint}${suffix}`;
|
|
3076
3082
|
(0, import_build_utils3.debug)("Entrypoint with suffix is", entrypointWithSuffix);
|
|
3077
3083
|
const handlerPyContents = originalHandlerPyContents.replace(/__VC_HANDLER_MODULE_NAME/g, moduleName).replace(/__VC_HANDLER_ENTRYPOINT/g, entrypointWithSuffix);
|
|
3078
|
-
const handlerPyFilename = "vc__handler__python";
|
|
3079
|
-
await writeFile((0, import_path.join)(workPath, `${handlerPyFilename}.py`), handlerPyContents);
|
|
3080
3084
|
const globOptions = {
|
|
3081
3085
|
cwd: workPath,
|
|
3082
3086
|
ignore: config && typeof config.excludeFiles === "string" ? config.excludeFiles : "node_modules/**"
|
|
3083
3087
|
};
|
|
3084
|
-
const
|
|
3085
|
-
|
|
3088
|
+
const files = await (0, import_build_utils3.glob)("**", globOptions);
|
|
3089
|
+
const handlerPyFilename = "vc__handler__python";
|
|
3090
|
+
files[`${handlerPyFilename}.py`] = new import_build_utils3.FileBlob({ data: handlerPyContents });
|
|
3091
|
+
const output = new import_build_utils3.Lambda({
|
|
3092
|
+
files,
|
|
3086
3093
|
handler: `${handlerPyFilename}.vc_handler`,
|
|
3087
3094
|
runtime: pythonVersion.runtime,
|
|
3088
3095
|
environment: {}
|
|
3089
3096
|
});
|
|
3090
|
-
return { output
|
|
3097
|
+
return { output };
|
|
3091
3098
|
};
|
|
3092
3099
|
// Annotate the CommonJS export names for ESM import in node:
|
|
3093
3100
|
0 && (module.exports = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vercel/python",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.2.0",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"homepage": "https://vercel.com/docs/runtimes#official-runtimes/python",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"@types/jest": "27.4.1",
|
|
20
20
|
"@types/node": "14.18.33",
|
|
21
21
|
"@types/which": "3.0.0",
|
|
22
|
-
"@vercel/build-utils": "7.
|
|
22
|
+
"@vercel/build-utils": "7.12.0",
|
|
23
23
|
"execa": "^1.0.0",
|
|
24
24
|
"fs-extra": "11.1.1",
|
|
25
25
|
"jest-junit": "16.0.0",
|