@soybeanjs/cli 0.1.8 → 0.1.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,54 +1,54 @@
1
- # @soybeanjs/cli
2
-
3
- SoybeanJS 的命令行工具
4
-
5
- ## 用法
6
-
7
- ### 安装
8
-
9
- ```bash
10
- pnpm i -D @soybeanjs/cli
11
- ```
12
-
13
- ### 使用
14
-
15
- 示例:
16
-
17
- ```bash
18
- pnpm soy -h
19
- ```
20
-
21
- ## 命令介绍
22
-
23
- | 命令 | 作用 |
24
- | ----------------- | ---------------------------------------- |
25
- | help | 查看全部命令用法 |
26
- | git-commit | 生成符合 Angular 规范的 git 提交信息 |
27
- | git-commit-verify | 校验 git 的提交信息是否符合 Angular 规范 |
28
- | cleanup | 清空依赖和构建产物 |
29
- | cleanup-deep | 清空依赖和构建产物(包含 深层级) |
30
- | init-git-hooks | 初始化 simple-gi t-hooks 钩子 |
31
- | update-pkg | 升级依赖 |
32
- | prettier-format | prettier 格式化 |
33
-
34
- ### prettier-format
35
-
36
- 底层调用 prettier --write 达到格式化文件的目的
37
-
38
- 默认忽略的格式化文件:
39
-
40
- - js,jsx,mjs,cjs,json,ts,tsx,mts,cts,vue,svelte,astro
41
- > 以上文件通过 eslint 去格式化
42
- - node_modules
43
- - _.min._
44
- - CHANGELOG.md
45
- - dist
46
- - LICENSE\*
47
- - output
48
- - coverage
49
- - public
50
- - temp
51
- - package-lock.json
52
- - pnpm-lock.yaml
53
- - yarn.lock
54
- - **snapshots**
1
+ # @soybeanjs/cli
2
+
3
+ SoybeanJS 的命令行工具
4
+
5
+ ## 用法
6
+
7
+ ### 安装
8
+
9
+ ```bash
10
+ pnpm i -D @soybeanjs/cli
11
+ ```
12
+
13
+ ### 使用
14
+
15
+ 示例:
16
+
17
+ ```bash
18
+ pnpm soy -h
19
+ ```
20
+
21
+ ## 命令介绍
22
+
23
+ | 命令 | 作用 |
24
+ | ----------------- | ---------------------------------------- |
25
+ | help | 查看全部命令用法 |
26
+ | git-commit | 生成符合 Angular 规范的 git 提交信息 |
27
+ | git-commit-verify | 校验 git 的提交信息是否符合 Angular 规范 |
28
+ | cleanup | 清空依赖和构建产物 |
29
+ | cleanup-deep | 清空依赖和构建产物(包含 深层级) |
30
+ | init-git-hooks | 初始化 simple-gi t-hooks 钩子 |
31
+ | update-pkg | 升级依赖 |
32
+ | prettier-format | prettier 格式化 |
33
+
34
+ ### prettier-format
35
+
36
+ 底层调用 prettier --write 达到格式化文件的目的
37
+
38
+ 默认忽略的格式化文件:
39
+
40
+ - js,jsx,mjs,cjs,json,ts,tsx,mts,cts,vue,svelte,astro
41
+ > 以上文件通过 eslint 去格式化
42
+ - node_modules
43
+ - _.min._
44
+ - CHANGELOG.md
45
+ - dist
46
+ - LICENSE\*
47
+ - output
48
+ - coverage
49
+ - public
50
+ - temp
51
+ - package-lock.json
52
+ - pnpm-lock.yaml
53
+ - yarn.lock
54
+ - **snapshots**
package/bin/index.js CHANGED
@@ -271,7 +271,7 @@ var import_kolorist2 = require("kolorist");
271
271
  // package.json
