@loxia-labs/loxia-autopilot-one 3.0.2 → 3.0.3

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_0x5bda23=a0_0x5c61;(function(_0x2c9c87,_0xd5168d){const _0x5526cd=a0_0x5c61,_0x3076b6=_0x2c9c87();while(!![]){try{const _0x2c55dc=-parseInt(_0x5526cd(0x182))/0x1*(parseInt(_0x5526cd(0x18d))/0x2)+parseInt(_0x5526cd(0x187))/0x3*(-parseInt(_0x5526cd(0x19c))/0x4)+parseInt(_0x5526cd(0x1ad))/0x5*(-parseInt(_0x5526cd(0x1c5))/0x6)+parseInt(_0x5526cd(0x194))/0x7*(parseInt(_0x5526cd(0x18c))/0x8)+-parseInt(_0x5526cd(0x180))/0x9*(-parseInt(_0x5526cd(0x17a))/0xa)+-parseInt(_0x5526cd(0x1ca))/0xb+-parseInt(_0x5526cd(0x169))/0xc*(-parseInt(_0x5526cd(0x1cf))/0xd);if(_0x2c55dc===_0xd5168d)break;else _0x3076b6['push'](_0x3076b6['shift']());}catch(_0x434758){_0x3076b6['push'](_0x3076b6['shift']());}}}(a0_0x4a04,0x39820));import{fileURLToPath}from'url';function a0_0x5c61(_0x5023d1,_0x580452){_0x5023d1=_0x5023d1-0x169;const _0x4a04b0=a0_0x4a04();let _0x5c61fe=_0x4a04b0[_0x5023d1];return _0x5c61fe;}import{dirname,join}from'path';import{spawn}from'child_process';import{readFileSync}from'fs';import a0_0xc46307 from'http';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename),DEFAULT_PORT=0x1f90,DEFAULT_HOST='127.0.0.1',SERVER_STARTUP_TIMEOUT=0x3a98,SERVER_CHECK_INTERVAL=0x1f4,args=process[a0_0x5bda23(0x191)]['slice'](0x2),command=args[0x0]&&!args[0x0]['startsWith']('--')?args[0x0]:null,flags={'port':null,'host':null,'help':args['includes'](a0_0x5bda23(0x1a2))||args[a0_0x5bda23(0x1ae)]('-h'),'version':args['includes']('--version')||args[a0_0x5bda23(0x1ae)]('-v')};for(let i=0x0;i<args[a0_0x5bda23(0x1a0)];i++){args[i]===a0_0x5bda23(0x17c)&&args[i+0x1]&&(flags[a0_0x5bda23(0x1d1)]=parseInt(args[i+0x1],0xa)),args[i]==='--host'&&args[i+0x1]&&(flags[a0_0x5bda23(0x1a7)]=args[i+0x1]);}const explicitPort=flags[a0_0x5bda23(0x1d1)],host=flags[a0_0x5bda23(0x1a7)]||DEFAULT_HOST;if(flags[a0_0x5bda23(0x171)]){const pkgPath=join(__dirname,'..',a0_0x5bda23(0x17f)),pkg=JSON['parse'](readFileSync(pkgPath,a0_0x5bda23(0x18b)));console[a0_0x5bda23(0x19b)](a0_0x5bda23(0x1d0)+pkg[a0_0x5bda23(0x171)]),process[a0_0x5bda23(0x1c6)](0x0);}if(flags[a0_0x5bda23(0x17b)]||!command){const pkgPath=join(__dirname,'..',a0_0x5bda23(0x17f)),pkg=JSON[a0_0x5bda23(0x1a9)](readFileSync(pkgPath,'utf8'));console[a0_0x5bda23(0x19b)](a0_0x5bda23(0x173)+pkg[a0_0x5bda23(0x171)]+a0_0x5bda23(0x1b7)+DEFAULT_PORT+')\x0a\x20\x20--host\x20<host>\x20\x20\x20\x20\x20Specify\x20host\x20(default:\x20'+DEFAULT_HOST+')\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'),process[a0_0x5bda23(0x1c6)](0x0);}async function getPortRegistry(){const _0x1ed7af=a0_0x5bda23,{getPortRegistry:_0x3e7bd1}=await import(_0x1ed7af(0x199));return _0x3e7bd1();}async function discoverBackend(){const _0x3e46d4=a0_0x5bda23;try{const _0x58ce7d=await getPortRegistry();await _0x58ce7d[_0x3e46d4(0x1b9)]();const _0xee514=await _0x58ce7d['getService'](_0x3e46d4(0x18e));if(_0xee514)return{'host':_0xee514[_0x3e46d4(0x1a7)]||'localhost','port':_0xee514[_0x3e46d4(0x1d1)],'pid':_0xee514[_0x3e46d4(0x1ac)]};return null;}catch(_0x81d4f0){return null;}}async function checkServerRunning(_0x122575,_0x27165e,_0x454820=0x1){for(let _0x268a96=0x0;_0x268a96<_0x454820;_0x268a96++){const _0x2b7eae=await new Promise(_0x5067e0=>{const _0x536450=a0_0x5c61,_0x19ed08=a0_0xc46307[_0x536450(0x1a8)]('http://'+_0x122575+':'+_0x27165e+'/api/health',_0x1f5e16=>{const _0x44a9ed=_0x536450;_0x5067e0(_0x1f5e16[_0x44a9ed(0x17e)]===0xc8);});_0x19ed08['on']('error',()=>_0x5067e0(![])),_0x19ed08[_0x536450(0x1be)](0x7d0,()=>{const _0x531ec3=_0x536450;_0x19ed08[_0x531ec3(0x185)](),_0x5067e0(![]);});});if(_0x2b7eae)return!![];_0x268a96<_0x454820-0x1&&await new Promise(_0x37f56f=>setTimeout(_0x37f56f,SERVER_CHECK_INTERVAL));}return![];}function a0_0x4a04(){const _0x425cf6=['inherit','297QBGOFC','success','\x0a\x20\x20Web\x20UI:\x20\x20\x20\x20\x20\x20\x20','SIGTERM','utf8','224PWLXiz','2FUxapK','backend','Request\x20timed\x20out','kill','argv','\x20\x20API\x20Health:\x20\x20\x20','error','9737dcgQFd','PORT','Failed\x20to\x20trigger\x20schedule:\x20','start','Server\x20discovered\x20at\x20','../src/services/portRegistry.js','win32','log','15380BfrMId','POST','LOXIA_HOST','\x20\x20Terminal\x20UI:\x20\x20loxia\x20terminal','length','/api/schedules/','--help','catch','src','Starting\x20Loxia\x20server...\x0a','end','host','get','parse','\x20\x20loxia\x20serve\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Start\x20server\x20only','\x20\x20loxia\x20web\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Start\x20server\x20+\x20Web\x20UI','pid','5qwDqrv','includes','open','byteLength','node','data','Failed\x20to\x20start\x20server\x20within\x2030s.\x20Check\x20logs.','request','Starting\x20Loxia\x20server\x20in\x20background...','platform','\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','No\x20running\x20server\x20found.\x20Starting\x20Loxia\x20in\x20background...','cleanupStaleEntries','loxia-terminal.js','application/json','Waiting\x20for\x20server\x20to\x20start...','Starting\x20Terminal\x20UI...\x0a','setTimeout','Please\x20open\x20manually:\x20','\x0aShutting\x20down\x20server...','/trigger','ceil','Run\x20\x22loxia\x20--help\x22\x20for\x20usage\x20information.','unref','397122mutjNd','exit','ignore','message','\x0aNo\x20running\x20server\x20found\x20in\x20the\x20port\x20registry.','1465266TvhVkK','Looking\x20for\x20running\x20server...','\x22\x20triggered\x20successfully.','Could\x20not\x20open\x20browser\x20automatically.','xdg-open','234NOswWM','Loxia\x20Autopilot\x20One\x20v','port','455808eABVgx','LOXIA_PORT','/api/system/idle-shutdown','Schedule\x20\x22','\x0aServer\x20may\x20still\x20be\x20starting.\x20Check\x20the\x20port\x20registry\x20or\x20logs.','\x20but\x20not\x20responding.','/api/health\x0a','toString','version','write','\x0aLoxia\x20Autopilot\x20One\x20v','index.js','\x0aServer\x20registered\x20at\x20','SIGINT','stringify','\x0a✓\x20Server\x20running\x20at\x20','http://','170yLURQP','help','--port','Unknown\x20command:\x20','statusCode','package.json','146817bJvvRY','\x20\x20loxia\x20plus-terminal\x20\x20#\x20Start\x20server\x20+\x20Terminal\x20UI\x0a','184381iQrjvr','\x0aServer\x20failed\x20to\x20start.\x20Please\x20check\x20logs.','web','destroy'];a0_0x4a04=function(){return _0x425cf6;};return a0_0x4a04();}async function waitForServerWithDiscovery(_0x39e81b=SERVER_STARTUP_TIMEOUT){const _0x8b5a9a=a0_0x5bda23,_0x5b154b=Date['now']();while(Date['now']()-_0x5b154b<_0x39e81b){const _0x37a8c2=await discoverBackend();if(_0x37a8c2){const _0x2486b7=await checkServerRunning(_0x37a8c2[_0x8b5a9a(0x1a7)],_0x37a8c2[_0x8b5a9a(0x1d1)]);if(_0x2486b7)return _0x37a8c2;}await new Promise(_0x3de863=>setTimeout(_0x3de863,SERVER_CHECK_INTERVAL));}return null;}async function waitForServerAtPort(_0x38df08,_0x1b4af6,_0x8c542f=SERVER_STARTUP_TIMEOUT){const _0x4ca2f8=a0_0x5bda23,_0x5d3ff3=Math[_0x4ca2f8(0x1c2)](_0x8c542f/SERVER_CHECK_INTERVAL),_0x57d0c7=await checkServerRunning(_0x38df08,_0x1b4af6,_0x5d3ff3);return _0x57d0c7?{'host':_0x38df08,'port':_0x1b4af6}:null;}function openBrowser(_0x44244a){const _0x39ee88=a0_0x5bda23;let _0x38be77,_0x12d9ae;if(process['platform']==='darwin')_0x38be77=_0x39ee88(0x1af),_0x12d9ae=[_0x44244a];else process[_0x39ee88(0x1b6)]===_0x39ee88(0x19a)?(_0x38be77='cmd',_0x12d9ae=['/c',_0x39ee88(0x197),'\x22\x22',_0x44244a]):(_0x38be77=_0x39ee88(0x1ce),_0x12d9ae=[_0x44244a]);const _0x4de93e=spawn(_0x38be77,_0x12d9ae,{'detached':!![],'stdio':_0x39ee88(0x1c7)});_0x4de93e[_0x39ee88(0x1c4)](),_0x4de93e['on'](_0x39ee88(0x193),()=>{const _0x115725=_0x39ee88;console[_0x115725(0x19b)](_0x115725(0x1cd)),console[_0x115725(0x19b)](_0x115725(0x1bf)+_0x44244a);});}function startServer(_0x3d61a4=![]){const _0x49289d=a0_0x5bda23,_0x236640={...process.env};explicitPort&&(_0x236640[_0x49289d(0x16a)]=explicitPort[_0x49289d(0x170)](),_0x236640[_0x49289d(0x195)]=explicitPort[_0x49289d(0x170)]());flags['host']&&(_0x236640[_0x49289d(0x19e)]=flags[_0x49289d(0x1a7)]);const _0x181333=join(__dirname,'..',_0x49289d(0x1a4),_0x49289d(0x174)),_0x3a53af=spawn('node',[_0x181333],{'cwd':join(__dirname,'..'),'env':_0x236640,'stdio':_0x3d61a4?['ignore',_0x49289d(0x1c7),_0x49289d(0x1c7)]:_0x49289d(0x186),'detached':_0x3d61a4});return _0x3d61a4&&_0x3a53af[_0x49289d(0x1c4)](),_0x3a53af;}function startTerminalUIProcess(_0x596e9c,_0x3cfeba){const _0x582734=a0_0x5bda23,_0x348fb3=join(__dirname,_0x582734(0x1ba)),_0x42e163={...process.env,'LOXIA_PORT':_0x3cfeba[_0x582734(0x170)](),'LOXIA_HOST':_0x596e9c},_0x2ecbdc=spawn(_0x582734(0x1b1),[_0x348fb3],{'cwd':join(__dirname,'..'),'env':_0x42e163,'stdio':'inherit'});return _0x2ecbdc;}const commands={'web':async()=>{const _0x45440a=a0_0x5bda23;console['log'](_0x45440a(0x1a5));const _0x27559a=startServer(![]);console[_0x45440a(0x19b)]('Waiting\x20for\x20server\x20to\x20start...');let _0x2ab704;explicitPort?_0x2ab704=await waitForServerAtPort(host,explicitPort):_0x2ab704=await waitForServerWithDiscovery();if(_0x2ab704){const _0x392ed5='http://'+_0x2ab704['host']+':'+_0x2ab704[_0x45440a(0x1d1)];console['log']('\x0aOpening\x20Web\x20UI\x20at\x20'+_0x392ed5),openBrowser(_0x392ed5);}else console[_0x45440a(0x19b)](_0x45440a(0x16d));process['on']('SIGINT',()=>_0x27559a[_0x45440a(0x190)](_0x45440a(0x176))),process['on'](_0x45440a(0x18a),()=>_0x27559a[_0x45440a(0x190)](_0x45440a(0x18a))),_0x27559a['on'](_0x45440a(0x1c6),_0x416047=>process[_0x45440a(0x1c6)](_0x416047||0x0));},'plus-web':async()=>{const _0xf8a90b=a0_0x5bda23;await commands[_0xf8a90b(0x184)]();},'serve':async()=>{const _0x46d191=a0_0x5bda23;console[_0x46d191(0x19b)](_0x46d191(0x1a5));const _0x78412d=startServer(![]);console['log'](_0x46d191(0x1bc));let _0x4fdd4d;explicitPort?_0x4fdd4d=await waitForServerAtPort(host,explicitPort):_0x4fdd4d=await waitForServerWithDiscovery();if(_0x4fdd4d){const _0x145590='http://'+_0x4fdd4d[_0x46d191(0x1a7)]+':'+_0x4fdd4d[_0x46d191(0x1d1)];console[_0x46d191(0x19b)](_0x46d191(0x178)+_0x145590),console['log'](_0x46d191(0x189)+_0x145590),console[_0x46d191(0x19b)](_0x46d191(0x19f)),console['log'](_0x46d191(0x192)+_0x145590+_0x46d191(0x16f));}else console[_0x46d191(0x19b)]('\x0aServer\x20started\x20but\x20may\x20still\x20be\x20initializing.'),console[_0x46d191(0x19b)]('Run\x20\x27loxia\x20terminal\x27\x20to\x20connect\x20when\x20ready.');process['on'](_0x46d191(0x176),()=>_0x78412d[_0x46d191(0x190)](_0x46d191(0x176))),process['on'](_0x46d191(0x18a),()=>_0x78412d[_0x46d191(0x190)](_0x46d191(0x18a))),_0x78412d['on'](_0x46d191(0x1c6),_0x5c4248=>process['exit'](_0x5c4248||0x0));},'terminal':async()=>{const _0x151ee0=a0_0x5bda23;console[_0x151ee0(0x19b)](_0x151ee0(0x1cb));let _0x395372=await discoverBackend();explicitPort&&(_0x395372={'host':host,'port':explicitPort});!_0x395372&&(console[_0x151ee0(0x193)](_0x151ee0(0x1c9)),console[_0x151ee0(0x193)]('\x0aPlease\x20start\x20the\x20server\x20first:'),console[_0x151ee0(0x193)](_0x151ee0(0x1ab)),console[_0x151ee0(0x193)](_0x151ee0(0x1aa)),console[_0x151ee0(0x193)](_0x151ee0(0x181)),process[_0x151ee0(0x1c6)](0x1));const _0x9bb61f=await checkServerRunning(_0x395372[_0x151ee0(0x1a7)],_0x395372['port']);!_0x9bb61f&&(console[_0x151ee0(0x193)](_0x151ee0(0x175)+_0x395372[_0x151ee0(0x1a7)]+':'+_0x395372[_0x151ee0(0x1d1)]+_0x151ee0(0x16e)),console[_0x151ee0(0x193)]('It\x20may\x20have\x20crashed.\x20Please\x20restart\x20it.'),process[_0x151ee0(0x1c6)](0x1));console[_0x151ee0(0x19b)](_0x151ee0(0x198)+_0x395372[_0x151ee0(0x1a7)]+':'+_0x395372[_0x151ee0(0x1d1)]),console[_0x151ee0(0x19b)](_0x151ee0(0x1bd));const _0x518bcb=startTerminalUIProcess(_0x395372['host'],_0x395372[_0x151ee0(0x1d1)]);process['on']('SIGINT',()=>_0x518bcb[_0x151ee0(0x190)]('SIGINT')),process['on']('SIGTERM',()=>_0x518bcb[_0x151ee0(0x190)](_0x151ee0(0x18a))),_0x518bcb['on'](_0x151ee0(0x1c6),_0x2eb6be=>process[_0x151ee0(0x1c6)](_0x2eb6be||0x0));},'plus-terminal':async()=>{const _0x2a298c=a0_0x5bda23;console['log'](_0x2a298c(0x1b5));const _0x3d4039=startServer(!![]);let _0x10ab75;explicitPort?_0x10ab75=await waitForServerAtPort(host,explicitPort):_0x10ab75=await waitForServerWithDiscovery();!_0x10ab75&&(console[_0x2a298c(0x193)](_0x2a298c(0x183)),process[_0x2a298c(0x1c6)](0x1));console[_0x2a298c(0x19b)]('Server\x20running\x20at\x20http://'+_0x10ab75['host']+':'+_0x10ab75[_0x2a298c(0x1d1)]),console[_0x2a298c(0x19b)](_0x2a298c(0x1bd));const _0x9e72a7=startTerminalUIProcess(_0x10ab75[_0x2a298c(0x1a7)],_0x10ab75['port']);_0x9e72a7['on'](_0x2a298c(0x1c6),_0x144705=>{const _0x296970=_0x2a298c;console['log'](_0x296970(0x1c0));try{process[_0x296970(0x190)](_0x3d4039[_0x296970(0x1ac)],'SIGTERM');}catch(_0x530b6b){}process[_0x296970(0x1c6)](_0x144705||0x0);}),process['on']('SIGINT',()=>{const _0x4da5f2=_0x2a298c;_0x9e72a7['kill'](_0x4da5f2(0x176));}),process['on']('SIGTERM',()=>{const _0x2a7ce2=_0x2a298c;_0x9e72a7[_0x2a7ce2(0x190)](_0x2a7ce2(0x18a));});},'trigger-schedule':async()=>{const _0x3f4189=a0_0x5bda23,_0x573cd1=args[0x1];!_0x573cd1&&(console['error']('Usage:\x20loxia\x20trigger-schedule\x20<schedule-id>'),process[_0x3f4189(0x1c6)](0x1));let _0x553bda=await discoverBackend(),_0x1d2b51=![];if(_0x553bda){const _0x31d908=await checkServerRunning(_0x553bda[_0x3f4189(0x1a7)],_0x553bda[_0x3f4189(0x1d1)]);if(!_0x31d908)_0x553bda=null;}!_0x553bda&&(console[_0x3f4189(0x19b)](_0x3f4189(0x1b8)),startServer(!![]),_0x1d2b51=!![],explicitPort?_0x553bda=await waitForServerAtPort(host,explicitPort,0x7530):_0x553bda=await waitForServerWithDiscovery(0x7530),!_0x553bda&&(console['error'](_0x3f4189(0x1b3)),process[_0x3f4189(0x1c6)](0x1)),console['log']('Server\x20started\x20at\x20'+_0x553bda[_0x3f4189(0x1a7)]+':'+_0x553bda['port']));const _0x1eb062=_0x3f4189(0x179)+_0x553bda['host']+':'+_0x553bda[_0x3f4189(0x1d1)]+_0x3f4189(0x1a1)+encodeURIComponent(_0x573cd1)+_0x3f4189(0x1c1);try{const _0x8512f=await new Promise((_0x451bd2,_0x9c21d5)=>{const _0x5ad3e4=_0x3f4189,_0x4df037=JSON[_0x5ad3e4(0x177)]({}),_0x3282c7=a0_0xc46307[_0x5ad3e4(0x1b4)](_0x1eb062,{'method':'POST','headers':{'Content-Type':'application/json','Content-Length':Buffer[_0x5ad3e4(0x1b0)](_0x4df037)}},_0x2d7bdf=>{const _0x2f3b0c=_0x5ad3e4;let _0x3bb0d5='';_0x2d7bdf['on'](_0x2f3b0c(0x1b2),_0x541802=>_0x3bb0d5+=_0x541802),_0x2d7bdf['on'](_0x2f3b0c(0x1a6),()=>{try{_0x451bd2(JSON['parse'](_0x3bb0d5));}catch{_0x9c21d5(new Error('Invalid\x20response:\x20'+_0x3bb0d5));}});});_0x3282c7['on'](_0x5ad3e4(0x193),_0x9c21d5),_0x3282c7[_0x5ad3e4(0x1be)](0xea60,()=>{const _0x4c8013=_0x5ad3e4;_0x3282c7[_0x4c8013(0x185)](),_0x9c21d5(new Error(_0x4c8013(0x18f)));}),_0x3282c7['write'](_0x4df037),_0x3282c7[_0x5ad3e4(0x1a6)]();});_0x8512f[_0x3f4189(0x188)]?console['log'](_0x3f4189(0x16c)+(_0x8512f['scheduleName']||_0x573cd1)+_0x3f4189(0x1cc)):(console['error']('Failed\x20to\x20trigger\x20schedule:\x20'+_0x8512f[_0x3f4189(0x193)]),process[_0x3f4189(0x1c6)](0x1));}catch(_0x50cd06){console[_0x3f4189(0x193)](_0x3f4189(0x196)+_0x50cd06[_0x3f4189(0x1c8)]),process[_0x3f4189(0x1c6)](0x1);}if(_0x1d2b51){const _0x1de91c=_0x3f4189(0x179)+_0x553bda[_0x3f4189(0x1a7)]+':'+_0x553bda[_0x3f4189(0x1d1)]+_0x3f4189(0x16b);try{const _0x57fe7b=JSON['stringify']({'timeoutMinutes':0xa});await new Promise(_0x50a33d=>{const _0x5b7d62=_0x3f4189,_0x412d77=a0_0xc46307[_0x5b7d62(0x1b4)](_0x1de91c,{'method':_0x5b7d62(0x19d),'headers':{'Content-Type':_0x5b7d62(0x1bb),'Content-Length':Buffer[_0x5b7d62(0x1b0)](_0x57fe7b)}},_0x1a1704=>{const _0x23e31b=_0x5b7d62;_0x1a1704['on'](_0x23e31b(0x1b2),()=>{}),_0x1a1704['on'](_0x23e31b(0x1a6),_0x50a33d);});_0x412d77['on']('error',_0x50a33d),_0x412d77[_0x5b7d62(0x172)](_0x57fe7b),_0x412d77[_0x5b7d62(0x1a6)]();});}catch{}}process[_0x3f4189(0x1c6)](0x0);}};commands[command]?commands[command]()[a0_0x5bda23(0x1a3)](_0x4b5ec6=>{const _0x5abf9a=a0_0x5bda23;console[_0x5abf9a(0x193)]('Error:',_0x4b5ec6['message']),process[_0x5abf9a(0x1c6)](0x1);}):(console[a0_0x5bda23(0x193)](a0_0x5bda23(0x17d)+command),console[a0_0x5bda23(0x193)](a0_0x5bda23(0x1c3)),process[a0_0x5bda23(0x1c6)](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_0x5e67e8=a0_0x1b0b;(function(_0xdda780,_0x58be3e){const _0x329ee7=a0_0x1b0b,_0xea67c6=_0xdda780();while(!![]){try{const _0x5812f7=-parseInt(_0x329ee7(0xa5))/0x1*(-parseInt(_0x329ee7(0xa8))/0x2)+-parseInt(_0x329ee7(0xa3))/0x3+-parseInt(_0x329ee7(0x96))/0x4+-parseInt(_0x329ee7(0x8a))/0x5+-parseInt(_0x329ee7(0xad))/0x6+-parseInt(_0x329ee7(0x85))/0x7*(parseInt(_0x329ee7(0x9e))/0x8)+parseInt(_0x329ee7(0x98))/0x9;if(_0x5812f7===_0x58be3e)break;else _0xea67c6['push'](_0xea67c6['shift']());}catch(_0x5dc730){_0xea67c6['push'](_0xea67c6['shift']());}}}(a0_0x24a9,0x93329));import{spawn}from'child_process';function a0_0x1b0b(_0x49c01c,_0x3268bc){_0x49c01c=_0x49c01c-0x82;const _0x24a957=a0_0x24a9();let _0x1b0b47=_0x24a957[_0x49c01c];return _0x1b0b47;}import a0_0x14dd9e from'net';import a0_0x11b595 from'path';import{fileURLToPath}from'url';const __filename=fileURLToPath(import.meta.url),__dirname=a0_0x11b595[a0_0x5e67e8(0x9b)](__filename),projectRoot=a0_0x11b595[a0_0x5e67e8(0x9b)](__dirname),DEFAULT_PORT=0x1f90,DEFAULT_HOST=a0_0x5e67e8(0x9d),SERVER_STARTUP_TIMEOUT=0x2710;async function isServerRunning(_0x473b20,_0x227e00){return new Promise(_0x1b884=>{const _0x326341=a0_0x1b0b,_0x159fe5=new a0_0x14dd9e['Socket']();_0x159fe5['setTimeout'](0x7d0),_0x159fe5['on'](_0x326341(0xa9),()=>{const _0x417bad=_0x326341;_0x159fe5[_0x417bad(0xa2)](),_0x1b884(!![]);}),_0x159fe5['on'](_0x326341(0x8c),()=>{_0x159fe5['destroy'](),_0x1b884(![]);}),_0x159fe5['on']('error',()=>{const _0x127fd5=_0x326341;_0x159fe5[_0x127fd5(0xa2)](),_0x1b884(![]);}),_0x159fe5[_0x326341(0xa9)](_0x227e00,_0x473b20);});}function a0_0x24a9(){const _0x5aa684=['--ui','pipe','exit','message','23499loyeVa','slice','log','Failed\x20to\x20start\x20server:','stdout','140395LAHeut','❌\x20Failed\x20to\x20start\x20Terminal\x20UI:','timeout','✓\x20Server\x20is\x20already\x20running\x20at\x20','../src/interfaces/terminal/index.js','kill','\x20\x20\x203.\x20Check\x20logs\x20for\x20more\x20details','🎨\x20Launching\x20Ink-based\x20Terminal\x20UI...','error','length','\x20\x20Loxia\x20Autopilot\x20One\x20-\x20Terminal\x20UI','\x20\x20\x201.\x20Make\x20sure\x20no\x20other\x20process\x20is\x20using\x20port\x208080','1702476hDLwsF','bin/cli.js','13421349xEwUIM','argv','--host','dirname','\x20\x20\x202.\x20Try\x20running\x20the\x20server\x20manually:\x20node\x20bin/cli.js','localhost','800DgzFUV','🚀\x20Starting\x20Loxia\x20server...','━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━','✗\x20Server\x20is\x20not\x20running','destroy','615684FoLDhh','toString','3RCrQUb','Server\x20startup\x20timeout','stderr','293548FZdVoA','connect','...','--port','✓\x20Server\x20started\x20at\x20','2004216UIQgNL'];a0_0x24a9=function(){return _0x5aa684;};return a0_0x24a9();}async function startServer(_0x483be1,_0x6ac747){const _0x2caf6a=a0_0x5e67e8;return console[_0x2caf6a(0x87)](_0x2caf6a(0x9f)),new Promise((_0x30a15b,_0x50e35c)=>{const _0x364da4=_0x2caf6a,_0x5727fc=spawn('node',[a0_0x11b595['join'](projectRoot,_0x364da4(0x97)),_0x364da4(0xae),'web',_0x364da4(0x9a),_0x483be1,'--port',_0x6ac747[_0x364da4(0xa4)]()],{'detached':![],'stdio':['ignore',_0x364da4(0x82),'pipe']});_0x5727fc[_0x364da4(0x89)]['on']('data',()=>{}),_0x5727fc[_0x364da4(0xa7)]['on']('data',()=>{}),_0x5727fc['on'](_0x364da4(0x92),_0x4ada7f=>{const _0x2b280f=_0x364da4;console[_0x2b280f(0x92)](_0x2b280f(0x88),_0x4ada7f[_0x2b280f(0x84)]),_0x50e35c(_0x4ada7f);});const _0x173db8=Date['now'](),_0x303a81=setInterval(async()=>{const _0x27ab7c=_0x364da4,_0x362f08=await isServerRunning(_0x483be1,_0x6ac747);if(_0x362f08)clearInterval(_0x303a81),console[_0x27ab7c(0x87)](_0x27ab7c(0xac)+_0x483be1+':'+_0x6ac747),_0x30a15b();else Date['now']()-_0x173db8>SERVER_STARTUP_TIMEOUT&&(clearInterval(_0x303a81),_0x5727fc[_0x27ab7c(0x8f)](),_0x50e35c(new Error(_0x27ab7c(0xa6))));},0x1f4);});}async function main(){const _0xb70dbd=a0_0x5e67e8;try{console[_0xb70dbd(0x87)](_0xb70dbd(0xa0)),console['log'](_0xb70dbd(0x94)),console[_0xb70dbd(0x87)](_0xb70dbd(0xa0)),console[_0xb70dbd(0x87)]('');const _0xeb8ef3=process[_0xb70dbd(0x99)][_0xb70dbd(0x86)](0x2);let _0x1ef677=DEFAULT_HOST,_0x24bea1=DEFAULT_PORT;for(let _0x2c76b0=0x0;_0x2c76b0<_0xeb8ef3[_0xb70dbd(0x93)];_0x2c76b0++){if(_0xeb8ef3[_0x2c76b0]===_0xb70dbd(0x9a)&&_0xeb8ef3[_0x2c76b0+0x1])_0x1ef677=_0xeb8ef3[_0x2c76b0+0x1],_0x2c76b0++;else _0xeb8ef3[_0x2c76b0]===_0xb70dbd(0xab)&&_0xeb8ef3[_0x2c76b0+0x1]&&(_0x24bea1=parseInt(_0xeb8ef3[_0x2c76b0+0x1],0xa),_0x2c76b0++);}console['log']('🔍\x20Checking\x20if\x20server\x20is\x20running\x20at\x20'+_0x1ef677+':'+_0x24bea1+_0xb70dbd(0xaa));const _0x56dd26=await isServerRunning(_0x1ef677,_0x24bea1);!_0x56dd26?(console['log'](_0xb70dbd(0xa1)),await startServer(_0x1ef677,_0x24bea1)):console[_0xb70dbd(0x87)](_0xb70dbd(0x8d)+_0x1ef677+':'+_0x24bea1),console[_0xb70dbd(0x87)](''),console[_0xb70dbd(0x87)](_0xb70dbd(0x91)),console[_0xb70dbd(0x87)](''),await new Promise(_0x5e334=>setTimeout(_0x5e334,0x1f4)),process.env.LOXIA_HOST=_0x1ef677,process.env.LOXIA_PORT=_0x24bea1[_0xb70dbd(0xa4)](),await import(_0xb70dbd(0x8e));}catch(_0x44655f){console[_0xb70dbd(0x92)](''),console[_0xb70dbd(0x92)](_0xb70dbd(0x8b)),console[_0xb70dbd(0x92)]('\x20\x20',_0x44655f[_0xb70dbd(0x84)]),console[_0xb70dbd(0x92)](''),console[_0xb70dbd(0x92)]('💡\x20Troubleshooting:'),console[_0xb70dbd(0x92)](_0xb70dbd(0x95)),console[_0xb70dbd(0x92)](_0xb70dbd(0x9c)),console[_0xb70dbd(0x92)](_0xb70dbd(0x90)),console[_0xb70dbd(0x92)](''),process[_0xb70dbd(0x83)](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_0xf6c2c=a0_0x2e74;(function(_0x44bdff,_0x35e91d){const _0x595e95=a0_0x2e74,_0x8045df=_0x44bdff();while(!![]){try{const _0x5c4577=parseInt(_0x595e95(0x1e1))/0x1+-parseInt(_0x595e95(0x1d1))/0x2*(parseInt(_0x595e95(0x1d4))/0x3)+-parseInt(_0x595e95(0x1bf))/0x4+parseInt(_0x595e95(0x1c2))/0x5+parseInt(_0x595e95(0x1cd))/0x6+-parseInt(_0x595e95(0x1dd))/0x7+-parseInt(_0x595e95(0x1c9))/0x8*(-parseInt(_0x595e95(0x1da))/0x9);if(_0x5c4577===_0x35e91d)break;else _0x8045df['push'](_0x8045df['shift']());}catch(_0x1cba33){_0x8045df['push'](_0x8045df['shift']());}}}(a0_0x4445,0x63147));function a0_0x2e74(_0x2d8634,_0x51b457){_0x2d8634=_0x2d8634-0x1be;const _0x4445dc=a0_0x4445();let _0x2e74d7=_0x4445dc[_0x2d8634];return _0x2e74d7;}import{startTerminalUI}from'../src/interfaces/terminal/index.js';const args=process[a0_0xf6c2c(0x1c7)][a0_0xf6c2c(0x1e0)](0x2),options={'host':a0_0xf6c2c(0x1c0),'port':0x1f90};for(let i=0x0;i<args[a0_0xf6c2c(0x1d9)];i++){const arg=args[i];if(arg===a0_0xf6c2c(0x1c4)||arg==='-h')options[a0_0xf6c2c(0x1d7)]=args[++i];else{if(arg===a0_0xf6c2c(0x1cc)||arg==='-p')options['port']=parseInt(args[++i],0xa);else arg===a0_0xf6c2c(0x1cb)&&(console['log'](a0_0xf6c2c(0x1ce)),process['exit'](0x0));}}process.env.LOXIA_HOST&&(options[a0_0xf6c2c(0x1d7)]=process.env.LOXIA_HOST);process.env.LOXIA_PORT&&(options[a0_0xf6c2c(0x1db)]=parseInt(process.env.LOXIA_PORT,0xa));function a0_0x4445(){const _0x4f427c=['Or\x20use\x20the\x20web\x20UI\x20instead:','--host','\x20\x20-\x20Redirected\x20output\x20(e.g.,\x20>\x20file.txt,\x202>&1\x20|\x20...)','Press\x20Ctrl+C\x20to\x20exit\x0a','argv','\x20\x20-\x20Some\x20CI/CD\x20environments','14648SgwnCH','stdin','--help','--port','2191302yDqWsk','\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','Starting\x20Loxia\x20Terminal\x20UI...','error','2HALOVV','catch','exit','264033CuvRKe','\x0aTerminal\x20UI\x20exited','The\x20terminal\x20UI\x20cannot\x20run\x20in:','host','\x20\x20npm\x20start','length','9HBBLjA','port','waitUntilExit','3551198TMAhgl','log','isTTY','slice','548391wHOSek','\x20\x20npm\x20run\x20terminal-ui','2093652pfnjkc','localhost','Connecting\x20to:\x20','3045650avZedU'];a0_0x4445=function(){return _0x4f427c;};return a0_0x4445();}!process[a0_0xf6c2c(0x1ca)][a0_0xf6c2c(0x1df)]&&(console['error']('ERROR:\x20Terminal\x20UI\x20requires\x20an\x20interactive\x20terminal\x20(TTY).'),console[a0_0xf6c2c(0x1d0)](''),console[a0_0xf6c2c(0x1d0)](a0_0xf6c2c(0x1d6)),console[a0_0xf6c2c(0x1d0)]('\x20\x20-\x20Piped\x20environments\x20(e.g.,\x20|\x20head,\x20|\x20grep)'),console[a0_0xf6c2c(0x1d0)](a0_0xf6c2c(0x1c5)),console[a0_0xf6c2c(0x1d0)]('\x20\x20-\x20Background\x20processes\x20(e.g.,\x20&\x20at\x20the\x20end)'),console[a0_0xf6c2c(0x1d0)](a0_0xf6c2c(0x1c8)),console[a0_0xf6c2c(0x1d0)](''),console[a0_0xf6c2c(0x1d0)]('Please\x20run\x20this\x20command\x20in\x20a\x20real\x20terminal\x20without\x20pipes\x20or\x20redirection:'),console[a0_0xf6c2c(0x1d0)](a0_0xf6c2c(0x1be)),console['error'](''),console['error'](a0_0xf6c2c(0x1c3)),console[a0_0xf6c2c(0x1d0)](a0_0xf6c2c(0x1d8)),process[a0_0xf6c2c(0x1d3)](0x1));console[a0_0xf6c2c(0x1de)](a0_0xf6c2c(0x1cf)),console[a0_0xf6c2c(0x1de)](a0_0xf6c2c(0x1c1)+options[a0_0xf6c2c(0x1d7)]+':'+options['port']),console[a0_0xf6c2c(0x1de)](a0_0xf6c2c(0x1c6));const instance=startTerminalUI(options);instance[a0_0xf6c2c(0x1dc)]()['then'](()=>{const _0x498eaf=a0_0xf6c2c;console[_0x498eaf(0x1de)](_0x498eaf(0x1d5)),process[_0x498eaf(0x1d3)](0x0);})[a0_0xf6c2c(0x1d2)](_0x46321a=>{const _0x5894e5=a0_0xf6c2c;console[_0x5894e5(0x1d0)]('\x0aTerminal\x20UI\x20error:',_0x46321a),process[_0x5894e5(0x1d3)](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_0x19f30b=a0_0x56cb;(function(_0x10cd28,_0x41b83f){const _0x176440=a0_0x56cb,_0x1acc6b=_0x10cd28();while(!![]){try{const _0x3c01da=parseInt(_0x176440(0xae))/0x1*(parseInt(_0x176440(0xac))/0x2)+-parseInt(_0x176440(0xcb))/0x3+parseInt(_0x176440(0xbe))/0x4+-parseInt(_0x176440(0xbc))/0x5*(-parseInt(_0x176440(0xd2))/0x6)+parseInt(_0x176440(0xc6))/0x7*(-parseInt(_0x176440(0xd4))/0x8)+-parseInt(_0x176440(0xd9))/0x9+parseInt(_0x176440(0xc9))/0xa;if(_0x3c01da===_0x41b83f)break;else _0x1acc6b['push'](_0x1acc6b['shift']());}catch(_0x4c9409){_0x1acc6b['push'](_0x1acc6b['shift']());}}}(a0_0x3a5b,0x1bde8));import{spawn}from'child_process';import{fileURLToPath}from'url';function a0_0x3a5b(){const _0x1eab4b=['killed','get','🖥️\x20\x20Starting\x20Terminal\x20UI...','pipe','/health','🛑\x20Stopping\x20server...','85925qOClCM','SIGKILL','571356AxqNbg','⚠️\x20\x20Server\x20may\x20not\x20be\x20fully\x20ready,\x20but\x20continuing\x20anyway...','stdout','[SERVER\x20ERROR]\x20','exit','toString','\x0a👋\x20Terminal\x20UI\x20closed.','Failed\x20to\x20start\x20Terminal\x20UI:','14skeHbI','bin','\x0a⚠️\x20\x20Received\x20SIGTERM,\x20shutting\x20down...','138130bHeSBf','🚀\x20Starting\x20Loxia\x20server...','361836uuZxjp','SIGINT','inherit','node','log','setTimeout','║\x20\x20\x20Loxia\x20AI\x20Agents\x20-\x20Server\x20+\x20Terminal\x20UI\x20\x20\x20\x20\x20\x20║','42LYJpzf','╚════════════════════════════════════════════════╝','769728rEFfgb','ExperimentalWarning','Server\x20returned\x20','kill','statusCode','366156lwZebk','ignore','Error\x20during\x20startup:','loxia-terminal.js','trim','error','destroy','381866TbBdYm','message','1PJiHuu','Timeout','includes','data','[SERVER]\x20','SIGTERM','index.js','http://localhost:'];a0_0x3a5b=function(){return _0x1eab4b;};return a0_0x3a5b();}import{dirname,join}from'path';import a0_0x8338b7 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_0x56cb(_0x2c1d21,_0x52e90c){_0x2c1d21=_0x2c1d21-0xab;const _0x3a5bb1=a0_0x3a5b();let _0x56cb49=_0x3a5bb1[_0x2c1d21];return _0x56cb49;}async function checkServerReady(_0x579b4f=0xa,_0x2256b1=0x1f4){const _0x3134ff=a0_0x56cb;for(let _0x1b8cae=0x0;_0x1b8cae<_0x579b4f;_0x1b8cae++){try{return await new Promise((_0x17da4d,_0xf9a0e)=>{const _0x267a8a=a0_0x56cb,_0x5bf65c=a0_0x8338b7[_0x267a8a(0xb7)](_0x267a8a(0xb5)+SERVER_PORT+_0x267a8a(0xba),_0x1a1717=>{const _0xacb0bb=_0x267a8a;_0x1a1717[_0xacb0bb(0xd8)]===0xc8?_0x17da4d():_0xf9a0e(new Error(_0xacb0bb(0xd6)+_0x1a1717[_0xacb0bb(0xd8)]));});_0x5bf65c['on']('error',_0xf9a0e),_0x5bf65c[_0x267a8a(0xd0)](0x3e8,()=>{const _0x4ea96d=_0x267a8a;_0x5bf65c[_0x4ea96d(0xab)](),_0xf9a0e(new Error(_0x4ea96d(0xaf)));});}),console[_0x3134ff(0xcf)]('✅\x20Server\x20is\x20ready!'),!![];}catch(_0x4ba519){_0x1b8cae<_0x579b4f-0x1&&await new Promise(_0x260c71=>setTimeout(_0x260c71,_0x2256b1));}}return console['log'](_0x3134ff(0xbf)),![];}async function startServer(){return new Promise(_0x13e446=>{const _0x32d7e4=a0_0x56cb;console[_0x32d7e4(0xcf)](_0x32d7e4(0xca));const _0x91c4a6=join(rootDir,'src',_0x32d7e4(0xb4));serverProcess=spawn(_0x32d7e4(0xce),[_0x91c4a6],{'cwd':rootDir,'env':{...process.env},'stdio':[_0x32d7e4(0xda),'pipe',_0x32d7e4(0xb9)],'detached':![]}),serverProcess[_0x32d7e4(0xc0)]['on'](_0x32d7e4(0xb1),_0x5e3b44=>{const _0x5df731=_0x32d7e4,_0xd21e7c=_0x5e3b44[_0x5df731(0xc3)]()['trim']();_0xd21e7c&&console[_0x5df731(0xcf)](_0x5df731(0xb2)+_0xd21e7c);}),serverProcess['stderr']['on'](_0x32d7e4(0xb1),_0xeb6078=>{const _0x4e9d38=_0x32d7e4,_0x3b2ac7=_0xeb6078[_0x4e9d38(0xc3)]()[_0x4e9d38(0xdd)]();_0x3b2ac7&&!_0x3b2ac7[_0x4e9d38(0xb0)](_0x4e9d38(0xd5))&&console[_0x4e9d38(0xde)](_0x4e9d38(0xc1)+_0x3b2ac7);}),serverProcess['on'](_0x32d7e4(0xde),_0x3db94e=>{const _0x52f79b=_0x32d7e4;console[_0x52f79b(0xde)]('Failed\x20to\x20start\x20server:',_0x3db94e['message']),process[_0x52f79b(0xc2)](0x1);}),serverProcess['on'](_0x32d7e4(0xc2),(_0x169749,_0x1b7e53)=>{const _0x40476f=_0x32d7e4;_0x169749!==null&&_0x169749!==0x0&&(console[_0x40476f(0xde)]('Server\x20exited\x20with\x20code\x20'+_0x169749),process[_0x40476f(0xc2)](_0x169749));}),setTimeout(_0x13e446,STARTUP_WAIT);});}async function startTerminalUI(){const _0xeb3bfb=a0_0x56cb;console[_0xeb3bfb(0xcf)](_0xeb3bfb(0xb8)),console[_0xeb3bfb(0xcf)]('');const _0x25d2aa=join(rootDir,_0xeb3bfb(0xc7),_0xeb3bfb(0xdc)),_0x522b5e=spawn(_0xeb3bfb(0xce),[_0x25d2aa],{'cwd':rootDir,'env':{...process.env},'stdio':_0xeb3bfb(0xcd)});return _0x522b5e['on'](_0xeb3bfb(0xde),_0x5bea2a=>{const _0x3fa05c=_0xeb3bfb;console[_0x3fa05c(0xde)](_0x3fa05c(0xc5),_0x5bea2a[_0x3fa05c(0xad)]),cleanup(),process[_0x3fa05c(0xc2)](0x1);}),_0x522b5e['on'](_0xeb3bfb(0xc2),_0x26a2d2=>{const _0xef87f=_0xeb3bfb;console[_0xef87f(0xcf)](_0xef87f(0xc4)),cleanup(),process[_0xef87f(0xc2)](_0x26a2d2||0x0);}),_0x522b5e;}function cleanup(){const _0x3d8422=a0_0x56cb;serverProcess&&!serverProcess[_0x3d8422(0xb6)]&&(console[_0x3d8422(0xcf)](_0x3d8422(0xbb)),serverProcess[_0x3d8422(0xd7)](_0x3d8422(0xb3)),setTimeout(()=>{const _0x3cb309=_0x3d8422;!serverProcess[_0x3cb309(0xb6)]&&serverProcess[_0x3cb309(0xd7)](_0x3cb309(0xbd));},0x1388));}process['on'](a0_0x19f30b(0xcc),()=>{const _0x3efdb1=a0_0x19f30b;console[_0x3efdb1(0xcf)]('\x0a⚠️\x20\x20Received\x20SIGINT,\x20shutting\x20down...'),cleanup(),process[_0x3efdb1(0xc2)](0x0);}),process['on'](a0_0x19f30b(0xb3),()=>{const _0x32b374=a0_0x19f30b;console[_0x32b374(0xcf)](_0x32b374(0xc8)),cleanup(),process['exit'](0x0);}),process['on'](a0_0x19f30b(0xc2),()=>{cleanup();});async function main(){const _0x2c1e74=a0_0x19f30b;console[_0x2c1e74(0xcf)]('╔════════════════════════════════════════════════╗'),console['log'](_0x2c1e74(0xd1)),console[_0x2c1e74(0xcf)](_0x2c1e74(0xd3)),console[_0x2c1e74(0xcf)]('');try{await startServer(),await checkServerReady(),await startTerminalUI(),await new Promise(()=>{});}catch(_0x331456){console[_0x2c1e74(0xde)](_0x2c1e74(0xdb),_0x331456[_0x2c1e74(0xad)]),cleanup(),process['exit'](0x1);}}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.0.3",
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_0x340beb=a0_0x5723;(function(_0x4d93b1,_0x3cd244){const _0x2f8976=a0_0x5723,_0x54cf08=_0x4d93b1();while(!![]){try{const _0x27edad=-parseInt(_0x2f8976(0x171))/0x1+parseInt(_0x2f8976(0x159))/0x2*(-parseInt(_0x2f8976(0x12f))/0x3)+-parseInt(_0x2f8976(0x12d))/0x4+-parseInt(_0x2f8976(0x136))/0x5*(-parseInt(_0x2f8976(0x173))/0x6)+-parseInt(_0x2f8976(0x15e))/0x7+parseInt(_0x2f8976(0x174))/0x8*(parseInt(_0x2f8976(0x13a))/0x9)+parseInt(_0x2f8976(0x13c))/0xa*(parseInt(_0x2f8976(0x156))/0xb);if(_0x27edad===_0x3cd244)break;else _0x54cf08['push'](_0x54cf08['shift']());}catch(_0x55cf8a){_0x54cf08['push'](_0x54cf08['shift']());}}}(a0_0x5745,0x2257b));import{exec}from'child_process';import{promisify}from'util';import a0_0x347bbf from'https';import a0_0x139cb5 from'http';import a0_0x5da33e from'fs';import a0_0x1538fa from'path';import{fileURLToPath}from'url';function a0_0x5745(){const _0x366fe9=['python3\x20--version','catch','\x20-m\x20pip\x20install\x20','trim','❌\x20Installation\x20failed:','\x20\x20\x20✅\x20Python\x20found:\x20','arch','\x20\x20\x20✅\x20Semgrep\x20installed\x20successfully','\x20\x20\x20⚠️\x20\x20eslint-plugin-security\x20not\x20found','get','message','python3','startsWith','pipe','includes','chmod','checkov','https','mkdir','\x20\x20\x20✅\x20','\x20-m\x20pip\x20show\x20','statusCode','dirname','\x20\x20\x20Note:\x20To\x20use\x20system-wide,\x20add\x20to\x20PATH\x20or\x20install\x20globally:','77mYqPaV','\x20\x20\x20pip\x20install\x20semgrep\x20bandit\x20pip-audit\x20checkov\x20yamllint\x0a','Failed\x20to\x20download:\x20HTTP\x20','2572omsCXx','close','exit','\x20\x20\x20✅\x20Semgrep\x20already\x20installed:\x20','unlink','1327067oJXHOa','\x20\x20\x20To\x20enable\x20Python\x20scanning,\x20install\x20Python\x20and\x20run:','semgrep\x20--version','\x0aYou\x20can\x20manually\x20install\x20scanners:','\x20\x20\x20⚠️\x20\x20Python\x20not\x20found\x20-\x20skipping\x20Python\x20scanners','yamllint','...','/usr/local/Cellar','\x20-c\x20\x22import\x20sys;\x20print(sys.prefix)\x22','stdout','\x20\x20\x20⚠️\x20\x20Failed\x20to\x20install\x20Semgrep:\x20','join','bandit','/opt/homebrew','platform','🔍\x20Installing\x20Semgrep...','node_modules','python\x20--version','\x20\x20\x20Run:\x20npm\x20install\x20--save-dev\x20eslint-plugin-security\x0a','216010QIsLao','error','1237452CSWgxH','8KihVZO','\x20\x20\x20⚠️\x20\x20Failed\x20to\x20install\x20','headers','v1.55.0','promises','\x20\x20\x20Installing\x20','.scanners','\x0a═══════════════════════════════════════════════════════════','\x20\x20\x20You\x20can\x20install\x20manually:\x20pip\x20install\x20','python','═══════════════════════════════════════════════════════════','semgrep','625920YXBjss','\x20\x20npm\x20install\x20--save-dev\x20eslint-plugin-security','537bTAIpT','🐍\x20Checking\x20Python\x20scanners...','\x20\x20\x20Semgrep\x20not\x20found\x20in\x20PATH,\x20installing\x20standalone\x20binary...','═══════════════════════════════════════════════════════════\x0a','\x20\x20pip\x20install\x20semgrep\x20bandit\x20pip-audit','\x20\x20\x20pip\x20install\x20semgrep\x0a','log','5rEQclL','\x20\x20\x20⚠️\x20\x20No\x20Semgrep\x20binary\x20available\x20for\x20','\x20\x20\x20Location:\x20','\x20\x20\x20You\x20can\x20install\x20manually:\x20pip\x20install\x20semgrep\x0a','2516841UChKip','replace','638630HlAGYf','\x20already\x20installed'];a0_0x5745=function(){return _0x366fe9;};return a0_0x5745();}import{createWriteStream}from'fs';import{pipeline}from'stream/promises';const execAsync=promisify(exec),__filename=fileURLToPath(import.meta.url),__dirname=a0_0x1538fa[a0_0x340beb(0x154)](__filename),SCANNER_DIR=a0_0x1538fa[a0_0x340beb(0x169)](__dirname,'..',a0_0x340beb(0x16e),a0_0x340beb(0x17a)),SEMGREP_VERSION=a0_0x340beb(0x177);console[a0_0x340beb(0x135)](a0_0x340beb(0x12b)),console['log']('\x20\x20Installing\x20Security\x20Scanners'),console[a0_0x340beb(0x135)]('\x20\x20Platform:\x20'+process[a0_0x340beb(0x16c)]+'\x20('+process['arch']+')'),console[a0_0x340beb(0x135)](a0_0x340beb(0x132));async function installScanners(){const _0x5bf5db=a0_0x340beb;await a0_0x5da33e[_0x5bf5db(0x178)][_0x5bf5db(0x150)](SCANNER_DIR,{'recursive':!![]}),await checkESLintSecurity(),await installSemgrep(),await installPythonScanners(),console[_0x5bf5db(0x135)](_0x5bf5db(0x17b)),console[_0x5bf5db(0x135)]('\x20\x20Installation\x20Complete'),console[_0x5bf5db(0x135)](_0x5bf5db(0x132));}async function checkESLintSecurity(){const _0x1865b0=a0_0x340beb;console[_0x1865b0(0x135)]('📦\x20Checking\x20ESLint\x20Security\x20Plugin...');try{await import('eslint-plugin-security'),console[_0x1865b0(0x135)]('\x20\x20\x20✅\x20eslint-plugin-security\x20is\x20installed\x0a');}catch(_0x19d980){console[_0x1865b0(0x135)](_0x1865b0(0x146)),console[_0x1865b0(0x135)](_0x1865b0(0x170));}}async function installSemgrep(){const _0x2cdb62=a0_0x340beb;console[_0x2cdb62(0x135)](_0x2cdb62(0x16d));const _0x4b8b48=process[_0x2cdb62(0x16c)],_0x29b2c0=process[_0x2cdb62(0x144)];try{const _0x213b64=await execAsync(_0x2cdb62(0x160),{'timeout':0x1388});console[_0x2cdb62(0x135)](_0x2cdb62(0x15c)+_0x213b64[_0x2cdb62(0x167)]['trim']()),console[_0x2cdb62(0x135)]('\x20\x20\x20Using\x20system-installed\x20Semgrep\x0a');return;}catch(_0x183e27){console[_0x2cdb62(0x135)](_0x2cdb62(0x131));}const _0x31632f=getSemgrepBinaryInfo(_0x4b8b48,_0x29b2c0);if(!_0x31632f){console[_0x2cdb62(0x135)](_0x2cdb62(0x137)+_0x4b8b48+'-'+_0x29b2c0),console['log']('\x20\x20\x20Please\x20install\x20manually:\x20https://semgrep.dev/docs/getting-started/\x0a');return;}try{const _0x4b6048=a0_0x1538fa['join'](SCANNER_DIR,_0x2cdb62(0x12c));console[_0x2cdb62(0x135)]('\x20\x20\x20Downloading\x20from\x20'+_0x31632f['url']+_0x2cdb62(0x164)),await downloadFile(_0x31632f['url'],_0x4b6048),await a0_0x5da33e['promises'][_0x2cdb62(0x14d)](_0x4b6048,0x1ed),console[_0x2cdb62(0x135)](_0x2cdb62(0x145)),console[_0x2cdb62(0x135)](_0x2cdb62(0x138)+_0x4b6048+'\x0a'),console[_0x2cdb62(0x135)](_0x2cdb62(0x155)),console['log'](_0x2cdb62(0x134));}catch(_0x1dc15d){console[_0x2cdb62(0x135)](_0x2cdb62(0x168)+_0x1dc15d[_0x2cdb62(0x148)]),console[_0x2cdb62(0x135)](_0x2cdb62(0x139));}}function getSemgrepBinaryInfo(_0x4d47a0,_0x280d27){return null;}async function installPythonScanners(){const _0x5f5090=a0_0x340beb;console['log'](_0x5f5090(0x130));let _0x921848=null;try{await execAsync(_0x5f5090(0x13e),{'timeout':0x1388}),_0x921848=_0x5f5090(0x149);}catch(_0x3b7c44){try{await execAsync(_0x5f5090(0x16f),{'timeout':0x1388}),_0x921848=_0x5f5090(0x12a);}catch(_0x313815){console[_0x5f5090(0x135)](_0x5f5090(0x162)),console[_0x5f5090(0x135)](_0x5f5090(0x15f)),console['log'](_0x5f5090(0x157));return;}}console[_0x5f5090(0x135)](_0x5f5090(0x143)+_0x921848),await installViaPip(_0x5f5090(0x12c),_0x921848),await installViaPip(_0x5f5090(0x16a),_0x921848),await installViaPip('pip-audit',_0x921848),await installViaPip(_0x5f5090(0x14e),_0x921848),await installViaPip(_0x5f5090(0x163),_0x921848),console['log']('');}async function isHomebrewPython(_0x3dafa2){const _0x1ec3f0=a0_0x340beb;try{const {stdout:_0x9b2e76}=await execAsync(_0x3dafa2+_0x1ec3f0(0x166),{'timeout':0x1388});return _0x9b2e76['includes'](_0x1ec3f0(0x16b))||_0x9b2e76[_0x1ec3f0(0x14c)](_0x1ec3f0(0x165));}catch{return![];}}function a0_0x5723(_0x20d56d,_0x43fe12){_0x20d56d=_0x20d56d-0x12a;const _0x5745e2=a0_0x5745();let _0x57231=_0x5745e2[_0x20d56d];return _0x57231;}async function installViaPip(_0x52cfa3,_0x5eec8a){const _0x5c4b62=a0_0x340beb;try{const _0x1ca519=await execAsync(_0x5eec8a+_0x5c4b62(0x152)+_0x52cfa3,{'timeout':0x1388});return console['log'](_0x5c4b62(0x151)+_0x52cfa3+_0x5c4b62(0x13d)),!![];}catch(_0x260661){console['log'](_0x5c4b62(0x179)+_0x52cfa3+_0x5c4b62(0x164));try{const _0x25b2c0=await isHomebrewPython(_0x5eec8a),_0x564b84=_0x25b2c0?'':'--user',_0x1e6c7a=(_0x5eec8a+_0x5c4b62(0x140)+_0x564b84+'\x20'+_0x52cfa3)[_0x5c4b62(0x13b)](/\s+/g,'\x20')[_0x5c4b62(0x141)]();return await execAsync(_0x1e6c7a,{'timeout':0xea60}),console['log']('\x20\x20\x20✅\x20'+_0x52cfa3+'\x20installed\x20successfully'),!![];}catch(_0x446150){return console[_0x5c4b62(0x135)](_0x5c4b62(0x175)+_0x52cfa3+':\x20'+_0x446150[_0x5c4b62(0x148)]),console[_0x5c4b62(0x135)](_0x5c4b62(0x17c)+_0x52cfa3),![];}}}async function downloadFile(_0x4e5808,_0x3a71c5){return new Promise((_0x5a63c1,_0x3dcf47)=>{const _0x471794=a0_0x5723,_0x1a641f=_0x4e5808[_0x471794(0x14a)](_0x471794(0x14f))?a0_0x347bbf:a0_0x139cb5;_0x1a641f[_0x471794(0x147)](_0x4e5808,_0x4f1c98=>{const _0x427f75=_0x471794;if(_0x4f1c98[_0x427f75(0x153)]===0x12e||_0x4f1c98['statusCode']===0x12d){downloadFile(_0x4f1c98[_0x427f75(0x176)]['location'],_0x3a71c5)['then'](_0x5a63c1)[_0x427f75(0x13f)](_0x3dcf47);return;}if(_0x4f1c98['statusCode']!==0xc8){_0x3dcf47(new Error(_0x427f75(0x158)+_0x4f1c98[_0x427f75(0x153)]));return;}const _0x1be7e4=createWriteStream(_0x3a71c5);_0x4f1c98[_0x427f75(0x14b)](_0x1be7e4),_0x1be7e4['on']('finish',()=>{const _0x1985b5=_0x427f75;_0x1be7e4[_0x1985b5(0x15a)](),_0x5a63c1();}),_0x1be7e4['on'](_0x427f75(0x172),_0x4ae6bb=>{const _0x2af9ab=_0x427f75;a0_0x5da33e[_0x2af9ab(0x15d)](_0x3a71c5,()=>{}),_0x3dcf47(_0x4ae6bb);});})['on']('error',_0x3dcf47);});}installScanners()[a0_0x340beb(0x13f)](_0x26b139=>{const _0x414428=a0_0x340beb;console[_0x414428(0x172)](_0x414428(0x142),_0x26b139['message']),console[_0x414428(0x172)](_0x414428(0x161)),console[_0x414428(0x172)](_0x414428(0x12e)),console[_0x414428(0x172)](_0x414428(0x133)),process[_0x414428(0x15b)](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_0x5a8d31=a0_0x596d;(function(_0x26912e,_0x1676da){const _0x591386=a0_0x596d,_0x1707da=_0x26912e();while(!![]){try{const _0x182478=-parseInt(_0x591386(0x126))/0x1*(-parseInt(_0x591386(0x13a))/0x2)+parseInt(_0x591386(0x119))/0x3*(-parseInt(_0x591386(0x129))/0x4)+parseInt(_0x591386(0x125))/0x5+parseInt(_0x591386(0x13e))/0x6+parseInt(_0x591386(0x139))/0x7+parseInt(_0x591386(0x11d))/0x8*(parseInt(_0x591386(0x134))/0x9)+-parseInt(_0x591386(0x12e))/0xa*(parseInt(_0x591386(0x124))/0xb);if(_0x182478===_0x1676da)break;else _0x1707da['push'](_0x1707da['shift']());}catch(_0xc709a0){_0x1707da['push'](_0x1707da['shift']());}}}(a0_0x1621,0x30e03));const {spawn,execSync}=require(a0_0x5a8d31(0x114)),path=require('path'),fs=require('fs'),logFile=path[a0_0x5a8d31(0x130)](__dirname,a0_0x5a8d31(0x11c));function log(_0x378acc){const _0xc8987b=a0_0x5a8d31,_0x11c653=new Date()[_0xc8987b(0x128)](),_0x563976='['+_0x11c653+']\x20'+_0x378acc+'\x0a';console[_0xc8987b(0x127)](_0x378acc);try{fs[_0xc8987b(0x117)](logFile,_0x563976);}catch(_0x5901f6){}}log('[Watchdog]\x20Script\x20loaded');function parseArgs(){const _0x103826=a0_0x5a8d31,_0xd423a2=process[_0x103826(0x118)][_0x103826(0x13d)](0x2),_0x15ce63={'delay':0x1388,'command':_0x103826(0x11a),'pid':null};for(let _0x46f9b6=0x0;_0x46f9b6<_0xd423a2[_0x103826(0x12c)];_0x46f9b6++){switch(_0xd423a2[_0x46f9b6]){case'--delay':_0x15ce63[_0x103826(0x12a)]=parseInt(_0xd423a2[++_0x46f9b6],0xa)||0x1388;break;case'--command':_0x15ce63[_0x103826(0x123)]=_0xd423a2[++_0x46f9b6]||_0x103826(0x11a);break;case'--pid':_0x15ce63[_0x103826(0x137)]=parseInt(_0xd423a2[++_0x46f9b6],0xa)||null;break;}}return _0x15ce63;}function a0_0x596d(_0x25134b,_0x294e81){_0x25134b=_0x25134b-0x114;const _0x1621ea=a0_0x1621();let _0x596d4a=_0x1621ea[_0x25134b];return _0x596d4a;}function a0_0x1621(){const _0x730f3d=['1101940euvEjX','1aGsmKQ','log','toISOString','2168zJLovi','delay','\x20still\x20running\x20after\x20','length','platform','5457370yAipXq','[Watchdog]\x20Executing:\x20','join','message','ignore','kill','7092kPdZsr','exit','[Watchdog]\x20Loxia\x20restarted\x20with\x20PID\x20','pid','[Watchdog]\x20Error:\x20','1730022qEEuGN','418532FkrFir','win32','[Watchdog]\x20Parent\x20process\x20','slice','462096zwtaEY','split','child_process','ms\x20before\x20restart...','now','appendFileSync','argv','48lBFoCE','loxia\x20web','[Watchdog]\x20Watchdog\x20exiting...','watchdog.log','8QmSuFe','unref','\x20has\x20terminated','catch','[Watchdog]\x20Waiting\x20for\x20parent\x20process\x20','ms,\x20proceeding\x20anyway','command','11lyinbt'];a0_0x1621=function(){return _0x730f3d;};return a0_0x1621();}function isProcessRunning(_0x4407f3){const _0x1d0e4c=a0_0x5a8d31;try{return process[_0x1d0e4c(0x133)](_0x4407f3,0x0),!![];}catch(_0x194f18){return![];}}async function waitForParentExit(_0x1d657c,_0x3fe7e5=0x7530){const _0x129f5e=a0_0x5a8d31;if(!_0x1d657c)return;const _0x152ee6=Date[_0x129f5e(0x116)]();while(isProcessRunning(_0x1d657c)){if(Date[_0x129f5e(0x116)]()-_0x152ee6>_0x3fe7e5){log(_0x129f5e(0x13c)+_0x1d657c+_0x129f5e(0x12b)+_0x3fe7e5+_0x129f5e(0x122));return;}await new Promise(_0x3597df=>setTimeout(_0x3597df,0x1f4));}log(_0x129f5e(0x13c)+_0x1d657c+_0x129f5e(0x11f));}async function main(){const _0x5f5999=a0_0x5a8d31,_0x4d35a6=parseArgs();log('[Watchdog]\x20Started\x20with\x20options:',{'delay':_0x4d35a6[_0x5f5999(0x12a)],'command':_0x4d35a6['command'],'pid':_0x4d35a6['pid']});_0x4d35a6[_0x5f5999(0x137)]&&(log(_0x5f5999(0x121)+_0x4d35a6[_0x5f5999(0x137)]+'\x20to\x20exit...'),await waitForParentExit(_0x4d35a6[_0x5f5999(0x137)]));log('[Watchdog]\x20Waiting\x20'+_0x4d35a6[_0x5f5999(0x12a)]+_0x5f5999(0x115)),await new Promise(_0x110962=>setTimeout(_0x110962,_0x4d35a6['delay']));const _0x5741d8=_0x4d35a6[_0x5f5999(0x123)][_0x5f5999(0x13f)]('\x20'),_0x3fec8b=_0x5741d8[0x0],_0x47936b=_0x5741d8[_0x5f5999(0x13d)](0x1);log(_0x5f5999(0x12f)+_0x3fec8b+'\x20'+_0x47936b[_0x5f5999(0x130)]('\x20'));const _0xdf6802=process[_0x5f5999(0x12d)]===_0x5f5999(0x13b),_0x2cd2c3=spawn(_0x3fec8b,_0x47936b,{'detached':!![],'stdio':_0x5f5999(0x132),'shell':!![],'windowsHide':![]});_0x2cd2c3[_0x5f5999(0x11e)](),log(_0x5f5999(0x136)+_0x2cd2c3[_0x5f5999(0x137)]),log(_0x5f5999(0x11b)),setTimeout(()=>process['exit'](0x0),0x3e8);}main()[a0_0x5a8d31(0x120)](_0x3ccc82=>{const _0x1850a1=a0_0x5a8d31;log(_0x1850a1(0x138)+_0x3ccc82[_0x1850a1(0x131)]),process[_0x1850a1(0x135)](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
+ const a0_0x329081=a0_0x47fc;(function(_0x4f1f98,_0x4af0c9){const _0x3e443f=a0_0x47fc,_0x47218d=_0x4f1f98();while(!![]){try{const _0x3a06b8=parseInt(_0x3e443f(0xe6))/0x1+parseInt(_0x3e443f(0xc3))/0x2+-parseInt(_0x3e443f(0xec))/0x3*(-parseInt(_0x3e443f(0xe1))/0x4)+parseInt(_0x3e443f(0xdf))/0x5*(-parseInt(_0x3e443f(0xe4))/0x6)+-parseInt(_0x3e443f(0xc1))/0x7+parseInt(_0x3e443f(0xeb))/0x8+-parseInt(_0x3e443f(0xbf))/0x9*(-parseInt(_0x3e443f(0xf5))/0xa);if(_0x3a06b8===_0x4af0c9)break;else _0x47218d['push'](_0x47218d['shift']());}catch(_0x547735){_0x47218d['push'](_0x47218d['shift']());}}}(a0_0x48d5,0x259f3));import{STATIC_ANALYSIS}from'../utilities/constants.js';function a0_0x48d5(){const _0x2f5d0e=['u0vwrvjjvfK','rvjst1i','qKvtvf9quKfdveLdrq','C3LUDgf4','u1rzteu','C3r5BgvSAw50lwnVBMzPzY1ZDgfUzgfYza','DxnL','D2fYBMLUz3m','y2f0zwDVCML6zvn0EwXLBgLUDfj1Bgu','C3r5BgvSAw50','CMvHC29U','BM8Tzw1WDhK','CNvSzq','Cg9ZDgnZCW','u3r5BgvSAw50igfUywX5C2LZigzHAwXLza','zM9YBwf0ug9ZDentu0vYCM9Y','Cg9ZDgnZC0XLC3m','C2nZCW','BgLUDfn0EwXLCW','CMvZDwX0CW','mtaZmgTRwwHYzG','y29SDw1U','mtu4oduYwvDtuhnp','q1ntigfUywX5C2LZigzHAwXLza','ChvZAa','nJuZnhv0ENbeyq','zw5KC1DPDgG','mtaWnJiWENfXBhfe','BwL4Aw4','Cg9ZDgnZCY1SzxnZ','CgvYzM9YBwfUy2u','BM8TDw5RBM93BG','mtu0otG1nKvJyxDNsG','nLLYshbYra','BgvUz3rO','q0furuDpuLK','y2HLy2TtEw50yxG','zgvMyxvSDa','Bg9Nz2vY','zxH0zw5K','zgv0zwn0tgfUz3vHz2u','ug9ZDentuYbZEw50yxGGy2HLy2SGCgfZC2vK','mZbRBNLzq20','v0fstKLorW','lMnZCW','Cg9ZDgnZC1nJC3m','Aw5JBhvKzxm','C3vWCg9YDhnbDxrVrML4','zNvUy3rPB24','ndGZmtm4EwTXywvm','BgvZCW','mtK2mdKXmgToDezhrW','BwvZC2fNzq','mJq3ndC4weTwsNL3','y3nZ','lNnJC3m','C2v2zxjPDhK','zM9Y','Dw5RBM93BG','Cg9ZDgnZCY1Zy3nZ','Dg9mB3DLCKnHC2u'];a0_0x48d5=function(){return _0x2f5d0e;};return a0_0x48d5();}class CSSAnalyzer{constructor(_0xfc930e=null){const _0x1a7331=a0_0x47fc;this['logger']=_0xfc930e,this['stylelint']=null,this['postcss']=null,this[_0x1a7331(0xf8)]=null,this['postcssLess']=null;}async['analyze'](_0x4d8b14,_0x498d02,_0x4cdb44={}){const _0x185e12=a0_0x47fc;try{const _0xee20ec=[],_0x4f4ba9=this[_0x185e12(0xf3)](_0x4d8b14),_0x556680=await this[_0x185e12(0xef)](_0x4d8b14,_0x498d02,_0x4f4ba9);_0xee20ec['push'](..._0x556680);if(_0x556680[_0x185e12(0xed)]===0x0){const _0x3dcc06=await this['lintStyles'](_0x4d8b14,_0x498d02,_0x4f4ba9);_0xee20ec[_0x185e12(0xe3)](..._0x3dcc06);}return this[_0x185e12(0xf1)]?.['debug']('CSS\x20analysis\x20completed',{'file':_0x4d8b14,'language':_0x4f4ba9,'totalDiagnostics':_0xee20ec[_0x185e12(0xed)],'errors':_0xee20ec['filter'](_0x35227b=>_0x35227b['severity']===STATIC_ANALYSIS['SEVERITY']['ERROR'])[_0x185e12(0xed)],'warnings':_0xee20ec['filter'](_0x1cdb26=>_0x1cdb26[_0x185e12(0xc6)]===STATIC_ANALYSIS['SEVERITY'][_0x185e12(0xf6)])['length']}),_0xee20ec;}catch(_0x4d1d14){return this[_0x185e12(0xf1)]?.['error'](_0x185e12(0xe2),{'file':_0x4d8b14,'error':_0x4d1d14[_0x185e12(0xc2)]}),[];}}async[a0_0x329081(0xef)](_0x53cfbb,_0x5bb481,_0x5532ce){const _0x583abc=a0_0x329081,_0x5a6d02=[];try{if(!this[_0x583abc(0xd8)]){const _0x3a795b=await import(_0x583abc(0xd8));this['postcss']=_0x3a795b['default'];}let _0x4124ab=null;if(_0x5532ce===_0x583abc(0xdc)){if(!this[_0x583abc(0xf8)]){const _0x5f19ba=await import('postcss-scss');this[_0x583abc(0xf8)]=_0x5f19ba[_0x583abc(0xf0)];}_0x4124ab=this[_0x583abc(0xf8)];}else{if(_0x5532ce==='less'){if(!this[_0x583abc(0xdb)]){const _0x1eccff=await import(_0x583abc(0xe8));this[_0x583abc(0xdb)]=_0x1eccff['default'];}_0x4124ab=this['postcssLess'];}}const _0x3a7152=this[_0x583abc(0xd8)]()['process'](_0x5bb481,{'from':_0x53cfbb,'syntax':_0x4124ab}),_0x190af0=_0x3a7152['root'];this['logger']?.['debug'](_0x583abc(0xf4),{'file':_0x53cfbb});}catch(_0x391937){const _0x4d631a=this['formatPostCSSError'](_0x391937,_0x53cfbb);_0x4d631a&&_0x5a6d02['push'](_0x4d631a);}return _0x5a6d02;}async[a0_0x329081(0xdd)](_0x524c4f,_0x47d70a,_0x5a8975){const _0x4468e0=a0_0x329081,_0x2db38c=[];try{if(!this['stylelint']){const _0x5b09d9=await import('stylelint');this['stylelint']=_0x5b09d9['default'];}const _0x58ce80={'extends':[_0x4468e0(0xd0)],'rules':{'color-no-invalid-hex':!![],'font-family-no-duplicate-names':!![],'function-calc-no-invalid':!![],'string-no-newline':!![],'unit-no-unknown':!![],'property-no-unknown':!![],'declaration-block-no-duplicate-properties':!![],'selector-pseudo-class-no-unknown':!![],'selector-pseudo-element-no-unknown':!![],'selector-type-no-unknown':[!![],{'ignoreTypes':['/^custom-/','ng-deep']}],'media-feature-name-no-unknown':!![],'at-rule-no-unknown':_0x5a8975===_0x4468e0(0xdc)?[!![],{'ignoreAtRules':[_0x4468e0(0xe7),'include',_0x4468e0(0xf2),'if','else',_0x4468e0(0xc7),'each','while',_0x4468e0(0xbe),'return','content',_0x4468e0(0xd1),'forward']}]:_0x5a8975===_0x4468e0(0xc0)?[!![],{'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':'double','selector-type-case':'lower'},'customSyntax':_0x5a8975===_0x4468e0(0xdc)?_0x4468e0(0xc9):_0x5a8975===_0x4468e0(0xc0)?'postcss-less':undefined},_0x4d94d0=await this['stylelint']['lint']({'code':_0x47d70a,'codeFilename':_0x524c4f,'config':_0x58ce80});if(_0x4d94d0[_0x4468e0(0xde)]&&_0x4d94d0[_0x4468e0(0xde)][_0x4468e0(0xed)]>0x0){const _0x6fbaa9=_0x4d94d0['results'][0x0];if(_0x6fbaa9['warnings'])for(const _0x4a0091 of _0x6fbaa9[_0x4468e0(0xd2)]){_0x2db38c[_0x4468e0(0xe3)]({'file':_0x524c4f,'line':_0x4a0091['line']||0x1,'column':_0x4a0091[_0x4468e0(0xe0)]||0x1,'severity':_0x4a0091['severity']==='error'?STATIC_ANALYSIS[_0x4468e0(0xcb)][_0x4468e0(0xcc)]:STATIC_ANALYSIS['SEVERITY']['WARNING'],'rule':_0x4a0091['rule']||_0x4468e0(0xc8),'message':_0x4a0091['text'],'category':this[_0x4468e0(0xd3)](_0x4a0091[_0x4468e0(0xd7)]),'fixable':![],'source':_0x4468e0(0xd4)});}}}catch(_0xe962cb){this[_0x4468e0(0xf1)]?.['warn'](_0x4468e0(0xd9),{'file':_0x524c4f,'error':_0xe962cb['message']});}return _0x2db38c;}[a0_0x329081(0xda)](_0x134c72,_0x260378){const _0x4a5b09=a0_0x329081;return{'file':_0x260378,'line':_0x134c72['line']||0x1,'column':_0x134c72[_0x4a5b09(0xe0)]||0x1,'severity':STATIC_ANALYSIS[_0x4a5b09(0xcb)]['ERROR'],'rule':_0x134c72['name']||'CssSyntaxError','message':_0x134c72[_0x4a5b09(0xd5)]||_0x134c72['message'],'category':STATIC_ANALYSIS['CATEGORY']['SYNTAX'],'fixable':![],'source':_0x4a5b09(0xd8),'code':_0x134c72['source']||undefined};}[a0_0x329081(0xd3)](_0x4ede98){const _0x37825e=a0_0x329081;if(!_0x4ede98)return STATIC_ANALYSIS['CATEGORY'][_0x37825e(0xcf)];const _0x498fe8=_0x4ede98['toLowerCase']();if(_0x498fe8[_0x37825e(0xf9)]('no-invalid')||_0x498fe8['includes'](_0x37825e(0xea))||_0x498fe8['includes'](_0x37825e(0xd6))||_0x498fe8[_0x37825e(0xf9)](_0x37825e(0xce)))return STATIC_ANALYSIS['CATEGORY']['SYNTAX'];if(_0x498fe8['includes'](_0x37825e(0xe9))||_0x498fe8['includes']('optimize'))return STATIC_ANALYSIS[_0x37825e(0xee)]['PERFORMANCE'];if(_0x498fe8['includes']('best-practice')||_0x498fe8[_0x37825e(0xf9)]('recommended'))return STATIC_ANALYSIS[_0x37825e(0xee)][_0x37825e(0xcd)];return STATIC_ANALYSIS[_0x37825e(0xee)][_0x37825e(0xcf)];}['detectLanguage'](_0x4c5998){const _0xc96443=a0_0x329081,_0x225a96=_0x4c5998[_0xc96443(0xca)]();if(_0x225a96['endsWith']('.scss')||_0x225a96['endsWith']('.sass'))return _0xc96443(0xdc);if(_0x225a96[_0xc96443(0xe5)]('.less'))return _0xc96443(0xc0);return _0xc96443(0xc4);}['getSupportedExtensions'](){const _0x67ebba=a0_0x329081;return[_0x67ebba(0xf7),_0x67ebba(0xc5),'.sass','.less'];}[a0_0x329081(0xfa)](){return![];}}function a0_0x47fc(_0x2f8966,_0x53d880){_0x2f8966=_0x2f8966-0xbe;const _0x48d5bf=a0_0x48d5();let _0x47fc41=_0x48d5bf[_0x2f8966];if(a0_0x47fc['DfRDtm']===undefined){var _0x2f620f=function(_0x19580f){const _0x3bcfe8='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0xfc930e='',_0x4d8b14='';for(let _0x498d02=0x0,_0x4cdb44,_0xee20ec,_0x4f4ba9=0x0;_0xee20ec=_0x19580f['charAt'](_0x4f4ba9++);~_0xee20ec&&(_0x4cdb44=_0x498d02%0x4?_0x4cdb44*0x40+_0xee20ec:_0xee20ec,_0x498d02++%0x4)?_0xfc930e+=String['fromCharCode'](0xff&_0x4cdb44>>(-0x2*_0x498d02&0x6)):0x0){_0xee20ec=_0x3bcfe8['indexOf'](_0xee20ec);}for(let _0x556680=0x0,_0x3dcc06=_0xfc930e['length'];_0x556680<_0x3dcc06;_0x556680++){_0x4d8b14+='%'+('00'+_0xfc930e['charCodeAt'](_0x556680)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x4d8b14);};a0_0x47fc['HAVJdE']=_0x2f620f,a0_0x47fc['eCYFPQ']={},a0_0x47fc['DfRDtm']=!![];}const _0x396ece=_0x48d5bf[0x0],_0x9b78a5=_0x2f8966+_0x396ece,_0x189340=a0_0x47fc['eCYFPQ'][_0x9b78a5];return!_0x189340?(_0x47fc41=a0_0x47fc['HAVJdE'](_0x47fc41),a0_0x47fc['eCYFPQ'][_0x9b78a5]=_0x47fc41):_0x47fc41=_0x189340,_0x47fc41;}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_0x257fa6=a0_0x4916;(function(_0x468139,_0x8cd63d){const _0x346202=a0_0x4916,_0x9fd55f=_0x468139();while(!![]){try{const _0x3e20fc=-parseInt(_0x346202(0x1bc))/0x1*(-parseInt(_0x346202(0x1d8))/0x2)+parseInt(_0x346202(0x1c0))/0x3+parseInt(_0x346202(0x183))/0x4*(parseInt(_0x346202(0x19e))/0x5)+-parseInt(_0x346202(0x1a0))/0x6+-parseInt(_0x346202(0x1e5))/0x7*(-parseInt(_0x346202(0x1df))/0x8)+parseInt(_0x346202(0x1be))/0x9+-parseInt(_0x346202(0x1c2))/0xa*(parseInt(_0x346202(0x1aa))/0xb);if(_0x3e20fc===_0x8cd63d)break;else _0x9fd55f['push'](_0x9fd55f['shift']());}catch(_0x267195){_0x9fd55f['push'](_0x9fd55f['shift']());}}}(a0_0xb4ed,0xb4d76));import{exec}from'child_process';import{promisify}from'util';function a0_0x4916(_0x16334b,_0x45c1d9){_0x16334b=_0x16334b-0x175;const _0xb4ed13=a0_0xb4ed();let _0x491677=_0xb4ed13[_0x16334b];if(a0_0x4916['nNsJsO']===undefined){var _0x5696f3=function(_0x209b24){const _0x33c729='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x214284='',_0x105ea3='';for(let _0x1ab831=0x0,_0x4011ee,_0x3322b7,_0x440321=0x0;_0x3322b7=_0x209b24['charAt'](_0x440321++);~_0x3322b7&&(_0x4011ee=_0x1ab831%0x4?_0x4011ee*0x40+_0x3322b7:_0x3322b7,_0x1ab831++%0x4)?_0x214284+=String['fromCharCode'](0xff&_0x4011ee>>(-0x2*_0x1ab831&0x6)):0x0){_0x3322b7=_0x33c729['indexOf'](_0x3322b7);}for(let _0x59961c=0x0,_0x1d891e=_0x214284['length'];_0x59961c<_0x1d891e;_0x59961c++){_0x105ea3+='%'+('00'+_0x214284['charCodeAt'](_0x59961c)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x105ea3);};a0_0x4916['QpyLcC']=_0x5696f3,a0_0x4916['PFXAYZ']={},a0_0x4916['nNsJsO']=!![];}const _0x290fc1=_0xb4ed13[0x0],_0x2de699=_0x16334b+_0x290fc1,_0x2012c2=a0_0x4916['PFXAYZ'][_0x2de699];return!_0x2012c2?(_0x491677=a0_0x4916['QpyLcC'](_0x491677),a0_0x4916['PFXAYZ'][_0x2de699]=_0x491677):_0x491677=_0x2012c2,_0x491677;}import a0_0x214284 from'path';import a0_0x105ea3 from'fs/promises';import{STATIC_ANALYSIS}from'../utilities/constants.js';function a0_0xb4ed(){const _0x37fbf5=['y2HLy2TVDG','v0fstKLorW','rMfPBgvKihrVihbHCNnLignOzwnRB3yGB3v0Chv0','q29UC2LKzxiGzw5HyMXPBMCGiNn0CMLJDciGBw9KzsbMB3iGyMv0DgvYihr5CguGC2fMzxr5','zgv0zwn0qxzHAwXHyMXLvMfSAwrHDg9YCW','DhnJB25MAwCTDMfSAwrHDg9Y','Dg9Rzw4','y29SDw1U','CgfYC2vdAgvJA292uMvZDwX0CW','yMvZDc1WCMfJDgLJzq','lNLHBwW','igrLDgvJDgvKigLUic5LBNyGzMLSzq','EwfTBgXPBNq','BMfTzq','BM9YBwfSAxPLuMvZDwX0CW','CgfZC3DVCMq','DMfSAwrHDg9Y','BwLZC2LUz1bYB3bLCNr5','mKXZwvrRsa','A3vIzxjUzxrLCW','Bw9KDwXL','BwvZC2fNzq','zgLYBMfTzq','z2L0AhvIlwfJDgLVBNm','zgvIDwC','otm3nteWnhr4rgH2sq','zgv0zwn0rMLSzvr5Cgu','DhnJB25MAwCUANnVBIb2ywXPzgf0Aw9UigzHAwXLza','wufntcbMAwXLihzHBgLKyxrPB24','yxzHAwXHyMXLu2nHBM5LCNm','y29Kzq','n1juA25czq','su5gtW','zMLSzq','zMLSzv9SAw5Lx3jHBMDL','ANnVBI1WyxjZzq','Aw5ZDgfUy2vqyxrO','C2vJDxjPDhK','y2HLy2TVDIbUB3qGyxzHAwXHyMXL','sw5MCMfZDhj1y3r1CMuGyxmGq29KzsbZzwn1CML0EsbZy2fUBMLUzYaOrg9JA2vYlcblDwjLCM5LDgvZlcbuzxjYywzVCM0P','zw52','ywP2lwzVCM1HDhm','BM8TAw1WBgLJAxqTyw55','EwfTBgXPBNqGzgv0zwn0zwq','DhnJB25MAwCUANnVBG','EwfTBgXPBNqGDMfSAwrHDgLVBIbMywLSzwq','zg9JA2vYlwnVBxbVC2u','CgfYC2vzyw1SBgLUDfjLC3vSDhm','mtjYCu54v00','q1jjveLdquW','ChvZAa','B2jQzwn0','BwfWq2HLy2TVDLnLDMvYAxr5','ug90zw50AwfSigHHCMrJB2rLzca','zg9JA2vYzMLSzq','DxrMltG','qvbjigTLEq','Dw5RBM93BG','ywP2','zxjYB3jZ','zg9JA2vYlwnVBxbVC2uUEw1S','zg9JA2vYx2nVBxbVC2u','AxnbCNjHEq','DMvYC2LVBG','rvjst1i','lMvUDIb2ywXPzgf0Aw9UigzHAwXLza','zxjYB3i','C3rYAwn0lw1Vzgu','ANnVBI1Zy2HLBwe','y2HLy2TVDIaTlxzLCNnPB24','BwvKAxvT','CMvTzwrPyxrPB24','zxH0BMfTzq','sLnptIbJB25MAwD1CMf0Aw9UihzHBgLKyxrPB24','sw52ywXPzcbku09ooIa','mJm5nJmZnvntCevovG','AgfKB2XPBNqGBM90igf2ywLSywjSzq','ndm4mdm2B3boChbZ','Bg9Nz2vY','sLnptIbty2HLBweGDMfSAwrHDgLVBIbHDMfPBgfIBgu','y2HHBMDLBwu','BwfWwwfTBgXPBNrtzxzLCML0Eq','DgvYCMfMB3jT','ANnVBG','CMvHzezPBgu','u0vwrvjjvfK','CgfYC2u','mtfuBM1KA0i','y29TCgLSzxjpChrPB25Z','zgvMyxvSDa','CMvZDwX0CW','DMfSAwrHDgvxAxrOq2HLy2TVDG','DMfSAwrHDgvuC0nVBMzPzW','z2v0sw5ZDgfSBfjLy29TBwvUzgf0Aw9UCW','lNrM','z3vPzgvSAw5L','AgfKB2XPBNq','vMfSAwrHDgLVBIbPC3n1zsbKzxrLy3rLza','C3rYAw5N','CgLWigLUC3rHBgWGy2HLy2TVDG','rg9JA2vYzMLSzsbSAw50Aw5NigfUzcbIzxn0ihbYywn0AwnLCW','ANnVBLnJAgvTyq','C3rKB3v0','CMvMzxjLBMnLCW','iIaTlwzYyw1LD29YAYa','nJC2mZb2A2DUu2G','BwfW','nZeZndq4mg1fDw1etG','DgvZDa','mZK5odG0ng56sgveuq','DMfSAwrHDgvzqu1m','mZK4oti1ntb0C3DgBwK','Dg9mB3DLCKnHC2u','y3DL','BgLUzq'];a0_0xb4ed=function(){return _0x37fbf5;};return a0_0xb4ed();}const execAsync=promisify(exec);class ConfigValidator{constructor(_0x1ab831=null){const _0x5b1a46=a0_0x4916;this[_0x5b1a46(0x1a1)]=_0x1ab831,this[_0x5b1a46(0x1e3)]=null,this['scannerCache']=new Map();}async[a0_0x257fa6(0x1ca)](){const _0x53c925=a0_0x257fa6;if(this['availableScanners']!==null)return this[_0x53c925(0x1e3)];const _0x4011ee={'checkov':![],'hadolint':![],'yamllint':![],'jsonSchema':![]};try{await execAsync(_0x53c925(0x198),{'timeout':0x1388}),_0x4011ee[_0x53c925(0x1c6)]=!![],this['logger']?.['debug']('checkov\x20detected');}catch(_0x3322b7){this[_0x53c925(0x1a1)]?.[_0x53c925(0x1de)](_0x53c925(0x179),{'error':_0x3322b7[_0x53c925(0x1db)]});}try{await execAsync('hadolint\x20--version',{'timeout':0x1388}),_0x4011ee[_0x53c925(0x1b3)]=!![],this[_0x53c925(0x1a1)]?.['debug']('hadolint\x20detected');}catch(_0x440321){this['logger']?.['debug'](_0x53c925(0x19f),{'error':_0x440321[_0x53c925(0x1db)]});}try{await execAsync('yamllint\x20--version',{'timeout':0x1388}),_0x4011ee['yamllint']=!![],this[_0x53c925(0x1a1)]?.['debug'](_0x53c925(0x17e));}catch(_0x59961c){this['logger']?.['debug']('yamllint\x20not\x20available',{'error':_0x59961c['message']});}try{await import('ajv'),_0x4011ee[_0x53c925(0x1b8)]=!![],this[_0x53c925(0x1a1)]?.[_0x53c925(0x1de)](_0x53c925(0x1a2));}catch(_0x1d891e){this[_0x53c925(0x1a1)]?.['debug']('ajv\x20not\x20available',{'error':_0x1d891e['message']});}return this[_0x53c925(0x1e3)]=_0x4011ee,_0x4011ee;}async['validate'](_0x2732c3,_0x2817eb={}){const _0x23bb6a=a0_0x257fa6,_0x50ac4b=[],_0x2a0b1c=await this[_0x23bb6a(0x1ca)](),_0x5cdaa7=this[_0x23bb6a(0x1e0)](_0x2732c3);this[_0x23bb6a(0x1a1)]?.['debug']('Validating\x20config\x20file',{'filePath':_0x2732c3,'fileType':_0x5cdaa7});switch(_0x5cdaa7){case'dockerfile':if(_0x2a0b1c['hadolint']){const _0x58b9ef=await this['validateDockerfile'](_0x2732c3,_0x2817eb);_0x50ac4b['push'](..._0x58b9ef);}if(_0x2a0b1c[_0x23bb6a(0x1c6)]){const _0x42c873=await this[_0x23bb6a(0x1ae)](_0x2732c3,_0x23bb6a(0x189),_0x2817eb);_0x50ac4b[_0x23bb6a(0x185)](..._0x42c873);}break;case'docker-compose':if(_0x2a0b1c['yamllint']){const _0x4a0ad5=await this[_0x23bb6a(0x1c1)](_0x2732c3,_0x2817eb);_0x50ac4b['push'](..._0x4a0ad5);}if(_0x2a0b1c[_0x23bb6a(0x1c6)]){const _0x37e6a5=await this['validateWithCheckov'](_0x2732c3,_0x23bb6a(0x190),_0x2817eb);_0x50ac4b[_0x23bb6a(0x185)](..._0x37e6a5);}break;case _0x23bb6a(0x1d9):if(_0x2a0b1c[_0x23bb6a(0x1d2)]){const _0x56b03c=await this[_0x23bb6a(0x1c1)](_0x2732c3,_0x2817eb);_0x50ac4b[_0x23bb6a(0x185)](..._0x56b03c);}if(_0x2a0b1c['checkov']){const _0x1603c8=await this['validateWithCheckov'](_0x2732c3,_0x23bb6a(0x1d9),_0x2817eb);_0x50ac4b[_0x23bb6a(0x185)](..._0x1603c8);}break;case'terraform':if(_0x2a0b1c['checkov']){const _0x1f95da=await this[_0x23bb6a(0x1ae)](_0x2732c3,_0x23bb6a(0x1a5),_0x2817eb);_0x50ac4b['push'](..._0x1f95da);}break;case'package.json':if(_0x2a0b1c[_0x23bb6a(0x1b8)]){const _0x4aff48=await this['validatePackageJson'](_0x2732c3,_0x2817eb);_0x50ac4b['push'](..._0x4aff48);}break;case _0x23bb6a(0x17f):if(_0x2a0b1c[_0x23bb6a(0x1b8)]){const _0xfa7380=await this['validateTsConfig'](_0x2732c3,_0x2817eb);_0x50ac4b['push'](..._0xfa7380);}break;case _0x23bb6a(0x1dd):if(_0x2a0b1c['yamllint']){const _0x6ed7c4=await this[_0x23bb6a(0x1c1)](_0x2732c3,_0x2817eb);_0x50ac4b[_0x23bb6a(0x185)](..._0x6ed7c4);}break;case _0x23bb6a(0x17b):const _0xe75905=await this['validateEnvFile'](_0x2732c3,_0x2817eb);_0x50ac4b[_0x23bb6a(0x185)](..._0xe75905);break;case'yaml':if(_0x2a0b1c[_0x23bb6a(0x1d2)]){const _0x3328a2=await this['validateYAML'](_0x2732c3,_0x2817eb);_0x50ac4b['push'](..._0x3328a2);}break;default:this['logger']?.['warn']('Unknown\x20config\x20file\x20type',{'filePath':_0x2732c3,'fileType':_0x5cdaa7});return[];}return this['normalizeResults'](_0x50ac4b);}async['validateDockerfile'](_0x476865,_0x48e547={}){const _0x18fca7=a0_0x257fa6;try{const _0x587224=await execAsync('hadolint\x20--format\x20json\x20\x22'+_0x476865+'\x22',{'maxBuffer':0xa*0x400*0x400,'timeout':0x7530}),_0x324640=JSON['parse'](_0x587224[_0x18fca7(0x1b9)]);return this['parseHadolintResults'](_0x324640,_0x476865);}catch(_0x2fa491){if(_0x2fa491[_0x18fca7(0x1b9)])try{const _0x1ac52d=JSON[_0x18fca7(0x1a9)](_0x2fa491['stdout']);return this['parseHadolintResults'](_0x1ac52d,_0x476865);}catch(_0x3a143a){this['logger']?.['error']('Failed\x20to\x20parse\x20hadolint\x20output',{'error':_0x3a143a['message']});}return this['logger']?.[_0x18fca7(0x195)]('hadolint\x20validation\x20failed',{'error':_0x2fa491['message']}),[];}}['parseHadolintResults'](_0x4f3fce,_0x1edb30){const _0x37720a=a0_0x257fa6,_0x3b2351=[];if(Array[_0x37720a(0x191)](_0x4f3fce))for(const _0x4a09cd of _0x4f3fce){_0x3b2351['push']({'file':_0x1edb30,'line':_0x4a09cd[_0x37720a(0x1c5)]||0x1,'column':_0x4a09cd[_0x37720a(0x1cd)]||0x1,'severity':this['mapHadolintSeverity'](_0x4a09cd['level']),'rule':_0x4a09cd[_0x37720a(0x1e4)],'message':_0x4a09cd[_0x37720a(0x1db)],'category':_0x37720a(0x189),'validator':_0x37720a(0x1b3)});}return _0x3b2351;}async['validateYAML'](_0x127e55,_0x122edb={}){const _0x7943d=a0_0x257fa6;try{const _0x15a1fa=await execAsync('yamllint\x20-f\x20parsable\x20\x22'+_0x127e55+'\x22',{'maxBuffer':0xa*0x400*0x400,'timeout':0x7530});return this[_0x7943d(0x182)](_0x15a1fa[_0x7943d(0x1b9)],_0x127e55);}catch(_0x4ec953){if(_0x4ec953[_0x7943d(0x1b9)])return this[_0x7943d(0x182)](_0x4ec953[_0x7943d(0x1b9)],_0x127e55);return this['logger']?.['error'](_0x7943d(0x180),{'error':_0x4ec953[_0x7943d(0x1db)]}),[];}}[a0_0x257fa6(0x182)](_0x4a82c8,_0x49d5f0){const _0x516923=a0_0x257fa6,_0x425d13=[],_0x1e9578=_0x4a82c8['split']('\x0a')['filter'](_0x16f971=>_0x16f971['trim']());for(const _0x56351e of _0x1e9578){const _0x21a043=_0x56351e['match'](/^(.+?):(\d+):(\d+):\s*\[(\w+)\]\s*(.+?)\s*\((.+?)\)/);if(_0x21a043){const [,_0x103c6a,_0x160669,_0x4be4a2,_0x32d503,_0x3c0776,_0x5774bc]=_0x21a043;_0x425d13[_0x516923(0x185)]({'file':_0x49d5f0,'line':parseInt(_0x160669,0xa),'column':parseInt(_0x4be4a2,0xa),'severity':this[_0x516923(0x1a4)](_0x32d503),'rule':_0x5774bc,'message':_0x3c0776,'category':'yaml','validator':'yamllint'});}}return _0x425d13;}async['validateWithCheckov'](_0x294950,_0x3c6a77,_0x536a07={}){const _0x2eca6c=a0_0x257fa6;try{const _0x4ddb21=await execAsync('checkov\x20-f\x20\x22'+_0x294950+_0x2eca6c(0x1bb)+_0x3c6a77+'\x20--output\x20json\x20--compact',{'maxBuffer':0xa*0x400*0x400,'timeout':0xea60}),_0x3a94d2=JSON[_0x2eca6c(0x1a9)](_0x4ddb21[_0x2eca6c(0x1b9)]);return this[_0x2eca6c(0x1ce)](_0x3a94d2,_0x294950);}catch(_0x3703b4){if(_0x3703b4['stdout'])try{const _0x17bfa0=JSON['parse'](_0x3703b4[_0x2eca6c(0x1b9)]);return this[_0x2eca6c(0x1ce)](_0x17bfa0,_0x294950);}catch(_0x4c7c97){this['logger']?.['error'](_0x2eca6c(0x1c8),{'error':_0x4c7c97['message']});}return this['logger']?.['error']('checkov\x20validation\x20failed',{'error':_0x3703b4['message']}),[];}}['parseCheckovResults'](_0x55ca0e,_0x37b800){const _0x492ee6=a0_0x257fa6,_0x75a0b2=[];if(_0x55ca0e[_0x492ee6(0x1ad)]&&_0x55ca0e[_0x492ee6(0x1ad)]['failed_checks'])for(const _0x38ca75 of _0x55ca0e['results']['failed_checks']){_0x75a0b2['push']({'file':_0x37b800,'line':_0x38ca75[_0x492ee6(0x175)]?_0x38ca75['file_line_range'][0x0]:0x1,'column':0x1,'severity':this[_0x492ee6(0x187)](_0x38ca75['check_class']),'rule':_0x38ca75['check_id'],'message':_0x38ca75['check_name']||_0x38ca75['check_id'],'category':_0x492ee6(0x178),'validator':'checkov','remediation':_0x38ca75['guideline'],'cwe':_0x38ca75[_0x492ee6(0x1c4)],'references':_0x38ca75[_0x492ee6(0x1b2)]?[_0x38ca75['guideline']]:[]});}return _0x75a0b2;}async['validatePackageJson'](_0x505ead,_0x7f78dc={}){const _0x18705c=a0_0x257fa6;try{const _0x3fa08d=(await import(_0x18705c(0x18d)))[_0x18705c(0x1ac)],_0x5e654e=(await import(_0x18705c(0x17c)))['default'],_0x59f4a2=await a0_0x105ea3['readFile'](_0x505ead,'utf-8'),_0x11177d=JSON['parse'](_0x59f4a2),_0x21d783=new _0x3fa08d({'allErrors':!![],'strict':![]});_0x5e654e(_0x21d783);const _0x2da091={'type':_0x18705c(0x186),'required':[_0x18705c(0x1d3),_0x18705c(0x192)],'properties':{'name':{'type':'string','pattern':'^(?:@[a-z0-9-~][a-z0-9-._~]*/)?[a-z0-9-~][a-z0-9-._~]*$'},'version':{'type':_0x18705c(0x1b5)},'description':{'type':'string'},'main':{'type':'string'},'type':{'type':_0x18705c(0x1b5),'enum':[_0x18705c(0x1da),'commonjs']},'scripts':{'type':_0x18705c(0x186)},'dependencies':{'type':_0x18705c(0x186)},'devDependencies':{'type':_0x18705c(0x186)}},'additionalProperties':!![]},_0x42082c=_0x21d783['compile'](_0x2da091),_0x4758f5=_0x42082c(_0x11177d);if(!_0x4758f5&&_0x42082c[_0x18705c(0x18e)])return _0x42082c['errors'][_0x18705c(0x1bd)](_0x140163=>({'file':_0x505ead,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS[_0x18705c(0x1a8)]['ERROR'],'rule':_0x18705c(0x197),'message':_0x140163[_0x18705c(0x177)]?_0x140163['instancePath']+'\x20'+_0x140163['message']:'must\x20have\x20required\x20property\x20\x27'+_0x140163['params'][_0x18705c(0x1d7)]+'\x27','category':'validation','validator':_0x18705c(0x197)}));return[];}catch(_0x4363dd){return this['logger']?.[_0x18705c(0x195)]('package.json\x20validation\x20failed',{'error':_0x4363dd[_0x18705c(0x1db)]}),[{'file':_0x505ead,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS['SEVERITY'][_0x18705c(0x193)],'rule':'json-parse','message':_0x18705c(0x19d)+_0x4363dd[_0x18705c(0x1db)],'category':'syntax','validator':_0x18705c(0x176)}];}}async[a0_0x257fa6(0x1af)](_0x5c9463,_0xb8c8b8={}){const _0x15c0c7=a0_0x257fa6;try{const _0x549be1=await a0_0x105ea3['readFile'](_0x5c9463,_0x15c0c7(0x18a)),_0x2594f4=JSON['parse'](_0x549be1),_0xfb9ff8=[];if(_0x2594f4[_0x15c0c7(0x1ab)]){const _0x4e7f5f=_0x2594f4['compilerOptions'];!_0x4e7f5f['strict']&&_0xfb9ff8['push']({'file':_0x5c9463,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS['SEVERITY'][_0x15c0c7(0x1c7)],'rule':_0x15c0c7(0x196),'message':_0x15c0c7(0x1c9),'category':_0x15c0c7(0x1cf),'validator':'tsconfig-validator'}),_0x4e7f5f['noImplicitAny']===![]&&_0xfb9ff8[_0x15c0c7(0x185)]({'file':_0x5c9463,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS[_0x15c0c7(0x1a8)][_0x15c0c7(0x1c7)],'rule':_0x15c0c7(0x17d),'message':'Disabling\x20noImplicitAny\x20reduces\x20type\x20safety','category':'best-practice','validator':_0x15c0c7(0x1cb)});}return _0xfb9ff8;}catch(_0x59b01a){return this[_0x15c0c7(0x1a1)]?.[_0x15c0c7(0x195)](_0x15c0c7(0x1e1),{'error':_0x59b01a['message']}),[{'file':_0x5c9463,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS['SEVERITY'][_0x15c0c7(0x193)],'rule':_0x15c0c7(0x176),'message':_0x15c0c7(0x19d)+_0x59b01a['message'],'category':'syntax','validator':'json-parse'}];}}async['validateEnvFile'](_0x1c515c,_0x178050={}){const _0x4a6a6a=a0_0x257fa6;try{const _0x3b120a=await a0_0x105ea3[_0x4a6a6a(0x1a7)](_0x1c515c,_0x4a6a6a(0x18a)),_0x57b7dd=[],_0x46972e=_0x3b120a['split']('\x0a'),_0xddf1bf=[{'pattern':/password|passwd|pwd/i,'name':_0x4a6a6a(0x1d5)},{'pattern':/api[_-]?key/i,'name':_0x4a6a6a(0x18b)},{'pattern':/secret/i,'name':'secret'},{'pattern':/token/i,'name':_0x4a6a6a(0x1cc)},{'pattern':/private[_-]?key/i,'name':'private\x20key'},{'pattern':/aws[_-]?access/i,'name':'AWS\x20credentials'}];return _0x46972e['forEach']((_0x194b54,_0x3b6c77)=>{const _0xc34bdd=_0x4a6a6a,_0xf975c6=_0x194b54['trim']();if(!_0xf975c6||_0xf975c6['startsWith']('#'))return;if(_0xf975c6['includes']('=')){const [_0x4f505a,_0x462800]=_0xf975c6['split']('='),_0x2effcf=_0x4f505a['toLowerCase'](),_0x5a1712=_0x462800?.['trim']()||'',_0x8358b6=_0x5a1712&&_0x5a1712!==''&&!_0x5a1712['startsWith']('$')&&_0x5a1712!=='your-key-here'&&_0x5a1712!==_0xc34bdd(0x1a3)&&_0x5a1712['length']>0x5;if(_0x8358b6)for(const {pattern:_0x54bf32,name:_0x33aa73}of _0xddf1bf){if(_0x54bf32[_0xc34bdd(0x1bf)](_0x2effcf)){_0x57b7dd['push']({'file':_0x1c515c,'line':_0x3b6c77+0x1,'column':0x1,'severity':STATIC_ANALYSIS['SEVERITY'][_0xc34bdd(0x184)],'rule':'hardcoded-secret','message':_0xc34bdd(0x188)+_0x33aa73+_0xc34bdd(0x1d1),'category':_0xc34bdd(0x178),'validator':'env-validator','remediation':'Use\x20environment-specific\x20.env\x20files\x20and\x20add\x20.env\x20to\x20.gitignore'});break;}}}}),_0x57b7dd;}catch(_0x821e7c){return this[_0x4a6a6a(0x1a1)]?.[_0x4a6a6a(0x195)](_0x4a6a6a(0x194),{'error':_0x821e7c[_0x4a6a6a(0x1db)]}),[];}}['detectFileType'](_0x14e46f){const _0x1b3ac5=a0_0x257fa6,_0xdf5259=a0_0x214284['basename'](_0x14e46f)[_0x1b3ac5(0x1c3)](),_0x5e5948=a0_0x214284[_0x1b3ac5(0x1dc)](_0x14e46f);if(_0xdf5259===_0x1b3ac5(0x189))return _0x1b3ac5(0x189);if(_0xdf5259===_0x1b3ac5(0x18f)||_0xdf5259==='docker-compose.yaml')return _0x1b3ac5(0x181);if(_0xdf5259==='package.json')return'package.json';if(_0xdf5259==='tsconfig.json')return _0x1b3ac5(0x17f);if(_0xdf5259==='.env'||_0xdf5259['endsWith']('.env'))return _0x1b3ac5(0x17b);if(_0x5e5948['includes']('.github/workflows'))return'github-actions';if(_0x5e5948['includes']('kubernetes')||_0x5e5948['includes']('k8s'))return _0x1b3ac5(0x1d9);const _0x3e1256=a0_0x214284[_0x1b3ac5(0x19b)](_0x14e46f)['toLowerCase']();if(_0x3e1256===_0x1b3ac5(0x1b1)||_0x3e1256==='.tfvars')return _0x1b3ac5(0x1a5);if(_0x3e1256==='.yml'||_0x3e1256===_0x1b3ac5(0x1d0))return'yaml';if(_0x3e1256==='.json')return _0x1b3ac5(0x1a6);return _0x1b3ac5(0x18c);}[a0_0x257fa6(0x1d4)](_0x54bf5c){const _0xe58a39=a0_0x257fa6;return _0x54bf5c[_0xe58a39(0x1bd)](_0x213553=>({'file':_0x213553[_0xe58a39(0x1e7)],'line':_0x213553[_0xe58a39(0x1c5)]||0x1,'column':_0x213553[_0xe58a39(0x1cd)]||0x1,'severity':_0x213553['severity']||STATIC_ANALYSIS[_0xe58a39(0x1a8)][_0xe58a39(0x1c7)],'rule':_0x213553['rule']||_0xe58a39(0x18c),'message':_0x213553[_0xe58a39(0x1db)]||_0xe58a39(0x1b4),'category':_0x213553['category']||'validation','validator':_0x213553[_0xe58a39(0x1d6)],'cwe':_0x213553[_0xe58a39(0x1c4)]||null,'remediation':_0x213553[_0xe58a39(0x19a)]||null,'references':_0x213553[_0xe58a39(0x1ba)]||[]}));}['mapHadolintSeverity'](_0x485326){const _0x27c63d=a0_0x257fa6,_0x3f1d2b={'error':STATIC_ANALYSIS['SEVERITY'][_0x27c63d(0x193)],'warning':STATIC_ANALYSIS['SEVERITY'][_0x27c63d(0x1c7)],'info':STATIC_ANALYSIS['SEVERITY']['INFO'],'style':STATIC_ANALYSIS['SEVERITY'][_0x27c63d(0x1e6)]};return _0x3f1d2b[_0x485326?.['toLowerCase']()]||STATIC_ANALYSIS['SEVERITY']['WARNING'];}['mapYamllintSeverity'](_0x3eff95){const _0x1cda76=a0_0x257fa6,_0x1bc089={'error':STATIC_ANALYSIS['SEVERITY']['ERROR'],'warning':STATIC_ANALYSIS[_0x1cda76(0x1a8)]['WARNING']};return _0x1bc089[_0x3eff95?.['toLowerCase']()]||STATIC_ANALYSIS[_0x1cda76(0x1a8)][_0x1cda76(0x1c7)];}[a0_0x257fa6(0x187)](_0x5ba6e8){const _0x1c13a1=a0_0x257fa6;return STATIC_ANALYSIS[_0x1c13a1(0x1a8)]['ERROR'];}async['getValidatorStatus'](){const _0x56adde=await this['detectAvailableValidators']();return{'validators':_0x56adde,'recommendations':this['getInstallRecommendations'](_0x56adde)};}[a0_0x257fa6(0x1b0)](_0x2f9e78){const _0x32b239=a0_0x257fa6,_0x3b2860=[];return!_0x2f9e78['checkov']&&_0x3b2860['push']({'validator':'checkov','reason':_0x32b239(0x17a),'install':_0x32b239(0x1b6),'priority':'high'}),!_0x2f9e78['hadolint']&&_0x3b2860['push']({'validator':_0x32b239(0x1b3),'reason':_0x32b239(0x1b7),'install':'Download from https://github.com/hadolint/hadolint/releases','priority':'high'}),!_0x2f9e78['yamllint']&&_0x3b2860[_0x32b239(0x185)]({'validator':'yamllint','reason':_0x32b239(0x1e2),'install':'pip\x20install\x20yamllint','priority':'medium'}),!_0x2f9e78['jsonSchema']&&_0x3b2860['push']({'validator':'ajv\x20(JSON\x20Schema)','reason':_0x32b239(0x19c),'install':'npm\x20install\x20ajv\x20ajv-formats','priority':_0x32b239(0x199)}),_0x3b2860;}}export default ConfigValidator;