@done-coding/cli-inject 0.3.0 → 0.3.1
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/injectInfo.json.mjs +2 -2
- package/es/main.mjs +10 -10
- package/package.json +2 -2
- package/types/injectInfo.json.d.ts +2 -2
package/es/injectInfo.json.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
const n = {
|
|
3
|
-
version: "0.3.
|
|
3
|
+
version: "0.3.1",
|
|
4
4
|
name: "@done-coding/cli-inject",
|
|
5
5
|
description: "信息注入命令行工具",
|
|
6
6
|
cliConfig: {
|
|
7
7
|
namespaceDir: ".done-coding",
|
|
8
|
-
|
|
8
|
+
moduleName: "inject"
|
|
9
9
|
}
|
|
10
10
|
};
|
|
11
11
|
export {
|
package/es/main.mjs
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import c from "yargs";
|
|
3
3
|
import { hideBin as l } from "yargs/helpers";
|
|
4
4
|
import { handler as i } from "./handler.mjs";
|
|
5
|
-
import
|
|
6
|
-
import
|
|
5
|
+
import n from "chalk";
|
|
6
|
+
import s from "./injectInfo.json.mjs";
|
|
7
7
|
const m = () => ({
|
|
8
8
|
sourceJsonFilePath: {
|
|
9
9
|
type: "string",
|
|
@@ -23,18 +23,18 @@ const m = () => ({
|
|
|
23
23
|
describe: "注入信息文件路径",
|
|
24
24
|
default: "./src/injectInfo.json"
|
|
25
25
|
}
|
|
26
|
-
}), t =
|
|
27
|
-
console.log(e ?
|
|
28
|
-
}, p =
|
|
29
|
-
const
|
|
30
|
-
return e.strict().usage(o).help("help").version(
|
|
31
|
-
},
|
|
26
|
+
}), t = s.cliConfig.moduleName, d = (e, o) => {
|
|
27
|
+
console.log(e ? n.red(e) : n.red(o.message)), process.exit(1);
|
|
28
|
+
}, p = s.description, g = `Usage: $0 ${t} [options]`, f = "Usage: $0 [options]", r = (e, o) => {
|
|
29
|
+
const a = m();
|
|
30
|
+
return e.strict().usage(o).help("help").version(s.version).alias("v", "version").alias("h", "help").options(a).fail(d).argv;
|
|
31
|
+
}, u = (e) => r(e, g), C = {
|
|
32
32
|
command: t,
|
|
33
33
|
describe: p,
|
|
34
|
-
builder:
|
|
34
|
+
builder: u,
|
|
35
35
|
handler: i
|
|
36
36
|
}, k = async () => {
|
|
37
|
-
const e = c(l(process.argv)), o = await
|
|
37
|
+
const e = c(l(process.argv)), o = await r(e, f);
|
|
38
38
|
return i(o);
|
|
39
39
|
};
|
|
40
40
|
export {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@done-coding/cli-inject",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "信息注入命令行工具",
|
|
5
5
|
"private": false,
|
|
6
6
|
"module": "es/index.mjs",
|
|
@@ -61,5 +61,5 @@
|
|
|
61
61
|
"prompts": "^2.4.2",
|
|
62
62
|
"yargs": "^17.7.2"
|
|
63
63
|
},
|
|
64
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "d1dabd6e46a5e38793bba477449dd62aa4d9c4c1"
|
|
65
65
|
}
|