@d5render/cli 0.1.49 → 0.1.50

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/bin/d5cli +9 -9
  2. package/package.json +1 -1
package/bin/d5cli CHANGED
@@ -108,7 +108,7 @@ function installCopilot() {
108
108
  //#endregion
109
109
  //#region package.json
110
110
  var name = "@d5render/cli";
111
- var version = "0.1.49";
111
+ var version = "0.1.50";
112
112
 
113
113
  //#endregion
114
114
  //#region packages/gitlab/url.ts
@@ -197,21 +197,21 @@ async function deploy() {
197
197
  rmSync(config);
198
198
  console.log("removed config cache.");
199
199
  }
200
- if (!existsSync(dir)) mkdirSync(dir, { recursive: true });
201
200
  const changelog = readFileSync(join(RUNTIME_CWD, "CHANGELOG.md"), "utf8");
202
201
  const cachepath = join(TEMP, "CHANGELOG-" + env.CI_RUNNER_ID || "0");
203
- if (changelog !== (existsSync(cachepath) ? readFileSync(cachepath, "utf8") : "")) {
204
- if (!existsSync(TEMP)) mkdirSync(TEMP, { recursive: true });
202
+ let cache = "";
203
+ if (existsSync(cachepath)) cache = readFileSync(cachepath, "utf8");
204
+ else if (!existsSync(TEMP)) mkdirSync(TEMP, { recursive: true });
205
+ if (changelog !== cache) {
205
206
  writeFileSync(cachepath, changelog, "utf8");
206
207
  console.log("updated CHANGELOG cache.");
207
- await dingding("NOTICE", `code-review/SKILL.md 更新到${VERSION}\n\n请参考[线上文档内容](https://www.npmjs.com/package/@d5render/cli?activeTab=readme)`);
208
+ await dingding("NOTICE", `code-review/SKILL.md 更新\n\n细节请参考 [线上文档内容.skills](https://www.npmjs.com/package/@d5render/cli?activeTab=code)`);
208
209
  }
209
- const versionnPath = join(dir, "version");
210
- if ((existsSync(versionnPath) ? readFileSync(versionnPath, "utf8") : "") === VERSION) return;
211
210
  if (existsSync(dir)) rmSync(dir, {
212
211
  recursive: true,
213
212
  force: true
214
213
  });
214
+ mkdirSync(dir, { recursive: true });
215
215
  const skillRoot = join(RUNTIME_CWD, ".skills/code-review");
216
216
  readdirSync(skillRoot).forEach((skill) => copyFileSync(join(skillRoot, skill), join(dir, skill)));
217
217
  const instructionsRoot = join(RUNTIME_CWD, ".github/instructions");
@@ -258,8 +258,8 @@ async function need() {
258
258
 
259
259
  //#endregion
260
260
  //#region copilot/bin/index.ts
261
- codereview().catch((error) => {
262
- dingding("CRITICAL", "CI ERROR: 未知错误,请自行检查日志");
261
+ codereview().catch(async (error) => {
262
+ await dingding("CRITICAL", "CI ERROR: 未知错误,请自行检查日志");
263
263
  throw error;
264
264
  });
265
265
  async function codereview() {
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "license": "MIT",
5
5
  "author": "jasirou",
6
6
  "main": "./bin/d5cli",
7
- "version": "0.1.49",
7
+ "version": "0.1.50",
8
8
  "devDependencies": {
9
9
  "@modelcontextprotocol/sdk": "^1.25.1",
10
10
  "@types/node": "^25.0.3",