MCPcopy Create free account
hub / github.com/TechJeeper/Printventory / validateUncPath

Function validateUncPath

main.js:451–469  ·  view source on GitHub ↗
(path, operation = 'operation')

Source from the content-addressed store, hash-verified

449let electronUiPort = null;
450let wss = null; // WebSocket server
451let wsClients = null; // WebSocket clients Set
452
453// Store pending context menu actions for server mode (browser access)
454const pendingContextMenus = new Map();
455let contextMenuRequestIdCounter = 0;
456
457// Handler registry for WebSocket IPC calls in server mode
458// This allows us to directly invoke handlers without going through the renderer
459const ipcHandlerRegistry = new Map();
460
461// Auto-register every ipcMain.handle into the WebSocket registry.
462// Without this, Docker/server-mode falls back to executeJavaScript on the hidden
463// window for unregistered channels (e.g. getThumbnail) — which hangs/times out.
464const _ipcMainHandle = ipcMain.handle.bind(ipcMain);
465ipcMain.handle = (channel, handler) => {
466 ipcHandlerRegistry.set(channel, handler);
467 return _ipcMainHandle(channel, handler);
468};
469
470// Helper function to register IPC handlers and add them to the registry
471function registerIpcHandler(channel, handler) {
472 ipcMain.handle(channel, handler);

Callers 1

main.jsFile · 0.85

Calls 3

isUrlModelFunction · 0.85
isUncPathFunction · 0.85
isDockerContainerFunction · 0.70

Tested by

no test coverage detected