cli-z-develop 0.12.1 → 0.12.2

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.
Files changed (2) hide show
  1. package/dist/index.js +5 -3
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -261,7 +261,7 @@ const Xt = {
261
261
  // "**/*.{py}": "python --fix",
262
262
  "**/*.{py}": "echo 'todo'"
263
263
  }
264
- }, Qt = "cli-z-develop", ei = "0.12.1", ti = "技术团队开发流程管理工具", ii = "dist/index.js", ai = { z: "bin/z.js", "z-develop": "bin/z.js" }, ni = { prepare: "[ -n '$z' ] && z init prepare || echo 'Warning: z not exist at global'", dev: "vite build --watch", "dev:debug": "DEBUG=true vite build --watch", build: "vite build", eslint: "eslint '**/*.{ts,js}' --fix", prettier: "prettier -wu .", upload: "npm run build && npm publish --access public --registry https://registry.npmjs.org/", "upload:patch": "npm version patch && npm run upload", "upload:minor": "npm version minor && npm run upload", "upload:major": "npm version major && npm run upload" }, si = "module", ri = "z", oi = { "@lonely9/eslint-config-team": "^1.3.8", "@tsconfig/node22": "^22.0.5", "@types/fs-extra": "^11.0.4", "@types/inquirer": "^9.0.9", "@types/minimist": "^1.2.5", "@types/node": "^22.15.29", "@types/semver": "^7.7.1", "@types/shelljs": "^0.10.0", "@typescript-eslint/eslint-plugin": "^8.58.2", "@typescript-eslint/parser": "^8.58.2", eslint: "^9.39.2", jiti: "^2.6.1", prettier: "^3.8.2", typescript: "^5.9.3", vite: "^7.3.1", "vue-tsc": "^3.2.6" }, ci = { "@inquirer/prompts": "^8.4.1", axios: "^1.15.0", chalk: "^5.6.2", commander: "^14.0.3", dayjs: "^1.11.20", "fs-extra": "^11.3.4", "inquirer-select-pro": "^1.0.0-alpha.9", "lint-staged": "^16.4.0", minimist: "^1.2.8", "npm-check-updates": "^19.3.1", ora: "^9.3.0", "p-limit": "^7.3.0", semver: "^7.7.4", shelljs: "^0.10.0" }, ie = {
264
+ }, Qt = "cli-z-develop", ei = "0.12.2", ti = "技术团队开发流程管理工具", ii = "dist/index.js", ai = { z: "bin/z.js", "z-develop": "bin/z.js" }, ni = { prepare: "[ -n '$z' ] && z init prepare || echo 'Warning: z not exist at global'", dev: "vite build --watch", "dev:debug": "DEBUG=true vite build --watch", build: "vite build", eslint: "eslint '**/*.{ts,js}' --fix", prettier: "prettier -wu .", upload: "npm run build && npm publish --access public --registry https://registry.npmjs.org/", "upload:patch": "npm version patch && npm run upload", "upload:minor": "npm version minor && npm run upload", "upload:major": "npm version major && npm run upload" }, si = "module", ri = "z", oi = { "@lonely9/eslint-config-team": "^1.3.8", "@tsconfig/node22": "^22.0.5", "@types/fs-extra": "^11.0.4", "@types/inquirer": "^9.0.9", "@types/minimist": "^1.2.5", "@types/node": "^22.15.29", "@types/semver": "^7.7.1", "@types/shelljs": "^0.10.0", "@typescript-eslint/eslint-plugin": "^8.58.2", "@typescript-eslint/parser": "^8.58.2", eslint: "^9.39.2", jiti: "^2.6.1", prettier: "^3.8.2", typescript: "^5.9.3", vite: "^7.3.1", "vue-tsc": "^3.2.6" }, ci = { "@inquirer/prompts": "^8.4.1", axios: "^1.15.0", chalk: "^5.6.2", commander: "^14.0.3", dayjs: "^1.11.20", "fs-extra": "^11.3.4", "inquirer-select-pro": "^1.0.0-alpha.9", "lint-staged": "^16.4.0", minimist: "^1.2.8", "npm-check-updates": "^19.3.1", ora: "^9.3.0", "p-limit": "^7.3.0", semver: "^7.7.4", shelljs: "^0.10.0" }, ie = {
265
265
  name: Qt,
266
266
  version: ei,
267
267
  description: ti,
@@ -1061,7 +1061,9 @@ async function ga() {
1061
1061
  })) : [];
1062
1062
  }
1063
1063
  async function Fe(e) {
1064
- const t = await p("git diff HEAD"), i = await ia({
1064
+ const t = await p("git diff HEAD");
1065
+ t || l("git暂存区没有内容,请先git add添加文件到暂存区");
1066
+ const i = await ia({
1065
1067
  type: "commit-message-v2",
1066
1068
  input: t
1067
1069
  // modelName: "qwen-turbo",
@@ -1254,7 +1256,7 @@ async function ya(e, t) {
1254
1256
  /* Project */
1255
1257
  }
1256
1258
  ]
1257
- }), i === "project" ? await wa() : (ne(), Q(), i === "branch" ? (await pe(), await da(t)) : i === "commit-msg" && (await p("git status -s") ? await ha(t.commitMessageCloseAi) : l("没有要提交的文件,无法生成提交信息")));
1259
+ }), i === "project" ? await wa() : (ne(), Q(), i === "branch" ? (await pe(), await da(t)) : i === "commit-msg" && (await p("git status -s") ? await ha(t.commitMessageCloseAi) : l("没有要变动的文件,无法生成提交信息")));
1258
1260
  }
1259
1261
  D.command("create").alias("c").description("创建项目/分支/提交信息").argument("[type]", "可选值为project|pr, branch|b, commit-msg|cm").option("--branch-type <type>", `分支类型。可选值:${Object.values(de).join(", ")}`).option("--branch-purpose <purpose>", "创建分支的目的").option("--commit-message-close-ai", "创建提交信息时,是否关闭AI生成").action((...e) => z(ya, ...e));
1260
1262
  function $a(e) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cli-z-develop",
3
- "version": "0.12.1",
3
+ "version": "0.12.2",
4
4
  "description": "技术团队开发流程管理工具",
5
5
  "main": "dist/index.js",
6
6
  "bin": {