272
272
  var package_default = {
273
273
  name: "@soybeanjs/cli",
274
- version: "0.1.7",
274
+ version: "0.1.8",
275
275
  description: "SoybeanJS's command lint tools",
276
276
  author: {
277
277
  name: "Soybean",
@@ -306,20 +306,19 @@ var package_default = {
306
306
  },
307
307
  dependencies: {
308
308
  commander: "^10.0.1",
309
+ enquirer: "^2.3.6",
309
310
  execa: "7.1.1",
310
- kolorist: "^1.7.0",
311
+ kolorist: "^1.8.0",
311
312
  minimist: "^1.2.8",
312
313
  "npm-check-updates": "^16.10.9",
313
- prompts: "^2.4.2",
314
314
  rimraf: "^5.0.0"
315
315
  },
316
316
  devDependencies: {
317
317
  "@soybeanjs/cli": "link:",
318
- "@types/prompts": "^2.4.4",
319
318
  bumpp: "^9.1.0",
320
319
  eslint: "^8.39.0",
321
320
  "eslint-config-soybeanjs": "0.3.3",
322
- "lint-staged": "^13.2.1",
321
+ "lint-staged": "^13.2.2",
323
322
  "simple-git-hooks": "^2.8.1",
324
323
  tsup: "^6.7.0",
325
324
  tsx: "^3.12.6",
@@ -340,7 +339,7 @@ var package_default = {
340
339
  };
341
340
 
342
341
  // src/command/git/commit.ts
343
- var import_prompts = __toESM(require("prompts"));
342
+ var import_enquirer = __toESM(require("enquirer"));
344
343
  var import_execa = require("execa");
345
344
 
346
345
  // src/command/git/config.ts
@@ -378,18 +377,18 @@ var scopes = [
378
377
 
379
378
  // src/command/git/commit.ts
380
379
  async function gitCommit() {
381
- const result = await (0, import_prompts.default)([
380
+ const result = await import_enquirer.default.prompt([
382
381
  {
383
382
  name: "types",
384
383
  type: "select",
385
384
  message: "\u8BF7\u9009\u62E9\u63D0\u4EA4\u7684\u7C7B\u578B",
386
- choices: types
385
+ choices: types.map((item) => ({ name: item.value, message: item.title }))
387
386
  },
388
387
  {
389
388
  name: "scopes",
390
389
  type: "select",
391
390
  message: "\u9009\u62E9\u4E00\u4E2Ascope",
392
- choices: scopes
391
+ choices: scopes.map((item) => ({ name: item.value, message: item.title }))
393
392
  },
394
393
  {
395
394
  name: "description",
package/bin/index.mjs CHANGED
@@ -270,7 +270,7 @@ import { blue } from "kolorist";
270
270
  // package.json
271
271
  var package_default = {
272
272
  name: "@soybeanjs/cli",
273
- version: "0.1.7",
273
+ version: "0.1.8",
274
274
  description: "SoybeanJS's command lint tools",
275
275
  author: {
276
276
  name: "Soybean",
@@ -305,20 +305,19 @@ var package_default = {
305
305
  },
306
306
  dependencies: {
307
307
  commander: "^10.0.1",
308
+ enquirer: "^2.3.6",
308
309
  execa: "7.1.1",
309
- kolorist: "^1.7.0",
310
+ kolorist: "^1.8.0",
310
311
  minimist: "^1.2.8",
311
312
  "npm-check-updates": "^16.10.9",
312
- prompts: "^2.4.2",
313
313
  rimraf: "^5.0.0"
314
314
  },
315
315
  devDependencies: {
316
316
  "@soybeanjs/cli": "link:",
317
- "@types/prompts": "^2.4.4",
318
317
  bumpp: "^9.1.0",
319
318
  eslint: "^8.39.0",
320
319
  "eslint-config-soybeanjs": "0.3.3",
321
- "lint-staged": "^13.2.1",
320
+ "lint-staged": "^13.2.2",
322
321
  "simple-git-hooks": "^2.8.1",
323
322
  tsup: "^6.7.0",
324
323
  tsx: "^3.12.6",
@@ -339,7 +338,7 @@ var package_default = {
339
338
  };
340
339
 
341
340
  // src/command/git/commit.ts
342
- import prompts from "prompts";
341
+ import enquirer from "enquirer";
343
342
  import { execa } from "execa";
344
343
 
345
344
  // src/command/git/config.ts
@@ -377,18 +376,18 @@ var scopes = [
377
376
 
378
377
  // src/command/git/commit.ts
379
378
  async function gitCommit() {
380
- const result = await prompts([
379
+ const result = await enquirer.prompt([
381
380
  {
382
381
  name: "types",
383
382
  type: "select",
384
383
  message: "\u8BF7\u9009\u62E9\u63D0\u4EA4\u7684\u7C7B\u578B",
385
- choices: types
384
+ choices: types.map((item) => ({ name: item.value, message: item.title }))
386
385
  },
387
386
  {
388
387
  name: "scopes",
389
388
  type: "select",
390
389
  message: "\u9009\u62E9\u4E00\u4E2Ascope",
391
- choices: scopes
390
+ choices: scopes.map((item) => ({ name: item.value, message: item.title }))
392
391
  },
393
392
  {
394
393
  name: "description",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@soybeanjs/cli",
3
- "version": "0.1.8",
3
+ "version": "0.1.9",
4
4
  "description": "SoybeanJS's command lint tools",
5
5
  "author": {
6
6
  "name": "Soybean",
@@ -24,20 +24,19 @@
24
24
  ],
25
25
  "dependencies": {
26
26
  "commander": "^10.0.1",
27
+ "enquirer": "^2.3.6",
27
28
  "execa": "7.1.1",
28
- "kolorist": "^1.7.0",
29
+ "kolorist": "^1.8.0",
29
30
  "minimist": "^1.2.8",
30
31
  "npm-check-updates": "^16.10.9",
31
- "prompts": "^2.4.2",
32
32
  "rimraf": "^5.0.0"
33
33
  },
34
34
  "devDependencies": {
35
35
  "@soybeanjs/cli": "link:",
36
- "@types/prompts": "^2.4.4",
37
36
  "bumpp": "^9.1.0",
38
37
  "eslint": "^8.39.0",
39
38
  "eslint-config-soybeanjs": "0.3.3",
40
- "lint-staged": "^13.2.1",
39
+ "lint-staged": "^13.2.2",
41
40
  "simple-git-hooks": "^2.8.1",
42
41
  "tsup": "^6.7.0",
43
42
  "tsx": "^3.12.6",