'use strict'; import { logger } from 'ee-core/log'; import { app as electronApp } from 'electron'; /** * 安全 * @class */ class SecurityService { /** * 创建 */ create () { logger.info('[security] load'); const runWithDebug = process.argv.find(e => e.includes("--inspect") || e.includes("--inspect-brk") || e.includes("--remote-debugging-port")); // 不允许远程调试 if (runWithDebug) { logger.error('[error] Remote debugging is not allowed, runWithDebug:', runWithDebug); electronApp.quit(); } } } SecurityService.toString = () => '[class SecurityService]'; export const securityService = new SecurityService();