refactor(desktop): organize lib modules by domain

This commit is contained in:
t8y2 committed 2026-07-04 13:53:52 +08:00
1 parent 90f0594e93
commit 7e7c4944e9
700 files changed
+1292 -1264

No files matched your search

+14
View File
@@ -0,0 +1,14 @@
export function isSqlFilePath(path: string): boolean {
return /\.sql$/i.test(path.trim());
}
export function sqlFileTitleFromPath(path: string): string {
const trimmed = path.trim();
const normalized = trimmed.replace(/\\/g, "/");
const name = normalized.split("/").filter(Boolean).pop();
return name || "script.sql";
}
export function externalSqlFilePaths(paths: string[]): string[] {
return paths.filter(isSqlFilePath);
}