create-alpine-app
Advanced tools
Comparing version 0.0.3 to 0.0.4
#! /usr/bin/env node | ||
console.log("Hello, World!"); | ||
const {execSync} = require('child_process'); | ||
const runCommand = command => { | ||
try { | ||
execSync (`${command}`, {stdio: 'inherit'}); | ||
} catch (e) { | ||
console.error (`Failed to execute ${command}`, e); | ||
return false; | ||
} | ||
return true; | ||
} | ||
const repoName = process.argv[2]; | ||
const gitCheckoutCommand = `git clone --depth 1 https://github.com/thedevdojo/create-alpine-app ${repoName}`; | ||
const installDepsCommand = `cd ${repoName} && npm install`; | ||
console. log(`Cloning the repository with name ${repoName}`); | ||
const checkedOut = runCommand (gitCheckoutCommand); | ||
if(!checkedOut) process.exit(1); | ||
console.log("Congratulations! You are ready. Follow the following commands to start"); | ||
console.log(`cd ${repoName} && npm run dev`); |
{ | ||
"name": "create-alpine-app", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"bin": { | ||
@@ -5,0 +5,0 @@ "create-alpine-app": "bin/index.js" |
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
6536
40
1