ai-yuca 1.3.9 → 1.4.0
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/dist/package.json +1 -1
- package/dist/src/transKey.js +8 -1
- package/package.json +1 -1
package/dist/package.json
CHANGED
package/dist/src/transKey.js
CHANGED
|
@@ -63,8 +63,15 @@ async function transKey(options) {
|
|
|
63
63
|
const searchPattern = path.join(workDir, '**/*.{ts,tsx,js,jsx,html,vue}');
|
|
64
64
|
// normalized pattern for glob (glob expects forward slashes)
|
|
65
65
|
const normalizedPattern = searchPattern.replace(/\\/g, '/');
|
|
66
|
+
// 构造排除模式
|
|
67
|
+
const ignorePatterns = ['**/node_modules/**', '**/dist/**', '**/.git/**'];
|
|
68
|
+
if (keysDir) {
|
|
69
|
+
// 确保 keysDir 使用正斜杠
|
|
70
|
+
const normalizedKeysDir = keysDir.replace(/\\/g, '/');
|
|
71
|
+
ignorePatterns.push(`**/${normalizedKeysDir}/**`);
|
|
72
|
+
}
|
|
66
73
|
const files = await (0, fast_glob_1.default)(normalizedPattern, {
|
|
67
|
-
ignore:
|
|
74
|
+
ignore: ignorePatterns,
|
|
68
75
|
cwd: process.cwd(),
|
|
69
76
|
absolute: true
|
|
70
77
|
});
|