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:
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user