@loxia-labs/loxia-autopilot-one 3.1.0 → 3.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (159) hide show
  1. package/bin/cli.js +1 -1
  2. package/bin/loxia-terminal-v2.js +1 -1
  3. package/bin/loxia-terminal.js +1 -1
  4. package/bin/start-with-terminal.js +1 -1
  5. package/package.json +1 -1
  6. package/scripts/install-scanners.js +1 -1
  7. package/scripts/watchdog.js +1 -1
  8. package/src/analyzers/CSSAnalyzer.js +1 -1
  9. package/src/analyzers/ConfigValidator.js +1 -1
  10. package/src/analyzers/ESLintAnalyzer.js +1 -1
  11. package/src/analyzers/JavaScriptAnalyzer.js +1 -1
  12. package/src/analyzers/PrettierFormatter.js +1 -1
  13. package/src/analyzers/PythonAnalyzer.js +1 -1
  14. package/src/analyzers/SecurityAnalyzer.js +1 -1
  15. package/src/analyzers/SparrowAnalyzer.js +1 -1
  16. package/src/analyzers/TypeScriptAnalyzer.js +1 -1
  17. package/src/analyzers/codeCloneDetector/analyzer.js +1 -1
  18. package/src/analyzers/codeCloneDetector/detector.js +1 -1
  19. package/src/analyzers/codeCloneDetector/index.js +1 -1
  20. package/src/analyzers/codeCloneDetector/parser.js +1 -1
  21. package/src/analyzers/codeCloneDetector/reporter.js +1 -1
  22. package/src/analyzers/codeCloneDetector/scanner.js +1 -1
  23. package/src/core/agentPool.js +1 -1
  24. package/src/core/agentScheduler.js +1 -1
  25. package/src/core/contextManager.js +1 -1
  26. package/src/core/flowExecutor.js +1 -1
  27. package/src/core/messageProcessor.js +1 -1
  28. package/src/core/orchestrator.js +1 -1
  29. package/src/core/stateManager.js +1 -1
  30. package/src/index.js +1 -1
  31. package/src/interfaces/cli.js +1 -1
  32. package/src/interfaces/terminal/__tests__/smoke/advancedFeatures.test.js +1 -1
  33. package/src/interfaces/terminal/__tests__/smoke/agentControl.test.js +1 -1
  34. package/src/interfaces/terminal/__tests__/smoke/agents.test.js +1 -1
  35. package/src/interfaces/terminal/__tests__/smoke/components.test.js +1 -1
  36. package/src/interfaces/terminal/__tests__/smoke/connection.test.js +1 -1
  37. package/src/interfaces/terminal/__tests__/smoke/enhancements.test.js +1 -1
  38. package/src/interfaces/terminal/__tests__/smoke/imports.test.js +1 -1
  39. package/src/interfaces/terminal/__tests__/smoke/messages.test.js +1 -1
  40. package/src/interfaces/terminal/__tests__/smoke/tools.test.js +1 -1
  41. package/src/interfaces/terminal/api/apiClient.js +1 -1
  42. package/src/interfaces/terminal/api/messageRouter.js +1 -1
  43. package/src/interfaces/terminal/api/session.js +1 -1
  44. package/src/interfaces/terminal/api/websocket.js +1 -1
  45. package/src/interfaces/terminal/components/AgentCreator.js +1 -1
  46. package/src/interfaces/terminal/components/AgentEditor.js +1 -1
  47. package/src/interfaces/terminal/components/AgentSwitcher.js +1 -1
  48. package/src/interfaces/terminal/components/ErrorBoundary.js +1 -1
  49. package/src/interfaces/terminal/components/ErrorPanel.js +1 -1
  50. package/src/interfaces/terminal/components/Header.js +1 -1
  51. package/src/interfaces/terminal/components/HelpPanel.js +1 -1
  52. package/src/interfaces/terminal/components/InputBox.js +1 -1
  53. package/src/interfaces/terminal/components/Layout.js +1 -1
  54. package/src/interfaces/terminal/components/LoadingSpinner.js +1 -1
  55. package/src/interfaces/terminal/components/MessageList.js +1 -1
  56. package/src/interfaces/terminal/components/MultilineTextInput.js +1 -1
  57. package/src/interfaces/terminal/components/SearchPanel.js +1 -1
  58. package/src/interfaces/terminal/components/SettingsPanel.js +1 -1
  59. package/src/interfaces/terminal/components/StatusBar.js +1 -1
  60. package/src/interfaces/terminal/components/TextInput.js +1 -1
  61. package/src/interfaces/terminal/config/agentEditorConstants.js +1 -1
  62. package/src/interfaces/terminal/config/constants.js +1 -1
  63. package/src/interfaces/terminal/index.js +1 -1
  64. package/src/interfaces/terminal/state/useAgentControl.js +1 -1
  65. package/src/interfaces/terminal/state/useAgents.js +1 -1
  66. package/src/interfaces/terminal/state/useConnection.js +1 -1
  67. package/src/interfaces/terminal/state/useMessages.js +1 -1
  68. package/src/interfaces/terminal/state/useTools.js +1 -1
  69. package/src/interfaces/terminal/utils/debugLogger.js +1 -1
  70. package/src/interfaces/terminal/utils/settingsStorage.js +1 -1
  71. package/src/interfaces/terminal/utils/theme.js +1 -1
  72. package/src/interfaces/webServer.js +1 -1
  73. package/src/modules/fileExplorer/controller.js +1 -1
  74. package/src/modules/fileExplorer/index.js +1 -1
  75. package/src/modules/fileExplorer/middleware.js +1 -1
  76. package/src/modules/fileExplorer/routes.js +1 -1
  77. package/src/services/agentActivityService.js +1 -1
  78. package/src/services/aiService.js +1 -1
  79. package/src/services/apiKeyManager.js +1 -1
  80. package/src/services/benchmarkService.js +1 -1
  81. package/src/services/budgetService.js +1 -1
  82. package/src/services/contextInjectionService.js +1 -1
  83. package/src/services/conversationCompactionService.js +1 -1
  84. package/src/services/credentialVault.js +1 -1
  85. package/src/services/errorHandler.js +1 -1
  86. package/src/services/fileAttachmentService.js +1 -1
  87. package/src/services/flowContextService.js +1 -1
  88. package/src/services/memoryService.js +1 -1
  89. package/src/services/modelRouterService.js +1 -1
  90. package/src/services/modelsService.js +1 -1
  91. package/src/services/ollamaService.js +1 -1
  92. package/src/services/portRegistry.js +1 -1
  93. package/src/services/portTracker.js +1 -1
  94. package/src/services/projectDetector.js +1 -1
  95. package/src/services/promptService.js +1 -1
  96. package/src/services/qualityInspector.js +1 -1
  97. package/src/services/scheduleService.js +1 -1
  98. package/src/services/serviceRegistry.js +1 -1
  99. package/src/services/skillsService.js +1 -1
  100. package/src/services/telegramService.js +1 -1
  101. package/src/services/tokenCountingService.js +1 -1
  102. package/src/services/visualEditorBridge.js +1 -1
  103. package/src/services/visualEditorServer.js +1 -1
  104. package/src/services/whatsappService.js +1 -1
  105. package/src/tools/agentCommunicationTool.js +1 -1
  106. package/src/tools/agentDelayTool.js +1 -1
  107. package/src/tools/asyncToolManager.js +1 -1
  108. package/src/tools/baseTool.js +1 -1
  109. package/src/tools/browserTool.js +1 -1
  110. package/src/tools/cloneDetectionTool.js +1 -1
  111. package/src/tools/codeMapTool.js +1 -1
  112. package/src/tools/dependencyResolverTool.js +1 -1
  113. package/src/tools/docxTool.js +1 -1
  114. package/src/tools/excelTool.js +1 -1
  115. package/src/tools/fileContentReplaceTool.js +1 -1
  116. package/src/tools/fileSystemTool.js +1 -1
  117. package/src/tools/fileTreeTool.js +1 -1
  118. package/src/tools/helpTool.js +1 -1
  119. package/src/tools/imageTool.js +1 -1
  120. package/src/tools/importAnalyzerTool.js +1 -1
  121. package/src/tools/jobDoneTool.js +1 -1
  122. package/src/tools/memoryTool.js +1 -1
  123. package/src/tools/pdfTool.js +1 -1
  124. package/src/tools/seekTool.js +1 -1
  125. package/src/tools/skillsTool.js +1 -1
  126. package/src/tools/staticAnalysisTool.js +1 -1
  127. package/src/tools/taskManagerTool.js +1 -1
  128. package/src/tools/terminalTool.js +1 -1
  129. package/src/tools/userPromptTool.js +1 -1
  130. package/src/tools/videoTool.js +1 -1
  131. package/src/tools/visionTool.js +1 -1
  132. package/src/tools/visualEditorTool.js +1 -1
  133. package/src/tools/webTool.js +1 -1
  134. package/src/tools/whatsappTool.js +1 -1
  135. package/src/types/agent.js +1 -1
  136. package/src/types/contextReference.js +1 -1
  137. package/src/types/conversation.js +1 -1
  138. package/src/types/toolCommand.js +1 -1
  139. package/src/utilities/attachmentValidator.js +1 -1
  140. package/src/utilities/browserStealth.js +1 -1
  141. package/src/utilities/configManager.js +1 -1
  142. package/src/utilities/constants.js +1 -1
  143. package/src/utilities/directoryAccessManager.js +1 -1
  144. package/src/utilities/fileProcessor.js +1 -1
  145. package/src/utilities/humanBehavior.js +1 -1
  146. package/src/utilities/jsonRepair.js +1 -1
  147. package/src/utilities/logger.js +1 -1
  148. package/src/utilities/platformUtils.js +1 -1
  149. package/src/utilities/platformUtils.test.js +1 -1
  150. package/src/utilities/stealthConstants.js +1 -1
  151. package/src/utilities/structuredFileValidator.js +1 -1
  152. package/src/utilities/tagParser.js +1 -1
  153. package/src/utilities/toolConstants.js +1 -1
  154. package/src/utilities/userDataDir.js +1 -1
  155. package/web-ui/build/index.html +2 -2
  156. package/web-ui/build/static/index-BHfbbXee.css +1 -0
  157. package/web-ui/build/static/index-CKM-bzdq.js +743 -0
  158. package/web-ui/build/static/index-CV3z5zRq.js +0 -741
  159. package/web-ui/build/static/index-D3TW3p_0.css +0 -1
