zero-ai 1.0.58 → 1.0.59
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.
package/package.json
CHANGED
|
@@ -12,6 +12,7 @@ module.exports = async (options) => {
|
|
|
12
12
|
const repoCache = path.resolve(outputPath, ".r2mo/repo", repoName);
|
|
13
13
|
const cursorRulesSource = path.join(repoCache, ".cursor/rules");
|
|
14
14
|
const cursorRulesTarget = path.resolve(outputPath, ".cursor/rules");
|
|
15
|
+
const traeRulesTarget = path.resolve(outputPath, ".trae/rules");
|
|
15
16
|
|
|
16
17
|
Ec.execute(`准备从远程仓库下载 Cursor 规则配置...`);
|
|
17
18
|
Ec.info(`远程仓库地址:${repoUrl}`);
|
|
@@ -115,15 +116,28 @@ module.exports = async (options) => {
|
|
|
115
116
|
const sourcePath = path.join(cursorRulesSource, file);
|
|
116
117
|
const targetPath = path.join(cursorRulesTarget, file);
|
|
117
118
|
fs.copyFileSync(sourcePath, targetPath);
|
|
118
|
-
Ec.info(` ✓ ${file}
|
|
119
|
+
Ec.info(` ✓ ${file} 已安装到 .cursor/rules`);
|
|
120
|
+
});
|
|
121
|
+
|
|
122
|
+
// 同步拷贝 mdc 到 .trae/rules/
|
|
123
|
+
if (!fs.existsSync(traeRulesTarget)) {
|
|
124
|
+
fs.mkdirSync(traeRulesTarget, { recursive: true });
|
|
125
|
+
Ec.info(`创建目标目录:${traeRulesTarget}`);
|
|
126
|
+
}
|
|
127
|
+
Ec.execute(`正在拷贝规则文件到 .trae/rules/...`);
|
|
128
|
+
selectedFiles.forEach(file => {
|
|
129
|
+
const sourcePath = path.join(cursorRulesSource, file);
|
|
130
|
+
const targetPath = path.join(traeRulesTarget, file);
|
|
131
|
+
fs.copyFileSync(sourcePath, targetPath);
|
|
132
|
+
Ec.info(` ✓ ${file} 已安装到 .trae/rules`);
|
|
119
133
|
});
|
|
120
134
|
|
|
121
135
|
Ec.info(`所有规则文件安装完成!`);
|
|
122
|
-
Ec.info(`安装位置:${cursorRulesTarget}`);
|
|
136
|
+
Ec.info(`安装位置:${cursorRulesTarget}、${traeRulesTarget}`);
|
|
123
137
|
Ec.info(`已安装 ${selectedFiles.length} 个规则文件`);
|
|
124
138
|
|
|
125
139
|
// 添加 AI 工具目录到 .git/info/exclude
|
|
126
|
-
const excludeEntries = [".cursor/", ".claude/", ".gemini/"];
|
|
140
|
+
const excludeEntries = [".cursor/", ".claude/", ".gemini/", ".trae/"];
|
|
127
141
|
const gitPath = path.resolve(outputPath, ".git");
|
|
128
142
|
|
|
129
143
|
Ec.execute(`正在配置 Git 排除规则...`);
|