@done-coding/cli-extract 0.0.1-alpha.0 → 0.0.2-alpha.0

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/es/cli.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
- import { c as r } from "./index-6ac50ab8.js";
2
+ import { c as r } from "./index-daa98153.js";
3
3
  import "yargs";
4
4
  import "yargs/helpers";
5
- import "chalk";
5
+ import "@done-coding/cli-utils";
6
6
  r();
@@ -1,18 +1,18 @@
1
1
  #!/usr/bin/env node
2
- import r from "yargs";
3
- import { hideBin as l } from "yargs/helpers";
4
- import s from "chalk";
2
+ import c from "yargs";
3
+ import { hideBin as m } from "yargs/helpers";
4
+ import { log as s } from "@done-coding/cli-utils";
5
5
  const i = async (o) => {
6
6
  console.log(o);
7
7
  }, n = {
8
- version: "0.0.1-alpha.0",
8
+ version: "0.0.2-alpha.0",
9
9
  name: "@done-coding/cli-extract",
10
10
  description: "信息提取命令行工具",
11
11
  cliConfig: {
12
12
  namespaceDir: ".done-coding",
13
13
  moduleName: "extract"
14
14
  }
15
- }, m = () => ({
15
+ }, l = () => ({
16
16
  xx: {
17
17
  alias: "x",
18
18
  describe: "模版测试",
@@ -20,17 +20,17 @@ const i = async (o) => {
20
20
  demandOption: !0
21
21
  }
22
22
  }), a = n.cliConfig.moduleName, d = (o, e) => {
23
- console.log(o ? s.red(o) : s.red(e.message)), process.exit(1);
24
- }, p = n.description, g = `Usage: $0 ${a} [options]`, h = "Usage: $0 [options]", t = (o, e) => {
25
- const c = m();
26
- return o.strict().usage(e).help("help").version(n.version).alias("v", "version").alias("h", "help").options(c).fail(d).argv;
27
- }, u = (o) => t(o, g), C = {
23
+ o ? s.error(o) : s.error(e.message), process.exit(1);
24
+ }, p = n.description, g = `Usage: $0 ${a} [options]`, u = "Usage: $0 [options]", r = (o, e) => {
25
+ const t = l();
26
+ return o.strict().usage(e).help("help").version(n.version).alias("v", "version").alias("h", "help").options(t).fail(d).argv;
27
+ }, f = (o) => r(o, g), C = {
28
28
  command: a,
29
29
  describe: p,
30
- builder: u,
30
+ builder: f,
31
31
  handler: i
32
32
  }, b = async () => {
33
- const o = r(l(process.argv)), e = await t(o, h);
33
+ const o = c(m(process.argv)), e = await r(o, u);
34
34
  return i(e);
35
35
  };
36
36
  export {
package/es/index.mjs CHANGED
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
- import { a as e, h as i } from "./index-6ac50ab8.js";
2
+ import { a as e, h as i } from "./index-daa98153.js";
3
3
  import "yargs";
4
4
  import "yargs/helpers";
5
- import "chalk";
5
+ import "@done-coding/cli-utils";
6
6
  export {
7
7
  e as command,
8
8
  i as handler
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@done-coding/cli-extract",
3
- "version": "0.0.1-alpha.0",
3
+ "version": "0.0.2-alpha.0",
4
4
  "description": "信息提取命令行工具",
5
5
  "private": false,
6
6
  "module": "es/index.mjs",
@@ -41,9 +41,8 @@
41
41
  "license": "MIT",
42
42
  "sideEffects": false,
43
43
  "devDependencies": {
44
- "@done-coding/cli-inject": "^0.4.6-alpha.0",
44
+ "@done-coding/cli-inject": "^0.4.7-alpha.0",
45
45
  "@types/node": "^16.0.0",
46
- "@types/prompts": "^2.4.6",
47
46
  "@types/yargs": "^17.0.28",
48
47
  "rimraf": "^6.0.1",
49
48
  "typescript": "^5.2.2",
@@ -54,9 +53,8 @@
54
53
  "node": ">=16.0.0"
55
54
  },
56
55
  "dependencies": {
57
- "chalk": "^5.3.0",
58
- "prompts": "^2.4.2",
56
+ "@done-coding/cli-utils": "^0.2.2-alpha.0",
59
57
  "yargs": "^17.7.2"
60
58
  },
61
- "gitHead": "21eb698f64179882cfec979bd8f19920b047dacb"
59
+ "gitHead": "2e59e86ee192e023138e7475f4abbb5e7c42b29e"
62
60
  }
@@ -1,5 +1,5 @@
1
1
  declare const _default: {
2
- "version": "0.0.1-alpha.0",
2
+ "version": "0.0.2-alpha.0",
3
3
  "name": "@done-coding/cli-extract",
4
4
  "description": "信息提取命令行工具",
5
5
  "cliConfig": {