@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 ADDED
@@ -0,0 +1,11 @@
1
+ # @done-coding/cli-extract
2
+
3
+ ```
4
+ 信息提取命令行工具
5
+ ```
6
+
7
+ ## 使用
8
+
9
+ ``` bash
10
+ npm install @done-coding/cli-extract
11
+ ```
package/es/cli.mjs ADDED
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env node
2
+ import { c as r } from "./index-6ac50ab8.js";
3
+ import "yargs";
4
+ import "yargs/helpers";
5
+ import "chalk";
6
+ r();
@@ -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
@@ -0,0 +1,9 @@
1
+ #!/usr/bin/env node
2
+ import { a as e, h as i } from "./index-6ac50ab8.js";
3
+ import "yargs";
4
+ import "yargs/helpers";
5
+ import "chalk";
6
+ export {
7
+ e as command,
8
+ i as handler
9
+ };
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
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ export {};
@@ -0,0 +1,3 @@
1
+ import type { Options } from './utils';
2
+ import type { ArgumentsCamelCase } from "yargs";
3
+ export declare const handler: (argv: ArgumentsCamelCase<Options>) => Promise<void>;
@@ -0,0 +1,2 @@
1
+ export { handler } from "./handler";
2
+ export { command } from "./main";
@@ -0,0 +1,11 @@
1
+ declare const _default: {
2
+ "version": "0.0.1-alpha.0",
3
+ "name": "@done-coding/cli-extract",
4
+ "description": "信息提取命令行工具",
5
+ "cliConfig": {
6
+ "namespaceDir": ".done-coding",
7
+ "moduleName": "extract"
8
+ }
9
+ };
10
+
11
+ export default _default;
@@ -0,0 +1,4 @@
1
+ import type { CommandModule } from "yargs";
2
+ import type { Options } from './utils';
3
+ export declare const command: CommandModule<Options, Options>;
4
+ export declare const createCli: () => Promise<void>;
@@ -0,0 +1 @@
1
+ export * from "./types";
@@ -0,0 +1,3 @@
1
+ export interface Options {
2
+ xx: string;
3
+ }