mirror of
https://github.com/johannesjo/super-productivity.git
synced 2026-07-17 16:37:43 +00:00
* feat(electron): add Local REST API for desktop automation Add a local HTTP server (port 3876) that allows external scripts and tools to interact with a running Super Productivity desktop app. Features: - Task CRUD operations (create, read, update, delete) - Task control (start, stop, set current) - Task archive/restore operations - Query filters for tasks (by title, project, tag, done status) - Read-only project and tag listing The API is disabled by default and can be enabled in Settings > Misc. Only accepts connections from localhost (127.0.0.1) for security. * fix: resolve lint errors for local REST API * fix: use lazy injection for LocalRestApiHandlerService Fixes StartupService tests by using Injector.get() instead of direct injection, preventing LocalRestApiHandlerService from being instantiated when StartupService tests don't have NgRx providers. * fix: resolve markdown lint errors in API docs * fix: add security warning to Local REST API hint
31 lines
927 B
TypeScript
31 lines
927 B
TypeScript
import { log } from 'electron-log/main';
|
|
import { pluginNodeExecutor } from './plugin-node-executor';
|
|
import {
|
|
initAppControlIpc,
|
|
initAppDataIpc,
|
|
initExecIpc,
|
|
initGlobalShortcutsIpc,
|
|
initJiraIpc,
|
|
initSystemIpc,
|
|
} from './ipc-handlers';
|
|
import { initClipboardImageHandlers } from './clipboard-image-handler';
|
|
import { initLocalRestApi } from './local-rest-api';
|
|
|
|
export const initIpcInterfaces = (): void => {
|
|
// Initialize plugin node executor (registers IPC handlers)
|
|
// This is needed for plugins with nodeExecution permission
|
|
// The constructor automatically sets up the IPC handlers
|
|
log('Initializing plugin node executor');
|
|
if (!pluginNodeExecutor) {
|
|
log('Warning: Plugin node executor failed to initialize');
|
|
}
|
|
|
|
initAppDataIpc();
|
|
initAppControlIpc();
|
|
initSystemIpc();
|
|
initJiraIpc();
|
|
initGlobalShortcutsIpc();
|
|
initExecIpc();
|
|
initClipboardImageHandlers();
|
|
initLocalRestApi();
|
|
};
|