Comparing version 2.3.1 to 2.3.2
@@ -16,10 +16,6 @@ import cp from 'node:child_process'; | ||
/** | ||
* fetch all commands | ||
*/ | ||
const commands = await findAllCommand(); | ||
/** | ||
* run new Runme CLI (experimental) | ||
*/ | ||
export async function runme2() { | ||
const spawnOpts = { stdio: 'inherit', shell: true, env: process.env }; | ||
const commands = await findAllCommand(); | ||
const params = process.argv.slice(2); | ||
@@ -43,3 +39,3 @@ const flags = params.filter((p) => p.startsWith('-')); | ||
} | ||
function runById(id, commands) { | ||
async function runById(id, commands) { | ||
const [file] = commands.find(([, cmdId]) => cmdId === id) || []; | ||
@@ -49,4 +45,10 @@ if (!file) { | ||
} | ||
return run(file, id); | ||
console.log(`🏃 Run "${id}" from ${file.replace(process.cwd(), '')}`); | ||
const result = await run(file, id); | ||
const resultMessage = result.exitCode === 0 | ||
? `✅ Command "${id}" succeeded!\n` | ||
: `🚨 Failed: "${result.stdout || result.stderr || `Program failed with exit code ${result.exitCode}`}"\n`; | ||
console.log(resultMessage); | ||
return result; | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2xpLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL2NsaS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQXlCLE1BQU0sb0JBQW9CLENBQUE7QUFFMUQsT0FBTyxFQUFFLGNBQWMsRUFBRSxNQUFNLFlBQVksQ0FBQTtBQUMzQyxPQUFPLEVBQUUsR0FBRyxFQUFFLE1BQU0sWUFBWSxDQUFBO0FBQ2hDLE9BQU8sRUFBRSxRQUFRLEVBQUUsTUFBTSxnQkFBZ0IsQ0FBQTtBQUV6QyxNQUFNLFlBQVksR0FBRyxDQUFDLFlBQVksRUFBRSxLQUFLLEVBQUUsTUFBTSxFQUFFLE1BQU0sRUFBRSxPQUFPLEVBQUUsS0FBSyxFQUFFLEtBQUssQ0FBQyxDQUFBO0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TtJQUNyRSxNQUFNLE1BQU0sR0FBRyxNQUFNLEdBQUcsQ0FBQyxJQUFJLEVBQUUsRUFBRSxDQUFDLENBQUE7SUFDbEMsTUFBTSxhQUFhLEdBQUcsTUFBTSxDQUFDLFFBQVEsS0FBSyxDQUFDO1FBQ3pDLENBQUMsQ0FBQyxjQUFjLEVBQUUsZ0JBQWdCO1FBQ2xDLENBQUMsQ0FBQyxlQUFlLE1BQU0sQ0FBQyxNQUFNLElBQUksTUFBTSxDQUFDLE1BQU0sSUFBSSxpQ0FBaUMsTUFBTSxDQUFDLFFBQVEsRUFBRSxLQUFLLENBQUE7SUFDNUcsT0FBTyxDQUFDLEdBQUcsQ0FBQyxhQUFhLENBQUMsQ0FBQTtJQUUxQixPQUFPLE1BQU0sQ0FBQTtBQUNmLENBQUMifQ== |
{ | ||
"name": "runme", | ||
"version": "2.3.1", | ||
"version": "2.3.2", | ||
"author": "Christian Bromann <christian@stateful.com>", | ||
@@ -5,0 +5,0 @@ "license": "Apache-2.0", |
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
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
52597
465
5