claude-pangu 2.1.2 → 2.1.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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://code.claude.com/plugin-schema.json",
3
3
  "name": "oh-my-claude",
4
- "version": "2.0.23",
4
+ "version": "2.1.3",
5
5
  "hooks": "./hooks/hooks.json",
6
6
  "description": "基于中国传统文化的 Claude Code 智能编排插件 - A Claude Code plugin inspired by Chinese traditional culture",
7
7
  "author": "ZDragon17",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-pangu",
3
- "version": "2.1.2",
3
+ "version": "2.1.3",
4
4
  "description": "基于中国传统文化的 Claude Code 智能编排插件 - A Claude Code plugin inspired by Chinese traditional culture (原名 oh-my-claude)",
5
5
  "keywords": [
6
6
  "claude-code",
@@ -57,7 +57,9 @@
57
57
  "test:coverage": "jest --coverage",
58
58
  "test:ci": "jest --ci --coverage --reporters=default --reporters=jest-junit",
59
59
  "ci": "npm run type-check && npm run lint && npm run test:coverage",
60
- "prepare": "npm run build"
60
+ "sync-version": "node scripts/sync-version.cjs",
61
+ "prepare": "npm run build",
62
+ "prepublishOnly": "npm run sync-version"
61
63
  },
62
64
  "devDependencies": {
63
65
  "@types/jest": "^29.5.8",
@@ -0,0 +1,31 @@
1
+ /**
2
+ * 版本号同步脚本
3
+ * 自动将 package.json 的版本号同步到 .claude-plugin/plugin.json
4
+ * 在 prepublishOnly 钩子中调用,确保发布前版本一致
5
+ */
6
+
7
+ const fs = require('fs');
8
+ const path = require('path');
9
+
10
+ const packageJsonPath = path.join(__dirname, '..', 'package.json');
11
+ const pluginJsonPath = path.join(__dirname, '..', '.claude-plugin', 'plugin.json');
12
+
13
+ try {
14
+ // 读取 package.json 版本
15
+ const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf-8'));
16
+ const version = packageJson.version;
17
+
18
+ // 读取并更新 plugin.json
19
+ const pluginJson = JSON.parse(fs.readFileSync(pluginJsonPath, 'utf-8'));
20
+
21
+ if (pluginJson.version !== version) {
22
+ pluginJson.version = version;
23
+ fs.writeFileSync(pluginJsonPath, JSON.stringify(pluginJson, null, 2) + '\n', 'utf-8');
24
+ console.log(`✅ 版本同步完成: plugin.json → ${version}`);
25
+ } else {
26
+ console.log(`✓ 版本已同步: ${version}`);
27
+ }
28
+ } catch (error) {
29
+ console.error('❌ 版本同步失败:', error.message);
30
+ process.exit(1);
31
+ }