@lark-apaas/miaoda-cli 0.1.24-alpha.56188a3 → 0.1.24-alpha.bc2625d
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.
|
@@ -411,6 +411,19 @@ const ISO_TIMESTAMP_RE = /^\d{4}-\d{2}-\d{2}(?:[T ]\d{2}:\d{2}:\d{2}(?:\.\d+)?(?
|
|
|
411
411
|
const SYNTAX_RE = /syntax error at or near "([^"]+)"/i;
|
|
412
412
|
const RELATION_RE = /relation "([^"]+)" does not exist/i;
|
|
413
413
|
const COLUMN_RE = /column "([^"]+)"(?: of relation "([^"]+)")? does not exist/i;
|
|
414
|
+
const KEYWORD_TYPO_IGNORE_WORDS = new Set([
|
|
415
|
+
// Legal PostgreSQL terms that are not useful keyword typo candidates.
|
|
416
|
+
'ROW',
|
|
417
|
+
'LEVEL',
|
|
418
|
+
'SECURITY',
|
|
419
|
+
// Common index access methods used after `USING`.
|
|
420
|
+
'BTREE',
|
|
421
|
+
'HASH',
|
|
422
|
+
'GIST',
|
|
423
|
+
'SPGIST',
|
|
424
|
+
'GIN',
|
|
425
|
+
'BRIN',
|
|
426
|
+
]);
|
|
414
427
|
/**
|
|
415
428
|
* 在错误抛出前富化 next_actions(最多 1 条 hint),按 PG 报错形态分发:
|
|
416
429
|
*
|
|
@@ -540,6 +553,8 @@ function findKeywordTypo(sql) {
|
|
|
540
553
|
const upper = tok.toUpperCase();
|
|
541
554
|
if (sql_keywords_1.SQL_KEYWORDS.includes(upper))
|
|
542
555
|
continue; // 写对的关键字
|
|
556
|
+
if (KEYWORD_TYPO_IGNORE_WORDS.has(upper))
|
|
557
|
+
continue;
|
|
543
558
|
const guess = (0, fuzzy_match_1.suggest)(upper, sql_keywords_1.SQL_KEYWORDS);
|
|
544
559
|
if (guess && guess !== upper) {
|
|
545
560
|
return { input: tok, suggest: guess };
|
|
@@ -19,14 +19,32 @@ exports.EXCLUDES = new Set([
|
|
|
19
19
|
'yarn.lock',
|
|
20
20
|
'.gitignore',
|
|
21
21
|
'.npmrc',
|
|
22
|
+
// agent / 编辑器配置目录与指令文件:只服务本地开发,不属于应用资产。
|
|
23
|
+
// 注意 .claude/skills 在 flat layout 下是指向 ../.agents/skills 的软链,而 listSourceFiles
|
|
24
|
+
// 会 follow 软链,所以必须按 basename 把 .claude 整个排掉,否则 skills 会从软链侧被带进产物。
|
|
22
25
|
'.agent',
|
|
23
26
|
'.agents',
|
|
27
|
+
'.claude',
|
|
28
|
+
'.codex',
|
|
29
|
+
'.cursor',
|
|
30
|
+
'.gemini',
|
|
31
|
+
'.trae',
|
|
32
|
+
'.windsurf',
|
|
33
|
+
'.vscode',
|
|
34
|
+
'.idea',
|
|
35
|
+
'AGENTS.md',
|
|
36
|
+
'CLAUDE.md',
|
|
37
|
+
'GEMINI.md',
|
|
24
38
|
'skills',
|
|
25
39
|
'.env',
|
|
26
40
|
'.env.local',
|
|
27
41
|
'README.md',
|
|
28
42
|
'.DS_Store',
|
|
29
43
|
'.spark',
|
|
44
|
+
// 本地开发的临时/运行时目录:tmp 里的 .html 是草稿或中间产物,logs 是本地日志,
|
|
45
|
+
// 两者既不进产物也不该出现在 routes.json。
|
|
46
|
+
'tmp',
|
|
47
|
+
'logs',
|
|
30
48
|
]);
|
|
31
49
|
/**
|
|
32
50
|
* 递归列出 root 下所有文件的相对 posix 路径,跳过 EXCLUDES(任意层级 basename),
|