Comparing version 1.0.22 to 1.0.23
@@ -1,27 +0,44 @@ | ||
// my-npx-tool.js | ||
#!/usr/bin/env node | ||
const { exec } = require('child_process'); | ||
const inquirer = require('inquirer'); | ||
const { promisify } = require('util'); | ||
const download = promisify(require('download-git-repo')); | ||
inquirer.prompt([ | ||
{ | ||
type: 'input', | ||
name: 'repoUrl', | ||
message: 'Enter the URL of your Git repository:', | ||
}, | ||
{ | ||
type: 'input', | ||
name: 'projectName', | ||
message: 'Enter the name of your project:', | ||
}, | ||
]) | ||
.then(({ repoUrl, projectName }) => { | ||
// Clone the repository | ||
exec(`git clone ${repoUrl} ${projectName}`, (error, stdout, stderr) => { | ||
if (error) { | ||
console.error(`Error cloning repository: ${error}`); | ||
return; | ||
} | ||
console.log(stdout); | ||
console.error(stderr); | ||
async function downloadBoilerplate(destination) { | ||
const repoUrl = 'https://github.com/rupomsoft/MERN-Ecommerce'; | ||
try { | ||
console.log('Downloading boilerplate...'); | ||
await download(repoUrl, destination); | ||
console.log('Boilerplate downloaded successfully.'); | ||
} catch (error) { | ||
console.error('Error downloading boilerplate:', error); | ||
} | ||
} | ||
console.log('Repository cloned successfully!'); | ||
// Parse command-line arguments | ||
const args = process.argv.slice(2); | ||
// Run additional commands or setup if necessary | ||
// For example: | ||
// exec(`cd ${projectName} && npm install`, (error, stdout, stderr) => { | ||
// if (error) { | ||
// console.error(`Error installing dependencies: ${error}`); | ||
// return; | ||
// } | ||
// console.log(stdout); | ||
// console.error(stderr); | ||
// Check if destination is provided | ||
if (args[0]) { | ||
const destination = args[0]; | ||
downloadBoilerplate(destination); | ||
} else { | ||
console.error('Please provide a destination.'); | ||
} | ||
// console.log('Dependencies installed successfully!'); | ||
// }); | ||
}); | ||
}); | ||
{ | ||
"name": "mern-x", | ||
"version": "1.0.22", | ||
"version": "1.0.23", | ||
"description": "MERN-X is a comprehensive full-stack framework designed to streamline the development of web applications using the popular MERN stack: MongoDB, Express.js, React, and Node.js. Built with simplicity and scalability in mind, MERN.js empowers developers to create robust and efficient applications from end to end.", | ||
@@ -12,3 +12,6 @@ "scripts": { | ||
"dependencies": { | ||
"download-git-repo": "^3.0.2" | ||
"axios": "^1.6.7", | ||
"download-git-repo": "^3.0.2", | ||
"inquirer": "^9.2.14", | ||
"simple-git": "^3.22.0" | ||
}, | ||
@@ -15,0 +18,0 @@ "bin": { |
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
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
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
9081
38
4
1
+ Addedaxios@^1.6.7
+ Addedinquirer@^9.2.14
+ Addedsimple-git@^3.22.0
+ Added@inquirer/figures@1.0.8(transitive)
+ Added@kwsites/file-exists@1.1.1(transitive)
+ Added@kwsites/promise-deferred@1.1.1(transitive)
+ Addedansi-escapes@4.3.2(transitive)
+ Addedansi-regex@5.0.1(transitive)
+ Addedansi-styles@4.3.0(transitive)
+ Addedasynckit@0.4.0(transitive)
+ Addedaxios@1.7.8(transitive)
+ Addedbl@4.1.0(transitive)
+ Addedchalk@4.1.2(transitive)
+ Addedchardet@0.7.0(transitive)
+ Addedcli-cursor@3.1.0(transitive)
+ Addedcli-spinners@2.9.2(transitive)
+ Addedcli-width@4.1.0(transitive)
+ Addedclone@1.0.4(transitive)
+ Addedcolor-convert@2.0.1(transitive)
+ Addedcolor-name@1.1.4(transitive)
+ Addedcombined-stream@1.0.8(transitive)
+ Addeddebug@4.3.7(transitive)
+ Addeddefaults@1.0.4(transitive)
+ Addeddelayed-stream@1.0.0(transitive)
+ Addedemoji-regex@8.0.0(transitive)
+ Addedexternal-editor@3.1.0(transitive)
+ Addedfollow-redirects@1.15.9(transitive)
+ Addedform-data@4.0.1(transitive)
+ Addedhas-flag@4.0.0(transitive)
+ Addediconv-lite@0.4.24(transitive)
+ Addedinquirer@9.3.7(transitive)
+ Addedis-fullwidth-code-point@3.0.0(transitive)
+ Addedis-interactive@1.0.0(transitive)
+ Addedis-unicode-supported@0.1.0(transitive)
+ Addedlog-symbols@4.1.0(transitive)
+ Addedmime-db@1.52.0(transitive)
+ Addedmime-types@2.1.35(transitive)
+ Addedmimic-fn@2.1.0(transitive)
+ Addedms@2.1.3(transitive)
+ Addedmute-stream@1.0.0(transitive)
+ Addedonetime@5.1.2(transitive)
+ Addedora@5.4.1(transitive)
+ Addedos-tmpdir@1.0.2(transitive)
+ Addedproxy-from-env@1.1.0(transitive)
+ Addedreadable-stream@3.6.2(transitive)
+ Addedrestore-cursor@3.1.0(transitive)
+ Addedrun-async@3.0.0(transitive)
+ Addedrxjs@7.8.1(transitive)
+ Addedsafer-buffer@2.1.2(transitive)
+ Addedsignal-exit@3.0.7(transitive)
+ Addedsimple-git@3.27.0(transitive)
+ Addedstring-width@4.2.3(transitive)
+ Addedstring_decoder@1.3.0(transitive)
+ Addedstrip-ansi@6.0.1(transitive)
+ Addedsupports-color@7.2.0(transitive)
+ Addedtmp@0.0.33(transitive)
+ Addedtslib@2.8.1(transitive)
+ Addedtype-fest@0.21.3(transitive)
+ Addedwcwidth@1.0.1(transitive)
+ Addedwrap-ansi@6.2.0(transitive)
+ Addedyoctocolors-cjs@2.1.2(transitive)