package/bin/cli.js CHANGED
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- const a0_0x677ed2=a0_0x3a5f;(function(_0x1ad65e,_0x158d57){const _0x5906a6=a0_0x3a5f,_0x50e71f=_0x1ad65e();while(!![]){try{const _0x4f5926=-parseInt(_0x5906a6(0x1dd))/0x1+parseInt(_0x5906a6(0x21c))/0x2+parseInt(_0x5906a6(0x1ca))/0x3*(parseInt(_0x5906a6(0x1da))/0x4)+parseInt(_0x5906a6(0x1c3))/0x5*(parseInt(_0x5906a6(0x219))/0x6)+-parseInt(_0x5906a6(0x1bd))/0x7+-parseInt(_0x5906a6(0x20d))/0x8*(parseInt(_0x5906a6(0x1bc))/0x9)+parseInt(_0x5906a6(0x1c6))/0xa;if(_0x4f5926===_0x158d57)break;else _0x50e71f['push'](_0x50e71f['shift']());}catch(_0xd2a3f5){_0x50e71f['push'](_0x50e71f['shift']());}}}(a0_0x2d40,0xbd24d));import{fileURLToPath}from'url';import{dirname,join}from'path';import{spawn}from'child_process';import{readFileSync}from'fs';import a0_0x11a4f4 from'http';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename),DEFAULT_PORT=0x1f90,DEFAULT_HOST=a0_0x677ed2(0x20c),SERVER_STARTUP_TIMEOUT=0x3a98,SERVER_CHECK_INTERVAL=0x1f4,args=process[a0_0x677ed2(0x1d5)][a0_0x677ed2(0x1f1)](0x2),command=args[0x0]&&!args[0x0]['startsWith']('--')?args[0x0]:null,flags={'port':null,'host':null,'help':args[a0_0x677ed2(0x218)](a0_0x677ed2(0x1cf))||args[a0_0x677ed2(0x218)]('-h'),'version':args['includes'](a0_0x677ed2(0x220))||args[a0_0x677ed2(0x218)]('-v')};for(let i=0x0;i<args[a0_0x677ed2(0x203)];i++){args[i]===a0_0x677ed2(0x211)&&args[i+0x1]&&(flags[a0_0x677ed2(0x20f)]=parseInt(args[i+0x1],0xa)),args[i]==='--host'&&args[i+0x1]&&(flags[a0_0x677ed2(0x200)]=args[i+0x1]);}const explicitPort=flags[a0_0x677ed2(0x20f)],host=flags[a0_0x677ed2(0x200)]||DEFAULT_HOST;if(flags[a0_0x677ed2(0x1ef)]){const pkgPath=join(__dirname,'..',a0_0x677ed2(0x1e2)),pkg=JSON['parse'](readFileSync(pkgPath,a0_0x677ed2(0x21b)));console[a0_0x677ed2(0x1b7)](a0_0x677ed2(0x1ec)+pkg[a0_0x677ed2(0x1ef)]),process[a0_0x677ed2(0x1c5)](0x0);}if(flags[a0_0x677ed2(0x1d3)]||!command){const pkgPath=join(__dirname,'..','package.json'),pkg=JSON[a0_0x677ed2(0x1f6)](readFileSync(pkgPath,a0_0x677ed2(0x21b)));console[a0_0x677ed2(0x1b7)](a0_0x677ed2(0x1f4)+pkg[a0_0x677ed2(0x1ef)]+a0_0x677ed2(0x1e0)+DEFAULT_PORT+a0_0x677ed2(0x206)+DEFAULT_HOST+a0_0x677ed2(0x1c8)),process[a0_0x677ed2(0x1c5)](0x0);}async function getPortRegistry(){const {getPortRegistry:_0x341a6d}=await import('../src/services/portRegistry.js');return _0x341a6d();}async function discoverBackend(){const _0x10b2a0=a0_0x677ed2;try{const _0x293a11=await getPortRegistry();await _0x293a11[_0x10b2a0(0x1ee)]();const _0x2d998f=await _0x293a11[_0x10b2a0(0x1d1)](_0x10b2a0(0x1fc));if(_0x2d998f)return{'host':_0x2d998f[_0x10b2a0(0x200)]||_0x10b2a0(0x216),'port':_0x2d998f['port'],'pid':_0x2d998f['pid']};return null;}catch(_0x2bdd88){return null;}}async function checkServerRunning(_0x1ab28c,_0x51cf10,_0x5449b1=0x1){for(let _0x336b61=0x0;_0x336b61<_0x5449b1;_0x336b61++){const _0x2b5e94=await new Promise(_0x26b7dc=>{const _0x59ba07=a0_0x3a5f,_0x1e5335=a0_0x11a4f4[_0x59ba07(0x217)](_0x59ba07(0x1fb)+_0x1ab28c+':'+_0x51cf10+_0x59ba07(0x1f9),_0x2f220f=>{const _0x3c31fe=_0x59ba07;_0x26b7dc(_0x2f220f[_0x3c31fe(0x20e)]===0xc8);});_0x1e5335['on']('error',()=>_0x26b7dc(![])),_0x1e5335[_0x59ba07(0x1e6)](0x7d0,()=>{const _0x469b1e=_0x59ba07;_0x1e5335[_0x469b1e(0x1f0)](),_0x26b7dc(![]);});});if(_0x2b5e94)return!![];_0x336b61<_0x5449b1-0x1&&await new Promise(_0x2d4bda=>setTimeout(_0x2d4bda,SERVER_CHECK_INTERVAL));}return![];}async function waitForServerWithDiscovery(_0x5b9fbe=SERVER_STARTUP_TIMEOUT){const _0x5c5e39=a0_0x677ed2,_0xbc7412=Date[_0x5c5e39(0x1fa)]();while(Date['now']()-_0xbc7412<_0x5b9fbe){const _0x253511=await discoverBackend();if(_0x253511){const _0x2ad1be=await checkServerRunning(_0x253511[_0x5c5e39(0x200)],_0x253511[_0x5c5e39(0x20f)]);if(_0x2ad1be)return _0x253511;}await new Promise(_0x8de4ae=>setTimeout(_0x8de4ae,SERVER_CHECK_INTERVAL));}return null;}function a0_0x3a5f(_0x30eb61,_0x23819d){_0x30eb61=_0x30eb61-0x1b7;const _0x2d409d=a0_0x2d40();let _0x3a5f04=_0x2d409d[_0x30eb61];return _0x3a5f04;}async function waitForServerAtPort(_0x3ebc0f,_0x4c8cff,_0x1599ed=SERVER_STARTUP_TIMEOUT){const _0x269ff8=a0_0x677ed2,_0x2a3cae=Math[_0x269ff8(0x1d9)](_0x1599ed/SERVER_CHECK_INTERVAL),_0x44f574=await checkServerRunning(_0x3ebc0f,_0x4c8cff,_0x2a3cae);return _0x44f574?{'host':_0x3ebc0f,'port':_0x4c8cff}:null;}function openBrowser(_0x20305f){const _0x356205=a0_0x677ed2;let _0x1cf1cd,_0x457e2e;if(process['platform']===_0x356205(0x1cb))_0x1cf1cd=_0x356205(0x204),_0x457e2e=[_0x20305f];else process[_0x356205(0x20a)]===_0x356205(0x1f8)?(_0x1cf1cd='cmd',_0x457e2e=['/c','start','\x22\x22',_0x20305f]):(_0x1cf1cd=_0x356205(0x208),_0x457e2e=[_0x20305f]);const _0x3f7323=spawn(_0x1cf1cd,_0x457e2e,{'detached':!![],'stdio':_0x356205(0x1c4)});_0x3f7323[_0x356205(0x21f)](),_0x3f7323['on'](_0x356205(0x201),()=>{const _0x123aaa=_0x356205;console[_0x123aaa(0x1b7)](_0x123aaa(0x1e3)),console[_0x123aaa(0x1b7)]('Please\x20open\x20manually:\x20'+_0x20305f);});}function startServer(_0x133ef4=![]){const _0x33ea5c=a0_0x677ed2,_0x5606c5={...process.env};explicitPort&&(_0x5606c5[_0x33ea5c(0x1fd)]=explicitPort[_0x33ea5c(0x1eb)](),_0x5606c5[_0x33ea5c(0x1fe)]=explicitPort['toString']());flags['host']&&(_0x5606c5['LOXIA_HOST']=flags[_0x33ea5c(0x200)]);const _0x2929dd=join(__dirname,'..',_0x33ea5c(0x1d4),'index.js'),_0x408ad0=spawn('node',[_0x2929dd],{'cwd':join(__dirname,'..'),'env':_0x5606c5,'stdio':_0x133ef4?[_0x33ea5c(0x1c4),_0x33ea5c(0x1c4),'ignore']:'inherit','detached':_0x133ef4});return _0x133ef4&&_0x408ad0[_0x33ea5c(0x21f)](),_0x408ad0;}function a0_0x2d40(){const _0x2a9e1c=['--version','Server\x20discovered\x20at\x20','log','\x0aServer\x20started\x20but\x20may\x20still\x20be\x20initializing.','application/json','\x20\x20Terminal\x20UI:\x20\x20loxia\x20terminal','web','4707QGWyII','6348916FGoHkp','It\x20may\x20have\x20crashed.\x20Please\x20restart\x20it.','message','success','\x0a✓\x20Server\x20running\x20at\x20','end','1165uvaGZA','ignore','exit','1626270NmpxNZ','\x20\x20loxia\x20web\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Start\x20server\x20+\x20Web\x20UI',')\x0a\x20\x20-h,\x20--help\x20\x20\x20\x20\x20\x20\x20\x20Show\x20this\x20help\x20message\x0a\x20\x20-v,\x20--version\x20\x20\x20\x20\x20Show\x20version\x20number\x0a\x0aExamples:\x0a\x20\x20loxia\x20web\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Start\x20server\x20+\x20open\x20browser\x0a\x20\x20loxia\x20serve\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Start\x20server\x20only\x20(headless)\x0a\x20\x20loxia\x20terminal\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Connect\x20Terminal\x20UI\x20to\x20running\x20server\x0a\x20\x20loxia\x20plus-terminal\x20\x20\x20\x20\x20\x20#\x20Start\x20server\x20+\x20Terminal\x20UI\x0a\x20\x20loxia\x20web\x20--port\x203000\x20\x20\x20\x20#\x20Use\x20specific\x20port\x0a\x0aQuick\x20Start:\x0a\x20\x201.\x20Run\x20\x27loxia\x20web\x27\x20to\x20start\x20with\x20Web\x20UI\x0a\x20\x202.\x20Or\x20run\x20\x27loxia\x20plus-terminal\x27\x20for\x20Terminal\x20UI\x20experience\x0a\x20\x203.\x20Or\x20run\x20\x27loxia\x20serve\x27\x20for\x20headless\x20server\x20(connect\x20remotely)\x0a\x0aNote:\x20If\x20no\x20port\x20is\x20specified,\x20the\x20server\x20will\x20automatically\x20find\x0aan\x20available\x20port.\x20The\x20Terminal\x20UI\x20will\x20discover\x20the\x20server\x20port\x0aautomatically\x20from\x20the\x20port\x20registry.\x0a\x0aDocumentation:\x0a\x20\x20https://autopilot.loxia.ai\x0a\x0a','Unknown\x20command:\x20','1421199euRXLN','darwin','Looking\x20for\x20running\x20server...','Starting\x20Loxia\x20server...\x0a','data','--help','\x20but\x20not\x20responding.','getService','Usage:\x20loxia\x20trigger-schedule\x20<schedule-id>','help','src','argv','\x0aOpening\x20Web\x20UI\x20at\x20','/api/schedules/','\x20\x20loxia\x20plus-terminal\x20\x20#\x20Start\x20server\x20+\x20Terminal\x20UI\x0a','ceil','8boeckM','Failed\x20to\x20start\x20server\x20within\x2030s.\x20Check\x20logs.','\x0aNo\x20running\x20server\x20found\x20in\x20the\x20port\x20registry.','1270977OhsYRv','Failed\x20to\x20trigger\x20schedule:\x20','Waiting\x20for\x20server\x20to\x20start...','\x20-\x20AI\x20Agent\x20System\x0a\x0aUsage:\x0a\x20\x20loxia\x20<command>\x20[options]\x0a\x0aCommands:\x0a\x20\x20web\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Start\x20server\x20+\x20open\x20Web\x20UI\x20in\x20browser\x0a\x20\x20serve\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Start\x20server\x20only\x20(no\x20UI\x20opened)\x0a\x20\x20terminal\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Start\x20Terminal\x20UI\x20(server\x20must\x20be\x20running)\x0a\x20\x20plus-web\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Alias\x20for\x20\x27web\x27\x0a\x20\x20plus-terminal\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Start\x20server\x20+\x20Terminal\x20UI\x20together\x0a\x20\x20trigger-schedule\x20<id>\x20\x20\x20\x20\x20Trigger\x20a\x20scheduled\x20task\x20(wakes\x20server\x20if\x20needed)\x0a\x0aOptions:\x0a\x20\x20--port\x20<number>\x20\x20\x20Specify\x20port\x20(default:\x20auto-select\x20starting\x20from\x20','\x0aServer\x20failed\x20to\x20start.\x20Please\x20check\x20logs.','package.json','Could\x20not\x20open\x20browser\x20automatically.','Invalid\x20response:\x20','Run\x20\x27loxia\x20terminal\x27\x20to\x20connect\x20when\x20ready.','setTimeout','/api/system/idle-shutdown','loxia-terminal.js','Run\x20\x22loxia\x20--help\x22\x20for\x20usage\x20information.','\x0aServer\x20may\x20still\x20be\x20starting.\x20Check\x20the\x20port\x20registry\x20or\x20logs.','toString','Loxia\x20Autopilot\x20One\x20v','SIGTERM','cleanupStaleEntries','version','destroy','slice','stringify','write','\x0aLoxia\x20Autopilot\x20One\x20v','scheduleName','parse','Server\x20started\x20at\x20','win32','/api/health','now','http://','backend','LOXIA_PORT','PORT','\x0aShutting\x20down\x20server...','host','error','catch','length','open','Schedule\x20\x22',')\x0a\x20\x20--host\x20<host>\x20\x20\x20\x20\x20Specify\x20host\x20(default:\x20','POST','xdg-open','inherit','platform','Request\x20timed\x20out','127.0.0.1','9368wGFXAD','statusCode','port','request','--port','Starting\x20Loxia\x20server\x20in\x20background...','SIGINT','\x20\x20loxia\x20serve\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Start\x20server\x20only','kill','localhost','get','includes','39612FvZDNl','byteLength','utf8','1833544rnXnGq','node','Error:','unref'];a0_0x2d40=function(){return _0x2a9e1c;};return a0_0x2d40();}function startTerminalUIProcess(_0x316136,_0x4831a2){const _0x54cb6f=a0_0x677ed2,_0x4e4f84=join(__dirname,_0x54cb6f(0x1e8)),_0x28eddb={...process.env,'LOXIA_PORT':_0x4831a2[_0x54cb6f(0x1eb)](),'LOXIA_HOST':_0x316136},_0x260980=spawn(_0x54cb6f(0x21d),[_0x4e4f84],{'cwd':join(__dirname,'..'),'env':_0x28eddb,'stdio':_0x54cb6f(0x209)});return _0x260980;}const commands={'web':async()=>{const _0x4856b5=a0_0x677ed2;console[_0x4856b5(0x1b7)](_0x4856b5(0x1cd));const _0x10ebd8=startServer(![]);console['log'](_0x4856b5(0x1df));let _0x4a74cd;explicitPort?_0x4a74cd=await waitForServerAtPort(host,explicitPort):_0x4a74cd=await waitForServerWithDiscovery();if(_0x4a74cd){const _0x2871f8='http://'+_0x4a74cd[_0x4856b5(0x200)]+':'+_0x4a74cd[_0x4856b5(0x20f)];console['log'](_0x4856b5(0x1d6)+_0x2871f8),openBrowser(_0x2871f8);}else console['log'](_0x4856b5(0x1ea));process['on'](_0x4856b5(0x213),()=>_0x10ebd8['kill'](_0x4856b5(0x213))),process['on']('SIGTERM',()=>_0x10ebd8[_0x4856b5(0x215)]('SIGTERM')),_0x10ebd8['on'](_0x4856b5(0x1c5),_0x1bef47=>process['exit'](_0x1bef47||0x0));},'plus-web':async()=>{const _0x1a5086=a0_0x677ed2;await commands[_0x1a5086(0x1bb)]();},'serve':async()=>{const _0x1bf6e2=a0_0x677ed2;console[_0x1bf6e2(0x1b7)](_0x1bf6e2(0x1cd));const _0x47d376=startServer(![]);console[_0x1bf6e2(0x1b7)](_0x1bf6e2(0x1df));let _0x143318;explicitPort?_0x143318=await waitForServerAtPort(host,explicitPort):_0x143318=await waitForServerWithDiscovery();if(_0x143318){const _0x4a52fe=_0x1bf6e2(0x1fb)+_0x143318[_0x1bf6e2(0x200)]+':'+_0x143318[_0x1bf6e2(0x20f)];console['log'](_0x1bf6e2(0x1c1)+_0x4a52fe),console[_0x1bf6e2(0x1b7)]('\x0a\x20\x20Web\x20UI:\x20\x20\x20\x20\x20\x20\x20'+_0x4a52fe),console[_0x1bf6e2(0x1b7)](_0x1bf6e2(0x1ba)),console[_0x1bf6e2(0x1b7)]('\x20\x20API\x20Health:\x20\x20\x20'+_0x4a52fe+'/api/health\x0a');}else console[_0x1bf6e2(0x1b7)](_0x1bf6e2(0x1b8)),console[_0x1bf6e2(0x1b7)](_0x1bf6e2(0x1e5));process['on'](_0x1bf6e2(0x213),()=>_0x47d376['kill']('SIGINT')),process['on'](_0x1bf6e2(0x1ed),()=>_0x47d376['kill']('SIGTERM')),_0x47d376['on'](_0x1bf6e2(0x1c5),_0x54c148=>process[_0x1bf6e2(0x1c5)](_0x54c148||0x0));},'terminal':async()=>{const _0x283a44=a0_0x677ed2;console[_0x283a44(0x1b7)](_0x283a44(0x1cc));let _0x463711=await discoverBackend();explicitPort&&(_0x463711={'host':host,'port':explicitPort});!_0x463711&&(console[_0x283a44(0x201)](_0x283a44(0x1dc)),console[_0x283a44(0x201)]('\x0aPlease\x20start\x20the\x20server\x20first:'),console[_0x283a44(0x201)](_0x283a44(0x1c7)),console[_0x283a44(0x201)](_0x283a44(0x214)),console[_0x283a44(0x201)](_0x283a44(0x1d8)),process[_0x283a44(0x1c5)](0x1));const _0x3be9b6=await checkServerRunning(_0x463711['host'],_0x463711[_0x283a44(0x20f)]);!_0x3be9b6&&(console[_0x283a44(0x201)]('\x0aServer\x20registered\x20at\x20'+_0x463711['host']+':'+_0x463711[_0x283a44(0x20f)]+_0x283a44(0x1d0)),console[_0x283a44(0x201)](_0x283a44(0x1be)),process[_0x283a44(0x1c5)](0x1));console[_0x283a44(0x1b7)](_0x283a44(0x221)+_0x463711['host']+':'+_0x463711[_0x283a44(0x20f)]),console['log']('Starting\x20Terminal\x20UI...\x0a');const _0x456cbc=startTerminalUIProcess(_0x463711['host'],_0x463711[_0x283a44(0x20f)]);process['on']('SIGINT',()=>_0x456cbc[_0x283a44(0x215)]('SIGINT')),process['on']('SIGTERM',()=>_0x456cbc['kill'](_0x283a44(0x1ed))),_0x456cbc['on'](_0x283a44(0x1c5),_0x58748f=>process[_0x283a44(0x1c5)](_0x58748f||0x0));},'plus-terminal':async()=>{const _0x319014=a0_0x677ed2;console[_0x319014(0x1b7)](_0x319014(0x212));const _0x1cbfaa=startServer(!![]);let _0x5909fb;explicitPort?_0x5909fb=await waitForServerAtPort(host,explicitPort):_0x5909fb=await waitForServerWithDiscovery();!_0x5909fb&&(console['error'](_0x319014(0x1e1)),process['exit'](0x1));console['log']('Server\x20running\x20at\x20http://'+_0x5909fb[_0x319014(0x200)]+':'+_0x5909fb[_0x319014(0x20f)]),console['log']('Starting\x20Terminal\x20UI...\x0a');const _0x439e7d=startTerminalUIProcess(_0x5909fb[_0x319014(0x200)],_0x5909fb[_0x319014(0x20f)]);_0x439e7d['on'](_0x319014(0x1c5),_0x273366=>{const _0x350409=_0x319014;console[_0x350409(0x1b7)](_0x350409(0x1ff));try{process[_0x350409(0x215)](_0x1cbfaa['pid'],_0x350409(0x1ed));}catch(_0x13fd14){}process[_0x350409(0x1c5)](_0x273366||0x0);}),process['on'](_0x319014(0x213),()=>{const _0x46a1ab=_0x319014;_0x439e7d[_0x46a1ab(0x215)]('SIGINT');}),process['on'](_0x319014(0x1ed),()=>{const _0x53e0bd=_0x319014;_0x439e7d[_0x53e0bd(0x215)](_0x53e0bd(0x1ed));});},'trigger-schedule':async()=>{const _0x5d681a=a0_0x677ed2,_0x411425=args[0x1];!_0x411425&&(console[_0x5d681a(0x201)](_0x5d681a(0x1d2)),process['exit'](0x1));let _0x25aac2=await discoverBackend(),_0x1079cd=![];if(_0x25aac2){const _0x2374e9=await checkServerRunning(_0x25aac2[_0x5d681a(0x200)],_0x25aac2[_0x5d681a(0x20f)]);if(!_0x2374e9)_0x25aac2=null;}!_0x25aac2&&(console[_0x5d681a(0x1b7)]('No\x20running\x20server\x20found.\x20Starting\x20Loxia\x20in\x20background...'),startServer(!![]),_0x1079cd=!![],explicitPort?_0x25aac2=await waitForServerAtPort(host,explicitPort,0x7530):_0x25aac2=await waitForServerWithDiscovery(0x7530),!_0x25aac2&&(console[_0x5d681a(0x201)](_0x5d681a(0x1db)),process['exit'](0x1)),console['log'](_0x5d681a(0x1f7)+_0x25aac2[_0x5d681a(0x200)]+':'+_0x25aac2[_0x5d681a(0x20f)]));const _0x54fa9b=_0x5d681a(0x1fb)+_0x25aac2[_0x5d681a(0x200)]+':'+_0x25aac2[_0x5d681a(0x20f)]+_0x5d681a(0x1d7)+encodeURIComponent(_0x411425)+'/trigger';try{const _0x21832b=await new Promise((_0x5bbcdd,_0x467cd9)=>{const _0x5a13b2=_0x5d681a,_0x585c3b=JSON[_0x5a13b2(0x1f2)]({}),_0x240628=a0_0x11a4f4[_0x5a13b2(0x210)](_0x54fa9b,{'method':'POST','headers':{'Content-Type':_0x5a13b2(0x1b9),'Content-Length':Buffer[_0x5a13b2(0x21a)](_0x585c3b)}},_0x3f653a=>{const _0x441f56=_0x5a13b2;let _0xd02f86='';_0x3f653a['on'](_0x441f56(0x1ce),_0x504bc9=>_0xd02f86+=_0x504bc9),_0x3f653a['on'](_0x441f56(0x1c2),()=>{const _0x7b6dc9=_0x441f56;try{_0x5bbcdd(JSON['parse'](_0xd02f86));}catch{_0x467cd9(new Error(_0x7b6dc9(0x1e4)+_0xd02f86));}});});_0x240628['on'](_0x5a13b2(0x201),_0x467cd9),_0x240628[_0x5a13b2(0x1e6)](0xea60,()=>{const _0x3b5d69=_0x5a13b2;_0x240628[_0x3b5d69(0x1f0)](),_0x467cd9(new Error(_0x3b5d69(0x20b)));}),_0x240628[_0x5a13b2(0x1f3)](_0x585c3b),_0x240628[_0x5a13b2(0x1c2)]();});_0x21832b[_0x5d681a(0x1c0)]?console[_0x5d681a(0x1b7)](_0x5d681a(0x205)+(_0x21832b[_0x5d681a(0x1f5)]||_0x411425)+'\x22\x20triggered\x20successfully.'):(console[_0x5d681a(0x201)](_0x5d681a(0x1de)+_0x21832b[_0x5d681a(0x201)]),process['exit'](0x1));}catch(_0xc6e363){console[_0x5d681a(0x201)](_0x5d681a(0x1de)+_0xc6e363[_0x5d681a(0x1bf)]),process[_0x5d681a(0x1c5)](0x1);}if(_0x1079cd){const _0x4bb7c0='http://'+_0x25aac2[_0x5d681a(0x200)]+':'+_0x25aac2['port']+_0x5d681a(0x1e7);try{const _0x4db8db=JSON[_0x5d681a(0x1f2)]({'timeoutMinutes':0xa});await new Promise(_0x4322ae=>{const _0x56dd73=_0x5d681a,_0x466dc1=a0_0x11a4f4[_0x56dd73(0x210)](_0x4bb7c0,{'method':_0x56dd73(0x207),'headers':{'Content-Type':_0x56dd73(0x1b9),'Content-Length':Buffer[_0x56dd73(0x21a)](_0x4db8db)}},_0xbe60cf=>{const _0x3e4457=_0x56dd73;_0xbe60cf['on'](_0x3e4457(0x1ce),()=>{}),_0xbe60cf['on'](_0x3e4457(0x1c2),_0x4322ae);});_0x466dc1['on'](_0x56dd73(0x201),_0x4322ae),_0x466dc1[_0x56dd73(0x1f3)](_0x4db8db),_0x466dc1[_0x56dd73(0x1c2)]();});}catch{}}process['exit'](0x0);}};commands[command]?commands[command]()[a0_0x677ed2(0x202)](_0x15f819=>{const _0x1d4b90=a0_0x677ed2;console['error'](_0x1d4b90(0x21e),_0x15f819['message']),process[_0x1d4b90(0x1c5)](0x1);}):(console[a0_0x677ed2(0x201)](a0_0x677ed2(0x1c9)+command),console[a0_0x677ed2(0x201)](a0_0x677ed2(0x1e9)),process[a0_0x677ed2(0x1c5)](0x1));
3
+ const a0_0x56d54e=a0_0x4c6d;(function(_0x5702b8,_0x3f652e){const _0x43924a=a0_0x4c6d,_0x39d51b=_0x5702b8();while(!![]){try{const _0x389924=-parseInt(_0x43924a(0x1bb))/0x1*(-parseInt(_0x43924a(0x1df))/0x2)+parseInt(_0x43924a(0x1ba))/0x3*(-parseInt(_0x43924a(0x1a1))/0x4)+-parseInt(_0x43924a(0x1e2))/0x5+-parseInt(_0x43924a(0x19b))/0x6+-parseInt(_0x43924a(0x1ed))/0x7+-parseInt(_0x43924a(0x1a8))/0x8*(-parseInt(_0x43924a(0x1e1))/0x9)+parseInt(_0x43924a(0x1fe))/0xa*(parseInt(_0x43924a(0x1a0))/0xb);if(_0x389924===_0x3f652e)break;else _0x39d51b['push'](_0x39d51b['shift']());}catch(_0x211365){_0x39d51b['push'](_0x39d51b['shift']());}}}(a0_0x617e,0x2ab04));function a0_0x4c6d(_0x11bfbb,_0xceb872){_0x11bfbb=_0x11bfbb-0x199;const _0x617e01=a0_0x617e();let _0x4c6dd4=_0x617e01[_0x11bfbb];return _0x4c6dd4;}import{fileURLToPath}from'url';import{dirname,join}from'path';import{spawn}from'child_process';import{readFileSync}from'fs';import a0_0x232550 from'http';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename),DEFAULT_PORT=0x1f90,DEFAULT_HOST=a0_0x56d54e(0x1ef),SERVER_STARTUP_TIMEOUT=0x3a98,SERVER_CHECK_INTERVAL=0x1f4,args=process[a0_0x56d54e(0x1f5)][a0_0x56d54e(0x1b2)](0x2),command=args[0x0]&&!args[0x0][a0_0x56d54e(0x1bd)]('--')?args[0x0]:null,flags={'port':null,'host':null,'help':args[a0_0x56d54e(0x1d9)](a0_0x56d54e(0x1c5))||args[a0_0x56d54e(0x1d9)]('-h'),'version':args[a0_0x56d54e(0x1d9)](a0_0x56d54e(0x1a3))||args[a0_0x56d54e(0x1d9)]('-v')};for(let i=0x0;i<args[a0_0x56d54e(0x1d7)];i++){args[i]===a0_0x56d54e(0x1d3)&&args[i+0x1]&&(flags['port']=parseInt(args[i+0x1],0xa)),args[i]==='--host'&&args[i+0x1]&&(flags['host']=args[i+0x1]);}const explicitPort=flags['port'],host=flags[a0_0x56d54e(0x19c)]||DEFAULT_HOST;if(flags[a0_0x56d54e(0x1b4)]){const pkgPath=join(__dirname,'..',a0_0x56d54e(0x1c0)),pkg=JSON[a0_0x56d54e(0x1eb)](readFileSync(pkgPath,a0_0x56d54e(0x1d0)));console[a0_0x56d54e(0x1b7)](a0_0x56d54e(0x19d)+pkg[a0_0x56d54e(0x1b4)]),process[a0_0x56d54e(0x1e7)](0x0);}if(flags[a0_0x56d54e(0x1a7)]||!command){const pkgPath=join(__dirname,'..','package.json'),pkg=JSON[a0_0x56d54e(0x1eb)](readFileSync(pkgPath,'utf8'));console['log'](a0_0x56d54e(0x1b5)+pkg['version']+a0_0x56d54e(0x1ea)+DEFAULT_PORT+a0_0x56d54e(0x1ac)+DEFAULT_HOST+a0_0x56d54e(0x1dc)),process[a0_0x56d54e(0x1e7)](0x0);}async function getPortRegistry(){const {getPortRegistry:_0x2f3817}=await import('../src/services/portRegistry.js');return _0x2f3817();}async function discoverBackend(){const _0x2d6bca=a0_0x56d54e;try{const _0x1def26=await getPortRegistry();await _0x1def26[_0x2d6bca(0x1e0)]();const _0x4af132=await _0x1def26['getService'](_0x2d6bca(0x1f3));if(_0x4af132)return{'host':_0x4af132[_0x2d6bca(0x19c)]||_0x2d6bca(0x1c7),'port':_0x4af132['port'],'pid':_0x4af132[_0x2d6bca(0x1c2)]};return null;}catch(_0x12c42e){return null;}}async function checkServerRunning(_0x57b5fa,_0x41d33d,_0x3301ac=0x1){for(let _0x4d6ce3=0x0;_0x4d6ce3<_0x3301ac;_0x4d6ce3++){const _0x3067ac=await new Promise(_0x1f81a0=>{const _0x75d835=a0_0x4c6d,_0x1e96d0=a0_0x232550[_0x75d835(0x199)](_0x75d835(0x1a4)+_0x57b5fa+':'+_0x41d33d+'/api/health',_0x5663e2=>{const _0x2942cc=_0x75d835;_0x1f81a0(_0x5663e2[_0x2942cc(0x1b8)]===0xc8);});_0x1e96d0['on'](_0x75d835(0x1a5),()=>_0x1f81a0(![])),_0x1e96d0['setTimeout'](0x7d0,()=>{const _0x2fd757=_0x75d835;_0x1e96d0[_0x2fd757(0x1b0)](),_0x1f81a0(![]);});});if(_0x3067ac)return!![];_0x4d6ce3<_0x3301ac-0x1&&await new Promise(_0x178ce2=>setTimeout(_0x178ce2,SERVER_CHECK_INTERVAL));}return![];}function a0_0x617e(){const _0xa470d6=['index.js','setTimeout',')\x0a\x20\x20--host\x20<host>\x20\x20\x20\x20\x20Specify\x20host\x20(default:\x20','Starting\x20Terminal\x20UI...\x0a','ignore','Run\x20\x22loxia\x20--help\x22\x20for\x20usage\x20information.','destroy','success','slice','\x0aServer\x20may\x20still\x20be\x20starting.\x20Check\x20the\x20port\x20registry\x20or\x20logs.','version','\x0aLoxia\x20Autopilot\x20One\x20v','now','log','statusCode','Looking\x20for\x20running\x20server...','9kYDRhl','1VxiVeX','win32','startsWith','/api/health\x0a','scheduleName','package.json','\x20\x20Terminal\x20UI:\x20\x20loxia\x20terminal','pid','\x0aPlease\x20start\x20the\x20server\x20first:','\x0aServer\x20registered\x20at\x20','--help','start','localhost','toString','Please\x20open\x20manually:\x20','Invalid\x20response:\x20','write','/api/schedules/','cmd','end','Run\x20\x27loxia\x20terminal\x27\x20to\x20connect\x20when\x20ready.','utf8','web','Error:','--port','PORT','data','kill','length','SIGTERM','includes','\x20\x20loxia\x20plus-terminal\x20\x20#\x20Start\x20server\x20+\x20Terminal\x20UI\x0a','\x0aShutting\x20down\x20server...',')\x0a\x20\x20-h,\x20--help\x20\x20\x20\x20\x20\x20\x20\x20Show\x20this\x20help\x20message\x0a\x20\x20-v,\x20--version\x20\x20\x20\x20\x20Show\x20version\x20number\x0a\x0aExamples:\x0a\x20\x20loxia\x20web\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Start\x20server\x20+\x20open\x20browser\x0a\x20\x20loxia\x20serve\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Start\x20server\x20only\x20(headless)\x0a\x20\x20loxia\x20terminal\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Connect\x20Terminal\x20UI\x20to\x20running\x20server\x0a\x20\x20loxia\x20plus-terminal\x20\x20\x20\x20\x20\x20#\x20Start\x20server\x20+\x20Terminal\x20UI\x0a\x20\x20loxia\x20web\x20--port\x203000\x20\x20\x20\x20#\x20Use\x20specific\x20port\x0a\x0aQuick\x20Start:\x0a\x20\x201.\x20Run\x20\x27loxia\x20web\x27\x20to\x20start\x20with\x20Web\x20UI\x0a\x20\x202.\x20Or\x20run\x20\x27loxia\x20plus-terminal\x27\x20for\x20Terminal\x20UI\x20experience\x0a\x20\x203.\x20Or\x20run\x20\x27loxia\x20serve\x27\x20for\x20headless\x20server\x20(connect\x20remotely)\x0a\x0aNote:\x20If\x20no\x20port\x20is\x20specified,\x20the\x20server\x20will\x20automatically\x20find\x0aan\x20available\x20port.\x20The\x20Terminal\x20UI\x20will\x20discover\x20the\x20server\x20port\x0aautomatically\x20from\x20the\x20port\x20registry.\x0a\x0aDocumentation:\x0a\x20\x20https://autopilot.loxia.ai\x0a\x0a','message','Server\x20running\x20at\x20http://','502726OOrLMJ','cleanupStaleEntries','144ZiRhAb','435740ChiskS','Failed\x20to\x20trigger\x20schedule:\x20','open','Server\x20discovered\x20at\x20','byteLength','exit','Could\x20not\x20open\x20browser\x20automatically.','Starting\x20Loxia\x20server...\x0a','\x20-\x20AI\x20Agent\x20System\x0a\x0aUsage:\x0a\x20\x20loxia\x20<command>\x20[options]\x0a\x0aCommands:\x0a\x20\x20web\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Start\x20server\x20+\x20open\x20Web\x20UI\x20in\x20browser\x0a\x20\x20serve\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Start\x20server\x20only\x20(no\x20UI\x20opened)\x0a\x20\x20terminal\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Start\x20Terminal\x20UI\x20(server\x20must\x20be\x20running)\x0a\x20\x20plus-web\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Alias\x20for\x20\x27web\x27\x0a\x20\x20plus-terminal\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Start\x20server\x20+\x20Terminal\x20UI\x20together\x0a\x20\x20trigger-schedule\x20<id>\x20\x20\x20\x20\x20Trigger\x20a\x20scheduled\x20task\x20(wakes\x20server\x20if\x20needed)\x0a\x0aOptions:\x0a\x20\x20--port\x20<number>\x20\x20\x20Specify\x20port\x20(default:\x20auto-select\x20starting\x20from\x20','parse','application/json','918722VDYPGX','unref','127.0.0.1','node','platform','POST','backend','Server\x20started\x20at\x20','argv','/trigger','\x20but\x20not\x20responding.','\x22\x20triggered\x20successfully.','inherit','port','Waiting\x20for\x20server\x20to\x20start...','LOXIA_PORT','SIGINT','88590CmTKeb','Usage:\x20loxia\x20trigger-schedule\x20<schedule-id>','get','stringify','574746AsRLVP','host','Loxia\x20Autopilot\x20One\x20v','No\x20running\x20server\x20found.\x20Starting\x20Loxia\x20in\x20background...','Failed\x20to\x20start\x20server\x20within\x2030s.\x20Check\x20logs.','495jzbhyl','447964xIIHxe','loxia-terminal.js','--version','http://','error','Starting\x20Loxia\x20server\x20in\x20background...','help','87496CmdYFV','ceil'];a0_0x617e=function(){return _0xa470d6;};return a0_0x617e();}async function waitForServerWithDiscovery(_0x20684c=SERVER_STARTUP_TIMEOUT){const _0x161629=a0_0x56d54e,_0xeed8c3=Date[_0x161629(0x1b6)]();while(Date[_0x161629(0x1b6)]()-_0xeed8c3<_0x20684c){const _0x4473a3=await discoverBackend();if(_0x4473a3){const _0x5e769c=await checkServerRunning(_0x4473a3['host'],_0x4473a3[_0x161629(0x1fa)]);if(_0x5e769c)return _0x4473a3;}await new Promise(_0x112dec=>setTimeout(_0x112dec,SERVER_CHECK_INTERVAL));}return null;}async function waitForServerAtPort(_0x51a324,_0x11ce00,_0x1c8dca=SERVER_STARTUP_TIMEOUT){const _0x448e29=a0_0x56d54e,_0x71f75a=Math[_0x448e29(0x1a9)](_0x1c8dca/SERVER_CHECK_INTERVAL),_0x995662=await checkServerRunning(_0x51a324,_0x11ce00,_0x71f75a);return _0x995662?{'host':_0x51a324,'port':_0x11ce00}:null;}function openBrowser(_0x1b9029){const _0x19e4f1=a0_0x56d54e;let _0x4e2dc2,_0x35161c;if(process[_0x19e4f1(0x1f1)]==='darwin')_0x4e2dc2=_0x19e4f1(0x1e4),_0x35161c=[_0x1b9029];else process[_0x19e4f1(0x1f1)]===_0x19e4f1(0x1bc)?(_0x4e2dc2=_0x19e4f1(0x1cd),_0x35161c=['/c',_0x19e4f1(0x1c6),'\x22\x22',_0x1b9029]):(_0x4e2dc2='xdg-open',_0x35161c=[_0x1b9029]);const _0x24e0c5=spawn(_0x4e2dc2,_0x35161c,{'detached':!![],'stdio':_0x19e4f1(0x1ae)});_0x24e0c5[_0x19e4f1(0x1ee)](),_0x24e0c5['on'](_0x19e4f1(0x1a5),()=>{const _0x3f112d=_0x19e4f1;console[_0x3f112d(0x1b7)](_0x3f112d(0x1e8)),console[_0x3f112d(0x1b7)](_0x3f112d(0x1c9)+_0x1b9029);});}function startServer(_0x41a836=![]){const _0x180b12=a0_0x56d54e,_0xa7d4fe={...process.env};explicitPort&&(_0xa7d4fe[_0x180b12(0x1fc)]=explicitPort['toString'](),_0xa7d4fe[_0x180b12(0x1d4)]=explicitPort[_0x180b12(0x1c8)]());flags[_0x180b12(0x19c)]&&(_0xa7d4fe['LOXIA_HOST']=flags[_0x180b12(0x19c)]);const _0x5e6b21=join(__dirname,'..','src',_0x180b12(0x1aa)),_0x2a72d1=spawn('node',[_0x5e6b21],{'cwd':join(__dirname,'..'),'env':_0xa7d4fe,'stdio':_0x41a836?[_0x180b12(0x1ae),_0x180b12(0x1ae),'ignore']:_0x180b12(0x1f9),'detached':_0x41a836});return _0x41a836&&_0x2a72d1['unref'](),_0x2a72d1;}function startTerminalUIProcess(_0x902c,_0x30cd86){const _0x58e5ea=a0_0x56d54e,_0x34385a=join(__dirname,_0x58e5ea(0x1a2)),_0x51b8bc={...process.env,'LOXIA_PORT':_0x30cd86[_0x58e5ea(0x1c8)](),'LOXIA_HOST':_0x902c},_0x4c21fa=spawn(_0x58e5ea(0x1f0),[_0x34385a],{'cwd':join(__dirname,'..'),'env':_0x51b8bc,'stdio':_0x58e5ea(0x1f9)});return _0x4c21fa;}const commands={'web':async()=>{const _0x2ee359=a0_0x56d54e;console['log']('Starting\x20Loxia\x20server...\x0a');const _0x571aad=startServer(![]);console[_0x2ee359(0x1b7)]('Waiting\x20for\x20server\x20to\x20start...');let _0x4b2886;explicitPort?_0x4b2886=await waitForServerAtPort(host,explicitPort):_0x4b2886=await waitForServerWithDiscovery();if(_0x4b2886){const _0x5c40eb='http://'+_0x4b2886[_0x2ee359(0x19c)]+':'+_0x4b2886[_0x2ee359(0x1fa)];console[_0x2ee359(0x1b7)]('\x0aOpening\x20Web\x20UI\x20at\x20'+_0x5c40eb),openBrowser(_0x5c40eb);}else console[_0x2ee359(0x1b7)](_0x2ee359(0x1b3));process['on'](_0x2ee359(0x1fd),()=>_0x571aad[_0x2ee359(0x1d6)]('SIGINT')),process['on']('SIGTERM',()=>_0x571aad[_0x2ee359(0x1d6)](_0x2ee359(0x1d8))),_0x571aad['on'](_0x2ee359(0x1e7),_0x1bc267=>process['exit'](_0x1bc267||0x0));},'plus-web':async()=>{const _0x414f9e=a0_0x56d54e;await commands[_0x414f9e(0x1d1)]();},'serve':async()=>{const _0x3f1c6e=a0_0x56d54e;console[_0x3f1c6e(0x1b7)](_0x3f1c6e(0x1e9));const _0x5dfaa1=startServer(![]);console[_0x3f1c6e(0x1b7)](_0x3f1c6e(0x1fb));let _0x1fa38e;explicitPort?_0x1fa38e=await waitForServerAtPort(host,explicitPort):_0x1fa38e=await waitForServerWithDiscovery();if(_0x1fa38e){const _0x2351fa=_0x3f1c6e(0x1a4)+_0x1fa38e[_0x3f1c6e(0x19c)]+':'+_0x1fa38e['port'];console[_0x3f1c6e(0x1b7)]('\x0a✓\x20Server\x20running\x20at\x20'+_0x2351fa),console[_0x3f1c6e(0x1b7)]('\x0a\x20\x20Web\x20UI:\x20\x20\x20\x20\x20\x20\x20'+_0x2351fa),console[_0x3f1c6e(0x1b7)](_0x3f1c6e(0x1c1)),console[_0x3f1c6e(0x1b7)]('\x20\x20API\x20Health:\x20\x20\x20'+_0x2351fa+_0x3f1c6e(0x1be));}else console[_0x3f1c6e(0x1b7)]('\x0aServer\x20started\x20but\x20may\x20still\x20be\x20initializing.'),console[_0x3f1c6e(0x1b7)](_0x3f1c6e(0x1cf));process['on'](_0x3f1c6e(0x1fd),()=>_0x5dfaa1[_0x3f1c6e(0x1d6)]('SIGINT')),process['on'](_0x3f1c6e(0x1d8),()=>_0x5dfaa1['kill'](_0x3f1c6e(0x1d8))),_0x5dfaa1['on'](_0x3f1c6e(0x1e7),_0x1cfca6=>process['exit'](_0x1cfca6||0x0));},'terminal':async()=>{const _0x23b754=a0_0x56d54e;console[_0x23b754(0x1b7)](_0x23b754(0x1b9));let _0x10d321=await discoverBackend();explicitPort&&(_0x10d321={'host':host,'port':explicitPort});!_0x10d321&&(console[_0x23b754(0x1a5)]('\x0aNo\x20running\x20server\x20found\x20in\x20the\x20port\x20registry.'),console[_0x23b754(0x1a5)](_0x23b754(0x1c3)),console[_0x23b754(0x1a5)]('\x20\x20loxia\x20web\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Start\x20server\x20+\x20Web\x20UI'),console['error']('\x20\x20loxia\x20serve\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Start\x20server\x20only'),console[_0x23b754(0x1a5)](_0x23b754(0x1da)),process[_0x23b754(0x1e7)](0x1));const _0x223547=await checkServerRunning(_0x10d321['host'],_0x10d321[_0x23b754(0x1fa)]);!_0x223547&&(console['error'](_0x23b754(0x1c4)+_0x10d321[_0x23b754(0x19c)]+':'+_0x10d321[_0x23b754(0x1fa)]+_0x23b754(0x1f7)),console[_0x23b754(0x1a5)]('It\x20may\x20have\x20crashed.\x20Please\x20restart\x20it.'),process[_0x23b754(0x1e7)](0x1));console['log'](_0x23b754(0x1e5)+_0x10d321[_0x23b754(0x19c)]+':'+_0x10d321[_0x23b754(0x1fa)]),console[_0x23b754(0x1b7)](_0x23b754(0x1ad));const _0x3dd44a=startTerminalUIProcess(_0x10d321[_0x23b754(0x19c)],_0x10d321[_0x23b754(0x1fa)]);process['on'](_0x23b754(0x1fd),()=>_0x3dd44a[_0x23b754(0x1d6)](_0x23b754(0x1fd))),process['on'](_0x23b754(0x1d8),()=>_0x3dd44a['kill'](_0x23b754(0x1d8))),_0x3dd44a['on'](_0x23b754(0x1e7),_0x22ad67=>process[_0x23b754(0x1e7)](_0x22ad67||0x0));},'plus-terminal':async()=>{const _0x299eb8=a0_0x56d54e;console[_0x299eb8(0x1b7)](_0x299eb8(0x1a6));const _0x36fa32=startServer(!![]);let _0x4c5fca;explicitPort?_0x4c5fca=await waitForServerAtPort(host,explicitPort):_0x4c5fca=await waitForServerWithDiscovery();!_0x4c5fca&&(console[_0x299eb8(0x1a5)]('\x0aServer\x20failed\x20to\x20start.\x20Please\x20check\x20logs.'),process[_0x299eb8(0x1e7)](0x1));console[_0x299eb8(0x1b7)](_0x299eb8(0x1de)+_0x4c5fca[_0x299eb8(0x19c)]+':'+_0x4c5fca[_0x299eb8(0x1fa)]),console['log']('Starting\x20Terminal\x20UI...\x0a');const _0x4fb46f=startTerminalUIProcess(_0x4c5fca[_0x299eb8(0x19c)],_0x4c5fca[_0x299eb8(0x1fa)]);_0x4fb46f['on'](_0x299eb8(0x1e7),_0x434041=>{const _0xf12440=_0x299eb8;console['log'](_0xf12440(0x1db));try{process[_0xf12440(0x1d6)](_0x36fa32[_0xf12440(0x1c2)],_0xf12440(0x1d8));}catch(_0x1974b7){}process[_0xf12440(0x1e7)](_0x434041||0x0);}),process['on'](_0x299eb8(0x1fd),()=>{const _0x4d076a=_0x299eb8;_0x4fb46f[_0x4d076a(0x1d6)](_0x4d076a(0x1fd));}),process['on'](_0x299eb8(0x1d8),()=>{const _0x3b17aa=_0x299eb8;_0x4fb46f[_0x3b17aa(0x1d6)](_0x3b17aa(0x1d8));});},'trigger-schedule':async()=>{const _0x1f8b9e=a0_0x56d54e,_0x5619a1=args[0x1];!_0x5619a1&&(console[_0x1f8b9e(0x1a5)](_0x1f8b9e(0x1ff)),process[_0x1f8b9e(0x1e7)](0x1));let _0x3a9050=await discoverBackend(),_0x450322=![];if(_0x3a9050){const _0x2b0c16=await checkServerRunning(_0x3a9050['host'],_0x3a9050['port']);if(!_0x2b0c16)_0x3a9050=null;}!_0x3a9050&&(console[_0x1f8b9e(0x1b7)](_0x1f8b9e(0x19e)),startServer(!![]),_0x450322=!![],explicitPort?_0x3a9050=await waitForServerAtPort(host,explicitPort,0x7530):_0x3a9050=await waitForServerWithDiscovery(0x7530),!_0x3a9050&&(console['error'](_0x1f8b9e(0x19f)),process[_0x1f8b9e(0x1e7)](0x1)),console[_0x1f8b9e(0x1b7)](_0x1f8b9e(0x1f4)+_0x3a9050[_0x1f8b9e(0x19c)]+':'+_0x3a9050['port']));const _0x39833c=_0x1f8b9e(0x1a4)+_0x3a9050[_0x1f8b9e(0x19c)]+':'+_0x3a9050[_0x1f8b9e(0x1fa)]+_0x1f8b9e(0x1cc)+encodeURIComponent(_0x5619a1)+_0x1f8b9e(0x1f6);try{const _0x1cb74e=await new Promise((_0x56f4e6,_0x28763b)=>{const _0x572d83=_0x1f8b9e,_0x5ee1a9=JSON['stringify']({}),_0x23071a=a0_0x232550['request'](_0x39833c,{'method':_0x572d83(0x1f2),'headers':{'Content-Type':_0x572d83(0x1ec),'Content-Length':Buffer[_0x572d83(0x1e6)](_0x5ee1a9)}},_0x583c9f=>{const _0x10b5be=_0x572d83;let _0x2136e3='';_0x583c9f['on'](_0x10b5be(0x1d5),_0x110a70=>_0x2136e3+=_0x110a70),_0x583c9f['on'](_0x10b5be(0x1ce),()=>{const _0x584cd9=_0x10b5be;try{_0x56f4e6(JSON[_0x584cd9(0x1eb)](_0x2136e3));}catch{_0x28763b(new Error(_0x584cd9(0x1ca)+_0x2136e3));}});});_0x23071a['on'](_0x572d83(0x1a5),_0x28763b),_0x23071a[_0x572d83(0x1ab)](0xea60,()=>{_0x23071a['destroy'](),_0x28763b(new Error('Request\x20timed\x20out'));}),_0x23071a['write'](_0x5ee1a9),_0x23071a['end']();});_0x1cb74e[_0x1f8b9e(0x1b1)]?console['log']('Schedule\x20\x22'+(_0x1cb74e[_0x1f8b9e(0x1bf)]||_0x5619a1)+_0x1f8b9e(0x1f8)):(console[_0x1f8b9e(0x1a5)](_0x1f8b9e(0x1e3)+_0x1cb74e[_0x1f8b9e(0x1a5)]),process[_0x1f8b9e(0x1e7)](0x1));}catch(_0x427faf){console[_0x1f8b9e(0x1a5)]('Failed\x20to\x20trigger\x20schedule:\x20'+_0x427faf[_0x1f8b9e(0x1dd)]),process[_0x1f8b9e(0x1e7)](0x1);}if(_0x450322){const _0x18e311=_0x1f8b9e(0x1a4)+_0x3a9050['host']+':'+_0x3a9050[_0x1f8b9e(0x1fa)]+'/api/system/idle-shutdown';try{const _0x524578=JSON[_0x1f8b9e(0x19a)]({'timeoutMinutes':0xa});await new Promise(_0x4ea547=>{const _0xc3a65b=_0x1f8b9e,_0x47864c=a0_0x232550['request'](_0x18e311,{'method':_0xc3a65b(0x1f2),'headers':{'Content-Type':'application/json','Content-Length':Buffer[_0xc3a65b(0x1e6)](_0x524578)}},_0x46afeb=>{const _0x4dc2e4=_0xc3a65b;_0x46afeb['on'](_0x4dc2e4(0x1d5),()=>{}),_0x46afeb['on'](_0x4dc2e4(0x1ce),_0x4ea547);});_0x47864c['on'](_0xc3a65b(0x1a5),_0x4ea547),_0x47864c[_0xc3a65b(0x1cb)](_0x524578),_0x47864c['end']();});}catch{}}process[_0x1f8b9e(0x1e7)](0x0);}};commands[command]?commands[command]()['catch'](_0xa992e8=>{const _0x505f5f=a0_0x56d54e;console[_0x505f5f(0x1a5)](_0x505f5f(0x1d2),_0xa992e8[_0x505f5f(0x1dd)]),process['exit'](0x1);}):(console['error']('Unknown\x20command:\x20'+command),console['error'](a0_0x56d54e(0x1af)),process['exit'](0x1));
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- const a0_0x49e6ee=a0_0x10de;(function(_0x4e4100,_0x5a8b11){const _0x35a80f=a0_0x10de,_0x2d6836=_0x4e4100();while(!![]){try{const _0x1b18f4=-parseInt(_0x35a80f(0x1e1))/0x1+-parseInt(_0x35a80f(0x1d7))/0x2+parseInt(_0x35a80f(0x1c7))/0x3*(-parseInt(_0x35a80f(0x1b8))/0x4)+-parseInt(_0x35a80f(0x1d9))/0x5*(-parseInt(_0x35a80f(0x1c3))/0x6)+-parseInt(_0x35a80f(0x1c8))/0x7+-parseInt(_0x35a80f(0x1b9))/0x8+parseInt(_0x35a80f(0x1d5))/0x9;if(_0x1b18f4===_0x5a8b11)break;else _0x2d6836['push'](_0x2d6836['shift']());}catch(_0x32d973){_0x2d6836['push'](_0x2d6836['shift']());}}}(a0_0x24b5,0x93f57));import{spawn}from'child_process';import a0_0x17c0a0 from'net';import a0_0xaa5d44 from'path';import{fileURLToPath}from'url';function a0_0x10de(_0x2252e0,_0x19a6d9){_0x2252e0=_0x2252e0-0x1b8;const _0x24b5c0=a0_0x24b5();let _0x10de15=_0x24b5c0[_0x2252e0];return _0x10de15;}const __filename=fileURLToPath(import.meta.url),__dirname=a0_0xaa5d44[a0_0x49e6ee(0x1be)](__filename),projectRoot=a0_0xaa5d44[a0_0x49e6ee(0x1be)](__dirname),DEFAULT_PORT=0x1f90,DEFAULT_HOST=a0_0x49e6ee(0x1bd),SERVER_STARTUP_TIMEOUT=0x2710;async function isServerRunning(_0x4b90b2,_0x2c0b0b){return new Promise(_0x528bf8=>{const _0x5428c0=a0_0x10de,_0x8004bd=new a0_0x17c0a0['Socket']();_0x8004bd[_0x5428c0(0x1ce)](0x7d0),_0x8004bd['on'](_0x5428c0(0x1cd),()=>{const _0x3ea5dc=_0x5428c0;_0x8004bd[_0x3ea5dc(0x1da)](),_0x528bf8(!![]);}),_0x8004bd['on']('timeout',()=>{_0x8004bd['destroy'](),_0x528bf8(![]);}),_0x8004bd['on'](_0x5428c0(0x1bf),()=>{const _0x1b3dfb=_0x5428c0;_0x8004bd[_0x1b3dfb(0x1da)](),_0x528bf8(![]);}),_0x8004bd['connect'](_0x2c0b0b,_0x4b90b2);});}async function startServer(_0x1ed17d,_0x5237d1){const _0x3b8880=a0_0x49e6ee;return console[_0x3b8880(0x1c5)]('🚀\x20Starting\x20Loxia\x20server...'),new Promise((_0x1e2550,_0x1ec375)=>{const _0x37a8f4=_0x3b8880,_0x24ba6f=spawn('node',[a0_0xaa5d44['join'](projectRoot,_0x37a8f4(0x1c0)),_0x37a8f4(0x1d6),_0x37a8f4(0x1ba),'--host',_0x1ed17d,_0x37a8f4(0x1bb),_0x5237d1[_0x37a8f4(0x1d1)]()],{'detached':![],'stdio':[_0x37a8f4(0x1db),_0x37a8f4(0x1dc),'pipe']});_0x24ba6f[_0x37a8f4(0x1d2)]['on'](_0x37a8f4(0x1bc),()=>{}),_0x24ba6f['stderr']['on'](_0x37a8f4(0x1bc),()=>{}),_0x24ba6f['on'](_0x37a8f4(0x1bf),_0x1e91cb=>{const _0x28c28b=_0x37a8f4;console['error'](_0x28c28b(0x1cb),_0x1e91cb['message']),_0x1ec375(_0x1e91cb);});const _0x28e869=Date['now'](),_0x102107=setInterval(async()=>{const _0x249d02=_0x37a8f4,_0x207927=await isServerRunning(_0x1ed17d,_0x5237d1);if(_0x207927)clearInterval(_0x102107),console['log']('✓\x20Server\x20started\x20at\x20'+_0x1ed17d+':'+_0x5237d1),_0x1e2550();else Date[_0x249d02(0x1d8)]()-_0x28e869>SERVER_STARTUP_TIMEOUT&&(clearInterval(_0x102107),_0x24ba6f[_0x249d02(0x1d0)](),_0x1ec375(new Error(_0x249d02(0x1cf))));},0x1f4);});}function a0_0x24b5(){const _0x150ee2=['Server\x20startup\x20timeout','kill','toString','stdout','\x20\x20\x203.\x20Check\x20logs\x20for\x20more\x20details','━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━','13693455EiezYs','--ui','1257392Nmrtrh','now','575CNkEiI','destroy','ignore','pipe','--host','\x20\x20\x201.\x20Make\x20sure\x20no\x20other\x20process\x20is\x20using\x20port\x208080','slice','exit','297035AgOLFj','268dEDSkd','1360744djnDyT','web','--port','data','localhost','dirname','error','bin/cli.js','../src/interfaces/terminal/index.js','...','53418SCHxTZ','message','log','\x20\x20Loxia\x20Autopilot\x20One\x20-\x20Terminal\x20UI','16623AyUMum','3305610jxJEej','✓\x20Server\x20is\x20already\x20running\x20at\x20','🎨\x20Launching\x20Ink-based\x20Terminal\x20UI...','Failed\x20to\x20start\x20server:','argv','connect','setTimeout'];a0_0x24b5=function(){return _0x150ee2;};return a0_0x24b5();}async function main(){const _0x407f85=a0_0x49e6ee;try{console[_0x407f85(0x1c5)](_0x407f85(0x1d4)),console[_0x407f85(0x1c5)](_0x407f85(0x1c6)),console['log'](_0x407f85(0x1d4)),console[_0x407f85(0x1c5)]('');const _0x11b15a=process[_0x407f85(0x1cc)][_0x407f85(0x1df)](0x2);let _0x2ccc31=DEFAULT_HOST,_0x508d8c=DEFAULT_PORT;for(let _0x267728=0x0;_0x267728<_0x11b15a['length'];_0x267728++){if(_0x11b15a[_0x267728]===_0x407f85(0x1dd)&&_0x11b15a[_0x267728+0x1])_0x2ccc31=_0x11b15a[_0x267728+0x1],_0x267728++;else _0x11b15a[_0x267728]==='--port'&&_0x11b15a[_0x267728+0x1]&&(_0x508d8c=parseInt(_0x11b15a[_0x267728+0x1],0xa),_0x267728++);}console[_0x407f85(0x1c5)]('🔍\x20Checking\x20if\x20server\x20is\x20running\x20at\x20'+_0x2ccc31+':'+_0x508d8c+_0x407f85(0x1c2));const _0x3edcba=await isServerRunning(_0x2ccc31,_0x508d8c);!_0x3edcba?(console['log']('✗\x20Server\x20is\x20not\x20running'),await startServer(_0x2ccc31,_0x508d8c)):console[_0x407f85(0x1c5)](_0x407f85(0x1c9)+_0x2ccc31+':'+_0x508d8c),console['log'](''),console[_0x407f85(0x1c5)](_0x407f85(0x1ca)),console['log'](''),await new Promise(_0x10e4fe=>setTimeout(_0x10e4fe,0x1f4)),process.env.LOXIA_HOST=_0x2ccc31,process.env.LOXIA_PORT=_0x508d8c[_0x407f85(0x1d1)](),await import(_0x407f85(0x1c1));}catch(_0x506dfb){console['error'](''),console[_0x407f85(0x1bf)]('❌\x20Failed\x20to\x20start\x20Terminal\x20UI:'),console['error']('\x20\x20',_0x506dfb[_0x407f85(0x1c4)]),console[_0x407f85(0x1bf)](''),console[_0x407f85(0x1bf)]('💡\x20Troubleshooting:'),console[_0x407f85(0x1bf)](_0x407f85(0x1de)),console[_0x407f85(0x1bf)]('\x20\x20\x202.\x20Try\x20running\x20the\x20server\x20manually:\x20node\x20bin/cli.js'),console[_0x407f85(0x1bf)](_0x407f85(0x1d3)),console[_0x407f85(0x1bf)](''),process[_0x407f85(0x1e0)](0x1);}}main();
3
+ const a0_0x4d6857=a0_0xdbbe;(function(_0x5e81db,_0x2a4e4a){const _0x528bac=a0_0xdbbe,_0x3aff05=_0x5e81db();while(!![]){try{const _0x2df441=-parseInt(_0x528bac(0xbc))/0x1*(parseInt(_0x528bac(0xa6))/0x2)+-parseInt(_0x528bac(0xb7))/0x3*(parseInt(_0x528bac(0xb9))/0x4)+-parseInt(_0x528bac(0xc6))/0x5*(parseInt(_0x528bac(0xd1))/0x6)+parseInt(_0x528bac(0xc0))/0x7*(-parseInt(_0x528bac(0xb3))/0x8)+-parseInt(_0x528bac(0xac))/0x9+-parseInt(_0x528bac(0xc8))/0xa+parseInt(_0x528bac(0xab))/0xb;if(_0x2df441===_0x2a4e4a)break;else _0x3aff05['push'](_0x3aff05['shift']());}catch(_0x274eb3){_0x3aff05['push'](_0x3aff05['shift']());}}}(a0_0x1e81,0x718e4));function a0_0xdbbe(_0x59b024,_0x5e269a){_0x59b024=_0x59b024-0xa1;const _0x1e818f=a0_0x1e81();let _0xdbbeb=_0x1e818f[_0x59b024];return _0xdbbeb;}import{spawn}from'child_process';import a0_0x28e315 from'net';import a0_0x71db2a from'path';import{fileURLToPath}from'url';function a0_0x1e81(){const _0x496118=['373784ywyWWM','--host','\x20\x20\x203.\x20Check\x20logs\x20for\x20more\x20details','1FqYOmV','localhost','message','pipe','4907bbKXXI','...','destroy','stderr','connect','argv','10orkmZq','━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━','164170lrHPVo','\x20\x20Loxia\x20Autopilot\x20One\x20-\x20Terminal\x20UI','\x20\x20\x201.\x20Make\x20sure\x20no\x20other\x20process\x20is\x20using\x20port\x208080','Server\x20startup\x20timeout','--ui','log','💡\x20Troubleshooting:','data','ignore','2765478zcWUCy','🚀\x20Starting\x20Loxia\x20server...','✗\x20Server\x20is\x20not\x20running','🎨\x20Launching\x20Ink-based\x20Terminal\x20UI...','timeout','stdout','1731242nMMMsO','kill','web','--port','join','32284879tFLVPd','4313898BsSFUY','\x20\x20\x202.\x20Try\x20running\x20the\x20server\x20manually:\x20node\x20bin/cli.js','slice','length','../src/interfaces/terminal/index.js','✓\x20Server\x20started\x20at\x20','❌\x20Failed\x20to\x20start\x20Terminal\x20UI:','1064sHrvug','toString','dirname','error','3ukebmz','now'];a0_0x1e81=function(){return _0x496118;};return a0_0x1e81();}const __filename=fileURLToPath(import.meta.url),__dirname=a0_0x71db2a[a0_0x4d6857(0xb5)](__filename),projectRoot=a0_0x71db2a[a0_0x4d6857(0xb5)](__dirname),DEFAULT_PORT=0x1f90,DEFAULT_HOST=a0_0x4d6857(0xbd),SERVER_STARTUP_TIMEOUT=0x2710;async function isServerRunning(_0x15e45e,_0x4983e1){return new Promise(_0x1de311=>{const _0x34e257=a0_0xdbbe,_0x23fd11=new a0_0x28e315['Socket']();_0x23fd11['setTimeout'](0x7d0),_0x23fd11['on'](_0x34e257(0xc4),()=>{_0x23fd11['destroy'](),_0x1de311(!![]);}),_0x23fd11['on'](_0x34e257(0xa4),()=>{const _0x10991c=_0x34e257;_0x23fd11[_0x10991c(0xc2)](),_0x1de311(![]);}),_0x23fd11['on'](_0x34e257(0xb6),()=>{const _0x1eee53=_0x34e257;_0x23fd11[_0x1eee53(0xc2)](),_0x1de311(![]);}),_0x23fd11[_0x34e257(0xc4)](_0x4983e1,_0x15e45e);});}async function startServer(_0x390491,_0x45d528){const _0x234c5a=a0_0x4d6857;return console[_0x234c5a(0xcd)](_0x234c5a(0xa1)),new Promise((_0xf33889,_0x5b9c53)=>{const _0x3bb4c5=_0x234c5a,_0x5f0df1=spawn('node',[a0_0x71db2a[_0x3bb4c5(0xaa)](projectRoot,'bin/cli.js'),_0x3bb4c5(0xcc),_0x3bb4c5(0xa8),_0x3bb4c5(0xba),_0x390491,_0x3bb4c5(0xa9),_0x45d528[_0x3bb4c5(0xb4)]()],{'detached':![],'stdio':[_0x3bb4c5(0xd0),_0x3bb4c5(0xbf),'pipe']});_0x5f0df1[_0x3bb4c5(0xa5)]['on'](_0x3bb4c5(0xcf),()=>{}),_0x5f0df1[_0x3bb4c5(0xc3)]['on'](_0x3bb4c5(0xcf),()=>{}),_0x5f0df1['on'](_0x3bb4c5(0xb6),_0x3dfd81=>{const _0x1867dd=_0x3bb4c5;console['error']('Failed\x20to\x20start\x20server:',_0x3dfd81[_0x1867dd(0xbe)]),_0x5b9c53(_0x3dfd81);});const _0x33e9f8=Date['now'](),_0x37e55f=setInterval(async()=>{const _0x40f880=_0x3bb4c5,_0xa9e15e=await isServerRunning(_0x390491,_0x45d528);if(_0xa9e15e)clearInterval(_0x37e55f),console['log'](_0x40f880(0xb1)+_0x390491+':'+_0x45d528),_0xf33889();else Date[_0x40f880(0xb8)]()-_0x33e9f8>SERVER_STARTUP_TIMEOUT&&(clearInterval(_0x37e55f),_0x5f0df1[_0x40f880(0xa7)](),_0x5b9c53(new Error(_0x40f880(0xcb))));},0x1f4);});}async function main(){const _0x3bbe71=a0_0x4d6857;try{console[_0x3bbe71(0xcd)](_0x3bbe71(0xc7)),console[_0x3bbe71(0xcd)](_0x3bbe71(0xc9)),console['log'](_0x3bbe71(0xc7)),console['log']('');const _0x342eff=process[_0x3bbe71(0xc5)][_0x3bbe71(0xae)](0x2);let _0x3172dd=DEFAULT_HOST,_0x2455d6=DEFAULT_PORT;for(let _0x5ba363=0x0;_0x5ba363<_0x342eff[_0x3bbe71(0xaf)];_0x5ba363++){if(_0x342eff[_0x5ba363]===_0x3bbe71(0xba)&&_0x342eff[_0x5ba363+0x1])_0x3172dd=_0x342eff[_0x5ba363+0x1],_0x5ba363++;else _0x342eff[_0x5ba363]==='--port'&&_0x342eff[_0x5ba363+0x1]&&(_0x2455d6=parseInt(_0x342eff[_0x5ba363+0x1],0xa),_0x5ba363++);}console['log']('🔍\x20Checking\x20if\x20server\x20is\x20running\x20at\x20'+_0x3172dd+':'+_0x2455d6+_0x3bbe71(0xc1));const _0x5c7e75=await isServerRunning(_0x3172dd,_0x2455d6);!_0x5c7e75?(console[_0x3bbe71(0xcd)](_0x3bbe71(0xa2)),await startServer(_0x3172dd,_0x2455d6)):console[_0x3bbe71(0xcd)]('✓\x20Server\x20is\x20already\x20running\x20at\x20'+_0x3172dd+':'+_0x2455d6),console[_0x3bbe71(0xcd)](''),console[_0x3bbe71(0xcd)](_0x3bbe71(0xa3)),console[_0x3bbe71(0xcd)](''),await new Promise(_0x26c139=>setTimeout(_0x26c139,0x1f4)),process.env.LOXIA_HOST=_0x3172dd,process.env.LOXIA_PORT=_0x2455d6['toString'](),await import(_0x3bbe71(0xb0));}catch(_0x4bb265){console[_0x3bbe71(0xb6)](''),console[_0x3bbe71(0xb6)](_0x3bbe71(0xb2)),console[_0x3bbe71(0xb6)]('\x20\x20',_0x4bb265[_0x3bbe71(0xbe)]),console['error'](''),console['error'](_0x3bbe71(0xce)),console['error'](_0x3bbe71(0xca)),console['error'](_0x3bbe71(0xad)),console[_0x3bbe71(0xb6)](_0x3bbe71(0xbb)),console[_0x3bbe71(0xb6)](''),process['exit'](0x1);}}main();
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- const a0_0x1ae5af=a0_0x3a16;(function(_0x336061,_0x315784){const _0x5070da=a0_0x3a16,_0x58cf36=_0x336061();while(!![]){try{const _0x5cbe59=-parseInt(_0x5070da(0x1c0))/0x1+-parseInt(_0x5070da(0x1b2))/0x2+parseInt(_0x5070da(0x1c9))/0x3+parseInt(_0x5070da(0x1ad))/0x4+parseInt(_0x5070da(0x1b6))/0x5+-parseInt(_0x5070da(0x1b0))/0x6*(-parseInt(_0x5070da(0x1af))/0x7)+-parseInt(_0x5070da(0x1bd))/0x8*(parseInt(_0x5070da(0x1cb))/0x9);if(_0x5cbe59===_0x315784)break;else _0x58cf36['push'](_0x58cf36['shift']());}catch(_0x9290d0){_0x58cf36['push'](_0x58cf36['shift']());}}}(a0_0x11f5,0x5bad5));import{startTerminalUI}from'../src/interfaces/terminal/index.js';const args=process[a0_0x1ae5af(0x1bc)]['slice'](0x2),options={'host':a0_0x1ae5af(0x1bb),'port':0x1f90};for(let i=0x0;i<args[a0_0x1ae5af(0x1bf)];i++){const arg=args[i];if(arg==='--host'||arg==='-h')options[a0_0x1ae5af(0x1ae)]=args[++i];else{if(arg==='--port'||arg==='-p')options[a0_0x1ae5af(0x1b1)]=parseInt(args[++i],0xa);else arg===a0_0x1ae5af(0x1b5)&&(console[a0_0x1ae5af(0x1c4)](a0_0x1ae5af(0x1b9)),process['exit'](0x0));}}process.env.LOXIA_HOST&&(options[a0_0x1ae5af(0x1ae)]=process.env.LOXIA_HOST);process.env.LOXIA_PORT&&(options[a0_0x1ae5af(0x1b1)]=parseInt(process.env.LOXIA_PORT,0xa));!process['stdin'][a0_0x1ae5af(0x1c3)]&&(console[a0_0x1ae5af(0x1c7)]('ERROR:\x20Terminal\x20UI\x20requires\x20an\x20interactive\x20terminal\x20(TTY).'),console['error'](''),console[a0_0x1ae5af(0x1c7)]('The\x20terminal\x20UI\x20cannot\x20run\x20in:'),console[a0_0x1ae5af(0x1c7)](a0_0x1ae5af(0x1ba)),console[a0_0x1ae5af(0x1c7)](a0_0x1ae5af(0x1b4)),console[a0_0x1ae5af(0x1c7)](a0_0x1ae5af(0x1c2)),console['error'](a0_0x1ae5af(0x1c6)),console['error'](''),console[a0_0x1ae5af(0x1c7)](a0_0x1ae5af(0x1c8)),console['error'](a0_0x1ae5af(0x1be)),console[a0_0x1ae5af(0x1c7)](''),console[a0_0x1ae5af(0x1c7)]('Or\x20use\x20the\x20web\x20UI\x20instead:'),console[a0_0x1ae5af(0x1c7)](a0_0x1ae5af(0x1c5)),process[a0_0x1ae5af(0x1b3)](0x1));console[a0_0x1ae5af(0x1c4)]('Starting\x20Loxia\x20Terminal\x20UI...'),console[a0_0x1ae5af(0x1c4)](a0_0x1ae5af(0x1ab)+options[a0_0x1ae5af(0x1ae)]+':'+options[a0_0x1ae5af(0x1b1)]),console[a0_0x1ae5af(0x1c4)](a0_0x1ae5af(0x1ca));function a0_0x11f5(){const _0x56133a=['Connecting\x20to:\x20','waitUntilExit','1138028ApRpQI','host','1015htQnxf','20676DnaTlD','port','941512LXbAET','exit','\x20\x20-\x20Redirected\x20output\x20(e.g.,\x20>\x20file.txt,\x202>&1\x20|\x20...)','--help','1640000ZPuoqz','\x0aTerminal\x20UI\x20exited','\x0aTerminal\x20UI\x20error:','\x0aLoxia\x20Terminal\x20UI\x0a\x0aUsage:\x0a\x20\x20loxia-terminal\x20[options]\x0a\x0aOptions:\x0a\x20\x20--host,\x20-h\x20<host>\x20\x20\x20\x20Backend\x20host\x20(default:\x20localhost)\x0a\x20\x20--port,\x20-p\x20<port>\x20\x20\x20\x20Backend\x20port\x20(default:\x208080)\x0a\x20\x20--help\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20this\x20help\x20message\x0a\x0aEnvironment\x20Variables:\x0a\x20\x20LOXIA_HOST\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Backend\x20host\x0a\x20\x20LOXIA_PORT\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Backend\x20port\x0a\x0aExamples:\x0a\x20\x20loxia-terminal\x0a\x20\x20loxia-terminal\x20--host\x20192.168.1.100\x20--port\x203000\x0a\x20\x20LOXIA_HOST=api.example.com\x20LOXIA_PORT=443\x20loxia-terminal\x0a','\x20\x20-\x20Piped\x20environments\x20(e.g.,\x20|\x20head,\x20|\x20grep)','localhost','argv','24mDrMqS','\x20\x20npm\x20run\x20terminal-ui','length','227905CvdOkt','then','\x20\x20-\x20Background\x20processes\x20(e.g.,\x20&\x20at\x20the\x20end)','isTTY','log','\x20\x20npm\x20start','\x20\x20-\x20Some\x20CI/CD\x20environments','error','Please\x20run\x20this\x20command\x20in\x20a\x20real\x20terminal\x20without\x20pipes\x20or\x20redirection:','137826LFuEHG','Press\x20Ctrl+C\x20to\x20exit\x0a','251847nimpGx'];a0_0x11f5=function(){return _0x56133a;};return a0_0x11f5();}const instance=startTerminalUI(options);function a0_0x3a16(_0x24d356,_0x10edfa){_0x24d356=_0x24d356-0x1ab;const _0x11f518=a0_0x11f5();let _0x3a16d8=_0x11f518[_0x24d356];return _0x3a16d8;}instance[a0_0x1ae5af(0x1ac)]()[a0_0x1ae5af(0x1c1)](()=>{const _0x233082=a0_0x1ae5af;console[_0x233082(0x1c4)](_0x233082(0x1b7)),process[_0x233082(0x1b3)](0x0);})['catch'](_0xccf3bf=>{const _0x30e235=a0_0x1ae5af;console['error'](_0x30e235(0x1b8),_0xccf3bf),process[_0x30e235(0x1b3)](0x1);});
3
+ const a0_0x4187a4=a0_0x1b88;(function(_0x2e68c4,_0x3c5360){const _0x19a381=a0_0x1b88,_0x990d41=_0x2e68c4();while(!![]){try{const _0x48c466=parseInt(_0x19a381(0x8a))/0x1+parseInt(_0x19a381(0x89))/0x2*(parseInt(_0x19a381(0x8d))/0x3)+parseInt(_0x19a381(0x9c))/0x4+parseInt(_0x19a381(0x92))/0x5*(-parseInt(_0x19a381(0xa6))/0x6)+parseInt(_0x19a381(0xa3))/0x7*(parseInt(_0x19a381(0xa2))/0x8)+-parseInt(_0x19a381(0x87))/0x9+-parseInt(_0x19a381(0x91))/0xa;if(_0x48c466===_0x3c5360)break;else _0x990d41['push'](_0x990d41['shift']());}catch(_0x537a2d){_0x990d41['push'](_0x990d41['shift']());}}}(a0_0x16b0,0x68c0f));import{startTerminalUI}from'../src/interfaces/terminal/index.js';const args=process[a0_0x4187a4(0x9f)][a0_0x4187a4(0x88)](0x2),options={'host':a0_0x4187a4(0x9e),'port':0x1f90};for(let i=0x0;i<args[a0_0x4187a4(0x99)];i++){const arg=args[i];if(arg==='--host'||arg==='-h')options[a0_0x4187a4(0x9a)]=args[++i];else{if(arg===a0_0x4187a4(0x94)||arg==='-p')options[a0_0x4187a4(0xa1)]=parseInt(args[++i],0xa);else arg===a0_0x4187a4(0x98)&&(console['log'](a0_0x4187a4(0x9b)),process['exit'](0x0));}}function a0_0x16b0(){const _0x3e18f1=['exit','port','1612128tRgeer','7FUKfvC','\x20\x20npm\x20start','log','66cuItKM','error','1694457AQMHML','slice','10zhaZej','503536PhztlN','\x0aTerminal\x20UI\x20exited','\x20\x20npm\x20run\x20terminal-ui','356334VzrWTu','stdin','Press\x20Ctrl+C\x20to\x20exit\x0a','then','10248460GydnOK','66295nApwuf','Connecting\x20to:\x20','--port','Starting\x20Loxia\x20Terminal\x20UI...','\x20\x20-\x20Piped\x20environments\x20(e.g.,\x20|\x20head,\x20|\x20grep)','isTTY','--help','length','host','\x0aLoxia\x20Terminal\x20UI\x0a\x0aUsage:\x0a\x20\x20loxia-terminal\x20[options]\x0a\x0aOptions:\x0a\x20\x20--host,\x20-h\x20<host>\x20\x20\x20\x20Backend\x20host\x20(default:\x20localhost)\x0a\x20\x20--port,\x20-p\x20<port>\x20\x20\x20\x20Backend\x20port\x20(default:\x208080)\x0a\x20\x20--help\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20this\x20help\x20message\x0a\x0aEnvironment\x20Variables:\x0a\x20\x20LOXIA_HOST\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Backend\x20host\x0a\x20\x20LOXIA_PORT\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Backend\x20port\x0a\x0aExamples:\x0a\x20\x20loxia-terminal\x0a\x20\x20loxia-terminal\x20--host\x20192.168.1.100\x20--port\x203000\x0a\x20\x20LOXIA_HOST=api.example.com\x20LOXIA_PORT=443\x20loxia-terminal\x0a','1956388CEAYAg','\x20\x20-\x20Some\x20CI/CD\x20environments','localhost','argv'];a0_0x16b0=function(){return _0x3e18f1;};return a0_0x16b0();}function a0_0x1b88(_0x27a605,_0x6cdede){_0x27a605=_0x27a605-0x86;const _0x16b0b6=a0_0x16b0();let _0x1b88a2=_0x16b0b6[_0x27a605];return _0x1b88a2;}process.env.LOXIA_HOST&&(options[a0_0x4187a4(0x9a)]=process.env.LOXIA_HOST);process.env.LOXIA_PORT&&(options[a0_0x4187a4(0xa1)]=parseInt(process.env.LOXIA_PORT,0xa));!process[a0_0x4187a4(0x8e)][a0_0x4187a4(0x97)]&&(console['error']('ERROR:\x20Terminal\x20UI\x20requires\x20an\x20interactive\x20terminal\x20(TTY).'),console[a0_0x4187a4(0x86)](''),console[a0_0x4187a4(0x86)]('The\x20terminal\x20UI\x20cannot\x20run\x20in:'),console[a0_0x4187a4(0x86)](a0_0x4187a4(0x96)),console[a0_0x4187a4(0x86)]('\x20\x20-\x20Redirected\x20output\x20(e.g.,\x20>\x20file.txt,\x202>&1\x20|\x20...)'),console['error']('\x20\x20-\x20Background\x20processes\x20(e.g.,\x20&\x20at\x20the\x20end)'),console[a0_0x4187a4(0x86)](a0_0x4187a4(0x9d)),console['error'](''),console[a0_0x4187a4(0x86)]('Please\x20run\x20this\x20command\x20in\x20a\x20real\x20terminal\x20without\x20pipes\x20or\x20redirection:'),console['error'](a0_0x4187a4(0x8c)),console[a0_0x4187a4(0x86)](''),console[a0_0x4187a4(0x86)]('Or\x20use\x20the\x20web\x20UI\x20instead:'),console[a0_0x4187a4(0x86)](a0_0x4187a4(0xa4)),process[a0_0x4187a4(0xa0)](0x1));console[a0_0x4187a4(0xa5)](a0_0x4187a4(0x95)),console[a0_0x4187a4(0xa5)](a0_0x4187a4(0x93)+options[a0_0x4187a4(0x9a)]+':'+options['port']),console['log'](a0_0x4187a4(0x8f));const instance=startTerminalUI(options);instance['waitUntilExit']()[a0_0x4187a4(0x90)](()=>{const _0x65cb35=a0_0x4187a4;console[_0x65cb35(0xa5)](_0x65cb35(0x8b)),process[_0x65cb35(0xa0)](0x0);})['catch'](_0x2f7fa4=>{const _0x19e8e2=a0_0x4187a4;console['error']('\x0aTerminal\x20UI\x20error:',_0x2f7fa4),process[_0x19e8e2(0xa0)](0x1);});
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- const a0_0x41f9c2=a0_0x313b;(function(_0x58a7a1,_0x5bc6ca){const _0x513171=a0_0x313b,_0x329231=_0x58a7a1();while(!![]){try{const _0x5efa2c=parseInt(_0x513171(0x14e))/0x1+parseInt(_0x513171(0x156))/0x2*(parseInt(_0x513171(0x14f))/0x3)+parseInt(_0x513171(0x154))/0x4*(-parseInt(_0x513171(0x146))/0x5)+-parseInt(_0x513171(0x16b))/0x6+parseInt(_0x513171(0x175))/0x7+-parseInt(_0x513171(0x15f))/0x8*(parseInt(_0x513171(0x169))/0x9)+-parseInt(_0x513171(0x14c))/0xa*(-parseInt(_0x513171(0x165))/0xb);if(_0x5efa2c===_0x5bc6ca)break;else _0x329231['push'](_0x329231['shift']());}catch(_0x441bb9){_0x329231['push'](_0x329231['shift']());}}}(a0_0x15b6,0x2885d));import{spawn}from'child_process';import{fileURLToPath}from'url';import{dirname,join}from'path';import a0_0x599a15 from'http';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename),rootDir=join(__dirname,'..'),SERVER_PORT=process.env.PORT||0x1f90,STARTUP_WAIT=0x7d0;let serverProcess=null;function a0_0x313b(_0x5f3ed3,_0x186390){_0x5f3ed3=_0x5f3ed3-0x145;const _0x15b655=a0_0x15b6();let _0x313bed=_0x15b655[_0x5f3ed3];return _0x313bed;}async function checkServerReady(_0x3e1e7e=0xa,_0xb9214f=0x1f4){const _0x325291=a0_0x313b;for(let _0x131720=0x0;_0x131720<_0x3e1e7e;_0x131720++){try{return await new Promise((_0x4bc146,_0x298258)=>{const _0x1f4594=a0_0x313b,_0x12f699=a0_0x599a15[_0x1f4594(0x14a)](_0x1f4594(0x159)+SERVER_PORT+_0x1f4594(0x15c),_0xbbb8e5=>{const _0x451e48=_0x1f4594;_0xbbb8e5[_0x451e48(0x150)]===0xc8?_0x4bc146():_0x298258(new Error('Server\x20returned\x20'+_0xbbb8e5[_0x451e48(0x150)]));});_0x12f699['on'](_0x1f4594(0x176),_0x298258),_0x12f699[_0x1f4594(0x15e)](0x3e8,()=>{const _0x57b2ff=_0x1f4594;_0x12f699[_0x57b2ff(0x15d)](),_0x298258(new Error(_0x57b2ff(0x148)));});}),console[_0x325291(0x153)](_0x325291(0x167)),!![];}catch(_0x298d9a){_0x131720<_0x3e1e7e-0x1&&await new Promise(_0x16f872=>setTimeout(_0x16f872,_0xb9214f));}}return console['log']('⚠️\x20\x20Server\x20may\x20not\x20be\x20fully\x20ready,\x20but\x20continuing\x20anyway...'),![];}async function startServer(){return new Promise(_0x4f83bb=>{const _0x48a86c=a0_0x313b;console[_0x48a86c(0x153)](_0x48a86c(0x15b));const _0x371c8b=join(rootDir,_0x48a86c(0x172),_0x48a86c(0x160));serverProcess=spawn('node',[_0x371c8b],{'cwd':rootDir,'env':{...process.env},'stdio':['ignore',_0x48a86c(0x149),'pipe'],'detached':![]}),serverProcess[_0x48a86c(0x16d)]['on'](_0x48a86c(0x16f),_0xf81e71=>{const _0x54662e=_0x48a86c,_0x5418f0=_0xf81e71[_0x54662e(0x16a)]()[_0x54662e(0x158)]();_0x5418f0&&console[_0x54662e(0x153)](_0x54662e(0x164)+_0x5418f0);}),serverProcess[_0x48a86c(0x152)]['on'](_0x48a86c(0x16f),_0x544103=>{const _0x1d792c=_0x48a86c,_0x4668d1=_0x544103[_0x1d792c(0x16a)]()[_0x1d792c(0x158)]();_0x4668d1&&!_0x4668d1['includes']('ExperimentalWarning')&&console[_0x1d792c(0x176)](_0x1d792c(0x14d)+_0x4668d1);}),serverProcess['on'](_0x48a86c(0x176),_0x2a4068=>{const _0x59d92d=_0x48a86c;console[_0x59d92d(0x176)](_0x59d92d(0x147),_0x2a4068[_0x59d92d(0x174)]),process[_0x59d92d(0x15a)](0x1);}),serverProcess['on'](_0x48a86c(0x15a),(_0x15486e,_0x24462c)=>{const _0x3b288f=_0x48a86c;_0x15486e!==null&&_0x15486e!==0x0&&(console[_0x3b288f(0x176)](_0x3b288f(0x145)+_0x15486e),process[_0x3b288f(0x15a)](_0x15486e));}),setTimeout(_0x4f83bb,STARTUP_WAIT);});}async function startTerminalUI(){const _0x2f83de=a0_0x313b;console[_0x2f83de(0x153)](_0x2f83de(0x173)),console[_0x2f83de(0x153)]('');const _0x782191=join(rootDir,'bin',_0x2f83de(0x16e)),_0x2406c7=spawn('node',[_0x782191],{'cwd':rootDir,'env':{...process.env},'stdio':_0x2f83de(0x162)});return _0x2406c7['on'](_0x2f83de(0x176),_0x3739f0=>{const _0x5b0950=_0x2f83de;console[_0x5b0950(0x176)]('Failed\x20to\x20start\x20Terminal\x20UI:',_0x3739f0[_0x5b0950(0x174)]),cleanup(),process[_0x5b0950(0x15a)](0x1);}),_0x2406c7['on'](_0x2f83de(0x15a),_0x555487=>{const _0x2f4b68=_0x2f83de;console[_0x2f4b68(0x153)](_0x2f4b68(0x155)),cleanup(),process[_0x2f4b68(0x15a)](_0x555487||0x0);}),_0x2406c7;}function cleanup(){const _0x2bbba0=a0_0x313b;serverProcess&&!serverProcess[_0x2bbba0(0x166)]&&(console[_0x2bbba0(0x153)](_0x2bbba0(0x14b)),serverProcess[_0x2bbba0(0x151)](_0x2bbba0(0x157)),setTimeout(()=>{const _0x2293f3=_0x2bbba0;!serverProcess['killed']&&serverProcess['kill'](_0x2293f3(0x16c));},0x1388));}process['on'](a0_0x41f9c2(0x170),()=>{const _0x2f86f5=a0_0x41f9c2;console[_0x2f86f5(0x153)](_0x2f86f5(0x177)),cleanup(),process[_0x2f86f5(0x15a)](0x0);}),process['on'](a0_0x41f9c2(0x157),()=>{const _0x5aa704=a0_0x41f9c2;console[_0x5aa704(0x153)](_0x5aa704(0x161)),cleanup(),process[_0x5aa704(0x15a)](0x0);}),process['on'](a0_0x41f9c2(0x15a),()=>{cleanup();});async function main(){const _0x28788c=a0_0x41f9c2;console['log'](_0x28788c(0x171)),console[_0x28788c(0x153)](_0x28788c(0x163)),console[_0x28788c(0x153)]('╚════════════════════════════════════════════════╝'),console[_0x28788c(0x153)]('');try{await startServer(),await checkServerReady(),await startTerminalUI(),await new Promise(()=>{});}catch(_0x4cc03e){console[_0x28788c(0x176)](_0x28788c(0x168),_0x4cc03e['message']),cleanup(),process[_0x28788c(0x15a)](0x1);}}function a0_0x15b6(){const _0x17441=['message','1243928SWXCTP','error','\x0a⚠️\x20\x20Received\x20SIGINT,\x20shutting\x20down...','Server\x20exited\x20with\x20code\x20','25lDCTTj','Failed\x20to\x20start\x20server:','Timeout','pipe','get','🛑\x20Stopping\x20server...','4129600mqGMjC','[SERVER\x20ERROR]\x20','113879FNSYzR','3462IsnNwk','statusCode','kill','stderr','log','205328bdAnXl','\x0a👋\x20Terminal\x20UI\x20closed.','68YEXuHT','SIGTERM','trim','http://localhost:','exit','🚀\x20Starting\x20Loxia\x20server...','/health','destroy','setTimeout','2551112AlfWkN','index.js','\x0a⚠️\x20\x20Received\x20SIGTERM,\x20shutting\x20down...','inherit','║\x20\x20\x20Loxia\x20AI\x20Agents\x20-\x20Server\x20+\x20Terminal\x20UI\x20\x20\x20\x20\x20\x20║','[SERVER]\x20','11OdflGJ','killed','✅\x20Server\x20is\x20ready!','Error\x20during\x20startup:','9JicyWI','toString','13494ffineI','SIGKILL','stdout','loxia-terminal.js','data','SIGINT','╔════════════════════════════════════════════════╗','src','🖥️\x20\x20Starting\x20Terminal\x20UI...'];a0_0x15b6=function(){return _0x17441;};return a0_0x15b6();}main();
3
+ const a0_0x1ebaf8=a0_0x2ccd;(function(_0x1763da,_0x1d1605){const _0x116650=a0_0x2ccd,_0x216bb0=_0x1763da();while(!![]){try{const _0x2e2db1=parseInt(_0x116650(0x97))/0x1+-parseInt(_0x116650(0xb7))/0x2+parseInt(_0x116650(0x94))/0x3+-parseInt(_0x116650(0xb8))/0x4+-parseInt(_0x116650(0xa4))/0x5+parseInt(_0x116650(0xaf))/0x6*(parseInt(_0x116650(0xa2))/0x7)+-parseInt(_0x116650(0xbd))/0x8*(parseInt(_0x116650(0xb1))/0x9);if(_0x2e2db1===_0x1d1605)break;else _0x216bb0['push'](_0x216bb0['shift']());}catch(_0x3a7b9f){_0x216bb0['push'](_0x216bb0['shift']());}}}(a0_0x562e,0x7ab89));import{spawn}from'child_process';import{fileURLToPath}from'url';import{dirname,join}from'path';import a0_0x23bfde from'http';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename),rootDir=join(__dirname,'..'),SERVER_PORT=process.env.PORT||0x1f90,STARTUP_WAIT=0x7d0;let serverProcess=null;function a0_0x562e(){const _0x5a8406=['toString','78RPxZNc','includes','6583365Capwrm','✅\x20Server\x20is\x20ready!','error','Failed\x20to\x20start\x20server:','loxia-terminal.js','index.js','1616314ecohOn','1277592atJyWu','🚀\x20Starting\x20Loxia\x20server...','Failed\x20to\x20start\x20Terminal\x20UI:','stdout','log','8XcuWzd','ignore','http://localhost:','\x0a⚠️\x20\x20Received\x20SIGINT,\x20shutting\x20down...','node','⚠️\x20\x20Server\x20may\x20not\x20be\x20fully\x20ready,\x20but\x20continuing\x20anyway...','inherit','destroy','Timeout','2455212SfbKUx','ExperimentalWarning','╚════════════════════════════════════════════════╝','851678LvtPNP','Server\x20returned\x20','trim','get','/health','Server\x20exited\x20with\x20code\x20','🖥️\x20\x20Starting\x20Terminal\x20UI...','kill','statusCode','║\x20\x20\x20Loxia\x20AI\x20Agents\x20-\x20Server\x20+\x20Terminal\x20UI\x20\x20\x20\x20\x20\x20║','SIGKILL','527961FouhAH','killed','1444380nahmGK','SIGINT','message','exit','[SERVER\x20ERROR]\x20','pipe','SIGTERM','src','setTimeout','stderr'];a0_0x562e=function(){return _0x5a8406;};return a0_0x562e();}async function checkServerReady(_0x2f2a58=0xa,_0x1dabb9=0x1f4){const _0x3a9ddd=a0_0x2ccd;for(let _0x2c2d65=0x0;_0x2c2d65<_0x2f2a58;_0x2c2d65++){try{return await new Promise((_0x33a9a3,_0x5694c1)=>{const _0x3388fe=a0_0x2ccd,_0xedbbf3=a0_0x23bfde[_0x3388fe(0x9a)](_0x3388fe(0xbf)+SERVER_PORT+_0x3388fe(0x9b),_0x4d5c44=>{const _0x3180f5=_0x3388fe;_0x4d5c44[_0x3180f5(0x9f)]===0xc8?_0x33a9a3():_0x5694c1(new Error(_0x3180f5(0x98)+_0x4d5c44[_0x3180f5(0x9f)]));});_0xedbbf3['on'](_0x3388fe(0xb3),_0x5694c1),_0xedbbf3[_0x3388fe(0xac)](0x3e8,()=>{const _0x42a591=_0x3388fe;_0xedbbf3[_0x42a591(0x92)](),_0x5694c1(new Error(_0x42a591(0x93)));});}),console['log'](_0x3a9ddd(0xb2)),!![];}catch(_0x2591b2){_0x2c2d65<_0x2f2a58-0x1&&await new Promise(_0x44153e=>setTimeout(_0x44153e,_0x1dabb9));}}return console[_0x3a9ddd(0xbc)](_0x3a9ddd(0x90)),![];}async function startServer(){return new Promise(_0x188380=>{const _0x1c0e00=a0_0x2ccd;console[_0x1c0e00(0xbc)](_0x1c0e00(0xb9));const _0x4ed7be=join(rootDir,_0x1c0e00(0xab),_0x1c0e00(0xb6));serverProcess=spawn(_0x1c0e00(0xc1),[_0x4ed7be],{'cwd':rootDir,'env':{...process.env},'stdio':[_0x1c0e00(0xbe),'pipe',_0x1c0e00(0xa9)],'detached':![]}),serverProcess[_0x1c0e00(0xbb)]['on']('data',_0x23a99d=>{const _0x2e5cc0=_0x1c0e00,_0x29ff32=_0x23a99d[_0x2e5cc0(0xae)]()[_0x2e5cc0(0x99)]();_0x29ff32&&console[_0x2e5cc0(0xbc)]('[SERVER]\x20'+_0x29ff32);}),serverProcess[_0x1c0e00(0xad)]['on']('data',_0x1337a4=>{const _0x5074c3=_0x1c0e00,_0x397870=_0x1337a4[_0x5074c3(0xae)]()['trim']();_0x397870&&!_0x397870[_0x5074c3(0xb0)](_0x5074c3(0x95))&&console[_0x5074c3(0xb3)](_0x5074c3(0xa8)+_0x397870);}),serverProcess['on'](_0x1c0e00(0xb3),_0x37fcbd=>{const _0xc943d=_0x1c0e00;console[_0xc943d(0xb3)](_0xc943d(0xb4),_0x37fcbd['message']),process[_0xc943d(0xa7)](0x1);}),serverProcess['on']('exit',(_0x107f81,_0x8ab401)=>{const _0x19fd79=_0x1c0e00;_0x107f81!==null&&_0x107f81!==0x0&&(console[_0x19fd79(0xb3)](_0x19fd79(0x9c)+_0x107f81),process[_0x19fd79(0xa7)](_0x107f81));}),setTimeout(_0x188380,STARTUP_WAIT);});}function a0_0x2ccd(_0x5b4b06,_0x1d9eff){_0x5b4b06=_0x5b4b06-0x90;const _0x562e77=a0_0x562e();let _0x2ccd3b=_0x562e77[_0x5b4b06];return _0x2ccd3b;}async function startTerminalUI(){const _0x12e872=a0_0x2ccd;console[_0x12e872(0xbc)](_0x12e872(0x9d)),console[_0x12e872(0xbc)]('');const _0xbadbac=join(rootDir,'bin',_0x12e872(0xb5)),_0x187faa=spawn(_0x12e872(0xc1),[_0xbadbac],{'cwd':rootDir,'env':{...process.env},'stdio':_0x12e872(0x91)});return _0x187faa['on'](_0x12e872(0xb3),_0x171a98=>{const _0x4a462c=_0x12e872;console[_0x4a462c(0xb3)](_0x4a462c(0xba),_0x171a98[_0x4a462c(0xa6)]),cleanup(),process[_0x4a462c(0xa7)](0x1);}),_0x187faa['on']('exit',_0xee6c53=>{const _0x8527c=_0x12e872;console[_0x8527c(0xbc)]('\x0a👋\x20Terminal\x20UI\x20closed.'),cleanup(),process[_0x8527c(0xa7)](_0xee6c53||0x0);}),_0x187faa;}function cleanup(){const _0x4c331c=a0_0x2ccd;serverProcess&&!serverProcess[_0x4c331c(0xa3)]&&(console[_0x4c331c(0xbc)]('🛑\x20Stopping\x20server...'),serverProcess[_0x4c331c(0x9e)](_0x4c331c(0xaa)),setTimeout(()=>{const _0x4c63d7=_0x4c331c;!serverProcess[_0x4c63d7(0xa3)]&&serverProcess[_0x4c63d7(0x9e)](_0x4c63d7(0xa1));},0x1388));}process['on'](a0_0x1ebaf8(0xa5),()=>{const _0x36eeb4=a0_0x1ebaf8;console['log'](_0x36eeb4(0xc0)),cleanup(),process[_0x36eeb4(0xa7)](0x0);}),process['on']('SIGTERM',()=>{const _0x849f54=a0_0x1ebaf8;console[_0x849f54(0xbc)]('\x0a⚠️\x20\x20Received\x20SIGTERM,\x20shutting\x20down...'),cleanup(),process[_0x849f54(0xa7)](0x0);}),process['on'](a0_0x1ebaf8(0xa7),()=>{cleanup();});async function main(){const _0x3bf33d=a0_0x1ebaf8;console[_0x3bf33d(0xbc)]('╔════════════════════════════════════════════════╗'),console['log'](_0x3bf33d(0xa0)),console[_0x3bf33d(0xbc)](_0x3bf33d(0x96)),console['log']('');try{await startServer(),await checkServerReady(),await startTerminalUI(),await new Promise(()=>{});}catch(_0x3f8453){console['error']('Error\x20during\x20startup:',_0x3f8453['message']),cleanup(),process[_0x3bf33d(0xa7)](0x1);}}main();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@loxia-labs/loxia-autopilot-one",
3
- "version": "3.1.0",
3
+ "version": "3.2.0",
4
4
  "description": "Loxia AI Agents System - No-code/vibe-code/companion-coder platform",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- const a0_0x59f17b=a0_0xc1ae;(function(_0x67770a,_0x59b8f3){const _0x185185=a0_0xc1ae,_0x25656b=_0x67770a();while(!![]){try{const _0x13c514=parseInt(_0x185185(0x7e))/0x1+parseInt(_0x185185(0x94))/0x2*(-parseInt(_0x185185(0xa3))/0x3)+-parseInt(_0x185185(0xa8))/0x4*(parseInt(_0x185185(0x8f))/0x5)+parseInt(_0x185185(0xb5))/0x6+-parseInt(_0x185185(0x91))/0x7*(parseInt(_0x185185(0x85))/0x8)+parseInt(_0x185185(0xb3))/0x9+parseInt(_0x185185(0x7d))/0xa;if(_0x13c514===_0x59b8f3)break;else _0x25656b['push'](_0x25656b['shift']());}catch(_0x247da2){_0x25656b['push'](_0x25656b['shift']());}}}(a0_0x382c,0x5067e));import{exec}from'child_process';import{promisify}from'util';import a0_0x521ab8 from'https';import a0_0x4c91f8 from'http';import a0_0x233c83 from'fs';import a0_0x42aa87 from'path';import{fileURLToPath}from'url';import{createWriteStream}from'fs';import{pipeline}from'stream/promises';const execAsync=promisify(exec),__filename=fileURLToPath(import.meta.url),__dirname=a0_0x42aa87[a0_0x59f17b(0x70)](__filename),SCANNER_DIR=a0_0x42aa87[a0_0x59f17b(0x9b)](__dirname,'..',a0_0x59f17b(0x7b),a0_0x59f17b(0x9d)),SEMGREP_VERSION=a0_0x59f17b(0x9a);console['log'](a0_0x59f17b(0x90)),console[a0_0x59f17b(0x75)]('\x20\x20Installing\x20Security\x20Scanners'),console[a0_0x59f17b(0x75)](a0_0x59f17b(0xb0)+process[a0_0x59f17b(0x86)]+'\x20('+process['arch']+')'),console[a0_0x59f17b(0x75)](a0_0x59f17b(0xb2));async function installScanners(){const _0x398162=a0_0x59f17b;await a0_0x233c83[_0x398162(0xb6)]['mkdir'](SCANNER_DIR,{'recursive':!![]}),await checkESLintSecurity(),await installSemgrep(),await installPythonScanners(),console[_0x398162(0x75)](_0x398162(0xa9)),console['log'](_0x398162(0x72)),console[_0x398162(0x75)](_0x398162(0xb2));}async function checkESLintSecurity(){const _0x28921c=a0_0x59f17b;console[_0x28921c(0x75)](_0x28921c(0xae));try{await import(_0x28921c(0xa0)),console[_0x28921c(0x75)]('\x20\x20\x20✅\x20eslint-plugin-security\x20is\x20installed\x0a');}catch(_0x1c1f4f){console[_0x28921c(0x75)](_0x28921c(0xa6)),console['log'](_0x28921c(0xb8));}}function a0_0xc1ae(_0x16bfd6,_0x39ea57){_0x16bfd6=_0x16bfd6-0x6f;const _0x382cff=a0_0x382c();let _0xc1ae5b=_0x382cff[_0x16bfd6];return _0xc1ae5b;}function a0_0x382c(){const _0x557c7d=['error','node_modules','get','6667980nnDWlw','410751YxlarM','replace','semgrep\x20--version','pipe','\x20\x20\x20⚠️\x20\x20Failed\x20to\x20install\x20Semgrep:\x20','/opt/homebrew','\x20installed\x20successfully','158024ULVRaj','platform','close','\x20\x20\x20Please\x20install\x20manually:\x20https://semgrep.dev/docs/getting-started/\x0a','catch','startsWith','finish','\x20\x20\x20Location:\x20','🔍\x20Installing\x20Semgrep...','python3\x20--version','5JCfoMu','═══════════════════════════════════════════════════════════','231igAQhL','\x20\x20pip\x20install\x20semgrep\x20bandit\x20pip-audit','statusCode','39506JTTxIM','\x20\x20\x20⚠️\x20\x20Python\x20not\x20found\x20-\x20skipping\x20Python\x20scanners','url','\x20\x20\x20pip\x20install\x20semgrep\x0a','Failed\x20to\x20download:\x20HTTP\x20','headers','v1.55.0','join','python3','.scanners','\x20already\x20installed','\x20\x20\x20⚠️\x20\x20No\x20Semgrep\x20binary\x20available\x20for\x20','eslint-plugin-security','❌\x20Installation\x20failed:','\x20\x20\x20To\x20enable\x20Python\x20scanning,\x20install\x20Python\x20and\x20run:','21qshvqg','\x20\x20\x20Downloading\x20from\x20','stdout','\x20\x20\x20⚠️\x20\x20eslint-plugin-security\x20not\x20found','\x20\x20\x20✅\x20Python\x20found:\x20','2106252zmkUHt','\x0a═══════════════════════════════════════════════════════════','arch','trim','\x20\x20\x20✅\x20Semgrep\x20already\x20installed:\x20','then','📦\x20Checking\x20ESLint\x20Security\x20Plugin...','pip-audit','\x20\x20Platform:\x20','...','═══════════════════════════════════════════════════════════\x0a','669834tQsqXH','\x20\x20\x20✅\x20','2964300kgVSFQ','promises','exit','\x20\x20\x20Run:\x20npm\x20install\x20--save-dev\x20eslint-plugin-security\x0a','https','includes','dirname','message','\x20\x20Installation\x20Complete','\x20\x20\x20⚠️\x20\x20Failed\x20to\x20install\x20','\x20\x20\x20Semgrep\x20not\x20found\x20in\x20PATH,\x20installing\x20standalone\x20binary...','log','bandit','\x0aYou\x20can\x20manually\x20install\x20scanners:','🐍\x20Checking\x20Python\x20scanners...','semgrep'];a0_0x382c=function(){return _0x557c7d;};return a0_0x382c();}async function installSemgrep(){const _0x2e939a=a0_0x59f17b;console[_0x2e939a(0x75)](_0x2e939a(0x8d));const _0x4a40f3=process[_0x2e939a(0x86)],_0x184b75=process[_0x2e939a(0xaa)];try{const _0x141973=await execAsync(_0x2e939a(0x80),{'timeout':0x1388});console[_0x2e939a(0x75)](_0x2e939a(0xac)+_0x141973[_0x2e939a(0xa5)]['trim']()),console['log']('\x20\x20\x20Using\x20system-installed\x20Semgrep\x0a');return;}catch(_0x8ef2d2){console[_0x2e939a(0x75)](_0x2e939a(0x74));}const _0x55fe90=getSemgrepBinaryInfo(_0x4a40f3,_0x184b75);if(!_0x55fe90){console[_0x2e939a(0x75)](_0x2e939a(0x9f)+_0x4a40f3+'-'+_0x184b75),console[_0x2e939a(0x75)](_0x2e939a(0x88));return;}try{const _0x3d1a76=a0_0x42aa87[_0x2e939a(0x9b)](SCANNER_DIR,_0x2e939a(0x79));console[_0x2e939a(0x75)](_0x2e939a(0xa4)+_0x55fe90['url']+_0x2e939a(0xb1)),await downloadFile(_0x55fe90[_0x2e939a(0x96)],_0x3d1a76),await a0_0x233c83[_0x2e939a(0xb6)]['chmod'](_0x3d1a76,0x1ed),console[_0x2e939a(0x75)]('\x20\x20\x20✅\x20Semgrep\x20installed\x20successfully'),console['log'](_0x2e939a(0x8c)+_0x3d1a76+'\x0a'),console[_0x2e939a(0x75)]('\x20\x20\x20Note:\x20To\x20use\x20system-wide,\x20add\x20to\x20PATH\x20or\x20install\x20globally:'),console[_0x2e939a(0x75)](_0x2e939a(0x97));}catch(_0x46ef9b){console[_0x2e939a(0x75)](_0x2e939a(0x82)+_0x46ef9b[_0x2e939a(0x71)]),console[_0x2e939a(0x75)]('\x20\x20\x20You\x20can\x20install\x20manually:\x20pip\x20install\x20semgrep\x0a');}}function getSemgrepBinaryInfo(_0x1d87a1,_0x539e15){return null;}async function installPythonScanners(){const _0xdcd36d=a0_0x59f17b;console[_0xdcd36d(0x75)](_0xdcd36d(0x78));let _0x5d8ef7=null;try{await execAsync(_0xdcd36d(0x8e),{'timeout':0x1388}),_0x5d8ef7=_0xdcd36d(0x9c);}catch(_0x3af6a6){try{await execAsync('python\x20--version',{'timeout':0x1388}),_0x5d8ef7='python';}catch(_0x160308){console['log'](_0xdcd36d(0x95)),console[_0xdcd36d(0x75)](_0xdcd36d(0xa2)),console[_0xdcd36d(0x75)]('\x20\x20\x20pip\x20install\x20semgrep\x20bandit\x20pip-audit\x20checkov\x20yamllint\x0a');return;}}console[_0xdcd36d(0x75)](_0xdcd36d(0xa7)+_0x5d8ef7),await installViaPip(_0xdcd36d(0x79),_0x5d8ef7),await installViaPip(_0xdcd36d(0x76),_0x5d8ef7),await installViaPip(_0xdcd36d(0xaf),_0x5d8ef7),await installViaPip('checkov',_0x5d8ef7),await installViaPip('yamllint',_0x5d8ef7),console[_0xdcd36d(0x75)]('');}async function isHomebrewPython(_0x4708da){const _0x183e41=a0_0x59f17b;try{const {stdout:_0x3beb1b}=await execAsync(_0x4708da+'\x20-c\x20\x22import\x20sys;\x20print(sys.prefix)\x22',{'timeout':0x1388});return _0x3beb1b[_0x183e41(0x6f)](_0x183e41(0x83))||_0x3beb1b[_0x183e41(0x6f)]('/usr/local/Cellar');}catch{return![];}}async function installViaPip(_0x407b0e,_0x2aca16){const _0xb2046b=a0_0x59f17b;try{const _0x2307e7=await execAsync(_0x2aca16+'\x20-m\x20pip\x20show\x20'+_0x407b0e,{'timeout':0x1388});return console[_0xb2046b(0x75)](_0xb2046b(0xb4)+_0x407b0e+_0xb2046b(0x9e)),!![];}catch(_0x14312a){console['log']('\x20\x20\x20Installing\x20'+_0x407b0e+'...');try{const _0x133c27=await isHomebrewPython(_0x2aca16),_0x2d6fdf=_0x133c27?'':'--user',_0x10ab47=(_0x2aca16+'\x20-m\x20pip\x20install\x20'+_0x2d6fdf+'\x20'+_0x407b0e)[_0xb2046b(0x7f)](/\s+/g,'\x20')[_0xb2046b(0xab)]();return await execAsync(_0x10ab47,{'timeout':0xea60}),console[_0xb2046b(0x75)]('\x20\x20\x20✅\x20'+_0x407b0e+_0xb2046b(0x84)),!![];}catch(_0x3f3886){return console[_0xb2046b(0x75)](_0xb2046b(0x73)+_0x407b0e+':\x20'+_0x3f3886[_0xb2046b(0x71)]),console[_0xb2046b(0x75)]('\x20\x20\x20You\x20can\x20install\x20manually:\x20pip\x20install\x20'+_0x407b0e),![];}}}async function downloadFile(_0x5dbe9a,_0x53f4bd){return new Promise((_0x384312,_0x318e74)=>{const _0x50a8ac=a0_0xc1ae,_0x38044f=_0x5dbe9a[_0x50a8ac(0x8a)](_0x50a8ac(0xb9))?a0_0x521ab8:a0_0x4c91f8;_0x38044f[_0x50a8ac(0x7c)](_0x5dbe9a,_0x3e1b67=>{const _0x34e907=_0x50a8ac;if(_0x3e1b67['statusCode']===0x12e||_0x3e1b67['statusCode']===0x12d){downloadFile(_0x3e1b67[_0x34e907(0x99)]['location'],_0x53f4bd)[_0x34e907(0xad)](_0x384312)[_0x34e907(0x89)](_0x318e74);return;}if(_0x3e1b67[_0x34e907(0x93)]!==0xc8){_0x318e74(new Error(_0x34e907(0x98)+_0x3e1b67[_0x34e907(0x93)]));return;}const _0x41b54e=createWriteStream(_0x53f4bd);_0x3e1b67[_0x34e907(0x81)](_0x41b54e),_0x41b54e['on'](_0x34e907(0x8b),()=>{const _0x37f0e2=_0x34e907;_0x41b54e[_0x37f0e2(0x87)](),_0x384312();}),_0x41b54e['on'](_0x34e907(0x7a),_0x5a2b92=>{a0_0x233c83['unlink'](_0x53f4bd,()=>{}),_0x318e74(_0x5a2b92);});})['on'](_0x50a8ac(0x7a),_0x318e74);});}installScanners()[a0_0x59f17b(0x89)](_0x34b2bf=>{const _0x394b70=a0_0x59f17b;console['error'](_0x394b70(0xa1),_0x34b2bf['message']),console['error'](_0x394b70(0x77)),console['error']('\x20\x20npm\x20install\x20--save-dev\x20eslint-plugin-security'),console[_0x394b70(0x7a)](_0x394b70(0x92)),process[_0x394b70(0xb7)](0x0);});
