@done-coding/cli-publish 0.3.2 → 0.3.3

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 n = {
3
+ version: "0.3.3",
3
4
  name: "@done-coding/cli-publish",
4
- version: "0.3.2",
5
- description: "项目发布命令行工具"
5
+ description: "项目发布命令行工具",
6
+ cliConfig: {
7
+ namespaceDir: ".done-coding",
8
+ commandName: "publish"
9
+ }
6
10
  };
7
11
  export {
8
12
  n as default
package/es/main.mjs CHANGED
@@ -2,10 +2,10 @@
2
2
  import m from "yargs";
3
3
  import { hideBin as l } from "yargs/helpers";
4
4
  import { PublishModeEnum as s } from "./utils/types.mjs";
5
- import { handler as n } from "./handler.mjs";
5
+ import { handler as t } from "./handler.mjs";
6
6
  import i from "chalk";
7
- import t from "./injectInfo.json.mjs";
8
- const p = () => ({
7
+ import n from "./injectInfo.json.mjs";
8
+ const d = () => ({
9
9
  mode: {
10
10
  alias: "m",
11
11
  describe: "发布模式",
@@ -24,21 +24,21 @@ const p = () => ({
24
24
  type: "boolean",
25
25
  default: !0
26
26
  }
27
- }), r = "publish", d = (o, e) => {
27
+ }), r = n.cliConfig.commandName, p = (o, e) => {
28
28
  console.log(o ? i.red(o) : i.red(e.message)), process.exit(1);
29
- }, h = t.description, u = `Usage: $0 ${r} [options]`, f = "Usage: $0 [options]", a = (o, e) => {
30
- const c = p();
31
- return o.strict().usage(e).help("help").version(t.version).alias("v", "version").alias("h", "help").options(c).fail(d).argv;
32
- }, g = (o) => a(o, u), N = {
29
+ }, f = n.description, g = `Usage: $0 ${r} [options]`, h = "Usage: $0 [options]", a = (o, e) => {
30
+ const c = d();
31
+ return o.strict().usage(e).help("help").version(n.version).alias("v", "version").alias("h", "help").options(c).fail(p).argv;
32
+ }, u = (o) => a(o, g), M = {
33
33
  command: r,
34
- describe: h,
35
- builder: g,
36
- handler: n
34
+ describe: f,
35
+ builder: u,
36
+ handler: t
37
37
  }, P = async () => {
38
- const o = m(l(process.argv)), e = await a(o, f);
39
- return n(e);
38
+ const o = m(l(process.argv)), e = await a(o, h);
39
+ return t(e);
40
40
  };
41
41
  export {
42
- N as command,
42
+ M as command,
43
43
  P as createCli
44
44
  };
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@done-coding/cli-publish",
3
- "version": "0.3.2",
3
+ "version": "0.3.3",
4
4
  "description": "项目发布命令行工具",
5
5
  "private": false,
6
6
  "module": "es/index.mjs",
@@ -41,7 +41,7 @@
41
41
  "license": "MIT",
42
42
  "sideEffects": false,
43
43
  "devDependencies": {
44
- "@done-coding/cli-inject": "^0.2.2",
44
+ "@done-coding/cli-inject": "^0.3.0",
45
45
  "@types/node": "^20.0.0",
46
46
  "@types/pinyin": "^2.10.0",
47
47
  "@types/prompts": "^2.4.6",
@@ -62,5 +62,5 @@
62
62
  "semver": "^7.5.4",
63
63
  "yargs": "^17.7.2"
64
64
  },
65
- "gitHead": "e2dc7c4b0fa74aa83dc6173416aaffe0a0a445ad"
65
+ "gitHead": "0e9dcf532b8abf7608d07f738348538fa9a9864d"
66
66
  }
package/types/cli.d.ts CHANGED
File without changes
@@ -1,4 +1,4 @@
1
1
  import type { ArgumentsCamelCase } from "yargs";
2
2
  import { type Options } from './utils';
3
3
  export type ChildCmd = "npm" | "web";
4
- export declare const handler: (argv: ArgumentsCamelCase<Options>) => Promise<undefined>;
4
+ 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.3.3",
2
3
  "name": "@done-coding/cli-publish",
3
- "version": "0.3.2",
4
- "description": "项目发布命令行工具"
4
+ "description": "项目发布命令行工具",
5
+ "cliConfig": {
6
+ "namespaceDir": ".done-coding",
7
+ "commandName": "publish"
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