create-done-coding 0.4.5 → 0.4.6

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 CHANGED
File without changes
package/es/cli.mjs CHANGED
File without changes
package/es/handler.mjs CHANGED
File without changes
package/es/index.mjs CHANGED
File without changes
@@ -1,8 +1,12 @@
1
1
  #!/usr/bin/env node
2
2
  const e = {
3
+ version: "0.4.6",
3
4
  name: "create-done-coding",
4
- version: "0.4.5",
5
- description: "项目创建命令行工具"
5
+ description: "项目创建命令行工具",
6
+ cliConfig: {
7
+ namespaceDir: ".done-coding",
8
+ commandName: "create"
9
+ }
6
10
  };
7
11
  export {
8
12
  e as default
package/es/main.mjs CHANGED
@@ -1,11 +1,11 @@
1
1
  #!/usr/bin/env node
2
2
  import c from "yargs";
3
3
  import { hideBin as m } from "yargs/helpers";
4
- import { handler as a } from "./handler.mjs";
5
- import s from "chalk";
6
- import { projectNameForm as l, getTemplateChoices as p, getTemplateForm as d, saveGitHistoryForm as g, shallowCloneForm as h } from "./utils/question.mjs";
7
- import t from "./injectInfo.json.mjs";
8
- const f = async () => ({
4
+ import { handler as t } from "./handler.mjs";
5
+ import a from "chalk";
6
+ import { projectNameForm as l, getTemplateChoices as p, getTemplateForm as d, saveGitHistoryForm as g, shallowCloneForm as f } from "./utils/question.mjs";
7
+ import s from "./injectInfo.json.mjs";
8
+ const h = async () => ({
9
9
  projectName: {
10
10
  type: "string",
11
11
  alias: "p",
@@ -25,22 +25,22 @@ const f = async () => ({
25
25
  shallowClone: {
26
26
  type: "boolean",
27
27
  alias: "c",
28
- describe: h.message,
28
+ describe: f.message,
29
29
  default: !0
30
30
  }
31
- }), r = "create", y = (e, o) => {
32
- console.log(e ? s.red(e) : s.red(o.message)), process.exit(1);
33
- }, b = t.description, u = `Usage: $0 ${r} [options]`, v = "Usage: $0 [options]", i = async (e, o) => {
34
- const n = await f();
35
- return e.strict().usage(o).help("help").version(t.version).alias("v", "version").alias("h", "help").options(n).fail(y).argv;
36
- }, C = (e) => i(e, u), $ = {
37
- command: r,
31
+ }), i = s.cliConfig.commandName, y = (e, o) => {
32
+ console.log(e ? a.red(e) : a.red(o.message)), process.exit(1);
33
+ }, b = s.description, u = `Usage: $0 ${i} [options]`, v = "Usage: $0 [options]", n = async (e, o) => {
34
+ const r = await h();
35
+ return e.strict().usage(o).help("help").version(s.version).alias("v", "version").alias("h", "help").options(r).fail(y).argv;
36
+ }, C = (e) => n(e, u), $ = {
37
+ command: i,
38
38
  describe: b,
39
39
  builder: C,
40
- handler: a
40
+ handler: t
41
41
  }, x = async () => {
42
- const e = c(m(process.argv)), o = await i(e, v);
43
- return a(o);
42
+ const e = c(m(process.argv)), o = await n(e, v);
43
+ return t(o);
44
44
  };
45
45
  export {
46
46
  $ as command,
File without changes
File without changes
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-done-coding",
3
- "version": "0.4.5",
3
+ "version": "0.4.6",
4
4
  "description": "项目创建命令行工具",
5
5
  "module": "es/index.mjs",
6
6
  "type": "module",
@@ -38,7 +38,7 @@
38
38
  "license": "MIT",
39
39
  "sideEffects": false,
40
40
  "devDependencies": {
41
- "@done-coding/cli-inject": "^0.2.2",
41
+ "@done-coding/cli-inject": "^0.3.0",
42
42
  "@types/node": "^20.0.0",
43
43
  "@types/prompts": "^2.4.6",
44
44
  "@types/yargs": "^17.0.28",
@@ -55,5 +55,5 @@
55
55
  "prompts": "^2.4.2",
56
56
  "yargs": "^17.7.2"
57
57
  },
58
- "gitHead": "e2dc7c4b0fa74aa83dc6173416aaffe0a0a445ad"
58
+ "gitHead": "0e9dcf532b8abf7608d07f738348538fa9a9864d"
59
59
  }
package/types/cli.d.ts CHANGED
File without changes
@@ -1,3 +1,3 @@
1
1
  import { type Options } from './utils';
2
2
  import type { ArgumentsCamelCase } from "yargs";
3
- export declare const handler: (argv: ArgumentsCamelCase<Options>) => Promise<undefined>;
3
+ export declare const handler: (argv: ArgumentsCamelCase<Options> | Options) => Promise<undefined>;
package/types/index.d.ts CHANGED
File without changes
@@ -1,7 +1,11 @@
1
1
  declare const _default: {
2
+ "version": "0.4.6",
2
3
  "name": "create-done-coding",
3
- "version": "0.4.5",
4
- "description": "项目创建命令行工具"
4
+ "description": "项目创建命令行工具",
5
+ "cliConfig": {
6
+ "namespaceDir": ".done-coding",
7
+ "commandName": "create"
8
+ }
5
9
  };
6
10
 
7
11
  export default _default;
package/types/main.d.ts CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes