@soybeanjs/cli 0.1.8 → 0.2.2

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.
Files changed (4) hide show
  1. package/README.md +54 -54
  2. package/bin/index.js +115 -71
  3. package/bin/index.mjs +115 -71
  4. package/package.json +23 -21
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.2.0",
275
275
  description: "SoybeanJS's command lint tools",
276
276
  author: {
277
277
  name: "Soybean",
@@ -286,6 +286,9 @@ var package_default = {
286
286
  bugs: {
287
287
  url: "https://github.com/honghuangdc/soybean-cli/issues"
288
288
  },
289
+ publishConfig: {
290
+ registry: "https://registry.npmjs.org/"
291
+ },
289
292
  bin: {
290
293
  soybean: "bin/index.mjs",
291
294
  soy: "bin/index.mjs"
@@ -300,30 +303,32 @@ var package_default = {
300
303
  commit: "soy git-commit",
301
304
  cleanup: "soy cleanup",
302
305
  "update-pkg": "soy update-pkg",
303
- "update-version": "bumpp package.json",
306
+ "update-version": 'bumpp package.json --execute="pnpm gen-log" --commit --all --push --tag',
304
307
  "publish-pkg": "pnpm -r publish --access public",
305
- release: "pnpm update-version && pnpm publish-pkg"
308
+ release: "pnpm update-version && pnpm publish-pkg",
309
+ "gen-log": "conventional-changelog -p angular -i CHANGELOG.md -s"
306
310
  },
307
311
  dependencies: {
308
- commander: "^10.0.1",
312
+ commander: "10.0.1",
313
+ enquirer: "2.3.6",
309
314
  execa: "7.1.1",
310
- kolorist: "^1.7.0",
311
- minimist: "^1.2.8",
312
- "npm-check-updates": "^16.10.9",
313
- prompts: "^2.4.2",
314
- rimraf: "^5.0.0"
315
+ kolorist: "1.8.0",
316
+ minimist: "1.2.8",
317
+ "npm-check-updates": "16.10.12",
318
+ rimraf: "5.0.1"
315
319
  },
316
320
  devDependencies: {
317
321
  "@soybeanjs/cli": "link:",
318
- "@types/prompts": "^2.4.4",
319
- bumpp: "^9.1.0",
320
- eslint: "^8.39.0",
321
- "eslint-config-soybeanjs": "0.3.3",
322
- "lint-staged": "^13.2.1",
323
- "simple-git-hooks": "^2.8.1",
324
- tsup: "^6.7.0",
325
- tsx: "^3.12.6",
326
- typescript: "^5.0.4"
322
+ "@types/node": "^20.2.3",
323
+ bumpp: "9.1.0",
324
+ "conventional-changelog-cli": "^2.2.2",
325
+ eslint: "8.41.0",
326
+ "eslint-config-soybeanjs": "0.3.8",
327
+ "lint-staged": "13.2.2",
328
+ "simple-git-hooks": "2.8.1",
329
+ tsup: "6.7.0",
330
+ tsx: "3.12.7",
331
+ typescript: "5.0.4"
327
332
  },
328
333
  "simple-git-hooks": {
329
334
  "commit-msg": "pnpm soybean git-commit-verify",
@@ -333,14 +338,11 @@ var package_default = {
333
338
  "*.{js,jsx,mjs,cjs,json,ts,tsx,mts,cts,vue,svelte,astro}": [
334
339
  "eslint . --fix"
335
340
  ]
336
- },
337
- publishConfig: {
338
- registry: "https://registry.npmjs.org/"
339
341
  }
340
342
  };
341
343
 
342
344
  // src/command/git/commit.ts
343
- var import_prompts = __toESM(require("prompts"));
345
+ var import_enquirer = __toESM(require("enquirer"));
344
346
  var import_execa = require("execa");
345
347
 
346
348
  // src/command/git/config.ts
@@ -353,7 +355,6 @@ var types = [
353
355
  { value: "refactor", title: "refactor: \u4EE3\u7801\u91CD\u6784\uFF0C\u6CA1\u6709\u52A0\u65B0\u529F\u80FD\u6216\u8005\u4FEE\u590Dbug" },
354
356
  { value: "perf", title: "perf: \u4F18\u5316\u76F8\u5173\uFF0C\u6BD4\u5982\u63D0\u5347\u6027\u80FD\u3001\u4F53\u9A8C" },
355
357
  { value: "test", title: "test: \u6DFB\u52A0\u6D4B\u8BD5\u7528\u4F8B" },
356
- { value: "build", title: "build: \u4F9D\u8D56\u76F8\u5173\u7684\u5185\u5BB9" },
357
358
  { value: "ci", title: "ci: CI\u914D\u7F6E\u76F8\u5173\uFF0C\u4F8B\u5982\u5BF9k8s\uFF0Cdocker\u7684\u914D\u7F6E\u6587\u4EF6\u7684\u4FEE\u6539" },
358
359
  { value: "chore", title: "chore: \u6539\u53D8\u6784\u5EFA\u6D41\u7A0B\u3001\u6216\u8005\u589E\u52A0\u4F9D\u8D56\u5E93\u3001\u5DE5\u5177\u7B49" },
359
360
  { value: "revert", title: "revert: \u56DE\u6EDA\u5230\u4E0A\u4E00\u4E2A\u7248\u672C" }
@@ -378,18 +379,18 @@ var scopes = [
378
379
 
379
380
  // src/command/git/commit.ts
380
381
  async function gitCommit() {
381
- const result = await (0, import_prompts.default)([
382
+ const result = await import_enquirer.default.prompt([
382
383
  {
383
384
  name: "types",
384
385
  type: "select",
385
386
  message: "\u8BF7\u9009\u62E9\u63D0\u4EA4\u7684\u7C7B\u578B",
386
- choices: types
387
+ choices: types.map((item) => ({ name: item.value, message: item.title }))
387
388
  },
388
389
  {
389
390
  name: "scopes",
390
391
  type: "select",
391
392
  message: "\u9009\u62E9\u4E00\u4E2Ascope",
392
- choices: scopes
393
+ choices: scopes.map((item) => ({ name: item.value, message: item.title }))
393
394
  },
394
395
  {
395
396
  name: "description",
@@ -423,10 +424,10 @@ function verifyGitCommit() {
423
424
  // src/scripts/cleanup.ts
424
425
  var import_rimraf = require("rimraf");
425
426
 
426
- // node_modules/.pnpm/minimatch@9.0.0/node_modules/minimatch/dist/mjs/index.js
427
+ // node_modules/.pnpm/minimatch@9.0.1/node_modules/minimatch/dist/mjs/index.js
427
428
  var import_brace_expansion = __toESM(require_brace_expansion(), 1);
428
429
 
429
- // node_modules/.pnpm/minimatch@9.0.0/node_modules/minimatch/dist/mjs/assert-valid-pattern.js
430
+ // node_modules/.pnpm/minimatch@9.0.1/node_modules/minimatch/dist/mjs/assert-valid-pattern.js
430
431
  var MAX_PATTERN_LENGTH = 1024 * 64;
431
432
  var assertValidPattern = (pattern) => {
432
433
  if (typeof pattern !== "string") {
@@ -437,7 +438,7 @@ var assertValidPattern = (pattern) => {
437
438
  }
438
439
  };
439
440
 
440
- // node_modules/.pnpm/minimatch@9.0.0/node_modules/minimatch/dist/mjs/brace-expressions.js
441
+ // node_modules/.pnpm/minimatch@9.0.1/node_modules/minimatch/dist/mjs/brace-expressions.js
441
442
  var posixClasses = {
442
443
  "[:alnum:]": ["\\p{L}\\p{Nl}\\p{Nd}", true],
443
444
  "[:alpha:]": ["\\p{L}\\p{Nl}", true],
@@ -547,12 +548,12 @@ var parseClass = (glob2, position) => {
547
548
  return [comb, uflag, endPos - pos, true];
548
549
  };
549
550
 
550
- // node_modules/.pnpm/minimatch@9.0.0/node_modules/minimatch/dist/mjs/unescape.js
551
+ // node_modules/.pnpm/minimatch@9.0.1/node_modules/minimatch/dist/mjs/unescape.js
551
552
  var unescape = (s, { windowsPathsNoEscape = false } = {}) => {
552
553
  return windowsPathsNoEscape ? s.replace(/\[([^\/\\])\]/g, "$1") : s.replace(/((?!\\).|^)\[([^\/\\])\]/g, "$1$2").replace(/\\([^\/])/g, "$1");
553
554
  };
554
555
 
555
- // node_modules/.pnpm/minimatch@9.0.0/node_modules/minimatch/dist/mjs/ast.js
556
+ // node_modules/.pnpm/minimatch@9.0.1/node_modules/minimatch/dist/mjs/ast.js
556
557
  var types2 = /* @__PURE__ */ new Set(["!", "?", "+", "*", "@"]);
557
558
  var isExtglobType = (c) => types2.has(c);
558
559
  var startNoTraversal = "(?!\\.\\.?(?:$|/))";
@@ -1038,12 +1039,12 @@ parseGlob_fn = function(glob2, hasMagic2, noEmpty = false) {
1038
1039
  __privateAdd(AST, _parseAST);
1039
1040
  __privateAdd(AST, _parseGlob);
1040
1041
 
1041
- // node_modules/.pnpm/minimatch@9.0.0/node_modules/minimatch/dist/mjs/escape.js
1042
+ // node_modules/.pnpm/minimatch@9.0.1/node_modules/minimatch/dist/mjs/escape.js
1042
1043
  var escape = (s, { windowsPathsNoEscape = false } = {}) => {
1043
1044
  return windowsPathsNoEscape ? s.replace(/[?*()[\]]/g, "[$&]") : s.replace(/[?*()[\]\\]/g, "\\$&");
1044
1045
  };
1045
1046
 
1046
- // node_modules/.pnpm/minimatch@9.0.0/node_modules/minimatch/dist/mjs/index.js
1047
+ // node_modules/.pnpm/minimatch@9.0.1/node_modules/minimatch/dist/mjs/index.js
1047
1048
  var minimatch = (p, pattern, options = {}) => {
1048
1049
  assertValidPattern(pattern);
1049
1050
  if (!options.nocomment && pattern.charAt(0) === "#") {
@@ -1530,26 +1531,21 @@ var Minimatch = class {
1530
1531
  matchOne(file, pattern, partial = false) {
1531
1532
  const options = this.options;
1532
1533
  if (this.isWindows) {
1533
- const fileUNC = file[0] === "" && file[1] === "" && file[2] === "?" && typeof file[3] === "string" && /^[a-z]:$/i.test(file[3]);
1534
- const patternUNC = pattern[0] === "" && pattern[1] === "" && pattern[2] === "?" && typeof pattern[3] === "string" && /^[a-z]:$/i.test(pattern[3]);
1535
- if (fileUNC && patternUNC) {
1536
- const fd = file[3];
1537
- const pd = pattern[3];
1534
+ const fileDrive = typeof file[0] === "string" && /^[a-z]:$/i.test(file[0]);
1535
+ const fileUNC = !fileDrive && file[0] === "" && file[1] === "" && file[2] === "?" && /^[a-z]:$/i.test(file[3]);
1536
+ const patternDrive = typeof pattern[0] === "string" && /^[a-z]:$/i.test(pattern[0]);
1537
+ const patternUNC = !patternDrive && pattern[0] === "" && pattern[1] === "" && pattern[2] === "?" && typeof pattern[3] === "string" && /^[a-z]:$/i.test(pattern[3]);
1538
+ const fdi = fileUNC ? 3 : fileDrive ? 0 : void 0;
1539
+ const pdi = patternUNC ? 3 : patternDrive ? 0 : void 0;
1540
+ if (typeof fdi === "number" && typeof pdi === "number") {
1541
+ const [fd, pd] = [file[fdi], pattern[pdi]];
1538
1542
  if (fd.toLowerCase() === pd.toLowerCase()) {
1539
- file[3] = pd;
1540
- }
1541
- } else if (patternUNC && typeof file[0] === "string") {
1542
- const pd = pattern[3];
1543
- const fd = file[0];
1544
- if (pd.toLowerCase() === fd.toLowerCase()) {
1545
- pattern[3] = fd;
1546
- pattern = pattern.slice(3);
1547
- }
1548
- } else if (fileUNC && typeof pattern[0] === "string") {
1549
- const fd = file[3];
1550
- if (fd.toLowerCase() === pattern[0].toLowerCase()) {
1551
- pattern[0] = fd;
1552
- file = file.slice(3);
1543
+ pattern[pdi] = fd;
1544
+ if (pdi > fdi) {
1545
+ pattern = pattern.slice(pdi);
1546
+ } else if (fdi > pdi) {
1547
+ file = file.slice(fdi);
1548
+ }
1553
1549
  }
1554
1550
  }
1555
1551
  }
@@ -1762,7 +1758,7 @@ minimatch.Minimatch = Minimatch;
1762
1758
  minimatch.escape = escape;
1763
1759
  minimatch.unescape = unescape;
1764
1760
 
1765
- // node_modules/.pnpm/lru-cache@9.1.0/node_modules/lru-cache/dist/mjs/index.js
1761
+ // node_modules/.pnpm/lru-cache@9.1.1/node_modules/lru-cache/dist/mjs/index.js
1766
1762
  var perf = typeof performance === "object" && performance && typeof performance.now === "function" ? performance : Date;
1767
1763
  var warned = /* @__PURE__ */ new Set();
1768
1764
  var PROCESS = typeof process === "object" && !!process ? process : {};
@@ -2137,7 +2133,8 @@ var LRUCache = class {
2137
2133
  status.ttl = ttl;
2138
2134
  status.start = start;
2139
2135
  status.now = cachedNow || getNow();
2140
- status.remainingTTL = status.now + ttl - start;
2136
+ const age = status.now - start;
2137
+ status.remainingTTL = ttl - age;
2141
2138
  }
2142
2139
  };
2143
2140
  let cachedNow = 0;
@@ -2157,7 +2154,13 @@ var LRUCache = class {
2157
2154
  if (index === void 0) {
2158
2155
  return 0;
2159
2156
  }
2160
- return ttls[index] === 0 || starts[index] === 0 ? Infinity : starts[index] + ttls[index] - (cachedNow || getNow());
2157
+ const ttl = ttls[index];
2158
+ const start = starts[index];
2159
+ if (ttl === 0 || start === 0) {
2160
+ return Infinity;
2161
+ }
2162
+ const age = (cachedNow || getNow()) - start;
2163
+ return ttl - age;
2161
2164
  };
2162
2165
  this.#isStale = (index) => {
2163
2166
  return ttls[index] !== 0 && starts[index] !== 0 && (cachedNow || getNow()) - starts[index] > ttls[index];
@@ -2984,14 +2987,14 @@ var LRUCache = class {
2984
2987
  }
2985
2988
  };
2986
2989
 
2987
- // node_modules/.pnpm/path-scurry@1.7.0/node_modules/path-scurry/dist/mjs/index.js
2990
+ // node_modules/.pnpm/path-scurry@1.9.2/node_modules/path-scurry/dist/mjs/index.js
2988
2991
  var import_path = require("path");
2989
2992
  var import_url = require("url");
2990
2993
  var actualFS = __toESM(require("fs"), 1);
2991
2994
  var import_fs2 = require("fs");
2992
2995
  var import_promises = require("fs/promises");
2993
2996
 
2994
- // node_modules/.pnpm/minipass@5.0.0/node_modules/minipass/index.mjs
2997
+ // node_modules/.pnpm/minipass@6.0.2/node_modules/minipass/index.mjs
2995
2998
  var import_events = __toESM(require("events"), 1);
2996
2999
  var import_stream = __toESM(require("stream"), 1);
2997
3000
  var import_string_decoder = __toESM(require("string_decoder"), 1);
@@ -3592,7 +3595,7 @@ var Minipass = class extends import_stream.default {
3592
3595
  }
3593
3596
  };
3594
3597
 
3595
- // node_modules/.pnpm/path-scurry@1.7.0/node_modules/path-scurry/dist/mjs/index.js
3598
+ // node_modules/.pnpm/path-scurry@1.9.2/node_modules/path-scurry/dist/mjs/index.js
3596
3599
  var realpathSync = import_fs2.realpathSync.native;
3597
3600
  var defaultFS = {
3598
3601
  lstatSync: import_fs2.lstatSync,
@@ -3669,6 +3672,7 @@ var ChildrenCache = class extends LRUCache {
3669
3672
  });
3670
3673
  }
3671
3674
  };
3675
+ var setAsCwd = Symbol("PathScurry setAsCwd");
3672
3676
  var PathBase = class {
3673
3677
  /**
3674
3678
  * the basename of this path
@@ -3788,6 +3792,16 @@ var PathBase = class {
3788
3792
  #children;
3789
3793
  #linkTarget;
3790
3794
  #realpath;
3795
+ /**
3796
+ * This property is for compatibility with the Dirent class as of
3797
+ * Node v20, where Dirent['path'] refers to the path of the directory
3798
+ * that was passed to readdir. So, somewhat counterintuitively, this
3799
+ * property refers to the *parent* path, not the path object itself.
3800
+ * For root entries, it's the path to the entry itself.
3801
+ */
3802
+ get path() {
3803
+ return (this.parent || this).fullpath();
3804
+ }
3791
3805
  /**
3792
3806
  * Do not create new Path objects directly. They should always be accessed
3793
3807
  * via the PathScurry class or other methods on the Path class.
@@ -3922,8 +3936,7 @@ var PathBase = class {
3922
3936
  return this.#relative = this.name;
3923
3937
  }
3924
3938
  const pv = p.relative();
3925
- const rp = pv + (!pv || !p.parent ? "" : this.sep) + name;
3926
- return this.#relative = rp;
3939
+ return pv + (!pv || !p.parent ? "" : this.sep) + name;
3927
3940
  }
3928
3941
  /**
3929
3942
  * The relative path from the cwd, using / as the path separator.
@@ -3942,8 +3955,7 @@ var PathBase = class {
3942
3955
  return this.#relativePosix = this.fullpathPosix();
3943
3956
  }
3944
3957
  const pv = p.relativePosix();
3945
- const rp = pv + (!pv || !p.parent ? "" : "/") + name;
3946
- return this.#relativePosix = rp;
3958
+ return pv + (!pv || !p.parent ? "" : "/") + name;
3947
3959
  }
3948
3960
  /**
3949
3961
  * The fully resolved path string for this Path entry
@@ -4521,6 +4533,32 @@ var PathBase = class {
4521
4533
  this.#markENOREALPATH();
4522
4534
  }
4523
4535
  }
4536
+ /**
4537
+ * Internal method to mark this Path object as the scurry cwd,
4538
+ * called by {@link PathScurry#chdir}
4539
+ *
4540
+ * @internal
4541
+ */
4542
+ [setAsCwd](oldCwd) {
4543
+ if (oldCwd === this)
4544
+ return;
4545
+ const changed = /* @__PURE__ */ new Set([]);
4546
+ let rp = [];
4547
+ let p = this;
4548
+ while (p && p.parent) {
4549
+ changed.add(p);
4550
+ p.#relative = rp.join(this.sep);
4551
+ p.#relativePosix = rp.join("/");
4552
+ p = p.parent;
4553
+ rp.push("..");
4554
+ }
4555
+ p = oldCwd;
4556
+ while (p && p.parent && !changed.has(p)) {
4557
+ p.#relative = void 0;
4558
+ p.#relativePosix = void 0;
4559
+ p = p.parent;
4560
+ }
4561
+ }
4524
4562
  };
4525
4563
  var PathWin32 = class extends PathBase {
4526
4564
  /**
@@ -5177,6 +5215,11 @@ var PathScurryBase = class {
5177
5215
  process2();
5178
5216
  return results;
5179
5217
  }
5218
+ chdir(path2 = this.cwd) {
5219
+ const oldCwd = this.cwd;
5220
+ this.cwd = typeof path2 === "string" ? this.cwd.resolve(path2) : path2;
5221
+ this.cwd[setAsCwd](oldCwd);
5222
+ }
5180
5223
  };
5181
5224
  var PathScurryWin32 = class extends PathScurryBase {
5182
5225
  /**
@@ -5248,10 +5291,10 @@ var PathScurryDarwin = class extends PathScurryPosix {
5248
5291
  var Path = process.platform === "win32" ? PathWin32 : PathPosix;
5249
5292
  var PathScurry = process.platform === "win32" ? PathScurryWin32 : process.platform === "darwin" ? PathScurryDarwin : PathScurryPosix;
5250
5293
 
5251
- // node_modules/.pnpm/glob@10.2.1/node_modules/glob/dist/mjs/glob.js
5294
+ // node_modules/.pnpm/glob@10.2.6/node_modules/glob/dist/mjs/glob.js
5252
5295
  var import_url2 = require("url");
5253
5296
 
5254
- // node_modules/.pnpm/glob@10.2.1/node_modules/glob/dist/mjs/pattern.js
5297
+ // node_modules/.pnpm/glob@10.2.6/node_modules/glob/dist/mjs/pattern.js
5255
5298
  var isPatternList = (pl) => pl.length >= 1;
5256
5299
  var isGlobList = (gl) => gl.length >= 1;
5257
5300
  var Pattern = class {
@@ -5416,7 +5459,7 @@ var Pattern = class {
5416
5459
  }
5417
5460
  };
5418
5461
 
5419
- // node_modules/.pnpm/glob@10.2.1/node_modules/glob/dist/mjs/ignore.js
5462
+ // node_modules/.pnpm/glob@10.2.6/node_modules/glob/dist/mjs/ignore.js
5420
5463
  var defaultPlatform2 = typeof process === "object" && process && typeof process.platform === "string" ? process.platform : "linux";
5421
5464
  var Ignore = class {
5422
5465
  relative;
@@ -5491,7 +5534,7 @@ var Ignore = class {
5491
5534
  }
5492
5535
  };
5493
5536
 
5494
- // node_modules/.pnpm/glob@10.2.1/node_modules/glob/dist/mjs/processor.js
5537
+ // node_modules/.pnpm/glob@10.2.6/node_modules/glob/dist/mjs/processor.js
5495
5538
  var HasWalkedCache = class {
5496
5539
  store;
5497
5540
  constructor(store = /* @__PURE__ */ new Map()) {
@@ -5718,7 +5761,7 @@ var Processor = class {
5718
5761
  }
5719
5762
  };
5720
5763
 
5721
- // node_modules/.pnpm/glob@10.2.1/node_modules/glob/dist/mjs/walker.js
5764
+ // node_modules/.pnpm/glob@10.2.6/node_modules/glob/dist/mjs/walker.js
5722
5765
  var makeIgnore = (ignore, opts) => typeof ignore === "string" ? new Ignore([ignore], opts) : Array.isArray(ignore) ? new Ignore(ignore, opts) : ignore;
5723
5766
  var GlobUtil = class {
5724
5767
  path;
@@ -6022,7 +6065,7 @@ var GlobStream = class extends GlobUtil {
6022
6065
  }
6023
6066
  };
6024
6067
 
6025
- // node_modules/.pnpm/glob@10.2.1/node_modules/glob/dist/mjs/glob.js
6068
+ // node_modules/.pnpm/glob@10.2.6/node_modules/glob/dist/mjs/glob.js
6026
6069
  var defaultPlatform3 = typeof process === "object" && process && typeof process.platform === "string" ? process.platform : "linux";
6027
6070
  var Glob = class {
6028
6071
  absolute;
@@ -6126,6 +6169,7 @@ var Glob = class {
6126
6169
  });
6127
6170
  }
6128
6171
  this.nocase = this.scurry.nocase;
6172
+ const nocaseMagicOnly = this.platform === "darwin" || this.platform === "win32";
6129
6173
  const mmo = {
6130
6174
  // default nocase based on platform
6131
6175
  ...opts,
@@ -6133,7 +6177,7 @@ var Glob = class {
6133
6177
  matchBase: this.matchBase,
6134
6178
  nobrace: this.nobrace,
6135
6179
  nocase: this.nocase,
6136
- nocaseMagicOnly: true,
6180
+ nocaseMagicOnly,
6137
6181
  nocomment: true,
6138
6182
  noext: this.noext,
6139
6183
  nonegate: true,
@@ -6210,7 +6254,7 @@ var Glob = class {
6210
6254
  }
6211
6255
  };
6212
6256
 
6213
- // node_modules/.pnpm/glob@10.2.1/node_modules/glob/dist/mjs/has-magic.js
6257
+ // node_modules/.pnpm/glob@10.2.6/node_modules/glob/dist/mjs/has-magic.js
6214
6258
  var hasMagic = (pattern, options = {}) => {
6215
6259
  if (!Array.isArray(pattern)) {
6216
6260
  pattern = [pattern];
@@ -6222,7 +6266,7 @@ var hasMagic = (pattern, options = {}) => {
6222
6266
  return false;
6223
6267
  };
6224
6268
 
6225
- // node_modules/.pnpm/glob@10.2.1/node_modules/glob/dist/mjs/index.js
6269
+ // node_modules/.pnpm/glob@10.2.6/node_modules/glob/dist/mjs/index.js
6226
6270
  function globStreamSync(pattern, options = {}) {
6227
6271
  return new Glob(pattern, options).streamSync();
6228
6272
  }
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.2.0",
274
274
  description: "SoybeanJS's command lint tools",
275
275
  author: {
276
276
  name: "Soybean",
@@ -285,6 +285,9 @@ var package_default = {
285
285
  bugs: {
286
286
  url: "https://github.com/honghuangdc/soybean-cli/issues"
287
287
  },
288
+ publishConfig: {
289
+ registry: "https://registry.npmjs.org/"
290
+ },
288
291
  bin: {
289
292
  soybean: "bin/index.mjs",
290
293
  soy: "bin/index.mjs"
@@ -299,30 +302,32 @@ var package_default = {
299
302
  commit: "soy git-commit",
300
303
  cleanup: "soy cleanup",
301
304
  "update-pkg": "soy update-pkg",
302
- "update-version": "bumpp package.json",
305
+ "update-version": 'bumpp package.json --execute="pnpm gen-log" --commit --all --push --tag',
303
306
  "publish-pkg": "pnpm -r publish --access public",
304
- release: "pnpm update-version && pnpm publish-pkg"
307
+ release: "pnpm update-version && pnpm publish-pkg",
308
+ "gen-log": "conventional-changelog -p angular -i CHANGELOG.md -s"
305
309
  },
306
310
  dependencies: {
307
- commander: "^10.0.1",
311
+ commander: "10.0.1",
312
+ enquirer: "2.3.6",
308
313
  execa: "7.1.1",
309
- kolorist: "^1.7.0",
310
- minimist: "^1.2.8",
311
- "npm-check-updates": "^16.10.9",
312
- prompts: "^2.4.2",
313
- rimraf: "^5.0.0"
314
+ kolorist: "1.8.0",
315
+ minimist: "1.2.8",
316
+ "npm-check-updates": "16.10.12",
317
+ rimraf: "5.0.1"
314
318
  },
315
319
  devDependencies: {
316
320
  "@soybeanjs/cli": "link:",
317
- "@types/prompts": "^2.4.4",
318
- bumpp: "^9.1.0",
319
- eslint: "^8.39.0",
320
- "eslint-config-soybeanjs": "0.3.3",
321
- "lint-staged": "^13.2.1",
322
- "simple-git-hooks": "^2.8.1",
323
- tsup: "^6.7.0",
324
- tsx: "^3.12.6",
325
- typescript: "^5.0.4"
321
+ "@types/node": "^20.2.3",
322
+ bumpp: "9.1.0",
323
+ "conventional-changelog-cli": "^2.2.2",
324
+ eslint: "8.41.0",
325
+ "eslint-config-soybeanjs": "0.3.8",
326
+ "lint-staged": "13.2.2",
327
+ "simple-git-hooks": "2.8.1",
328
+ tsup: "6.7.0",
329
+ tsx: "3.12.7",
330
+ typescript: "5.0.4"
326
331
  },
327
332
  "simple-git-hooks": {
328
333
  "commit-msg": "pnpm soybean git-commit-verify",
@@ -332,14 +337,11 @@ var package_default = {
332
337
  "*.{js,jsx,mjs,cjs,json,ts,tsx,mts,cts,vue,svelte,astro}": [
333
338
  "eslint . --fix"
334
339
  ]
335
- },
336
- publishConfig: {
337
- registry: "https://registry.npmjs.org/"
338
340
  }
339
341
  };
340
342
 
341
343
  // src/command/git/commit.ts
342
- import prompts from "prompts";
344
+ import enquirer from "enquirer";
343
345
  import { execa } from "execa";
344
346
 
345
347
  // src/command/git/config.ts
@@ -352,7 +354,6 @@ var types = [
352
354
  { value: "refactor", title: "refactor: \u4EE3\u7801\u91CD\u6784\uFF0C\u6CA1\u6709\u52A0\u65B0\u529F\u80FD\u6216\u8005\u4FEE\u590Dbug" },
353
355
  { value: "perf", title: "perf: \u4F18\u5316\u76F8\u5173\uFF0C\u6BD4\u5982\u63D0\u5347\u6027\u80FD\u3001\u4F53\u9A8C" },
354
356
  { value: "test", title: "test: \u6DFB\u52A0\u6D4B\u8BD5\u7528\u4F8B" },
355
- { value: "build", title: "build: \u4F9D\u8D56\u76F8\u5173\u7684\u5185\u5BB9" },
356
357
  { value: "ci", title: "ci: CI\u914D\u7F6E\u76F8\u5173\uFF0C\u4F8B\u5982\u5BF9k8s\uFF0Cdocker\u7684\u914D\u7F6E\u6587\u4EF6\u7684\u4FEE\u6539" },
357
358
  { value: "chore", title: "chore: \u6539\u53D8\u6784\u5EFA\u6D41\u7A0B\u3001\u6216\u8005\u589E\u52A0\u4F9D\u8D56\u5E93\u3001\u5DE5\u5177\u7B49" },
358
359
  { value: "revert", title: "revert: \u56DE\u6EDA\u5230\u4E0A\u4E00\u4E2A\u7248\u672C" }
@@ -377,18 +378,18 @@ var scopes = [
377
378
 
378
379
  // src/command/git/commit.ts
379
380
  async function gitCommit() {
380
- const result = await prompts([
381
+ const result = await enquirer.prompt([
381
382
  {
382
383
  name: "types",
383
384
  type: "select",
384
385
  message: "\u8BF7\u9009\u62E9\u63D0\u4EA4\u7684\u7C7B\u578B",
385
- choices: types
386
+ choices: types.map((item) => ({ name: item.value, message: item.title }))
386
387
  },
387
388
  {
388
389
  name: "scopes",
389
390
  type: "select",
390
391
  message: "\u9009\u62E9\u4E00\u4E2Ascope",
391
- choices: scopes
392
+ choices: scopes.map((item) => ({ name: item.value, message: item.title }))
392
393
  },
393
394
  {
394
395
  name: "description",
@@ -422,10 +423,10 @@ function verifyGitCommit() {
422
423
  // src/scripts/cleanup.ts
423
424
  import { rimraf } from "rimraf";
424
425
 
425
- // node_modules/.pnpm/minimatch@9.0.0/node_modules/minimatch/dist/mjs/index.js
426
+ // node_modules/.pnpm/minimatch@9.0.1/node_modules/minimatch/dist/mjs/index.js
426
427
  var import_brace_expansion = __toESM(require_brace_expansion(), 1);
427
428
 
428
- // node_modules/.pnpm/minimatch@9.0.0/node_modules/minimatch/dist/mjs/assert-valid-pattern.js
429
+ // node_modules/.pnpm/minimatch@9.0.1/node_modules/minimatch/dist/mjs/assert-valid-pattern.js
429
430
  var MAX_PATTERN_LENGTH = 1024 * 64;
430
431
  var assertValidPattern = (pattern) => {
431
432
  if (typeof pattern !== "string") {
@@ -436,7 +437,7 @@ var assertValidPattern = (pattern) => {
436
437
  }
437
438
  };
438
439
 
439
- // node_modules/.pnpm/minimatch@9.0.0/node_modules/minimatch/dist/mjs/brace-expressions.js
440
+ // node_modules/.pnpm/minimatch@9.0.1/node_modules/minimatch/dist/mjs/brace-expressions.js
440
441
  var posixClasses = {
441
442
  "[:alnum:]": ["\\p{L}\\p{Nl}\\p{Nd}", true],
442
443
  "[:alpha:]": ["\\p{L}\\p{Nl}", true],
@@ -546,12 +547,12 @@ var parseClass = (glob2, position) => {
546
547
  return [comb, uflag, endPos - pos, true];
547
548
  };
548
549
 
549
- // node_modules/.pnpm/minimatch@9.0.0/node_modules/minimatch/dist/mjs/unescape.js
550
+ // node_modules/.pnpm/minimatch@9.0.1/node_modules/minimatch/dist/mjs/unescape.js
550
551
  var unescape = (s, { windowsPathsNoEscape = false } = {}) => {
551
552
  return windowsPathsNoEscape ? s.replace(/\[([^\/\\])\]/g, "$1") : s.replace(/((?!\\).|^)\[([^\/\\])\]/g, "$1$2").replace(/\\([^\/])/g, "$1");
552
553
  };
553
554
 
554
- // node_modules/.pnpm/minimatch@9.0.0/node_modules/minimatch/dist/mjs/ast.js
555
+ // node_modules/.pnpm/minimatch@9.0.1/node_modules/minimatch/dist/mjs/ast.js
555
556
  var types2 = /* @__PURE__ */ new Set(["!", "?", "+", "*", "@"]);
556
557
  var isExtglobType = (c) => types2.has(c);
557
558
  var startNoTraversal = "(?!\\.\\.?(?:$|/))";
@@ -1037,12 +1038,12 @@ parseGlob_fn = function(glob2, hasMagic2, noEmpty = false) {
1037
1038
  __privateAdd(AST, _parseAST);
1038
1039
  __privateAdd(AST, _parseGlob);
1039
1040
 
1040
- // node_modules/.pnpm/minimatch@9.0.0/node_modules/minimatch/dist/mjs/escape.js
1041
+ // node_modules/.pnpm/minimatch@9.0.1/node_modules/minimatch/dist/mjs/escape.js
1041
1042
  var escape = (s, { windowsPathsNoEscape = false } = {}) => {
1042
1043
  return windowsPathsNoEscape ? s.replace(/[?*()[\]]/g, "[$&]") : s.replace(/[?*()[\]\\]/g, "\\$&");
1043
1044
  };
1044
1045
 
1045
- // node_modules/.pnpm/minimatch@9.0.0/node_modules/minimatch/dist/mjs/index.js
1046
+ // node_modules/.pnpm/minimatch@9.0.1/node_modules/minimatch/dist/mjs/index.js
1046
1047
  var minimatch = (p, pattern, options = {}) => {
1047
1048
  assertValidPattern(pattern);
1048
1049
  if (!options.nocomment && pattern.charAt(0) === "#") {
@@ -1529,26 +1530,21 @@ var Minimatch = class {
1529
1530
  matchOne(file, pattern, partial = false) {
1530
1531
  const options = this.options;
1531
1532
  if (this.isWindows) {
1532
- const fileUNC = file[0] === "" && file[1] === "" && file[2] === "?" && typeof file[3] === "string" && /^[a-z]:$/i.test(file[3]);
1533
- const patternUNC = pattern[0] === "" && pattern[1] === "" && pattern[2] === "?" && typeof pattern[3] === "string" && /^[a-z]:$/i.test(pattern[3]);
1534
- if (fileUNC && patternUNC) {
1535
- const fd = file[3];
1536
- const pd = pattern[3];
1533
+ const fileDrive = typeof file[0] === "string" && /^[a-z]:$/i.test(file[0]);
1534
+ const fileUNC = !fileDrive && file[0] === "" && file[1] === "" && file[2] === "?" && /^[a-z]:$/i.test(file[3]);
1535
+ const patternDrive = typeof pattern[0] === "string" && /^[a-z]:$/i.test(pattern[0]);
1536
+ const patternUNC = !patternDrive && pattern[0] === "" && pattern[1] === "" && pattern[2] === "?" && typeof pattern[3] === "string" && /^[a-z]:$/i.test(pattern[3]);
1537
+ const fdi = fileUNC ? 3 : fileDrive ? 0 : void 0;
1538
+ const pdi = patternUNC ? 3 : patternDrive ? 0 : void 0;
1539
+ if (typeof fdi === "number" && typeof pdi === "number") {
1540
+ const [fd, pd] = [file[fdi], pattern[pdi]];
1537
1541
  if (fd.toLowerCase() === pd.toLowerCase()) {
1538
- file[3] = pd;
1539
- }
1540
- } else if (patternUNC && typeof file[0] === "string") {
1541
- const pd = pattern[3];
1542
- const fd = file[0];
1543
- if (pd.toLowerCase() === fd.toLowerCase()) {
1544
- pattern[3] = fd;
1545
- pattern = pattern.slice(3);
1546
- }
1547
- } else if (fileUNC && typeof pattern[0] === "string") {
1548
- const fd = file[3];
1549
- if (fd.toLowerCase() === pattern[0].toLowerCase()) {
1550
- pattern[0] = fd;
1551
- file = file.slice(3);
1542
+ pattern[pdi] = fd;
1543
+ if (pdi > fdi) {
1544
+ pattern = pattern.slice(pdi);
1545
+ } else if (fdi > pdi) {
1546
+ file = file.slice(fdi);
1547
+ }
1552
1548
  }
1553
1549
  }
1554
1550
  }
@@ -1761,7 +1757,7 @@ minimatch.Minimatch = Minimatch;
1761
1757
  minimatch.escape = escape;
1762
1758
  minimatch.unescape = unescape;
1763
1759
 
1764
- // node_modules/.pnpm/lru-cache@9.1.0/node_modules/lru-cache/dist/mjs/index.js
1760
+ // node_modules/.pnpm/lru-cache@9.1.1/node_modules/lru-cache/dist/mjs/index.js
1765
1761
  var perf = typeof performance === "object" && performance && typeof performance.now === "function" ? performance : Date;
1766
1762
  var warned = /* @__PURE__ */ new Set();
1767
1763
  var PROCESS = typeof process === "object" && !!process ? process : {};
@@ -2136,7 +2132,8 @@ var LRUCache = class {
2136
2132
  status.ttl = ttl;
2137
2133
  status.start = start;
2138
2134
  status.now = cachedNow || getNow();
2139
- status.remainingTTL = status.now + ttl - start;
2135
+ const age = status.now - start;
2136
+ status.remainingTTL = ttl - age;
2140
2137
  }
2141
2138
  };
2142
2139
  let cachedNow = 0;
@@ -2156,7 +2153,13 @@ var LRUCache = class {
2156
2153
  if (index === void 0) {
2157
2154
  return 0;
2158
2155
  }
2159
- return ttls[index] === 0 || starts[index] === 0 ? Infinity : starts[index] + ttls[index] - (cachedNow || getNow());
2156
+ const ttl = ttls[index];
2157
+ const start = starts[index];
2158
+ if (ttl === 0 || start === 0) {
2159
+ return Infinity;
2160
+ }
2161
+ const age = (cachedNow || getNow()) - start;
2162
+ return ttl - age;
2160
2163
  };
2161
2164
  this.#isStale = (index) => {
2162
2165
  return ttls[index] !== 0 && starts[index] !== 0 && (cachedNow || getNow()) - starts[index] > ttls[index];
@@ -2983,14 +2986,14 @@ var LRUCache = class {
2983
2986
  }
2984
2987
  };
2985
2988
 
2986
- // node_modules/.pnpm/path-scurry@1.7.0/node_modules/path-scurry/dist/mjs/index.js
2989
+ // node_modules/.pnpm/path-scurry@1.9.2/node_modules/path-scurry/dist/mjs/index.js
2987
2990
  import { posix, win32 } from "path";
2988
2991
  import { fileURLToPath } from "url";
2989
2992
  import * as actualFS from "fs";
2990
2993
  import { lstatSync, readdir as readdirCB, readdirSync, readlinkSync, realpathSync as rps } from "fs";
2991
2994
  import { lstat, readdir, readlink, realpath } from "fs/promises";
2992
2995
 
2993
- // node_modules/.pnpm/minipass@5.0.0/node_modules/minipass/index.mjs
2996
+ // node_modules/.pnpm/minipass@6.0.2/node_modules/minipass/index.mjs
2994
2997
  import EE from "events";
2995
2998
  import Stream from "stream";
2996
2999
  import stringdecoder from "string_decoder";
@@ -3591,7 +3594,7 @@ var Minipass = class extends Stream {
3591
3594
  }
3592
3595
  };
3593
3596
 
3594
- // node_modules/.pnpm/path-scurry@1.7.0/node_modules/path-scurry/dist/mjs/index.js
3597
+ // node_modules/.pnpm/path-scurry@1.9.2/node_modules/path-scurry/dist/mjs/index.js
3595
3598
  var realpathSync = rps.native;
3596
3599
  var defaultFS = {
3597
3600
  lstatSync,
@@ -3668,6 +3671,7 @@ var ChildrenCache = class extends LRUCache {
3668
3671
  });
3669
3672
  }
3670
3673
  };
3674
+ var setAsCwd = Symbol("PathScurry setAsCwd");
3671
3675
  var PathBase = class {
3672
3676
  /**
3673
3677
  * the basename of this path
@@ -3787,6 +3791,16 @@ var PathBase = class {
3787
3791
  #children;
3788
3792
  #linkTarget;
3789
3793
  #realpath;
3794
+ /**
3795
+ * This property is for compatibility with the Dirent class as of
3796
+ * Node v20, where Dirent['path'] refers to the path of the directory
3797
+ * that was passed to readdir. So, somewhat counterintuitively, this
3798
+ * property refers to the *parent* path, not the path object itself.
3799
+ * For root entries, it's the path to the entry itself.
3800
+ */
3801
+ get path() {
3802
+ return (this.parent || this).fullpath();
3803
+ }
3790
3804
  /**
3791
3805
  * Do not create new Path objects directly. They should always be accessed
3792
3806
  * via the PathScurry class or other methods on the Path class.
@@ -3921,8 +3935,7 @@ var PathBase = class {
3921
3935
  return this.#relative = this.name;
3922
3936
  }
3923
3937
  const pv = p.relative();
3924
- const rp = pv + (!pv || !p.parent ? "" : this.sep) + name;
3925
- return this.#relative = rp;
3938
+ return pv + (!pv || !p.parent ? "" : this.sep) + name;
3926
3939
  }
3927
3940
  /**
3928
3941
  * The relative path from the cwd, using / as the path separator.
@@ -3941,8 +3954,7 @@ var PathBase = class {
3941
3954
  return this.#relativePosix = this.fullpathPosix();
3942
3955
  }
3943
3956
  const pv = p.relativePosix();
3944
- const rp = pv + (!pv || !p.parent ? "" : "/") + name;
3945
- return this.#relativePosix = rp;
3957
+ return pv + (!pv || !p.parent ? "" : "/") + name;
3946
3958
  }
3947
3959
  /**
3948
3960
  * The fully resolved path string for this Path entry
@@ -4520,6 +4532,32 @@ var PathBase = class {
4520
4532
  this.#markENOREALPATH();
4521
4533
  }
4522
4534
  }
4535
+ /**
4536
+ * Internal method to mark this Path object as the scurry cwd,
4537
+ * called by {@link PathScurry#chdir}
4538
+ *
4539
+ * @internal
4540
+ */
4541
+ [setAsCwd](oldCwd) {
4542
+ if (oldCwd === this)
4543
+ return;
4544
+ const changed = /* @__PURE__ */ new Set([]);
4545
+ let rp = [];
4546
+ let p = this;
4547
+ while (p && p.parent) {
4548
+ changed.add(p);
4549
+ p.#relative = rp.join(this.sep);
4550
+ p.#relativePosix = rp.join("/");
4551
+ p = p.parent;
4552
+ rp.push("..");
4553
+ }
4554
+ p = oldCwd;
4555
+ while (p && p.parent && !changed.has(p)) {
4556
+ p.#relative = void 0;
4557
+ p.#relativePosix = void 0;
4558
+ p = p.parent;
4559
+ }
4560
+ }
4523
4561
  };
4524
4562
  var PathWin32 = class extends PathBase {
4525
4563
  /**
@@ -5176,6 +5214,11 @@ var PathScurryBase = class {
5176
5214
  process2();
5177
5215
  return results;
5178
5216
  }
5217
+ chdir(path2 = this.cwd) {
5218
+ const oldCwd = this.cwd;
5219
+ this.cwd = typeof path2 === "string" ? this.cwd.resolve(path2) : path2;
5220
+ this.cwd[setAsCwd](oldCwd);
5221
+ }
5179
5222
  };
5180
5223
  var PathScurryWin32 = class extends PathScurryBase {
5181
5224
  /**
@@ -5247,10 +5290,10 @@ var PathScurryDarwin = class extends PathScurryPosix {
5247
5290
  var Path = process.platform === "win32" ? PathWin32 : PathPosix;
5248
5291
  var PathScurry = process.platform === "win32" ? PathScurryWin32 : process.platform === "darwin" ? PathScurryDarwin : PathScurryPosix;
5249
5292
 
5250
- // node_modules/.pnpm/glob@10.2.1/node_modules/glob/dist/mjs/glob.js
5293
+ // node_modules/.pnpm/glob@10.2.6/node_modules/glob/dist/mjs/glob.js
5251
5294
  import { fileURLToPath as fileURLToPath2 } from "url";
5252
5295
 
5253
- // node_modules/.pnpm/glob@10.2.1/node_modules/glob/dist/mjs/pattern.js
5296
+ // node_modules/.pnpm/glob@10.2.6/node_modules/glob/dist/mjs/pattern.js
5254
5297
  var isPatternList = (pl) => pl.length >= 1;
5255
5298
  var isGlobList = (gl) => gl.length >= 1;
5256
5299
  var Pattern = class {
@@ -5415,7 +5458,7 @@ var Pattern = class {
5415
5458
  }
5416
5459
  };
5417
5460
 
5418
- // node_modules/.pnpm/glob@10.2.1/node_modules/glob/dist/mjs/ignore.js
5461
+ // node_modules/.pnpm/glob@10.2.6/node_modules/glob/dist/mjs/ignore.js
5419
5462
  var defaultPlatform2 = typeof process === "object" && process && typeof process.platform === "string" ? process.platform : "linux";
5420
5463
  var Ignore = class {
5421
5464
  relative;
@@ -5490,7 +5533,7 @@ var Ignore = class {
5490
5533
  }
5491
5534
  };
5492
5535
 
5493
- // node_modules/.pnpm/glob@10.2.1/node_modules/glob/dist/mjs/processor.js
5536
+ // node_modules/.pnpm/glob@10.2.6/node_modules/glob/dist/mjs/processor.js
5494
5537
  var HasWalkedCache = class {
5495
5538
  store;
5496
5539
  constructor(store = /* @__PURE__ */ new Map()) {
@@ -5717,7 +5760,7 @@ var Processor = class {
5717
5760
  }
5718
5761
  };
5719
5762
 
5720
- // node_modules/.pnpm/glob@10.2.1/node_modules/glob/dist/mjs/walker.js
5763
+ // node_modules/.pnpm/glob@10.2.6/node_modules/glob/dist/mjs/walker.js
5721
5764
  var makeIgnore = (ignore, opts) => typeof ignore === "string" ? new Ignore([ignore], opts) : Array.isArray(ignore) ? new Ignore(ignore, opts) : ignore;
5722
5765
  var GlobUtil = class {
5723
5766
  path;
@@ -6021,7 +6064,7 @@ var GlobStream = class extends GlobUtil {
6021
6064
  }
6022
6065
  };
6023
6066
 
6024
- // node_modules/.pnpm/glob@10.2.1/node_modules/glob/dist/mjs/glob.js
6067
+ // node_modules/.pnpm/glob@10.2.6/node_modules/glob/dist/mjs/glob.js
6025
6068
  var defaultPlatform3 = typeof process === "object" && process && typeof process.platform === "string" ? process.platform : "linux";
6026
6069
  var Glob = class {
6027
6070
  absolute;
@@ -6125,6 +6168,7 @@ var Glob = class {
6125
6168
  });
6126
6169
  }
6127
6170
  this.nocase = this.scurry.nocase;
6171
+ const nocaseMagicOnly = this.platform === "darwin" || this.platform === "win32";
6128
6172
  const mmo = {
6129
6173
  // default nocase based on platform
6130
6174
  ...opts,
@@ -6132,7 +6176,7 @@ var Glob = class {
6132
6176
  matchBase: this.matchBase,
6133
6177
  nobrace: this.nobrace,
6134
6178
  nocase: this.nocase,
6135
- nocaseMagicOnly: true,
6179
+ nocaseMagicOnly,
6136
6180
  nocomment: true,
6137
6181
  noext: this.noext,
6138
6182
  nonegate: true,
@@ -6209,7 +6253,7 @@ var Glob = class {
6209
6253
  }
6210
6254
  };
6211
6255
 
6212
- // node_modules/.pnpm/glob@10.2.1/node_modules/glob/dist/mjs/has-magic.js
6256
+ // node_modules/.pnpm/glob@10.2.6/node_modules/glob/dist/mjs/has-magic.js
6213
6257
  var hasMagic = (pattern, options = {}) => {
6214
6258
  if (!Array.isArray(pattern)) {
6215
6259
  pattern = [pattern];
@@ -6221,7 +6265,7 @@ var hasMagic = (pattern, options = {}) => {
6221
6265
  return false;
6222
6266
  };
6223
6267
 
6224
- // node_modules/.pnpm/glob@10.2.1/node_modules/glob/dist/mjs/index.js
6268
+ // node_modules/.pnpm/glob@10.2.6/node_modules/glob/dist/mjs/index.js
6225
6269
  function globStreamSync(pattern, options = {}) {
6226
6270
  return new Glob(pattern, options).streamSync();
6227
6271
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@soybeanjs/cli",
3
- "version": "0.1.8",
3
+ "version": "0.2.2",
4
4
  "description": "SoybeanJS's command lint tools",
5
5
  "author": {
6
6
  "name": "Soybean",
@@ -15,6 +15,9 @@
15
15
  "bugs": {
16
16
  "url": "https://github.com/honghuangdc/soybean-cli/issues"
17
17
  },
18
+ "publishConfig": {
19
+ "registry": "https://registry.npmjs.org/"
20
+ },
18
21
  "bin": {
19
22
  "soybean": "bin/index.mjs",
20
23
  "soy": "bin/index.mjs"
@@ -23,25 +26,26 @@
23
26
  "bin"
24
27
  ],
25
28
  "dependencies": {
26
- "commander": "^10.0.1",
29
+ "commander": "10.0.1",
30
+ "enquirer": "2.3.6",
27
31
  "execa": "7.1.1",
28
- "kolorist": "^1.7.0",
29
- "minimist": "^1.2.8",
30
- "npm-check-updates": "^16.10.9",
31
- "prompts": "^2.4.2",
32
- "rimraf": "^5.0.0"
32
+ "kolorist": "1.8.0",
33
+ "minimist": "1.2.8",
34
+ "npm-check-updates": "16.10.12",
35
+ "rimraf": "5.0.1"
33
36
  },
34
37
  "devDependencies": {
35
38
  "@soybeanjs/cli": "link:",
36
- "@types/prompts": "^2.4.4",
37
- "bumpp": "^9.1.0",
38
- "eslint": "^8.39.0",
39
- "eslint-config-soybeanjs": "0.3.3",
40
- "lint-staged": "^13.2.1",
41
- "simple-git-hooks": "^2.8.1",
42
- "tsup": "^6.7.0",
43
- "tsx": "^3.12.6",
44
- "typescript": "^5.0.4"
39
+ "@types/node": "^20.2.3",
40
+ "bumpp": "9.1.0",
41
+ "conventional-changelog-cli": "^2.2.2",
42
+ "eslint": "8.41.0",
43
+ "eslint-config-soybeanjs": "0.3.8",
44
+ "lint-staged": "13.2.2",
45
+ "simple-git-hooks": "2.8.1",
46
+ "tsup": "6.7.0",
47
+ "tsx": "3.12.7",
48
+ "typescript": "5.0.4"
45
49
  },
46
50
  "simple-git-hooks": {
47
51
  "commit-msg": "pnpm soybean git-commit-verify",
@@ -52,9 +56,6 @@
52
56
  "eslint . --fix"
53
57
  ]
54
58
  },
55
- "publishConfig": {
56
- "registry": "https://registry.npmjs.org/"
57
- },
58
59
  "scripts": {
59
60
  "build": "tsup",
60
61
  "lint": "eslint . --fix",
@@ -62,8 +63,9 @@
62
63
  "commit": "soy git-commit",
63
64
  "cleanup": "soy cleanup",
64
65
  "update-pkg": "soy update-pkg",
65
- "update-version": "bumpp package.json",
66
+ "update-version": "bumpp package.json --execute=\"pnpm gen-log\" --commit --all --push --tag",
66
67
  "publish-pkg": "pnpm -r publish --access public",
67
- "release": "pnpm update-version && pnpm publish-pkg"
68
+ "release": "pnpm update-version && pnpm publish-pkg",
69
+ "gen-log": "conventional-changelog -p angular -i CHANGELOG.md -s"
68
70
  }
69
71
  }