amplify-python-function-runtime-provider
Advanced tools
Comparing version 1.2.1-alpha.11 to 1.2.1-alpha.13
@@ -12,3 +12,3 @@ "use strict"; | ||
if (!params.lastBuildTimestamp || isBuildStale(params.srcRoot, params.lastBuildTimestamp)) { | ||
const pipenvLogs = await pyUtils_1.execAsStringPromise('pipenv install', { cwd: params.srcRoot }, undefined, true); | ||
const pipenvLogs = await pyUtils_1.execAsStringPromise('pipenv install', { cwd: params.srcRoot }); | ||
console.log(pipenvLogs); | ||
@@ -15,0 +15,0 @@ return Promise.resolve({ rebuilt: true }); |
@@ -5,3 +5,3 @@ /// <reference types="node" /> | ||
export declare function majMinPyVersion(pyVersion: string): string; | ||
export declare function execAsStringPromise(command: string, opts?: ExecOptions, errorMessage?: string, outputOnStderr?: boolean): Promise<string>; | ||
export declare function execAsStringPromise(command: string, opts?: ExecOptions): Promise<string>; | ||
//# sourceMappingURL=pyUtils.d.ts.map |
@@ -9,4 +9,3 @@ "use strict"; | ||
const fs_extra_1 = __importDefault(require("fs-extra")); | ||
const util_1 = require("util"); | ||
const child_process_1 = require("child_process"); | ||
const execa_1 = __importDefault(require("execa")); | ||
async function getPipenvDir(srcRoot) { | ||
@@ -36,13 +35,11 @@ const pipEnvDir = await execAsStringPromise('pipenv --venv', { cwd: srcRoot }); | ||
exports.majMinPyVersion = majMinPyVersion; | ||
async function execAsStringPromise(command, opts, errorMessage, outputOnStderr = false) { | ||
const { stdout, stderr } = await util_1.promisify(child_process_1.exec)(command, opts); | ||
if (outputOnStderr) { | ||
return stderr.toString('utf8').trim(); | ||
async function execAsStringPromise(command, opts) { | ||
try { | ||
return (await execa_1.default.command(command, opts)).stdout; | ||
} | ||
if (stderr) { | ||
throw new Error(errorMessage || `Received error [${stderr.toString('utf8').trim()}] running command [${command}]`); | ||
catch (err) { | ||
throw new Error(`Recieved error [${err}] running command [${command}]`); | ||
} | ||
return stdout.toString('utf8').trim(); | ||
} | ||
exports.execAsStringPromise = execAsStringPromise; | ||
//# sourceMappingURL=pyUtils.js.map |
{ | ||
"name": "amplify-python-function-runtime-provider", | ||
"version": "1.2.1-alpha.11+f31057051", | ||
"version": "1.2.1-alpha.13+56771d91e", | ||
"description": "Provides functionality related to functions in Python on AWS", | ||
@@ -24,3 +24,3 @@ "repository": { | ||
"dependencies": { | ||
"amplify-function-plugin-interface": "1.4.1-alpha.11+f31057051", | ||
"amplify-function-plugin-interface": "1.4.1-alpha.13+56771d91e", | ||
"archiver": "^3.1.1", | ||
@@ -36,3 +36,3 @@ "execa": "^4.0.0", | ||
}, | ||
"gitHead": "f31057051375dcd9e04ffdc85947131eba7bc1c7" | ||
"gitHead": "56771d91eeed76a23a1dbf1e0d1d038070c37ad1" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
1
34486
235