@done-coding/cli-publish 0.4.4 → 0.4.5-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 +2 -2
- package/es/{index-482d005d.js → index-3eb0cae4.js} +10 -10
- package/es/index.mjs +2 -2
- package/package.json +4 -4
- package/types/injectInfo.json.d.ts +1 -1
package/es/cli.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { c as r } from "./index-
|
|
2
|
+
import { c as r } from "./index-3eb0cae4.js";
|
|
3
3
|
import "semver";
|
|
4
4
|
import "node:path";
|
|
5
5
|
import "node:child_process";
|
|
@@ -7,7 +7,7 @@ import "pinyin";
|
|
|
7
7
|
import "node:fs";
|
|
8
8
|
import "chalk";
|
|
9
9
|
import "prompts";
|
|
10
|
-
import "@done-coding/
|
|
10
|
+
import "@done-coding/cli-utils";
|
|
11
11
|
import "yargs";
|
|
12
12
|
import "yargs/helpers";
|
|
13
13
|
r();
|
|
@@ -3,10 +3,10 @@ import { inc as A, prerelease as C } from "semver";
|
|
|
3
3
|
import { join as v } from "node:path";
|
|
4
4
|
import { execSync as n } from "node:child_process";
|
|
5
5
|
import P from "pinyin";
|
|
6
|
-
import { readFileSync as
|
|
6
|
+
import { readFileSync as h, existsSync as y } from "node:fs";
|
|
7
7
|
import p from "chalk";
|
|
8
8
|
import I from "prompts";
|
|
9
|
-
import { onPromptFormStateForSigint as H } from "@done-coding/
|
|
9
|
+
import { onPromptFormStateForSigint as H } from "@done-coding/cli-utils";
|
|
10
10
|
import w from "yargs";
|
|
11
11
|
import { hideBin as J } from "yargs/helpers";
|
|
12
12
|
var E = /* @__PURE__ */ ((t) => (t.NPM = "npm", t.WEB = "web", t))(E || {}), e = /* @__PURE__ */ ((t) => (t.MAJOR = "major", t.MINOR = "minor", t.PATCH = "patch", t.PREMAJOR = "premajor", t.PREMINOR = "preminor", t.PREPATCH = "prepatch", t.PRERELEASE = "prerelease", t))(e || {}), d = /* @__PURE__ */ ((t) => (t.LATEST = "latest", t.NEXT = "next", t.ALPHA = "alpha", t))(d || {});
|
|
@@ -40,7 +40,7 @@ const L = "/.dc/publish.json", N = "/package.json", T = ({ gitOriginName: t = "o
|
|
|
40
40
|
} catch (o) {
|
|
41
41
|
throw console.error("Error fetching git information:", o), o;
|
|
42
42
|
}
|
|
43
|
-
}, R = (t, o = JSON.parse(
|
|
43
|
+
}, R = (t, o = JSON.parse(h(v(process.cwd(), N), "utf-8"))) => {
|
|
44
44
|
let m = o.name, c = "", i;
|
|
45
45
|
const { version: s } = o;
|
|
46
46
|
if ([
|
|
@@ -78,7 +78,7 @@ const L = "/.dc/publish.json", N = "/package.json", T = ({ gitOriginName: t = "o
|
|
|
78
78
|
let t;
|
|
79
79
|
const o = v(process.cwd(), L);
|
|
80
80
|
if (y(o)) {
|
|
81
|
-
const m =
|
|
81
|
+
const m = h(o, "utf-8");
|
|
82
82
|
t = JSON.parse(m);
|
|
83
83
|
} else
|
|
84
84
|
console.log(
|
|
@@ -98,7 +98,7 @@ const L = "/.dc/publish.json", N = "/package.json", T = ({ gitOriginName: t = "o
|
|
|
98
98
|
if (l)
|
|
99
99
|
console.log("type:", l), g = await R(l);
|
|
100
100
|
else {
|
|
101
|
-
const r = JSON.parse(
|
|
101
|
+
const r = JSON.parse(h(v(process.cwd(), N), "utf-8")), a = {
|
|
102
102
|
[e.MAJOR]: R(
|
|
103
103
|
e.MAJOR,
|
|
104
104
|
r
|
|
@@ -190,8 +190,8 @@ const L = "/.dc/publish.json", N = "/package.json", T = ({ gitOriginName: t = "o
|
|
|
190
190
|
return process.exit(1);
|
|
191
191
|
}
|
|
192
192
|
c && (n(`git push ${i.gitOriginName} v${g.version} 1>&2`), n(`git push ${i.gitOriginName} ${s.branchName} 1>&2`)), console.log(p.green("发布成功"));
|
|
193
|
-
},
|
|
194
|
-
version: "0.4.
|
|
193
|
+
}, O = {
|
|
194
|
+
version: "0.4.5-alpha.0",
|
|
195
195
|
name: "@done-coding/cli-publish",
|
|
196
196
|
description: "项目发布命令行工具",
|
|
197
197
|
cliConfig: {
|
|
@@ -224,11 +224,11 @@ const L = "/.dc/publish.json", N = "/package.json", T = ({ gitOriginName: t = "o
|
|
|
224
224
|
type: "boolean",
|
|
225
225
|
default: !0
|
|
226
226
|
}
|
|
227
|
-
}), u =
|
|
227
|
+
}), u = O.cliConfig.moduleName, x = (t, o) => {
|
|
228
228
|
console.log(t ? p.red(t) : p.red(o.message)), process.exit(1);
|
|
229
|
-
}, B =
|
|
229
|
+
}, B = O.description, U = `Usage: $0 ${u} [options]`, D = "Usage: $0 [options]", S = (t, o) => {
|
|
230
230
|
const m = j();
|
|
231
|
-
return t.strict().usage(o).help("help").version(
|
|
231
|
+
return t.strict().usage(o).help("help").version(O.version).alias("v", "version").alias("h", "help").options(m).fail(x).argv;
|
|
232
232
|
}, Y = (t) => S(t, U), Z = {
|
|
233
233
|
command: u,
|
|
234
234
|
describe: B,
|
package/es/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { P as u, a as b, h as l } from "./index-
|
|
2
|
+
import { P as u, a as b, h as l } from "./index-3eb0cae4.js";
|
|
3
3
|
import "semver";
|
|
4
4
|
import "node:path";
|
|
5
5
|
import "node:child_process";
|
|
@@ -7,7 +7,7 @@ import "pinyin";
|
|
|
7
7
|
import "node:fs";
|
|
8
8
|
import "chalk";
|
|
9
9
|
import "prompts";
|
|
10
|
-
import "@done-coding/
|
|
10
|
+
import "@done-coding/cli-utils";
|
|
11
11
|
import "yargs";
|
|
12
12
|
import "yargs/helpers";
|
|
13
13
|
export {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@done-coding/cli-publish",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.5-alpha.0",
|
|
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.4.
|
|
44
|
+
"@done-coding/cli-inject": "^0.4.6-alpha.0",
|
|
45
45
|
"@types/node": "^18.0.0",
|
|
46
46
|
"@types/pinyin": "^2.10.0",
|
|
47
47
|
"@types/prompts": "^2.4.6",
|
|
@@ -56,12 +56,12 @@
|
|
|
56
56
|
"node": ">=18.0.0"
|
|
57
57
|
},
|
|
58
58
|
"dependencies": {
|
|
59
|
-
"@done-coding/
|
|
59
|
+
"@done-coding/cli-utils": "^0.2.1-alpha.0",
|
|
60
60
|
"chalk": "^5.3.0",
|
|
61
61
|
"pinyin": "^2.11.2",
|
|
62
62
|
"prompts": "^2.4.2",
|
|
63
63
|
"semver": "^7.5.4",
|
|
64
64
|
"yargs": "^17.7.2"
|
|
65
65
|
},
|
|
66
|
-
"gitHead": "
|
|
66
|
+
"gitHead": "21eb698f64179882cfec979bd8f19920b047dacb"
|
|
67
67
|
}
|