@done-coding/cli 0.12.1-alpha.0 → 0.13.0-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/es/cli.mjs CHANGED
@@ -1,27 +1,35 @@
1
1
  #!/usr/bin/env node
2
- import n from "yargs";
3
- import { hideBin as r } from "yargs/helpers";
4
- import { command as c } from "@done-coding/cli-init";
5
- import { command as d } from "@done-coding/cli-inject";
6
- import { command as i } from "@done-coding/cli-extract";
7
- import { command as e } from "@done-coding/cli-git";
8
- import { command as s } from "create-done-coding";
9
- import { command as t } from "@done-coding/cli-publish";
10
- import { command as p } from "@done-coding/cli-template";
11
- import { command as l } from "@done-coding/cli-component";
12
- import { log as a } from "@done-coding/cli-utils";
13
- const f = {
14
- version: "0.12.1-alpha.0",
2
+ import { crateAsSubcommand as m } from "@done-coding/cli-init";
3
+ import { crateAsSubcommand as o } from "@done-coding/cli-inject";
4
+ import { crateAsSubcommand as a } from "@done-coding/cli-extract";
5
+ import { crateAsSubcommand as c } from "@done-coding/cli-git";
6
+ import { crateAsSubcommand as n } from "create-done-coding";
7
+ import { crateAsSubcommand as r } from "@done-coding/cli-publish";
8
+ import { crateAsSubcommand as e } from "@done-coding/cli-template";
9
+ import { crateAsSubcommand as s } from "@done-coding/cli-component";
10
+ import { createMainCommand as t } from "@done-coding/cli-utils";
11
+ const d = {
12
+ version: "0.13.0-alpha.0",
15
13
  name: "@done-coding/cli",
16
14
  description: "done-coding命令行工具",
17
15
  cliConfig: {
18
16
  namespaceDir: ".done-coding",
19
17
  moduleName: "dc"
20
18
  }
21
- }, g = (m, o) => {
22
- m ? a.error(m) : a.error(o.message), process.exit(1);
23
- }, v = () => {
24
- const m = r(process.argv);
25
- return n(m).strict().usage("Usage: $0 <command> [options]").demandCommand(1).help("help").version(f.version).alias("h", "help").alias("v", "version").command(e).command(s).command(c).command(d).command(i).command(t).command(p).command(l).fail(g).argv;
26
- };
27
- v();
19
+ }, { version: i, description: u } = d, b = {
20
+ usage: "$0 <command> [options]",
21
+ describe: u,
22
+ version: i,
23
+ subcommands: [
24
+ c(),
25
+ n(),
26
+ m(),
27
+ o(),
28
+ a(),
29
+ r(),
30
+ e(),
31
+ s()
32
+ ],
33
+ demandCommandCount: 1
34
+ }, A = async () => t(b);
35
+ A();
package/es/index.mjs CHANGED
@@ -1,24 +1,24 @@
1
1
  #!/usr/bin/env node
