feat: custom formatter support

- format.ts: customFormat() uses child_process.execFile
- Template params: {KEY} {VALUE} {HEX_FILE}
- Value written to temp file, path passed via {HEX_FILE}
- 10s timeout, error handling
- StringEditor: 'custom' format option + command input
- Command persisted to localStorage
- i18n keys (zh-CN + en)
This commit is contained in:
2026-07-07 21:54:13 +08:00
parent 5178aea6d1
commit 1511427e62
8 changed files with 65 additions and 2 deletions
+3
View File
@@ -264,6 +264,9 @@ export function registerIpcHandlers(): void {
ipcMain.handle('redis:detectFormat', (_e, value: string) => {
return redis.detectFormat(value)
})
ipcMain.handle('redis:customFormat', (_e, value: string, command: string, key: string) => {
return redis.customFormat(value, command, key)
})
// Pub/Sub
ipcMain.handle('redis:subscribe', async (_e, id: string, channels: string[], isPattern: boolean) => {