create-l3-app
Advanced tools
Comparing version 1.0.0 to 1.0.1
59
bin.js
#!/usr/bin/env Node | ||
console.log('test'); | ||
const readline = require('readline'); | ||
const { spawn } = require('child_process'); | ||
const rl = readline.createInterface({ | ||
input: process.stdin, | ||
output: process.stdout | ||
}); | ||
function getProjectName() { | ||
return new Promise(resolve => { | ||
rl.question('Project name: ', name => { | ||
resolve(name); | ||
}); | ||
}); | ||
} | ||
function getWebPort() { | ||
return new Promise(resolve => { | ||
rl.question('Web server port: ', port => { | ||
resolve(+port); | ||
}); | ||
}); | ||
} | ||
function getAPIPort() { | ||
return new Promise(resolve => { | ||
rl.question('API server port: ', port => { | ||
resolve(+port); | ||
}); | ||
}); | ||
} | ||
function createProject(projectName) { | ||
return new Promise(resolve => { | ||
const process = spawn('bun', ['create', 'lukeb06/create-l3-app', projectName]); | ||
process.stdout.on('data', data => { | ||
console.log(data.toString()); | ||
}); | ||
process.stderr.on('data', data => { | ||
console.log(data.toString()); | ||
}); | ||
process.on('close', code => { | ||
resolve(code); | ||
}); | ||
}); | ||
} | ||
async function main() { | ||
const projectName = await getProjectName(); | ||
const webPort = await getWebPort(); | ||
const apiPort = await getAPIPort(); | ||
await createProject(projectName); | ||
} | ||
{ | ||
"name": "create-l3-app", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"bin": { | ||
@@ -5,0 +5,0 @@ "create-l3-app": "bin.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
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
1439
48