done-coding-inject 0.5.23 → 0.6.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/README.md +2 -2
- package/es/cli.mjs +1 -1
- package/es/{index-6e0f42c3.js → index-ddb635db.js} +10 -10
- package/es/index.mjs +2 -2
- package/package.json +3 -3
- package/types/index.d.ts +1 -1
package/README.md
CHANGED
|
@@ -182,10 +182,10 @@ node es/cli.mjs --help
|
|
|
182
182
|
|
|
183
183
|
## 许可证
|
|
184
184
|
|
|
185
|
-
MIT © [
|
|
185
|
+
MIT © [done-coding](https://github.com/done-coding)
|
|
186
186
|
|
|
187
187
|
## 相关链接
|
|
188
188
|
|
|
189
189
|
- [主 CLI 工具](https://www.npmjs.com/package/@done-coding/cli)
|
|
190
|
-
- [
|
|
190
|
+
- [Github 仓库](https://github.com/done-coding/done-coding-cli)
|
|
191
191
|
- [更新日志](./CHANGELOG.md)
|
package/es/cli.mjs
CHANGED
|
@@ -36,7 +36,7 @@ const x = ({
|
|
|
36
36
|
}
|
|
37
37
|
}, d = {
|
|
38
38
|
name: "@done-coding/cli-inject",
|
|
39
|
-
version: "0.
|
|
39
|
+
version: "0.6.2-alpha.0",
|
|
40
40
|
description: "信息(JSON)注入命令行工具",
|
|
41
41
|
bin: {
|
|
42
42
|
"dc-inject": "es/cli.mjs"
|
|
@@ -64,9 +64,9 @@ const x = ({
|
|
|
64
64
|
}
|
|
65
65
|
},
|
|
66
66
|
injectFilePath: "./src/injectInfo.json"
|
|
67
|
-
},
|
|
67
|
+
}, j = U, V = () => A({
|
|
68
68
|
configPathDefault: R
|
|
69
|
-
}), S = async (e) => k(
|
|
69
|
+
}), S = async (e) => k(j, e, {
|
|
70
70
|
onFileGenerated: () => {
|
|
71
71
|
o.info("文件生成成功");
|
|
72
72
|
}
|
|
@@ -81,7 +81,7 @@ const x = ({
|
|
|
81
81
|
})
|
|
82
82
|
}), W = async ({
|
|
83
83
|
rootDir: e = process.cwd(),
|
|
84
|
-
config: n =
|
|
84
|
+
config: n = j,
|
|
85
85
|
keyConfigMap: t = {}
|
|
86
86
|
} = {}) => {
|
|
87
87
|
const {
|
|
@@ -111,8 +111,8 @@ const x = ({
|
|
|
111
111
|
} else
|
|
112
112
|
o.stage("开始注入文件");
|
|
113
113
|
m.writeFileSync(l, C), o.success(`文件注入成功: ${l}`), o.info(C);
|
|
114
|
-
},
|
|
115
|
-
const n = await T(e, () => (o.info("配置文件为空,使用默认配置"),
|
|
114
|
+
}, h = async (e) => {
|
|
115
|
+
const n = await T(e, () => (o.info("配置文件为空,使用默认配置"), j));
|
|
116
116
|
if (!n)
|
|
117
117
|
return o.error("配置文件为空"), process.exit(1);
|
|
118
118
|
const { rootDir: t } = e;
|
|
@@ -121,15 +121,15 @@ const x = ({
|
|
|
121
121
|
command: "$0",
|
|
122
122
|
describe: "生成文件",
|
|
123
123
|
options: K(),
|
|
124
|
-
handler:
|
|
124
|
+
handler: h
|
|
125
125
|
}, ee = async (e, n) => {
|
|
126
126
|
switch (e) {
|
|
127
127
|
case E.INIT:
|
|
128
128
|
return S(n);
|
|
129
129
|
case E.GENERATE:
|
|
130
|
-
return
|
|
130
|
+
return h(n);
|
|
131
131
|
default:
|
|
132
|
-
return
|
|
132
|
+
return h(n);
|
|
133
133
|
}
|
|
134
134
|
}, { version: q, description: z } = d, b = {
|
|
135
135
|
describe: z,
|
|
@@ -155,7 +155,7 @@ export {
|
|
|
155
155
|
oe as a,
|
|
156
156
|
H as b,
|
|
157
157
|
ne as c,
|
|
158
|
-
|
|
158
|
+
h as d,
|
|
159
159
|
X as e,
|
|
160
160
|
ee as f,
|
|
161
161
|
W as g,
|
package/es/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { i as r, a as i, e as s, g as t, d, f as l, b as f, h as p, k as C } from "./index-
|
|
2
|
+
import { i as r, a as i, e as s, g as t, d, f as l, b as f, h as p, k as C } from "./index-ddb635db.js";
|
|
3
3
|
import { I as g, S as u } from "./index-a1ee6691.js";
|
|
4
4
|
import "@done-coding/cli-utils";
|
|
5
5
|
import "node:path";
|
|
@@ -8,7 +8,7 @@ export {
|
|
|
8
8
|
g as InjectTypeEnum,
|
|
9
9
|
u as SubcommandEnum,
|
|
10
10
|
r as commandCliInfo,
|
|
11
|
-
i as
|
|
11
|
+
i as createAsSubcommand,
|
|
12
12
|
s as generateCommandCliInfo,
|
|
13
13
|
t as generateFile,
|
|
14
14
|
d as generateHandler,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "done-coding-inject",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.2-alpha.0",
|
|
4
4
|
"description": "信息(JSON)注入命令行工具",
|
|
5
5
|
"private": false,
|
|
6
6
|
"module": "es/index.mjs",
|
|
@@ -49,11 +49,11 @@
|
|
|
49
49
|
"vite-plugin-dts": "^3.6.0"
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@done-coding/cli-utils": "0.
|
|
52
|
+
"@done-coding/cli-utils": "0.9.2-alpha.0"
|
|
53
53
|
},
|
|
54
54
|
"engines": {
|
|
55
55
|
"node": ">=18.0.0"
|
|
56
56
|
},
|
|
57
|
-
"gitHead": "
|
|
57
|
+
"gitHead": "74e5c9a43a622ed90e64e8c9a67b110c22c89887",
|
|
58
58
|
"scripts": {}
|
|
59
59
|
}
|
package/types/index.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ import { SubCliInfo } from '@done-coding/cli-utils';
|
|
|
8
8
|
export declare const commandCliInfo: Omit<CliInfo, "usage">;
|
|
9
9
|
|
|
10
10
|
/** 作为子命令创建 */
|
|
11
|
-
export declare const
|
|
11
|
+
export declare const createAsSubcommand: () => CommandModule<{}, {}>;
|
|
12
12
|
|
|
13
13
|
export declare const generateCommandCliInfo: SubCliInfo;
|
|
14
14
|
|