2.0
- 使用ora 和 prompts - 拆分结构代码,功能更加独立 - 独立的结构,可以给予其他cli作为脚手架底层使用
This commit is contained in:
parent
f076ad7d6a
commit
08cbf8bec4
14
README.md
14
README.md
@ -1,6 +1,7 @@
|
|||||||
# 🧧 2021 牛年大吉
|
# 🧧 2021 牛年大吉
|
||||||
|
> 提前祝大家 **元宵节快乐!**
|
||||||
|
>
|
||||||
> 🎉祝大家:新年快乐,身体健康。无论身处何地,都要好好生活,给自己积极向上的生活态度哦! **^_^**<br>
|
> 🎉祝大家:新年快乐,身体健康。无论身处何地,都要好好生活,给自己积极向上的生活态度哦! **^_^**<br>
|
||||||
> 🎆疫情并不稳定,大家要注意卫生,记得戴口罩、通风、洗手👐、锻炼身体、按时吃饭、少熬夜哦。
|
|
||||||
|
|
||||||
# KOA-PROGRAM
|
# KOA-PROGRAM
|
||||||
基于koa的脚手架工具。
|
基于koa的脚手架工具。
|
||||||
@ -48,7 +49,11 @@ docker-compose up -d
|
|||||||
|
|
||||||
|
|
||||||
## 版本简述
|
## 版本简述
|
||||||
|
### 2.0.0 **`latest`**
|
||||||
|
- 修复1.0版本中模板生成阶段缺失文件的问题
|
||||||
|
- 重构了结构代码,做了进一步的系统结构调整
|
||||||
|
### 1.1.4
|
||||||
|
- 增加说明文档
|
||||||
### 1.1.3
|
### 1.1.3
|
||||||
- 修复了 `Unix`和`win`下由于目录分界符不一致,造成的目录创建BUG.
|
- 修复了 `Unix`和`win`下由于目录分界符不一致,造成的目录创建BUG.
|
||||||
|
|
||||||
@ -71,7 +76,7 @@ docker-compose up -d
|
|||||||
<br><br><br>
|
<br><br><br>
|
||||||
|
|
||||||
|
|
||||||
## 📢写在后面的话
|
## 📢作者的话
|
||||||
|
|
||||||
开发的初衷,是想对自己的KOA项目做一款简单易用的KOA脚手架工具,
|
开发的初衷,是想对自己的KOA项目做一款简单易用的KOA脚手架工具,
|
||||||
方便在以后可以方便的生成自己的项目目录.
|
方便在以后可以方便的生成自己的项目目录.
|
||||||
@ -86,4 +91,5 @@ docker-compose up -d
|
|||||||
本项目暂时还不太完善,但已可以正常使用.
|
本项目暂时还不太完善,但已可以正常使用.
|
||||||
后期我会继续更新这款脚手架,并继续更新项目模板.
|
后期我会继续更新这款脚手架,并继续更新项目模板.
|
||||||
|
|
||||||
~~ 感谢使用 ~~
|
|
||||||
|
> 🎆疫情并不稳定,大家要注意卫生,记得戴口罩、通风、洗手👐、锻炼身体、按时吃饭、少熬夜哦。
|
||||||
|
206
bin/index.js
206
bin/index.js
@ -1,206 +1,4 @@
|
|||||||
#! node
|
|
||||||
"use strict";
|
"use strict";
|
||||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
||||||
if (k2 === undefined) k2 = k;
|
|
||||||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
||||||
}) : (function(o, m, k, k2) {
|
|
||||||
if (k2 === undefined) k2 = k;
|
|
||||||
o[k2] = m[k];
|
|
||||||
}));
|
|
||||||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
||||||
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
||||||
}) : function(o, v) {
|
|
||||||
o["default"] = v;
|
|
||||||
});
|
|
||||||
var __importStar = (this && this.__importStar) || function (mod) {
|
|
||||||
if (mod && mod.__esModule) return mod;
|
|
||||||
var result = {};
|
|
||||||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
||||||
__setModuleDefault(result, mod);
|
|
||||||
return result;
|
|
||||||
};
|
|
||||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
||||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
||||||
return new (P || (P = Promise))(function (resolve, reject) {
|
|
||||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
||||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
||||||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
||||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
||||||
});
|
|
||||||
};
|
|
||||||
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
||||||
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
||||||
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
||||||
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
||||||
function step(op) {
|
|
||||||
if (f) throw new TypeError("Generator is already executing.");
|
|
||||||
while (_) try {
|
|
||||||
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
||||||
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
||||||
switch (op[0]) {
|
|
||||||
case 0: case 1: t = op; break;
|
|
||||||
case 4: _.label++; return { value: op[1], done: false };
|
|
||||||
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
||||||
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
||||||
default:
|
|
||||||
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
||||||
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
||||||
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
||||||
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
||||||
if (t[2]) _.ops.pop();
|
|
||||||
_.trys.pop(); continue;
|
|
||||||
}
|
|
||||||
op = body.call(thisArg, _);
|
|
||||||
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
||||||
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
||||||
}
|
|
||||||
};
|
|
||||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
||||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
||||||
};
|
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
var inquirer_1 = __importDefault(require("inquirer"));
|
const koa_1 = require("./koa");
|
||||||
var file_1 = require("../extend/file");
|
new koa_1.Koa();
|
||||||
var os = __importStar(require("os"));
|
|
||||||
var ejs_1 = __importDefault(require("ejs"));
|
|
||||||
var chalk_1 = __importDefault(require("chalk"));
|
|
||||||
var child_process_1 = require("child_process");
|
|
||||||
var path_1 = require("path");
|
|
||||||
// ------------------------------------------------
|
|
||||||
// cli结果:
|
|
||||||
var answers;
|
|
||||||
// npm项目包 => 绝对路径
|
|
||||||
var path = path_1.join(path_1.resolve(__dirname), path_1.sep);
|
|
||||||
// 项目安装后 => 固定目录
|
|
||||||
var projectName = path.substring(0, path.lastIndexOf("bin"));
|
|
||||||
// 项目安装后 => 模版目录(复制模版使用)
|
|
||||||
var tpl = path_1.join(projectName, "template", path_1.sep);
|
|
||||||
// 脚本运行所在目录(模版去向使用)
|
|
||||||
var runPath = path_1.join(path_1.resolve(process.cwd()), path_1.sep);
|
|
||||||
// ========================================================
|
|
||||||
// 1、CLI 交互
|
|
||||||
inquirer_1.default
|
|
||||||
.prompt([
|
|
||||||
{
|
|
||||||
name: "appName",
|
|
||||||
message: chalk_1.default.cyan("🌈 App Name:"),
|
|
||||||
type: "input",
|
|
||||||
validate: function (input) {
|
|
||||||
if (input.trim().length <= 0 || !input)
|
|
||||||
return chalk_1.default.red("‼️ 必填项");
|
|
||||||
else
|
|
||||||
return true;
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "pkgManager",
|
|
||||||
message: chalk_1.default.yellow("🥓 Package Manager:"),
|
|
||||||
type: "list",
|
|
||||||
choices: [
|
|
||||||
{ name: "Yarn", value: 0, checked: true },
|
|
||||||
{ name: "Npm", value: 1 },
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "author",
|
|
||||||
message: chalk_1.default.green("🥤 Your Name:"),
|
|
||||||
type: "input",
|
|
||||||
default: os.userInfo().username,
|
|
||||||
},
|
|
||||||
])
|
|
||||||
.then(function (answer) { return __awaiter(void 0, void 0, void 0, function () {
|
|
||||||
return __generator(this, function (_a) {
|
|
||||||
switch (_a.label) {
|
|
||||||
case 0:
|
|
||||||
answers = answer;
|
|
||||||
// --------------------------------
|
|
||||||
// 调用2
|
|
||||||
return [4 /*yield*/, writing()];
|
|
||||||
case 1:
|
|
||||||
// --------------------------------
|
|
||||||
// 调用2
|
|
||||||
_a.sent();
|
|
||||||
return [2 /*return*/];
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}); });
|
|
||||||
// ========================================================
|
|
||||||
// 2、读写操作
|
|
||||||
function writing() {
|
|
||||||
return __awaiter(this, void 0, void 0, function () {
|
|
||||||
return __generator(this, function (_a) {
|
|
||||||
switch (_a.label) {
|
|
||||||
case 0:
|
|
||||||
console.log(chalk_1.default.blue("\r\n ---------------- WRITING... ----------------"));
|
|
||||||
// Static 文件
|
|
||||||
copyStatic([
|
|
||||||
["controller/index.ts", "controller/index.ts"],
|
|
||||||
["extend/logger.ts", "extend/logger.ts"],
|
|
||||||
["extend/lucky.ts", "extend/lucky.ts"],
|
|
||||||
["route/route.ts", "route/route.ts"],
|
|
||||||
["view/index.njk", "view/index.njk"],
|
|
||||||
["tsconfig.json", "tsconfig.json"],
|
|
||||||
["Dockerfile", "Dockerfile"],
|
|
||||||
["yarn.lock", "yarn.lock"],
|
|
||||||
["app.ts", "app.ts"],
|
|
||||||
]);
|
|
||||||
// template that uses the EJS engine
|
|
||||||
return [4 /*yield*/, copyTemplate([
|
|
||||||
["docker-compose.yml", "docker-compose.yml"],
|
|
||||||
["package.json", "package.json"],
|
|
||||||
["LICENSE", "LICENSE"],
|
|
||||||
])];
|
|
||||||
case 1:
|
|
||||||
// template that uses the EJS engine
|
|
||||||
_a.sent();
|
|
||||||
// --------------------------------
|
|
||||||
// 调用3
|
|
||||||
installed();
|
|
||||||
return [2 /*return*/];
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
// ------------------------------------------------
|
|
||||||
// Copy Static 文件
|
|
||||||
function copyStatic(files) {
|
|
||||||
files.forEach(function (file) {
|
|
||||||
file_1.file.copy(path_1.join(tpl, file[0]), path_1.join(runPath, answers.appName, file[1]));
|
|
||||||
console.log(chalk_1.default.green("+") +
|
|
||||||
(" " + chalk_1.default.grey(answers.appName + path_1.sep + file[1]) + " " + chalk_1.default.green("SUCCESS.👌")));
|
|
||||||
});
|
|
||||||
}
|
|
||||||
// Copy template that uses the EJS engine
|
|
||||||
// 使用EJS,解析模版,并将解析后的内容存入新文件中
|
|
||||||
function copyTemplate(files) {
|
|
||||||
var _this = this;
|
|
||||||
files.forEach(function (file) { return __awaiter(_this, void 0, void 0, function () {
|
|
||||||
var compileContent;
|
|
||||||
return __generator(this, function (_a) {
|
|
||||||
switch (_a.label) {
|
|
||||||
case 0: return [4 /*yield*/, ejs_1.default.renderFile(path_1.join(tpl, file[0]), answers)];
|
|
||||||
case 1:
|
|
||||||
compileContent = _a.sent();
|
|
||||||
file_1.file.write(path_1.join(runPath, answers.appName, path_1.sep, file[1]), compileContent);
|
|
||||||
console.log(chalk_1.default.green("+") +
|
|
||||||
(" " + chalk_1.default.grey(answers.appName + path_1.sep + file[1]) + " " + chalk_1.default.green("SUCCESS.👌")));
|
|
||||||
return [2 /*return*/];
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}); });
|
|
||||||
}
|
|
||||||
// ========================================================
|
|
||||||
// 3、依赖安装
|
|
||||||
function installed() {
|
|
||||||
console.log(chalk_1.default.blue("\r\n ---------------- Installing... ----------------"));
|
|
||||||
if (answers.pkgManager == 0) {
|
|
||||||
child_process_1.exec("cd " + answers.appName + " && yarn install", function (err) {
|
|
||||||
console.log(chalk_1.default.green("SUCCESS.👌"));
|
|
||||||
});
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
child_process_1.exec("cd " + answers.appName + " && npm install", function (err) {
|
|
||||||
console.log(chalk_1.default.green("SUCCESS.👌"));
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
136
bin/index.ts
136
bin/index.ts
@ -1,135 +1,3 @@
|
|||||||
#! node
|
import { Koa } from "./koa";
|
||||||
import program from "inquirer";
|
|
||||||
import { file as fs } from "../extend/file";
|
|
||||||
import * as os from "os";
|
|
||||||
import ejs from "ejs";
|
|
||||||
import chalk from "chalk";
|
|
||||||
import { exec } from "child_process";
|
|
||||||
import { resolve, join, sep, normalize } from "path";
|
|
||||||
|
|
||||||
// ------------------------------------------------
|
new Koa()
|
||||||
// cli结果:
|
|
||||||
let answers: { appName: string; pkgManager: number; author: string };
|
|
||||||
|
|
||||||
// npm项目包 => 绝对路径
|
|
||||||
const path: string = join(resolve(__dirname), sep);
|
|
||||||
// 项目安装后 => 固定目录
|
|
||||||
const projectName = path.substring(0, path.lastIndexOf("bin"));
|
|
||||||
|
|
||||||
// 项目安装后 => 模版目录(复制模版使用)
|
|
||||||
const tpl: string = join(projectName, "template", sep);
|
|
||||||
// 脚本运行所在目录(模版去向使用)
|
|
||||||
const runPath: string = join(resolve(process.cwd()), sep);
|
|
||||||
|
|
||||||
// ========================================================
|
|
||||||
// 1、CLI 交互
|
|
||||||
program
|
|
||||||
.prompt([
|
|
||||||
{
|
|
||||||
name: "appName",
|
|
||||||
message: chalk.cyan("🌈 App Name:"),
|
|
||||||
type: "input",
|
|
||||||
validate(input) {
|
|
||||||
if (input.trim().length <= 0 || !input) return chalk.red("‼️ 必填项");
|
|
||||||
else return true;
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "pkgManager",
|
|
||||||
message: chalk.yellow("🥓 Package Manager:"),
|
|
||||||
type: "list",
|
|
||||||
choices: [
|
|
||||||
{ name: "Yarn", value: 0, checked: true },
|
|
||||||
{ name: "Npm", value: 1 },
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "author",
|
|
||||||
message: chalk.green("🥤 Your Name:"),
|
|
||||||
type: "input",
|
|
||||||
default: os.userInfo().username,
|
|
||||||
},
|
|
||||||
])
|
|
||||||
.then(async answer => {
|
|
||||||
answers = answer;
|
|
||||||
|
|
||||||
// --------------------------------
|
|
||||||
// 调用2
|
|
||||||
await writing();
|
|
||||||
});
|
|
||||||
|
|
||||||
// ========================================================
|
|
||||||
// 2、读写操作
|
|
||||||
async function writing() {
|
|
||||||
console.log(chalk.blue("\r\n ---------------- WRITING... ----------------"));
|
|
||||||
|
|
||||||
// Static 文件
|
|
||||||
copyStatic([
|
|
||||||
[`controller/index.ts`, `controller/index.ts`],
|
|
||||||
[`extend/logger.ts`, `extend/logger.ts`],
|
|
||||||
[`extend/lucky.ts`, `extend/lucky.ts`],
|
|
||||||
[`route/route.ts`, `route/route.ts`],
|
|
||||||
[`view/index.njk`, `view/index.njk`],
|
|
||||||
[`tsconfig.json`, `tsconfig.json`],
|
|
||||||
[`Dockerfile`, `Dockerfile`],
|
|
||||||
[`yarn.lock`, `yarn.lock`],
|
|
||||||
[`app.ts`, `app.ts`],
|
|
||||||
]);
|
|
||||||
// template that uses the EJS engine
|
|
||||||
await copyTemplate([
|
|
||||||
[`docker-compose.yml`, `docker-compose.yml`],
|
|
||||||
[`package.json`, `package.json`],
|
|
||||||
[`LICENSE`, `LICENSE`],
|
|
||||||
]);
|
|
||||||
|
|
||||||
// --------------------------------
|
|
||||||
// 调用3
|
|
||||||
installed();
|
|
||||||
}
|
|
||||||
|
|
||||||
// ------------------------------------------------
|
|
||||||
// Copy Static 文件
|
|
||||||
function copyStatic(files: string[][]) {
|
|
||||||
files.forEach(file => {
|
|
||||||
fs.copy(join(tpl, file[0]), join(runPath, answers.appName, file[1]));
|
|
||||||
console.log(
|
|
||||||
chalk.green("+") +
|
|
||||||
` ${chalk.grey(answers.appName + sep + file[1])} ${chalk.green(
|
|
||||||
"SUCCESS.👌"
|
|
||||||
)}`
|
|
||||||
);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
// Copy template that uses the EJS engine
|
|
||||||
// 使用EJS,解析模版,并将解析后的内容存入新文件中
|
|
||||||
function copyTemplate(files: string[][]) {
|
|
||||||
files.forEach(async file => {
|
|
||||||
let compileContent = await ejs.renderFile(join(tpl, file[0]), answers);
|
|
||||||
|
|
||||||
fs.write(join(runPath, answers.appName, sep, file[1]), compileContent);
|
|
||||||
console.log(
|
|
||||||
chalk.green("+") +
|
|
||||||
` ${chalk.grey(answers.appName + sep + file[1])} ${chalk.green(
|
|
||||||
"SUCCESS.👌"
|
|
||||||
)}`
|
|
||||||
);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
// ========================================================
|
|
||||||
// 3、依赖安装
|
|
||||||
function installed() {
|
|
||||||
console.log(
|
|
||||||
chalk.blue("\r\n ---------------- Installing... ----------------")
|
|
||||||
);
|
|
||||||
|
|
||||||
if (answers.pkgManager == 0) {
|
|
||||||
exec(`cd ${answers.appName} && yarn install`, err => {
|
|
||||||
console.log(chalk.green("SUCCESS.👌"));
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
exec(`cd ${answers.appName} && npm install`, err => {
|
|
||||||
console.log(chalk.green("SUCCESS.👌"));
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
146
bin/koa.js
Normal file
146
bin/koa.js
Normal file
@ -0,0 +1,146 @@
|
|||||||
|
"use strict";
|
||||||
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||||
|
if (k2 === undefined) k2 = k;
|
||||||
|
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
||||||
|
}) : (function(o, m, k, k2) {
|
||||||
|
if (k2 === undefined) k2 = k;
|
||||||
|
o[k2] = m[k];
|
||||||
|
}));
|
||||||
|
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
||||||
|
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
||||||
|
}) : function(o, v) {
|
||||||
|
o["default"] = v;
|
||||||
|
});
|
||||||
|
var __importStar = (this && this.__importStar) || function (mod) {
|
||||||
|
if (mod && mod.__esModule) return mod;
|
||||||
|
var result = {};
|
||||||
|
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
||||||
|
__setModuleDefault(result, mod);
|
||||||
|
return result;
|
||||||
|
};
|
||||||
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||||
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||||
|
return new (P || (P = Promise))(function (resolve, reject) {
|
||||||
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||||
|
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||||
|
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
||||||
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||||
|
});
|
||||||
|
};
|
||||||
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||||
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||||
|
};
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
exports.Koa = void 0;
|
||||||
|
const cli_1 = require("../extend/cli");
|
||||||
|
const os = __importStar(require("os"));
|
||||||
|
const console_1 = require("../extend/console");
|
||||||
|
const child_process_1 = require("child_process");
|
||||||
|
const ora_1 = __importDefault(require("ora"));
|
||||||
|
const path_1 = require("path");
|
||||||
|
// Koa 命令行
|
||||||
|
class Koa extends cli_1.Cli {
|
||||||
|
constructor() {
|
||||||
|
super();
|
||||||
|
this.command = ``;
|
||||||
|
}
|
||||||
|
// 初始化
|
||||||
|
Initialize() {
|
||||||
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
|
console.log(console_1.info(`\n\r---------------- 🎨 KOA CLI ----------------`));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
// 交互阶段
|
||||||
|
Prompting() {
|
||||||
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
|
yield this.prompt([
|
||||||
|
{
|
||||||
|
name: "appName",
|
||||||
|
message: console_1.readonly("🎉App Name:"),
|
||||||
|
type: "text",
|
||||||
|
validate: (values) => values.length <= 0 ? `Input your project name, Please !` : true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "pkgManager",
|
||||||
|
message: console_1.readonly("🎰Package Manager:"),
|
||||||
|
type: "toggle",
|
||||||
|
active: "Yarn",
|
||||||
|
inactive: "Npm",
|
||||||
|
initial: "Yarn",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "author",
|
||||||
|
message: console_1.readonly("🥤Author Name:"),
|
||||||
|
type: "text",
|
||||||
|
initial: os.userInfo().username,
|
||||||
|
},
|
||||||
|
]);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
// 项目初始化
|
||||||
|
Writing() {
|
||||||
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
|
console.log(console_1.info(`---------------- 🧩 WRITING ----------------`));
|
||||||
|
const files = {
|
||||||
|
static: [
|
||||||
|
`controller/index.ts`,
|
||||||
|
`extend/logger.ts`,
|
||||||
|
`extend/lucky.ts`,
|
||||||
|
`route/route.ts`,
|
||||||
|
`view/index.njk`,
|
||||||
|
`tsconfig.json`,
|
||||||
|
`Dockerfile`,
|
||||||
|
`app.ts`,
|
||||||
|
],
|
||||||
|
tpl: [
|
||||||
|
`docker-compose.yml`,
|
||||||
|
`package.json`,
|
||||||
|
`LICENSE`,
|
||||||
|
],
|
||||||
|
};
|
||||||
|
files.static.forEach(file => {
|
||||||
|
let notice = this.easyCopy(file);
|
||||||
|
if (notice)
|
||||||
|
console.log(console_1.success("+"), console_1.readonly(path_1.join(file)));
|
||||||
|
else
|
||||||
|
console.log(console_1.error("x"), console_1.error(path_1.join(file)));
|
||||||
|
});
|
||||||
|
files.tpl.forEach(file => {
|
||||||
|
let notice = this.easyTpl(file);
|
||||||
|
if (notice)
|
||||||
|
console.log(console_1.success("+"), console_1.readonly(path_1.join(file)));
|
||||||
|
else
|
||||||
|
console.log(console_1.error("x"), console_1.error(path_1.join(file)));
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
// 依赖安装
|
||||||
|
Installing() {
|
||||||
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
|
console.log(console_1.info(`---------------- 🎰 INSTALL ----------------`));
|
||||||
|
if (this.answers.pkgManager) {
|
||||||
|
this.command += `cd ${this.answers.appName} && yarn install`;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this.command += `cd ${this.answers.appName} && npm install`;
|
||||||
|
}
|
||||||
|
yield this.easyInstall();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
// 安装
|
||||||
|
easyInstall() {
|
||||||
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
|
let oraObj = ora_1.default();
|
||||||
|
oraObj.start(console_1.readonly("Install..."));
|
||||||
|
yield child_process_1.exec(this.command, (res, stdout, stderr) => {
|
||||||
|
if (res == null) {
|
||||||
|
return oraObj.succeed(console_1.success("依赖安装完成...")).stop();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return oraObj.fail(console_1.error("依赖安装失败,请手动安装")).stop();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
exports.Koa = Koa;
|
113
bin/koa.ts
Normal file
113
bin/koa.ts
Normal file
@ -0,0 +1,113 @@
|
|||||||
|
import { Cli } from "../extend/cli";
|
||||||
|
import * as os from "os";
|
||||||
|
import { error, info, readonly, success } from "../extend/console";
|
||||||
|
import { exec } from "child_process";
|
||||||
|
import ora from "ora";
|
||||||
|
import { join } from "path";
|
||||||
|
|
||||||
|
// Koa 命令行
|
||||||
|
export class Koa extends Cli {
|
||||||
|
// @ts-ignore
|
||||||
|
protected answers: {
|
||||||
|
appName: string;
|
||||||
|
pkgManager: boolean;
|
||||||
|
};
|
||||||
|
private command: string = ``;
|
||||||
|
|
||||||
|
constructor() {
|
||||||
|
super();
|
||||||
|
}
|
||||||
|
|
||||||
|
// 初始化
|
||||||
|
async Initialize() {
|
||||||
|
console.log(info(`\n\r---------------- 🎨 KOA CLI ----------------`));
|
||||||
|
}
|
||||||
|
|
||||||
|
// 交互阶段
|
||||||
|
async Prompting() {
|
||||||
|
await this.prompt([
|
||||||
|
{
|
||||||
|
name: "appName",
|
||||||
|
message: readonly("🎉App Name:"),
|
||||||
|
type: "text",
|
||||||
|
validate: (values) => values.length <= 0 ? `Input your project name, Please !` : true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "pkgManager",
|
||||||
|
message: readonly("🎰Package Manager:"),
|
||||||
|
type: "toggle",
|
||||||
|
active: "Yarn",
|
||||||
|
inactive: "Npm",
|
||||||
|
initial: "Yarn",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "author",
|
||||||
|
message: readonly("🥤Author Name:"),
|
||||||
|
type: "text",
|
||||||
|
initial: os.userInfo().username,
|
||||||
|
},
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 项目初始化
|
||||||
|
async Writing() {
|
||||||
|
console.log(info(`---------------- 🧩 WRITING ----------------`));
|
||||||
|
const files: {
|
||||||
|
static: string[];
|
||||||
|
tpl: string[]
|
||||||
|
} = {
|
||||||
|
static: [
|
||||||
|
`controller/index.ts`,
|
||||||
|
`extend/logger.ts`,
|
||||||
|
`extend/lucky.ts`,
|
||||||
|
`route/route.ts`,
|
||||||
|
`view/index.njk`,
|
||||||
|
`tsconfig.json`,
|
||||||
|
`Dockerfile`,
|
||||||
|
`app.ts`,
|
||||||
|
],
|
||||||
|
tpl: [
|
||||||
|
`docker-compose.yml`,
|
||||||
|
`package.json`,
|
||||||
|
`LICENSE`,
|
||||||
|
],
|
||||||
|
};
|
||||||
|
|
||||||
|
files.static.forEach(file => {
|
||||||
|
let notice = this.easyCopy(file);
|
||||||
|
if (notice) console.log(success("+"), readonly(join(file)));
|
||||||
|
else console.log(error("x"), error(join(file)));
|
||||||
|
});
|
||||||
|
|
||||||
|
files.tpl.forEach(file => {
|
||||||
|
let notice = this.easyTpl(file);
|
||||||
|
if (notice) console.log(success("+"), readonly(join(file)));
|
||||||
|
else console.log(error("x"), error(join(file)));
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// 依赖安装
|
||||||
|
async Installing() {
|
||||||
|
console.log(info(`---------------- 🎰 INSTALL ----------------`));
|
||||||
|
if (this.answers.pkgManager) {
|
||||||
|
this.command += `cd ${this.answers.appName} && yarn install`;
|
||||||
|
} else {
|
||||||
|
this.command += `cd ${this.answers.appName} && npm install`;
|
||||||
|
}
|
||||||
|
await this.easyInstall();
|
||||||
|
}
|
||||||
|
|
||||||
|
// 安装
|
||||||
|
async easyInstall() {
|
||||||
|
let oraObj: ora.Ora = ora();
|
||||||
|
oraObj.start(readonly("Install..."));
|
||||||
|
await exec(this.command, (res, stdout, stderr) => {
|
||||||
|
if (res == null) {
|
||||||
|
return oraObj.succeed(success("依赖安装完成...")).stop();
|
||||||
|
} else {
|
||||||
|
return oraObj.fail(error("依赖安装失败,请手动安装")).stop();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
0
doc/doc.md
Normal file
0
doc/doc.md
Normal file
2
extend/api.js
Normal file
2
extend/api.js
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
"use strict";
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
16
extend/api.ts
Normal file
16
extend/api.ts
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
interface Command {
|
||||||
|
Initialize(): void;
|
||||||
|
|
||||||
|
Prompting(): void;
|
||||||
|
|
||||||
|
Writing(): void;
|
||||||
|
|
||||||
|
Installing(): void;
|
||||||
|
|
||||||
|
Ending(): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface Console {
|
||||||
|
}
|
||||||
|
|
||||||
|
export { Command, Console };
|
77
extend/cli.js
Normal file
77
extend/cli.js
Normal file
@ -0,0 +1,77 @@
|
|||||||
|
"use strict";
|
||||||
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||||
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||||
|
return new (P || (P = Promise))(function (resolve, reject) {
|
||||||
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||||
|
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||||
|
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
||||||
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||||
|
});
|
||||||
|
};
|
||||||
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||||
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||||
|
};
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
exports.Cli = void 0;
|
||||||
|
const prompts_1 = __importDefault(require("prompts"));
|
||||||
|
const file_1 = require("./file");
|
||||||
|
const ejs_1 = __importDefault(require("ejs"));
|
||||||
|
const path_1 = require("path");
|
||||||
|
class Cli {
|
||||||
|
/**
|
||||||
|
* @constructor
|
||||||
|
* @protected
|
||||||
|
*/
|
||||||
|
constructor() {
|
||||||
|
this.RUN = path_1.join(path_1.resolve(process.cwd()), path_1.sep);
|
||||||
|
this.answers = null;
|
||||||
|
this.dir = path_1.join(path_1.resolve(__dirname));
|
||||||
|
this.PATH = this.dir.substring(0, this.dir.lastIndexOf("extend"));
|
||||||
|
this.TPL = path_1.join(this.PATH, "template/");
|
||||||
|
this.run().then().catch(err => console.log(err));
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 自动指令中枢:
|
||||||
|
* @description 自动调用 CLI 过程中的5大阶段
|
||||||
|
*/
|
||||||
|
run() {
|
||||||
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
|
yield this.Initialize();
|
||||||
|
yield this.Prompting();
|
||||||
|
yield this.Writing();
|
||||||
|
yield this.Installing();
|
||||||
|
yield this.Ending();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
Initialize() {
|
||||||
|
}
|
||||||
|
Prompting() {
|
||||||
|
}
|
||||||
|
Writing() {
|
||||||
|
}
|
||||||
|
Installing() {
|
||||||
|
}
|
||||||
|
Ending() {
|
||||||
|
}
|
||||||
|
// TODO: Copy Files
|
||||||
|
// PATH: 当前项目绝对路径
|
||||||
|
easyCopy(file) {
|
||||||
|
// @ts-ignore
|
||||||
|
return file_1.file.copy(path_1.join(this.TPL, file), path_1.join(this.RUN, this.answers.appName, file));
|
||||||
|
}
|
||||||
|
easyTpl(file) {
|
||||||
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
|
// @ts-ignore
|
||||||
|
const [compileContent] = yield Promise.all([ejs_1.default.renderFile(path_1.join(this.TPL, file), this.answers)]);
|
||||||
|
// @ts-ignore
|
||||||
|
return file_1.file.write(path_1.join(this.RUN, this.answers.appName, file), compileContent);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
// 提问题,并传回问题答案
|
||||||
|
prompt(question) {
|
||||||
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
|
return this.answers = yield prompts_1.default(question);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
exports.Cli = Cli;
|
72
extend/cli.ts
Normal file
72
extend/cli.ts
Normal file
@ -0,0 +1,72 @@
|
|||||||
|
import { Command } from "./api";
|
||||||
|
import prompts from "prompts";
|
||||||
|
import { file as fs } from "./file";
|
||||||
|
import ejs from "ejs";
|
||||||
|
import { join, resolve, sep } from "path";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
abstract class Cli implements Command{
|
||||||
|
protected RUN: string = join(resolve(process.cwd()), sep);
|
||||||
|
protected answers: {} | null = null;
|
||||||
|
private dir = join(resolve(__dirname));
|
||||||
|
protected PATH: string = this.dir.substring(0, this.dir.lastIndexOf("extend"));
|
||||||
|
protected TPL: string = join(this.PATH, "template/");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @constructor
|
||||||
|
* @protected
|
||||||
|
*/
|
||||||
|
protected constructor() {
|
||||||
|
this.run().then().catch(err => console.log(err));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 自动指令中枢:
|
||||||
|
* @description 自动调用 CLI 过程中的5大阶段
|
||||||
|
*/
|
||||||
|
async run() {
|
||||||
|
await this.Initialize();
|
||||||
|
await this.Prompting();
|
||||||
|
await this.Writing();
|
||||||
|
await this.Installing();
|
||||||
|
await this.Ending();
|
||||||
|
}
|
||||||
|
|
||||||
|
Initialize() {
|
||||||
|
}
|
||||||
|
|
||||||
|
Prompting() {
|
||||||
|
}
|
||||||
|
|
||||||
|
Writing() {
|
||||||
|
}
|
||||||
|
|
||||||
|
Installing() {
|
||||||
|
}
|
||||||
|
|
||||||
|
Ending() {
|
||||||
|
}
|
||||||
|
|
||||||
|
// TODO: Copy Files
|
||||||
|
// PATH: 当前项目绝对路径
|
||||||
|
protected easyCopy(file: string) {
|
||||||
|
// @ts-ignore
|
||||||
|
return fs.copy(join(this.TPL, file), join(this.RUN, this.answers.appName, file));
|
||||||
|
}
|
||||||
|
|
||||||
|
protected async easyTpl(file: string) {
|
||||||
|
// @ts-ignore
|
||||||
|
const [compileContent] = await Promise.all([ejs.renderFile(join(this.TPL, file), this.answers)]);
|
||||||
|
// @ts-ignore
|
||||||
|
return fs.write(join(this.RUN, this.answers.appName, file), compileContent);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 提问题,并传回问题答案
|
||||||
|
protected async prompt(question: prompts.PromptObject<string> | prompts.PromptObject<string>[]) {
|
||||||
|
return this.answers = await prompts(question);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
export { Cli };
|
31
extend/console.js
Normal file
31
extend/console.js
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
"use strict";
|
||||||
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||||
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||||
|
};
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
exports.readonly = exports.success = exports.error = exports.warning = exports.info = exports.log = void 0;
|
||||||
|
const chalk_1 = __importDefault(require("chalk"));
|
||||||
|
function log(information) {
|
||||||
|
return chalk_1.default.white(information);
|
||||||
|
}
|
||||||
|
exports.log = log;
|
||||||
|
function warning(information) {
|
||||||
|
return chalk_1.default.yellow(information);
|
||||||
|
}
|
||||||
|
exports.warning = warning;
|
||||||
|
function error(information) {
|
||||||
|
return chalk_1.default.red(information);
|
||||||
|
}
|
||||||
|
exports.error = error;
|
||||||
|
function success(information) {
|
||||||
|
return chalk_1.default.cyan(information);
|
||||||
|
}
|
||||||
|
exports.success = success;
|
||||||
|
function info(information) {
|
||||||
|
return chalk_1.default.blue(information);
|
||||||
|
}
|
||||||
|
exports.info = info;
|
||||||
|
function readonly(information) {
|
||||||
|
return chalk_1.default.grey(information);
|
||||||
|
}
|
||||||
|
exports.readonly = readonly;
|
28
extend/console.ts
Normal file
28
extend/console.ts
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
import chalk from "chalk";
|
||||||
|
|
||||||
|
function log(information: any) {
|
||||||
|
return chalk.white(information)
|
||||||
|
}
|
||||||
|
|
||||||
|
function warning(information: any) {
|
||||||
|
return chalk.yellow(information)
|
||||||
|
}
|
||||||
|
|
||||||
|
function error(information: any) {
|
||||||
|
return chalk.red(information)
|
||||||
|
}
|
||||||
|
|
||||||
|
function success(information: any) {
|
||||||
|
return chalk.cyan(information)
|
||||||
|
}
|
||||||
|
|
||||||
|
function info(information: any) {
|
||||||
|
return chalk.blue(information);
|
||||||
|
}
|
||||||
|
|
||||||
|
function readonly(information: any) {
|
||||||
|
return chalk.grey(information)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
export { log, info, warning, error, success, readonly };
|
23
extend/file.d.ts
vendored
23
extend/file.d.ts
vendored
@ -1,23 +0,0 @@
|
|||||||
/**
|
|
||||||
* 文件操作类
|
|
||||||
* @description 更加语义化的简便文件操作。
|
|
||||||
*/
|
|
||||||
declare class file {
|
|
||||||
/**
|
|
||||||
* 创建目录
|
|
||||||
* @description 如果目录不存在,则自动创建目录,并返回结果
|
|
||||||
* 如果目录存在,则返回 true
|
|
||||||
*
|
|
||||||
* @param {string} filePath 要操作(复制,剪切)的目录名(带文件名和后缀的完整目录)
|
|
||||||
* @return {boolean} 操作状态
|
|
||||||
*/
|
|
||||||
protected static createPath(filePath: string): boolean;
|
|
||||||
/**
|
|
||||||
* 复制文件
|
|
||||||
* @param {string} src 源文件地址
|
|
||||||
* @param {string} dest 文件去向地址
|
|
||||||
* @return {boolean} 操作状态
|
|
||||||
*/
|
|
||||||
static copy(src: string, dest: string): boolean;
|
|
||||||
}
|
|
||||||
export { file };
|
|
@ -1,15 +1,13 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
exports.file = void 0;
|
exports.file = void 0;
|
||||||
var fs_1 = require("fs");
|
const fs_1 = require("fs");
|
||||||
var path_1 = require("path");
|
const path_1 = require("path");
|
||||||
/**
|
/**
|
||||||
* 文件操作类
|
* 文件操作类
|
||||||
* @description 更加语义化的简便文件操作。
|
* @description 更加语义化的简便文件操作。
|
||||||
*/
|
*/
|
||||||
var file = /** @class */ (function () {
|
class file {
|
||||||
function file() {
|
|
||||||
}
|
|
||||||
/**
|
/**
|
||||||
* 创建目录
|
* 创建目录
|
||||||
* @description 如果目录不存在,则自动创建目录,并返回结果
|
* @description 如果目录不存在,则自动创建目录,并返回结果
|
||||||
@ -18,28 +16,28 @@ var file = /** @class */ (function () {
|
|||||||
* @param {string} filePath 要操作(复制,剪切)的目录名(带文件名和后缀的完整目录)
|
* @param {string} filePath 要操作(复制,剪切)的目录名(带文件名和后缀的完整目录)
|
||||||
* @return {boolean} 操作状态
|
* @return {boolean} 操作状态
|
||||||
*/
|
*/
|
||||||
file.createPath = function (filePath) {
|
static createPath(filePath) {
|
||||||
// 获取完整目录(去除最后一位的文件字段)
|
// 获取完整目录(去除最后一位的文件字段)
|
||||||
var dir = filePath.substring(0, filePath.lastIndexOf(path_1.sep));
|
let dir = filePath.substring(0, filePath.lastIndexOf(path_1.sep));
|
||||||
if (dir == "" || dir == null)
|
if (dir == "" || dir == null)
|
||||||
dir = "." + path_1.sep; // 不写目录名 => 根目录
|
dir = `.${path_1.sep}`; // 不写目录名 => 根目录
|
||||||
// 文件夹不存在
|
// 文件夹不存在
|
||||||
if (!fs_1.existsSync(dir)) {
|
if (!fs_1.existsSync(dir)) {
|
||||||
var actionNotice = fs_1.mkdirSync(dir, { recursive: true });
|
let actionNotice = fs_1.mkdirSync(dir, { recursive: true });
|
||||||
return !!actionNotice;
|
return !!actionNotice;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return true;
|
return true;
|
||||||
};
|
}
|
||||||
/**
|
/**
|
||||||
* 复制文件
|
* 复制文件
|
||||||
* @param {string} src 源文件地址
|
* @param {string} src 源文件地址
|
||||||
* @param {string} dest 文件去向地址
|
* @param {string} dest 文件去向地址
|
||||||
* @return {boolean} 操作状态
|
* @return {boolean} 操作状态
|
||||||
*/
|
*/
|
||||||
file.copy = function (src, dest) {
|
static copy(src, dest) {
|
||||||
if (!fs_1.existsSync(src)) {
|
if (!fs_1.existsSync(src)) {
|
||||||
console.log("源文件不存在");
|
// console.log("源文件不存在");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// 复制操作
|
// 复制操作
|
||||||
@ -49,22 +47,20 @@ var file = /** @class */ (function () {
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
return false;
|
return false;
|
||||||
};
|
}
|
||||||
/***
|
/***
|
||||||
* 文件写入(保存文件)
|
* 文件写入(保存文件)
|
||||||
* @param {string} filePath 文件去向地址
|
* @param {string} filePath 文件去向地址
|
||||||
* @param data 写入数据
|
* @param data 写入数据
|
||||||
* @return {boolean} 操作状态
|
* @return {boolean} 操作状态
|
||||||
*/
|
*/
|
||||||
file.write = function (filePath, data) {
|
static write(filePath, data = "") {
|
||||||
if (data === void 0) { data = ""; }
|
|
||||||
if (file.createPath(filePath)) {
|
if (file.createPath(filePath)) {
|
||||||
fs_1.writeFileSync(filePath, data);
|
fs_1.writeFileSync(filePath, data);
|
||||||
return fs_1.existsSync(filePath);
|
return fs_1.existsSync(filePath);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return false;
|
return false;
|
||||||
};
|
}
|
||||||
return file;
|
}
|
||||||
}());
|
|
||||||
exports.file = file;
|
exports.file = file;
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import { copyFileSync, existsSync, mkdirSync, writeFileSync } from "fs";
|
import { copyFileSync, existsSync, mkdirSync, writeFileSync } from "fs";
|
||||||
import { sep } from "path";
|
import { sep } from "path";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 文件操作类
|
* 文件操作类
|
||||||
* @description 更加语义化的简便文件操作。
|
* @description 更加语义化的简便文件操作。
|
||||||
@ -33,7 +34,7 @@ class file {
|
|||||||
*/
|
*/
|
||||||
static copy(src: string, dest: string): boolean {
|
static copy(src: string, dest: string): boolean {
|
||||||
if (!existsSync(src)) {
|
if (!existsSync(src)) {
|
||||||
console.log("源文件不存在");
|
// console.log("源文件不存在");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// 复制操作
|
// 复制操作
|
||||||
|
77
extend/lucky.js
Normal file
77
extend/lucky.js
Normal file
@ -0,0 +1,77 @@
|
|||||||
|
"use strict";
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
exports.lucky = void 0;
|
||||||
|
// colors-console 仅支持 CommonJS 导入
|
||||||
|
const cmd = require("colors-console");
|
||||||
|
/**
|
||||||
|
* 命令行彩色输出;
|
||||||
|
* 通过语义化方法,给命令行内容增加颜色。
|
||||||
|
* @class lucky
|
||||||
|
*/
|
||||||
|
class lucky {
|
||||||
|
/**
|
||||||
|
* 字体黄色
|
||||||
|
* @param content {String} 要渲染的内容
|
||||||
|
* @return {void}
|
||||||
|
*/
|
||||||
|
static warning(content) {
|
||||||
|
return cmd("yellow", content);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 字体红色
|
||||||
|
* @param content {String} 要渲染的内容
|
||||||
|
* @return {void}
|
||||||
|
*/
|
||||||
|
static danger(content) {
|
||||||
|
return cmd("magenta", content);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 字体青色
|
||||||
|
* @param content {String} 要渲染的内容
|
||||||
|
* @return {void}
|
||||||
|
*/
|
||||||
|
static info(content) {
|
||||||
|
return cmd("cyan", content);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 字体灰色
|
||||||
|
* @param content {String} 要渲染的内容
|
||||||
|
* @return {void}
|
||||||
|
*/
|
||||||
|
static second(content) {
|
||||||
|
return cmd("grey", content);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 字体白色
|
||||||
|
* @param content {String} 要渲染的内容
|
||||||
|
* @return {void}
|
||||||
|
*/
|
||||||
|
static light(content) {
|
||||||
|
return cmd("white", content);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 字体蓝色
|
||||||
|
* @param content {String} 要渲染的内容
|
||||||
|
* @return {void}
|
||||||
|
*/
|
||||||
|
static primary(content) {
|
||||||
|
return cmd("blue", content);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 字体绿色
|
||||||
|
* @param content {String} 要渲染的内容
|
||||||
|
* @return {void}
|
||||||
|
*/
|
||||||
|
static success(content) {
|
||||||
|
return cmd("green", content);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 字体黑色
|
||||||
|
* @param content {String} 要渲染的内容
|
||||||
|
* @return {void}
|
||||||
|
*/
|
||||||
|
static dark(content) {
|
||||||
|
return cmd("black", content);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
exports.lucky = lucky;
|
@ -10,7 +10,8 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"chalk": "^4.1.0",
|
"chalk": "^4.1.0",
|
||||||
"ejs": "^3.1.6",
|
"ejs": "^3.1.6",
|
||||||
"inquirer": "^7.3.3"
|
"ora": "^5.3.0",
|
||||||
|
"prompts": "^2.4.0"
|
||||||
},
|
},
|
||||||
"prettier": {
|
"prettier": {
|
||||||
"tabWidth": 2,
|
"tabWidth": 2,
|
||||||
@ -23,7 +24,7 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/ejs": "^3.0.5",
|
"@types/ejs": "^3.0.5",
|
||||||
"@types/inquirer": "^7.3.1",
|
"@types/prompts": "^2.0.9",
|
||||||
"prettier": "^2.2.1"
|
"prettier": "^2.2.1"
|
||||||
},
|
},
|
||||||
"description": "koa web 项目脚手架",
|
"description": "koa web 项目脚手架",
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { Context, Next } from "koa"
|
import { Context, Next } from "koa";
|
||||||
|
|
||||||
|
|
||||||
export class Index {
|
export class Index {
|
||||||
|
@ -18,7 +18,6 @@
|
|||||||
"@types/node": "^14.14.22",
|
"@types/node": "^14.14.22",
|
||||||
"nodemon": "^2.0.7",
|
"nodemon": "^2.0.7",
|
||||||
"prettier": "^2.2.1",
|
"prettier": "^2.2.1",
|
||||||
"rollup-plugin-typescript2": "^0.29.0",
|
|
||||||
"typescript": "^4.1.3"
|
"typescript": "^4.1.3"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import Router from "koa-router"
|
import Router from "koa-router";
|
||||||
import { Index as IndexRoute } from "./../controller/index"
|
import { Index as IndexRoute } from "./../controller/index";
|
||||||
|
|
||||||
const router: Router = new Router()
|
const router: Router = new Router()
|
||||||
|
|
||||||
|
1451
template/yarn.lock
1451
template/yarn.lock
File diff suppressed because it is too large
Load Diff
@ -5,10 +5,8 @@
|
|||||||
|
|
||||||
/* Basic Options */
|
/* Basic Options */
|
||||||
// "incremental": true, /* Enable incremental compilation */
|
// "incremental": true, /* Enable incremental compilation */
|
||||||
"target": "ES5",
|
"target": "ES6", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */
|
||||||
/* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */
|
"module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */
|
||||||
"module": "CommonJS",
|
|
||||||
/* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */
|
|
||||||
// "lib": [], /* Specify library files to be included in the compilation. */
|
// "lib": [], /* Specify library files to be included in the compilation. */
|
||||||
// "allowJs": true, /* Allow javascript files to be compiled. */
|
// "allowJs": true, /* Allow javascript files to be compiled. */
|
||||||
// "checkJs": true, /* Report errors in .js files. */
|
// "checkJs": true, /* Report errors in .js files. */
|
||||||
@ -28,8 +26,7 @@
|
|||||||
// "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */
|
// "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */
|
||||||
|
|
||||||
/* Strict Type-Checking Options */
|
/* Strict Type-Checking Options */
|
||||||
"strict": true,
|
"strict": true, /* Enable all strict type-checking options. */
|
||||||
/* Enable all strict type-checking options. */
|
|
||||||
// "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */
|
// "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */
|
||||||
// "strictNullChecks": true, /* Enable strict null checks. */
|
// "strictNullChecks": true, /* Enable strict null checks. */
|
||||||
// "strictFunctionTypes": true, /* Enable strict checking of function types. */
|
// "strictFunctionTypes": true, /* Enable strict checking of function types. */
|
||||||
@ -51,15 +48,9 @@
|
|||||||
// "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */
|
// "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */
|
||||||
// "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
|
// "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
|
||||||
// "typeRoots": [], /* List of folders to include type definitions from. */
|
// "typeRoots": [], /* List of folders to include type definitions from. */
|
||||||
"types": [
|
"types": ["koa","koa-compose"], /* Type declaration files to be included in compilation. */
|
||||||
"./node_modules/@types/ejs",
|
|
||||||
"./node_modules/@types/inquirer",
|
|
||||||
"./node_modules/@types/node",
|
|
||||||
"./node_modules/@types/through"
|
|
||||||
], /* Type declaration files to be included in compilation. */
|
|
||||||
// "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */
|
// "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */
|
||||||
"esModuleInterop": true,
|
"esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
|
||||||
/* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
|
|
||||||
// "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */
|
// "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */
|
||||||
// "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
|
// "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
|
||||||
|
|
||||||
@ -74,12 +65,7 @@
|
|||||||
// "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */
|
// "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */
|
||||||
|
|
||||||
/* Advanced Options */
|
/* Advanced Options */
|
||||||
"skipLibCheck": true,
|
"skipLibCheck": true, /* Skip type checking of declaration files. */
|
||||||
/* Skip type checking of declaration files. */
|
"forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */
|
||||||
"forceConsistentCasingInFileNames": true
|
}
|
||||||
/* Disallow inconsistently-cased references to the same file. */
|
|
||||||
},
|
|
||||||
"files": [
|
|
||||||
"bin/index.ts"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
266
yarn.lock
266
yarn.lock
@ -7,36 +7,21 @@
|
|||||||
resolved "http://mirrors.cloud.tencent.com/npm/@types%2fejs/-/ejs-3.0.5.tgz#95a3a1c3d9603eba80fe67ff56da1ba275ef2eda"
|
resolved "http://mirrors.cloud.tencent.com/npm/@types%2fejs/-/ejs-3.0.5.tgz#95a3a1c3d9603eba80fe67ff56da1ba275ef2eda"
|
||||||
integrity sha512-k4ef69sS4sIqAPW9GoBnN+URAON2LeL1H0duQvL4RgdEBna19/WattYSA1qYqvbVEDRTSWzOw56tCLhC/m/IOw==
|
integrity sha512-k4ef69sS4sIqAPW9GoBnN+URAON2LeL1H0duQvL4RgdEBna19/WattYSA1qYqvbVEDRTSWzOw56tCLhC/m/IOw==
|
||||||
|
|
||||||
"@types/inquirer@^7.3.1":
|
|
||||||
version "7.3.1"
|
|
||||||
resolved "http://mirrors.cloud.tencent.com/npm/@types%2finquirer/-/inquirer-7.3.1.tgz#1f231224e7df11ccfaf4cf9acbcc3b935fea292d"
|
|
||||||
integrity sha512-osD38QVIfcdgsPCT0V3lD7eH0OFurX71Jft18bZrsVQWVRt6TuxRzlr0GJLrxoHZR2V5ph7/qP8se/dcnI7o0g==
|
|
||||||
dependencies:
|
|
||||||
"@types/through" "*"
|
|
||||||
rxjs "^6.4.0"
|
|
||||||
|
|
||||||
"@types/node@*":
|
"@types/node@*":
|
||||||
version "14.14.25"
|
version "14.14.25"
|
||||||
resolved "http://mirrors.cloud.tencent.com/npm/@types%2fnode/-/node-14.14.25.tgz#15967a7b577ff81383f9b888aa6705d43fbbae93"
|
resolved "http://mirrors.cloud.tencent.com/npm/@types%2fnode/-/node-14.14.25.tgz#15967a7b577ff81383f9b888aa6705d43fbbae93"
|
||||||
integrity sha512-EPpXLOVqDvisVxtlbvzfyqSsFeQxltFbluZNRndIb8tr9KiBnYNLzrc1N3pyKUCww2RNrfHDViqDWWE1LCJQtQ==
|
integrity sha512-EPpXLOVqDvisVxtlbvzfyqSsFeQxltFbluZNRndIb8tr9KiBnYNLzrc1N3pyKUCww2RNrfHDViqDWWE1LCJQtQ==
|
||||||
|
|
||||||
"@types/through@*":
|
"@types/prompts@^2.0.9":
|
||||||
version "0.0.30"
|
version "2.0.9"
|
||||||
resolved "http://mirrors.cloud.tencent.com/npm/@types%2fthrough/-/through-0.0.30.tgz#e0e42ce77e897bd6aead6f6ea62aeb135b8a3895"
|
resolved "https://registry.yarnpkg.com/@types/prompts/-/prompts-2.0.9.tgz#19f419310eaa224a520476b19d4183f6a2b3bd8f"
|
||||||
integrity sha512-FvnCJljyxhPM3gkRgWmxmDZyAQSiBQQWLI0A0VFL0K7W1oRUrPJSqNO0NvTnLkBcotdlp3lKvaT0JrnyRDkzOg==
|
integrity sha512-TORZP+FSjTYMWwKadftmqEn6bziN5RnfygehByGsjxoK5ydnClddtv6GikGWPvCm24oI+YBwck5WDxIIyNxUrA==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@types/node" "*"
|
"@types/node" "*"
|
||||||
|
|
||||||
ansi-escapes@^4.2.1:
|
|
||||||
version "4.3.1"
|
|
||||||
resolved "https://mirrors.tencent.com/npm/ansi-escapes/-/ansi-escapes-4.3.1.tgz#a5c47cc43181f1f38ffd7076837700d395522a61"
|
|
||||||
integrity sha512-JWF7ocqNrp8u9oqpgV+wH5ftbt+cfvv+PTjOvKLT3AdYly/LmORARfEVT1iyjwN+4MqE5UmVKoAdIBqeoCHgLA==
|
|
||||||
dependencies:
|
|
||||||
type-fest "^0.11.0"
|
|
||||||
|
|
||||||
ansi-regex@^5.0.0:
|
ansi-regex@^5.0.0:
|
||||||
version "5.0.0"
|
version "5.0.0"
|
||||||
resolved "http://mirrors.cloud.tencent.com/npm/ansi-regex/-/ansi-regex-5.0.0.tgz#388539f55179bf39339c81af30a654d69f87cb75"
|
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.0.tgz#388539f55179bf39339c81af30a654d69f87cb75"
|
||||||
integrity sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==
|
integrity sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==
|
||||||
|
|
||||||
ansi-styles@^3.2.1:
|
ansi-styles@^3.2.1:
|
||||||
@ -63,6 +48,20 @@ balanced-match@^1.0.0:
|
|||||||
resolved "http://mirrors.cloud.tencent.com/npm/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767"
|
resolved "http://mirrors.cloud.tencent.com/npm/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767"
|
||||||
integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c=
|
integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c=
|
||||||
|
|
||||||
|
base64-js@^1.3.1:
|
||||||
|
version "1.5.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a"
|
||||||
|
integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==
|
||||||
|
|
||||||
|
bl@^4.0.3:
|
||||||
|
version "4.1.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/bl/-/bl-4.1.0.tgz#451535264182bec2fbbc83a62ab98cf11d9f7b3a"
|
||||||
|
integrity sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==
|
||||||
|
dependencies:
|
||||||
|
buffer "^5.5.0"
|
||||||
|
inherits "^2.0.4"
|
||||||
|
readable-stream "^3.4.0"
|
||||||
|
|
||||||
brace-expansion@^1.1.7:
|
brace-expansion@^1.1.7:
|
||||||
version "1.1.11"
|
version "1.1.11"
|
||||||
resolved "http://mirrors.cloud.tencent.com/npm/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd"
|
resolved "http://mirrors.cloud.tencent.com/npm/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd"
|
||||||
@ -71,6 +70,14 @@ brace-expansion@^1.1.7:
|
|||||||
balanced-match "^1.0.0"
|
balanced-match "^1.0.0"
|
||||||
concat-map "0.0.1"
|
concat-map "0.0.1"
|
||||||
|
|
||||||
|
buffer@^5.5.0:
|
||||||
|
version "5.7.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.7.1.tgz#ba62e7c13133053582197160851a8f648e99eed0"
|
||||||
|
integrity sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==
|
||||||
|
dependencies:
|
||||||
|
base64-js "^1.3.1"
|
||||||
|
ieee754 "^1.1.13"
|
||||||
|
|
||||||
chalk@^2.4.2:
|
chalk@^2.4.2:
|
||||||
version "2.4.2"
|
version "2.4.2"
|
||||||
resolved "http://mirrors.cloud.tencent.com/npm/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424"
|
resolved "http://mirrors.cloud.tencent.com/npm/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424"
|
||||||
@ -80,7 +87,7 @@ chalk@^2.4.2:
|
|||||||
escape-string-regexp "^1.0.5"
|
escape-string-regexp "^1.0.5"
|
||||||
supports-color "^5.3.0"
|
supports-color "^5.3.0"
|
||||||
|
|
||||||
chalk@^4.1.0:
|
chalk@^4.0.0, chalk@^4.1.0:
|
||||||
version "4.1.0"
|
version "4.1.0"
|
||||||
resolved "http://mirrors.cloud.tencent.com/npm/chalk/-/chalk-4.1.0.tgz#4e14870a618d9e2edd97dd8345fd9d9dc315646a"
|
resolved "http://mirrors.cloud.tencent.com/npm/chalk/-/chalk-4.1.0.tgz#4e14870a618d9e2edd97dd8345fd9d9dc315646a"
|
||||||
integrity sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==
|
integrity sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==
|
||||||
@ -88,22 +95,22 @@ chalk@^4.1.0:
|
|||||||
ansi-styles "^4.1.0"
|
ansi-styles "^4.1.0"
|
||||||
supports-color "^7.1.0"
|
supports-color "^7.1.0"
|
||||||
|
|
||||||
chardet@^0.7.0:
|
|
||||||
version "0.7.0"
|
|
||||||
resolved "http://mirrors.cloud.tencent.com/npm/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e"
|
|
||||||
integrity sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==
|
|
||||||
|
|
||||||
cli-cursor@^3.1.0:
|
cli-cursor@^3.1.0:
|
||||||
version "3.1.0"
|
version "3.1.0"
|
||||||
resolved "http://mirrors.cloud.tencent.com/npm/cli-cursor/-/cli-cursor-3.1.0.tgz#264305a7ae490d1d03bf0c9ba7c925d1753af307"
|
resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-3.1.0.tgz#264305a7ae490d1d03bf0c9ba7c925d1753af307"
|
||||||
integrity sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==
|
integrity sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==
|
||||||
dependencies:
|
dependencies:
|
||||||
restore-cursor "^3.1.0"
|
restore-cursor "^3.1.0"
|
||||||
|
|
||||||
cli-width@^3.0.0:
|
cli-spinners@^2.5.0:
|
||||||
version "3.0.0"
|
version "2.5.0"
|
||||||
resolved "https://mirrors.tencent.com/npm/cli-width/-/cli-width-3.0.0.tgz#a2f48437a2caa9a22436e794bf071ec9e61cedf6"
|
resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-2.5.0.tgz#12763e47251bf951cb75c201dfa58ff1bcb2d047"
|
||||||
integrity sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw==
|
integrity sha512-PC+AmIuK04E6aeSs/pUccSujsTzBhu4HzC2dL+CfJB/Jcc2qTRbEwZQDfIUpt2Xl8BodYBEq8w4fc0kU2I9DjQ==
|
||||||
|
|
||||||
|
clone@^1.0.2:
|
||||||
|
version "1.0.4"
|
||||||
|
resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.4.tgz#da309cc263df15994c688ca902179ca3c7cd7c7e"
|
||||||
|
integrity sha1-2jCcwmPfFZlMaIypAheco8fNfH4=
|
||||||
|
|
||||||
color-convert@^1.9.0:
|
color-convert@^1.9.0:
|
||||||
version "1.9.3"
|
version "1.9.3"
|
||||||
@ -134,6 +141,13 @@ concat-map@0.0.1:
|
|||||||
resolved "http://mirrors.cloud.tencent.com/npm/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
|
resolved "http://mirrors.cloud.tencent.com/npm/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
|
||||||
integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=
|
integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=
|
||||||
|
|
||||||
|
defaults@^1.0.3:
|
||||||
|
version "1.0.3"
|
||||||
|
resolved "https://registry.yarnpkg.com/defaults/-/defaults-1.0.3.tgz#c656051e9817d9ff08ed881477f3fe4019f3ef7d"
|
||||||
|
integrity sha1-xlYFHpgX2f8I7YgUd/P+QBnz730=
|
||||||
|
dependencies:
|
||||||
|
clone "^1.0.2"
|
||||||
|
|
||||||
ejs@^3.1.6:
|
ejs@^3.1.6:
|
||||||
version "3.1.6"
|
version "3.1.6"
|
||||||
resolved "http://mirrors.cloud.tencent.com/npm/ejs/-/ejs-3.1.6.tgz#5bfd0a0689743bb5268b3550cceeebbc1702822a"
|
resolved "http://mirrors.cloud.tencent.com/npm/ejs/-/ejs-3.1.6.tgz#5bfd0a0689743bb5268b3550cceeebbc1702822a"
|
||||||
@ -141,32 +155,11 @@ ejs@^3.1.6:
|
|||||||
dependencies:
|
dependencies:
|
||||||
jake "^10.6.1"
|
jake "^10.6.1"
|
||||||
|
|
||||||
emoji-regex@^8.0.0:
|
|
||||||
version "8.0.0"
|
|
||||||
resolved "http://mirrors.cloud.tencent.com/npm/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37"
|
|
||||||
integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==
|
|
||||||
|
|
||||||
escape-string-regexp@^1.0.5:
|
escape-string-regexp@^1.0.5:
|
||||||
version "1.0.5"
|
version "1.0.5"
|
||||||
resolved "https://mirrors.tencent.com/npm/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4"
|
resolved "https://mirrors.tencent.com/npm/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4"
|
||||||
integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=
|
integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=
|
||||||
|
|
||||||
external-editor@^3.0.3:
|
|
||||||
version "3.1.0"
|
|
||||||
resolved "http://mirrors.cloud.tencent.com/npm/external-editor/-/external-editor-3.1.0.tgz#cb03f740befae03ea4d283caed2741a83f335495"
|
|
||||||
integrity sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==
|
|
||||||
dependencies:
|
|
||||||
chardet "^0.7.0"
|
|
||||||
iconv-lite "^0.4.24"
|
|
||||||
tmp "^0.0.33"
|
|
||||||
|
|
||||||
figures@^3.0.0:
|
|
||||||
version "3.2.0"
|
|
||||||
resolved "http://mirrors.cloud.tencent.com/npm/figures/-/figures-3.2.0.tgz#625c18bd293c604dc4a8ddb2febf0c88341746af"
|
|
||||||
integrity sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==
|
|
||||||
dependencies:
|
|
||||||
escape-string-regexp "^1.0.5"
|
|
||||||
|
|
||||||
filelist@^1.0.1:
|
filelist@^1.0.1:
|
||||||
version "1.0.2"
|
version "1.0.2"
|
||||||
resolved "http://mirrors.cloud.tencent.com/npm/filelist/-/filelist-1.0.2.tgz#80202f21462d4d1c2e214119b1807c1bc0380e5b"
|
resolved "http://mirrors.cloud.tencent.com/npm/filelist/-/filelist-1.0.2.tgz#80202f21462d4d1c2e214119b1807c1bc0380e5b"
|
||||||
@ -184,36 +177,20 @@ has-flag@^4.0.0:
|
|||||||
resolved "http://mirrors.cloud.tencent.com/npm/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b"
|
resolved "http://mirrors.cloud.tencent.com/npm/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b"
|
||||||
integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==
|
integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==
|
||||||
|
|
||||||
iconv-lite@^0.4.24:
|
ieee754@^1.1.13:
|
||||||
version "0.4.24"
|
version "1.2.1"
|
||||||
resolved "http://mirrors.cloud.tencent.com/npm/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b"
|
resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352"
|
||||||
integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==
|
integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==
|
||||||
dependencies:
|
|
||||||
safer-buffer ">= 2.1.2 < 3"
|
|
||||||
|
|
||||||
inquirer@^7.3.3:
|
inherits@^2.0.3, inherits@^2.0.4:
|
||||||
version "7.3.3"
|
version "2.0.4"
|
||||||
resolved "https://mirrors.tencent.com/npm/inquirer/-/inquirer-7.3.3.tgz#04d176b2af04afc157a83fd7c100e98ee0aad003"
|
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c"
|
||||||
integrity sha512-JG3eIAj5V9CwcGvuOmoo6LB9kbAYT8HXffUl6memuszlwDC/qvFAJw49XJ5NROSFNPxp3iQg1GqkFhaY/CR0IA==
|
integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==
|
||||||
dependencies:
|
|
||||||
ansi-escapes "^4.2.1"
|
|
||||||
chalk "^4.1.0"
|
|
||||||
cli-cursor "^3.1.0"
|
|
||||||
cli-width "^3.0.0"
|
|
||||||
external-editor "^3.0.3"
|
|
||||||
figures "^3.0.0"
|
|
||||||
lodash "^4.17.19"
|
|
||||||
mute-stream "0.0.8"
|
|
||||||
run-async "^2.4.0"
|
|
||||||
rxjs "^6.6.0"
|
|
||||||
string-width "^4.1.0"
|
|
||||||
strip-ansi "^6.0.0"
|
|
||||||
through "^2.3.6"
|
|
||||||
|
|
||||||
is-fullwidth-code-point@^3.0.0:
|
is-interactive@^1.0.0:
|
||||||
version "3.0.0"
|
version "1.0.0"
|
||||||
resolved "http://mirrors.cloud.tencent.com/npm/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d"
|
resolved "https://registry.yarnpkg.com/is-interactive/-/is-interactive-1.0.0.tgz#cea6e6ae5c870a7b0a0004070b7b587e0252912e"
|
||||||
integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==
|
integrity sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==
|
||||||
|
|
||||||
jake@^10.6.1:
|
jake@^10.6.1:
|
||||||
version "10.8.2"
|
version "10.8.2"
|
||||||
@ -225,14 +202,21 @@ jake@^10.6.1:
|
|||||||
filelist "^1.0.1"
|
filelist "^1.0.1"
|
||||||
minimatch "^3.0.4"
|
minimatch "^3.0.4"
|
||||||
|
|
||||||
lodash@^4.17.19:
|
kleur@^3.0.3:
|
||||||
version "4.17.20"
|
version "3.0.3"
|
||||||
resolved "http://mirrors.cloud.tencent.com/npm/lodash/-/lodash-4.17.20.tgz#b44a9b6297bcb698f1c51a3545a2b3b368d59c52"
|
resolved "https://registry.yarnpkg.com/kleur/-/kleur-3.0.3.tgz#a79c9ecc86ee1ce3fa6206d1216c501f147fc07e"
|
||||||
integrity sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==
|
integrity sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==
|
||||||
|
|
||||||
|
log-symbols@^4.0.0:
|
||||||
|
version "4.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-4.0.0.tgz#69b3cc46d20f448eccdb75ea1fa733d9e821c920"
|
||||||
|
integrity sha512-FN8JBzLx6CzeMrB0tg6pqlGU1wCrXW+ZXGH481kfsBqer0hToTIiHdjH4Mq8xJUbvATujKCvaREGWpGUionraA==
|
||||||
|
dependencies:
|
||||||
|
chalk "^4.0.0"
|
||||||
|
|
||||||
mimic-fn@^2.1.0:
|
mimic-fn@^2.1.0:
|
||||||
version "2.1.0"
|
version "2.1.0"
|
||||||
resolved "http://mirrors.cloud.tencent.com/npm/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b"
|
resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b"
|
||||||
integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==
|
integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==
|
||||||
|
|
||||||
minimatch@^3.0.4:
|
minimatch@^3.0.4:
|
||||||
@ -242,70 +226,82 @@ minimatch@^3.0.4:
|
|||||||
dependencies:
|
dependencies:
|
||||||
brace-expansion "^1.1.7"
|
brace-expansion "^1.1.7"
|
||||||
|
|
||||||
mute-stream@0.0.8:
|
|
||||||
version "0.0.8"
|
|
||||||
resolved "http://mirrors.cloud.tencent.com/npm/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d"
|
|
||||||
integrity sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==
|
|
||||||
|
|
||||||
onetime@^5.1.0:
|
onetime@^5.1.0:
|
||||||
version "5.1.2"
|
version "5.1.2"
|
||||||
resolved "http://mirrors.cloud.tencent.com/npm/onetime/-/onetime-5.1.2.tgz#d0e96ebb56b07476df1dd9c4806e5237985ca45e"
|
resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.2.tgz#d0e96ebb56b07476df1dd9c4806e5237985ca45e"
|
||||||
integrity sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==
|
integrity sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==
|
||||||
dependencies:
|
dependencies:
|
||||||
mimic-fn "^2.1.0"
|
mimic-fn "^2.1.0"
|
||||||
|
|
||||||
os-tmpdir@~1.0.2:
|
ora@^5.3.0:
|
||||||
version "1.0.2"
|
version "5.3.0"
|
||||||
resolved "https://mirrors.tencent.com/npm/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274"
|
resolved "https://registry.yarnpkg.com/ora/-/ora-5.3.0.tgz#fb832899d3a1372fe71c8b2c534bbfe74961bb6f"
|
||||||
integrity sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=
|
integrity sha512-zAKMgGXUim0Jyd6CXK9lraBnD3H5yPGBPPOkC23a2BG6hsm4Zu6OQSjQuEtV0BHDf4aKHcUFvJiGRrFuW3MG8g==
|
||||||
|
dependencies:
|
||||||
|
bl "^4.0.3"
|
||||||
|
chalk "^4.1.0"
|
||||||
|
cli-cursor "^3.1.0"
|
||||||
|
cli-spinners "^2.5.0"
|
||||||
|
is-interactive "^1.0.0"
|
||||||
|
log-symbols "^4.0.0"
|
||||||
|
strip-ansi "^6.0.0"
|
||||||
|
wcwidth "^1.0.1"
|
||||||
|
|
||||||
prettier@^2.2.1:
|
prettier@^2.2.1:
|
||||||
version "2.2.1"
|
version "2.2.1"
|
||||||
resolved "http://mirrors.cloud.tencent.com/npm/prettier/-/prettier-2.2.1.tgz#795a1a78dd52f073da0cd42b21f9c91381923ff5"
|
resolved "http://mirrors.cloud.tencent.com/npm/prettier/-/prettier-2.2.1.tgz#795a1a78dd52f073da0cd42b21f9c91381923ff5"
|
||||||
integrity sha512-PqyhM2yCjg/oKkFPtTGUojv7gnZAoG80ttl45O6x2Ug/rMJw4wcc9k6aaf2hibP7BGVCCM33gZoGjyvt9mm16Q==
|
integrity sha512-PqyhM2yCjg/oKkFPtTGUojv7gnZAoG80ttl45O6x2Ug/rMJw4wcc9k6aaf2hibP7BGVCCM33gZoGjyvt9mm16Q==
|
||||||
|
|
||||||
|
prompts@^2.4.0:
|
||||||
|
version "2.4.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/prompts/-/prompts-2.4.0.tgz#4aa5de0723a231d1ee9121c40fdf663df73f61d7"
|
||||||
|
integrity sha512-awZAKrk3vN6CroQukBL+R9051a4R3zCZBlJm/HBfrSZ8iTpYix3VX1vU4mveiLpiwmOJT4wokTF9m6HUk4KqWQ==
|
||||||
|
dependencies:
|
||||||
|
kleur "^3.0.3"
|
||||||
|
sisteransi "^1.0.5"
|
||||||
|
|
||||||
|
readable-stream@^3.4.0:
|
||||||
|
version "3.6.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198"
|
||||||
|
integrity sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==
|
||||||
|
dependencies:
|
||||||
|
inherits "^2.0.3"
|
||||||
|
string_decoder "^1.1.1"
|
||||||
|
util-deprecate "^1.0.1"
|
||||||
|
|
||||||
restore-cursor@^3.1.0:
|
restore-cursor@^3.1.0:
|
||||||
version "3.1.0"
|
version "3.1.0"
|
||||||
resolved "http://mirrors.cloud.tencent.com/npm/restore-cursor/-/restore-cursor-3.1.0.tgz#39f67c54b3a7a58cea5236d95cf0034239631f7e"
|
resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-3.1.0.tgz#39f67c54b3a7a58cea5236d95cf0034239631f7e"
|
||||||
integrity sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==
|
integrity sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==
|
||||||
dependencies:
|
dependencies:
|
||||||
onetime "^5.1.0"
|
onetime "^5.1.0"
|
||||||
signal-exit "^3.0.2"
|
signal-exit "^3.0.2"
|
||||||
|
|
||||||
run-async@^2.4.0:
|
safe-buffer@~5.2.0:
|
||||||
version "2.4.1"
|
version "5.2.1"
|
||||||
resolved "https://mirrors.tencent.com/npm/run-async/-/run-async-2.4.1.tgz#8440eccf99ea3e70bd409d49aab88e10c189a455"
|
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6"
|
||||||
integrity sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==
|
integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==
|
||||||
|
|
||||||
rxjs@^6.4.0, rxjs@^6.6.0:
|
|
||||||
version "6.6.3"
|
|
||||||
resolved "http://mirrors.cloud.tencent.com/npm/rxjs/-/rxjs-6.6.3.tgz#8ca84635c4daa900c0d3967a6ee7ac60271ee552"
|
|
||||||
integrity sha512-trsQc+xYYXZ3urjOiJOuCOa5N3jAZ3eiSpQB5hIT8zGlL2QfnHLJ2r7GMkBGuIausdJN1OneaI6gQlsqNHHmZQ==
|
|
||||||
dependencies:
|
|
||||||
tslib "^1.9.0"
|
|
||||||
|
|
||||||
"safer-buffer@>= 2.1.2 < 3":
|
|
||||||
version "2.1.2"
|
|
||||||
resolved "http://mirrors.cloud.tencent.com/npm/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a"
|
|
||||||
integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==
|
|
||||||
|
|
||||||
signal-exit@^3.0.2:
|
signal-exit@^3.0.2:
|
||||||
version "3.0.3"
|
version "3.0.3"
|
||||||
resolved "http://mirrors.cloud.tencent.com/npm/signal-exit/-/signal-exit-3.0.3.tgz#a1410c2edd8f077b08b4e253c8eacfcaf057461c"
|
resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.3.tgz#a1410c2edd8f077b08b4e253c8eacfcaf057461c"
|
||||||
integrity sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==
|
integrity sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==
|
||||||
|
|
||||||
string-width@^4.1.0:
|
sisteransi@^1.0.5:
|
||||||
version "4.2.0"
|
version "1.0.5"
|
||||||
resolved "http://mirrors.cloud.tencent.com/npm/string-width/-/string-width-4.2.0.tgz#952182c46cc7b2c313d1596e623992bd163b72b5"
|
resolved "https://registry.yarnpkg.com/sisteransi/-/sisteransi-1.0.5.tgz#134d681297756437cc05ca01370d3a7a571075ed"
|
||||||
integrity sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==
|
integrity sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==
|
||||||
|
|
||||||
|
string_decoder@^1.1.1:
|
||||||
|
version "1.3.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e"
|
||||||
|
integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==
|
||||||
dependencies:
|
dependencies:
|
||||||
emoji-regex "^8.0.0"
|
safe-buffer "~5.2.0"
|
||||||
is-fullwidth-code-point "^3.0.0"
|
|
||||||
strip-ansi "^6.0.0"
|
|
||||||
|
|
||||||
strip-ansi@^6.0.0:
|
strip-ansi@^6.0.0:
|
||||||
version "6.0.0"
|
version "6.0.0"
|
||||||
resolved "http://mirrors.cloud.tencent.com/npm/strip-ansi/-/strip-ansi-6.0.0.tgz#0b1571dd7669ccd4f3e06e14ef1eed26225ae532"
|
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.0.tgz#0b1571dd7669ccd4f3e06e14ef1eed26225ae532"
|
||||||
integrity sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==
|
integrity sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==
|
||||||
dependencies:
|
dependencies:
|
||||||
ansi-regex "^5.0.0"
|
ansi-regex "^5.0.0"
|
||||||
@ -324,24 +320,14 @@ supports-color@^7.1.0:
|
|||||||
dependencies:
|
dependencies:
|
||||||
has-flag "^4.0.0"
|
has-flag "^4.0.0"
|
||||||
|
|
||||||
through@^2.3.6:
|
util-deprecate@^1.0.1:
|
||||||
version "2.3.8"
|
version "1.0.2"
|
||||||
resolved "http://mirrors.cloud.tencent.com/npm/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5"
|
resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf"
|
||||||
integrity sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=
|
integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=
|
||||||
|
|
||||||
tmp@^0.0.33:
|
wcwidth@^1.0.1:
|
||||||
version "0.0.33"
|
version "1.0.1"
|
||||||
resolved "https://mirrors.tencent.com/npm/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9"
|
resolved "https://registry.yarnpkg.com/wcwidth/-/wcwidth-1.0.1.tgz#f0b0dcf915bc5ff1528afadb2c0e17b532da2fe8"
|
||||||
integrity sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==
|
integrity sha1-8LDc+RW8X/FSivrbLA4XtTLaL+g=
|
||||||
dependencies:
|
dependencies:
|
||||||
os-tmpdir "~1.0.2"
|
defaults "^1.0.3"
|
||||||
|
|
||||||
tslib@^1.9.0:
|
|
||||||
version "1.14.1"
|
|
||||||
resolved "https://mirrors.tencent.com/npm/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00"
|
|
||||||
integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==
|
|
||||||
|
|
||||||
type-fest@^0.11.0:
|
|
||||||
version "0.11.0"
|
|
||||||
resolved "http://mirrors.cloud.tencent.com/npm/type-fest/-/type-fest-0.11.0.tgz#97abf0872310fed88a5c466b25681576145e33f1"
|
|
||||||
integrity sha512-OdjXJxnCN1AvyLSzeKIgXTXxV+99ZuXl3Hpo9XpJAv9MBcHrrJOQ5kV7ypXOuQie+AmWG25hLbiKdwYTifzcfQ==
|
|
||||||
|
Loading…
Reference in New Issue
Block a user