@loxia-labs/loxia-autopilot-one 3.0.2 → 3.1.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 (158) 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 +2 -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 -0
  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 -0
  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-B9-WsKaJ.js → index-CV3z5zRq.js} +102 -102
  157. package/web-ui/build/static/index-D3TW3p_0.css +1 -0
  158. package/web-ui/build/static/index-BiA2tB6h.css +0 -1
package/bin/cli.js CHANGED
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- const a0_0x29c046=a0_0x581a;(function(_0x107e94,_0x41654a){const _0x53acad=a0_0x581a,_0x59efe7=_0x107e94();while(!![]){try{const _0x478a4a=-parseInt(_0x53acad(0x1bf))/0x1*(-parseInt(_0x53acad(0x1d2))/0x2)+parseInt(_0x53acad(0x20b))/0x3*(-parseInt(_0x53acad(0x1be))/0x4)+parseInt(_0x53acad(0x1ea))/0x5*(-parseInt(_0x53acad(0x1e2))/0x6)+-parseInt(_0x53acad(0x20e))/0x7+parseInt(_0x53acad(0x1e5))/0x8*(-parseInt(_0x53acad(0x1b4))/0x9)+parseInt(_0x53acad(0x1c1))/0xa*(-parseInt(_0x53acad(0x1eb))/0xb)+parseInt(_0x53acad(0x1e7))/0xc;if(_0x478a4a===_0x41654a)break;else _0x59efe7['push'](_0x59efe7['shift']());}catch(_0x2e75ad){_0x59efe7['push'](_0x59efe7['shift']());}}}(a0_0x28fb,0xbc949));import{fileURLToPath}from'url';import{dirname,join}from'path';import{spawn}from'child_process';import{readFileSync}from'fs';import a0_0x406c88 from'http';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename),DEFAULT_PORT=0x1f90,DEFAULT_HOST=a0_0x29c046(0x1c0),SERVER_STARTUP_TIMEOUT=0x3a98,SERVER_CHECK_INTERVAL=0x1f4,args=process[a0_0x29c046(0x1c8)][a0_0x29c046(0x1fd)](0x2),command=args[0x0]&&!args[0x0]['startsWith']('--')?args[0x0]:null,flags={'port':null,'host':null,'help':args[a0_0x29c046(0x1a7)](a0_0x29c046(0x1c2))||args[a0_0x29c046(0x1a7)]('-h'),'version':args[a0_0x29c046(0x1a7)](a0_0x29c046(0x1ac))||args[a0_0x29c046(0x1a7)]('-v')};for(let i=0x0;i<args[a0_0x29c046(0x1c7)];i++){args[i]===a0_0x29c046(0x1a9)&&args[i+0x1]&&(flags[a0_0x29c046(0x1d0)]=parseInt(args[i+0x1],0xa)),args[i]==='--host'&&args[i+0x1]&&(flags[a0_0x29c046(0x1b5)]=args[i+0x1]);}const explicitPort=flags[a0_0x29c046(0x1d0)],host=flags[a0_0x29c046(0x1b5)]||DEFAULT_HOST;if(flags['version']){const pkgPath=join(__dirname,'..',a0_0x29c046(0x1e6)),pkg=JSON['parse'](readFileSync(pkgPath,'utf8'));console[a0_0x29c046(0x1ef)]('Loxia\x20Autopilot\x20One\x20v'+pkg['version']),process[a0_0x29c046(0x1b2)](0x0);}if(flags['help']||!command){const pkgPath=join(__dirname,'..',a0_0x29c046(0x1e6)),pkg=JSON[a0_0x29c046(0x1d7)](readFileSync(pkgPath,a0_0x29c046(0x20d)));console[a0_0x29c046(0x1ef)](a0_0x29c046(0x202)+pkg['version']+a0_0x29c046(0x1c3)+DEFAULT_PORT+a0_0x29c046(0x1b7)+DEFAULT_HOST+a0_0x29c046(0x1cd)),process[a0_0x29c046(0x1b2)](0x0);}async function getPortRegistry(){const _0xdc00ef=a0_0x29c046,{getPortRegistry:_0x3ca139}=await import(_0xdc00ef(0x1ab));return _0x3ca139();}async function discoverBackend(){const _0x4f0858=a0_0x29c046;try{const _0x5624e9=await getPortRegistry();await _0x5624e9[_0x4f0858(0x1f9)]();const _0xa656f7=await _0x5624e9['getService'](_0x4f0858(0x1bb));if(_0xa656f7)return{'host':_0xa656f7['host']||'localhost','port':_0xa656f7['port'],'pid':_0xa656f7[_0x4f0858(0x1f6)]};return null;}catch(_0xf4cb0b){return null;}}async function checkServerRunning(_0xaf6dc1,_0x442aa8,_0x157db7=0x1){for(let _0x524fe1=0x0;_0x524fe1<_0x157db7;_0x524fe1++){const _0x45c749=await new Promise(_0x5ba3c1=>{const _0x18b16a=a0_0x581a,_0x3eb1aa=a0_0x406c88[_0x18b16a(0x204)](_0x18b16a(0x1b8)+_0xaf6dc1+':'+_0x442aa8+_0x18b16a(0x1d8),_0x14cbf9=>{const _0x1fce3d=_0x18b16a;_0x5ba3c1(_0x14cbf9[_0x1fce3d(0x1dc)]===0xc8);});_0x3eb1aa['on'](_0x18b16a(0x1cf),()=>_0x5ba3c1(![])),_0x3eb1aa[_0x18b16a(0x1ad)](0x7d0,()=>{const _0xa83056=_0x18b16a;_0x3eb1aa[_0xa83056(0x1aa)](),_0x5ba3c1(![]);});});if(_0x45c749)return!![];_0x524fe1<_0x157db7-0x1&&await new Promise(_0x1d7d02=>setTimeout(_0x1d7d02,SERVER_CHECK_INTERVAL));}return![];}async function waitForServerWithDiscovery(_0x26220c=SERVER_STARTUP_TIMEOUT){const _0x2ae943=a0_0x29c046,_0x14f7ec=Date[_0x2ae943(0x1cb)]();while(Date[_0x2ae943(0x1cb)]()-_0x14f7ec<_0x26220c){const _0x4b344f=await discoverBackend();if(_0x4b344f){const _0x15c100=await checkServerRunning(_0x4b344f[_0x2ae943(0x1b5)],_0x4b344f[_0x2ae943(0x1d0)]);if(_0x15c100)return _0x4b344f;}await new Promise(_0x49d13e=>setTimeout(_0x49d13e,SERVER_CHECK_INTERVAL));}return null;}async function waitForServerAtPort(_0x34444f,_0x8fd949,_0xd0d310=SERVER_STARTUP_TIMEOUT){const _0x5d9112=a0_0x29c046,_0x2e7749=Math[_0x5d9112(0x203)](_0xd0d310/SERVER_CHECK_INTERVAL),_0x11fbab=await checkServerRunning(_0x34444f,_0x8fd949,_0x2e7749);return _0x11fbab?{'host':_0x34444f,'port':_0x8fd949}:null;}function openBrowser(_0x16ee7a){const _0x28d1e0=a0_0x29c046;let _0x423e40,_0x5b15bb;if(process[_0x28d1e0(0x1ee)]==='darwin')_0x423e40=_0x28d1e0(0x1b1),_0x5b15bb=[_0x16ee7a];else process[_0x28d1e0(0x1ee)]==='win32'?(_0x423e40=_0x28d1e0(0x1c9),_0x5b15bb=['/c',_0x28d1e0(0x1f8),'\x22\x22',_0x16ee7a]):(_0x423e40=_0x28d1e0(0x1de),_0x5b15bb=[_0x16ee7a]);const _0x4ff5d5=spawn(_0x423e40,_0x5b15bb,{'detached':!![],'stdio':'ignore'});_0x4ff5d5[_0x28d1e0(0x1b0)](),_0x4ff5d5['on'](_0x28d1e0(0x1cf),()=>{const _0x5bcc61=_0x28d1e0;console[_0x5bcc61(0x1ef)](_0x5bcc61(0x1c5)),console[_0x5bcc61(0x1ef)](_0x5bcc61(0x1d9)+_0x16ee7a);});}function a0_0x581a(_0x3474f6,_0x3e7e87){_0x3474f6=_0x3474f6-0x1a7;const _0x28fbe4=a0_0x28fb();let _0x581a82=_0x28fbe4[_0x3474f6];return _0x581a82;}function startServer(_0x3a526d=![]){const _0x10a44c=a0_0x29c046,_0x52e6fe={...process.env};explicitPort&&(_0x52e6fe[_0x10a44c(0x1b9)]=explicitPort[_0x10a44c(0x207)](),_0x52e6fe[_0x10a44c(0x1d6)]=explicitPort[_0x10a44c(0x207)]());flags[_0x10a44c(0x1b5)]&&(_0x52e6fe['LOXIA_HOST']=flags[_0x10a44c(0x1b5)]);const _0x4b7f5d=join(__dirname,'..',_0x10a44c(0x1fc),_0x10a44c(0x209)),_0x542e44=spawn('node',[_0x4b7f5d],{'cwd':join(__dirname,'..'),'env':_0x52e6fe,'stdio':_0x3a526d?[_0x10a44c(0x1db),_0x10a44c(0x1db),'ignore']:'inherit','detached':_0x3a526d});return _0x3a526d&&_0x542e44[_0x10a44c(0x1b0)](),_0x542e44;}function startTerminalUIProcess(_0x23eade,_0x2aec2d){const _0x183488=a0_0x29c046,_0x1c3002=join(__dirname,_0x183488(0x1bd)),_0x22d2da={...process.env,'LOXIA_PORT':_0x2aec2d[_0x183488(0x207)](),'LOXIA_HOST':_0x23eade},_0x3a3664=spawn(_0x183488(0x1e1),[_0x1c3002],{'cwd':join(__dirname,'..'),'env':_0x22d2da,'stdio':'inherit'});return _0x3a3664;}const commands={'web':async()=>{const _0x54c1ca=a0_0x29c046;console[_0x54c1ca(0x1ef)](_0x54c1ca(0x205));const _0x5d90d1=startServer(![]);console['log'](_0x54c1ca(0x1c6));let _0x2a9560;explicitPort?_0x2a9560=await waitForServerAtPort(host,explicitPort):_0x2a9560=await waitForServerWithDiscovery();if(_0x2a9560){const _0xce5b0d=_0x54c1ca(0x1b8)+_0x2a9560[_0x54c1ca(0x1b5)]+':'+_0x2a9560[_0x54c1ca(0x1d0)];console[_0x54c1ca(0x1ef)]('\x0aOpening\x20Web\x20UI\x20at\x20'+_0xce5b0d),openBrowser(_0xce5b0d);}else console[_0x54c1ca(0x1ef)](_0x54c1ca(0x1ed));process['on'](_0x54c1ca(0x1ae),()=>_0x5d90d1[_0x54c1ca(0x1fb)](_0x54c1ca(0x1ae))),process['on'](_0x54c1ca(0x1da),()=>_0x5d90d1[_0x54c1ca(0x1fb)](_0x54c1ca(0x1da))),_0x5d90d1['on'](_0x54c1ca(0x1b2),_0x34d3b1=>process[_0x54c1ca(0x1b2)](_0x34d3b1||0x0));},'plus-web':async()=>{await commands['web']();},'serve':async()=>{const _0x10f71c=a0_0x29c046;console[_0x10f71c(0x1ef)](_0x10f71c(0x205));const _0x3ed608=startServer(![]);console[_0x10f71c(0x1ef)](_0x10f71c(0x1c6));let _0xe37706;explicitPort?_0xe37706=await waitForServerAtPort(host,explicitPort):_0xe37706=await waitForServerWithDiscovery();if(_0xe37706){const _0x149733=_0x10f71c(0x1b8)+_0xe37706[_0x10f71c(0x1b5)]+':'+_0xe37706['port'];console['log'](_0x10f71c(0x1f2)+_0x149733),console[_0x10f71c(0x1ef)]('\x0a\x20\x20Web\x20UI:\x20\x20\x20\x20\x20\x20\x20'+_0x149733),console[_0x10f71c(0x1ef)](_0x10f71c(0x1df)),console[_0x10f71c(0x1ef)](_0x10f71c(0x1e3)+_0x149733+_0x10f71c(0x1d3));}else console[_0x10f71c(0x1ef)]('\x0aServer\x20started\x20but\x20may\x20still\x20be\x20initializing.'),console[_0x10f71c(0x1ef)](_0x10f71c(0x1e4));process['on'](_0x10f71c(0x1ae),()=>_0x3ed608[_0x10f71c(0x1fb)](_0x10f71c(0x1ae))),process['on'](_0x10f71c(0x1da),()=>_0x3ed608[_0x10f71c(0x1fb)](_0x10f71c(0x1da))),_0x3ed608['on'](_0x10f71c(0x1b2),_0x19b418=>process['exit'](_0x19b418||0x0));},'terminal':async()=>{const _0x1648af=a0_0x29c046;console['log']('Looking\x20for\x20running\x20server...');let _0x56efbc=await discoverBackend();explicitPort&&(_0x56efbc={'host':host,'port':explicitPort});!_0x56efbc&&(console['error'](_0x1648af(0x1ce)),console[_0x1648af(0x1cf)](_0x1648af(0x1f7)),console['error']('\x20\x20loxia\x20web\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Start\x20server\x20+\x20Web\x20UI'),console[_0x1648af(0x1cf)](_0x1648af(0x20c)),console[_0x1648af(0x1cf)](_0x1648af(0x200)),process[_0x1648af(0x1b2)](0x1));const _0x23ecbe=await checkServerRunning(_0x56efbc[_0x1648af(0x1b5)],_0x56efbc[_0x1648af(0x1d0)]);!_0x23ecbe&&(console['error'](_0x1648af(0x1b6)+_0x56efbc[_0x1648af(0x1b5)]+':'+_0x56efbc['port']+_0x1648af(0x1e0)),console[_0x1648af(0x1cf)](_0x1648af(0x1af)),process[_0x1648af(0x1b2)](0x1));console[_0x1648af(0x1ef)](_0x1648af(0x20a)+_0x56efbc[_0x1648af(0x1b5)]+':'+_0x56efbc[_0x1648af(0x1d0)]),console[_0x1648af(0x1ef)](_0x1648af(0x1fa));const _0x5b5e7e=startTerminalUIProcess(_0x56efbc['host'],_0x56efbc[_0x1648af(0x1d0)]);process['on'](_0x1648af(0x1ae),()=>_0x5b5e7e['kill'](_0x1648af(0x1ae))),process['on'](_0x1648af(0x1da),()=>_0x5b5e7e[_0x1648af(0x1fb)](_0x1648af(0x1da))),_0x5b5e7e['on'](_0x1648af(0x1b2),_0x588369=>process['exit'](_0x588369||0x0));},'plus-terminal':async()=>{const _0x5cf3f2=a0_0x29c046;console[_0x5cf3f2(0x1ef)](_0x5cf3f2(0x1f1));const _0x12f4b9=startServer(!![]);let _0x571090;explicitPort?_0x571090=await waitForServerAtPort(host,explicitPort):_0x571090=await waitForServerWithDiscovery();!_0x571090&&(console[_0x5cf3f2(0x1cf)]('\x0aServer\x20failed\x20to\x20start.\x20Please\x20check\x20logs.'),process[_0x5cf3f2(0x1b2)](0x1));console[_0x5cf3f2(0x1ef)]('Server\x20running\x20at\x20http://'+_0x571090[_0x5cf3f2(0x1b5)]+':'+_0x571090[_0x5cf3f2(0x1d0)]),console['log'](_0x5cf3f2(0x1fa));const _0x5688df=startTerminalUIProcess(_0x571090[_0x5cf3f2(0x1b5)],_0x571090[_0x5cf3f2(0x1d0)]);_0x5688df['on']('exit',_0x374a66=>{const _0x2be40e=_0x5cf3f2;console['log']('\x0aShutting\x20down\x20server...');try{process[_0x2be40e(0x1fb)](_0x12f4b9[_0x2be40e(0x1f6)],'SIGTERM');}catch(_0x425c61){}process[_0x2be40e(0x1b2)](_0x374a66||0x0);}),process['on'](_0x5cf3f2(0x1ae),()=>{const _0xa46076=_0x5cf3f2;_0x5688df[_0xa46076(0x1fb)](_0xa46076(0x1ae));}),process['on'](_0x5cf3f2(0x1da),()=>{const _0x1cdaa9=_0x5cf3f2;_0x5688df[_0x1cdaa9(0x1fb)](_0x1cdaa9(0x1da));});},'trigger-schedule':async()=>{const _0x1c5dbc=a0_0x29c046,_0x2832e1=args[0x1];!_0x2832e1&&(console[_0x1c5dbc(0x1cf)](_0x1c5dbc(0x1ca)),process['exit'](0x1));let _0x283d9c=await discoverBackend(),_0x3a1ca2=![];if(_0x283d9c){const _0xf789e1=await checkServerRunning(_0x283d9c['host'],_0x283d9c[_0x1c5dbc(0x1d0)]);if(!_0xf789e1)_0x283d9c=null;}!_0x283d9c&&(console['log'](_0x1c5dbc(0x1fe)),startServer(!![]),_0x3a1ca2=!![],explicitPort?_0x283d9c=await waitForServerAtPort(host,explicitPort,0x7530):_0x283d9c=await waitForServerWithDiscovery(0x7530),!_0x283d9c&&(console['error'](_0x1c5dbc(0x1f4)),process[_0x1c5dbc(0x1b2)](0x1)),console[_0x1c5dbc(0x1ef)](_0x1c5dbc(0x1f5)+_0x283d9c[_0x1c5dbc(0x1b5)]+':'+_0x283d9c[_0x1c5dbc(0x1d0)]));const _0x973c83='http://'+_0x283d9c[_0x1c5dbc(0x1b5)]+':'+_0x283d9c['port']+_0x1c5dbc(0x1bc)+encodeURIComponent(_0x2832e1)+_0x1c5dbc(0x1f0);try{const _0xee0cae=await new Promise((_0x5705ca,_0x1e6975)=>{const _0x59d662=_0x1c5dbc,_0x687451=JSON[_0x59d662(0x1ba)]({}),_0x53cc97=a0_0x406c88[_0x59d662(0x1c4)](_0x973c83,{'method':_0x59d662(0x1d5),'headers':{'Content-Type':_0x59d662(0x1ec),'Content-Length':Buffer['byteLength'](_0x687451)}},_0x4d40c0=>{const _0x294728=_0x59d662;let _0xd610b5='';_0x4d40c0['on'](_0x294728(0x1e8),_0x25ee60=>_0xd610b5+=_0x25ee60),_0x4d40c0['on'](_0x294728(0x1dd),()=>{const _0x31f4e8=_0x294728;try{_0x5705ca(JSON[_0x31f4e8(0x1d7)](_0xd610b5));}catch{_0x1e6975(new Error(_0x31f4e8(0x1d1)+_0xd610b5));}});});_0x53cc97['on'](_0x59d662(0x1cf),_0x1e6975),_0x53cc97[_0x59d662(0x1ad)](0xea60,()=>{const _0x1d6a8c=_0x59d662;_0x53cc97['destroy'](),_0x1e6975(new Error(_0x1d6a8c(0x1b3)));}),_0x53cc97[_0x59d662(0x208)](_0x687451),_0x53cc97['end']();});_0xee0cae['success']?console[_0x1c5dbc(0x1ef)](_0x1c5dbc(0x1cc)+(_0xee0cae[_0x1c5dbc(0x201)]||_0x2832e1)+_0x1c5dbc(0x206)):(console['error'](_0x1c5dbc(0x1f3)+_0xee0cae['error']),process['exit'](0x1));}catch(_0x1fdb8f){console[_0x1c5dbc(0x1cf)]('Failed\x20to\x20trigger\x20schedule:\x20'+_0x1fdb8f[_0x1c5dbc(0x1d4)]),process[_0x1c5dbc(0x1b2)](0x1);}if(_0x3a1ca2){const _0x10d409='http://'+_0x283d9c[_0x1c5dbc(0x1b5)]+':'+_0x283d9c[_0x1c5dbc(0x1d0)]+_0x1c5dbc(0x1ff);try{const _0x1425cc=JSON[_0x1c5dbc(0x1ba)]({'timeoutMinutes':0xa});await new Promise(_0xe258b9=>{const _0x26d107=_0x1c5dbc,_0x2e2ff4=a0_0x406c88[_0x26d107(0x1c4)](_0x10d409,{'method':'POST','headers':{'Content-Type':_0x26d107(0x1ec),'Content-Length':Buffer['byteLength'](_0x1425cc)}},_0x888701=>{const _0x4534c8=_0x26d107;_0x888701['on']('data',()=>{}),_0x888701['on'](_0x4534c8(0x1dd),_0xe258b9);});_0x2e2ff4['on'](_0x26d107(0x1cf),_0xe258b9),_0x2e2ff4['write'](_0x1425cc),_0x2e2ff4[_0x26d107(0x1dd)]();});}catch{}}process[_0x1c5dbc(0x1b2)](0x0);}};function a0_0x28fb(){const _0x1dde0b=['scheduleName','\x0aLoxia\x20Autopilot\x20One\x20v','ceil','get','Starting\x20Loxia\x20server...\x0a','\x22\x20triggered\x20successfully.','toString','write','index.js','Server\x20discovered\x20at\x20','3RqppUf','\x20\x20loxia\x20serve\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Start\x20server\x20only','utf8','3013493TFkSjE','includes','Unknown\x20command:\x20','--port','destroy','../src/services/portRegistry.js','--version','setTimeout','SIGINT','It\x20may\x20have\x20crashed.\x20Please\x20restart\x20it.','unref','open','exit','Request\x20timed\x20out','9Munutp','host','\x0aServer\x20registered\x20at\x20',')\x0a\x20\x20--host\x20<host>\x20\x20\x20\x20\x20Specify\x20host\x20(default:\x20','http://','LOXIA_PORT','stringify','backend','/api/schedules/','loxia-terminal.js','90504IOVRDZ','1EFMdUr','127.0.0.1','216880xnGVJE','--help','\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','request','Could\x20not\x20open\x20browser\x20automatically.','Waiting\x20for\x20server\x20to\x20start...','length','argv','cmd','Usage:\x20loxia\x20trigger-schedule\x20<schedule-id>','now','Schedule\x20\x22',')\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','\x0aNo\x20running\x20server\x20found\x20in\x20the\x20port\x20registry.','error','port','Invalid\x20response:\x20','1870182mqLzmO','/api/health\x0a','message','POST','PORT','parse','/api/health','Please\x20open\x20manually:\x20','SIGTERM','ignore','statusCode','end','xdg-open','\x20\x20Terminal\x20UI:\x20\x20loxia\x20terminal','\x20but\x20not\x20responding.','node','6oouFmb','\x20\x20API\x20Health:\x20\x20\x20','Run\x20\x27loxia\x20terminal\x27\x20to\x20connect\x20when\x20ready.','11022392YqfApq','package.json','43488912tXvQjR','data','Error:','4357090UdvGwg','550mxEayQ','application/json','\x0aServer\x20may\x20still\x20be\x20starting.\x20Check\x20the\x20port\x20registry\x20or\x20logs.','platform','log','/trigger','Starting\x20Loxia\x20server\x20in\x20background...','\x0a✓\x20Server\x20running\x20at\x20','Failed\x20to\x20trigger\x20schedule:\x20','Failed\x20to\x20start\x20server\x20within\x2030s.\x20Check\x20logs.','Server\x20started\x20at\x20','pid','\x0aPlease\x20start\x20the\x20server\x20first:','start','cleanupStaleEntries','Starting\x20Terminal\x20UI...\x0a','kill','src','slice','No\x20running\x20server\x20found.\x20Starting\x20Loxia\x20in\x20background...','/api/system/idle-shutdown','\x20\x20loxia\x20plus-terminal\x20\x20#\x20Start\x20server\x20+\x20Terminal\x20UI\x0a'];a0_0x28fb=function(){return _0x1dde0b;};return a0_0x28fb();}commands[command]?commands[command]()['catch'](_0xab80b7=>{const _0x300feb=a0_0x29c046;console['error'](_0x300feb(0x1e9),_0xab80b7[_0x300feb(0x1d4)]),process['exit'](0x1);}):(console['error'](a0_0x29c046(0x1a8)+command),console['error']('Run\x20\x22loxia\x20--help\x22\x20for\x20usage\x20information.'),process[a0_0x29c046(0x1b2)](0x1));
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));
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- (function(_0x156254,_0x145cf8){const _0x2874e4=a0_0x67e4,_0x5e4d1f=_0x156254();while(!![]){try{const _0x544f52=-parseInt(_0x2874e4(0x177))/0x1*(parseInt(_0x2874e4(0x171))/0x2)+parseInt(_0x2874e4(0x164))/0x3*(parseInt(_0x2874e4(0x14b))/0x4)+-parseInt(_0x2874e4(0x14a))/0x5*(parseInt(_0x2874e4(0x15c))/0x6)+-parseInt(_0x2874e4(0x14e))/0x7*(parseInt(_0x2874e4(0x165))/0x8)+-parseInt(_0x2874e4(0x158))/0x9+-parseInt(_0x2874e4(0x170))/0xa+parseInt(_0x2874e4(0x167))/0xb;if(_0x544f52===_0x145cf8)break;else _0x5e4d1f['push'](_0x5e4d1f['shift']());}catch(_0x118042){_0x5e4d1f['push'](_0x5e4d1f['shift']());}}}(a0_0x3710,0xa889b));import{spawn}from'child_process';function a0_0x3710(){const _0x954730=['10PsfIAt','1475448GTHSQb','stdout','stderr','13566sLFarL','toString','🎨\x20Launching\x20Ink-based\x20Terminal\x20UI...','timeout','Failed\x20to\x20start\x20server:','length','\x20\x20\x202.\x20Try\x20running\x20the\x20server\x20manually:\x20node\x20bin/cli.js','ignore','━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━','\x20\x20\x201.\x20Make\x20sure\x20no\x20other\x20process\x20is\x20using\x20port\x208080','5461056hgioHo','connect','💡\x20Troubleshooting:','pipe','2829552MDogQi','✓\x20Server\x20started\x20at\x20','...','Server\x20startup\x20timeout','setTimeout','--host','error','🚀\x20Starting\x20Loxia\x20server...','9QPYTBK','4504aUAEqV','❌\x20Failed\x20to\x20start\x20Terminal\x20UI:','40679584DloHMJ','node','🔍\x20Checking\x20if\x20server\x20is\x20running\x20at\x20','Socket','web','\x20\x20\x203.\x20Check\x20logs\x20for\x20more\x20details','argv','exit','log','13403360sosJXY','266002daJNZC','now','data','slice','--port','bin/cli.js','1onurnD','join','message'];a0_0x3710=function(){return _0x954730;};return a0_0x3710();}import a0_0x24d84c from'net';import a0_0x12255a from'path';import{fileURLToPath}from'url';const __filename=fileURLToPath(import.meta.url),__dirname=a0_0x12255a['dirname'](__filename),projectRoot=a0_0x12255a['dirname'](__dirname),DEFAULT_PORT=0x1f90,DEFAULT_HOST='localhost',SERVER_STARTUP_TIMEOUT=0x2710;async function isServerRunning(_0x3beb59,_0xf7ec18){return new Promise(_0x15f031=>{const _0x1a7063=a0_0x67e4,_0x4e741b=new a0_0x24d84c[(_0x1a7063(0x16a))]();_0x4e741b[_0x1a7063(0x160)](0x7d0),_0x4e741b['on'](_0x1a7063(0x159),()=>{_0x4e741b['destroy'](),_0x15f031(!![]);}),_0x4e741b['on'](_0x1a7063(0x151),()=>{_0x4e741b['destroy'](),_0x15f031(![]);}),_0x4e741b['on'](_0x1a7063(0x162),()=>{_0x4e741b['destroy'](),_0x15f031(![]);}),_0x4e741b[_0x1a7063(0x159)](_0xf7ec18,_0x3beb59);});}async function startServer(_0x5bdef3,_0x57daf7){const _0xcbdbfc=a0_0x67e4;return console[_0xcbdbfc(0x16f)](_0xcbdbfc(0x163)),new Promise((_0x39b11e,_0xeb800)=>{const _0x57c531=_0xcbdbfc,_0x34ce79=spawn(_0x57c531(0x168),[a0_0x12255a[_0x57c531(0x178)](projectRoot,_0x57c531(0x176)),'--ui',_0x57c531(0x16b),'--host',_0x5bdef3,_0x57c531(0x175),_0x57daf7[_0x57c531(0x14f)]()],{'detached':![],'stdio':[_0x57c531(0x155),_0x57c531(0x15b),'pipe']});_0x34ce79[_0x57c531(0x14c)]['on']('data',()=>{}),_0x34ce79[_0x57c531(0x14d)]['on'](_0x57c531(0x173),()=>{}),_0x34ce79['on'](_0x57c531(0x162),_0x437902=>{const _0x5c2105=_0x57c531;console[_0x5c2105(0x162)](_0x5c2105(0x152),_0x437902[_0x5c2105(0x179)]),_0xeb800(_0x437902);});const _0x2dd889=Date[_0x57c531(0x172)](),_0x2d2a37=setInterval(async()=>{const _0x555e10=_0x57c531,_0x20cea8=await isServerRunning(_0x5bdef3,_0x57daf7);if(_0x20cea8)clearInterval(_0x2d2a37),console['log'](_0x555e10(0x15d)+_0x5bdef3+':'+_0x57daf7),_0x39b11e();else Date['now']()-_0x2dd889>SERVER_STARTUP_TIMEOUT&&(clearInterval(_0x2d2a37),_0x34ce79['kill'](),_0xeb800(new Error(_0x555e10(0x15f))));},0x1f4);});}async function main(){const _0x14447f=a0_0x67e4;try{console[_0x14447f(0x16f)](_0x14447f(0x156)),console[_0x14447f(0x16f)]('\x20\x20Loxia\x20Autopilot\x20One\x20-\x20Terminal\x20UI'),console[_0x14447f(0x16f)](_0x14447f(0x156)),console['log']('');const _0x2f1c90=process[_0x14447f(0x16d)][_0x14447f(0x174)](0x2);let _0x3bf98e=DEFAULT_HOST,_0x2d6c7f=DEFAULT_PORT;for(let _0x2e995c=0x0;_0x2e995c<_0x2f1c90[_0x14447f(0x153)];_0x2e995c++){if(_0x2f1c90[_0x2e995c]===_0x14447f(0x161)&&_0x2f1c90[_0x2e995c+0x1])_0x3bf98e=_0x2f1c90[_0x2e995c+0x1],_0x2e995c++;else _0x2f1c90[_0x2e995c]===_0x14447f(0x175)&&_0x2f1c90[_0x2e995c+0x1]&&(_0x2d6c7f=parseInt(_0x2f1c90[_0x2e995c+0x1],0xa),_0x2e995c++);}console[_0x14447f(0x16f)](_0x14447f(0x169)+_0x3bf98e+':'+_0x2d6c7f+_0x14447f(0x15e));const _0xe5ea61=await isServerRunning(_0x3bf98e,_0x2d6c7f);!_0xe5ea61?(console[_0x14447f(0x16f)]('✗\x20Server\x20is\x20not\x20running'),await startServer(_0x3bf98e,_0x2d6c7f)):console['log']('✓\x20Server\x20is\x20already\x20running\x20at\x20'+_0x3bf98e+':'+_0x2d6c7f),console[_0x14447f(0x16f)](''),console[_0x14447f(0x16f)](_0x14447f(0x150)),console['log'](''),await new Promise(_0x76a812=>setTimeout(_0x76a812,0x1f4)),process.env.LOXIA_HOST=_0x3bf98e,process.env.LOXIA_PORT=_0x2d6c7f[_0x14447f(0x14f)](),await import('../src/interfaces/terminal/index.js');}catch(_0x5b8786){console[_0x14447f(0x162)](''),console[_0x14447f(0x162)](_0x14447f(0x166)),console['error']('\x20\x20',_0x5b8786[_0x14447f(0x179)]),console[_0x14447f(0x162)](''),console[_0x14447f(0x162)](_0x14447f(0x15a)),console['error'](_0x14447f(0x157)),console[_0x14447f(0x162)](_0x14447f(0x154)),console['error'](_0x14447f(0x16c)),console['error'](''),process[_0x14447f(0x16e)](0x1);}}function a0_0x67e4(_0x13f52a,_0x3f554f){_0x13f52a=_0x13f52a-0x14a;const _0x3710de=a0_0x3710();let _0x67e444=_0x3710de[_0x13f52a];return _0x67e444;}main();
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();
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- const a0_0x4c23f3=a0_0x6220;(function(_0x40909d,_0x70b275){const _0x563672=a0_0x6220,_0x3c5406=_0x40909d();while(!![]){try{const _0x463f5e=-parseInt(_0x563672(0x87))/0x1+parseInt(_0x563672(0x93))/0x2*(parseInt(_0x563672(0x95))/0x3)+parseInt(_0x563672(0x83))/0x4+-parseInt(_0x563672(0x86))/0x5*(parseInt(_0x563672(0x7b))/0x6)+parseInt(_0x563672(0x88))/0x7*(-parseInt(_0x563672(0x82))/0x8)+parseInt(_0x563672(0x80))/0x9*(parseInt(_0x563672(0x94))/0xa)+parseInt(_0x563672(0x8f))/0xb;if(_0x463f5e===_0x70b275)break;else _0x3c5406['push'](_0x3c5406['shift']());}catch(_0x334280){_0x3c5406['push'](_0x3c5406['shift']());}}}(a0_0x20df,0x5a9cc));import{startTerminalUI}from'../src/interfaces/terminal/index.js';const args=process['argv'][a0_0x4c23f3(0x7c)](0x2),options={'host':a0_0x4c23f3(0x85),'port':0x1f90};for(let i=0x0;i<args[a0_0x4c23f3(0x84)];i++){const arg=args[i];if(arg==='--host'||arg==='-h')options[a0_0x4c23f3(0x96)]=args[++i];else{if(arg===a0_0x4c23f3(0x8e)||arg==='-p')options[a0_0x4c23f3(0x8c)]=parseInt(args[++i],0xa);else arg==='--help'&&(console[a0_0x4c23f3(0x92)](a0_0x4c23f3(0x7d)),process[a0_0x4c23f3(0x77)](0x0));}}function a0_0x6220(_0x290cae,_0x41bd86){_0x290cae=_0x290cae-0x77;const _0x20df5f=a0_0x20df();let _0x62208c=_0x20df5f[_0x290cae];return _0x62208c;}function a0_0x20df(){const _0x37636d=['ERROR:\x20Terminal\x20UI\x20requires\x20an\x20interactive\x20terminal\x20(TTY).','838992DftsHi','2618972ojCJcd','length','localhost','3495355ojstCn','219625QlfmPh','42VAypXC','catch','stdin','error','port','Connecting\x20to:\x20','--port','5656321ODGUlP','\x0aTerminal\x20UI\x20exited','waitUntilExit','log','2800DvyEHK','1890XLQyKN','471RgXPtI','host','then','\x20\x20npm\x20run\x20terminal-ui','\x20\x20-\x20Background\x20processes\x20(e.g.,\x20&\x20at\x20the\x20end)','exit','\x20\x20-\x20Piped\x20environments\x20(e.g.,\x20|\x20head,\x20|\x20grep)','\x20\x20-\x20Some\x20CI/CD\x20environments','Or\x20use\x20the\x20web\x20UI\x20instead:','6vavlBR','slice','\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','\x0aTerminal\x20UI\x20error:','\x20\x20-\x20Redirected\x20output\x20(e.g.,\x20>\x20file.txt,\x202>&1\x20|\x20...)','25254DdOVRc'];a0_0x20df=function(){return _0x37636d;};return a0_0x20df();}process.env.LOXIA_HOST&&(options['host']=process.env.LOXIA_HOST);process.env.LOXIA_PORT&&(options[a0_0x4c23f3(0x8c)]=parseInt(process.env.LOXIA_PORT,0xa));!process[a0_0x4c23f3(0x8a)]['isTTY']&&(console[a0_0x4c23f3(0x8b)](a0_0x4c23f3(0x81)),console[a0_0x4c23f3(0x8b)](''),console['error']('The\x20terminal\x20UI\x20cannot\x20run\x20in:'),console[a0_0x4c23f3(0x8b)](a0_0x4c23f3(0x78)),console[a0_0x4c23f3(0x8b)](a0_0x4c23f3(0x7f)),console[a0_0x4c23f3(0x8b)](a0_0x4c23f3(0x99)),console[a0_0x4c23f3(0x8b)](a0_0x4c23f3(0x79)),console['error'](''),console[a0_0x4c23f3(0x8b)]('Please\x20run\x20this\x20command\x20in\x20a\x20real\x20terminal\x20without\x20pipes\x20or\x20redirection:'),console[a0_0x4c23f3(0x8b)](a0_0x4c23f3(0x98)),console[a0_0x4c23f3(0x8b)](''),console['error'](a0_0x4c23f3(0x7a)),console[a0_0x4c23f3(0x8b)]('\x20\x20npm\x20start'),process[a0_0x4c23f3(0x77)](0x1));console['log']('Starting\x20Loxia\x20Terminal\x20UI...'),console[a0_0x4c23f3(0x92)](a0_0x4c23f3(0x8d)+options[a0_0x4c23f3(0x96)]+':'+options[a0_0x4c23f3(0x8c)]),console[a0_0x4c23f3(0x92)]('Press\x20Ctrl+C\x20to\x20exit\x0a');const instance=startTerminalUI(options);instance[a0_0x4c23f3(0x91)]()[a0_0x4c23f3(0x97)](()=>{const _0x5d7f25=a0_0x4c23f3;console['log'](_0x5d7f25(0x90)),process[_0x5d7f25(0x77)](0x0);})[a0_0x4c23f3(0x89)](_0x3e0637=>{const _0x1e06c0=a0_0x4c23f3;console[_0x1e06c0(0x8b)](_0x1e06c0(0x7e),_0x3e0637),process['exit'](0x1);});
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);});
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- const a0_0x2c8cc5=a0_0x1449;(function(_0x291196,_0x5a9b25){const _0x32d121=a0_0x1449,_0x501550=_0x291196();while(!![]){try{const _0x39b29b=parseInt(_0x32d121(0xf2))/0x1*(parseInt(_0x32d121(0xdb))/0x2)+parseInt(_0x32d121(0xef))/0x3*(-parseInt(_0x32d121(0x107))/0x4)+-parseInt(_0x32d121(0xff))/0x5*(-parseInt(_0x32d121(0xdf))/0x6)+-parseInt(_0x32d121(0x105))/0x7+parseInt(_0x32d121(0xe3))/0x8*(parseInt(_0x32d121(0xfd))/0x9)+-parseInt(_0x32d121(0xf8))/0xa+parseInt(_0x32d121(0xf1))/0xb*(parseInt(_0x32d121(0xe6))/0xc);if(_0x39b29b===_0x5a9b25)break;else _0x501550['push'](_0x501550['shift']());}catch(_0x246e13){_0x501550['push'](_0x501550['shift']());}}}(a0_0x5552,0xcd49d));import{spawn}from'child_process';import{fileURLToPath}from'url';import{dirname,join}from'path';import a0_0x9278d8 from'http';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename),rootDir=join(__dirname,'..'),SERVER_PORT=process.env.PORT||0x1f90,STARTUP_WAIT=0x7d0;function a0_0x5552(){const _0x5abbf6=['/health','4288170fOReVZ','⚠️\x20\x20Server\x20may\x20not\x20be\x20fully\x20ready,\x20but\x20continuing\x20anyway...','47982WTdjRG','3RRAVAa','destroy','error','killed','SIGINT','trim','4045210biZacR','╔════════════════════════════════════════════════╗','toString','node','index.js','139185dUSdYg','pipe','205mTtMKO','kill','exit','src','SIGTERM','statusCode','7135940ESOxaO','Failed\x20to\x20start\x20server:','4eLaAgO','log','data','includes','834706kxjIkf','ExperimentalWarning','[SERVER\x20ERROR]\x20','\x0a⚠️\x20\x20Received\x20SIGINT,\x20shutting\x20down...','162462RaLkml','Server\x20returned\x20','║\x20\x20\x20Loxia\x20AI\x20Agents\x20-\x20Server\x20+\x20Terminal\x20UI\x20\x20\x20\x20\x20\x20║','http://localhost:','592KPgnrY','Server\x20exited\x20with\x20code\x20','setTimeout','516pMNVWk','loxia-terminal.js','inherit','[SERVER]\x20','message','bin','Failed\x20to\x20start\x20Terminal\x20UI:','🚀\x20Starting\x20Loxia\x20server...'];a0_0x5552=function(){return _0x5abbf6;};return a0_0x5552();}let serverProcess=null;async function checkServerReady(_0x3b86f2=0xa,_0x4d6c06=0x1f4){const _0x3deffc=a0_0x1449;for(let _0x4e8014=0x0;_0x4e8014<_0x3b86f2;_0x4e8014++){try{return await new Promise((_0x4ef907,_0x2bc554)=>{const _0xe12b5a=a0_0x1449,_0x37ff3d=a0_0x9278d8['get'](_0xe12b5a(0xe2)+SERVER_PORT+_0xe12b5a(0xee),_0x1088bf=>{const _0x3a2e9b=_0xe12b5a;_0x1088bf[_0x3a2e9b(0x104)]===0xc8?_0x4ef907():_0x2bc554(new Error(_0x3a2e9b(0xe0)+_0x1088bf['statusCode']));});_0x37ff3d['on'](_0xe12b5a(0xf4),_0x2bc554),_0x37ff3d[_0xe12b5a(0xe5)](0x3e8,()=>{const _0x4dd298=_0xe12b5a;_0x37ff3d[_0x4dd298(0xf3)](),_0x2bc554(new Error('Timeout'));});}),console[_0x3deffc(0x108)]('✅\x20Server\x20is\x20ready!'),!![];}catch(_0xb65d7d){_0x4e8014<_0x3b86f2-0x1&&await new Promise(_0x5d4483=>setTimeout(_0x5d4483,_0x4d6c06));}}return console[_0x3deffc(0x108)](_0x3deffc(0xf0)),![];}async function startServer(){return new Promise(_0x108997=>{const _0x108b72=a0_0x1449;console[_0x108b72(0x108)](_0x108b72(0xed));const _0x43187c=join(rootDir,_0x108b72(0x102),_0x108b72(0xfc));serverProcess=spawn(_0x108b72(0xfb),[_0x43187c],{'cwd':rootDir,'env':{...process.env},'stdio':['ignore',_0x108b72(0xfe),_0x108b72(0xfe)],'detached':![]}),serverProcess['stdout']['on']('data',_0xd2fcb5=>{const _0x124a0e=_0x108b72,_0x20ddcf=_0xd2fcb5[_0x124a0e(0xfa)]()[_0x124a0e(0xf7)]();_0x20ddcf&&console[_0x124a0e(0x108)](_0x124a0e(0xe9)+_0x20ddcf);}),serverProcess['stderr']['on'](_0x108b72(0x109),_0x26aadd=>{const _0x2c730c=_0x108b72,_0x579709=_0x26aadd['toString']()[_0x2c730c(0xf7)]();_0x579709&&!_0x579709[_0x2c730c(0xda)](_0x2c730c(0xdc))&&console[_0x2c730c(0xf4)](_0x2c730c(0xdd)+_0x579709);}),serverProcess['on']('error',_0xc98d9c=>{const _0x1d9cbb=_0x108b72;console[_0x1d9cbb(0xf4)](_0x1d9cbb(0x106),_0xc98d9c[_0x1d9cbb(0xea)]),process[_0x1d9cbb(0x101)](0x1);}),serverProcess['on'](_0x108b72(0x101),(_0x2e59d0,_0x326d77)=>{const _0x439825=_0x108b72;_0x2e59d0!==null&&_0x2e59d0!==0x0&&(console['error'](_0x439825(0xe4)+_0x2e59d0),process[_0x439825(0x101)](_0x2e59d0));}),setTimeout(_0x108997,STARTUP_WAIT);});}async function startTerminalUI(){const _0x588d4a=a0_0x1449;console[_0x588d4a(0x108)]('🖥️\x20\x20Starting\x20Terminal\x20UI...'),console[_0x588d4a(0x108)]('');const _0x4d23f6=join(rootDir,_0x588d4a(0xeb),_0x588d4a(0xe7)),_0x18d620=spawn(_0x588d4a(0xfb),[_0x4d23f6],{'cwd':rootDir,'env':{...process.env},'stdio':_0x588d4a(0xe8)});return _0x18d620['on'](_0x588d4a(0xf4),_0x2d078a=>{const _0x42cbe0=_0x588d4a;console[_0x42cbe0(0xf4)](_0x42cbe0(0xec),_0x2d078a['message']),cleanup(),process[_0x42cbe0(0x101)](0x1);}),_0x18d620['on'](_0x588d4a(0x101),_0x3601c2=>{const _0x2a7ae0=_0x588d4a;console['log']('\x0a👋\x20Terminal\x20UI\x20closed.'),cleanup(),process[_0x2a7ae0(0x101)](_0x3601c2||0x0);}),_0x18d620;}function cleanup(){const _0x13edab=a0_0x1449;serverProcess&&!serverProcess[_0x13edab(0xf5)]&&(console[_0x13edab(0x108)]('🛑\x20Stopping\x20server...'),serverProcess['kill'](_0x13edab(0x103)),setTimeout(()=>{const _0x5f22c0=_0x13edab;!serverProcess[_0x5f22c0(0xf5)]&&serverProcess[_0x5f22c0(0x100)]('SIGKILL');},0x1388));}function a0_0x1449(_0x584596,_0x37ab67){_0x584596=_0x584596-0xda;const _0x5552a9=a0_0x5552();let _0x144970=_0x5552a9[_0x584596];return _0x144970;}process['on'](a0_0x2c8cc5(0xf6),()=>{const _0x267658=a0_0x2c8cc5;console['log'](_0x267658(0xde)),cleanup(),process[_0x267658(0x101)](0x0);}),process['on'](a0_0x2c8cc5(0x103),()=>{const _0x2ac90c=a0_0x2c8cc5;console['log']('\x0a⚠️\x20\x20Received\x20SIGTERM,\x20shutting\x20down...'),cleanup(),process[_0x2ac90c(0x101)](0x0);}),process['on']('exit',()=>{cleanup();});async function main(){const _0x17f551=a0_0x2c8cc5;console[_0x17f551(0x108)](_0x17f551(0xf9)),console[_0x17f551(0x108)](_0x17f551(0xe1)),console[_0x17f551(0x108)]('╚════════════════════════════════════════════════╝'),console['log']('');try{await startServer(),await checkServerReady(),await startTerminalUI(),await new Promise(()=>{});}catch(_0x18f888){console[_0x17f551(0xf4)]('Error\x20during\x20startup:',_0x18f888['message']),cleanup(),process[_0x17f551(0x101)](0x1);}}main();
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();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@loxia-labs/loxia-autopilot-one",
3
- "version": "3.0.2",
3
+ "version": "3.1.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",
@@ -64,6 +64,7 @@
64
64
  "ink": "^5.2.1",