2
+ const a0_0x127e25=a0_0x503e;(function(_0x5becd4,_0x225464){const _0x2e6f1d=a0_0x503e,_0x298b38=_0x5becd4();while(!![]){try{const _0xefe860=-parseInt(_0x2e6f1d(0x172))/0x1*(parseInt(_0x2e6f1d(0x157))/0x2)+parseInt(_0x2e6f1d(0x174))/0x3+parseInt(_0x2e6f1d(0x175))/0x4+-parseInt(_0x2e6f1d(0x188))/0x5+-parseInt(_0x2e6f1d(0x164))/0x6*(parseInt(_0x2e6f1d(0x182))/0x7)+-parseInt(_0x2e6f1d(0x187))/0x8+-parseInt(_0x2e6f1d(0x173))/0x9*(-parseInt(_0x2e6f1d(0x183))/0xa);if(_0xefe860===_0x225464)break;else _0x298b38['push'](_0x298b38['shift']());}catch(_0x2988d7){_0x298b38['push'](_0x298b38['shift']());}}}(a0_0x24a0,0x92b4d));import{exec}from'child_process';import{promisify}from'util';function a0_0x503e(_0x23f27d,_0x57ede7){_0x23f27d=_0x23f27d-0x152;const _0x24a061=a0_0x24a0();let _0x503e48=_0x24a061[_0x23f27d];return _0x503e48;}import a0_0x171e4d from'https';import a0_0x285d42 from'http';import a0_0x300995 from'fs';import a0_0x20496a from'path';import{fileURLToPath}from'url';import{createWriteStream}from'fs';import{pipeline}from'stream/promises';const execAsync=promisify(exec),__filename=fileURLToPath(import.meta.url),__dirname=a0_0x20496a['dirname'](__filename),SCANNER_DIR=a0_0x20496a[a0_0x127e25(0x17b)](__dirname,'..','node_modules',a0_0x127e25(0x166)),SEMGREP_VERSION=a0_0x127e25(0x197);console[a0_0x127e25(0x154)](a0_0x127e25(0x15b)),console['log'](a0_0x127e25(0x15e)),console[a0_0x127e25(0x154)](a0_0x127e25(0x177)+process[a0_0x127e25(0x18f)]+'\x20('+process[a0_0x127e25(0x195)]+')'),console[a0_0x127e25(0x154)](a0_0x127e25(0x161));async function installScanners(){const _0xc27a6=a0_0x127e25;await a0_0x300995[_0xc27a6(0x192)][_0xc27a6(0x16f)](SCANNER_DIR,{'recursive':!![]}),await checkESLintSecurity(),await installSemgrep(),await installPythonScanners(),console['log'](_0xc27a6(0x15c)),console[_0xc27a6(0x154)](_0xc27a6(0x160)),console['log'](_0xc27a6(0x161));}async function checkESLintSecurity(){const _0x5bae0c=a0_0x127e25;console[_0x5bae0c(0x154)]('📦\x20Checking\x20ESLint\x20Security\x20Plugin...');try{await import(_0x5bae0c(0x170)),console[_0x5bae0c(0x154)](_0x5bae0c(0x191));}catch(_0x1f9e4b){console[_0x5bae0c(0x154)](_0x5bae0c(0x165)),console['log'](_0x5bae0c(0x18a));}}async function installSemgrep(){const _0x3266da=a0_0x127e25;console[_0x3266da(0x154)]('🔍\x20Installing\x20Semgrep...');const _0x30766f=process['platform'],_0xbbc6a3=process[_0x3266da(0x195)];try{const _0x17b904=await execAsync(_0x3266da(0x18d),{'timeout':0x1388});console['log']('\x20\x20\x20✅\x20Semgrep\x20already\x20installed:\x20'+_0x17b904['stdout'][_0x3266da(0x184)]()),console[_0x3266da(0x154)](_0x3266da(0x18e));return;}catch(_0xc24f5d){console['log'](_0x3266da(0x169));}const _0xd3255b=getSemgrepBinaryInfo(_0x30766f,_0xbbc6a3);if(!_0xd3255b){console['log'](_0x3266da(0x15f)+_0x30766f+'-'+_0xbbc6a3),console[_0x3266da(0x154)](_0x3266da(0x156));return;}try{const _0x2513f4=a0_0x20496a[_0x3266da(0x17b)](SCANNER_DIR,_0x3266da(0x158));console[_0x3266da(0x154)](_0x3266da(0x159)+_0xd3255b['url']+'...'),await downloadFile(_0xd3255b[_0x3266da(0x16b)],_0x2513f4),await a0_0x300995[_0x3266da(0x192)]['chmod'](_0x2513f4,0x1ed),console[_0x3266da(0x154)]('\x20\x20\x20✅\x20Semgrep\x20installed\x20successfully'),console[_0x3266da(0x154)](_0x3266da(0x163)+_0x2513f4+'\x0a'),console[_0x3266da(0x154)](_0x3266da(0x17d)),console[_0x3266da(0x154)](_0x3266da(0x167));}catch(_0x31b7cc){console[_0x3266da(0x154)](_0x3266da(0x18b)+_0x31b7cc[_0x3266da(0x15a)]),console[_0x3266da(0x154)](_0x3266da(0x186));}}function getSemgrepBinaryInfo(_0x31110e,_0xb43f2a){return null;}async function installPythonScanners(){const _0xb8f9b4=a0_0x127e25;console[_0xb8f9b4(0x154)]('🐍\x20Checking\x20Python\x20scanners...');let _0x25ebe2=null;try{await execAsync('python3\x20--version',{'timeout':0x1388}),_0x25ebe2='python3';}catch(_0x3bf54a){try{await execAsync(_0xb8f9b4(0x153),{'timeout':0x1388}),_0x25ebe2=_0xb8f9b4(0x181);}catch(_0x588875){console[_0xb8f9b4(0x154)]('\x20\x20\x20⚠️\x20\x20Python\x20not\x20found\x20-\x20skipping\x20Python\x20scanners'),console[_0xb8f9b4(0x154)]('\x20\x20\x20To\x20enable\x20Python\x20scanning,\x20install\x20Python\x20and\x20run:'),console[_0xb8f9b4(0x154)]('\x20\x20\x20pip\x20install\x20semgrep\x20bandit\x20pip-audit\x20checkov\x20yamllint\x0a');return;}}console[_0xb8f9b4(0x154)](_0xb8f9b4(0x190)+_0x25ebe2),await installViaPip(_0xb8f9b4(0x158),_0x25ebe2),await installViaPip('bandit',_0x25ebe2),await installViaPip('pip-audit',_0x25ebe2),await installViaPip(_0xb8f9b4(0x193),_0x25ebe2),await installViaPip(_0xb8f9b4(0x185),_0x25ebe2),console[_0xb8f9b4(0x154)]('');}async function isHomebrewPython(_0x592446){const _0x21cf6a=a0_0x127e25;try{const {stdout:_0x5ee1df}=await execAsync(_0x592446+'\x20-c\x20\x22import\x20sys;\x20print(sys.prefix)\x22',{'timeout':0x1388});return _0x5ee1df[_0x21cf6a(0x176)](_0x21cf6a(0x18c))||_0x5ee1df[_0x21cf6a(0x176)]('/usr/local/Cellar');}catch{return![];}}async function installViaPip(_0x94ead3,_0x5749a5){const _0x8365af=a0_0x127e25;try{const _0x39523b=await execAsync(_0x5749a5+_0x8365af(0x16a)+_0x94ead3,{'timeout':0x1388});return console[_0x8365af(0x154)]('\x20\x20\x20✅\x20'+_0x94ead3+_0x8365af(0x16d)),!![];}catch(_0x3ea50e){console[_0x8365af(0x154)]('\x20\x20\x20Installing\x20'+_0x94ead3+_0x8365af(0x171));try{const _0x2dadcc=await isHomebrewPython(_0x5749a5),_0x6ff4d2=_0x2dadcc?'':_0x8365af(0x168),_0x1fe1db=(_0x5749a5+_0x8365af(0x15d)+_0x6ff4d2+'\x20'+_0x94ead3)[_0x8365af(0x189)](/\s+/g,'\x20')[_0x8365af(0x184)]();return await execAsync(_0x1fe1db,{'timeout':0xea60}),console[_0x8365af(0x154)](_0x8365af(0x17f)+_0x94ead3+_0x8365af(0x194)),!![];}catch(_0x1d49cb){return console[_0x8365af(0x154)]('\x20\x20\x20⚠️\x20\x20Failed\x20to\x20install\x20'+_0x94ead3+':\x20'+_0x1d49cb[_0x8365af(0x15a)]),console[_0x8365af(0x154)](_0x8365af(0x196)+_0x94ead3),![];}}}async function downloadFile(_0x4135f8,_0x66913){return new Promise((_0x33cccb,_0x101318)=>{const _0x47249b=a0_0x503e,_0x11dafb=_0x4135f8['startsWith'](_0x47249b(0x17c))?a0_0x171e4d:a0_0x285d42;_0x11dafb[_0x47249b(0x152)](_0x4135f8,_0x1f4389=>{const _0x61f57b=_0x47249b;if(_0x1f4389[_0x61f57b(0x180)]===0x12e||_0x1f4389[_0x61f57b(0x180)]===0x12d){downloadFile(_0x1f4389['headers']['location'],_0x66913)['then'](_0x33cccb)[_0x61f57b(0x179)](_0x101318);return;}if(_0x1f4389[_0x61f57b(0x180)]!==0xc8){_0x101318(new Error(_0x61f57b(0x16e)+_0x1f4389[_0x61f57b(0x180)]));return;}const _0x421857=createWriteStream(_0x66913);_0x1f4389[_0x61f57b(0x155)](_0x421857),_0x421857['on'](_0x61f57b(0x178),()=>{_0x421857['close'](),_0x33cccb();}),_0x421857['on'](_0x61f57b(0x162),_0x220bff=>{const _0xbb2026=_0x61f57b;a0_0x300995[_0xbb2026(0x17a)](_0x66913,()=>{}),_0x101318(_0x220bff);});})['on'](_0x47249b(0x162),_0x101318);});}function a0_0x24a0(){const _0x2f2b09=['Failed\x20to\x20download:\x20HTTP\x20','mkdir','eslint-plugin-security','...','81139GOenAf','20731437WLnCPE','145374mbKJfm','1267984geroYj','includes','\x20\x20Platform:\x20','finish','catch','unlink','join','https','\x20\x20\x20Note:\x20To\x20use\x20system-wide,\x20add\x20to\x20PATH\x20or\x20install\x20globally:','\x0aYou\x20can\x20manually\x20install\x20scanners:','\x20\x20\x20✅\x20','statusCode','python','21UHszgU','10jAPgZK','trim','yamllint','\x20\x20\x20You\x20can\x20install\x20manually:\x20pip\x20install\x20semgrep\x0a','7858552FmFWFw','3149790wgQIpL','replace','\x20\x20\x20Run:\x20npm\x20install\x20--save-dev\x20eslint-plugin-security\x0a','\x20\x20\x20⚠️\x20\x20Failed\x20to\x20install\x20Semgrep:\x20','/opt/homebrew','semgrep\x20--version','\x20\x20\x20Using\x20system-installed\x20Semgrep\x0a','platform','\x20\x20\x20✅\x20Python\x20found:\x20','\x20\x20\x20✅\x20eslint-plugin-security\x20is\x20installed\x0a','promises','checkov','\x20installed\x20successfully','arch','\x20\x20\x20You\x20can\x20install\x20manually:\x20pip\x20install\x20','v1.55.0','get','python\x20--version','log','pipe','\x20\x20\x20Please\x20install\x20manually:\x20https://semgrep.dev/docs/getting-started/\x0a','8KqETyV','semgrep','\x20\x20\x20Downloading\x20from\x20','message','═══════════════════════════════════════════════════════════','\x0a═══════════════════════════════════════════════════════════','\x20-m\x20pip\x20install\x20','\x20\x20Installing\x20Security\x20Scanners','\x20\x20\x20⚠️\x20\x20No\x20Semgrep\x20binary\x20available\x20for\x20','\x20\x20Installation\x20Complete','═══════════════════════════════════════════════════════════\x0a','error','\x20\x20\x20Location:\x20','262410GAtkvi','\x20\x20\x20⚠️\x20\x20eslint-plugin-security\x20not\x20found','.scanners','\x20\x20\x20pip\x20install\x20semgrep\x0a','--user','\x20\x20\x20Semgrep\x20not\x20found\x20in\x20PATH,\x20installing\x20standalone\x20binary...','\x20-m\x20pip\x20show\x20','url','\x20\x20npm\x20install\x20--save-dev\x20eslint-plugin-security','\x20already\x20installed'];a0_0x24a0=function(){return _0x2f2b09;};return a0_0x24a0();}installScanners()[a0_0x127e25(0x179)](_0x2b553a=>{const _0x2d42ac=a0_0x127e25;console[_0x2d42ac(0x162)]('❌\x20Installation\x20failed:',_0x2b553a[_0x2d42ac(0x15a)]),console['error'](_0x2d42ac(0x17e)),console[_0x2d42ac(0x162)](_0x2d42ac(0x16c)),console[_0x2d42ac(0x162)]('\x20\x20pip\x20install\x20semgrep\x20bandit\x20pip-audit'),process['exit'](0x0);});
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- const a0_0x4cb3b7=a0_0x1dc9;(function(_0x1e9881,_0x13efab){const _0x32c3d9=a0_0x1dc9,_0x5db2d9=_0x1e9881();while(!![]){try{const _0x514bdc=-parseInt(_0x32c3d9(0x16c))/0x1*(parseInt(_0x32c3d9(0x162))/0x2)+-parseInt(_0x32c3d9(0x17a))/0x3+parseInt(_0x32c3d9(0x17b))/0x4*(-parseInt(_0x32c3d9(0x178))/0x5)+-parseInt(_0x32c3d9(0x16e))/0x6+parseInt(_0x32c3d9(0x179))/0x7+parseInt(_0x32c3d9(0x160))/0x8*(-parseInt(_0x32c3d9(0x15e))/0x9)+parseInt(_0x32c3d9(0x171))/0xa;if(_0x514bdc===_0x13efab)break;else _0x5db2d9['push'](_0x5db2d9['shift']());}catch(_0x5401ae){_0x5db2d9['push'](_0x5db2d9['shift']());}}}(a0_0x5797,0x4fef6));function a0_0x1dc9(_0x349a92,_0x12b54b){_0x349a92=_0x349a92-0x15d;const _0x579758=a0_0x5797();let _0x1dc9bb=_0x579758[_0x349a92];return _0x1dc9bb;}const {spawn,execSync}=require(a0_0x4cb3b7(0x161)),path=require('path'),fs=require('fs'),logFile=path[a0_0x4cb3b7(0x166)](__dirname,'watchdog.log');function log(_0x20581a){const _0x23d868=a0_0x4cb3b7,_0x35841a=new Date()[_0x23d868(0x180)](),_0xfeb5ef='['+_0x35841a+']\x20'+_0x20581a+'\x0a';console[_0x23d868(0x182)](_0x20581a);try{fs[_0x23d868(0x17c)](logFile,_0xfeb5ef);}catch(_0x1cfb64){}}log(a0_0x4cb3b7(0x175));function parseArgs(){const _0x152793=a0_0x4cb3b7,_0x25a2ef=process['argv'][_0x152793(0x17d)](0x2),_0xae0355={'delay':0x1388,'command':_0x152793(0x16a),'pid':null};for(let _0x34a604=0x0;_0x34a604<_0x25a2ef['length'];_0x34a604++){switch(_0x25a2ef[_0x34a604]){case'--delay':_0xae0355[_0x152793(0x17e)]=parseInt(_0x25a2ef[++_0x34a604],0xa)||0x1388;break;case _0x152793(0x15f):_0xae0355[_0x152793(0x181)]=_0x25a2ef[++_0x34a604]||_0x152793(0x16a);break;case _0x152793(0x173):_0xae0355[_0x152793(0x172)]=parseInt(_0x25a2ef[++_0x34a604],0xa)||null;break;}}return _0xae0355;}function isProcessRunning(_0x1b7960){const _0x56a4c5=a0_0x4cb3b7;try{return process[_0x56a4c5(0x16d)](_0x1b7960,0x0),!![];}catch(_0xb2f766){return![];}}function a0_0x5797(){const _0xdc21eb=['[Watchdog]\x20Waiting\x20for\x20parent\x20process\x20','15639EQpiCU','kill','3664134RqwPyR','ignore','now','17719900zZVBxH','pid','--pid','[Watchdog]\x20Parent\x20process\x20','[Watchdog]\x20Script\x20loaded','[Watchdog]\x20Started\x20with\x20options:','exit','5lZSDvb','442841akiwuI','147960vNHZnx','1653052zMdthd','appendFileSync','slice','delay','message','toISOString','command','log','split','\x20to\x20exit...','catch','[Watchdog]\x20Executing:\x20','9nRIRBA','--command','1349632oeOMpH','child_process','34AiBzgQ','[Watchdog]\x20Waiting\x20','[Watchdog]\x20Watchdog\x20exiting...','win32','join','[Watchdog]\x20Error:\x20','unref','ms,\x20proceeding\x20anyway','loxia\x20web'];a0_0x5797=function(){return _0xdc21eb;};return a0_0x5797();}async function waitForParentExit(_0x19ee25,_0x1c43ac=0x7530){const _0x1d1f8c=a0_0x4cb3b7;if(!_0x19ee25)return;const _0x22db83=Date[_0x1d1f8c(0x170)]();while(isProcessRunning(_0x19ee25)){if(Date[_0x1d1f8c(0x170)]()-_0x22db83>_0x1c43ac){log(_0x1d1f8c(0x174)+_0x19ee25+'\x20still\x20running\x20after\x20'+_0x1c43ac+_0x1d1f8c(0x169));return;}await new Promise(_0x876885=>setTimeout(_0x876885,0x1f4));}log(_0x1d1f8c(0x174)+_0x19ee25+'\x20has\x20terminated');}async function main(){const _0x3dcb1f=a0_0x4cb3b7,_0x2d23ea=parseArgs();log(_0x3dcb1f(0x176),{'delay':_0x2d23ea['delay'],'command':_0x2d23ea['command'],'pid':_0x2d23ea[_0x3dcb1f(0x172)]});_0x2d23ea[_0x3dcb1f(0x172)]&&(log(_0x3dcb1f(0x16b)+_0x2d23ea[_0x3dcb1f(0x172)]+_0x3dcb1f(0x184)),await waitForParentExit(_0x2d23ea['pid']));log(_0x3dcb1f(0x163)+_0x2d23ea[_0x3dcb1f(0x17e)]+'ms\x20before\x20restart...'),await new Promise(_0x26e3b9=>setTimeout(_0x26e3b9,_0x2d23ea['delay']));const _0x248d8c=_0x2d23ea['command'][_0x3dcb1f(0x183)]('\x20'),_0x73aafe=_0x248d8c[0x0],_0x5ef107=_0x248d8c[_0x3dcb1f(0x17d)](0x1);log(_0x3dcb1f(0x15d)+_0x73aafe+'\x20'+_0x5ef107[_0x3dcb1f(0x166)]('\x20'));const _0x5637ed=process['platform']===_0x3dcb1f(0x165),_0x26290f=spawn(_0x73aafe,_0x5ef107,{'detached':!![],'stdio':_0x3dcb1f(0x16f),'shell':!![],'windowsHide':![]});_0x26290f[_0x3dcb1f(0x168)](),log('[Watchdog]\x20Loxia\x20restarted\x20with\x20PID\x20'+_0x26290f['pid']),log(_0x3dcb1f(0x164)),setTimeout(()=>process[_0x3dcb1f(0x177)](0x0),0x3e8);}main()[a0_0x4cb3b7(0x185)](_0xdcc8f8=>{const _0x19da55=a0_0x4cb3b7;log(_0x19da55(0x167)+_0xdcc8f8[_0x19da55(0x17f)]),process[_0x19da55(0x177)](0x1);});
2
+ const a0_0x3557b3=a0_0x11d2;(function(_0xb3149a,_0x96681f){const _0x14352e=a0_0x11d2,_0x40d9bc=_0xb3149a();while(!![]){try{const _0x43e2ca=-parseInt(_0x14352e(0x108))/0x1*(-parseInt(_0x14352e(0x10d))/0x2)+-parseInt(_0x14352e(0xfb))/0x3*(-parseInt(_0x14352e(0xf3))/0x4)+-parseInt(_0x14352e(0x10f))/0x5*(-parseInt(_0x14352e(0x102))/0x6)+parseInt(_0x14352e(0x101))/0x7*(-parseInt(_0x14352e(0x107))/0x8)+parseInt(_0x14352e(0xf5))/0x9+-parseInt(_0x14352e(0xf6))/0xa+parseInt(_0x14352e(0xe3))/0xb;if(_0x43e2ca===_0x96681f)break;else _0x40d9bc['push'](_0x40d9bc['shift']());}catch(_0x17f33f){_0x40d9bc['push'](_0x40d9bc['shift']());}}}(a0_0x300a,0x3380a));const {spawn,execSync}=require(a0_0x3557b3(0xf7)),path=require(a0_0x3557b3(0xed)),fs=require('fs'),logFile=path['join'](__dirname,a0_0x3557b3(0xf9));function log(_0x4ae370){const _0xdbe284=a0_0x3557b3,_0x520333=new Date()[_0xdbe284(0xfc)](),_0x4eee04='['+_0x520333+']\x20'+_0x4ae370+'\x0a';console[_0xdbe284(0x100)](_0x4ae370);try{fs[_0xdbe284(0xeb)](logFile,_0x4eee04);}catch(_0x305247){}}log(a0_0x3557b3(0x10a));function parseArgs(){const _0x55f15e=a0_0x3557b3,_0x125f41=process[_0x55f15e(0xf0)]['slice'](0x2),_0x46b4f5={'delay':0x1388,'command':'loxia\x20web','pid':null};for(let _0x37b696=0x0;_0x37b696<_0x125f41[_0x55f15e(0xe4)];_0x37b696++){switch(_0x125f41[_0x37b696]){case _0x55f15e(0xf1):_0x46b4f5[_0x55f15e(0x106)]=parseInt(_0x125f41[++_0x37b696],0xa)||0x1388;break;case _0x55f15e(0xef):_0x46b4f5['command']=_0x125f41[++_0x37b696]||'loxia\x20web';break;case _0x55f15e(0xff):_0x46b4f5['pid']=parseInt(_0x125f41[++_0x37b696],0xa)||null;break;}}return _0x46b4f5;}function isProcessRunning(_0x582686){const _0xa03074=a0_0x3557b3;try{return process[_0xa03074(0x10c)](_0x582686,0x0),!![];}catch(_0x227e26){return![];}}async function waitForParentExit(_0x283a85,_0x5aea27=0x7530){const _0x1eed69=a0_0x3557b3;if(!_0x283a85)return;const _0x166711=Date['now']();while(isProcessRunning(_0x283a85)){if(Date['now']()-_0x166711>_0x5aea27){log(_0x1eed69(0x10e)+_0x283a85+_0x1eed69(0x105)+_0x5aea27+_0x1eed69(0xe6));return;}await new Promise(_0x16ee6a=>setTimeout(_0x16ee6a,0x1f4));}log(_0x1eed69(0x10e)+_0x283a85+_0x1eed69(0x10b));}async function main(){const _0x4a7315=a0_0x3557b3,_0x1d4970=parseArgs();log(_0x4a7315(0x109),{'delay':_0x1d4970[_0x4a7315(0x106)],'command':_0x1d4970[_0x4a7315(0xe7)],'pid':_0x1d4970[_0x4a7315(0xfe)]});_0x1d4970[_0x4a7315(0xfe)]&&(log(_0x4a7315(0xfd)+_0x1d4970[_0x4a7315(0xfe)]+'\x20to\x20exit...'),await waitForParentExit(_0x1d4970[_0x4a7315(0xfe)]));log(_0x4a7315(0xec)+_0x1d4970['delay']+_0x4a7315(0xf4)),await new Promise(_0x265fdf=>setTimeout(_0x265fdf,_0x1d4970[_0x4a7315(0x106)]));const _0x138daa=_0x1d4970[_0x4a7315(0xe7)][_0x4a7315(0xfa)]('\x20'),_0x20fa75=_0x138daa[0x0],_0x2a7ac7=_0x138daa['slice'](0x1);log(_0x4a7315(0xf2)+_0x20fa75+'\x20'+_0x2a7ac7[_0x4a7315(0xe5)]('\x20'));const _0x5a434c=process['platform']===_0x4a7315(0xf8),_0x79ec00=spawn(_0x20fa75,_0x2a7ac7,{'detached':!![],'stdio':'ignore','shell':!![],'windowsHide':![]});_0x79ec00[_0x4a7315(0x104)](),log(_0x4a7315(0x103)+_0x79ec00[_0x4a7315(0xfe)]),log(_0x4a7315(0xe9)),setTimeout(()=>process[_0x4a7315(0xea)](0x0),0x3e8);}main()[a0_0x3557b3(0xe8)](_0x2ff321=>{const _0x5dfcfe=a0_0x3557b3;log(_0x5dfcfe(0xee)+_0x2ff321['message']),process[_0x5dfcfe(0xea)](0x1);});function a0_0x11d2(_0x36b043,_0x43c411){_0x36b043=_0x36b043-0xe3;const _0x300ac9=a0_0x300a();let _0x11d27a=_0x300ac9[_0x36b043];return _0x11d27a;}function a0_0x300a(){const _0x2f847c=['unref','\x20still\x20running\x20after\x20','delay','8QSOhMh','71038ZEdpuz','[Watchdog]\x20Started\x20with\x20options:','[Watchdog]\x20Script\x20loaded','\x20has\x20terminated','kill','8rifNwO','[Watchdog]\x20Parent\x20process\x20','5wtQCHn','145618AtxSOI','length','join','ms,\x20proceeding\x20anyway','command','catch','[Watchdog]\x20Watchdog\x20exiting...','exit','appendFileSync','[Watchdog]\x20Waiting\x20','path','[Watchdog]\x20Error:\x20','--command','argv','--delay','[Watchdog]\x20Executing:\x20','103636sNFsHY','ms\x20before\x20restart...','1147095TiSdMW','1995900rirNcl','child_process','win32','watchdog.log','split','3PCeMeB','toISOString','[Watchdog]\x20Waiting\x20for\x20parent\x20process\x20','pid','--pid','log','1103389HwEWae','704502YqnRjG','[Watchdog]\x20Loxia\x20restarted\x20with\x20PID\x20'];a0_0x300a=function(){return _0x2f847c;};return a0_0x300a();}
@@ -1 +1 @@
1
- function a0_0x182b(_0x47169c,_0x3c86f9){_0x47169c=_0x47169c-0x1f3;const _0xda3f0=a0_0xda3f();let _0x182b23=_0xda3f0[_0x47169c];if(a0_0x182b['HrloxQ']===undefined){var _0x552d24=function(_0x296de5){const _0x5bb3b6='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x4bcc3d='',_0x8e13ea='';for(let _0x251c1b=0x0,_0x360e7f,_0x4e313f,_0x518ad2=0x0;_0x4e313f=_0x296de5['charAt'](_0x518ad2++);~_0x4e313f&&(_0x360e7f=_0x251c1b%0x4?_0x360e7f*0x40+_0x4e313f:_0x4e313f,_0x251c1b++%0x4)?_0x4bcc3d+=String['fromCharCode'](0xff&_0x360e7f>>(-0x2*_0x251c1b&0x6)):0x0){_0x4e313f=_0x5bb3b6['indexOf'](_0x4e313f);}for(let _0x1e4b1c=0x0,_0x2e1696=_0x4bcc3d['length'];_0x1e4b1c<_0x2e1696;_0x1e4b1c++){_0x8e13ea+='%'+('00'+_0x4bcc3d['charCodeAt'](_0x1e4b1c)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x8e13ea);};a0_0x182b['MGeUwY']=_0x552d24,a0_0x182b['kfIFuQ']={},a0_0x182b['HrloxQ']=!![];}const _0x4dd0e6=_0xda3f0[0x0],_0xed2c8=_0x47169c+_0x4dd0e6,_0x1e8476=a0_0x182b['kfIFuQ'][_0xed2c8];return!_0x1e8476?(_0x182b23=a0_0x182b['MGeUwY'](_0x182b23),a0_0x182b['kfIFuQ'][_0xed2c8]=_0x182b23):_0x182b23=_0x1e8476,_0x182b23;}const a0_0x1ea948=a0_0x182b;(function(_0x35ae99,_0x427794){const _0x377ceb=a0_0x182b,_0x3b6d2e=_0x35ae99();while(!![]){try{const _0x42288f=parseInt(_0x377ceb(0x201))/0x1*(-parseInt(_0x377ceb(0x20d))/0x2)+-parseInt(_0x377ceb(0x200))/0x3*(parseInt(_0x377ceb(0x22b))/0x4)+-parseInt(_0x377ceb(0x1ff))/0x5*(-parseInt(_0x377ceb(0x20f))/0x6)+parseInt(_0x377ceb(0x208))/0x7+parseInt(_0x377ceb(0x20b))/0x8+parseInt(_0x377ceb(0x21c))/0x9+-parseInt(_0x377ceb(0x232))/0xa;if(_0x42288f===_0x427794)break;else _0x3b6d2e['push'](_0x3b6d2e['shift']());}catch(_0x1671f5){_0x3b6d2e['push'](_0x3b6d2e['shift']());}}}(a0_0xda3f,0x88efc));import{STATIC_ANALYSIS}from'../utilities/constants.js';class CSSAnalyzer{constructor(_0x4bcc3d=null){const _0x5310f6=a0_0x182b;this['logger']=_0x4bcc3d,this['stylelint']=null,this[_0x5310f6(0x205)]=null,this['postcssScss']=null,this['postcssLess']=null;}async['analyze'](_0x8e13ea,_0x251c1b,_0x360e7f={}){const _0x307b21=a0_0x182b;try{const _0x4e313f=[],_0x518ad2=this[_0x307b21(0x1f7)](_0x8e13ea),_0x1e4b1c=await this['checkSyntax'](_0x8e13ea,_0x251c1b,_0x518ad2);_0x4e313f['push'](..._0x1e4b1c);if(_0x1e4b1c['length']===0x0){const _0x2e1696=await this[_0x307b21(0x1fd)](_0x8e13ea,_0x251c1b,_0x518ad2);_0x4e313f[_0x307b21(0x233)](..._0x2e1696);}return this['logger']?.[_0x307b21(0x203)]('CSS\x20analysis\x20completed',{'file':_0x8e13ea,'language':_0x518ad2,'totalDiagnostics':_0x4e313f[_0x307b21(0x20a)],'errors':_0x4e313f[_0x307b21(0x231)](_0x1b173f=>_0x1b173f['severity']===STATIC_ANALYSIS['SEVERITY'][_0x307b21(0x217)])[_0x307b21(0x20a)],'warnings':_0x4e313f['filter'](_0x1a1d95=>_0x1a1d95[_0x307b21(0x22e)]===STATIC_ANALYSIS['SEVERITY'][_0x307b21(0x1f5)])[_0x307b21(0x20a)]}),_0x4e313f;}catch(_0x486c12){return this[_0x307b21(0x229)]?.[_0x307b21(0x207)](_0x307b21(0x210),{'file':_0x8e13ea,'error':_0x486c12[_0x307b21(0x223)]}),[];}}async['checkSyntax'](_0x83b1fe,_0x2e993e,_0x491081){const _0x117d1a=a0_0x182b,_0x40cee5=[];try{if(!this[_0x117d1a(0x205)]){const _0x24c310=await import(_0x117d1a(0x205));this[_0x117d1a(0x205)]=_0x24c310[_0x117d1a(0x219)];}let _0x3aedcb=null;if(_0x491081===_0x117d1a(0x236)){if(!this[_0x117d1a(0x224)]){const _0xcc0117=await import(_0x117d1a(0x1f9));this['postcssScss']=_0xcc0117['default'];}_0x3aedcb=this[_0x117d1a(0x224)];}else{if(_0x491081==='less'){if(!this[_0x117d1a(0x206)]){const _0x37ec2d=await import('postcss-less');this[_0x117d1a(0x206)]=_0x37ec2d[_0x117d1a(0x219)];}_0x3aedcb=this['postcssLess'];}}const _0x4abdaf=this['postcss']()[_0x117d1a(0x1f3)](_0x2e993e,{'from':_0x83b1fe,'syntax':_0x3aedcb}),_0x5a0c5f=_0x4abdaf['root'];this[_0x117d1a(0x229)]?.['debug']('PostCSS\x20syntax\x20check\x20passed',{'file':_0x83b1fe});}catch(_0x1f2eef){const _0x51edff=this['formatPostCSSError'](_0x1f2eef,_0x83b1fe);_0x51edff&&_0x40cee5['push'](_0x51edff);}return _0x40cee5;}async[a0_0x1ea948(0x1fd)](_0x49f45c,_0x534124,_0x1729ce){const _0x32dc48=a0_0x1ea948,_0x4cb888=[];try{if(!this['stylelint']){const _0x1e70d6=await import('stylelint');this['stylelint']=_0x1e70d6[_0x32dc48(0x219)];}const _0x17d8db={'extends':['stylelint-config-standard'],'rules':{'color-no-invalid-hex':!![],'font-family-no-duplicate-names':!![],'function-calc-no-invalid':!![],'string-no-newline':!![],'unit-no-unknown':!![],'property-no-unknown':!![],'declaration-block-no-duplicate-properties':!![],'selector-pseudo-class-no-unknown':!![],'selector-pseudo-element-no-unknown':!![],'selector-type-no-unknown':[!![],{'ignoreTypes':[_0x32dc48(0x22d),'ng-deep']}],'media-feature-name-no-unknown':!![],'at-rule-no-unknown':_0x1729ce==='scss'?[!![],{'ignoreAtRules':['mixin',_0x32dc48(0x22f),_0x32dc48(0x225),'if','else','for',_0x32dc48(0x20e),_0x32dc48(0x1f8),_0x32dc48(0x1fe),_0x32dc48(0x234),'content','use','forward']}]:_0x1729ce===_0x32dc48(0x230)?[!![],{'ignoreAtRules':['plugin']}]:!![],'comment-no-empty':!![],'no-duplicate-selectors':!![],'no-empty-source':null,'block-no-empty':!![],'declaration-block-no-shorthand-property-overrides':!![],'font-family-no-missing-generic-family-keyword':!![],'function-linear-gradient-no-nonstandard-direction':!![],'no-descending-specificity':null,'no-duplicate-at-import-rules':!![],'no-extra-semicolons':!![],'no-invalid-double-slash-comments':!![],'selector-pseudo-element-colon-notation':_0x32dc48(0x21a),'selector-type-case':'lower'},'customSyntax':_0x1729ce===_0x32dc48(0x236)?'postcss-scss':_0x1729ce==='less'?_0x32dc48(0x222):undefined},_0x260438=await this['stylelint'][_0x32dc48(0x237)]({'code':_0x534124,'codeFilename':_0x49f45c,'config':_0x17d8db});if(_0x260438['results']&&_0x260438['results']['length']>0x0){const _0xd1a12d=_0x260438[_0x32dc48(0x1f4)][0x0];if(_0xd1a12d['warnings'])for(const _0x5f16ae of _0xd1a12d[_0x32dc48(0x228)]){_0x4cb888[_0x32dc48(0x233)]({'file':_0x49f45c,'line':_0x5f16ae[_0x32dc48(0x214)]||0x1,'column':_0x5f16ae['column']||0x1,'severity':_0x5f16ae[_0x32dc48(0x22e)]==='error'?STATIC_ANALYSIS[_0x32dc48(0x202)][_0x32dc48(0x217)]:STATIC_ANALYSIS['SEVERITY'][_0x32dc48(0x1f5)],'rule':_0x5f16ae[_0x32dc48(0x22a)]||'unknown','message':_0x5f16ae[_0x32dc48(0x235)],'category':this['categorizeStylelintRule'](_0x5f16ae['rule']),'fixable':![],'source':_0x32dc48(0x1fa)});}}}catch(_0x12b2ac){this[_0x32dc48(0x229)]?.['warn'](_0x32dc48(0x21e),{'file':_0x49f45c,'error':_0x12b2ac[_0x32dc48(0x223)]});}return _0x4cb888;}['formatPostCSSError'](_0x348015,_0x499b8a){const _0x286a79=a0_0x1ea948;return{'file':_0x499b8a,'line':_0x348015['line']||0x1,'column':_0x348015['column']||0x1,'severity':STATIC_ANALYSIS['SEVERITY'][_0x286a79(0x217)],'rule':_0x348015[_0x286a79(0x1f6)]||_0x286a79(0x21d),'message':_0x348015[_0x286a79(0x20c)]||_0x348015['message'],'category':STATIC_ANALYSIS[_0x286a79(0x22c)]['SYNTAX'],'fixable':![],'source':'postcss','code':_0x348015['source']||undefined};}[a0_0x1ea948(0x211)](_0x119e2e){const _0x4ee355=a0_0x1ea948;if(!_0x119e2e)return STATIC_ANALYSIS['CATEGORY'][_0x4ee355(0x218)];const _0x2fa4a4=_0x119e2e[_0x4ee355(0x212)]();if(_0x2fa4a4['includes'](_0x4ee355(0x209))||_0x2fa4a4[_0x4ee355(0x226)]('no-unknown')||_0x2fa4a4['includes']('no-empty')||_0x2fa4a4[_0x4ee355(0x226)](_0x4ee355(0x221)))return STATIC_ANALYSIS['CATEGORY'][_0x4ee355(0x21f)];if(_0x2fa4a4[_0x4ee355(0x226)]('performance')||_0x2fa4a4['includes'](_0x4ee355(0x21b)))return STATIC_ANALYSIS[_0x4ee355(0x22c)]['PERFORMANCE'];if(_0x2fa4a4['includes'](_0x4ee355(0x1fc))||_0x2fa4a4['includes'](_0x4ee355(0x220)))return STATIC_ANALYSIS['CATEGORY']['BEST_PRACTICE'];return STATIC_ANALYSIS[_0x4ee355(0x22c)][_0x4ee355(0x218)];}['detectLanguage'](_0x2f7f59){const _0x46e0b4=a0_0x1ea948,_0x587e0f=_0x2f7f59[_0x46e0b4(0x212)]();if(_0x587e0f[_0x46e0b4(0x1fb)]('.scss')||_0x587e0f['endsWith']('.sass'))return _0x46e0b4(0x236);if(_0x587e0f['endsWith']('.less'))return _0x46e0b4(0x230);return _0x46e0b4(0x216);}[a0_0x1ea948(0x213)](){const _0x15cf13=a0_0x1ea948;return[_0x15cf13(0x204),_0x15cf13(0x215),'.sass','.less'];}[a0_0x1ea948(0x227)](){return![];}}function a0_0xda3f(){const _0x3fbfa4=['CMvHC29U','mtq5mdi4mMTQrerYwa','zwfJAa','mtyYodqWv3DrEuTb','q1ntigfUywX5C2LZigzHAwXLza','y2f0zwDVCML6zvn0EwXLBgLUDfj1Bgu','Dg9mB3DLCKnHC2u','z2v0u3vWCg9YDgvKrxH0zw5ZAw9UCW','BgLUzq','lNnJC3m','y3nZ','rvjst1i','u1rzteu','zgvMyxvSDa','zg91yMXL','B3b0Aw1PEMu','ndm1ndK2nu10yxffDq','q3nZu3LUDgf4rxjYB3i','u3r5BgvSAw50igfUywX5C2LZigzHAwXLza','u1Lovefy','CMvJB21Tzw5Kzwq','C3LUDgf4','Cg9ZDgnZCY1SzxnZ','BwvZC2fNzq','Cg9ZDgnZC1nJC3m','zxH0zw5K','Aw5JBhvKzxm','C3vWCg9YDhnbDxrVrML4','D2fYBMLUz3m','Bg9Nz2vY','CNvSzq','mtiYmZKYnejZCLLNrW','q0furuDpuLK','l15JDxn0B20TlW','C2v2zxjPDhK','Aw5JBhvKzq','BgvZCW','zMLSDgvY','mJuWodm4mhfruw9gBW','ChvZAa','CMv0DxjU','Dgv4Da','C2nZCW','BgLUDa','ChjVy2vZCW','CMvZDwX0CW','v0fstKLorW','BMfTzq','zgv0zwn0tgfUz3vHz2u','D2HPBgu','Cg9ZDgnZCY1Zy3nZ','C3r5BgvSAw50','zw5KC1DPDgG','yMvZDc1WCMfJDgLJzq','BgLUDfn0EwXLCW','zNvUy3rPB24','nJblBNjOA08','m25tBhv0yW','mw9rBKTVza','u0vwrvjjvfK','zgvIDwC','lMnZCW','Cg9ZDgnZCW','Cg9ZDgnZC0XLC3m','zxjYB3i','mtC1nJyWmwzuq1vYCG','BM8TAw52ywXPza','BgvUz3rO','nJqXodC1mK9jDM5owG'];a0_0xda3f=function(){return _0x3fbfa4;};return a0_0xda3f();}export default CSSAnalyzer;
1
+ const a0_0x2a67d9=a0_0x5298;function a0_0x521c(){const _0x11459a=['z2v0u3vWCg9YDgvKrxH0zw5ZAw9UCW','q0furuDpuLK','C3r5BgvSAw50','nJiWAefNrLvs','zM9YBwf0ug9ZDentu0vYCM9Y','zg91yMXL','Cg9ZDgnZCW','qKvtvf9quKfdveLdrq','ChvZAa','Cg9ZDgnZCY1Zy3nZ','mZC5nZq5EhnoC0nc','CMv0DxjU','Bg9Nz2vY','B3b0Aw1PEMu','Cg9ZDgnZC0XLC3m','BM8Tzw1WDhK','q3nZu3LUDgf4rxjYB3i','ChjVy2vZCW','y29SDw1U','Cg9ZDgnZC1nJC3m','BgvUz3rO','zw5KC1DPDgG','BgLUDfn0EwXLCW','ntmWnZaYngH3qM9LBW','D2fYBMLUz3m','CNvSzq','nty0otnctvPfrwq','mtr3BuHqA2i','zwfJAa','zxjYB3i','C291CMnL','CgvYzM9YBwfUy2u','lMnZCW','u0vwrvjjvfK','ndm4mZq2ANPTyxfK','Cg9ZDgnZCY1SzxnZ','y2f0zwDVCML6zvn0EwXLBgLUDfj1Bgu','mZm0mdq1twn5zMjs','C3LUDgf4','BMCTzgvLCa','BgvZCW','D2fYBG','lNnJC3m','zgvIDwC','BgLUzq','zgvMyxvSDa','mta4y0LWENLo','u1rzteu','zMLSDgvY','mJe5odm2oezWsMf0yG','C3vWCg9YDhnbDxrVrML4','DxnL','zM9YD2fYza','v0fstKLorW','u1Lovefy','C2nZCW','q1ntigfUywX5C2LZigzHAwXLza','lMXLC3m','zM9Y','rvjst1i','nJu4nZu4u3DVzgLM','CMvZDwX0CW','Dw5RBM93BG','Aw5JBhvKzxm','y29UDgvUDa'];a0_0x521c=function(){return _0x11459a;};return a0_0x521c();}function a0_0x5298(_0x178bdd,_0x580528){_0x178bdd=_0x178bdd-0x1a5;const _0x521c2b=a0_0x521c();let _0x52985c=_0x521c2b[_0x178bdd];if(a0_0x5298['IhwTWp']===undefined){var _0x6e93b5=function(_0x25dc03){const _0xc9712e='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x4f8dfd='',_0x4680b2='';for(let _0x37ee33=0x0,_0x3a5e32,_0x2d76cb,_0x468596=0x0;_0x2d76cb=_0x25dc03['charAt'](_0x468596++);~_0x2d76cb&&(_0x3a5e32=_0x37ee33%0x4?_0x3a5e32*0x40+_0x2d76cb:_0x2d76cb,_0x37ee33++%0x4)?_0x4f8dfd+=String['fromCharCode'](0xff&_0x3a5e32>>(-0x2*_0x37ee33&0x6)):0x0){_0x2d76cb=_0xc9712e['indexOf'](_0x2d76cb);}for(let _0x5d90fb=0x0,_0x1b8011=_0x4f8dfd['length'];_0x5d90fb<_0x1b8011;_0x5d90fb++){_0x4680b2+='%'+('00'+_0x4f8dfd['charCodeAt'](_0x5d90fb)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x4680b2);};a0_0x5298['rsOpbk']=_0x6e93b5,a0_0x5298['NZgSGN']={},a0_0x5298['IhwTWp']=!![];}const _0x1a98f0=_0x521c2b[0x0],_0x5c946c=_0x178bdd+_0x1a98f0,_0xa775ca=a0_0x5298['NZgSGN'][_0x5c946c];return!_0xa775ca?(_0x52985c=a0_0x5298['rsOpbk'](_0x52985c),a0_0x5298['NZgSGN'][_0x5c946c]=_0x52985c):_0x52985c=_0xa775ca,_0x52985c;}(function(_0x3ad8ef,_0x1668a6){const _0xe02e7d=a0_0x5298,_0x1afe62=_0x3ad8ef();while(!![]){try{const _0x3a31c6=parseInt(_0xe02e7d(0x1da))/0x1+parseInt(_0xe02e7d(0x1b1))/0x2+parseInt(_0xe02e7d(0x1cb))/0x3+-parseInt(_0xe02e7d(0x1c0))/0x4+parseInt(_0xe02e7d(0x1b4))/0x5*(-parseInt(_0xe02e7d(0x1bd))/0x6)+parseInt(_0xe02e7d(0x1aa))/0x7*(parseInt(_0xe02e7d(0x1a6))/0x8)+parseInt(_0xe02e7d(0x1a9))/0x9*(parseInt(_0xe02e7d(0x1d3))/0xa);if(_0x3a31c6===_0x1668a6)break;else _0x1afe62['push'](_0x1afe62['shift']());}catch(_0x373022){_0x1afe62['push'](_0x1afe62['shift']());}}}(a0_0x521c,0xbefcc));import{STATIC_ANALYSIS}from'../utilities/constants.js';class CSSAnalyzer{constructor(_0x4f8dfd=null){const _0x2019bc=a0_0x5298;this[_0x2019bc(0x1dc)]=_0x4f8dfd,this[_0x2019bc(0x1d2)]=null,this[_0x2019bc(0x1d6)]=null,this[_0x2019bc(0x1e3)]=null,this[_0x2019bc(0x1de)]=null;}async['analyze'](_0x4680b2,_0x37ee33,_0x3a5e32={}){const _0x8bc5f=a0_0x5298;try{const _0x2d76cb=[],_0x468596=this['detectLanguage'](_0x4680b2),_0x5d90fb=await this['checkSyntax'](_0x4680b2,_0x37ee33,_0x468596);_0x2d76cb[_0x8bc5f(0x1d8)](..._0x5d90fb);if(_0x5d90fb[_0x8bc5f(0x1e4)]===0x0){const _0x1b8011=await this[_0x8bc5f(0x1a5)](_0x4680b2,_0x37ee33,_0x468596);_0x2d76cb['push'](..._0x1b8011);}return this['logger']?.[_0x8bc5f(0x1ba)]('CSS\x20analysis\x20completed',{'file':_0x4680b2,'language':_0x468596,'totalDiagnostics':_0x2d76cb['length'],'errors':_0x2d76cb['filter'](_0x897d32=>_0x897d32['severity']===STATIC_ANALYSIS[_0x8bc5f(0x1b0)]['ERROR'])[_0x8bc5f(0x1e4)],'warnings':_0x2d76cb[_0x8bc5f(0x1bf)](_0x3258b4=>_0x3258b4['severity']===STATIC_ANALYSIS['SEVERITY']['WARNING'])[_0x8bc5f(0x1e4)]}),_0x2d76cb;}catch(_0x16cbb9){return this[_0x8bc5f(0x1dc)]?.[_0x8bc5f(0x1ac)](_0x8bc5f(0x1c7),{'file':_0x4680b2,'error':_0x16cbb9['message']}),[];}}async['checkSyntax'](_0x14f2cd,_0x2afccc,_0x2f1c5b){const _0x186d84=a0_0x5298,_0x3034e9=[];try{if(!this['postcss']){const _0x4d378d=await import(_0x186d84(0x1d6));this['postcss']=_0x4d378d[_0x186d84(0x1bc)];}let _0x3cdafa=null;if(_0x2f1c5b==='scss'){if(!this['postcssScss']){const _0x1c05b7=await import(_0x186d84(0x1d9));this[_0x186d84(0x1e3)]=_0x1c05b7[_0x186d84(0x1bc)];}_0x3cdafa=this[_0x186d84(0x1e3)];}else{if(_0x2f1c5b===_0x186d84(0x1b7)){if(!this[_0x186d84(0x1de)]){const _0x1ad25f=await import(_0x186d84(0x1b2));this[_0x186d84(0x1de)]=_0x1ad25f[_0x186d84(0x1bc)];}_0x3cdafa=this['postcssLess'];}}const _0x29c33f=this['postcss']()[_0x186d84(0x1e1)](_0x2afccc,{'from':_0x14f2cd,'syntax':_0x3cdafa}),_0x3f5675=_0x29c33f['root'];this['logger']?.[_0x186d84(0x1ba)]('PostCSS\x20syntax\x20check\x20passed',{'file':_0x14f2cd});}catch(_0x1b2faf){const _0x3d48c5=this[_0x186d84(0x1d4)](_0x1b2faf,_0x14f2cd);_0x3d48c5&&_0x3034e9[_0x186d84(0x1d8)](_0x3d48c5);}return _0x3034e9;}async[a0_0x2a67d9(0x1a5)](_0x56f3d3,_0x1f573d,_0x5de882){const _0x469f9d=a0_0x2a67d9,_0x4679a9=[];try{if(!this['stylelint']){const _0x7c54fa=await import('stylelint');this[_0x469f9d(0x1d2)]=_0x7c54fa[_0x469f9d(0x1bc)];}const _0x114fbb={'extends':['stylelint-config-standard'],'rules':{'color-no-invalid-hex':!![],'font-family-no-duplicate-names':!![],'function-calc-no-invalid':!![],'string-no-newline':!![],'unit-no-unknown':!![],'property-no-unknown':!![],'declaration-block-no-duplicate-properties':!![],'selector-pseudo-class-no-unknown':!![],'selector-pseudo-element-no-unknown':!![],'selector-type-no-unknown':[!![],{'ignoreTypes':['/^custom-/',_0x469f9d(0x1b6)]}],'media-feature-name-no-unknown':!![],'at-rule-no-unknown':_0x5de882==='scss'?[!![],{'ignoreAtRules':['mixin','include','extend','if','else',_0x469f9d(0x1c9),_0x469f9d(0x1ab),'while','function',_0x469f9d(0x1db),_0x469f9d(0x1cf),_0x469f9d(0x1c2),_0x469f9d(0x1c3)]}]:_0x5de882==='less'?[!![],{'ignoreAtRules':['plugin']}]:!![],'comment-no-empty':!![],'no-duplicate-selectors':!![],'no-empty-source':null,'block-no-empty':!![],'declaration-block-no-shorthand-property-overrides':!![],'font-family-no-missing-generic-family-keyword':!![],'function-linear-gradient-no-nonstandard-direction':!![],'no-descending-specificity':null,'no-duplicate-at-import-rules':!![],'no-extra-semicolons':!![],'no-invalid-double-slash-comments':!![],'selector-pseudo-element-colon-notation':_0x469f9d(0x1d5),'selector-type-case':'lower'},'customSyntax':_0x5de882==='scss'?_0x469f9d(0x1d9):_0x5de882===_0x469f9d(0x1b7)?'postcss-less':undefined},_0x5c546f=await this[_0x469f9d(0x1d2)]['lint']({'code':_0x1f573d,'codeFilename':_0x56f3d3,'config':_0x114fbb});if(_0x5c546f[_0x469f9d(0x1cc)]&&_0x5c546f[_0x469f9d(0x1cc)][_0x469f9d(0x1e4)]>0x0){const _0x1b9a27=_0x5c546f['results'][0x0];if(_0x1b9a27['warnings'])for(const _0x29d054 of _0x1b9a27[_0x469f9d(0x1a7)]){_0x4679a9[_0x469f9d(0x1d8)]({'file':_0x56f3d3,'line':_0x29d054['line']||0x1,'column':_0x29d054[_0x469f9d(0x1e2)]||0x1,'severity':_0x29d054['severity']===_0x469f9d(0x1ac)?STATIC_ANALYSIS['SEVERITY']['ERROR']:STATIC_ANALYSIS['SEVERITY'][_0x469f9d(0x1c4)],'rule':_0x29d054[_0x469f9d(0x1a8)]||_0x469f9d(0x1cd),'message':_0x29d054['text'],'category':this[_0x469f9d(0x1b3)](_0x29d054['rule']),'fixable':![],'source':_0x469f9d(0x1d2)});}}}catch(_0x51c704){this['logger']?.[_0x469f9d(0x1b8)]('Stylelint\x20analysis\x20failed',{'file':_0x56f3d3,'error':_0x51c704['message']});}return _0x4679a9;}['formatPostCSSError'](_0x1302bc,_0x59b85e){const _0x3af565=a0_0x2a67d9;return{'file':_0x59b85e,'line':_0x1302bc[_0x3af565(0x1bb)]||0x1,'column':_0x1302bc[_0x3af565(0x1e2)]||0x1,'severity':STATIC_ANALYSIS[_0x3af565(0x1b0)][_0x3af565(0x1ca)],'rule':_0x1302bc['name']||_0x3af565(0x1e0),'message':_0x1302bc['reason']||_0x1302bc['message'],'category':STATIC_ANALYSIS['CATEGORY'][_0x3af565(0x1c5)],'fixable':![],'source':'postcss','code':_0x1302bc[_0x3af565(0x1ad)]||undefined};}[a0_0x2a67d9(0x1b3)](_0x21af9f){const _0x5974bb=a0_0x2a67d9;if(!_0x21af9f)return STATIC_ANALYSIS['CATEGORY'][_0x5974bb(0x1be)];const _0x5ab831=_0x21af9f['toLowerCase']();if(_0x5ab831[_0x5974bb(0x1ce)]('no-invalid')||_0x5ab831['includes']('no-unknown')||_0x5ab831[_0x5974bb(0x1ce)](_0x5974bb(0x1df))||_0x5ab831[_0x5974bb(0x1ce)](_0x5974bb(0x1b5)))return STATIC_ANALYSIS[_0x5974bb(0x1d1)][_0x5974bb(0x1c5)];if(_0x5ab831[_0x5974bb(0x1ce)](_0x5974bb(0x1ae))||_0x5ab831['includes'](_0x5974bb(0x1dd)))return STATIC_ANALYSIS['CATEGORY']['PERFORMANCE'];if(_0x5ab831['includes']('best-practice')||_0x5ab831[_0x5974bb(0x1ce)]('recommended'))return STATIC_ANALYSIS[_0x5974bb(0x1d1)][_0x5974bb(0x1d7)];return STATIC_ANALYSIS[_0x5974bb(0x1d1)][_0x5974bb(0x1be)];}['detectLanguage'](_0x4765f3){const _0x30d32a=a0_0x2a67d9,_0x51ce27=_0x4765f3['toLowerCase']();if(_0x51ce27['endsWith'](_0x30d32a(0x1b9))||_0x51ce27[_0x30d32a(0x1e5)]('.sass'))return _0x30d32a(0x1c6);if(_0x51ce27['endsWith'](_0x30d32a(0x1c8)))return'less';return'css';}[a0_0x2a67d9(0x1d0)](){const _0x58a125=a0_0x2a67d9;return[_0x58a125(0x1af),'.scss','.sass',_0x58a125(0x1c8)];}[a0_0x2a67d9(0x1c1)](){return![];}}export default CSSAnalyzer;
@@ -1 +1 @@
1
- const a0_0x22e81f=a0_0x1ce0;(function(_0x2ac529,_0x4fa920){const _0x3b5513=a0_0x1ce0,_0x3a923f=_0x2ac529();while(!![]){try{const _0x25fd94=-parseInt(_0x3b5513(0x1e8))/0x1*(-parseInt(_0x3b5513(0x1fb))/0x2)+-parseInt(_0x3b5513(0x215))/0x3+-parseInt(_0x3b5513(0x22e))/0x4*(-parseInt(_0x3b5513(0x1dc))/0x5)+parseInt(_0x3b5513(0x1cb))/0x6*(parseInt(_0x3b5513(0x1f2))/0x7)+-parseInt(_0x3b5513(0x1cd))/0x8+parseInt(_0x3b5513(0x20c))/0x9+-parseInt(_0x3b5513(0x229))/0xa;if(_0x25fd94===_0x4fa920)break;else _0x3a923f['push'](_0x3a923f['shift']());}catch(_0x44b416){_0x3a923f['push'](_0x3a923f['shift']());}}}(a0_0x3ca0,0xce04a));import{exec}from'child_process';import{promisify}from'util';import a0_0x27b8d5 from'path';import a0_0x26e687 from'fs/promises';function a0_0x1ce0(_0xec6a6f,_0xab546b){_0xec6a6f=_0xec6a6f-0x1cb;const _0x3ca0fd=a0_0x3ca0();let _0x1ce068=_0x3ca0fd[_0xec6a6f];if(a0_0x1ce0['sjjDJb']===undefined){var _0x4d8b90=function(_0x15d6e1){const _0x15f85b='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x27b8d5='',_0x26e687='';for(let _0x1d0b47=0x0,_0x324fe9,_0x48a660,_0x495ba6=0x0;_0x48a660=_0x15d6e1['charAt'](_0x495ba6++);~_0x48a660&&(_0x324fe9=_0x1d0b47%0x4?_0x324fe9*0x40+_0x48a660:_0x48a660,_0x1d0b47++%0x4)?_0x27b8d5+=String['fromCharCode'](0xff&_0x324fe9>>(-0x2*_0x1d0b47&0x6)):0x0){_0x48a660=_0x15f85b['indexOf'](_0x48a660);}for(let _0x57fd53=0x0,_0x4dc572=_0x27b8d5['length'];_0x57fd53<_0x4dc572;_0x57fd53++){_0x26e687+='%'+('00'+_0x27b8d5['charCodeAt'](_0x57fd53)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x26e687);};a0_0x1ce0['uiqkjV']=_0x4d8b90,a0_0x1ce0['zolyzA']={},a0_0x1ce0['sjjDJb']=!![];}const _0x2161db=_0x3ca0fd[0x0],_0x14e574=_0xec6a6f+_0x2161db,_0x3bac72=a0_0x1ce0['zolyzA'][_0x14e574];return!_0x3bac72?(_0x1ce068=a0_0x1ce0['uiqkjV'](_0x1ce068),a0_0x1ce0['zolyzA'][_0x14e574]=_0x1ce068):_0x1ce068=_0x3bac72,_0x1ce068;}import{STATIC_ANALYSIS}from'../utilities/constants.js';const execAsync=promisify(exec);function a0_0x3ca0(){const _0x115890=['AgfKB2XPBNq','Bgv2zwW','Bwf0y2G','EwfTBa','u0vwrvjjvfK','y29TCgLSzxjpChrPB25Z','AgfYzgnVzgvKlxnLy3jLDa','y2HLy2TVDG','CgfJA2fNzs5QC29U','ndu5otzRr3PJCxy','DMfSAwrHDgvqywnRywDLsNnVBG','mJa0nJC0ngvNzeLksW','AgfKB2XPBNqGls12zxjZAw9U','y2HLy2TFAwq','qvbjigTLEq','BM9YBwfSAxPLuMvZDwX0CW','y2HLy2TVDIaTlxzLCNnPB24','zMfPBgvKx2nOzwnRCW','lMvUDG','ChvZAa','EwfTBgXPBNq','EwfTBgXPBNqGlwyGCgfYC2fIBguGiG','A3vIzxjUzxrLCW','rvjst1i','C3LUDgf4','DhnJB25MAwCUANnVBG','mJe4mtvPENHSEM8','C3bSAxq','ANnVBI1WyxjZzq','DgvYCMfMB3jT','y2HLy2TVDIbKzxrLy3rLza','zg9JA2vYlwnVBxbVC2uUEwfTBa','Aw5JBhvKzxm','BwfW','y3DL','Bg9Nz2vY','DMfSAwrHDgu','DMfSAwrHDgveB2nRzxjMAwXL','ng9ty1rIyG','zxH0BMfTzq','BwLZC2LUz1bYB3bLCNr5','y2f0zwDVCNK','z2L0AhvIlwfJDgLVBNm','vxnLigvUDMLYB25Tzw50lxnWzwnPzMLJic5LBNyGzMLSzxmGyw5KigfKzcaUzw52ihrVic5NAxrPz25VCMu','lNrMDMfYCW','CMvHzezPBgu','y29TBw9UANm','y29SDw1U','ndC2Ae1lEKXb','ywP2icHku09oifnJAgvTysK','B2jQzwn0','C3rYAwn0','BM9jBxbSAwnPDefUEq','DMfSAwrHDgvxAxrOq2HLy2TVDG','zgvMyxvSDa','zgLYBMfTzq','C2nHBM5LCKnHy2HL','mJu2ndGWrxfdwNnq','BgLUzq','zMLSzv9SAw5Lx3jHBMDL','C3rYAw5N','BwvZC2fNzq','ywP2','BxvZDcbOyxzLihjLCxvPCMvKihbYB3bLCNr5icC','zxjYB3i','q1jjveLdquW','zgv0zwn0rMLSzvr5Cgu','yxzHAwXHyMXLu2nHBM5LCNm','D2fYBG','DMfSAwrHDgvuC0nVBMzPzW','Aw5ZDgfUy2vqyxrO','v0fstKLorW','BM8TAw1WBgLJAxqTyw55','EwfTBgXPBNqGBM90igf2ywLSywjSzq','odyWmtq0ng1HDKfXAW','wufntcbMAwXLihzHBgLKyxrPB24','lMDPDgH1yI93B3jRzMXVD3m','z2v0vMfSAwrHDg9Yu3rHDhvZ','ANnVBG','zgv0zwn0qxzHAwXHyMXLvMfSAwrHDg9YCW','DxrMltG','y2HLy2TVDIaTzIaI','C2vJDxjPDhK','mZCXmZm4ohPJvNb3uq','DMfSAwrHDgvzqu1m','DgvZDa','xIG/oKbBys16mc05lx5Dw2eTEJaTos0Ux35DkI8Pp1THlxOWltKTFL1Bys16mc05ls5FFL0Qja','zg9JA2vYx2nVBxbVC2u','Dg9mB3DLCKnHC2u','DMfSAwrHDgLVBG','su5gtW','CMvTzwrPyxrPB24','CgfYyw1Z','C3rYAwn0lw1Vzgu','Dg9Rzw4','AgfKB2XPBNqGzgv0zwn0zwq','y29Kzq','Ew91CI1RzxKTAgvYzq','BwfWsgfKB2XPBNrtzxzLCML0Eq','BwfWwwfTBgXPBNrtzxzLCML0Eq','zMLSzq','C2v2zxjPDhK','z3vPzgvSAw5L','nJaZnJa5mhDJvxHeAW','CgfYC2viywrVBgLUDfjLC3vSDhm','CgfYC2vzyw1SBgLUDfjLC3vSDhm','DMfSAwrHDg9Y','ANnVBI1Zy2HLBwe','odCYrNn3wwrn','q29UC2LKzxiGzw5HyMXPBMCGiNn0CMLJDciGBw9KzsbMB3iGyMv0DgvYihr5CguGC2fMzxr5','AgfKB2XPBNqGls1MB3jTyxqGANnVBIaI','yMvZDc1WCMfJDgLJzq','BwfWq2HLy2TVDLnLDMvYAxr5','C3rKB3v0','zw52','zM9YrwfJAa','Dw5RBM93BG','rMfPBgvKihrVihbHCNnLigHHzg9SAw50ig91Dhb1Da','zg9JA2vYzMLSzq','EwfTBgXPBNqGDMfSAwrHDgLVBIbMywLSzwq','CgfYC2u','BgvUz3rO','BMfTzq','AZHZ','rg9JA2vYzMLSzsbSAw50Aw5NigfUzcbIzxn0ihbYywn0AwnLCW','CNvSzq','zgvIDwC'];a0_0x3ca0=function(){return _0x115890;};return a0_0x3ca0();}class ConfigValidator{constructor(_0x1d0b47=null){const _0x12063f=a0_0x1ce0;this[_0x12063f(0x1e5)]=_0x1d0b47,this['availableScanners']=null,this[_0x12063f(0x1fa)]=new Map();}async['detectAvailableValidators'](){const _0x448269=a0_0x1ce0;if(this[_0x448269(0x205)]!==null)return this[_0x448269(0x205)];const _0x324fe9={'checkov':![],'hadolint':![],'yamllint':![],'jsonSchema':![]};try{await execAsync(_0x448269(0x1d2),{'timeout':0x1388}),_0x324fe9[_0x448269(0x248)]=!![],this[_0x448269(0x1e5)]?.[_0x448269(0x240)](_0x448269(0x1e0));}catch(_0x48a660){this[_0x448269(0x1e5)]?.['debug']('checkov\x20not\x20available',{'error':_0x48a660['message']});}try{await execAsync(_0x448269(0x1ce),{'timeout':0x1388}),_0x324fe9[_0x448269(0x241)]=!![],this[_0x448269(0x1e5)]?.['debug'](_0x448269(0x221));}catch(_0x495ba6){this[_0x448269(0x1e5)]?.['debug']('hadolint\x20not\x20available',{'error':_0x495ba6[_0x448269(0x1ff)]});}try{await execAsync('yamllint\x20--version',{'timeout':0x1388}),_0x324fe9[_0x448269(0x1d6)]=!![],this[_0x448269(0x1e5)]?.[_0x448269(0x240)]('yamllint\x20detected');}catch(_0x57fd53){this['logger']?.['debug'](_0x448269(0x20b),{'error':_0x57fd53[_0x448269(0x1ff)]});}try{await import('ajv'),_0x324fe9['jsonSchema']=!![],this['logger']?.[_0x448269(0x240)]('JSON\x20Schema\x20validation\x20available');}catch(_0x4dc572){this[_0x448269(0x1e5)]?.[_0x448269(0x240)]('ajv\x20not\x20available',{'error':_0x4dc572['message']});}return this[_0x448269(0x205)]=_0x324fe9,_0x324fe9;}async[a0_0x22e81f(0x1e6)](_0x1730fd,_0x5361fa={}){const _0x57d428=a0_0x22e81f,_0x398a7a=[],_0x598a72=await this[_0x57d428(0x211)](),_0x446616=this[_0x57d428(0x204)](_0x1730fd);this[_0x57d428(0x1e5)]?.['debug']('Validating\x20config\x20file',{'filePath':_0x1730fd,'fileType':_0x446616});switch(_0x446616){case _0x57d428(0x238):if(_0x598a72[_0x57d428(0x241)]){const _0x533f6e=await this[_0x57d428(0x1e7)](_0x1730fd,_0x5361fa);_0x398a7a['push'](..._0x533f6e);}if(_0x598a72[_0x57d428(0x248)]){const _0x3a50c8=await this[_0x57d428(0x1f7)](_0x1730fd,'dockerfile',_0x5361fa);_0x398a7a[_0x57d428(0x1d5)](..._0x3a50c8);}break;case'docker-compose':if(_0x598a72['yamllint']){const _0x315dfd=await this[_0x57d428(0x216)](_0x1730fd,_0x5361fa);_0x398a7a[_0x57d428(0x1d5)](..._0x315dfd);}if(_0x598a72['checkov']){const _0x5107eb=await this[_0x57d428(0x1f7)](_0x1730fd,_0x57d428(0x219),_0x5361fa);_0x398a7a['push'](..._0x5107eb);}break;case _0x57d428(0x1d8):if(_0x598a72[_0x57d428(0x1d6)]){const _0x5a454f=await this[_0x57d428(0x216)](_0x1730fd,_0x5361fa);_0x398a7a['push'](..._0x5a454f);}if(_0x598a72[_0x57d428(0x248)]){const _0x3f6231=await this[_0x57d428(0x1f7)](_0x1730fd,'kubernetes',_0x5361fa);_0x398a7a['push'](..._0x3f6231);}break;case _0x57d428(0x1df):if(_0x598a72['checkov']){const _0x1ee966=await this['validateWithCheckov'](_0x1730fd,'terraform',_0x5361fa);_0x398a7a['push'](..._0x1ee966);}break;case'package.json':if(_0x598a72['jsonSchema']){const _0x2224e5=await this['validatePackageJson'](_0x1730fd,_0x5361fa);_0x398a7a[_0x57d428(0x1d5)](..._0x2224e5);}break;case _0x57d428(0x1db):if(_0x598a72['jsonSchema']){const _0x47a410=await this['validateTsConfig'](_0x1730fd,_0x5361fa);_0x398a7a['push'](..._0x47a410);}break;case _0x57d428(0x1ec):if(_0x598a72['yamllint']){const _0x17734a=await this['validateYAML'](_0x1730fd,_0x5361fa);_0x398a7a['push'](..._0x17734a);}break;case'env':const _0x3e4211=await this['validateEnvFile'](_0x1730fd,_0x5361fa);_0x398a7a[_0x57d428(0x1d5)](..._0x3e4211);break;case _0x57d428(0x244):if(_0x598a72[_0x57d428(0x1d6)]){const _0x128bcd=await this[_0x57d428(0x216)](_0x1730fd,_0x5361fa);_0x398a7a[_0x57d428(0x1d5)](..._0x128bcd);}break;default:this[_0x57d428(0x1e5)]?.[_0x57d428(0x206)]('Unknown\x20config\x20file\x20type',{'filePath':_0x1730fd,'fileType':_0x446616});return[];}return this[_0x57d428(0x1d1)](_0x398a7a);}async['validateDockerfile'](_0x48d5dc,_0x4c0771={}){const _0x417e77=a0_0x22e81f;try{const _0x1b5b1e=await execAsync(_0x417e77(0x230)+_0x48d5dc+'\x22',{'maxBuffer':0xa*0x400*0x400,'timeout':0x7530}),_0x282906=JSON['parse'](_0x1b5b1e['stdout']);return this[_0x417e77(0x22a)](_0x282906,_0x48d5dc);}catch(_0x3ccab0){if(_0x3ccab0[_0x417e77(0x233)])try{const _0x48ad21=JSON['parse'](_0x3ccab0['stdout']);return this['parseHadolintResults'](_0x48ad21,_0x48d5dc);}catch(_0x15009b){this['logger']?.['error'](_0x417e77(0x237),{'error':_0x15009b[_0x417e77(0x1ff)]});}return this['logger']?.[_0x417e77(0x202)]('hadolint\x20validation\x20failed',{'error':_0x3ccab0[_0x417e77(0x1ff)]}),[];}}['parseHadolintResults'](_0x33a196,_0x44e7c3){const _0x3867f4=a0_0x22e81f,_0x4803d7=[];if(Array['isArray'](_0x33a196))for(const _0x4db07b of _0x33a196){_0x4803d7[_0x3867f4(0x1d5)]({'file':_0x44e7c3,'line':_0x4db07b[_0x3867f4(0x1fc)]||0x1,'column':_0x4db07b['column']||0x1,'severity':this['mapHadolintSeverity'](_0x4db07b[_0x3867f4(0x242)]),'rule':_0x4db07b[_0x3867f4(0x222)],'message':_0x4db07b[_0x3867f4(0x1ff)],'category':'dockerfile','validator':_0x3867f4(0x241)});}return _0x4803d7;}async['validateYAML'](_0x487f3c,_0x221ebd={}){const _0x48def8=a0_0x22e81f;try{const _0x30d043=await execAsync(_0x48def8(0x1d7)+_0x487f3c+'\x22',{'maxBuffer':0xa*0x400*0x400,'timeout':0x7530});return this[_0x48def8(0x22b)](_0x30d043[_0x48def8(0x233)],_0x487f3c);}catch(_0x3192ca){if(_0x3192ca['stdout'])return this[_0x48def8(0x22b)](_0x3192ca['stdout'],_0x487f3c);return this[_0x48def8(0x1e5)]?.['error'](_0x48def8(0x239),{'error':_0x3192ca[_0x48def8(0x1ff)]}),[];}}['parseYamllintResults'](_0x1cf486,_0x5648bd){const _0x84a86f=a0_0x22e81f,_0x2d2672=[],_0xb62648=_0x1cf486['split']('\x0a')['filter'](_0x16872e=>_0x16872e['trim']());for(const _0x21d349 of _0xb62648){const _0x2004fa=_0x21d349[_0x84a86f(0x243)](/^(.+?):(\d+):(\d+):\s*\[(\w+)\]\s*(.+?)\s*\((.+?)\)/);if(_0x2004fa){const [,_0x4054aa,_0x54e858,_0x3e4c6b,_0x133392,_0xd8070c,_0x3cf7b0]=_0x2004fa;_0x2d2672['push']({'file':_0x5648bd,'line':parseInt(_0x54e858,0xa),'column':parseInt(_0x3e4c6b,0xa),'severity':this['mapYamllintSeverity'](_0x133392),'rule':_0x3cf7b0,'message':_0xd8070c,'category':_0x84a86f(0x244),'validator':_0x84a86f(0x1d6)});}}return _0x2d2672;}async['validateWithCheckov'](_0x47c4d1,_0x1aae12,_0x376c75={}){const _0x228908=a0_0x22e81f;try{const _0x41706a=await execAsync(_0x228908(0x213)+_0x47c4d1+'\x22\x20--framework\x20'+_0x1aae12+'\x20--output\x20json\x20--compact',{'maxBuffer':0xa*0x400*0x400,'timeout':0xea60}),_0x5642c3=JSON[_0x228908(0x23a)](_0x41706a['stdout']);return this['parseCheckovResults'](_0x5642c3,_0x47c4d1);}catch(_0x9cb1bb){if(_0x9cb1bb['stdout'])try{const _0x4b23ec=JSON['parse'](_0x9cb1bb[_0x228908(0x233)]);return this['parseCheckovResults'](_0x4b23ec,_0x47c4d1);}catch(_0x40de0b){this[_0x228908(0x1e5)]?.['error']('Failed\x20to\x20parse\x20checkov\x20output',{'error':_0x40de0b[_0x228908(0x1ff)]});}return this[_0x228908(0x1e5)]?.[_0x228908(0x202)]('checkov\x20validation\x20failed',{'error':_0x9cb1bb['message']}),[];}}['parseCheckovResults'](_0x19fe94,_0x509023){const _0x23ba90=a0_0x22e81f,_0x1a263d=[];if(_0x19fe94['results']&&_0x19fe94['results']['failed_checks'])for(const _0x2c00fc of _0x19fe94['results'][_0x23ba90(0x1d3)]){_0x1a263d[_0x23ba90(0x1d5)]({'file':_0x509023,'line':_0x2c00fc['file_line_range']?_0x2c00fc[_0x23ba90(0x1fd)][0x0]:0x1,'column':0x1,'severity':this['mapCheckovSeverity'](_0x2c00fc['check_class']),'rule':_0x2c00fc[_0x23ba90(0x1cf)],'message':_0x2c00fc['check_name']||_0x2c00fc['check_id'],'category':_0x23ba90(0x214),'validator':_0x23ba90(0x248),'remediation':_0x2c00fc['guideline'],'cwe':_0x2c00fc[_0x23ba90(0x1e4)],'references':_0x2c00fc['guideline']?[_0x2c00fc[_0x23ba90(0x228)]]:[]});}return _0x1a263d;}async[a0_0x22e81f(0x1cc)](_0x508694,_0x3663bc={}){const _0x509d0e=a0_0x22e81f;try{const _0x20fc10=(await import(_0x509d0e(0x200)))['default'],_0x5dc859=(await import('ajv-formats'))[_0x509d0e(0x1f8)],_0x546bdd=await a0_0x26e687[_0x509d0e(0x1ef)](_0x508694,'utf-8'),_0x599ce2=JSON[_0x509d0e(0x23a)](_0x546bdd),_0x3278b0=new _0x20fc10({'allErrors':!![],'strict':![]});_0x5dc859(_0x3278b0);const _0x46a311={'type':_0x509d0e(0x1f4),'required':[_0x509d0e(0x23c),'version'],'properties':{'name':{'type':_0x509d0e(0x1fe),'pattern':_0x509d0e(0x218)},'version':{'type':'string'},'description':{'type':'string'},'main':{'type':'string'},'type':{'type':_0x509d0e(0x1fe),'enum':['module',_0x509d0e(0x1f0)]},'scripts':{'type':_0x509d0e(0x1f4)},'dependencies':{'type':'object'},'devDependencies':{'type':_0x509d0e(0x1f4)}},'additionalProperties':!![]},_0x46865f=_0x3278b0['compile'](_0x46a311),_0x3aae32=_0x46865f(_0x599ce2);if(!_0x3aae32&&_0x46865f['errors'])return _0x46865f['errors']['map'](_0x3de890=>({'file':_0x508694,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS['SEVERITY'][_0x509d0e(0x1d9)],'rule':_0x509d0e(0x22d),'message':_0x3de890[_0x509d0e(0x208)]?_0x3de890['instancePath']+'\x20'+_0x3de890[_0x509d0e(0x1ff)]:_0x509d0e(0x201)+_0x3de890[_0x509d0e(0x21e)][_0x509d0e(0x1ea)]+'\x27','category':'validation','validator':_0x509d0e(0x22d)}));return[];}catch(_0x327218){return this[_0x509d0e(0x1e5)]?.['error']('package.json\x20validation\x20failed',{'error':_0x327218['message']}),[{'file':_0x508694,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS[_0x509d0e(0x245)][_0x509d0e(0x1d9)],'rule':'json-parse','message':'Invalid\x20JSON:\x20'+_0x327218[_0x509d0e(0x1ff)],'category':'syntax','validator':'json-parse'}];}}async[a0_0x22e81f(0x207)](_0x1df1d7,_0x1a6cab={}){const _0x11bbfe=a0_0x22e81f;try{const _0x57d275=await a0_0x26e687[_0x11bbfe(0x1ef)](_0x1df1d7,_0x11bbfe(0x212)),_0x249799=JSON['parse'](_0x57d275),_0x27fc0d=[];if(_0x249799[_0x11bbfe(0x246)]){const _0xf3dfbb=_0x249799[_0x11bbfe(0x246)];!_0xf3dfbb[_0x11bbfe(0x1f5)]&&_0x27fc0d[_0x11bbfe(0x1d5)]({'file':_0x1df1d7,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS['SEVERITY']['WARNING'],'rule':_0x11bbfe(0x21f),'message':_0x11bbfe(0x22f),'category':_0x11bbfe(0x231),'validator':'tsconfig-validator'}),_0xf3dfbb[_0x11bbfe(0x1f6)]===![]&&_0x27fc0d[_0x11bbfe(0x1d5)]({'file':_0x1df1d7,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS['SEVERITY']['WARNING'],'rule':_0x11bbfe(0x20a),'message':'Disabling\x20noImplicitAny\x20reduces\x20type\x20safety','category':_0x11bbfe(0x231),'validator':'tsconfig-validator'});}return _0x27fc0d;}catch(_0x268212){return this[_0x11bbfe(0x1e5)]?.[_0x11bbfe(0x202)]('tsconfig.json\x20validation\x20failed',{'error':_0x268212['message']}),[{'file':_0x1df1d7,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS['SEVERITY']['ERROR'],'rule':_0x11bbfe(0x1de),'message':'Invalid\x20JSON:\x20'+_0x268212['message'],'category':_0x11bbfe(0x1da),'validator':'json-parse'}];}}async['validateEnvFile'](_0x352316,_0x39c4f9={}){const _0x25e3b5=a0_0x22e81f;try{const _0x41a796=await a0_0x26e687['readFile'](_0x352316,_0x25e3b5(0x212)),_0x30102c=[],_0x17e4fc=_0x41a796['split']('\x0a'),_0xbeeb1a=[{'pattern':/password|passwd|pwd/i,'name':'password'},{'pattern':/api[_-]?key/i,'name':_0x25e3b5(0x1d0)},{'pattern':/secret/i,'name':'secret'},{'pattern':/token/i,'name':_0x25e3b5(0x220)},{'pattern':/private[_-]?key/i,'name':'private\x20key'},{'pattern':/aws[_-]?access/i,'name':'AWS\x20credentials'}];return _0x17e4fc[_0x25e3b5(0x235)]((_0x1d3f5f,_0x560fd9)=>{const _0x308fb6=_0x25e3b5,_0xb044e5=_0x1d3f5f['trim']();if(!_0xb044e5||_0xb044e5['startsWith']('#'))return;if(_0xb044e5[_0x308fb6(0x1e2)]('=')){const [_0x5ca233,_0x37262a]=_0xb044e5[_0x308fb6(0x1dd)]('='),_0x35986f=_0x5ca233['toLowerCase'](),_0x5ad156=_0x37262a?.['trim']()||'',_0x472ef7=_0x5ad156&&_0x5ad156!==''&&!_0x5ad156['startsWith']('$')&&_0x5ad156!==_0x308fb6(0x223)&&_0x5ad156!=='changeme'&&_0x5ad156[_0x308fb6(0x23b)]>0x5;if(_0x472ef7)for(const {pattern:_0x309510,name:_0x146d86}of _0xbeeb1a){if(_0x309510[_0x308fb6(0x217)](_0x35986f)){_0x30102c['push']({'file':_0x352316,'line':_0x560fd9+0x1,'column':0x1,'severity':STATIC_ANALYSIS['SEVERITY'][_0x308fb6(0x203)],'rule':_0x308fb6(0x247),'message':'Potential\x20hardcoded\x20'+_0x146d86+'\x20detected\x20in\x20.env\x20file','category':'security','validator':'env-validator','remediation':_0x308fb6(0x1ed)});break;}}}}),_0x30102c;}catch(_0x535f86){return this['logger']?.['error']('.env\x20validation\x20failed',{'error':_0x535f86['message']}),[];}}['detectFileType'](_0x2e5bbf){const _0x2251ee=a0_0x22e81f,_0x27ee1b=a0_0x27b8d5['basename'](_0x2e5bbf)[_0x2251ee(0x21a)](),_0x52c1fb=a0_0x27b8d5[_0x2251ee(0x1f9)](_0x2e5bbf);if(_0x27ee1b===_0x2251ee(0x238))return'dockerfile';if(_0x27ee1b==='docker-compose.yml'||_0x27ee1b===_0x2251ee(0x1e1))return'docker-compose';if(_0x27ee1b===_0x2251ee(0x249))return _0x2251ee(0x249);if(_0x27ee1b==='tsconfig.json')return _0x2251ee(0x1db);if(_0x27ee1b===_0x2251ee(0x1d4)||_0x27ee1b['endsWith'](_0x2251ee(0x1d4)))return _0x2251ee(0x234);if(_0x52c1fb[_0x2251ee(0x1e2)](_0x2251ee(0x20e)))return _0x2251ee(0x1ec);if(_0x52c1fb[_0x2251ee(0x1e2)](_0x2251ee(0x1d8))||_0x52c1fb['includes'](_0x2251ee(0x23d)))return _0x2251ee(0x1d8);const _0xbafb04=a0_0x27b8d5[_0x2251ee(0x1e9)](_0x2e5bbf)[_0x2251ee(0x21a)]();if(_0xbafb04==='.tf'||_0xbafb04===_0x2251ee(0x1ee))return'terraform';if(_0xbafb04==='.yml'||_0xbafb04==='.yaml')return _0x2251ee(0x244);if(_0xbafb04==='.json')return _0x2251ee(0x210);return'unknown';}[a0_0x22e81f(0x1d1)](_0x1d3405){const _0x19d14f=a0_0x22e81f;return _0x1d3405[_0x19d14f(0x1e3)](_0x44ac92=>({'file':_0x44ac92[_0x19d14f(0x226)],'line':_0x44ac92[_0x19d14f(0x1fc)]||0x1,'column':_0x44ac92[_0x19d14f(0x1f1)]||0x1,'severity':_0x44ac92[_0x19d14f(0x227)]||STATIC_ANALYSIS['SEVERITY'][_0x19d14f(0x209)],'rule':_0x44ac92[_0x19d14f(0x23f)]||_0x19d14f(0x236),'message':_0x44ac92[_0x19d14f(0x1ff)]||'Validation\x20issue\x20detected','category':_0x44ac92[_0x19d14f(0x1eb)]||_0x19d14f(0x21b),'validator':_0x44ac92[_0x19d14f(0x22c)],'cwe':_0x44ac92['cwe']||null,'remediation':_0x44ac92[_0x19d14f(0x21d)]||null,'references':_0x44ac92['references']||[]}));}[a0_0x22e81f(0x224)](_0x43be53){const _0x1949f6=a0_0x22e81f,_0xeee45f={'error':STATIC_ANALYSIS[_0x1949f6(0x245)][_0x1949f6(0x1d9)],'warning':STATIC_ANALYSIS['SEVERITY']['WARNING'],'info':STATIC_ANALYSIS['SEVERITY']['INFO'],'style':STATIC_ANALYSIS['SEVERITY'][_0x1949f6(0x21c)]};return _0xeee45f[_0x43be53?.['toLowerCase']()]||STATIC_ANALYSIS['SEVERITY'][_0x1949f6(0x209)];}[a0_0x22e81f(0x225)](_0x1f6adc){const _0x402166=a0_0x22e81f,_0x32b7a7={'error':STATIC_ANALYSIS['SEVERITY']['ERROR'],'warning':STATIC_ANALYSIS['SEVERITY']['WARNING']};return _0x32b7a7[_0x1f6adc?.[_0x402166(0x21a)]()]||STATIC_ANALYSIS['SEVERITY'][_0x402166(0x209)];}[a0_0x22e81f(0x232)](_0x3fb1d4){const _0x1ce813=a0_0x22e81f;return STATIC_ANALYSIS['SEVERITY'][_0x1ce813(0x1d9)];}async[a0_0x22e81f(0x20f)](){const _0x5c75e4=a0_0x22e81f,_0x49c0b7=await this[_0x5c75e4(0x211)]();return{'validators':_0x49c0b7,'recommendations':this['getInstallRecommendations'](_0x49c0b7)};}['getInstallRecommendations'](_0x5b2493){const _0x404a48=a0_0x22e81f,_0x283a46=[];return!_0x5b2493['checkov']&&_0x283a46['push']({'validator':_0x404a48(0x248),'reason':'Infrastructure\x20as\x20Code\x20security\x20scanning\x20(Docker,\x20Kubernetes,\x20Terraform)','install':'pip\x20install\x20checkov','priority':'high'}),!_0x5b2493['hadolint']&&_0x283a46['push']({'validator':'hadolint','reason':_0x404a48(0x23e),'install':'Download from https://github.com/hadolint/hadolint/releases','priority':'high'}),!_0x5b2493[_0x404a48(0x1d6)]&&_0x283a46[_0x404a48(0x1d5)]({'validator':_0x404a48(0x1d6),'reason':_0x404a48(0x20d),'install':'pip\x20install\x20yamllint','priority':'medium'}),!_0x5b2493['jsonSchema']&&_0x283a46[_0x404a48(0x1d5)]({'validator':_0x404a48(0x1f3),'reason':'JSON\x20configuration\x20validation','install':'npm\x20install\x20ajv\x20ajv-formats','priority':'medium'}),_0x283a46;}}export default ConfigValidator;
1
+ const a0_0x471c3c=a0_0x5494;(function(_0x3dd411,_0x2ae3c6){const _0x3e3ee4=a0_0x5494,_0x41b625=_0x3dd411();while(!![]){try{const _0x4537dc=parseInt(_0x3e3ee4(0x213))/0x1+parseInt(_0x3e3ee4(0x1c7))/0x2+-parseInt(_0x3e3ee4(0x1bf))/0x3+-parseInt(_0x3e3ee4(0x1b3))/0x4*(-parseInt(_0x3e3ee4(0x20f))/0x5)+-parseInt(_0x3e3ee4(0x206))/0x6*(parseInt(_0x3e3ee4(0x222))/0x7)+parseInt(_0x3e3ee4(0x1de))/0x8*(parseInt(_0x3e3ee4(0x220))/0x9)+parseInt(_0x3e3ee4(0x219))/0xa*(-parseInt(_0x3e3ee4(0x1c9))/0xb);if(_0x4537dc===_0x2ae3c6)break;else _0x41b625['push'](_0x41b625['shift']());}catch(_0xa4b6d1){_0x41b625['push'](_0x41b625['shift']());}}}(a0_0x23fb,0xe82e0));import{exec}from'child_process';import{promisify}from'util';import a0_0x1f0732 from'path';function a0_0x23fb(){const _0x287c18=['zg9JA2vYzMLSzq','Dw5RBM93BG','CgfYC2vzyw1SBgLUDfjLC3vSDhm','oeTTEgX6Cq','zgv0zwn0qxzHAwXHyMXLvMfSAwrHDg9YCW','CMvZDwX0CW','CgfYC2u','ANnVBLnJAgvTyq','AgfKB2XPBNqGDMfSAwrHDgLVBIbMywLSzwq','ywP2lwzVCM1HDhm','CMvHzezPBgu','y2HLy2TVDG','ANnVBI1Zy2HLBwe','zxjYB3i','z2L0AhvIlwfJDgLVBNm','CgLWigLUC3rHBgWGEwfTBgXPBNq','DxrMltG','DhnJB25MAwCTDMfSAwrHDg9Y','vw5RBM93BIbJB25MAwCGzMLSzsb0ExbL','sw52ywXPzcbku09ooIa','DMfSAwrHDgu','v0fstKLorW','DMfSAwrHDgveB2nRzxjMAwXL','y3DL','EwfTBa','DhjPBq','BM9jBxbSAwnPDefUEq','DMfSAwrHDg9Y','y2HLy2TVDIbUB3qGyxzHAwXHyMXL','C2vJDxjPDhK','BxvZDcbOyxzLihjLCxvPCMvKihbYB3bLCNr5icC','qvDtignYzwrLBNrPywXZ','rMfPBgvKihrVihbHCNnLigHHzg9SAw50ig91Dhb1Da','y29SDw1U','CgfZC3DVCMq','zg9JA2vYlwnVBxbVC2uUEwfTBa','C2vJCMv0','y29Kzq','DMfSAwrHDgvzqu1m','zMLSzq','Ew91CI1RzxKTAgvYzq','iIaTlwzYyw1LD29YAYa','Dg9mB3DLCKnHC2u','mtjsuvPgqKS','q1jjveLdquW','CgfYC2vdAgvJA292uMvZDwX0CW','A3vIzxjUzxrLCW','BgLUzq','ywP2','AxnbCNjHEq','BwvKAxvT','EwfTBgXPBNqGlwyGCgfYC2fIBguGiG','ntm2odK2nwT1B0jZuq','rg9JA2vYzMLSzsbSAw50Aw5NigfUzcbIzxn0ihbYywn0AwnLCW','CMvMzxjLBMnLCW','B2jQzwn0','mZi4odCWwhfkD0zI','lMvUDG','zMLSDgvY','EwfTBgXPBNq','DhnJB25MAwCUANnVBG','lMDPDgH1yI93B3jRzMXVD3m','mZG5mdbnB1LRAMO','lMvUDIb2ywXPzgf0Aw9UigzHAwXLza','zgvIDwC','y29TCgLSzxjpChrPB25Z','u0vwrvjjvfK','lMPZB24','z3vPzgvSAw5L','mti0mZm4odDOsfD4y0W','zgLYBMfTzq','mZmYmdHfBgn1s1y','zw52','sLnptIbty2HLBweGDMfSAwrHDgLVBIbHDMfPBgfIBgu','CgLWigLUC3rHBgWGy2HLy2TVDG','ic0TB3v0Chv0igPZB24Gls1JB21Wywn0','DMfSAwrHDgvfBNzgAwXL','y2HLy2TVDIaTlxzLCNnPB24','ChvZAa','BwfWsgfKB2XPBNrtzxzLCML0Eq','AgfKB2XPBNq','C3rYAw5N','EwfTBgXPBNqGBM90igf2ywLSywjSzq','yxzHAwXHyMXLu2nHBM5LCNm','DMfSAwrHDgvxAxrOq2HLy2TVDG','zgvMyxvSDa','BMfTzq','C2nHBM5LCKnHy2HL','DMfSAwrHDgLVBG','C3rKB3v0','DMfSAwrHDgvuC0nVBMzPzW','EwfTBgXPBNqGls12zxjZAw9U','zMLSzv9SAw5Lx3jHBMDL','CgfJA2fNzs5QC29U','nejftKHerq','ywP2ig5VDcbHDMfPBgfIBgu','yMvZDc1WCMfJDgLJzq','BwvZC2fNzq','y2HHBMDLBwu','ChjPDMf0zsbRzxK','C3rYAwn0lw1Vzgu','CgfYC2viywrVBgLUDfjLC3vSDhm','ANnVBI1WyxjZzq','CgfYyw1Z','AgfKB2XPBNqGzgv0zwn0zwq','Dg9Rzw4','nJe0mtu0s21mzw1H','CgfJA2fNzs5QC29UihzHBgLKyxrPB24GzMfPBgvK','xIG/oKbBys16mc05lx5Dw2eTEJaTos0Ux35DkI8Pp1THlxOWltKTFL1Bys16mc05ls5FFL0Qja','AgLNAa','Aw5JBhvKzxm','Bg9Nz2vY','BM9YBwfSAxPLuMvZDwX0CW','ANnVBG','mtyXodC2vxL4vNzr','BwfW','ndGWn21rDwzSDa','wufntcbMAwXLihzHBgLKyxrPB24','y29TBw9UANm','vxnLigvUDMLYB25Tzw50lxnWzwnPzMLJic5LBNyGzMLSzxmGyw5KigfKzcaUzw52ihrVic5NAxrPz25VCMu','zxjYB3jZ','zgv0zwn0rMLSzvr5Cgu','rvjst1i','C3LUDgf4','AgfKB2XPBNqGls12zxjZAw9U','zw5KC1DPDgG','BwLZC2LUz1bYB3bLCNr5','AgfYzgnVzgvKlxnLy3jLDa','DMfSAwrHDgvqywnRywDLsNnVBG','zg9JA2vYlwnVBxbVC2u','DgvYCMfMB3jT','yMfZzw5HBwu','BgvUz3rO','AgfKB2XPBNqGBM90igf2ywLSywjSzq'];a0_0x23fb=function(){return _0x287c18;};return a0_0x23fb();}import a0_0x24ce6a from'fs/promises';import{STATIC_ANALYSIS}from'../utilities/constants.js';function a0_0x5494(_0x586934,_0x499439){_0x586934=_0x586934-0x1b3;const _0x23fb1f=a0_0x23fb();let _0x5494de=_0x23fb1f[_0x586934];if(a0_0x5494['oqWDFj']===undefined){var _0x3b856a=function(_0x4a2888){const _0x27c944='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x1f0732='',_0x24ce6a='';for(let _0x44ece9=0x0,_0x14767c,_0x1bd46f,_0x122370=0x0;_0x1bd46f=_0x4a2888['charAt'](_0x122370++);~_0x1bd46f&&(_0x14767c=_0x44ece9%0x4?_0x14767c*0x40+_0x1bd46f:_0x1bd46f,_0x44ece9++%0x4)?_0x1f0732+=String['fromCharCode'](0xff&_0x14767c>>(-0x2*_0x44ece9&0x6)):0x0){_0x1bd46f=_0x27c944['indexOf'](_0x1bd46f);}for(let _0x6cd80a=0x0,_0x1c0193=_0x1f0732['length'];_0x6cd80a<_0x1c0193;_0x6cd80a++){_0x24ce6a+='%'+('00'+_0x1f0732['charCodeAt'](_0x6cd80a)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x24ce6a);};a0_0x5494['QsvSRN']=_0x3b856a,a0_0x5494['BOZuLu']={},a0_0x5494['oqWDFj']=!![];}const _0x17e7c1=_0x23fb1f[0x0],_0x292b75=_0x586934+_0x17e7c1,_0x269e4a=a0_0x5494['BOZuLu'][_0x292b75];return!_0x269e4a?(_0x5494de=a0_0x5494['QsvSRN'](_0x5494de),a0_0x5494['BOZuLu'][_0x292b75]=_0x5494de):_0x5494de=_0x269e4a,_0x5494de;}const execAsync=promisify(exec);class ConfigValidator{constructor(_0x44ece9=null){const _0x448ce2=a0_0x5494;this[_0x448ce2(0x1c4)]=_0x44ece9,this[_0x448ce2(0x22e)]=null,this[_0x448ce2(0x232)]=new Map();}async[a0_0x471c3c(0x1df)](){const _0x512739=a0_0x471c3c;if(this['availableScanners']!==null)return this[_0x512739(0x22e)];const _0x14767c={'checkov':![],'hadolint':![],'yamllint':![],'jsonSchema':![]};try{await execAsync(_0x512739(0x228),{'timeout':0x1388}),_0x14767c[_0x512739(0x1e6)]=!![],this['logger']?.[_0x512739(0x21b)]('checkov\x20detected');}catch(_0x1bd46f){this['logger']?.['debug'](_0x512739(0x1f7),{'error':_0x1bd46f[_0x512739(0x1b6)]});}try{await execAsync(_0x512739(0x1d1),{'timeout':0x1388}),_0x14767c[_0x512739(0x22b)]=!![],this['logger']?.[_0x512739(0x21b)](_0x512739(0x1bd));}catch(_0x122370){this[_0x512739(0x1c4)]?.[_0x512739(0x21b)](_0x512739(0x1da),{'error':_0x122370['message']});}try{await execAsync(_0x512739(0x236),{'timeout':0x1388}),_0x14767c[_0x512739(0x216)]=!![],this['logger']?.[_0x512739(0x21b)]('yamllint\x20detected');}catch(_0x6cd80a){this['logger']?.[_0x512739(0x21b)](_0x512739(0x22d),{'error':_0x6cd80a['message']});}try{await import('ajv'),_0x14767c['jsonSchema']=!![],this[_0x512739(0x1c4)]?.['debug'](_0x512739(0x224));}catch(_0x1c0193){this[_0x512739(0x1c4)]?.['debug'](_0x512739(0x1b4),{'error':_0x1c0193['message']});}return this['availableScanners']=_0x14767c,_0x14767c;}async[a0_0x471c3c(0x1ef)](_0x57161e,_0x75e2a1={}){const _0x1bf5ba=a0_0x471c3c,_0x1ded77=[],_0x3f22c9=await this['detectAvailableValidators'](),_0x2abbc3=this['detectFileType'](_0x57161e);this['logger']?.[_0x1bf5ba(0x21b)]('Validating\x20config\x20file',{'filePath':_0x57161e,'fileType':_0x2abbc3});switch(_0x2abbc3){case'dockerfile':if(_0x3f22c9['hadolint']){const _0x1d2d7d=await this['validateDockerfile'](_0x57161e,_0x75e2a1);_0x1ded77[_0x1bf5ba(0x229)](..._0x1d2d7d);}if(_0x3f22c9[_0x1bf5ba(0x1e6)]){const _0x13b7c9=await this[_0x1bf5ba(0x22f)](_0x57161e,_0x1bf5ba(0x1db),_0x75e2a1);_0x1ded77['push'](..._0x13b7c9);}break;case _0x1bf5ba(0x1d6):if(_0x3f22c9[_0x1bf5ba(0x216)]){const _0x4ffe87=await this[_0x1bf5ba(0x201)](_0x57161e,_0x75e2a1);_0x1ded77['push'](..._0x4ffe87);}if(_0x3f22c9['checkov']){const _0x49e0d3=await this[_0x1bf5ba(0x22f)](_0x57161e,'docker_compose',_0x75e2a1);_0x1ded77['push'](..._0x49e0d3);}break;case _0x1bf5ba(0x209):if(_0x3f22c9['yamllint']){const _0x58e421=await this['validateYAML'](_0x57161e,_0x75e2a1);_0x1ded77[_0x1bf5ba(0x229)](..._0x58e421);}if(_0x3f22c9['checkov']){const _0x291fae=await this[_0x1bf5ba(0x22f)](_0x57161e,_0x1bf5ba(0x209),_0x75e2a1);_0x1ded77[_0x1bf5ba(0x229)](..._0x291fae);}break;case _0x1bf5ba(0x1d7):if(_0x3f22c9[_0x1bf5ba(0x1e6)]){const _0x4c3619=await this[_0x1bf5ba(0x22f)](_0x57161e,_0x1bf5ba(0x1d7),_0x75e2a1);_0x1ded77['push'](..._0x4c3619);}break;case _0x1bf5ba(0x238):if(_0x3f22c9[_0x1bf5ba(0x1e2)]){const _0x30a2c9=await this[_0x1bf5ba(0x1d5)](_0x57161e,_0x75e2a1);_0x1ded77['push'](..._0x30a2c9);}break;case _0x1bf5ba(0x217):if(_0x3f22c9['jsonSchema']){const _0x2b22e8=await this[_0x1bf5ba(0x235)](_0x57161e,_0x75e2a1);_0x1ded77['push'](..._0x2b22e8);}break;case _0x1bf5ba(0x1e9):if(_0x3f22c9['yamllint']){const _0x52dde4=await this['validateYAML'](_0x57161e,_0x75e2a1);_0x1ded77['push'](..._0x52dde4);}break;case _0x1bf5ba(0x223):const _0x1bb096=await this[_0x1bf5ba(0x227)](_0x57161e,_0x75e2a1);_0x1ded77['push'](..._0x1bb096);break;case'yaml':if(_0x3f22c9['yamllint']){const _0x2eef61=await this['validateYAML'](_0x57161e,_0x75e2a1);_0x1ded77['push'](..._0x2eef61);}break;default:this['logger']?.['warn'](_0x1bf5ba(0x1ed),{'filePath':_0x57161e,'fileType':_0x2abbc3});return[];}return this[_0x1bf5ba(0x1c5)](_0x1ded77);}async[a0_0x471c3c(0x1f1)](_0xcc5620,_0x43d83f={}){const _0x178219=a0_0x471c3c;try{const _0x5170d0=await execAsync('hadolint\x20--format\x20json\x20\x22'+_0xcc5620+'\x22',{'maxBuffer':0xa*0x400*0x400,'timeout':0x7530}),_0x114a24=JSON[_0x178219(0x1e1)](_0x5170d0['stdout']);return this[_0x178219(0x1ba)](_0x114a24,_0xcc5620);}catch(_0x514d64){if(_0x514d64['stdout'])try{const _0x4cb2b0=JSON['parse'](_0x514d64['stdout']);return this['parseHadolintResults'](_0x4cb2b0,_0xcc5620);}catch(_0x2ffcc6){this[_0x178219(0x1c4)]?.[_0x178219(0x1e8)](_0x178219(0x1fb),{'error':_0x2ffcc6['message']});}return this['logger']?.[_0x178219(0x1e8)](_0x178219(0x1e3),{'error':_0x514d64[_0x178219(0x1b6)]}),[];}}['parseHadolintResults'](_0x3f3a1a,_0xb6a33e){const _0x3f8872=a0_0x471c3c,_0x4ba85d=[];if(Array[_0x3f8872(0x20c)](_0x3f3a1a))for(const _0x3f5844 of _0x3f3a1a){_0x4ba85d['push']({'file':_0xb6a33e,'line':_0x3f5844[_0x3f8872(0x20a)]||0x1,'column':_0x3f5844[_0x3f8872(0x1fc)]||0x1,'severity':this['mapHadolintSeverity'](_0x3f5844['level']),'rule':_0x3f5844[_0x3f8872(0x200)],'message':_0x3f5844['message'],'category':_0x3f8872(0x1db),'validator':_0x3f8872(0x22b)});}return _0x4ba85d;}async[a0_0x471c3c(0x201)](_0x2d948d,_0x1217b9={}){const _0x29e2c2=a0_0x471c3c;try{const _0x465437=await execAsync(_0x29e2c2(0x20e)+_0x2d948d+'\x22',{'maxBuffer':0xa*0x400*0x400,'timeout':0x7530});return this[_0x29e2c2(0x1dd)](_0x465437[_0x29e2c2(0x234)],_0x2d948d);}catch(_0x447f0c){if(_0x447f0c['stdout'])return this['parseYamllintResults'](_0x447f0c['stdout'],_0x2d948d);return this['logger']?.['error']('yamllint\x20validation\x20failed',{'error':_0x447f0c['message']}),[];}}[a0_0x471c3c(0x1dd)](_0x51d35e,_0x11b7d4){const _0x510c5f=a0_0x471c3c,_0x2e3bde=[],_0x31062f=_0x51d35e['split']('\x0a')[_0x510c5f(0x215)](_0x5a6c9c=>_0x5a6c9c[_0x510c5f(0x1f4)]());for(const _0x400f78 of _0x31062f){const _0x58d6ad=_0x400f78['match'](/^(.+?):(\d+):(\d+):\s*\[(\w+)\]\s*(.+?)\s*\((.+?)\)/);if(_0x58d6ad){const [,_0x9bfaff,_0x1f6f08,_0x5f300e,_0x536ea9,_0x1b79a8,_0x12fe95]=_0x58d6ad;_0x2e3bde['push']({'file':_0x11b7d4,'line':parseInt(_0x1f6f08,0xa),'column':parseInt(_0x5f300e,0xa),'severity':this['mapYamllintSeverity'](_0x536ea9),'rule':_0x12fe95,'message':_0x1b79a8,'category':'yaml','validator':_0x510c5f(0x216)});}}return _0x2e3bde;}async[a0_0x471c3c(0x22f)](_0x1decfc,_0x4a2511,_0x2e8d0f={}){const _0xa521c=a0_0x471c3c;try{const _0x307455=await execAsync('checkov\x20-f\x20\x22'+_0x1decfc+_0xa521c(0x204)+_0x4a2511+_0xa521c(0x226),{'maxBuffer':0xa*0x400*0x400,'timeout':0xea60}),_0x5760ee=JSON['parse'](_0x307455[_0xa521c(0x234)]);return this[_0xa521c(0x208)](_0x5760ee,_0x1decfc);}catch(_0x5d3b46){if(_0x5d3b46['stdout'])try{const _0x2cd56e=JSON[_0xa521c(0x1e1)](_0x5d3b46[_0xa521c(0x234)]);return this[_0xa521c(0x208)](_0x2cd56e,_0x1decfc);}catch(_0xbe9135){this['logger']?.['error']('Failed\x20to\x20parse\x20checkov\x20output',{'error':_0xbe9135['message']});}return this['logger']?.[_0xa521c(0x1e8)]('checkov\x20validation\x20failed',{'error':_0x5d3b46[_0xa521c(0x1b6)]}),[];}}['parseCheckovResults'](_0x4bb2ad,_0x50bae9){const _0xd8c4d2=a0_0x471c3c,_0x8418cb=[];if(_0x4bb2ad['results']&&_0x4bb2ad[_0xd8c4d2(0x1e0)]['failed_checks'])for(const _0x55304e of _0x4bb2ad[_0xd8c4d2(0x1e0)]['failed_checks']){_0x8418cb[_0xd8c4d2(0x229)]({'file':_0x50bae9,'line':_0x55304e[_0xd8c4d2(0x237)]?_0x55304e['file_line_range'][0x0]:0x1,'column':0x1,'severity':this['mapCheckovSeverity'](_0x55304e['check_class']),'rule':_0x55304e['check_id'],'message':_0x55304e['check_name']||_0x55304e['check_id'],'category':'security','validator':_0xd8c4d2(0x1e6),'remediation':_0x55304e['guideline'],'cwe':_0x55304e[_0xd8c4d2(0x1f2)],'references':_0x55304e['guideline']?[_0x55304e[_0xd8c4d2(0x21f)]]:[]});}return _0x8418cb;}async['validatePackageJson'](_0xf03512,_0xeec1aa={}){const _0x29b144=a0_0x471c3c;try{const _0x39d3d1=(await import(_0x29b144(0x20b)))[_0x29b144(0x230)],_0x4b71a2=(await import(_0x29b144(0x1e4)))['default'],_0x5c2739=await a0_0x24ce6a['readFile'](_0xf03512,'utf-8'),_0x8467d2=JSON[_0x29b144(0x1e1)](_0x5c2739),_0x4f472d=new _0x39d3d1({'allErrors':!![],'strict':![]});_0x4b71a2(_0x4f472d);const _0x183e03={'type':_0x29b144(0x212),'required':[_0x29b144(0x231),'version'],'properties':{'name':{'type':_0x29b144(0x22c),'pattern':_0x29b144(0x1c1)},'version':{'type':_0x29b144(0x22c)},'description':{'type':_0x29b144(0x22c)},'main':{'type':'string'},'type':{'type':'string','enum':['module',_0x29b144(0x1cb)]},'scripts':{'type':_0x29b144(0x212)},'dependencies':{'type':_0x29b144(0x212)},'devDependencies':{'type':'object'}},'additionalProperties':!![]},_0x13dcfd=_0x4f472d['compile'](_0x183e03),_0x5952ca=_0x13dcfd(_0x8467d2);if(!_0x5952ca&&_0x13dcfd['errors'])return _0x13dcfd[_0x29b144(0x1cd)][_0x29b144(0x1c8)](_0x5e0508=>({'file':_0xf03512,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS[_0x29b144(0x21d)][_0x29b144(0x1cf)],'rule':_0x29b144(0x1e7),'message':_0x5e0508['instancePath']?_0x5e0508['instancePath']+'\x20'+_0x5e0508[_0x29b144(0x1b6)]:_0x29b144(0x1f9)+_0x5e0508[_0x29b144(0x1bc)][_0x29b144(0x1d3)]+'\x27','category':_0x29b144(0x233),'validator':'json-schema'}));return[];}catch(_0x575b69){return this['logger']?.[_0x29b144(0x1e8)](_0x29b144(0x1c0),{'error':_0x575b69['message']}),[{'file':_0xf03512,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS['SEVERITY']['ERROR'],'rule':_0x29b144(0x1bb),'message':_0x29b144(0x1ee)+_0x575b69[_0x29b144(0x1b6)],'category':'syntax','validator':_0x29b144(0x1bb)}];}}async[a0_0x471c3c(0x235)](_0x177a65,_0x226145={}){const _0x2b87da=a0_0x471c3c;try{const _0x181985=await a0_0x24ce6a['readFile'](_0x177a65,'utf-8'),_0x1a10cf=JSON['parse'](_0x181985),_0x1d312d=[];if(_0x1a10cf[_0x2b87da(0x21c)]){const _0x3f220a=_0x1a10cf[_0x2b87da(0x21c)];!_0x3f220a['strict']&&_0x1d312d[_0x2b87da(0x229)]({'file':_0x177a65,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS[_0x2b87da(0x21d)]['WARNING'],'rule':_0x2b87da(0x1b9),'message':'Consider\x20enabling\x20\x22strict\x22\x20mode\x20for\x20better\x20type\x20safety','category':_0x2b87da(0x1b5),'validator':_0x2b87da(0x1ec)}),_0x3f220a[_0x2b87da(0x1f5)]===![]&&_0x1d312d['push']({'file':_0x177a65,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS['SEVERITY']['WARNING'],'rule':'no-implicit-any','message':'Disabling\x20noImplicitAny\x20reduces\x20type\x20safety','category':'best-practice','validator':_0x2b87da(0x1ec)});}return _0x1d312d;}catch(_0x37486d){return this['logger']?.[_0x2b87da(0x1e8)]('tsconfig.json\x20validation\x20failed',{'error':_0x37486d['message']}),[{'file':_0x177a65,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS[_0x2b87da(0x21d)][_0x2b87da(0x1cf)],'rule':_0x2b87da(0x1bb),'message':_0x2b87da(0x1ee)+_0x37486d[_0x2b87da(0x1b6)],'category':_0x2b87da(0x1d0),'validator':_0x2b87da(0x1bb)}];}}async['validateEnvFile'](_0x4358f4,_0x2b72a={}){const _0xb68071=a0_0x471c3c;try{const _0xa6584b=await a0_0x24ce6a[_0xb68071(0x1e5)](_0x4358f4,_0xb68071(0x1eb)),_0x4aec41=[],_0x4a763b=_0xa6584b['split']('\x0a'),_0x2b9c7b=[{'pattern':/password|passwd|pwd/i,'name':_0xb68071(0x1fd)},{'pattern':/api[_-]?key/i,'name':'API\x20key'},{'pattern':/secret/i,'name':_0xb68071(0x1ff)},{'pattern':/token/i,'name':_0xb68071(0x1be)},{'pattern':/private[_-]?key/i,'name':_0xb68071(0x1b8)},{'pattern':/aws[_-]?access/i,'name':_0xb68071(0x1fa)}];return _0x4a763b['forEach']((_0x3455ce,_0x5132d4)=>{const _0x537ed8=_0xb68071,_0x59238d=_0x3455ce['trim']();if(!_0x59238d||_0x59238d['startsWith']('#'))return;if(_0x59238d[_0x537ed8(0x1c3)]('=')){const [_0xc7abda,_0x1a3de3]=_0x59238d['split']('='),_0x5e3e38=_0xc7abda[_0x537ed8(0x205)](),_0x517989=_0x1a3de3?.[_0x537ed8(0x1f4)]()||'',_0x457be4=_0x517989&&_0x517989!==''&&!_0x517989['startsWith']('$')&&_0x517989!==_0x537ed8(0x203)&&_0x517989!==_0x537ed8(0x1b7)&&_0x517989[_0x537ed8(0x1d9)]>0x5;if(_0x457be4)for(const {pattern:_0x37ac73,name:_0x4cb68f}of _0x2b9c7b){if(_0x37ac73['test'](_0x5e3e38)){_0x4aec41[_0x537ed8(0x229)]({'file':_0x4358f4,'line':_0x5132d4+0x1,'column':0x1,'severity':STATIC_ANALYSIS['SEVERITY'][_0x537ed8(0x207)],'rule':_0x537ed8(0x1d4),'message':'Potential\x20hardcoded\x20'+_0x4cb68f+'\x20detected\x20in\x20.env\x20file','category':_0x537ed8(0x1f8),'validator':'env-validator','remediation':_0x537ed8(0x1cc)});break;}}}}),_0x4aec41;}catch(_0x1ad7bf){return this['logger']?.[_0xb68071(0x1e8)](_0xb68071(0x21a),{'error':_0x1ad7bf['message']}),[];}}[a0_0x471c3c(0x1ce)](_0x34536b){const _0x54c6ca=a0_0x471c3c,_0xf01bdf=a0_0x1f0732[_0x54c6ca(0x1d8)](_0x34536b)[_0x54c6ca(0x205)](),_0x16074a=a0_0x1f0732[_0x54c6ca(0x221)](_0x34536b);if(_0xf01bdf===_0x54c6ca(0x1db))return'dockerfile';if(_0xf01bdf==='docker-compose.yml'||_0xf01bdf===_0x54c6ca(0x1fe))return'docker-compose';if(_0xf01bdf==='package.json')return _0x54c6ca(0x238);if(_0xf01bdf==='tsconfig.json')return _0x54c6ca(0x217);if(_0xf01bdf===_0x54c6ca(0x214)||_0xf01bdf[_0x54c6ca(0x1d2)]('.env'))return _0x54c6ca(0x223);if(_0x16074a[_0x54c6ca(0x1c3)](_0x54c6ca(0x218)))return'github-actions';if(_0x16074a['includes'](_0x54c6ca(0x209))||_0x16074a['includes']('k8s'))return'kubernetes';const _0x47ff5d=a0_0x1f0732['extname'](_0x34536b)['toLowerCase']();if(_0x47ff5d==='.tf'||_0x47ff5d==='.tfvars')return'terraform';if(_0x47ff5d==='.yml'||_0x47ff5d==='.yaml')return _0x54c6ca(0x1f3);if(_0x47ff5d===_0x54c6ca(0x21e))return _0x54c6ca(0x1c6);return'unknown';}['normalizeResults'](_0x377836){const _0x474e04=a0_0x471c3c;return _0x377836[_0x474e04(0x1c8)](_0x962202=>({'file':_0x962202[_0x474e04(0x202)],'line':_0x962202[_0x474e04(0x20a)]||0x1,'column':_0x962202[_0x474e04(0x1fc)]||0x1,'severity':_0x962202['severity']||STATIC_ANALYSIS['SEVERITY'][_0x474e04(0x1f0)],'rule':_0x962202['rule']||_0x474e04(0x1dc),'message':_0x962202['message']||'Validation\x20issue\x20detected','category':_0x962202['category']||_0x474e04(0x233),'validator':_0x962202[_0x474e04(0x1f6)],'cwe':_0x962202[_0x474e04(0x1f2)]||null,'remediation':_0x962202['remediation']||null,'references':_0x962202[_0x474e04(0x211)]||[]}));}[a0_0x471c3c(0x22a)](_0x4e5c44){const _0xc964cb=a0_0x471c3c,_0x476459={'error':STATIC_ANALYSIS[_0xc964cb(0x21d)][_0xc964cb(0x1cf)],'warning':STATIC_ANALYSIS[_0xc964cb(0x21d)][_0xc964cb(0x1f0)],'info':STATIC_ANALYSIS['SEVERITY']['INFO'],'style':STATIC_ANALYSIS['SEVERITY']['INFO']};return _0x476459[_0x4e5c44?.['toLowerCase']()]||STATIC_ANALYSIS['SEVERITY'][_0xc964cb(0x1f0)];}['mapYamllintSeverity'](_0x2a6227){const _0x20d51a=a0_0x471c3c,_0x2f5c60={'error':STATIC_ANALYSIS['SEVERITY'][_0x20d51a(0x1cf)],'warning':STATIC_ANALYSIS['SEVERITY']['WARNING']};return _0x2f5c60[_0x2a6227?.[_0x20d51a(0x205)]()]||STATIC_ANALYSIS['SEVERITY']['WARNING'];}['mapCheckovSeverity'](_0x30a423){const _0x4d4c2d=a0_0x471c3c;return STATIC_ANALYSIS[_0x4d4c2d(0x21d)]['ERROR'];}async['getValidatorStatus'](){const _0x4faf97=await this['detectAvailableValidators']();return{'validators':_0x4faf97,'recommendations':this['getInstallRecommendations'](_0x4faf97)};}['getInstallRecommendations'](_0x2ff9b6){const _0x5344ac=a0_0x471c3c,_0x299d4a=[];return!_0x2ff9b6['checkov']&&_0x299d4a['push']({'validator':'checkov','reason':'Infrastructure\x20as\x20Code\x20security\x20scanning\x20(Docker,\x20Kubernetes,\x20Terraform)','install':_0x5344ac(0x225),'priority':_0x5344ac(0x1c2)}),!_0x2ff9b6['hadolint']&&_0x299d4a[_0x5344ac(0x229)]({'validator':'hadolint','reason':_0x5344ac(0x210),'install':'Download from https://github.com/hadolint/hadolint/releases','priority':_0x5344ac(0x1c2)}),!_0x2ff9b6['yamllint']&&_0x299d4a['push']({'validator':'yamllint','reason':_0x5344ac(0x1ca),'install':_0x5344ac(0x1ea),'priority':_0x5344ac(0x20d)}),!_0x2ff9b6[_0x5344ac(0x1e2)]&&_0x299d4a[_0x5344ac(0x229)]({'validator':'ajv\x20(JSON\x20Schema)','reason':'JSON\x20configuration\x20validation','install':'npm\x20install\x20ajv\x20ajv-formats','priority':'medium'}),_0x299d4a;}}export default ConfigValidator;