fix: prevent SELECT with REPLACE/TRUNCATE functions from triggering danger warning

The DANGER_RE regex matched keywords anywhere in the SQL text, causing
SELECT queries using REPLACE() or TRUNCATE() functions to incorrectly
trigger the destructive-SQL warning dialog. Check only the first keyword
of each semicolon-separated statement instead.

Also fix dialog content overflow by adding min-w-0 to the <pre> element,
and move macOS frameworks config from tauri.conf.json to CI-only
TAURI_CONFIG so local `tauri dev` no longer requires libltdl/libodbc
to be globally installed.

Closes #135
This commit is contained in:
t8y2
2026-05-07 19:07:41 +08:00
parent 484dc85114
commit aefb6bf0ef
5 changed files with 73 additions and 6 deletions
+1
View File
@@ -113,6 +113,7 @@ jobs:
APPLE_ID: ${{ startsWith(matrix.platform, 'macos') && secrets.APPLE_ID || '' }}
APPLE_PASSWORD: ${{ startsWith(matrix.platform, 'macos') && secrets.APPLE_PASSWORD || '' }}
APPLE_TEAM_ID: ${{ startsWith(matrix.platform, 'macos') && secrets.APPLE_TEAM_ID || '' }}
TAURI_CONFIG: ${{ startsWith(matrix.platform, 'macos') && '{"bundle":{"macOS":{"frameworks":["libodbc.2.dylib","libltdl.7.dylib"]}}}' || '{}' }}
with:
tagName: ${{ github.ref_name }}
releaseName: 'DBX ${{ github.ref_name }}'