(command: string)
| 54 | const aliasDB = new AliasDB(); |
| 55 | const originalCommand = aliasDB.get(command); |
| 56 | aliasDB.close(); |
| 57 | return originalCommand || command; // 如果没有别名,返回原始命令 |
| 58 | } catch (error) { |
| 59 | console.error("[autodelcmd] 解析别名时出错:", error); |
| 60 | return command; // 出错时返回原始命令 |
| 61 | } |
| 62 | } |
| 63 | |
| 64 | // 计算现有规则中的最大数字ID |
| 65 | function getMaxRuleId(rules: CommandRule[]): number { |
| 66 | const existingIds = rules |
| 67 | .map(r => parseInt(r.id || '0')) |
| 68 | .filter(id => !isNaN(id)); |
| 69 |
no test coverage detected