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
+2
View File
@@ -135,6 +135,8 @@ const electronAPI = {
ipcRenderer.invoke('redis:decodeValue', value, format),
detectFormat: (value: string): Promise<string> =>
ipcRenderer.invoke('redis:detectFormat', value),
customFormat: (value: string, command: string, key: string): Promise<string> =>
ipcRenderer.invoke('redis:customFormat', value, command, key),
// Pub/Sub
subscribe: (id: string, channels: string[], isPattern: boolean): Promise<any> =>
ipcRenderer.invoke('redis:subscribe', id, channels, isPattern),