@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 +0 -0
- package/es/cli.mjs +0 -0
- package/es/handler.mjs +0 -0
- package/es/index.mjs +0 -0
- package/es/injectInfo.json.mjs +6 -2
- package/es/main.mjs +14 -14
- package/es/utils/types.mjs +0 -0
- package/package.json +3 -3
- package/types/cli.d.ts +0 -0
- package/types/handler.d.ts +1 -1
- package/types/index.d.ts +0 -0
- package/types/injectInfo.json.d.ts +6 -2
- package/types/main.d.ts +0 -0
- package/types/utils/index.d.ts +0 -0
- package/types/utils/types.d.ts +0 -0
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
|
package/es/injectInfo.json.mjs
CHANGED
|
@@ -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
|
-
|
|
5
|
-
|
|
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
|
|
5
|
+
import { handler as t } from "./handler.mjs";
|
|
6
6
|
import i from "chalk";
|
|
7
|
-
import
|
|
8
|
-
const
|
|
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 =
|
|
27
|
+
}), r = n.cliConfig.commandName, p = (o, e) => {
|
|
28
28
|
console.log(o ? i.red(o) : i.red(e.message)), process.exit(1);
|
|
29
|
-
},
|
|
30
|
-
const c =
|
|
31
|
-
return o.strict().usage(e).help("help").version(
|
|
32
|
-
},
|
|
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:
|
|
35
|
-
builder:
|
|
36
|
-
handler:
|
|
34
|
+
describe: f,
|
|
35
|
+
builder: u,
|
|
36
|
+
handler: t
|
|
37
37
|
}, P = async () => {
|
|
38
|
-
const o = m(l(process.argv)), e = await a(o,
|
|
39
|
-
return
|
|
38
|
+
const o = m(l(process.argv)), e = await a(o, h);
|
|
39
|
+
return t(e);
|
|
40
40
|
};
|
|
41
41
|
export {
|
|
42
|
-
|
|
42
|
+
M as command,
|
|
43
43
|
P as createCli
|
|
44
44
|
};
|
package/es/utils/types.mjs
CHANGED
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@done-coding/cli-publish",
|
|
3
|
-
"version": "0.3.
|
|
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.
|
|
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": "
|
|
65
|
+
"gitHead": "0e9dcf532b8abf7608d07f738348538fa9a9864d"
|
|
66
66
|
}
|
package/types/cli.d.ts
CHANGED
|
File without changes
|
package/types/handler.d.ts
CHANGED
|
@@ -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
|
-
"
|
|
4
|
-
"
|
|
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
|
package/types/utils/index.d.ts
CHANGED
|
File without changes
|
package/types/utils/types.d.ts
CHANGED
|
File without changes
|