@done-coding/cli-extract 0.0.1-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 +11 -0
- package/es/cli.mjs +6 -0
- package/es/index-6ac50ab8.js +40 -0
- package/es/index.mjs +9 -0
- package/package.json +62 -0
- package/types/cli.d.ts +2 -0
- package/types/handler.d.ts +3 -0
- package/types/index.d.ts +2 -0
- package/types/injectInfo.json.d.ts +11 -0
- package/types/main.d.ts +4 -0
- package/types/utils/index.d.ts +1 -0
- package/types/utils/types.d.ts +3 -0
package/README.md
ADDED
package/es/cli.mjs
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import r from "yargs";
|
|
3
|
+
import { hideBin as l } from "yargs/helpers";
|
|
4
|
+
import s from "chalk";
|
|
5
|
+
const i = async (o) => {
|
|
6
|
+
console.log(o);
|
|
7
|
+
}, n = {
|
|
8
|
+
version: "0.0.1-alpha.0",
|
|
9
|
+
name: "@done-coding/cli-extract",
|
|
10
|
+
description: "信息提取命令行工具",
|
|
11
|
+
cliConfig: {
|
|
12
|
+
namespaceDir: ".done-coding",
|
|
13
|
+
moduleName: "extract"
|
|
14
|
+
}
|
|
15
|
+
}, m = () => ({
|
|
16
|
+
xx: {
|
|
17
|
+
alias: "x",
|
|
18
|
+
describe: "模版测试",
|
|
19
|
+
type: "string",
|
|
20
|
+
demandOption: !0
|
|
21
|
+
}
|
|
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 = {
|
|
28
|
+
command: a,
|
|
29
|
+
describe: p,
|
|
30
|
+
builder: u,
|
|
31
|
+
handler: i
|
|
32
|
+
}, b = async () => {
|
|
33
|
+
const o = r(l(process.argv)), e = await t(o, h);
|
|
34
|
+
return i(e);
|
|
35
|
+
};
|
|
36
|
+
export {
|
|
37
|
+
C as a,
|
|
38
|
+
b as c,
|
|
39
|
+
i as h
|
|
40
|
+
};
|
package/es/index.mjs
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@done-coding/cli-extract",
|
|
3
|
+
"version": "0.0.1-alpha.0",
|
|
4
|
+
"description": "信息提取命令行工具",
|
|
5
|
+
"private": false,
|
|
6
|
+
"module": "es/index.mjs",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"types": "types/index.d.ts",
|
|
9
|
+
"bin": {
|
|
10
|
+
"dc-extract": "es/cli.mjs"
|
|
11
|
+
},
|
|
12
|
+
"exports": {
|
|
13
|
+
".": {
|
|
14
|
+
"import": "./es/index.mjs"
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"files": [
|
|
18
|
+
"es",
|
|
19
|
+
"lib",
|
|
20
|
+
"types",
|
|
21
|
+
"gif"
|
|
22
|
+
],
|
|
23
|
+
"scripts": {
|
|
24
|
+
"clean": "rimraf es lib types",
|
|
25
|
+
"predev": "pnpm run clean",
|
|
26
|
+
"dev": "vite build --watch",
|
|
27
|
+
"prebuild": "pnpm run clean",
|
|
28
|
+
"build": "vite build",
|
|
29
|
+
"prepack": "pnpm build"
|
|
30
|
+
},
|
|
31
|
+
"repository": {
|
|
32
|
+
"type": "git",
|
|
33
|
+
"url": "https://gitee.com/justsosu/done-coding-cli.git",
|
|
34
|
+
"directory": "packages/extract"
|
|
35
|
+
},
|
|
36
|
+
"publishConfig": {
|
|
37
|
+
"access": "public",
|
|
38
|
+
"registry": "https://registry.npmjs.org/"
|
|
39
|
+
},
|
|
40
|
+
"author": "JustSoSu",
|
|
41
|
+
"license": "MIT",
|
|
42
|
+
"sideEffects": false,
|
|
43
|
+
"devDependencies": {
|
|
44
|
+
"@done-coding/cli-inject": "^0.4.6-alpha.0",
|
|
45
|
+
"@types/node": "^16.0.0",
|
|
46
|
+
"@types/prompts": "^2.4.6",
|
|
47
|
+
"@types/yargs": "^17.0.28",
|
|
48
|
+
"rimraf": "^6.0.1",
|
|
49
|
+
"typescript": "^5.2.2",
|
|
50
|
+
"vite": "^4.4.11",
|
|
51
|
+
"vite-plugin-dts": "^3.6.0"
|
|
52
|
+
},
|
|
53
|
+
"engines": {
|
|
54
|
+
"node": ">=16.0.0"
|
|
55
|
+
},
|
|
56
|
+
"dependencies": {
|
|
57
|
+
"chalk": "^5.3.0",
|
|
58
|
+
"prompts": "^2.4.2",
|
|
59
|
+
"yargs": "^17.7.2"
|
|
60
|
+
},
|
|
61
|
+
"gitHead": "21eb698f64179882cfec979bd8f19920b047dacb"
|
|
62
|
+
}
|
package/types/cli.d.ts
ADDED
package/types/index.d.ts
ADDED
package/types/main.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./types";
|