65
65
  "jsonrepair": "^3.13.2",
66
66
  "mammoth": "^1.11.0",
67
+ "node-telegram-bot-api": "^0.67.0",
67
68
  "ollama": "^0.6.3",
68
69
  "pdf2json": "^3.1.4",
69
70
  "postcss": "^8.5.6",
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- const a0_0x270862=a0_0x1a3b;(function(_0x539f81,_0x1c1021){const _0x1d5cea=a0_0x1a3b,_0x150116=_0x539f81();while(!![]){try{const _0x1c2c5a=parseInt(_0x1d5cea(0x1ee))/0x1*(parseInt(_0x1d5cea(0x212))/0x2)+-parseInt(_0x1d5cea(0x205))/0x3+-parseInt(_0x1d5cea(0x20c))/0x4*(-parseInt(_0x1d5cea(0x210))/0x5)+parseInt(_0x1d5cea(0x1ca))/0x6*(parseInt(_0x1d5cea(0x1d4))/0x7)+-parseInt(_0x1d5cea(0x20a))/0x8*(-parseInt(_0x1d5cea(0x1dd))/0x9)+parseInt(_0x1d5cea(0x1d9))/0xa*(parseInt(_0x1d5cea(0x1f0))/0xb)+-parseInt(_0x1d5cea(0x214))/0xc*(parseInt(_0x1d5cea(0x1cb))/0xd);if(_0x1c2c5a===_0x1c1021)break;else _0x150116['push'](_0x150116['shift']());}catch(_0x505468){_0x150116['push'](_0x150116['shift']());}}}(a0_0xbd97,0x73b3a));import{exec}from'child_process';function a0_0xbd97(){const _0x338147=['python','dirname','3823BJAvXa','join','88fhpTlp','\x20\x20\x20✅\x20Semgrep\x20installed\x20successfully','Failed\x20to\x20download:\x20HTTP\x20','semgrep\x20--version','\x20\x20\x20⚠️\x20\x20No\x20Semgrep\x20binary\x20available\x20for\x20','\x20\x20\x20Run:\x20npm\x20install\x20--save-dev\x20eslint-plugin-security\x0a','pip-audit','\x20\x20Installing\x20Security\x20Scanners','replace','\x20\x20\x20✅\x20Python\x20found:\x20','═══════════════════════════════════════════════════════════','statusCode','--user','location','\x20\x20\x20⚠️\x20\x20Failed\x20to\x20install\x20','platform','chmod','yamllint','\x20\x20\x20pip\x20install\x20semgrep\x20bandit\x20pip-audit\x20checkov\x20yamllint\x0a','mkdir','url','126081axfJYP','node_modules','includes','\x20\x20\x20Semgrep\x20not\x20found\x20in\x20PATH,\x20installing\x20standalone\x20binary...','stdout','2501272RjXkGc','\x20\x20\x20You\x20can\x20install\x20manually:\x20pip\x20install\x20semgrep\x0a','15952fKTLVM','\x20\x20\x20Please\x20install\x20manually:\x20https://semgrep.dev/docs/getting-started/\x0a','close','promises','960eLcwzu','trim','146vFfJYR','unlink','1633320kVSiGc','\x20\x20\x20To\x20enable\x20Python\x20scanning,\x20install\x20Python\x20and\x20run:','\x0a═══════════════════════════════════════════════════════════','\x20\x20\x20✅\x20Semgrep\x20already\x20installed:\x20','...','\x20\x20\x20Note:\x20To\x20use\x20system-wide,\x20add\x20to\x20PATH\x20or\x20install\x20globally:','arch','finish','error','\x20\x20\x20You\x20can\x20install\x20manually:\x20pip\x20install\x20','\x20installed\x20successfully','114ptDouL','221SykdyO','\x20\x20Installation\x20Complete','log','\x20already\x20installed','═══════════════════════════════════════════════════════════\x0a','\x20\x20\x20Using\x20system-installed\x20Semgrep\x0a','\x20\x20\x20pip\x20install\x20semgrep\x0a','catch','\x0aYou\x20can\x20manually\x20install\x20scanners:','277837pIUXTf','bandit','\x20\x20\x20⚠️\x20\x20Python\x20not\x20found\x20-\x20skipping\x20Python\x20scanners','🐍\x20Checking\x20Python\x20scanners...','\x20\x20npm\x20install\x20--save-dev\x20eslint-plugin-security','897810NuQtVW','exit','message','\x20-c\x20\x22import\x20sys;\x20print(sys.prefix)\x22','9xDxhPq','v1.55.0','python3\x20--version','📦\x20Checking\x20ESLint\x20Security\x20Plugin...','.scanners','\x20\x20\x20Downloading\x20from\x20','\x20-m\x20pip\x20install\x20','\x20\x20\x20✅\x20eslint-plugin-security\x20is\x20installed\x0a','checkov','eslint-plugin-security','then','semgrep','\x20\x20\x20✅\x20','\x20\x20\x20Location:\x20','https'];a0_0xbd97=function(){return _0x338147;};return a0_0xbd97();}import{promisify}from'util';import a0_0x4849ec from'https';import a0_0x86a3cf from'http';import a0_0x58195f from'fs';import a0_0x58f9cf 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_0x58f9cf[a0_0x270862(0x1ed)](__filename),SCANNER_DIR=a0_0x58f9cf[a0_0x270862(0x1ef)](__dirname,'..',a0_0x270862(0x206),a0_0x270862(0x1e1)),SEMGREP_VERSION=a0_0x270862(0x1de);console[a0_0x270862(0x1cd)](a0_0x270862(0x1fa)),console[a0_0x270862(0x1cd)](a0_0x270862(0x1f7)),console[a0_0x270862(0x1cd)]('\x20\x20Platform:\x20'+process[a0_0x270862(0x1ff)]+'\x20('+process[a0_0x270862(0x1c5)]+')'),console['log']('═══════════════════════════════════════════════════════════\x0a');async function installScanners(){const _0x326b60=a0_0x270862;await a0_0x58195f['promises'][_0x326b60(0x203)](SCANNER_DIR,{'recursive':!![]}),await checkESLintSecurity(),await installSemgrep(),await installPythonScanners(),console[_0x326b60(0x1cd)](_0x326b60(0x216)),console[_0x326b60(0x1cd)](_0x326b60(0x1cc)),console[_0x326b60(0x1cd)](_0x326b60(0x1cf));}async function checkESLintSecurity(){const _0x4f70d3=a0_0x270862;console[_0x4f70d3(0x1cd)](_0x4f70d3(0x1e0));try{await import(_0x4f70d3(0x1e6)),console[_0x4f70d3(0x1cd)](_0x4f70d3(0x1e4));}catch(_0x1ae08f){console[_0x4f70d3(0x1cd)]('\x20\x20\x20⚠️\x20\x20eslint-plugin-security\x20not\x20found'),console[_0x4f70d3(0x1cd)](_0x4f70d3(0x1f5));}}async function installSemgrep(){const _0xa48145=a0_0x270862;console[_0xa48145(0x1cd)]('🔍\x20Installing\x20Semgrep...');const _0x59de6c=process[_0xa48145(0x1ff)],_0x89c36a=process[_0xa48145(0x1c5)];try{const _0x2232cd=await execAsync(_0xa48145(0x1f3),{'timeout':0x1388});console[_0xa48145(0x1cd)](_0xa48145(0x217)+_0x2232cd[_0xa48145(0x209)][_0xa48145(0x211)]()),console[_0xa48145(0x1cd)](_0xa48145(0x1d0));return;}catch(_0x1d2262){console[_0xa48145(0x1cd)](_0xa48145(0x208));}const _0x29041d=getSemgrepBinaryInfo(_0x59de6c,_0x89c36a);if(!_0x29041d){console['log'](_0xa48145(0x1f4)+_0x59de6c+'-'+_0x89c36a),console[_0xa48145(0x1cd)](_0xa48145(0x20d));return;}try{const _0xc02e6c=a0_0x58f9cf[_0xa48145(0x1ef)](SCANNER_DIR,_0xa48145(0x1e8));console[_0xa48145(0x1cd)](_0xa48145(0x1e2)+_0x29041d['url']+_0xa48145(0x1c3)),await downloadFile(_0x29041d[_0xa48145(0x204)],_0xc02e6c),await a0_0x58195f[_0xa48145(0x20f)][_0xa48145(0x200)](_0xc02e6c,0x1ed),console[_0xa48145(0x1cd)](_0xa48145(0x1f1)),console[_0xa48145(0x1cd)](_0xa48145(0x1ea)+_0xc02e6c+'\x0a'),console[_0xa48145(0x1cd)](_0xa48145(0x1c4)),console[_0xa48145(0x1cd)](_0xa48145(0x1d1));}catch(_0x2ca65c){console['log']('\x20\x20\x20⚠️\x20\x20Failed\x20to\x20install\x20Semgrep:\x20'+_0x2ca65c['message']),console[_0xa48145(0x1cd)](_0xa48145(0x20b));}}function getSemgrepBinaryInfo(_0x46c6f4,_0x1d6197){return null;}async function installPythonScanners(){const _0x212eea=a0_0x270862;console['log'](_0x212eea(0x1d7));let _0x147967=null;try{await execAsync(_0x212eea(0x1df),{'timeout':0x1388}),_0x147967='python3';}catch(_0x268db5){try{await execAsync('python\x20--version',{'timeout':0x1388}),_0x147967=_0x212eea(0x1ec);}catch(_0x3d0285){console[_0x212eea(0x1cd)](_0x212eea(0x1d6)),console[_0x212eea(0x1cd)](_0x212eea(0x215)),console['log'](_0x212eea(0x202));return;}}console['log'](_0x212eea(0x1f9)+_0x147967),await installViaPip('semgrep',_0x147967),await installViaPip(_0x212eea(0x1d5),_0x147967),await installViaPip(_0x212eea(0x1f6),_0x147967),await installViaPip(_0x212eea(0x1e5),_0x147967),await installViaPip(_0x212eea(0x201),_0x147967),console[_0x212eea(0x1cd)]('');}async function isHomebrewPython(_0x4552f8){const _0x5914f4=a0_0x270862;try{const {stdout:_0x4cac00}=await execAsync(_0x4552f8+_0x5914f4(0x1dc),{'timeout':0x1388});return _0x4cac00[_0x5914f4(0x207)]('/opt/homebrew')||_0x4cac00[_0x5914f4(0x207)]('/usr/local/Cellar');}catch{return![];}}async function installViaPip(_0x24835d,_0x2d2b58){const _0x1ecfe2=a0_0x270862;try{const _0xabeb5e=await execAsync(_0x2d2b58+'\x20-m\x20pip\x20show\x20'+_0x24835d,{'timeout':0x1388});return console['log'](_0x1ecfe2(0x1e9)+_0x24835d+_0x1ecfe2(0x1ce)),!![];}catch(_0x167cde){console[_0x1ecfe2(0x1cd)]('\x20\x20\x20Installing\x20'+_0x24835d+_0x1ecfe2(0x1c3));try{const _0x4c96ac=await isHomebrewPython(_0x2d2b58),_0x368d00=_0x4c96ac?'':_0x1ecfe2(0x1fc),_0x3c779a=(_0x2d2b58+_0x1ecfe2(0x1e3)+_0x368d00+'\x20'+_0x24835d)[_0x1ecfe2(0x1f8)](/\s+/g,'\x20')[_0x1ecfe2(0x211)]();return await execAsync(_0x3c779a,{'timeout':0xea60}),console['log'](_0x1ecfe2(0x1e9)+_0x24835d+_0x1ecfe2(0x1c9)),!![];}catch(_0x1e0430){return console[_0x1ecfe2(0x1cd)](_0x1ecfe2(0x1fe)+_0x24835d+':\x20'+_0x1e0430[_0x1ecfe2(0x1db)]),console['log'](_0x1ecfe2(0x1c8)+_0x24835d),![];}}}async function downloadFile(_0x5aee54,_0x45195f){return new Promise((_0x290ce6,_0x41f143)=>{const _0x32f37a=a0_0x1a3b,_0x8b8201=_0x5aee54['startsWith'](_0x32f37a(0x1eb))?a0_0x4849ec:a0_0x86a3cf;_0x8b8201['get'](_0x5aee54,_0x533b55=>{const _0x2b6c30=_0x32f37a;if(_0x533b55[_0x2b6c30(0x1fb)]===0x12e||_0x533b55[_0x2b6c30(0x1fb)]===0x12d){downloadFile(_0x533b55['headers'][_0x2b6c30(0x1fd)],_0x45195f)[_0x2b6c30(0x1e7)](_0x290ce6)[_0x2b6c30(0x1d2)](_0x41f143);return;}if(_0x533b55[_0x2b6c30(0x1fb)]!==0xc8){_0x41f143(new Error(_0x2b6c30(0x1f2)+_0x533b55[_0x2b6c30(0x1fb)]));return;}const _0x3a87e1=createWriteStream(_0x45195f);_0x533b55['pipe'](_0x3a87e1),_0x3a87e1['on'](_0x2b6c30(0x1c6),()=>{const _0x17d05f=_0x2b6c30;_0x3a87e1[_0x17d05f(0x20e)](),_0x290ce6();}),_0x3a87e1['on'](_0x2b6c30(0x1c7),_0x35f6aa=>{const _0x546832=_0x2b6c30;a0_0x58195f[_0x546832(0x213)](_0x45195f,()=>{}),_0x41f143(_0x35f6aa);});})['on'](_0x32f37a(0x1c7),_0x41f143);});}function a0_0x1a3b(_0x5cde5d,_0x1b04fb){_0x5cde5d=_0x5cde5d-0x1c3;const _0xbd977c=a0_0xbd97();let _0x1a3b6e=_0xbd977c[_0x5cde5d];return _0x1a3b6e;}installScanners()[a0_0x270862(0x1d2)](_0x887f66=>{const _0x21fb58=a0_0x270862;console[_0x21fb58(0x1c7)]('❌\x20Installation\x20failed:',_0x887f66[_0x21fb58(0x1db)]),console[_0x21fb58(0x1c7)](_0x21fb58(0x1d3)),console[_0x21fb58(0x1c7)](_0x21fb58(0x1d8)),console[_0x21fb58(0x1c7)]('\x20\x20pip\x20install\x20semgrep\x20bandit\x20pip-audit'),process[_0x21fb58(0x1da)](0x0);});
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);});
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- const a0_0x1c84cf=a0_0x2722;(function(_0x63b7fc,_0xe24b31){const _0x4e1451=a0_0x2722,_0x2d61cc=_0x63b7fc();while(!![]){try{const _0x2d16e6=-parseInt(_0x4e1451(0x1fc))/0x1+-parseInt(_0x4e1451(0x20e))/0x2*(parseInt(_0x4e1451(0x206))/0x3)+parseInt(_0x4e1451(0x1fa))/0x4+-parseInt(_0x4e1451(0x208))/0x5*(parseInt(_0x4e1451(0x20a))/0x6)+parseInt(_0x4e1451(0x1fd))/0x7+-parseInt(_0x4e1451(0x203))/0x8+-parseInt(_0x4e1451(0x20f))/0x9*(-parseInt(_0x4e1451(0x1f2))/0xa);if(_0x2d16e6===_0xe24b31)break;else _0x2d61cc['push'](_0x2d61cc['shift']());}catch(_0x2a2fab){_0x2d61cc['push'](_0x2d61cc['shift']());}}}(a0_0x86f0,0x7671b));const {spawn,execSync}=require(a0_0x1c84cf(0x1fe)),path=require(a0_0x1c84cf(0x20c)),fs=require('fs'),logFile=path[a0_0x1c84cf(0x202)](__dirname,'watchdog.log');function a0_0x2722(_0x1bf6b,_0x308c3c){_0x1bf6b=_0x1bf6b-0x1ee;const _0x86f027=a0_0x86f0();let _0x2722ce=_0x86f027[_0x1bf6b];return _0x2722ce;}function log(_0x458c86){const _0x4fd8bd=a0_0x1c84cf,_0x1ebe85=new Date()[_0x4fd8bd(0x200)](),_0x2fe8bc='['+_0x1ebe85+']\x20'+_0x458c86+'\x0a';console['log'](_0x458c86);try{fs[_0x4fd8bd(0x1f4)](logFile,_0x2fe8bc);}catch(_0x23968b){}}log('[Watchdog]\x20Script\x20loaded');function parseArgs(){const _0x53125a=a0_0x1c84cf,_0xc5085=process[_0x53125a(0x213)][_0x53125a(0x1f3)](0x2),_0x573151={'delay':0x1388,'command':'loxia\x20web','pid':null};for(let _0x3c5d6d=0x0;_0x3c5d6d<_0xc5085[_0x53125a(0x1f9)];_0x3c5d6d++){switch(_0xc5085[_0x3c5d6d]){case'--delay':_0x573151[_0x53125a(0x1f6)]=parseInt(_0xc5085[++_0x3c5d6d],0xa)||0x1388;break;case _0x53125a(0x204):_0x573151[_0x53125a(0x209)]=_0xc5085[++_0x3c5d6d]||'loxia\x20web';break;case'--pid':_0x573151['pid']=parseInt(_0xc5085[++_0x3c5d6d],0xa)||null;break;}}return _0x573151;}function a0_0x86f0(){const _0x5e2b2e=['catch','split','length','2377468VChYpv','\x20to\x20exit...','595910bXqEeZ','5229210CASPkv','child_process','[Watchdog]\x20Executing:\x20','toISOString','win32','join','705048yOOYMm','--command','\x20has\x20terminated','1369935RZFRaU','[Watchdog]\x20Waiting\x20for\x20parent\x20process\x20','23910iCBnMR','command','852SgbSGx','exit','path','\x20still\x20running\x20after\x20','4LSnFjY','24345BafInD','now','platform','[Watchdog]\x20Started\x20with\x20options:','argv','pid','ignore','[Watchdog]\x20Watchdog\x20exiting...','message','kill','[Watchdog]\x20Waiting\x20','5250CkltpP','slice','appendFileSync','[Watchdog]\x20Parent\x20process\x20','delay'];a0_0x86f0=function(){return _0x5e2b2e;};return a0_0x86f0();}function isProcessRunning(_0x2b9cab){const _0x3a99e6=a0_0x1c84cf;try{return process[_0x3a99e6(0x1f0)](_0x2b9cab,0x0),!![];}catch(_0x1ecfb3){return![];}}async function waitForParentExit(_0x31116c,_0x353618=0x7530){const _0x32fd00=a0_0x1c84cf;if(!_0x31116c)return;const _0x4758bd=Date['now']();while(isProcessRunning(_0x31116c)){if(Date[_0x32fd00(0x210)]()-_0x4758bd>_0x353618){log(_0x32fd00(0x1f5)+_0x31116c+_0x32fd00(0x20d)+_0x353618+'ms,\x20proceeding\x20anyway');return;}await new Promise(_0x38b4de=>setTimeout(_0x38b4de,0x1f4));}log('[Watchdog]\x20Parent\x20process\x20'+_0x31116c+_0x32fd00(0x205));}async function main(){const _0x367e78=a0_0x1c84cf,_0x21b5c2=parseArgs();log(_0x367e78(0x212),{'delay':_0x21b5c2[_0x367e78(0x1f6)],'command':_0x21b5c2[_0x367e78(0x209)],'pid':_0x21b5c2[_0x367e78(0x214)]});_0x21b5c2['pid']&&(log(_0x367e78(0x207)+_0x21b5c2[_0x367e78(0x214)]+_0x367e78(0x1fb)),await waitForParentExit(_0x21b5c2['pid']));log(_0x367e78(0x1f1)+_0x21b5c2['delay']+'ms\x20before\x20restart...'),await new Promise(_0xb76bc5=>setTimeout(_0xb76bc5,_0x21b5c2[_0x367e78(0x1f6)]));const _0x682b93=_0x21b5c2['command'][_0x367e78(0x1f8)]('\x20'),_0x2e186f=_0x682b93[0x0],_0x2471ba=_0x682b93[_0x367e78(0x1f3)](0x1);log(_0x367e78(0x1ff)+_0x2e186f+'\x20'+_0x2471ba[_0x367e78(0x202)]('\x20'));const _0x1e70c7=process[_0x367e78(0x211)]===_0x367e78(0x201),_0x3ce5dd=spawn(_0x2e186f,_0x2471ba,{'detached':!![],'stdio':_0x367e78(0x215),'shell':!![],'windowsHide':![]});_0x3ce5dd['unref'](),log('[Watchdog]\x20Loxia\x20restarted\x20with\x20PID\x20'+_0x3ce5dd[_0x367e78(0x214)]),log(_0x367e78(0x1ee)),setTimeout(()=>process['exit'](0x0),0x3e8);}main()[a0_0x1c84cf(0x1f7)](_0x2a3767=>{const _0x1afcb5=a0_0x1c84cf;log('[Watchdog]\x20Error:\x20'+_0x2a3767[_0x1afcb5(0x1ef)]),process[_0x1afcb5(0x20b)](0x1);});
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);});
@@ -1 +1 @@
1
- function a0_0x2788(){const _0x183a44=['Bg9Nz2vY','CNvSzq','lNnHC3m','z2v0u3vWCg9YDgvKrxH0zw5ZAw9UCW','q0furuDpuLK','BgvUz3rO','ouDUBvDmtW','C2nZCW','zM9Y','y2f0zwDVCML6zvn0EwXLBgLUDfj1Bgu','BMfTzq','zgv0zwn0tgfUz3vHz2u','CM9VDa','zM9YD2fYza','Cg9ZDgnZC1nJC3m','Aw5JBhvKzxm','Aw5JBhvKzq','nJy5mdHUvwHfELC','ndi2odqZtfbTr1HO','zw5KC1DPDgG','C3LUDgf4','u1Lovefy','D2fYBG','ndi5mxHYAefmsW','lNnJC3m','BM8TAw52ywXPza','Cg9ZDgnZCW','q1ntigfUywX5C2LZigzHAwXLza','mtHhz3jxwvG','mJe2nta2og9lA0fSAq','rvjst1i','zxjYB3i','u3r5BgvSAw50igfUywX5C2LZigzHAwXLza','BgLUDa','BgLUDfn0EwXLCW','Bg93zxi','zgvMyxvSDa','q1ntigfUywX5C2LZignVBxbSzxrLza','DxnL','lMXLC3m','Dg9mB3DLCKnHC2u','BM8TDw5RBM93BG','uevsrK9stufoq0u','y2HLy2TtEw50yxG','zg91yMXL','Cg9ZDgnZC0XLC3m','ntK0nKPNAu9duG','Cg9ZDgnZCY1Zy3nZ','zwfJAa','ndeZnZq3nJbWD0L5Cfe','C3r5BgvSAw50','zM9YBwf0ug9ZDentu0vYCM9Y','C2v2zxjPDhK','mJqXnJe5mgvSD2zqqq','zMLSDgvY','u0vwrvjjvfK','l15JDxn0B20TlW','BgvZCW','BgLUzq','D2fYBMLUz3m','ChvZAa','Cg9ZDgnZCY1SzxnZ','q3nZu3LUDgf4rxjYB3i','odG5mdeZnLnnvKPtqq','C3vWCg9YDhnbDxrVrML4'];a0_0x2788=function(){return _0x183a44;};return a0_0x2788();}function a0_0x5021(_0x53439a,_0x5d1ca1){_0x53439a=_0x53439a-0x12f;const _0x278811=a0_0x2788();let _0x50217e=_0x278811[_0x53439a];if(a0_0x5021['cMGKmM']===undefined){var _0x373b4d=function(_0x8367cd){const _0xd80d30='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x122bc3='',_0x205ec1='';for(let _0x57ad35=0x0,_0x43b51d,_0x3434ee,_0x409bce=0x0;_0x3434ee=_0x8367cd['charAt'](_0x409bce++);~_0x3434ee&&(_0x43b51d=_0x57ad35%0x4?_0x43b51d*0x40+_0x3434ee:_0x3434ee,_0x57ad35++%0x4)?_0x122bc3+=String['fromCharCode'](0xff&_0x43b51d>>(-0x2*_0x57ad35&0x6)):0x0){_0x3434ee=_0xd80d30['indexOf'](_0x3434ee);}for(let _0x35d2b1=0x0,_0x74d434=_0x122bc3['length'];_0x35d2b1<_0x74d434;_0x35d2b1++){_0x205ec1+='%'+('00'+_0x122bc3['charCodeAt'](_0x35d2b1)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x205ec1);};a0_0x5021['jbJfRr']=_0x373b4d,a0_0x5021['VhpKIr']={},a0_0x5021['cMGKmM']=!![];}const _0x2d9ef5=_0x278811[0x0],_0x1f6fa3=_0x53439a+_0x2d9ef5,_0xb0e259=a0_0x5021['VhpKIr'][_0x1f6fa3];return!_0xb0e259?(_0x50217e=a0_0x5021['jbJfRr'](_0x50217e),a0_0x5021['VhpKIr'][_0x1f6fa3]=_0x50217e):_0x50217e=_0xb0e259,_0x50217e;}const a0_0xac4e94=a0_0x5021;(function(_0x37150a,_0x3cd2e2){const _0x39dcd6=a0_0x5021,_0x624e31=_0x37150a();while(!![]){try{const _0x4a3e7e=parseInt(_0x39dcd6(0x151))/0x1*(-parseInt(_0x39dcd6(0x146))/0x2)+parseInt(_0x39dcd6(0x13b))/0x3*(-parseInt(_0x39dcd6(0x152))/0x4)+-parseInt(_0x39dcd6(0x16a))/0x5+parseInt(_0x39dcd6(0x163))/0x6*(parseInt(_0x39dcd6(0x14c))/0x7)+-parseInt(_0x39dcd6(0x133))/0x8+-parseInt(_0x39dcd6(0x147))/0x9+parseInt(_0x39dcd6(0x166))/0xa;if(_0x4a3e7e===_0x3cd2e2)break;else _0x624e31['push'](_0x624e31['shift']());}catch(_0x2b4087){_0x624e31['push'](_0x624e31['shift']());}}}(a0_0x2788,0xd61fe));import{STATIC_ANALYSIS}from'../utilities/constants.js';class CSSAnalyzer{constructor(_0x122bc3=null){const _0x47f7a6=a0_0x5021;this[_0x47f7a6(0x135)]=_0x122bc3,this[_0x47f7a6(0x167)]=null,this[_0x47f7a6(0x14f)]=null,this['postcssScss']=null,this['postcssLess']=null;}async['analyze'](_0x205ec1,_0x57ad35,_0x43b51d={}){const _0x30c615=a0_0x5021;try{const _0x3434ee=[],_0x409bce=this[_0x30c615(0x140)](_0x205ec1),_0x35d2b1=await this[_0x30c615(0x160)](_0x205ec1,_0x57ad35,_0x409bce);_0x3434ee['push'](..._0x35d2b1);if(_0x35d2b1[_0x30c615(0x13a)]===0x0){const _0x74d434=await this['lintStyles'](_0x205ec1,_0x57ad35,_0x409bce);_0x3434ee[_0x30c615(0x130)](..._0x74d434);}return this['logger']?.['debug'](_0x30c615(0x15a),{'file':_0x205ec1,'language':_0x409bce,'totalDiagnostics':_0x3434ee['length'],'errors':_0x3434ee['filter'](_0x4e403b=>_0x4e403b[_0x30c615(0x169)]===STATIC_ANALYSIS['SEVERITY']['ERROR'])[_0x30c615(0x13a)],'warnings':_0x3434ee[_0x30c615(0x16b)](_0x435e8a=>_0x435e8a['severity']===STATIC_ANALYSIS[_0x30c615(0x16c)]['WARNING'])[_0x30c615(0x13a)]}),_0x3434ee;}catch(_0x91b4f9){return this['logger']?.[_0x30c615(0x154)](_0x30c615(0x150),{'file':_0x205ec1,'error':_0x91b4f9['message']}),[];}}async['checkSyntax'](_0x5b71c0,_0x1fd5dd,_0x32124d){const _0x484224=a0_0x5021,_0x45a8ea=[];try{if(!this[_0x484224(0x14f)]){const _0x3f543c=await import(_0x484224(0x14f));this['postcss']=_0x3f543c['default'];}let _0x26c42b=null;if(_0x32124d===_0x484224(0x13c)){if(!this['postcssScss']){const _0x300d9a=await import('postcss-scss');this[_0x484224(0x143)]=_0x300d9a['default'];}_0x26c42b=this['postcssScss'];}else{if(_0x32124d===_0x484224(0x16e)){if(!this[_0x484224(0x162)]){const _0x3bfefe=await import('postcss-less');this[_0x484224(0x162)]=_0x3bfefe[_0x484224(0x159)];}_0x26c42b=this[_0x484224(0x162)];}}const _0x8730ff=this[_0x484224(0x14f)]()['process'](_0x1fd5dd,{'from':_0x5b71c0,'syntax':_0x26c42b}),_0x156d47=_0x8730ff[_0x484224(0x141)];this[_0x484224(0x135)]?.['debug']('PostCSS\x20syntax\x20check\x20passed',{'file':_0x5b71c0});}catch(_0x267589){const _0x4fca31=this[_0x484224(0x168)](_0x267589,_0x5b71c0);_0x4fca31&&_0x45a8ea[_0x484224(0x130)](_0x4fca31);}return _0x45a8ea;}async[a0_0xac4e94(0x157)](_0x1aece8,_0x1eebe0,_0x13911c){const _0x10ed32=a0_0xac4e94,_0x4dfea1=[];try{if(!this['stylelint']){const _0x1a04e9=await import(_0x10ed32(0x167));this['stylelint']=_0x1a04e9[_0x10ed32(0x159)];}const _0x2d0248={'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':[_0x10ed32(0x16d),'ng-deep']}],'media-feature-name-no-unknown':!![],'at-rule-no-unknown':_0x13911c==='scss'?[!![],{'ignoreAtRules':['mixin',_0x10ed32(0x145),'extend','if','else',_0x10ed32(0x13d),_0x10ed32(0x165),'while','function','return','content',_0x10ed32(0x15b),_0x10ed32(0x142)]}]:_0x13911c==='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':_0x10ed32(0x161),'selector-type-case':_0x10ed32(0x158)},'customSyntax':_0x13911c==='scss'?_0x10ed32(0x164):_0x13911c===_0x10ed32(0x16e)?_0x10ed32(0x131):undefined},_0x426945=await this[_0x10ed32(0x167)][_0x10ed32(0x156)]({'code':_0x1eebe0,'codeFilename':_0x1aece8,'config':_0x2d0248});if(_0x426945['results']&&_0x426945['results']['length']>0x0){const _0x100192=_0x426945['results'][0x0];if(_0x100192['warnings'])for(const _0x58686e of _0x100192[_0x10ed32(0x12f)]){_0x4dfea1[_0x10ed32(0x130)]({'file':_0x1aece8,'line':_0x58686e[_0x10ed32(0x16f)]||0x1,'column':_0x58686e['column']||0x1,'severity':_0x58686e[_0x10ed32(0x169)]===_0x10ed32(0x154)?STATIC_ANALYSIS[_0x10ed32(0x16c)][_0x10ed32(0x153)]:STATIC_ANALYSIS['SEVERITY']['WARNING'],'rule':_0x58686e[_0x10ed32(0x136)]||'unknown','message':_0x58686e['text'],'category':this[_0x10ed32(0x13e)](_0x58686e[_0x10ed32(0x136)]),'fixable':![],'source':'stylelint'});}}}catch(_0x2dd20c){this['logger']?.[_0x10ed32(0x14b)](_0x10ed32(0x155),{'file':_0x1aece8,'error':_0x2dd20c['message']});}return _0x4dfea1;}['formatPostCSSError'](_0x332dfd,_0x5846e7){const _0x4b2439=a0_0xac4e94;return{'file':_0x5846e7,'line':_0x332dfd[_0x4b2439(0x16f)]||0x1,'column':_0x332dfd['column']||0x1,'severity':STATIC_ANALYSIS[_0x4b2439(0x16c)][_0x4b2439(0x153)],'rule':_0x332dfd[_0x4b2439(0x13f)]||_0x4b2439(0x132),'message':_0x332dfd['reason']||_0x332dfd['message'],'category':STATIC_ANALYSIS['CATEGORY'][_0x4b2439(0x14a)],'fixable':![],'source':_0x4b2439(0x14f),'code':_0x332dfd['source']||undefined};}['categorizeStylelintRule'](_0x59a1b4){const _0x16df15=a0_0xac4e94;if(!_0x59a1b4)return STATIC_ANALYSIS['CATEGORY']['STYLE'];const _0x58c90f=_0x59a1b4['toLowerCase']();if(_0x58c90f[_0x16df15(0x144)](_0x16df15(0x14e))||_0x58c90f[_0x16df15(0x144)](_0x16df15(0x15e))||_0x58c90f[_0x16df15(0x144)]('no-empty')||_0x58c90f[_0x16df15(0x144)](_0x16df15(0x149)))return STATIC_ANALYSIS['CATEGORY']['SYNTAX'];if(_0x58c90f[_0x16df15(0x144)]('performance')||_0x58c90f['includes']('optimize'))return STATIC_ANALYSIS['CATEGORY'][_0x16df15(0x15f)];if(_0x58c90f[_0x16df15(0x144)]('best-practice')||_0x58c90f['includes']('recommended'))return STATIC_ANALYSIS[_0x16df15(0x139)]['BEST_PRACTICE'];return STATIC_ANALYSIS[_0x16df15(0x139)]['STYLE'];}[a0_0xac4e94(0x140)](_0x163839){const _0x2810a7=a0_0xac4e94,_0x48e5c7=_0x163839[_0x2810a7(0x15d)]();if(_0x48e5c7['endsWith']('.scss')||_0x48e5c7[_0x2810a7(0x148)](_0x2810a7(0x137)))return _0x2810a7(0x13c);if(_0x48e5c7[_0x2810a7(0x148)](_0x2810a7(0x15c)))return'less';return'css';}[a0_0xac4e94(0x138)](){const _0x2d125d=a0_0xac4e94;return['.css',_0x2d125d(0x14d),'.sass','.less'];}[a0_0xac4e94(0x134)](){return![];}}export default CSSAnalyzer;
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 +1 @@
1
- const a0_0x1663af=a0_0x23ed;(function(_0x2828fc,_0x1005fa){const _0x262b0f=a0_0x23ed,_0x14f22b=_0x2828fc();while(!![]){try{const _0x2789da=-parseInt(_0x262b0f(0xee))/0x1+-parseInt(_0x262b0f(0x107))/0x2*(parseInt(_0x262b0f(0x140))/0x3)+-parseInt(_0x262b0f(0x12b))/0x4*(-parseInt(_0x262b0f(0x12f))/0x5)+-parseInt(_0x262b0f(0x121))/0x6*(-parseInt(_0x262b0f(0x148))/0x7)+-parseInt(_0x262b0f(0xf8))/0x8+parseInt(_0x262b0f(0xdf))/0x9*(-parseInt(_0x262b0f(0x144))/0xa)+parseInt(_0x262b0f(0x10c))/0xb;if(_0x2789da===_0x1005fa)break;else _0x14f22b['push'](_0x14f22b['shift']());}catch(_0x9abe36){_0x14f22b['push'](_0x14f22b['shift']());}}}(a0_0x4fd6,0x2c445));import{exec}from'child_process';import{promisify}from'util';function a0_0x4fd6(){const _0x1b978f=['Dg9Rzw4','zgv0zwn0rMLSzvr5Cgu','z2L0AhvIlwfJDgLVBNm','ywP2','Aw5JBhvKzxm','BwLZC2LUz1bYB3bLCNr5','BwvZC2fNzq','ChvZAa','DhnJB25MAwCTDMfSAwrHDg9Y','AgfKB2XPBNqGBM90igf2ywLSywjSzq','y2f0zwDVCNK','DMfSAwrHDgvzqu1m','CgLWigLUC3rHBgWGy2HLy2TVDG','mteWntjADLbozgy','CgfZC3DVCMq','CgfYC2vzyw1SBgLUDfjLC3vSDhm','AgfYzgnVzgvKlxnLy3jLDa','wufntcbMAwXLihzHBgLKyxrPB24','rMfPBgvKihrVihbHCNnLignOzwnRB3yGB3v0Chv0','DgvYCMfMB3jT','AgfKB2XPBNqGDMfSAwrHDgLVBIbMywLSzwq','y2HLy2TVDIaTlxzLCNnPB24','EwfTBgXPBNq','mtzSCLnTreW','Bg9Nz2vY','C2nHBM5LCKnHy2HL','rgLZywjSAw5Nig5Vsw1WBgLJAxrbBNKGCMvKDwnLCYb0ExbLihnHzMv0Eq','mJyWmJKWEeL6z1ru','BwvKAxvT','B2jQzwn0','C3rYAwn0','DMfSAwrHDg9Y','u0vwrvjjvfK','zxjYB3i','Dw5RBM93BG','C3rKB3v0','iIaTlwzYyw1LD29YAYa','DMfSAwrHDgvqywnRywDLsNnVBG','ANnVBI1WyxjZzq','zw52','vxnLigvUDMLYB25Tzw50lxnWzwnPzMLJic5LBNyGzMLSzxmGyw5KigfKzcaUzw52ihrVic5NAxrPz25VCMu','CgfYC2viywrVBgLUDfjLC3vSDhm','yxzHAwXHyMXLu2nHBM5LCNm','zw52lxzHBgLKyxrVCG','mteXnZe0s1zvseDN','y29TCgLSzq','y2HLy2TVDIaTzIaI','DMfSAwrHDgvfBNzgAwXL','mtq3ntmWz3H3yunl','DhnJB25MAwCUANnVBG','zg9JA2vYzMLSzq','zgv0zwn0qxzHAwXHyMXLvMfSAwrHDg9YCW','mte0mwP4rwvpwq','EwfTBgXPBNqGBM90igf2ywLSywjSzq','C2v2zxjPDhK','BMfTzq','DMfSAwrHDgveB2nRzxjMAwXL','vw5RBM93BIbJB25MAwCGzMLSzsb0ExbL','BM9jBxbSAwnPDefUEq','BwfWwwfTBgXPBNrtzxzLCML0Eq','DMfSAwrHDgvxAxrOq2HLy2TVDG','zg9JA2vYlwnVBxbVC2uUEwfTBa','zgvMyxvSDa','sLnptIbJB25MAwD1CMf0Aw9UihzHBgLKyxrPB24','zg9JA2vYlwnVBxbVC2u','CMvTzwrPyxrPB24','y29TCgLSzxjpChrPB25Z','igrLDgvJDgvKigLUic5LBNyGzMLSzq','y2HLy2TVDIb2ywXPzgf0Aw9UigzHAwXLza','z3vPzgvSAw5L','ANnVBLnJAgvTyq','EwfTBa','z2v0sw5ZDgfSBfjLy29TBwvUzgf0Aw9UCW','qvbjigTLEq','lNLTBa','q1jjveLdquW','D2fYBG','BwfWq2HLy2TVDLnLDMvYAxr5','mtHWqwTmu24','CgfYC2u','CNvSzq','v0fstKLorW','AgfKB2XPBNq','EwfTBgXPBNqGlwyGCgfYC2fIBguGiG','AgfKB2XPBNqGls1MB3jTyxqGANnVBIaI','sLnptIbty2HLBweGDMfSAwrHDgLVBIbHDMfPBgfIBgu','DMfSAwrHDgvuC0nVBMzPzW','zxjYB3jZ','C3bSAxq','C3rYAw5N','lNLHBwW','Aw5ZDgfUy2vqyxrO','EwfTBgXPBNqGDMfSAwrHDgLVBIbMywLSzwq','mtu3ndC2B3fWuLvv','Bwf0y2G','DxrMltG','zgvIDwC','zMLSzq','C3rHCNrZv2L0Aa','DMfSAwrHDgLVBG','DhnJB25MAwCUANnVBIb2ywXPzgf0Aw9UigzHAwXLza','CgfJA2fNzs5QC29U','Dg9mB3DLCKnHC2u','mJeXmta0ogjvA2LkzW','rvjst1i','CMvHzezPBgu','ywP2icHku09oifnJAgvTysK','A3vIzxjUzxrLCW','rMfPBgvKihrVihbHCNnLigHHzg9SAw50ig91Dhb1Da','BwfWsgfKB2XPBNrtzxzLCML0Eq','AgLNAa','y2HLy2TFBMfTzq','su5gtW','CgLWigLUC3rHBgWGEwfTBgXPBNq','BM8TAw1WBgLJAxqTyw55','C3LUDgf4','C2vJDxjPDhK','y2HLy2TVDIbKzxrLy3rLza','mtzZDwLUq28','CMvZDwX0CW','zMfPBgvKx2nOzwnRCW','y2HLy2TVDG','CgfYC2vdAgvJA292uMvZDwX0CW','ndyZnZy2nMTsEwTXBG','sw5MCMfZDhj1y3r1CMuGyxmGq29KzsbZzwn1CML0EsbZy2fUBMLUzYaOrg9JA2vYlcblDwjLCM5LDgvZlcbuzxjYywzVCM0P','BwfW','ANnVBG','ANnVBI1Zy2HLBwe','y3DL','DMfSAwrHDgu','zxH0BMfTzq'];a0_0x4fd6=function(){return _0x1b978f;};return a0_0x4fd6();}function a0_0x23ed(_0x3f9fb7,_0x20d1b8){_0x3f9fb7=_0x3f9fb7-0xc6;const _0x4fd60c=a0_0x4fd6();let _0x23ed8a=_0x4fd60c[_0x3f9fb7];if(a0_0x23ed['hcXDte']===undefined){var _0x57dade=function(_0x2beaf2){const _0x3f1c74='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x1e3e65='',_0x3f8ae0='';for(let _0x123657=0x0,_0x35cbd8,_0xe4f439,_0x5a0b41=0x0;_0xe4f439=_0x2beaf2['charAt'](_0x5a0b41++);~_0xe4f439&&(_0x35cbd8=_0x123657%0x4?_0x35cbd8*0x40+_0xe4f439:_0xe4f439,_0x123657++%0x4)?_0x1e3e65+=String['fromCharCode'](0xff&_0x35cbd8>>(-0x2*_0x123657&0x6)):0x0){_0xe4f439=_0x3f1c74['indexOf'](_0xe4f439);}for(let _0x3e4a9e=0x0,_0x65d9c=_0x1e3e65['length'];_0x3e4a9e<_0x65d9c;_0x3e4a9e++){_0x3f8ae0+='%'+('00'+_0x1e3e65['charCodeAt'](_0x3e4a9e)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x3f8ae0);};a0_0x23ed['dKMojP']=_0x57dade,a0_0x23ed['GmnXCL']={},a0_0x23ed['hcXDte']=!![];}const _0x5f9f60=_0x4fd60c[0x0],_0x584676=_0x3f9fb7+_0x5f9f60,_0x567cae=a0_0x23ed['GmnXCL'][_0x584676];return!_0x567cae?(_0x23ed8a=a0_0x23ed['dKMojP'](_0x23ed8a),a0_0x23ed['GmnXCL'][_0x584676]=_0x23ed8a):_0x23ed8a=_0x567cae,_0x23ed8a;}import a0_0x1e3e65 from'path';import a0_0x3f8ae0 from'fs/promises';import{STATIC_ANALYSIS}from'../utilities/constants.js';const execAsync=promisify(exec);class ConfigValidator{constructor(_0x123657=null){const _0x33f33b=a0_0x23ed;this['logger']=_0x123657,this['availableScanners']=null,this[_0x33f33b(0x12d)]=new Map();}async[a0_0x1663af(0x147)](){const _0xa4cf2d=a0_0x1663af;if(this['availableScanners']!==null)return this[_0xa4cf2d(0x13e)];const _0x35cbd8={'checkov':![],'hadolint':![],'yamllint':![],'jsonSchema':![]};try{await execAsync(_0xa4cf2d(0x129),{'timeout':0x1388}),_0x35cbd8[_0xa4cf2d(0x10a)]=!![],this['logger']?.['debug'](_0xa4cf2d(0x106));}catch(_0xe4f439){this[_0xa4cf2d(0x12c)]?.[_0xa4cf2d(0xf1)]('checkov\x20not\x20available',{'error':_0xe4f439['message']});}try{await execAsync('hadolint\x20--version',{'timeout':0x1388}),_0x35cbd8[_0xa4cf2d(0xe3)]=!![],this['logger']?.[_0xa4cf2d(0xf1)]('hadolint\x20detected');}catch(_0x5a0b41){this[_0xa4cf2d(0x12c)]?.['debug'](_0xa4cf2d(0x11d),{'error':_0x5a0b41[_0xa4cf2d(0x11a)]});}try{await execAsync('yamllint\x20--version',{'timeout':0x1388}),_0x35cbd8['yamllint']=!![],this['logger']?.[_0xa4cf2d(0xf1)]('yamllint\x20detected');}catch(_0x3e4a9e){this['logger']?.['debug'](_0xa4cf2d(0xc6),{'error':_0x3e4a9e['message']});}try{await import(_0xa4cf2d(0x117)),_0x35cbd8['jsonSchema']=!![],this[_0xa4cf2d(0x12c)]?.[_0xa4cf2d(0xf1)](_0xa4cf2d(0xe6));}catch(_0x65d9c){this['logger']?.[_0xa4cf2d(0xf1)]('ajv\x20not\x20available',{'error':_0x65d9c[_0xa4cf2d(0x11a)]});}return this['availableScanners']=_0x35cbd8,_0x35cbd8;}async[a0_0x1663af(0x112)](_0x101596,_0x1b8387={}){const _0x231a5f=a0_0x1663af,_0x22f61f=[],_0x894cef=await this[_0x231a5f(0x147)](),_0x5f09ca=this[_0x231a5f(0x115)](_0x101596);this[_0x231a5f(0x12c)]?.['debug']('Validating\x20config\x20file',{'filePath':_0x101596,'fileType':_0x5f09ca});switch(_0x5f09ca){case _0x231a5f(0x146):if(_0x894cef['hadolint']){const _0x20a3c5=await this['validateDockerfile'](_0x101596,_0x1b8387);_0x22f61f[_0x231a5f(0x11b)](..._0x20a3c5);}if(_0x894cef[_0x231a5f(0x10a)]){const _0x48df5f=await this['validateWithCheckov'](_0x101596,'dockerfile',_0x1b8387);_0x22f61f['push'](..._0x48df5f);}break;case _0x231a5f(0xd1):if(_0x894cef[_0x231a5f(0x12a)]){const _0x359689=await this['validateYAML'](_0x101596,_0x1b8387);_0x22f61f[_0x231a5f(0x11b)](..._0x359689);}if(_0x894cef[_0x231a5f(0x10a)]){const _0x396834=await this['validateWithCheckov'](_0x101596,'docker_compose',_0x1b8387);_0x22f61f['push'](..._0x396834);}break;case _0x231a5f(0xfc):if(_0x894cef['yamllint']){const _0x518699=await this[_0x231a5f(0x11f)](_0x101596,_0x1b8387);_0x22f61f[_0x231a5f(0x11b)](..._0x518699);}if(_0x894cef[_0x231a5f(0x10a)]){const _0x3ac4cf=await this[_0x231a5f(0xcd)](_0x101596,_0x231a5f(0xfc),_0x1b8387);_0x22f61f['push'](..._0x3ac4cf);}break;case _0x231a5f(0x127):if(_0x894cef[_0x231a5f(0x10a)]){const _0x59ae8f=await this[_0x231a5f(0xcd)](_0x101596,'terraform',_0x1b8387);_0x22f61f['push'](..._0x59ae8f);}break;case'package.json':if(_0x894cef['jsonSchema']){const _0x3ef849=await this[_0x231a5f(0x139)](_0x101596,_0x1b8387);_0x22f61f['push'](..._0x3ef849);}break;case'tsconfig.json':if(_0x894cef['jsonSchema']){const _0x30778f=await this[_0x231a5f(0xe7)](_0x101596,_0x1b8387);_0x22f61f['push'](..._0x30778f);}break;case'github-actions':if(_0x894cef[_0x231a5f(0x12a)]){const _0x343014=await this['validateYAML'](_0x101596,_0x1b8387);_0x22f61f[_0x231a5f(0x11b)](..._0x343014);}break;case'env':const _0xd3bd1c=await this[_0x231a5f(0x143)](_0x101596,_0x1b8387);_0x22f61f['push'](..._0xd3bd1c);break;case _0x231a5f(0xd8):if(_0x894cef['yamllint']){const _0x472f72=await this[_0x231a5f(0x11f)](_0x101596,_0x1b8387);_0x22f61f[_0x231a5f(0x11b)](..._0x472f72);}break;default:this['logger']?.[_0x231a5f(0xdd)](_0x231a5f(0xca),{'filePath':_0x101596,'fileType':_0x5f09ca});return[];}return this['normalizeResults'](_0x22f61f);}async[a0_0x1663af(0xc9)](_0x319c2c,_0x26167c={}){const _0x4eefa6=a0_0x1663af;try{const _0x249ea1=await execAsync(_0x4eefa6(0xe5)+_0x319c2c+'\x22',{'maxBuffer':0xa*0x400*0x400,'timeout':0x7530}),_0x543260=JSON['parse'](_0x249ea1['stdout']);return this['parseHadolintResults'](_0x543260,_0x319c2c);}catch(_0x192355){if(_0x192355[_0x4eefa6(0x137)])try{const _0x108119=JSON[_0x4eefa6(0xe0)](_0x192355[_0x4eefa6(0x137)]);return this[_0x4eefa6(0x13d)](_0x108119,_0x319c2c);}catch(_0x2784bd){this['logger']?.[_0x4eefa6(0x135)](_0x4eefa6(0xfd),{'error':_0x2784bd[_0x4eefa6(0x11a)]});}return this[_0x4eefa6(0x12c)]?.['error'](_0x4eefa6(0x128),{'error':_0x192355['message']}),[];}}[a0_0x1663af(0x13d)](_0x2c4178,_0x465a36){const _0xfca4c8=a0_0x1663af,_0x27fe9c=[];if(Array['isArray'](_0x2c4178))for(const _0x38e60e of _0x2c4178){_0x27fe9c[_0xfca4c8(0x11b)]({'file':_0x465a36,'line':_0x38e60e['line']||0x1,'column':_0x38e60e['column']||0x1,'severity':this['mapHadolintSeverity'](_0x38e60e['level']),'rule':_0x38e60e['code'],'message':_0x38e60e['message'],'category':_0xfca4c8(0x146),'validator':'hadolint'});}return _0x27fe9c;}async[a0_0x1663af(0x11f)](_0x1e781c,_0x5206f6={}){const _0x458101=a0_0x1663af;try{const _0x1b7803=await execAsync(_0x458101(0xe4)+_0x1e781c+'\x22',{'maxBuffer':0xa*0x400*0x400,'timeout':0x7530});return this[_0x458101(0x123)](_0x1b7803[_0x458101(0x137)],_0x1e781c);}catch(_0x257bfe){if(_0x257bfe['stdout'])return this[_0x458101(0x123)](_0x257bfe['stdout'],_0x1e781c);return this['logger']?.['error'](_0x458101(0xed),{'error':_0x257bfe[_0x458101(0x11a)]}),[];}}['parseYamllintResults'](_0x3dee6f,_0x1f5109){const _0x79e862=a0_0x1663af,_0x1b9ce0=[],_0x3f98e3=_0x3dee6f['split']('\x0a')['filter'](_0x1ed494=>_0x1ed494['trim']());for(const _0x5692f8 of _0x3f98e3){const _0xd13c11=_0x5692f8[_0x79e862(0xef)](/^(.+?):(\d+):(\d+):\s*\[(\w+)\]\s*(.+?)\s*\((.+?)\)/);if(_0xd13c11){const [,_0x56efc0,_0x204486,_0x5df890,_0x26ce88,_0x4b48b0,_0x3ac18c]=_0xd13c11;_0x1b9ce0[_0x79e862(0x11b)]({'file':_0x1f5109,'line':parseInt(_0x204486,0xa),'column':parseInt(_0x5df890,0xa),'severity':this[_0x79e862(0xcc)](_0x26ce88),'rule':_0x3ac18c,'message':_0x4b48b0,'category':'yaml','validator':_0x79e862(0x12a)});}}return _0x1b9ce0;}async['validateWithCheckov'](_0x112dd6,_0x524f8d,_0x4609fd={}){const _0x56987e=a0_0x1663af;try{const _0x4b016f=await execAsync(_0x56987e(0x142)+_0x112dd6+_0x56987e(0x138)+_0x524f8d+'\x20--output\x20json\x20--compact',{'maxBuffer':0xa*0x400*0x400,'timeout':0xea60}),_0x316345=JSON['parse'](_0x4b016f[_0x56987e(0x137)]);return this[_0x56987e(0x10b)](_0x316345,_0x112dd6);}catch(_0x193a1f){if(_0x193a1f[_0x56987e(0x137)])try{const _0x110015=JSON[_0x56987e(0xe0)](_0x193a1f[_0x56987e(0x137)]);return this[_0x56987e(0x10b)](_0x110015,_0x112dd6);}catch(_0x25f9d8){this[_0x56987e(0x12c)]?.[_0x56987e(0x135)](_0x56987e(0x126),{'error':_0x25f9d8[_0x56987e(0x11a)]});}return this['logger']?.[_0x56987e(0x135)](_0x56987e(0xd5),{'error':_0x193a1f[_0x56987e(0x11a)]}),[];}}['parseCheckovResults'](_0x2c7288,_0xf446ed){const _0x40f1dc=a0_0x1663af,_0x1f76c6=[];if(_0x2c7288[_0x40f1dc(0x108)]&&_0x2c7288[_0x40f1dc(0x108)]['failed_checks'])for(const _0x536c76 of _0x2c7288[_0x40f1dc(0x108)][_0x40f1dc(0x109)]){_0x1f76c6[_0x40f1dc(0x11b)]({'file':_0xf446ed,'line':_0x536c76['file_line_range']?_0x536c76['file_line_range'][0x0]:0x1,'column':0x1,'severity':this[_0x40f1dc(0xde)](_0x536c76['check_class']),'rule':_0x536c76['check_id'],'message':_0x536c76[_0x40f1dc(0x100)]||_0x536c76['check_id'],'category':_0x40f1dc(0x105),'validator':_0x40f1dc(0x10a),'remediation':_0x536c76['guideline'],'cwe':_0x536c76[_0x40f1dc(0x111)],'references':_0x536c76[_0x40f1dc(0xd6)]?[_0x536c76['guideline']]:[]});}return _0x1f76c6;}async['validatePackageJson'](_0x4312b2,_0x1316c6={}){const _0x30fdb9=a0_0x1663af;try{const _0x40bbed=(await import('ajv'))['default'],_0x30fb90=(await import('ajv-formats'))[_0x30fdb9(0xcf)],_0x415b25=await a0_0x3f8ae0[_0x30fdb9(0xfa)](_0x4312b2,_0x30fdb9(0xf0)),_0x338eeb=JSON[_0x30fdb9(0xe0)](_0x415b25),_0x3e0a48=new _0x40bbed({'allErrors':!![],'strict':![]});_0x30fb90(_0x3e0a48);const _0x4f0226={'type':_0x30fdb9(0x131),'required':[_0x30fdb9(0xc8),'version'],'properties':{'name':{'type':'string','pattern':'^(?:@[a-z0-9-~][a-z0-9-._~]*/)?[a-z0-9-~][a-z0-9-._~]*$'},'version':{'type':_0x30fdb9(0xea)},'description':{'type':_0x30fdb9(0xea)},'main':{'type':'string'},'type':{'type':'string','enum':['module','commonjs']},'scripts':{'type':'object'},'dependencies':{'type':'object'},'devDependencies':{'type':'object'}},'additionalProperties':!![]},_0x172445=_0x3e0a48[_0x30fdb9(0x141)](_0x4f0226),_0x4dcbd5=_0x172445(_0x338eeb);if(!_0x4dcbd5&&_0x172445['errors'])return _0x172445[_0x30fdb9(0xe8)][_0x30fdb9(0x10e)](_0x20b144=>({'file':_0x4312b2,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS['SEVERITY'][_0x30fdb9(0xf9)],'rule':_0x30fdb9(0x110),'message':_0x20b144[_0x30fdb9(0xec)]?_0x20b144[_0x30fdb9(0xec)]+'\x20'+_0x20b144[_0x30fdb9(0x11a)]:'must\x20have\x20required\x20property\x20\x27'+_0x20b144['params'][_0x30fdb9(0x119)]+'\x27','category':_0x30fdb9(0xf4),'validator':'json-schema'}));return[];}catch(_0x317ab3){return this[_0x30fdb9(0x12c)]?.[_0x30fdb9(0x135)]('package.json\x20validation\x20failed',{'error':_0x317ab3[_0x30fdb9(0x11a)]}),[{'file':_0x4312b2,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS[_0x30fdb9(0x134)][_0x30fdb9(0xf9)],'rule':_0x30fdb9(0x13a),'message':'Invalid\x20JSON:\x20'+_0x317ab3[_0x30fdb9(0x11a)],'category':_0x30fdb9(0x104),'validator':_0x30fdb9(0x13a)}];}}async[a0_0x1663af(0xe7)](_0x43856a,_0x103b6e={}){const _0x14a414=a0_0x1663af;try{const _0x3f85a9=await a0_0x3f8ae0['readFile'](_0x43856a,_0x14a414(0xf0)),_0x2a616d=JSON[_0x14a414(0xe0)](_0x3f85a9),_0x438301=[];if(_0x2a616d[_0x14a414(0xd3)]){const _0x272924=_0x2a616d[_0x14a414(0xd3)];!_0x272924[_0x14a414(0x132)]&&_0x438301[_0x14a414(0x11b)]({'file':_0x43856a,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS[_0x14a414(0x134)]['WARNING'],'rule':'strict-mode','message':'Consider\x20enabling\x20\x22strict\x22\x20mode\x20for\x20better\x20type\x20safety','category':'best-practice','validator':_0x14a414(0x11c)}),_0x272924[_0x14a414(0xcb)]===![]&&_0x438301[_0x14a414(0x11b)]({'file':_0x43856a,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS[_0x14a414(0x134)]['WARNING'],'rule':_0x14a414(0x103),'message':_0x14a414(0x12e),'category':'best-practice','validator':'tsconfig-validator'});}return _0x438301;}catch(_0x55d51b){return this[_0x14a414(0x12c)]?.[_0x14a414(0x135)](_0x14a414(0xf5),{'error':_0x55d51b[_0x14a414(0x11a)]}),[{'file':_0x43856a,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS[_0x14a414(0x134)]['ERROR'],'rule':_0x14a414(0x13a),'message':'Invalid\x20JSON:\x20'+_0x55d51b['message'],'category':_0x14a414(0x104),'validator':'json-parse'}];}}async['validateEnvFile'](_0x2b2f27,_0x112e1b={}){const _0x356f16=a0_0x1663af;try{const _0x28535d=await a0_0x3f8ae0['readFile'](_0x2b2f27,_0x356f16(0xf0)),_0x21cde1=[],_0xfcff83=_0x28535d[_0x356f16(0xe9)]('\x0a'),_0x48d29a=[{'pattern':/password|passwd|pwd/i,'name':_0x356f16(0x122)},{'pattern':/api[_-]?key/i,'name':_0x356f16(0xda)},{'pattern':/secret/i,'name':'secret'},{'pattern':/token/i,'name':_0x356f16(0x114)},{'pattern':/private[_-]?key/i,'name':'private\x20key'},{'pattern':/aws[_-]?access/i,'name':'AWS\x20credentials'}];return _0xfcff83['forEach']((_0x3dab47,_0x41ae70)=>{const _0x18d86e=_0x356f16,_0x42e80c=_0x3dab47['trim']();if(!_0x42e80c||_0x42e80c['startsWith']('#'))return;if(_0x42e80c[_0x18d86e(0x118)]('=')){const [_0x394788,_0x47ebf9]=_0x42e80c['split']('='),_0x3603f0=_0x394788['toLowerCase'](),_0x1dab8d=_0x47ebf9?.['trim']()||'',_0x3801d1=_0x1dab8d&&_0x1dab8d!==''&&!_0x1dab8d[_0x18d86e(0xf3)]('$')&&_0x1dab8d!=='your-key-here'&&_0x1dab8d!=='changeme'&&_0x1dab8d['length']>0x5;if(_0x3801d1)for(const {pattern:_0xedb801,name:_0x445fad}of _0x48d29a){if(_0xedb801['test'](_0x3603f0)){_0x21cde1['push']({'file':_0x2b2f27,'line':_0x41ae70+0x1,'column':0x1,'severity':STATIC_ANALYSIS[_0x18d86e(0x134)][_0x18d86e(0xdc)],'rule':_0x18d86e(0x124),'message':'Potential\x20hardcoded\x20'+_0x445fad+_0x18d86e(0xd4),'category':'security','validator':_0x18d86e(0x13f),'remediation':_0x18d86e(0x13c)});break;}}}}),_0x21cde1;}catch(_0x5d2f33){return this['logger']?.['error']('.env\x20validation\x20failed',{'error':_0x5d2f33[_0x356f16(0x11a)]}),[];}}['detectFileType'](_0x207a80){const _0x2c060d=a0_0x1663af,_0x1a034d=a0_0x1e3e65['basename'](_0x207a80)['toLowerCase'](),_0x1816cb=a0_0x1e3e65['dirname'](_0x207a80);if(_0x1a034d===_0x2c060d(0x146))return _0x2c060d(0x146);if(_0x1a034d==='docker-compose.yml'||_0x1a034d===_0x2c060d(0xce))return'docker-compose';if(_0x1a034d===_0x2c060d(0xf6))return'package.json';if(_0x1a034d==='tsconfig.json')return _0x2c060d(0x145);if(_0x1a034d==='.env'||_0x1a034d['endsWith']('.env'))return _0x2c060d(0x13b);if(_0x1816cb[_0x2c060d(0x118)]('.github/workflows'))return _0x2c060d(0x116);if(_0x1816cb[_0x2c060d(0x118)]('kubernetes')||_0x1816cb[_0x2c060d(0x118)]('k8s'))return _0x2c060d(0xfc);const _0x38c506=a0_0x1e3e65[_0x2c060d(0x113)](_0x207a80)[_0x2c060d(0xf7)]();if(_0x38c506==='.tf'||_0x38c506==='.tfvars')return'terraform';if(_0x38c506===_0x2c060d(0xdb)||_0x38c506===_0x2c060d(0xeb))return'yaml';if(_0x38c506==='.json')return _0x2c060d(0x10f);return'unknown';}['normalizeResults'](_0x4cb47f){const _0x13e275=a0_0x1663af;return _0x4cb47f['map'](_0x3e01d9=>({'file':_0x3e01d9[_0x13e275(0xf2)],'line':_0x3e01d9['line']||0x1,'column':_0x3e01d9['column']||0x1,'severity':_0x3e01d9[_0x13e275(0xc7)]||STATIC_ANALYSIS['SEVERITY']['WARNING'],'rule':_0x3e01d9[_0x13e275(0xe1)]||_0x13e275(0x136),'message':_0x3e01d9['message']||'Validation\x20issue\x20detected','category':_0x3e01d9[_0x13e275(0x11e)]||_0x13e275(0xf4),'validator':_0x3e01d9[_0x13e275(0x133)],'cwe':_0x3e01d9['cwe']||null,'remediation':_0x3e01d9[_0x13e275(0xd2)]||null,'references':_0x3e01d9['references']||[]}));}[a0_0x1663af(0xfe)](_0x2ba1ee){const _0x465abb=a0_0x1663af,_0x53c217={'error':STATIC_ANALYSIS[_0x465abb(0x134)][_0x465abb(0xf9)],'warning':STATIC_ANALYSIS['SEVERITY']['WARNING'],'info':STATIC_ANALYSIS['SEVERITY'][_0x465abb(0x101)],'style':STATIC_ANALYSIS[_0x465abb(0x134)][_0x465abb(0x101)]};return _0x53c217[_0x2ba1ee?.[_0x465abb(0xf7)]()]||STATIC_ANALYSIS['SEVERITY'][_0x465abb(0xe2)];}['mapYamllintSeverity'](_0x2d54cb){const _0x2595df=a0_0x1663af,_0x207366={'error':STATIC_ANALYSIS['SEVERITY']['ERROR'],'warning':STATIC_ANALYSIS[_0x2595df(0x134)][_0x2595df(0xe2)]};return _0x207366[_0x2d54cb?.[_0x2595df(0xf7)]()]||STATIC_ANALYSIS[_0x2595df(0x134)]['WARNING'];}[a0_0x1663af(0xde)](_0x46a600){const _0xc87a55=a0_0x1663af;return STATIC_ANALYSIS['SEVERITY'][_0xc87a55(0xf9)];}async['getValidatorStatus'](){const _0x58ac51=a0_0x1663af,_0x3d3c71=await this[_0x58ac51(0x147)]();return{'validators':_0x3d3c71,'recommendations':this[_0x58ac51(0xd9)](_0x3d3c71)};}['getInstallRecommendations'](_0x208ea4){const _0x55b4ec=a0_0x1663af,_0x8a8248=[];return!_0x208ea4['checkov']&&_0x8a8248['push']({'validator':'checkov','reason':_0x55b4ec(0x10d),'install':_0x55b4ec(0x120),'priority':_0x55b4ec(0xff)}),!_0x208ea4['hadolint']&&_0x8a8248[_0x55b4ec(0x11b)]({'validator':_0x55b4ec(0xe3),'reason':'Dockerfile\x20linting\x20and\x20best\x20practices','install':'Download from https://github.com/hadolint/hadolint/releases','priority':'high'}),!_0x208ea4['yamllint']&&_0x8a8248['push']({'validator':_0x55b4ec(0x12a),'reason':_0x55b4ec(0x125),'install':_0x55b4ec(0x102),'priority':_0x55b4ec(0x130)}),!_0x208ea4[_0x55b4ec(0xd7)]&&_0x8a8248[_0x55b4ec(0x11b)]({'validator':_0x55b4ec(0xfb),'reason':_0x55b4ec(0xd0),'install':'npm\x20install\x20ajv\x20ajv-formats','priority':_0x55b4ec(0x130)}),_0x8a8248;}}export default ConfigValidator;
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;