sdd-full 1.4.0 → 1.4.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.
Files changed (2) hide show
  1. package/index.js +16 -9
  2. package/package.json +2 -4
package/index.js CHANGED
@@ -8,7 +8,7 @@ const path = require('path');
8
8
 
9
9
  // 技能包的主入口
10
10
  const SDD = {
11
- version: '1.4.0',
11
+ version: '1.4.3',
12
12
  name: 'sdd-full',
13
13
  description: '完整的软件设计开发技能包',
14
14
 
@@ -89,14 +89,14 @@ const SDD = {
89
89
  ];
90
90
  } else if (environment === 'all') {
91
91
  dirsToInstall = [
92
- { name: 'Trae-cn / Solo', path: path.join(baseDir, '.trae-cn', 'skills') },
92
+ { name: 'Trae / Solo', path: path.join(baseDir, '.trae', 'skills') },
93
93
  { name: 'Claude Code', path: path.join(baseDir, '.claude', 'skills') },
94
94
  { name: '通用 sdd-full', path: path.join(baseDir, '.sdd-full', 'skills') }
95
95
  ];
96
96
  } else {
97
- // 默认:Trae-cn / Solo
97
+ // 默认:Trae / Solo
98
98
  dirsToInstall = [
99
- { name: 'Trae-cn / Solo', path: path.join(baseDir, '.trae-cn', 'skills') }
99
+ { name: 'Trae / Solo', path: path.join(baseDir, '.trae', 'skills') }
100
100
  ];
101
101
  }
102
102
 
@@ -168,13 +168,16 @@ module.exports = SDD;
168
168
  if (require.main === module) {
169
169
  const args = process.argv.slice(2);
170
170
 
171
- if (args.includes('--help') || args.includes('-h')) {
171
+ // 检查是否需要显示帮助
172
+ const showHelp = args.some(arg => arg === '--help' || arg === '-h');
173
+
174
+ if (showHelp) {
172
175
  console.log('========================================');
173
176
  console.log(` ${SDD.name} - ${SDD.description}`);
174
177
  console.log(` 版本: ${SDD.version}`);
175
178
  console.log('========================================');
176
179
  console.log('\n用法:');
177
- console.log(' npx sdd-full - 安装到 Trae-cn / Solo(默认)');
180
+ console.log(' npx sdd-full - 安装到 Trae / Solo(默认)');
178
181
  console.log(' npx sdd-full cc - 安装到 Claude Code');
179
182
  console.log(' npx sdd-full all - 安装到所有环境');
180
183
  console.log(' npx sdd-full --help - 显示帮助');
@@ -188,16 +191,20 @@ if (require.main === module) {
188
191
 
189
192
  console.log(`\n总计 ${skills.length} 个技能\n`);
190
193
  } else {
194
+ // 否则,直接安装
191
195
  let targetDir;
192
- const targetIndex = args.indexOf('--dir') || args.indexOf('-d');
196
+ const targetIndex = args.indexOf('--dir');
197
+ const targetIndexShort = args.indexOf('-d');
193
198
  if (targetIndex !== -1 && args[targetIndex + 1]) {
194
199
  targetDir = args[targetIndex + 1];
200
+ } else if (targetIndexShort !== -1 && args[targetIndexShort + 1]) {
201
+ targetDir = args[targetIndexShort + 1];
195
202
  }
196
203
 
197
204
  let environment;
198
- if (args.includes('cc')) {
205
+ if (args.indexOf('cc') !== -1) {
199
206
  environment = 'cc';
200
- } else if (args.includes('all')) {
207
+ } else if (args.indexOf('all') !== -1) {
201
208
  environment = 'all';
202
209
  } else {
203
210
  environment = 'trae'; // 默认
package/package.json CHANGED
@@ -1,11 +1,9 @@
1
1
  {
2
2
  "name": "sdd-full",
3
- "version": "1.4.0",
3
+ "version": "1.4.3",
4
4
  "description": "SDD Full - 完整的软件设计开发技能包",
5
5
  "main": "index.js",
6
- "bin": {
7
- "sdd-full": "./index.js"
8
- },
6
+ "bin": "./index.js",
9
7
  "keywords": [
10
8
  "sdd",
11
9
  "software design",