@vercel/python 4.1.0 → 4.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.
Files changed (2) hide show
  1. package/dist/index.js +8 -7
  2. 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
@@ -3075,19 +3075,20 @@ var build = async ({
3075
3075
  const entrypointWithSuffix = `${entrypoint}${suffix}`;
3076
3076
  (0, import_build_utils3.debug)("Entrypoint with suffix is", entrypointWithSuffix);
3077
3077
  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
3078
  const globOptions = {
3081
3079
  cwd: workPath,
3082
3080
  ignore: config && typeof config.excludeFiles === "string" ? config.excludeFiles : "node_modules/**"
3083
3081
  };
3084
- const lambda = await (0, import_build_utils3.createLambda)({
3085
- files: await (0, import_build_utils3.glob)("**", globOptions),
3082
+ const files = await (0, import_build_utils3.glob)("**", globOptions);
3083
+ const handlerPyFilename = "vc__handler__python";
3084
+ files[`${handlerPyFilename}.py`] = new import_build_utils3.FileBlob({ data: handlerPyContents });
3085
+ const output = new import_build_utils3.Lambda({
3086
+ files,
3086
3087
  handler: `${handlerPyFilename}.vc_handler`,
3087
3088
  runtime: pythonVersion.runtime,
3088
3089
  environment: {}
3089
3090
  });
3090
- return { output: lambda };
3091
+ return { output };
3091
3092
  };
3092
3093
  // Annotate the CommonJS export names for ESM import in node:
3093
3094
  0 && (module.exports = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vercel/python",
3
- "version": "4.1.0",
3
+ "version": "4.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",
@@ -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.2.2",
22
+ "@vercel/build-utils": "7.5.1",
23
23
  "execa": "^1.0.0",
24
24
  "fs-extra": "11.1.1",
25
25
  "jest-junit": "16.0.0",