New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

fast-code-cli

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fast-code-cli - npm Package Compare versions

Comparing version
1.0.5
to
1.0.6
+43
-1
bin/create.js

@@ -1,1 +0,43 @@

console.log("sssssssssssss")
#!/usr/bin/env node
const fs = require('fs');
const path = require('path');
const inquirer = require('inquirer'); // 假设使用inquirer进行交互式输入
const { exec } = require('child_process');
// 示例:询问用户项目名称
inquirer.prompt([
{
type: 'input',
name: 'projectName',
message: '请输入项目名称:',
},
]).then(answers => {
const projectName = answers.projectName;
// 创建项目目录并初始化
if (!fs.existsSync(projectName)) {
fs.mkdirSync(projectName);
process.chdir(projectName);
exec(`npm init -y`, (error, stdout, stderr) => {
if (error) {
console.error(`执行出错: ${error}`);
return;
}
console.log(stdout);
});
// 根据需要复制模板文件或执行其他初始化操作
// ...
console.log(`项目 "${projectName}" 创建成功!`);
} else {
console.error(`项目名称 "${projectName}" 已存在,请选择其他名称。`);
}
}).catch(error => {
if (error.isTtyError) {
// Prompt couldn't be rendered in the current environment
} else {
// Something else went wrong
}
});
+4
-2
{
"name": "fast-code-cli",
"version": "1.0.5",
"version": "1.0.6",
"description": "",

@@ -16,4 +16,6 @@ "main": "index.js",

"dependencies": {
"commander": "^12.0.0"
"child_process": "^1.0.2",
"commander": "^12.0.0",
"inquirer": "^9.2.22"
}
}