vercel-cli 47.0.5__py3-none-any.whl → 47.1.3__py3-none-any.whl
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.
Potentially problematic release.
This version of vercel-cli might be problematic. Click here for more details.
- vercel_cli/vendor/dist/index.js +769 -586
- vercel_cli/vendor/node_modules/.package-lock.json +3 -3
- vercel_cli/vendor/node_modules/@vercel/python/dist/index.js +120 -54
- vercel_cli/vendor/node_modules/@vercel/python/package.json +2 -2
- vercel_cli/vendor/node_modules/@vercel/python/vc_init.py +26 -2
- vercel_cli/vendor/package.json +2 -2
- {vercel_cli-47.0.5.dist-info → vercel_cli-47.1.3.dist-info}/METADATA +1 -1
- {vercel_cli-47.0.5.dist-info → vercel_cli-47.1.3.dist-info}/RECORD +10 -10
- {vercel_cli-47.0.5.dist-info → vercel_cli-47.1.3.dist-info}/WHEEL +0 -0
- {vercel_cli-47.0.5.dist-info → vercel_cli-47.1.3.dist-info}/entry_points.txt +0 -0
|
@@ -15,9 +15,9 @@
|
|
|
15
15
|
"license": "Apache-2.0"
|
|
16
16
|
},
|
|
17
17
|
"node_modules/@vercel/python": {
|
|
18
|
-
"version": "5.0.
|
|
19
|
-
"resolved": "https://registry.npmjs.org/@vercel/python/-/python-5.0.
|
|
20
|
-
"integrity": "sha512-
|
|
18
|
+
"version": "5.0.2",
|
|
19
|
+
"resolved": "https://registry.npmjs.org/@vercel/python/-/python-5.0.2.tgz",
|
|
20
|
+
"integrity": "sha512-r0AambeWu7DcPukIZZnBRIC5SSCkTKWfiAQESgfqdbCYVAVbYjjpCmZ83qBIlNAQbCMV4TRHgOLaVAUHhKppdQ==",
|
|
21
21
|
"license": "Apache-2.0"
|
|
22
22
|
}
|
|
23
23
|
}
|
|
@@ -2651,7 +2651,7 @@ ${stderr}${stdout}`;
|
|
|
2651
2651
|
var require_lib = __commonJS({
|
|
2652
2652
|
"../../node_modules/.pnpm/which@3.0.0/node_modules/which/lib/index.js"(exports, module2) {
|
|
2653
2653
|
var isexe = require_isexe();
|
|
2654
|
-
var { join:
|
|
2654
|
+
var { join: join3, delimiter, sep, posix } = require("path");
|
|
2655
2655
|
var isWindows = process.platform === "win32";
|
|
2656
2656
|
var rSlash = new RegExp(`[${posix.sep}${sep === posix.sep ? "" : sep}]`.replace(/(\\)/g, "\\$1"));
|
|
2657
2657
|
var rRel = new RegExp(`^\\.${rSlash.source}`);
|
|
@@ -2680,7 +2680,7 @@ var require_lib = __commonJS({
|
|
|
2680
2680
|
var getPathPart = (raw, cmd) => {
|
|
2681
2681
|
const pathPart = /^".*"$/.test(raw) ? raw.slice(1, -1) : raw;
|
|
2682
2682
|
const prefix = !pathPart && rRel.test(cmd) ? cmd.slice(0, 2) : "";
|
|
2683
|
-
return prefix +
|
|
2683
|
+
return prefix + join3(pathPart, cmd);
|
|
2684
2684
|
};
|
|
2685
2685
|
var which2 = async (cmd, opt = {}) => {
|
|
2686
2686
|
const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt);
|
|
@@ -2749,11 +2749,12 @@ module.exports = __toCommonJS(src_exports);
|
|
|
2749
2749
|
var import_fs = __toESM(require("fs"));
|
|
2750
2750
|
var import_execa2 = __toESM(require_execa());
|
|
2751
2751
|
var import_util = require("util");
|
|
2752
|
-
var
|
|
2752
|
+
var import_path2 = require("path");
|
|
2753
2753
|
var import_build_utils3 = require("@vercel/build-utils");
|
|
2754
2754
|
|
|
2755
2755
|
// src/install.ts
|
|
2756
2756
|
var import_execa = __toESM(require_execa());
|
|
2757
|
+
var import_path = require("path");
|
|
2757
2758
|
var import_build_utils = require("@vercel/build-utils");
|
|
2758
2759
|
var makeDependencyCheckCode = (dependency) => `
|
|
2759
2760
|
from importlib import util
|
|
@@ -2768,7 +2769,8 @@ async function isInstalled(pythonPath, dependency, cwd) {
|
|
|
2768
2769
|
["-c", makeDependencyCheckCode(dependency)],
|
|
2769
2770
|
{
|
|
2770
2771
|
stdio: "pipe",
|
|
2771
|
-
cwd
|
|
2772
|
+
cwd,
|
|
2773
|
+
env: { ...process.env, PYTHONPATH: (0, import_path.join)(cwd, resolveVendorDir()) }
|
|
2772
2774
|
}
|
|
2773
2775
|
);
|
|
2774
2776
|
return stdout.startsWith(cwd);
|
|
@@ -2790,7 +2792,8 @@ async function areRequirementsInstalled(pythonPath, requirementsPath, cwd) {
|
|
|
2790
2792
|
["-c", makeRequirementsCheckCode(requirementsPath)],
|
|
2791
2793
|
{
|
|
2792
2794
|
stdio: "pipe",
|
|
2793
|
-
cwd
|
|
2795
|
+
cwd,
|
|
2796
|
+
env: { ...process.env, PYTHONPATH: (0, import_path.join)(cwd, resolveVendorDir()) }
|
|
2794
2797
|
}
|
|
2795
2798
|
);
|
|
2796
2799
|
return true;
|
|
@@ -2798,12 +2801,18 @@ async function areRequirementsInstalled(pythonPath, requirementsPath, cwd) {
|
|
|
2798
2801
|
return false;
|
|
2799
2802
|
}
|
|
2800
2803
|
}
|
|
2804
|
+
function resolveVendorDir() {
|
|
2805
|
+
const vendorDir = process.env.VERCEL_PYTHON_VENDOR_DIR || "_vendor";
|
|
2806
|
+
return vendorDir;
|
|
2807
|
+
}
|
|
2801
2808
|
async function pipInstall(pipPath, workPath, args) {
|
|
2802
|
-
const target =
|
|
2809
|
+
const target = resolveVendorDir();
|
|
2803
2810
|
process.env.PIP_USER = "0";
|
|
2804
2811
|
const cmdArgs = [
|
|
2805
2812
|
"install",
|
|
2806
2813
|
"--disable-pip-version-check",
|
|
2814
|
+
"--no-compile",
|
|
2815
|
+
"--no-cache-dir",
|
|
2807
2816
|
"--target",
|
|
2808
2817
|
target,
|
|
2809
2818
|
...args
|
|
@@ -2958,14 +2967,15 @@ function isInstalled2({ pipPath, pythonPath }) {
|
|
|
2958
2967
|
// src/index.ts
|
|
2959
2968
|
var readFile = (0, import_util.promisify)(import_fs.default.readFile);
|
|
2960
2969
|
var writeFile = (0, import_util.promisify)(import_fs.default.writeFile);
|
|
2961
|
-
async function pipenvConvert(cmd, srcDir) {
|
|
2970
|
+
async function pipenvConvert(cmd, srcDir, env) {
|
|
2962
2971
|
(0, import_build_utils3.debug)("Running pipfile2req...");
|
|
2963
2972
|
try {
|
|
2964
2973
|
const out = await import_execa2.default.stdout(cmd, [], {
|
|
2965
|
-
cwd: srcDir
|
|
2974
|
+
cwd: srcDir,
|
|
2975
|
+
env
|
|
2966
2976
|
});
|
|
2967
2977
|
(0, import_build_utils3.debug)("Contents of requirements.txt is: " + out);
|
|
2968
|
-
import_fs.default.writeFileSync((0,
|
|
2978
|
+
import_fs.default.writeFileSync((0, import_path2.join)(srcDir, "requirements.txt"), out);
|
|
2969
2979
|
} catch (err) {
|
|
2970
2980
|
console.log('Failed to run "pipfile2req"');
|
|
2971
2981
|
throw err;
|
|
@@ -2981,8 +2991,8 @@ async function downloadFilesInWorkPath({
|
|
|
2981
2991
|
(0, import_build_utils3.debug)("Downloading user files...");
|
|
2982
2992
|
let downloadedFiles = await (0, import_build_utils3.download)(files, workPath, meta);
|
|
2983
2993
|
if (meta.isDev) {
|
|
2984
|
-
const { devCacheDir = (0,
|
|
2985
|
-
const destCache = (0,
|
|
2994
|
+
const { devCacheDir = (0, import_path2.join)(workPath, ".now", "cache") } = meta;
|
|
2995
|
+
const destCache = (0, import_path2.join)(devCacheDir, (0, import_path2.basename)(entrypoint, ".py"));
|
|
2986
2996
|
await (0, import_build_utils3.download)(downloadedFiles, destCache);
|
|
2987
2997
|
downloadedFiles = await (0, import_build_utils3.glob)("**", destCache);
|
|
2988
2998
|
workPath = destCache;
|
|
@@ -3005,57 +3015,94 @@ var build = async ({
|
|
|
3005
3015
|
});
|
|
3006
3016
|
try {
|
|
3007
3017
|
if (meta.isDev) {
|
|
3008
|
-
const setupCfg = (0,
|
|
3018
|
+
const setupCfg = (0, import_path2.join)(workPath, "setup.cfg");
|
|
3009
3019
|
await writeFile(setupCfg, "[install]\nprefix=\n");
|
|
3010
3020
|
}
|
|
3011
3021
|
} catch (err) {
|
|
3012
3022
|
console.log('Failed to create "setup.cfg" file');
|
|
3013
3023
|
throw err;
|
|
3014
3024
|
}
|
|
3025
|
+
let fsFiles = await (0, import_build_utils3.glob)("**", workPath);
|
|
3026
|
+
const entryDirectory = (0, import_path2.dirname)(entrypoint);
|
|
3027
|
+
const hasReqLocal = !!fsFiles[(0, import_path2.join)(entryDirectory, "requirements.txt")];
|
|
3028
|
+
const hasReqGlobal = !!fsFiles["requirements.txt"];
|
|
3029
|
+
const pipfileLockDir = fsFiles[(0, import_path2.join)(entryDirectory, "Pipfile.lock")] ? (0, import_path2.join)(workPath, entryDirectory) : fsFiles["Pipfile.lock"] ? workPath : null;
|
|
3030
|
+
const pipfileDir = fsFiles[(0, import_path2.join)(entryDirectory, "Pipfile")] ? (0, import_path2.join)(workPath, entryDirectory) : fsFiles["Pipfile"] ? workPath : null;
|
|
3031
|
+
if (!hasReqLocal && !hasReqGlobal && (pipfileLockDir || pipfileDir)) {
|
|
3032
|
+
if (pipfileLockDir) {
|
|
3033
|
+
(0, import_build_utils3.debug)('Found "Pipfile.lock"');
|
|
3034
|
+
} else {
|
|
3035
|
+
(0, import_build_utils3.debug)('Found "Pipfile"');
|
|
3036
|
+
}
|
|
3037
|
+
if (pipfileLockDir) {
|
|
3038
|
+
let lock = {};
|
|
3039
|
+
try {
|
|
3040
|
+
const json = await readFile(
|
|
3041
|
+
(0, import_path2.join)(pipfileLockDir, "Pipfile.lock"),
|
|
3042
|
+
"utf8"
|
|
3043
|
+
);
|
|
3044
|
+
lock = JSON.parse(json);
|
|
3045
|
+
} catch (err) {
|
|
3046
|
+
throw new import_build_utils3.NowBuildError({
|
|
3047
|
+
code: "INVALID_PIPFILE_LOCK",
|
|
3048
|
+
message: "Unable to parse Pipfile.lock"
|
|
3049
|
+
});
|
|
3050
|
+
}
|
|
3051
|
+
pythonVersion = getSupportedPythonVersion({
|
|
3052
|
+
isDev: meta.isDev,
|
|
3053
|
+
pipLockPythonVersion: lock?._meta?.requires?.python_version
|
|
3054
|
+
});
|
|
3055
|
+
}
|
|
3056
|
+
if (!hasReqLocal && !hasReqGlobal) {
|
|
3057
|
+
const tempDir = await (0, import_build_utils3.getWriteableDirectory)();
|
|
3058
|
+
await installRequirement({
|
|
3059
|
+
pythonPath: pythonVersion.pythonPath,
|
|
3060
|
+
pipPath: pythonVersion.pipPath,
|
|
3061
|
+
dependency: "pipfile-requirements",
|
|
3062
|
+
version: "0.3.0",
|
|
3063
|
+
workPath: tempDir,
|
|
3064
|
+
meta,
|
|
3065
|
+
args: ["--no-warn-script-location"]
|
|
3066
|
+
});
|
|
3067
|
+
const tempVendorDir = (0, import_path2.join)(tempDir, resolveVendorDir());
|
|
3068
|
+
const envForConvert = { ...process.env, PYTHONPATH: tempVendorDir };
|
|
3069
|
+
const convertCmd = process.platform === "win32" ? (0, import_path2.join)(tempVendorDir, "Scripts", "pipfile2req.exe") : (0, import_path2.join)(tempVendorDir, "bin", "pipfile2req");
|
|
3070
|
+
await pipenvConvert(
|
|
3071
|
+
convertCmd,
|
|
3072
|
+
pipfileLockDir || pipfileDir,
|
|
3073
|
+
envForConvert
|
|
3074
|
+
);
|
|
3075
|
+
} else {
|
|
3076
|
+
(0, import_build_utils3.debug)(
|
|
3077
|
+
'Skipping Pipfile.lock conversion because "requirements.txt" exists'
|
|
3078
|
+
);
|
|
3079
|
+
}
|
|
3080
|
+
}
|
|
3081
|
+
fsFiles = await (0, import_build_utils3.glob)("**", workPath);
|
|
3082
|
+
const requirementsTxt = (0, import_path2.join)(entryDirectory, "requirements.txt");
|
|
3083
|
+
const vendorBaseDir = (0, import_path2.join)(
|
|
3084
|
+
workPath,
|
|
3085
|
+
".vercel",
|
|
3086
|
+
"cache",
|
|
3087
|
+
"python",
|
|
3088
|
+
`py${pythonVersion.version}`,
|
|
3089
|
+
entryDirectory
|
|
3090
|
+
);
|
|
3091
|
+
try {
|
|
3092
|
+
await import_fs.default.promises.mkdir(vendorBaseDir, { recursive: true });
|
|
3093
|
+
} catch (err) {
|
|
3094
|
+
console.log("Failed to create vendor cache directory");
|
|
3095
|
+
throw err;
|
|
3096
|
+
}
|
|
3015
3097
|
console.log("Installing required dependencies...");
|
|
3016
3098
|
await installRequirement({
|
|
3017
3099
|
pythonPath: pythonVersion.pythonPath,
|
|
3018
3100
|
pipPath: pythonVersion.pipPath,
|
|
3019
3101
|
dependency: "werkzeug",
|
|
3020
3102
|
version: "1.0.1",
|
|
3021
|
-
workPath,
|
|
3103
|
+
workPath: vendorBaseDir,
|
|
3022
3104
|
meta
|
|
3023
3105
|
});
|
|
3024
|
-
let fsFiles = await (0, import_build_utils3.glob)("**", workPath);
|
|
3025
|
-
const entryDirectory = (0, import_path.dirname)(entrypoint);
|
|
3026
|
-
const pipfileLockDir = fsFiles[(0, import_path.join)(entryDirectory, "Pipfile.lock")] ? (0, import_path.join)(workPath, entryDirectory) : fsFiles["Pipfile.lock"] ? workPath : null;
|
|
3027
|
-
if (pipfileLockDir) {
|
|
3028
|
-
(0, import_build_utils3.debug)('Found "Pipfile.lock"');
|
|
3029
|
-
let lock = {};
|
|
3030
|
-
try {
|
|
3031
|
-
const json = await readFile((0, import_path.join)(pipfileLockDir, "Pipfile.lock"), "utf8");
|
|
3032
|
-
lock = JSON.parse(json);
|
|
3033
|
-
} catch (err) {
|
|
3034
|
-
throw new import_build_utils3.NowBuildError({
|
|
3035
|
-
code: "INVALID_PIPFILE_LOCK",
|
|
3036
|
-
message: "Unable to parse Pipfile.lock"
|
|
3037
|
-
});
|
|
3038
|
-
}
|
|
3039
|
-
pythonVersion = getSupportedPythonVersion({
|
|
3040
|
-
isDev: meta.isDev,
|
|
3041
|
-
pipLockPythonVersion: lock?._meta?.requires?.python_version
|
|
3042
|
-
});
|
|
3043
|
-
const tempDir = await (0, import_build_utils3.getWriteableDirectory)();
|
|
3044
|
-
await installRequirement({
|
|
3045
|
-
pythonPath: pythonVersion.pythonPath,
|
|
3046
|
-
pipPath: pythonVersion.pipPath,
|
|
3047
|
-
dependency: "pipfile-requirements",
|
|
3048
|
-
version: "0.3.0",
|
|
3049
|
-
workPath: tempDir,
|
|
3050
|
-
meta,
|
|
3051
|
-
args: ["--no-warn-script-location"]
|
|
3052
|
-
});
|
|
3053
|
-
process.env.PYTHONPATH = tempDir;
|
|
3054
|
-
const convertCmd = (0, import_path.join)(tempDir, "bin", "pipfile2req");
|
|
3055
|
-
await pipenvConvert(convertCmd, pipfileLockDir);
|
|
3056
|
-
}
|
|
3057
|
-
fsFiles = await (0, import_build_utils3.glob)("**", workPath);
|
|
3058
|
-
const requirementsTxt = (0, import_path.join)(entryDirectory, "requirements.txt");
|
|
3059
3106
|
if (fsFiles[requirementsTxt]) {
|
|
3060
3107
|
(0, import_build_utils3.debug)('Found local "requirements.txt"');
|
|
3061
3108
|
const requirementsTxtPath = fsFiles[requirementsTxt].fsPath;
|
|
@@ -3063,7 +3110,7 @@ var build = async ({
|
|
|
3063
3110
|
pythonPath: pythonVersion.pythonPath,
|
|
3064
3111
|
pipPath: pythonVersion.pipPath,
|
|
3065
3112
|
filePath: requirementsTxtPath,
|
|
3066
|
-
workPath,
|
|
3113
|
+
workPath: vendorBaseDir,
|
|
3067
3114
|
meta
|
|
3068
3115
|
});
|
|
3069
3116
|
} else if (fsFiles["requirements.txt"]) {
|
|
@@ -3073,31 +3120,50 @@ var build = async ({
|
|
|
3073
3120
|
pythonPath: pythonVersion.pythonPath,
|
|
3074
3121
|
pipPath: pythonVersion.pipPath,
|
|
3075
3122
|
filePath: requirementsTxtPath,
|
|
3076
|
-
workPath,
|
|
3123
|
+
workPath: vendorBaseDir,
|
|
3077
3124
|
meta
|
|
3078
3125
|
});
|
|
3079
3126
|
}
|
|
3080
|
-
const originalPyPath = (0,
|
|
3127
|
+
const originalPyPath = (0, import_path2.join)(__dirname, "..", "vc_init.py");
|
|
3081
3128
|
const originalHandlerPyContents = await readFile(originalPyPath, "utf8");
|
|
3082
3129
|
(0, import_build_utils3.debug)("Entrypoint is", entrypoint);
|
|
3083
3130
|
const moduleName = entrypoint.replace(/\//g, ".").replace(/\.py$/, "");
|
|
3131
|
+
const vendorDir = resolveVendorDir();
|
|
3084
3132
|
const suffix = meta.isDev && !entrypoint.endsWith(".py") ? ".py" : "";
|
|
3085
3133
|
const entrypointWithSuffix = `${entrypoint}${suffix}`;
|
|
3086
3134
|
(0, import_build_utils3.debug)("Entrypoint with suffix is", entrypointWithSuffix);
|
|
3087
|
-
const handlerPyContents = originalHandlerPyContents.replace(/__VC_HANDLER_MODULE_NAME/g, moduleName).replace(/__VC_HANDLER_ENTRYPOINT/g, entrypointWithSuffix);
|
|
3135
|
+
const handlerPyContents = originalHandlerPyContents.replace(/__VC_HANDLER_MODULE_NAME/g, moduleName).replace(/__VC_HANDLER_ENTRYPOINT/g, entrypointWithSuffix).replace(/__VC_HANDLER_VENDOR_DIR/g, vendorDir);
|
|
3088
3136
|
const predefinedExcludes = [
|
|
3089
3137
|
".git/**",
|
|
3138
|
+
".gitignore",
|
|
3090
3139
|
".vercel/**",
|
|
3091
3140
|
".pnpm-store/**",
|
|
3092
3141
|
"**/node_modules/**",
|
|
3093
3142
|
"**/.next/**",
|
|
3094
|
-
"**/.nuxt/**"
|
|
3143
|
+
"**/.nuxt/**",
|
|
3144
|
+
"**/.venv/**",
|
|
3145
|
+
"**/venv/**",
|
|
3146
|
+
"**/__pycache__/**"
|
|
3095
3147
|
];
|
|
3148
|
+
const lambdaEnv = {};
|
|
3149
|
+
lambdaEnv.PYTHONPATH = vendorDir;
|
|
3096
3150
|
const globOptions = {
|
|
3097
3151
|
cwd: workPath,
|
|
3098
3152
|
ignore: config && typeof config.excludeFiles === "string" ? [...predefinedExcludes, config.excludeFiles] : predefinedExcludes
|
|
3099
3153
|
};
|
|
3100
3154
|
const files = await (0, import_build_utils3.glob)("**", globOptions);
|
|
3155
|
+
try {
|
|
3156
|
+
const cachedVendorAbs = (0, import_path2.join)(vendorBaseDir, resolveVendorDir());
|
|
3157
|
+
if (import_fs.default.existsSync(cachedVendorAbs)) {
|
|
3158
|
+
const vendorFiles = await (0, import_build_utils3.glob)("**", cachedVendorAbs, resolveVendorDir());
|
|
3159
|
+
for (const [p, f] of Object.entries(vendorFiles)) {
|
|
3160
|
+
files[p] = f;
|
|
3161
|
+
}
|
|
3162
|
+
}
|
|
3163
|
+
} catch (err) {
|
|
3164
|
+
console.log("Failed to include cached vendor directory");
|
|
3165
|
+
throw err;
|
|
3166
|
+
}
|
|
3101
3167
|
const handlerPyFilename = "vc__handler__python";
|
|
3102
3168
|
files[`${handlerPyFilename}.py`] = new import_build_utils3.FileBlob({ data: handlerPyContents });
|
|
3103
3169
|
if (config.framework === "fasthtml") {
|
|
@@ -3108,7 +3174,7 @@ var build = async ({
|
|
|
3108
3174
|
files,
|
|
3109
3175
|
handler: `${handlerPyFilename}.vc_handler`,
|
|
3110
3176
|
runtime: pythonVersion.runtime,
|
|
3111
|
-
environment:
|
|
3177
|
+
environment: lambdaEnv,
|
|
3112
3178
|
supportsResponseStreaming: true
|
|
3113
3179
|
});
|
|
3114
3180
|
return { output };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vercel/python",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.2",
|
|
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": "
|
|
22
|
+
"@vercel/build-utils": "12.1.0",
|
|
23
23
|
"cross-env": "7.0.3",
|
|
24
24
|
"execa": "^1.0.0",
|
|
25
25
|
"fs-extra": "11.1.1",
|
|
@@ -1,14 +1,38 @@
|
|
|
1
1
|
import sys
|
|
2
|
+
import os
|
|
3
|
+
import site
|
|
4
|
+
import importlib
|
|
2
5
|
import base64
|
|
3
6
|
import json
|
|
4
7
|
import inspect
|
|
5
8
|
from importlib import util
|
|
6
9
|
from http.server import BaseHTTPRequestHandler
|
|
7
10
|
import socket
|
|
8
|
-
|
|
11
|
+
|
|
12
|
+
_here = os.path.dirname(__file__)
|
|
13
|
+
_vendor_rel = '__VC_HANDLER_VENDOR_DIR'
|
|
14
|
+
_vendor = os.path.normpath(os.path.join(_here, _vendor_rel))
|
|
15
|
+
|
|
16
|
+
if os.path.isdir(_vendor):
|
|
17
|
+
# Process .pth files like a real site-packages dir
|
|
18
|
+
site.addsitedir(_vendor)
|
|
19
|
+
|
|
20
|
+
# Move _vendor to the front (after script dir if present)
|
|
21
|
+
try:
|
|
22
|
+
while _vendor in sys.path:
|
|
23
|
+
sys.path.remove(_vendor)
|
|
24
|
+
except ValueError:
|
|
25
|
+
pass
|
|
26
|
+
|
|
27
|
+
# Put vendored deps ahead of site-packages but after the script dir
|
|
28
|
+
idx = 1 if (sys.path and sys.path[0] in ('', _here)) else 0
|
|
29
|
+
sys.path.insert(idx, _vendor)
|
|
30
|
+
|
|
31
|
+
importlib.invalidate_caches()
|
|
9
32
|
|
|
10
33
|
# Import relative path https://docs.python.org/3/library/importlib.html#importing-a-source-file-directly
|
|
11
|
-
|
|
34
|
+
user_mod_path = os.path.join(_here, "__VC_HANDLER_ENTRYPOINT") # absolute
|
|
35
|
+
__vc_spec = util.spec_from_file_location("__VC_HANDLER_MODULE_NAME", user_mod_path)
|
|
12
36
|
__vc_module = util.module_from_spec(__vc_spec)
|
|
13
37
|
sys.modules["__VC_HANDLER_MODULE_NAME"] = __vc_module
|
|
14
38
|
__vc_spec.loader.exec_module(__vc_module)
|
vercel_cli/vendor/package.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"dependencies": {
|
|
7
7
|
"@vercel/build-utils": "12.1.0",
|
|
8
8
|
"@vercel/detect-agent": "0.2.0",
|
|
9
|
-
"@vercel/python": "5.0.
|
|
9
|
+
"@vercel/python": "5.0.2"
|
|
10
10
|
},
|
|
11
11
|
"description": "The command-line interface for Vercel",
|
|
12
12
|
"engines": {
|
|
@@ -37,5 +37,5 @@
|
|
|
37
37
|
"vitest-run": "vitest --config ./vitest.config.mts",
|
|
38
38
|
"vitest-unit": "jest test/unit/ --listTests"
|
|
39
39
|
},
|
|
40
|
-
"version": "47.
|
|
40
|
+
"version": "47.1.3"
|
|
41
41
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: vercel-cli
|
|
3
|
-
Version: 47.
|
|
3
|
+
Version: 47.1.3
|
|
4
4
|
Summary: Vercel CLI packaged for Python (bundled Node.js, vendored npm)
|
|
5
5
|
Project-URL: Homepage, https://github.com/nuage-studio/vercel-cli-python
|
|
6
6
|
Project-URL: Repository, https://github.com/nuage-studio/vercel-cli-python
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
vercel_cli/vendor/LICENSE,sha256=sHDXe_ssUqHdaZbeDOX2TEmgylXIibFjqWPd9csAHuI,11343
|
|
2
2
|
vercel_cli/vendor/README.md,sha256=2ZrJzd7x21xlpsOZ9QKG6478zbXb8-3YN8cPyzPxZNk,1799
|
|
3
|
-
vercel_cli/vendor/package.json,sha256=
|
|
3
|
+
vercel_cli/vendor/package.json,sha256=9OIeFAAhgYxoGC-Eq6qPixwVJ2QshhAdh4-9yKPWjUk,1261
|
|
4
4
|
vercel_cli/vendor/dist/VERCEL_DIR_README.txt,sha256=9dHtD1AyrhKJMfRkWbX6oa9jGfwt-z56X-VKhL-T29Y,520
|
|
5
5
|
vercel_cli/vendor/dist/builder-worker.js,sha256=RgutTXJcurRisV2NtlruuPDtCBOi8eHSGCo3n4GcCIM,1969
|
|
6
6
|
vercel_cli/vendor/dist/get-latest-worker.js,sha256=w7nK8nQtlYad_SKuFQGw_sg7_bb-p0uHOf1MYiwrUNs,7964
|
|
7
|
-
vercel_cli/vendor/dist/index.js,sha256=
|
|
7
|
+
vercel_cli/vendor/dist/index.js,sha256=UTBLbdGVK1s6BSNCNMi2XHMY7HadjgJ4onZ0kCeuXsQ,8858608
|
|
8
8
|
vercel_cli/vendor/dist/vc.js,sha256=AAC4u6uwjpO0KfFVuLRs5YWXjW4aMCkgSj_45hR3W8k,340
|
|
9
|
-
vercel_cli/vendor/node_modules/.package-lock.json,sha256=
|
|
9
|
+
vercel_cli/vendor/node_modules/.package-lock.json,sha256=9tUpGhTRwkOo09_ATkj7uJZKvRJrWopFduNwKY__NDA,1002
|
|
10
10
|
vercel_cli/vendor/node_modules/@vercel/build-utils/CHANGELOG.md,sha256=ji-V7NgIUH1Fj-lmUh0LmIxhS6bq_0TW7xFH0e9yiF8,18051
|
|
11
11
|
vercel_cli/vendor/node_modules/@vercel/build-utils/LICENSE,sha256=sHDXe_ssUqHdaZbeDOX2TEmgylXIibFjqWPd9csAHuI,11343
|
|
12
12
|
vercel_cli/vendor/node_modules/@vercel/build-utils/build.mjs,sha256=UCAJgPaur_bxtLTnQxSkBwoq246SSCBvI-0w_PvbAVU,132
|
|
@@ -94,10 +94,10 @@ vercel_cli/vendor/node_modules/@vercel/detect-agent/package.json,sha256=Mt64aqQb
|
|
|
94
94
|
vercel_cli/vendor/node_modules/@vercel/detect-agent/dist/index.d.ts,sha256=vmuS3wT5-mth54kB1N8ue-58SV_K6vMlaaZr3YPY30k,67
|
|
95
95
|
vercel_cli/vendor/node_modules/@vercel/detect-agent/dist/index.js,sha256=WfZXin2E4GP1hNp0-jz3-XhHgFrbyp-wmGo-Mw0q3js,1973
|
|
96
96
|
vercel_cli/vendor/node_modules/@vercel/python/LICENSE,sha256=sHDXe_ssUqHdaZbeDOX2TEmgylXIibFjqWPd9csAHuI,11343
|
|
97
|
-
vercel_cli/vendor/node_modules/@vercel/python/package.json,sha256=
|
|
98
|
-
vercel_cli/vendor/node_modules/@vercel/python/vc_init.py,sha256=
|
|
99
|
-
vercel_cli/vendor/node_modules/@vercel/python/dist/index.js,sha256=
|
|
100
|
-
vercel_cli-47.
|
|
101
|
-
vercel_cli-47.
|
|
102
|
-
vercel_cli-47.
|
|
103
|
-
vercel_cli-47.
|
|
97
|
+
vercel_cli/vendor/node_modules/@vercel/python/package.json,sha256=e1jZpYxSi3Z3F7xHSHNoew33kVwjX8rBPry1jUwRfyo,1044
|
|
98
|
+
vercel_cli/vendor/node_modules/@vercel/python/vc_init.py,sha256=A7949hQi18B9yqPkTr1bepToi7nKRh_yRP7GwmsI-Ww,28201
|
|
99
|
+
vercel_cli/vendor/node_modules/@vercel/python/dist/index.js,sha256=8BleRWXE3Gba5VQiVpjfd65LyvWQMISClOq5CdShaxM,105445
|
|
100
|
+
vercel_cli-47.1.3.dist-info/METADATA,sha256=UUA_FWYfkRvLwUsZmVqKyo0Bmw553WmPj9q6aKh9WhQ,7085
|
|
101
|
+
vercel_cli-47.1.3.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
102
|
+
vercel_cli-47.1.3.dist-info/entry_points.txt,sha256=3iHkg20gi2BZorK1g5UlyZY3tN5E1vJX6PX5-ibn9fI,83
|
|
103
|
+
vercel_cli-47.1.3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|