done-coding-extract 0.1.23 → 0.2.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-aebb3f75.js → index-80003f80.js} +17 -17
- package/es/index.mjs +2 -2
- package/package.json +5 -5
- package/types/index.d.ts +1 -1
package/README.md
CHANGED
|
@@ -239,11 +239,11 @@ node es/cli.mjs --help
|
|
|
239
239
|
|
|
240
240
|
## 许可证
|
|
241
241
|
|
|
242
|
-
MIT © [
|
|
242
|
+
MIT © [done-coding](https://github.com/done-coding)
|
|
243
243
|
|
|
244
244
|
## 相关链接
|
|
245
245
|
|
|
246
246
|
- [主 CLI 工具](https://www.npmjs.com/package/@done-coding/cli)
|
|
247
247
|
- [模板处理工具](https://www.npmjs.com/package/@done-coding/cli-template) - 本包依赖的模板引擎
|
|
248
|
-
- [
|
|
248
|
+
- [Github 仓库](https://github.com/done-coding/done-coding-cli)
|
|
249
249
|
- [更新日志](./CHANGELOG.md)
|
package/es/cli.mjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { a as r, e as V, E as u, S as
|
|
3
|
-
import { outputConsole as s, _get as J, createSubcommand as N, getRootScriptName as v, getConfigFileCommonOptions as
|
|
2
|
+
import { a as r, e as V, E as u, S as D, G as S } from "./index-a1ee6691-8c73eb4d.js";
|
|
3
|
+
import { outputConsole as s, _get as J, createSubcommand as N, getRootScriptName as v, getConfigFileCommonOptions as h, initHandlerCommon as F, readConfigFile as x, _set as U, createMainCommand as W } from "@done-coding/cli-utils";
|
|
4
4
|
import $ from "node:path";
|
|
5
5
|
import g from "node:fs";
|
|
6
6
|
import { OutputModeEnum as H, batchCompileHandler as X } from "@done-coding/cli-template";
|
|
7
|
-
const
|
|
7
|
+
const j = {
|
|
8
8
|
name: "@done-coding/cli-extract",
|
|
9
|
-
version: "0.
|
|
9
|
+
version: "0.2.2-alpha.0",
|
|
10
10
|
description: "信息提取命令行工具",
|
|
11
11
|
bin: {
|
|
12
12
|
"dc-extract": "es/cli.mjs"
|
|
@@ -17,7 +17,7 @@ const D = {
|
|
|
17
17
|
}
|
|
18
18
|
}, {
|
|
19
19
|
cliConfig: { namespaceDir: K, moduleName: q }
|
|
20
|
-
} =
|
|
20
|
+
} = j, z = `./${K}/${q}`, A = `${z}.json5`, C = ({
|
|
21
21
|
sourceJson: e,
|
|
22
22
|
targetKey: n,
|
|
23
23
|
keyConfig: o
|
|
@@ -50,7 +50,7 @@ const D = {
|
|
|
50
50
|
}
|
|
51
51
|
}, R = {
|
|
52
52
|
name: "@done-coding/cli-inject",
|
|
53
|
-
version: "0.
|
|
53
|
+
version: "0.6.2-alpha.0",
|
|
54
54
|
description: "信息(JSON)注入命令行工具",
|
|
55
55
|
bin: {
|
|
56
56
|
"dc-inject": "es/cli.mjs"
|
|
@@ -78,7 +78,7 @@ const D = {
|
|
|
78
78
|
}
|
|
79
79
|
},
|
|
80
80
|
injectFilePath: "./src/injectInfo.json"
|
|
81
|
-
}, O = Z, ee = () =>
|
|
81
|
+
}, O = Z, ee = () => h({
|
|
82
82
|
configPathDefault: T
|
|
83
83
|
}), ne = async (e) => F(O, e, {
|
|
84
84
|
onFileGenerated: () => {
|
|
@@ -90,7 +90,7 @@ const D = {
|
|
|
90
90
|
options: ee(),
|
|
91
91
|
handler: ne
|
|
92
92
|
}, oe = () => ({
|
|
93
|
-
...
|
|
93
|
+
...h({
|
|
94
94
|
configPathDefault: T
|
|
95
95
|
})
|
|
96
96
|
}), se = async ({
|
|
@@ -237,19 +237,19 @@ const ue = ({
|
|
|
237
237
|
}
|
|
238
238
|
]
|
|
239
239
|
}
|
|
240
|
-
}, le = () =>
|
|
240
|
+
}, le = () => h({
|
|
241
241
|
configPathDefault: A
|
|
242
242
|
}), G = async (e) => F(k, e, {
|
|
243
243
|
onFileGenerated: () => {
|
|
244
244
|
s.info("文件生成成功");
|
|
245
245
|
}
|
|
246
246
|
}), fe = {
|
|
247
|
-
command:
|
|
247
|
+
command: D.INIT,
|
|
248
248
|
describe: "初始化配置文件",
|
|
249
249
|
options: le(),
|
|
250
250
|
handler: G
|
|
251
251
|
}, ye = () => ({
|
|
252
|
-
...
|
|
252
|
+
...h({
|
|
253
253
|
configPathDefault: A
|
|
254
254
|
}),
|
|
255
255
|
mode: {
|
|
@@ -303,24 +303,24 @@ const ue = ({
|
|
|
303
303
|
handler: I
|
|
304
304
|
}, Re = async (e, n) => {
|
|
305
305
|
switch (e) {
|
|
306
|
-
case
|
|
306
|
+
case D.INIT:
|
|
307
307
|
return G(n);
|
|
308
|
-
case
|
|
308
|
+
case D.GENERATE:
|
|
309
309
|
return I(n);
|
|
310
310
|
default:
|
|
311
311
|
return I(n);
|
|
312
312
|
}
|
|
313
|
-
}, { version: Ce, description:
|
|
314
|
-
describe:
|
|
313
|
+
}, { version: Ce, description: he } = j, _ = {
|
|
314
|
+
describe: he,
|
|
315
315
|
version: Ce,
|
|
316
316
|
subcommands: [fe, Ee].map(
|
|
317
317
|
N
|
|
318
318
|
),
|
|
319
319
|
demandCommandCount: 1,
|
|
320
|
-
rootScriptName: v({ packageJson:
|
|
320
|
+
rootScriptName: v({ packageJson: j })
|
|
321
321
|
}, {
|
|
322
322
|
cliConfig: { moduleName: w }
|
|
323
|
-
} =
|
|
323
|
+
} = j, P = (e = !1) => {
|
|
324
324
|
const n = e ? w : void 0, o = `$0${e ? ` ${w}` : ""} <command> [options]`;
|
|
325
325
|
return { command: n, usage: o };
|
|
326
326
|
}, Oe = async () => W({
|
package/es/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { i as t, a as i, e as s, g as d, d as l, f as p, b as f, h as u } from "./index-
|
|
2
|
+
import { i as t, a as i, e as s, g as d, d as l, f as p, b as f, h as u } from "./index-80003f80.js";
|
|
3
3
|
import { E as C, G as E, S as b } from "./index-a1ee6691-8c73eb4d.js";
|
|
4
4
|
import "@done-coding/cli-utils";
|
|
5
5
|
import "node:path";
|
|
@@ -10,7 +10,7 @@ export {
|
|
|
10
10
|
E as GenerateModeEnum,
|
|
11
11
|
b as SubcommandEnum,
|
|
12
12
|
t as commandCliInfo,
|
|
13
|
-
i as
|
|
13
|
+
i as createAsSubcommand,
|
|
14
14
|
s as generateCommandCliInfo,
|
|
15
15
|
d as generateFile,
|
|
16
16
|
l as generateHandler,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "done-coding-extract",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.2-alpha.0",
|
|
4
4
|
"description": "信息提取命令行工具",
|
|
5
5
|
"private": false,
|
|
6
6
|
"module": "es/index.mjs",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"license": "MIT",
|
|
43
43
|
"sideEffects": false,
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@done-coding/cli-inject": "0.
|
|
45
|
+
"@done-coding/cli-inject": "0.6.2-alpha.0",
|
|
46
46
|
"@types/node": "^18.0.0",
|
|
47
47
|
"@types/yargs": "^17.0.28",
|
|
48
48
|
"typescript": "^5.8.3",
|
|
@@ -50,12 +50,12 @@
|
|
|
50
50
|
"vite-plugin-dts": "^3.6.0"
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
|
-
"@done-coding/cli-template": "0.
|
|
54
|
-
"@done-coding/cli-utils": "0.
|
|
53
|
+
"@done-coding/cli-template": "0.9.2-alpha.0",
|
|
54
|
+
"@done-coding/cli-utils": "0.9.2-alpha.0"
|
|
55
55
|
},
|
|
56
56
|
"engines": {
|
|
57
57
|
"node": ">=18.0.0"
|
|
58
58
|
},
|
|
59
|
-
"gitHead": "
|
|
59
|
+
"gitHead": "74e5c9a43a622ed90e64e8c9a67b110c22c89887",
|
|
60
60
|
"scripts": {}
|
|
61
61
|
}
|
package/types/index.d.ts
CHANGED
|
@@ -12,7 +12,7 @@ import { SubCliInfo } from '@done-coding/cli-utils';
|
|
|
12
12
|
export declare const commandCliInfo: Omit<CliInfo, "usage">;
|
|
13
13
|
|
|
14
14
|
/** 作为子命令创建 */
|
|
15
|
-
export declare const
|
|
15
|
+
export declare const createAsSubcommand: () => CommandModule<{}, {}>;
|
|
16
16
|
|
|
17
17
|
export declare interface ExtractConfig {
|
|
18
18
|
/**
|