@pubinfo/cli 2.1.8 → 2.1.10-beta.1
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.
|
@@ -36,19 +36,15 @@ var commit_default = {
|
|
|
36
36
|
},
|
|
37
37
|
run: async ({ args }) => {
|
|
38
38
|
if (isGitRepository()) {
|
|
39
|
-
const { createCzConfig, createGitMessage, runCzConfig, runNpx, runSimpleGitHooks, runGitMessage, lintMessage, runPrompt, isCommitlintEnabled,
|
|
39
|
+
const { createCzConfig, createGitMessage, runCzConfig, runNpx, runSimpleGitHooks, runGitMessage, lintMessage, runPrompt, isCommitlintEnabled, disableCommitlint, enableCommitlint } = await import("@pubinfo/commitlint");
|
|
40
40
|
const commitlintEnabled = await isCommitlintEnabled();
|
|
41
41
|
if (args.init) {
|
|
42
42
|
const cwd$1 = process.cwd();
|
|
43
43
|
if (!commitlintEnabled) {
|
|
44
|
-
|
|
45
|
-
const removedCli = runSimpleGitHooks("pubinfo commit", cwd$1, false);
|
|
46
|
-
const disabledHooks = configureGitHooksPath(false, cwd$1);
|
|
47
|
-
if (removedDefault || removedCli || disabledHooks) console.log("[pubinfo commit] 检测到 pubinfo.config 中已关闭 commitlint,已停用 git hooks。");
|
|
44
|
+
if (disableCommitlint(cwd$1)) console.log("[pubinfo commit] 检测到 pubinfo.config 中已关闭 commitlint,已停用 git hooks。");
|
|
48
45
|
else console.log("[pubinfo commit] 检测到 pubinfo.config 中已关闭 commitlint,跳过初始化。");
|
|
49
46
|
return;
|
|
50
47
|
}
|
|
51
|
-
configureGitHooksPath(true, cwd$1);
|
|
52
48
|
const pubinfoDir = `${cwd$1}/.pubinfo`;
|
|
53
49
|
if (!fs.existsSync(pubinfoDir)) fs.mkdirSync(pubinfoDir);
|
|
54
50
|
const gitMessageStatus = createGitMessage();
|
|
@@ -68,7 +64,7 @@ var commit_default = {
|
|
|
68
64
|
}
|
|
69
65
|
if (args.edit) {
|
|
70
66
|
if (!commitlintEnabled) {
|
|
71
|
-
|
|
67
|
+
disableCommitlint(process.cwd());
|
|
72
68
|
return;
|
|
73
69
|
}
|
|
74
70
|
try {
|
|
@@ -85,7 +81,7 @@ var commit_default = {
|
|
|
85
81
|
}
|
|
86
82
|
if (!commitlintEnabled) {
|
|
87
83
|
console.log("[pubinfo commit] commitlint 已关闭,交互模式不可用。");
|
|
88
|
-
|
|
84
|
+
disableCommitlint(process.cwd());
|
|
89
85
|
return;
|
|
90
86
|
}
|
|
91
87
|
const result = await runPrompt();
|
package/dist/index.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import { fileURLToPath } from "node:url";
|
|
|
3
3
|
|
|
4
4
|
//#region package.json
|
|
5
5
|
var name = "@pubinfo/cli";
|
|
6
|
-
var version = "2.1.
|
|
6
|
+
var version = "2.1.10-beta.1";
|
|
7
7
|
var description = "CLI for Pubinfo";
|
|
8
8
|
|
|
9
9
|
//#endregion
|
|
@@ -14,7 +14,7 @@ const commands = {
|
|
|
14
14
|
build: () => import("./build-D-fWoV55.mjs").then(_rDefault),
|
|
15
15
|
preview: () => import("./preview-CLKqZdRX.mjs").then(_rDefault),
|
|
16
16
|
setup: () => import("./setup-BL21Jlyx.mjs").then(_rDefault),
|
|
17
|
-
commit: () => import("./commit-
|
|
17
|
+
commit: () => import("./commit-ChLh-iU3.mjs").then(_rDefault),
|
|
18
18
|
icon: () => import("./icon-D9Q67P89.mjs").then(_rDefault),
|
|
19
19
|
upgrade: () => import("./upgrade-D4A0_AH0.mjs").then(_rDefault),
|
|
20
20
|
generate: () => import("./generate-BQHYDlQh.mjs").then(_rDefault),
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pubinfo/cli",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.1.
|
|
4
|
+
"version": "2.1.10-beta.1",
|
|
5
5
|
"description": "CLI for Pubinfo",
|
|
6
6
|
"exports": {
|
|
7
7
|
".": "./bin/pubinfo.mjs"
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"node": "^20.19.0 || >=22.12.0"
|
|
19
19
|
},
|
|
20
20
|
"peerDependencies": {
|
|
21
|
-
"@pubinfo/vite": "2.1.
|
|
21
|
+
"@pubinfo/vite": "2.1.10-beta.1"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"cheerio": "^1.1.2",
|
|
@@ -26,13 +26,13 @@
|
|
|
26
26
|
"execa": "^9.6.0",
|
|
27
27
|
"globby": "^14.1.0",
|
|
28
28
|
"pkg-types": "^2.3.0",
|
|
29
|
-
"@pubinfo/
|
|
30
|
-
"create-pubinfo": "2.1.
|
|
31
|
-
"@pubinfo/
|
|
29
|
+
"@pubinfo/commitlint": "2.1.10-beta.1",
|
|
30
|
+
"create-pubinfo": "2.1.10-beta.1",
|
|
31
|
+
"@pubinfo/shared": "2.1.10-beta.1"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@types/node": "^24.0.10",
|
|
35
|
-
"@pubinfo/vite": "2.1.
|
|
35
|
+
"@pubinfo/vite": "2.1.10-beta.1"
|
|
36
36
|
},
|
|
37
37
|
"scripts": {
|
|
38
38
|
"dev": "tsdown --watch",
|