2
- import { command as n, handler as e } from "@done-coding/cli-init";
3
- import { command as r, handler as d } from "@done-coding/cli-extract";
4
- import { command as s, handler as l } from "@done-coding/cli-inject";
5
- import { command as p, handler as h } from "create-done-coding";
6
- import { command as x, handler as f } from "@done-coding/cli-publish";
7
- import { command as H, handler as b } from "@done-coding/cli-template";
8
- import { command as j, handler as w } from "@done-coding/cli-component";
2
+ import { crateAsSubcommand as r, handler as m } from "@done-coding/cli-init";
3
+ import { crateAsSubcommand as t, handler as o } from "@done-coding/cli-extract";
4
+ import { crateAsSubcommand as c, handler as s } from "@done-coding/cli-inject";
5
+ import { crateAsSubcommand as p, handler as b } from "create-done-coding";
6
+ import { crateAsSubcommand as h, handler as x } from "@done-coding/cli-publish";
7
+ import { crateAsSubcommand as f, handler as i } from "@done-coding/cli-template";
8
+ import { handler as H, crateAsSubcommand as S } from "@done-coding/cli-component";
9
9
  export {
10
- p as browserCommand,
11
- h as browserHandler,
12
- j as componentCommand,
13
- w as componentHandler,
14
- r as extractCommand,
15
- d as extractHandler,
16
- n as initCommand,
17
- e as initHandler,
18
- s as injectCommand,
19
- l as injectHandler,
20
- x as publishCommand,
21
- f as publishHandler,
22
- H as templateCommand,
23
- b as templateHandler
10
+ H as componentHandler,
11
+ S as createComponentCommand,
12
+ p as createCreateCommand,
13
+ t as createExtractCommand,
14
+ b as createHandler,
15
+ r as createInitCommand,
16
+ c as createInjectCommand,
17
+ h as createPublishCommand,
18
+ f as createTemplateCommand,
19
+ o as extractHandler,
20
+ m as initHandler,
21
+ s as injectHandler,
22
+ x as publishHandler,
23
+ i as templateHandler
24
24
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@done-coding/cli",
3
- "version": "0.12.1-alpha.0",
3
+ "version": "0.13.0-alpha.0",
4
4
  "description": "done-coding命令行工具",
5
5
  "private": false,
6
6
  "module": "es/cli.mjs",
@@ -40,7 +40,6 @@
40
40
  "sideEffects": false,
41
41
  "devDependencies": {
42
42
  "@types/node": "^18.0.0",
43
- "@types/yargs": "^17.0.28",
44
43
  "rimraf": "^6.0.1",
45
44
  "typescript": "^5.2.2",
46
45
  "vite": "^4.4.11",
@@ -50,16 +49,15 @@
50
49
  "node": ">=18.0.0"
51
50
  },
52
51
  "dependencies": {
53
- "@done-coding/cli-component": "^0.2.4-alpha.0",
54
- "@done-coding/cli-extract": "^0.0.2-alpha.0",
55
- "@done-coding/cli-git": "^0.2.3-alpha.0",
56
- "@done-coding/cli-init": "^0.0.13-alpha.0",
57
- "@done-coding/cli-inject": "^0.4.7-alpha.0",
58
- "@done-coding/cli-publish": "^0.4.6-alpha.0",
59
- "@done-coding/cli-template": "^0.6.2-alpha.0",
60
- "@done-coding/cli-utils": "^0.2.2-alpha.0",
61
- "create-done-coding": "^0.9.4-alpha.0",
62
- "yargs": "^17.7.2"
52
+ "@done-coding/cli-component": "^0.3.0-alpha.0",
53
+ "@done-coding/cli-extract": "^0.0.3-alpha.0",
54
+ "@done-coding/cli-git": "^0.3.0-alpha.0",
55
+ "@done-coding/cli-init": "^0.0.14-alpha.0",
56
+ "@done-coding/cli-inject": "^0.5.0-alpha.0",
57
+ "@done-coding/cli-publish": "^0.5.0-alpha.0",
58
+ "@done-coding/cli-template": "^0.7.0-alpha.0",
59
+ "@done-coding/cli-utils": "^0.3.0-alpha.0",
60
+ "create-done-coding": "^0.10.0-alpha.0"
63
61
  },
64
- "gitHead": "2e59e86ee192e023138e7475f4abbb5e7c42b29e"
62
+ "gitHead": "c5a54bdf08759425701a2024442a923883065189"
65
63
  }
package/types/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- export { command as initCommand, handler as initHandler, } from "@done-coding/cli-init";
2
- export { command as extractCommand, handler as extractHandler, } from "@done-coding/cli-extract";
3
- export { command as injectCommand, handler as injectHandler, } from "@done-coding/cli-inject";
4
- export { command as browserCommand, handler as browserHandler, } from "create-done-coding";
5
- export { command as publishCommand, handler as publishHandler, } from "@done-coding/cli-publish";
6
- export { command as templateCommand, handler as templateHandler, } from "@done-coding/cli-template";
7
- export { command as componentCommand, handler as componentHandler, } from "@done-coding/cli-component";
1
+ export { crateAsSubcommand as createInitCommand, handler as initHandler, } from "@done-coding/cli-init";
2
+ export { crateAsSubcommand as createExtractCommand, handler as extractHandler, } from "@done-coding/cli-extract";
3
+ export { crateAsSubcommand as createInjectCommand, handler as injectHandler, } from "@done-coding/cli-inject";
4
+ export { crateAsSubcommand as createCreateCommand, handler as createHandler, } from "create-done-coding";
5
+ export { crateAsSubcommand as createPublishCommand, handler as publishHandler, } from "@done-coding/cli-publish";
6
+ export { crateAsSubcommand as createTemplateCommand, handler as templateHandler, } from "@done-coding/cli-template";
7
+ export { crateAsSubcommand as createComponentCommand, handler as componentHandler, } from "@done-coding/cli-component";
@@ -1,5 +1,5 @@
1
1
  declare const _default: {
2
- "version": "0.12.1-alpha.0",
2
+ "version": "0.13.0-alpha.0",
3
3
  "name": "@done-coding/cli",
4
4
  "description": "done-coding命令行工具",
5
5
  "cliConfig": {
package/types/main.d.ts CHANGED
@@ -1,8 +1,5 @@
1
- export declare const createCli: () => {
2
- [x: string]: unknown;
3
- _: (string | number)[];
4
- $0: string;
5
- } | Promise<{
1
+ /** 作为主命令创建 */
2
+ export declare const createCommand: () => Promise<void | {
6
3
  [x: string]: unknown;
7
4
  _: (string | number)[];
8
5
  $0: string;