@loxia-labs/loxia-autopilot-one 3.0.0 → 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 -0
  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 -0
  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-WcMaXJTE.js → index-CV3z5zRq.js} +161 -140
  157. package/web-ui/build/static/index-D3TW3p_0.css +1 -0
  158. package/web-ui/build/static/index-BFYXLy4x.css +0 -1
package/bin/cli.js CHANGED
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- const a0_0x1c9544=a0_0x2f02;function a0_0x2f02(_0x4df49b,_0x3292b0){_0x4df49b=_0x4df49b-0x1af;const _0xd5034e=a0_0xd503();let _0x2f0231=_0xd5034e[_0x4df49b];return _0x2f0231;}(function(_0x5795fa,_0x420eb6){const _0x14a9ec=a0_0x2f02,_0x361ff8=_0x5795fa();while(!![]){try{const _0x1880c9=-parseInt(_0x14a9ec(0x1d9))/0x1+-parseInt(_0x14a9ec(0x1fd))/0x2+parseInt(_0x14a9ec(0x1b4))/0x3+-parseInt(_0x14a9ec(0x1c0))/0x4*(parseInt(_0x14a9ec(0x1f0))/0x5)+-parseInt(_0x14a9ec(0x1cc))/0x6+-parseInt(_0x14a9ec(0x204))/0x7*(-parseInt(_0x14a9ec(0x20e))/0x8)+parseInt(_0x14a9ec(0x1e0))/0x9;if(_0x1880c9===_0x420eb6)break;else _0x361ff8['push'](_0x361ff8['shift']());}catch(_0x43c606){_0x361ff8['push'](_0x361ff8['shift']());}}}(a0_0xd503,0x5a952));import{fileURLToPath}from'url';import{dirname,join}from'path';import{spawn}from'child_process';import{readFileSync}from'fs';import a0_0x445489 from'http';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename),DEFAULT_PORT=0x1f90,DEFAULT_HOST=a0_0x1c9544(0x1b2),SERVER_STARTUP_TIMEOUT=0x3a98,SERVER_CHECK_INTERVAL=0x1f4,args=process[a0_0x1c9544(0x1ba)][a0_0x1c9544(0x1c8)](0x2),command=args[0x0]&&!args[0x0][a0_0x1c9544(0x1ec)]('--')?args[0x0]:null,flags={'port':null,'host':null,'help':args[a0_0x1c9544(0x1cf)](a0_0x1c9544(0x1b3))||args['includes']('-h'),'version':args['includes']('--version')||args[a0_0x1c9544(0x1cf)]('-v')};for(let i=0x0;i<args['length'];i++){args[i]===a0_0x1c9544(0x1cd)&&args[i+0x1]&&(flags[a0_0x1c9544(0x1b8)]=parseInt(args[i+0x1],0xa)),args[i]==='--host'&&args[i+0x1]&&(flags[a0_0x1c9544(0x20b)]=args[i+0x1]);}const explicitPort=flags[a0_0x1c9544(0x1b8)],host=flags[a0_0x1c9544(0x20b)]||DEFAULT_HOST;if(flags['version']){const pkgPath=join(__dirname,'..',a0_0x1c9544(0x20c)),pkg=JSON[a0_0x1c9544(0x1e3)](readFileSync(pkgPath,'utf8'));console[a0_0x1c9544(0x212)](a0_0x1c9544(0x209)+pkg['version']),process[a0_0x1c9544(0x1ca)](0x0);}if(flags[a0_0x1c9544(0x1e4)]||!command){const pkgPath=join(__dirname,'..','package.json'),pkg=JSON[a0_0x1c9544(0x1e3)](readFileSync(pkgPath,a0_0x1c9544(0x1e8)));console[a0_0x1c9544(0x212)]('\x0aLoxia\x20Autopilot\x20One\x20v'+pkg[a0_0x1c9544(0x1de)]+'\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'+DEFAULT_PORT+a0_0x1c9544(0x1f8)+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_0x1c9544(0x1ca)](0x0);}async function getPortRegistry(){const _0x116fcb=a0_0x1c9544,{getPortRegistry:_0x26782c}=await import(_0x116fcb(0x1d8));return _0x26782c();}async function discoverBackend(){const _0x437658=a0_0x1c9544;try{const _0x379d05=await getPortRegistry();await _0x379d05['cleanupStaleEntries']();const _0x10ebc9=await _0x379d05[_0x437658(0x1ea)](_0x437658(0x1e2));if(_0x10ebc9)return{'host':_0x10ebc9[_0x437658(0x20b)]||_0x437658(0x1c4),'port':_0x10ebc9['port'],'pid':_0x10ebc9[_0x437658(0x1ce)]};return null;}catch(_0x4117b3){return null;}}function a0_0xd503(){const _0x21a7b7=['includes','write','\x0aShutting\x20down\x20server...','open','platform','loxia-terminal.js','\x0aServer\x20may\x20still\x20be\x20starting.\x20Check\x20the\x20port\x20registry\x20or\x20logs.','message','Schedule\x20\x22','../src/services/portRegistry.js','172067WfoMHX','node','setTimeout','error','Failed\x20to\x20start\x20server\x20within\x2030s.\x20Check\x20logs.','version','application/json','6936156QFZHRW','data','backend','parse','help','Waiting\x20for\x20server\x20to\x20start...','toString','LOXIA_HOST','utf8','/trigger','getService','PORT','startsWith','SIGINT','LOXIA_PORT','scheduleName','16945TmVLhV','\x0aServer\x20failed\x20to\x20start.\x20Please\x20check\x20logs.','kill','\x20\x20loxia\x20serve\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Start\x20server\x20only','destroy','get','\x22\x20triggered\x20successfully.','\x20\x20Terminal\x20UI:\x20\x20loxia\x20terminal',')\x0a\x20\x20--host\x20<host>\x20\x20\x20\x20\x20Specify\x20host\x20(default:\x20','statusCode','catch','ceil','\x20\x20loxia\x20plus-terminal\x20\x20#\x20Start\x20server\x20+\x20Terminal\x20UI\x0a','530398Oeqlpk','Server\x20discovered\x20at\x20','Could\x20not\x20open\x20browser\x20automatically.','POST','/api/health\x0a','web','\x0a\x20\x20Web\x20UI:\x20\x20\x20\x20\x20\x20\x20','889MfUMxB','Looking\x20for\x20running\x20server...','Run\x20\x27loxia\x20terminal\x27\x20to\x20connect\x20when\x20ready.','src','stringify','Loxia\x20Autopilot\x20One\x20v','index.js','host','package.json','request','17448CtkJPB','unref','cmd','\x20\x20loxia\x20web\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Start\x20server\x20+\x20Web\x20UI','log','\x0aNo\x20running\x20server\x20found\x20in\x20the\x20port\x20registry.','Failed\x20to\x20trigger\x20schedule:\x20','Please\x20open\x20manually:\x20','127.0.0.1','--help','190767VCmNWj','\x0aPlease\x20start\x20the\x20server\x20first:','\x0aServer\x20started\x20but\x20may\x20still\x20be\x20initializing.','Request\x20timed\x20out','port','SIGTERM','argv','No\x20running\x20server\x20found.\x20Starting\x20Loxia\x20in\x20background...','/api/system/idle-shutdown','Starting\x20Terminal\x20UI...\x0a','darwin','win32','336hMASMu','end','http://','ignore','localhost','now','/api/schedules/','Invalid\x20response:\x20','slice','inherit','exit','\x0aOpening\x20Web\x20UI\x20at\x20','109752TNVaak','--port','pid'];a0_0xd503=function(){return _0x21a7b7;};return a0_0xd503();}async function checkServerRunning(_0x43cb8a,_0x50c05f,_0x2faf77=0x1){for(let _0x1966f4=0x0;_0x1966f4<_0x2faf77;_0x1966f4++){const _0x4cb5b1=await new Promise(_0x5a21c8=>{const _0x2be1c4=a0_0x2f02,_0x155856=a0_0x445489[_0x2be1c4(0x1f5)](_0x2be1c4(0x1c2)+_0x43cb8a+':'+_0x50c05f+'/api/health',_0x4a4508=>{const _0x4c51ea=_0x2be1c4;_0x5a21c8(_0x4a4508[_0x4c51ea(0x1f9)]===0xc8);});_0x155856['on'](_0x2be1c4(0x1dc),()=>_0x5a21c8(![])),_0x155856[_0x2be1c4(0x1db)](0x7d0,()=>{const _0x16e72f=_0x2be1c4;_0x155856[_0x16e72f(0x1f4)](),_0x5a21c8(![]);});});if(_0x4cb5b1)return!![];_0x1966f4<_0x2faf77-0x1&&await new Promise(_0x3616f4=>setTimeout(_0x3616f4,SERVER_CHECK_INTERVAL));}return![];}async function waitForServerWithDiscovery(_0x5492d9=SERVER_STARTUP_TIMEOUT){const _0x3f74f7=a0_0x1c9544,_0x378f8f=Date[_0x3f74f7(0x1c5)]();while(Date[_0x3f74f7(0x1c5)]()-_0x378f8f<_0x5492d9){const _0x2e392f=await discoverBackend();if(_0x2e392f){const _0x109443=await checkServerRunning(_0x2e392f[_0x3f74f7(0x20b)],_0x2e392f[_0x3f74f7(0x1b8)]);if(_0x109443)return _0x2e392f;}await new Promise(_0xc4101d=>setTimeout(_0xc4101d,SERVER_CHECK_INTERVAL));}return null;}async function waitForServerAtPort(_0x3af261,_0x4b9237,_0x1f87e2=SERVER_STARTUP_TIMEOUT){const _0x12109b=a0_0x1c9544,_0x601362=Math[_0x12109b(0x1fb)](_0x1f87e2/SERVER_CHECK_INTERVAL),_0x1f62d6=await checkServerRunning(_0x3af261,_0x4b9237,_0x601362);return _0x1f62d6?{'host':_0x3af261,'port':_0x4b9237}:null;}function openBrowser(_0x2fb69c){const _0x58ed23=a0_0x1c9544;let _0x28e691,_0x5db1a1;if(process[_0x58ed23(0x1d3)]===_0x58ed23(0x1be))_0x28e691=_0x58ed23(0x1d2),_0x5db1a1=[_0x2fb69c];else process[_0x58ed23(0x1d3)]===_0x58ed23(0x1bf)?(_0x28e691=_0x58ed23(0x210),_0x5db1a1=['/c','start','\x22\x22',_0x2fb69c]):(_0x28e691='xdg-open',_0x5db1a1=[_0x2fb69c]);const _0x5e07bd=spawn(_0x28e691,_0x5db1a1,{'detached':!![],'stdio':'ignore'});_0x5e07bd[_0x58ed23(0x20f)](),_0x5e07bd['on']('error',()=>{const _0x37abc4=_0x58ed23;console[_0x37abc4(0x212)](_0x37abc4(0x1ff)),console[_0x37abc4(0x212)](_0x37abc4(0x1b1)+_0x2fb69c);});}function startServer(_0x3e93ca=![]){const _0x54324b=a0_0x1c9544,_0x588199={...process.env};explicitPort&&(_0x588199[_0x54324b(0x1ee)]=explicitPort[_0x54324b(0x1e6)](),_0x588199[_0x54324b(0x1eb)]=explicitPort[_0x54324b(0x1e6)]());flags[_0x54324b(0x20b)]&&(_0x588199[_0x54324b(0x1e7)]=flags[_0x54324b(0x20b)]);const _0x441b9f=join(__dirname,'..',_0x54324b(0x207),_0x54324b(0x20a)),_0x213001=spawn(_0x54324b(0x1da),[_0x441b9f],{'cwd':join(__dirname,'..'),'env':_0x588199,'stdio':_0x3e93ca?[_0x54324b(0x1c3),_0x54324b(0x1c3),_0x54324b(0x1c3)]:_0x54324b(0x1c9),'detached':_0x3e93ca});return _0x3e93ca&&_0x213001[_0x54324b(0x20f)](),_0x213001;}function startTerminalUIProcess(_0xc2468b,_0x1ae29f){const _0x16e8d1=a0_0x1c9544,_0x4f0e12=join(__dirname,_0x16e8d1(0x1d4)),_0x35c164={...process.env,'LOXIA_PORT':_0x1ae29f[_0x16e8d1(0x1e6)](),'LOXIA_HOST':_0xc2468b},_0x216520=spawn(_0x16e8d1(0x1da),[_0x4f0e12],{'cwd':join(__dirname,'..'),'env':_0x35c164,'stdio':'inherit'});return _0x216520;}const commands={'web':async()=>{const _0x4e3742=a0_0x1c9544;console['log']('Starting\x20Loxia\x20server...\x0a');const _0x2b8c56=startServer(![]);console[_0x4e3742(0x212)](_0x4e3742(0x1e5));let _0x1c6c5e;explicitPort?_0x1c6c5e=await waitForServerAtPort(host,explicitPort):_0x1c6c5e=await waitForServerWithDiscovery();if(_0x1c6c5e){const _0x5632ec=_0x4e3742(0x1c2)+_0x1c6c5e[_0x4e3742(0x20b)]+':'+_0x1c6c5e[_0x4e3742(0x1b8)];console[_0x4e3742(0x212)](_0x4e3742(0x1cb)+_0x5632ec),openBrowser(_0x5632ec);}else console[_0x4e3742(0x212)](_0x4e3742(0x1d5));process['on'](_0x4e3742(0x1ed),()=>_0x2b8c56[_0x4e3742(0x1f2)](_0x4e3742(0x1ed))),process['on'](_0x4e3742(0x1b9),()=>_0x2b8c56[_0x4e3742(0x1f2)]('SIGTERM')),_0x2b8c56['on']('exit',_0x482dce=>process[_0x4e3742(0x1ca)](_0x482dce||0x0));},'plus-web':async()=>{const _0x1920ba=a0_0x1c9544;await commands[_0x1920ba(0x202)]();},'serve':async()=>{const _0x2e8111=a0_0x1c9544;console[_0x2e8111(0x212)]('Starting\x20Loxia\x20server...\x0a');const _0x21cb26=startServer(![]);console[_0x2e8111(0x212)](_0x2e8111(0x1e5));let _0x169861;explicitPort?_0x169861=await waitForServerAtPort(host,explicitPort):_0x169861=await waitForServerWithDiscovery();if(_0x169861){const _0x4e6b3b='http://'+_0x169861['host']+':'+_0x169861[_0x2e8111(0x1b8)];console[_0x2e8111(0x212)]('\x0a✓\x20Server\x20running\x20at\x20'+_0x4e6b3b),console[_0x2e8111(0x212)](_0x2e8111(0x203)+_0x4e6b3b),console['log'](_0x2e8111(0x1f7)),console[_0x2e8111(0x212)]('\x20\x20API\x20Health:\x20\x20\x20'+_0x4e6b3b+_0x2e8111(0x201));}else console[_0x2e8111(0x212)](_0x2e8111(0x1b6)),console[_0x2e8111(0x212)](_0x2e8111(0x206));process['on'](_0x2e8111(0x1ed),()=>_0x21cb26[_0x2e8111(0x1f2)](_0x2e8111(0x1ed))),process['on'](_0x2e8111(0x1b9),()=>_0x21cb26[_0x2e8111(0x1f2)]('SIGTERM')),_0x21cb26['on'](_0x2e8111(0x1ca),_0x1b2fe5=>process[_0x2e8111(0x1ca)](_0x1b2fe5||0x0));},'terminal':async()=>{const _0x1b5847=a0_0x1c9544;console['log'](_0x1b5847(0x205));let _0x1b8d7a=await discoverBackend();explicitPort&&(_0x1b8d7a={'host':host,'port':explicitPort});!_0x1b8d7a&&(console['error'](_0x1b5847(0x1af)),console['error'](_0x1b5847(0x1b5)),console[_0x1b5847(0x1dc)](_0x1b5847(0x211)),console[_0x1b5847(0x1dc)](_0x1b5847(0x1f3)),console['error'](_0x1b5847(0x1fc)),process[_0x1b5847(0x1ca)](0x1));const _0x35ef50=await checkServerRunning(_0x1b8d7a[_0x1b5847(0x20b)],_0x1b8d7a[_0x1b5847(0x1b8)]);!_0x35ef50&&(console[_0x1b5847(0x1dc)]('\x0aServer\x20registered\x20at\x20'+_0x1b8d7a[_0x1b5847(0x20b)]+':'+_0x1b8d7a[_0x1b5847(0x1b8)]+'\x20but\x20not\x20responding.'),console[_0x1b5847(0x1dc)]('It\x20may\x20have\x20crashed.\x20Please\x20restart\x20it.'),process[_0x1b5847(0x1ca)](0x1));console[_0x1b5847(0x212)](_0x1b5847(0x1fe)+_0x1b8d7a[_0x1b5847(0x20b)]+':'+_0x1b8d7a[_0x1b5847(0x1b8)]),console[_0x1b5847(0x212)](_0x1b5847(0x1bd));const _0x4561bb=startTerminalUIProcess(_0x1b8d7a['host'],_0x1b8d7a[_0x1b5847(0x1b8)]);process['on'](_0x1b5847(0x1ed),()=>_0x4561bb[_0x1b5847(0x1f2)](_0x1b5847(0x1ed))),process['on'](_0x1b5847(0x1b9),()=>_0x4561bb[_0x1b5847(0x1f2)](_0x1b5847(0x1b9))),_0x4561bb['on'](_0x1b5847(0x1ca),_0x2a8c48=>process[_0x1b5847(0x1ca)](_0x2a8c48||0x0));},'plus-terminal':async()=>{const _0x5d668f=a0_0x1c9544;console['log']('Starting\x20Loxia\x20server\x20in\x20background...');const _0x5ea1ef=startServer(!![]);let _0x143709;explicitPort?_0x143709=await waitForServerAtPort(host,explicitPort):_0x143709=await waitForServerWithDiscovery();!_0x143709&&(console['error'](_0x5d668f(0x1f1)),process[_0x5d668f(0x1ca)](0x1));console['log']('Server\x20running\x20at\x20http://'+_0x143709[_0x5d668f(0x20b)]+':'+_0x143709[_0x5d668f(0x1b8)]),console[_0x5d668f(0x212)](_0x5d668f(0x1bd));const _0x5d3eea=startTerminalUIProcess(_0x143709[_0x5d668f(0x20b)],_0x143709[_0x5d668f(0x1b8)]);_0x5d3eea['on'](_0x5d668f(0x1ca),_0x574560=>{const _0x316333=_0x5d668f;console[_0x316333(0x212)](_0x316333(0x1d1));try{process[_0x316333(0x1f2)](_0x5ea1ef['pid'],_0x316333(0x1b9));}catch(_0x2dd3a6){}process[_0x316333(0x1ca)](_0x574560||0x0);}),process['on'](_0x5d668f(0x1ed),()=>{const _0x4b8ee0=_0x5d668f;_0x5d3eea[_0x4b8ee0(0x1f2)](_0x4b8ee0(0x1ed));}),process['on']('SIGTERM',()=>{const _0xb52b98=_0x5d668f;_0x5d3eea['kill'](_0xb52b98(0x1b9));});},'trigger-schedule':async()=>{const _0x2e0475=a0_0x1c9544,_0x3c3c2c=args[0x1];!_0x3c3c2c&&(console[_0x2e0475(0x1dc)]('Usage:\x20loxia\x20trigger-schedule\x20<schedule-id>'),process[_0x2e0475(0x1ca)](0x1));let _0x38c25a=await discoverBackend(),_0x18686c=![];if(_0x38c25a){const _0x1a931f=await checkServerRunning(_0x38c25a[_0x2e0475(0x20b)],_0x38c25a[_0x2e0475(0x1b8)]);if(!_0x1a931f)_0x38c25a=null;}!_0x38c25a&&(console[_0x2e0475(0x212)](_0x2e0475(0x1bb)),startServer(!![]),_0x18686c=!![],explicitPort?_0x38c25a=await waitForServerAtPort(host,explicitPort,0x7530):_0x38c25a=await waitForServerWithDiscovery(0x7530),!_0x38c25a&&(console[_0x2e0475(0x1dc)](_0x2e0475(0x1dd)),process[_0x2e0475(0x1ca)](0x1)),console[_0x2e0475(0x212)]('Server\x20started\x20at\x20'+_0x38c25a[_0x2e0475(0x20b)]+':'+_0x38c25a['port']));const _0x116081='http://'+_0x38c25a[_0x2e0475(0x20b)]+':'+_0x38c25a[_0x2e0475(0x1b8)]+_0x2e0475(0x1c6)+encodeURIComponent(_0x3c3c2c)+_0x2e0475(0x1e9);try{const _0x1c23c6=await new Promise((_0x598776,_0x2dbdb0)=>{const _0x31af13=_0x2e0475,_0x409845=JSON[_0x31af13(0x208)]({}),_0xff391f=a0_0x445489[_0x31af13(0x20d)](_0x116081,{'method':_0x31af13(0x200),'headers':{'Content-Type':_0x31af13(0x1df),'Content-Length':Buffer['byteLength'](_0x409845)}},_0x3838d4=>{const _0x4e33f0=_0x31af13;let _0x2edefe='';_0x3838d4['on'](_0x4e33f0(0x1e1),_0x8b9ac0=>_0x2edefe+=_0x8b9ac0),_0x3838d4['on']('end',()=>{const _0x3bb15e=_0x4e33f0;try{_0x598776(JSON[_0x3bb15e(0x1e3)](_0x2edefe));}catch{_0x2dbdb0(new Error(_0x3bb15e(0x1c7)+_0x2edefe));}});});_0xff391f['on']('error',_0x2dbdb0),_0xff391f[_0x31af13(0x1db)](0xea60,()=>{const _0x62a406=_0x31af13;_0xff391f[_0x62a406(0x1f4)](),_0x2dbdb0(new Error(_0x62a406(0x1b7)));}),_0xff391f[_0x31af13(0x1d0)](_0x409845),_0xff391f[_0x31af13(0x1c1)]();});_0x1c23c6['success']?console[_0x2e0475(0x212)](_0x2e0475(0x1d7)+(_0x1c23c6[_0x2e0475(0x1ef)]||_0x3c3c2c)+_0x2e0475(0x1f6)):(console['error'](_0x2e0475(0x1b0)+_0x1c23c6['error']),process[_0x2e0475(0x1ca)](0x1));}catch(_0x366f4f){console[_0x2e0475(0x1dc)]('Failed\x20to\x20trigger\x20schedule:\x20'+_0x366f4f[_0x2e0475(0x1d6)]),process['exit'](0x1);}if(_0x18686c){const _0xd3ffb5=_0x2e0475(0x1c2)+_0x38c25a[_0x2e0475(0x20b)]+':'+_0x38c25a['port']+_0x2e0475(0x1bc);try{const _0xeca6d8=JSON[_0x2e0475(0x208)]({'timeoutMinutes':0xa});await new Promise(_0x36c688=>{const _0x3221a4=_0x2e0475,_0x401a2d=a0_0x445489[_0x3221a4(0x20d)](_0xd3ffb5,{'method':_0x3221a4(0x200),'headers':{'Content-Type':_0x3221a4(0x1df),'Content-Length':Buffer['byteLength'](_0xeca6d8)}},_0x288d29=>{const _0x54b479=_0x3221a4;_0x288d29['on']('data',()=>{}),_0x288d29['on'](_0x54b479(0x1c1),_0x36c688);});_0x401a2d['on'](_0x3221a4(0x1dc),_0x36c688),_0x401a2d[_0x3221a4(0x1d0)](_0xeca6d8),_0x401a2d[_0x3221a4(0x1c1)]();});}catch{}}process[_0x2e0475(0x1ca)](0x0);}};commands[command]?commands[command]()[a0_0x1c9544(0x1fa)](_0x2eec53=>{const _0x47baed=a0_0x1c9544;console['error']('Error:',_0x2eec53[_0x47baed(0x1d6)]),process['exit'](0x1);}):(console['error']('Unknown\x20command:\x20'+command),console[a0_0x1c9544(0x1dc)]('Run\x20\x22loxia\x20--help\x22\x20for\x20usage\x20information.'),process[a0_0x1c9544(0x1ca)](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
- const a0_0x22757e=a0_0x1127;(function(_0x2c74d1,_0x413788){const _0x28d1a0=a0_0x1127,_0x46fe1a=_0x2c74d1();while(!![]){try{const _0x2e5b2e=parseInt(_0x28d1a0(0x1f1))/0x1*(parseInt(_0x28d1a0(0x1d8))/0x2)+parseInt(_0x28d1a0(0x1d7))/0x3+-parseInt(_0x28d1a0(0x1f4))/0x4+-parseInt(_0x28d1a0(0x1fc))/0x5+parseInt(_0x28d1a0(0x1e3))/0x6+parseInt(_0x28d1a0(0x1e7))/0x7*(parseInt(_0x28d1a0(0x1ed))/0x8)+parseInt(_0x28d1a0(0x1e5))/0x9;if(_0x2e5b2e===_0x413788)break;else _0x46fe1a['push'](_0x46fe1a['shift']());}catch(_0x1ea6fe){_0x46fe1a['push'](_0x46fe1a['shift']());}}}(a0_0x2a50,0x55574));import{spawn}from'child_process';import a0_0x31ad3a from'net';import a0_0x41b963 from'path';import{fileURLToPath}from'url';const __filename=fileURLToPath(import.meta.url),__dirname=a0_0x41b963['dirname'](__filename),projectRoot=a0_0x41b963[a0_0x22757e(0x201)](__dirname),DEFAULT_PORT=0x1f90,DEFAULT_HOST=a0_0x22757e(0x1ee),SERVER_STARTUP_TIMEOUT=0x2710;async function isServerRunning(_0x4611f2,_0x38ce64){return new Promise(_0x3fdaaa=>{const _0x2d7d4e=a0_0x1127,_0x44e7cd=new a0_0x31ad3a[(_0x2d7d4e(0x1f7))]();_0x44e7cd[_0x2d7d4e(0x1ef)](0x7d0),_0x44e7cd['on']('connect',()=>{const _0x3fcf2b=_0x2d7d4e;_0x44e7cd[_0x3fcf2b(0x203)](),_0x3fdaaa(!![]);}),_0x44e7cd['on']('timeout',()=>{const _0x47e10d=_0x2d7d4e;_0x44e7cd[_0x47e10d(0x203)](),_0x3fdaaa(![]);}),_0x44e7cd['on'](_0x2d7d4e(0x1e6),()=>{const _0x4cb1bd=_0x2d7d4e;_0x44e7cd[_0x4cb1bd(0x203)](),_0x3fdaaa(![]);}),_0x44e7cd['connect'](_0x38ce64,_0x4611f2);});}function a0_0x1127(_0x5bd327,_0x1562e4){_0x5bd327=_0x5bd327-0x1d7;const _0x2a5058=a0_0x2a50();let _0x1127d9=_0x2a5058[_0x5bd327];return _0x1127d9;}async function startServer(_0x230800,_0x45dada){const _0x27f2b9=a0_0x22757e;return console[_0x27f2b9(0x1e8)](_0x27f2b9(0x1f9)),new Promise((_0x2ba6e7,_0x5dcf63)=>{const _0x1966d8=_0x27f2b9,_0x48f825=spawn(_0x1966d8(0x200),[a0_0x41b963[_0x1966d8(0x1fe)](projectRoot,_0x1966d8(0x1da)),_0x1966d8(0x1fa),_0x1966d8(0x1de),'--host',_0x230800,_0x1966d8(0x1ff),_0x45dada['toString']()],{'detached':![],'stdio':[_0x1966d8(0x204),_0x1966d8(0x1f0),_0x1966d8(0x1f0)]});_0x48f825[_0x1966d8(0x1ec)]['on'](_0x1966d8(0x1dd),()=>{}),_0x48f825[_0x1966d8(0x1f5)]['on'](_0x1966d8(0x1dd),()=>{}),_0x48f825['on'](_0x1966d8(0x1e6),_0x2c627c=>{const _0x19bb17=_0x1966d8;console[_0x19bb17(0x1e6)]('Failed\x20to\x20start\x20server:',_0x2c627c['message']),_0x5dcf63(_0x2c627c);});const _0x4779ae=Date[_0x1966d8(0x1e2)](),_0x55dc8c=setInterval(async()=>{const _0x2c42f5=_0x1966d8,_0x3e26c2=await isServerRunning(_0x230800,_0x45dada);if(_0x3e26c2)clearInterval(_0x55dc8c),console['log'](_0x2c42f5(0x1f3)+_0x230800+':'+_0x45dada),_0x2ba6e7();else Date[_0x2c42f5(0x1e2)]()-_0x4779ae>SERVER_STARTUP_TIMEOUT&&(clearInterval(_0x55dc8c),_0x48f825[_0x2c42f5(0x1dc)](),_0x5dcf63(new Error(_0x2c42f5(0x1e4))));},0x1f4);});}async function main(){const _0x1f60fa=a0_0x22757e;try{console[_0x1f60fa(0x1e8)](_0x1f60fa(0x1fd)),console['log'](_0x1f60fa(0x1e0)),console[_0x1f60fa(0x1e8)](_0x1f60fa(0x1fd)),console[_0x1f60fa(0x1e8)]('');const _0x494f3d=process['argv']['slice'](0x2);let _0x2abba6=DEFAULT_HOST,_0x4fc18c=DEFAULT_PORT;for(let _0x826a8d=0x0;_0x826a8d<_0x494f3d[_0x1f60fa(0x1f2)];_0x826a8d++){if(_0x494f3d[_0x826a8d]===_0x1f60fa(0x1e9)&&_0x494f3d[_0x826a8d+0x1])_0x2abba6=_0x494f3d[_0x826a8d+0x1],_0x826a8d++;else _0x494f3d[_0x826a8d]===_0x1f60fa(0x1ff)&&_0x494f3d[_0x826a8d+0x1]&&(_0x4fc18c=parseInt(_0x494f3d[_0x826a8d+0x1],0xa),_0x826a8d++);}console[_0x1f60fa(0x1e8)]('🔍\x20Checking\x20if\x20server\x20is\x20running\x20at\x20'+_0x2abba6+':'+_0x4fc18c+_0x1f60fa(0x1f8));const _0xc33061=await isServerRunning(_0x2abba6,_0x4fc18c);!_0xc33061?(console['log'](_0x1f60fa(0x1ea)),await startServer(_0x2abba6,_0x4fc18c)):console[_0x1f60fa(0x1e8)](_0x1f60fa(0x1e1)+_0x2abba6+':'+_0x4fc18c),console[_0x1f60fa(0x1e8)](''),console[_0x1f60fa(0x1e8)](_0x1f60fa(0x1db)),console[_0x1f60fa(0x1e8)](''),await new Promise(_0x580f96=>setTimeout(_0x580f96,0x1f4)),process.env.LOXIA_HOST=_0x2abba6,process.env.LOXIA_PORT=_0x4fc18c[_0x1f60fa(0x1eb)](),await import(_0x1f60fa(0x1df));}catch(_0x1137e8){console[_0x1f60fa(0x1e6)](''),console[_0x1f60fa(0x1e6)](_0x1f60fa(0x1fb)),console[_0x1f60fa(0x1e6)]('\x20\x20',_0x1137e8[_0x1f60fa(0x202)]),console[_0x1f60fa(0x1e6)](''),console['error']('💡\x20Troubleshooting:'),console[_0x1f60fa(0x1e6)](_0x1f60fa(0x1d9)),console[_0x1f60fa(0x1e6)]('\x20\x20\x202.\x20Try\x20running\x20the\x20server\x20manually:\x20node\x20bin/cli.js'),console[_0x1f60fa(0x1e6)](_0x1f60fa(0x1f6)),console[_0x1f60fa(0x1e6)](''),process['exit'](0x1);}}function a0_0x2a50(){const _0x538a98=['message','destroy','ignore','1078236fbtcEg','1118wUrUaC','\x20\x20\x201.\x20Make\x20sure\x20no\x20other\x20process\x20is\x20using\x20port\x208080','bin/cli.js','🎨\x20Launching\x20Ink-based\x20Terminal\x20UI...','kill','data','web','../src/interfaces/terminal/index.js','\x20\x20Loxia\x20Autopilot\x20One\x20-\x20Terminal\x20UI','✓\x20Server\x20is\x20already\x20running\x20at\x20','now','1005900isPTYq','Server\x20startup\x20timeout','2992761eEVxcf','error','632492AfPHOi','log','--host','✗\x20Server\x20is\x20not\x20running','toString','stdout','24Rpxdyi','localhost','setTimeout','pipe','235OlCjju','length','✓\x20Server\x20started\x20at\x20','1699772ynqpWt','stderr','\x20\x20\x203.\x20Check\x20logs\x20for\x20more\x20details','Socket','...','🚀\x20Starting\x20Loxia\x20server...','--ui','❌\x20Failed\x20to\x20start\x20Terminal\x20UI:','2437625AHDRaG','━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━','join','--port','node','dirname'];a0_0x2a50=function(){return _0x538a98;};return a0_0x2a50();}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_0x68a684=a0_0x2aba;(function(_0x1d9585,_0x16e90a){const _0x5bc5ec=a0_0x2aba,_0x1e22ee=_0x1d9585();while(!![]){try{const _0x4db220=parseInt(_0x5bc5ec(0xfc))/0x1*(parseInt(_0x5bc5ec(0x105))/0x2)+-parseInt(_0x5bc5ec(0xfe))/0x3+-parseInt(_0x5bc5ec(0xfd))/0x4*(-parseInt(_0x5bc5ec(0xe1))/0x5)+parseInt(_0x5bc5ec(0xfa))/0x6+-parseInt(_0x5bc5ec(0xf8))/0x7*(parseInt(_0x5bc5ec(0xe4))/0x8)+parseInt(_0x5bc5ec(0xf4))/0x9*(parseInt(_0x5bc5ec(0xf9))/0xa)+parseInt(_0x5bc5ec(0xea))/0xb*(parseInt(_0x5bc5ec(0xe7))/0xc);if(_0x4db220===_0x16e90a)break;else _0x1e22ee['push'](_0x1e22ee['shift']());}catch(_0x109626){_0x1e22ee['push'](_0x1e22ee['shift']());}}}(a0_0x4b75,0x3cca5));function a0_0x4b75(){const _0x14fc37=['waitUntilExit','\x0aTerminal\x20UI\x20exited','308744VCtoZA','ERROR:\x20Terminal\x20UI\x20requires\x20an\x20interactive\x20terminal\x20(TTY).','slice','2507844hLkVrY','\x20\x20-\x20Redirected\x20output\x20(e.g.,\x20>\x20file.txt,\x202>&1\x20|\x20...)','log','11tQElJF','\x0aTerminal\x20UI\x20error:','\x20\x20-\x20Background\x20processes\x20(e.g.,\x20&\x20at\x20the\x20end)','isTTY','exit','catch','\x20\x20-\x20Piped\x20environments\x20(e.g.,\x20|\x20head,\x20|\x20grep)','length','error','then','2674377oyqCbk','Starting\x20Loxia\x20Terminal\x20UI...','Or\x20use\x20the\x20web\x20UI\x20instead:','argv','42zBEylL','10Dbphfv','621564XYegDK','--port','10PBGSfs','28KLZkuh','834720tbObrb','\x0aLoxia\x20Terminal\x20UI\x0a\x0aUsage:\x0a\x20\x20loxia-terminal\x20[options]\x0a\x0aOptions:\x0a\x20\x20--host,\x20-h\x20<host>\x20\x20\x20\x20Backend\x20host\x20(default:\x20localhost)\x0a\x20\x20--port,\x20-p\x20<port>\x20\x20\x20\x20Backend\x20port\x20(default:\x208080)\x0a\x20\x20--help\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20this\x20help\x20message\x0a\x0aEnvironment\x20Variables:\x0a\x20\x20LOXIA_HOST\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Backend\x20host\x0a\x20\x20LOXIA_PORT\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Backend\x20port\x0a\x0aExamples:\x0a\x20\x20loxia-terminal\x0a\x20\x20loxia-terminal\x20--host\x20192.168.1.100\x20--port\x203000\x0a\x20\x20LOXIA_HOST=api.example.com\x20LOXIA_PORT=443\x20loxia-terminal\x0a','\x20\x20npm\x20start','Please\x20run\x20this\x20command\x20in\x20a\x20real\x20terminal\x20without\x20pipes\x20or\x20redirection:','stdin','port','Press\x20Ctrl+C\x20to\x20exit\x0a','4034gySyJO','host','92065ijIteg'];a0_0x4b75=function(){return _0x14fc37;};return a0_0x4b75();}import{startTerminalUI}from'../src/interfaces/terminal/index.js';const args=process[a0_0x68a684(0xf7)][a0_0x68a684(0xe6)](0x2),options={'host':'localhost','port':0x1f90};for(let i=0x0;i<args[a0_0x68a684(0xf1)];i++){const arg=args[i];if(arg==='--host'||arg==='-h')options['host']=args[++i];else{if(arg===a0_0x68a684(0xfb)||arg==='-p')options['port']=parseInt(args[++i],0xa);else arg==='--help'&&(console[a0_0x68a684(0xe9)](a0_0x68a684(0xff)),process[a0_0x68a684(0xee)](0x0));}}process.env.LOXIA_HOST&&(options[a0_0x68a684(0x106)]=process.env.LOXIA_HOST);function a0_0x2aba(_0x2fb0a1,_0x2147cc){_0x2fb0a1=_0x2fb0a1-0xe1;const _0x4b7581=a0_0x4b75();let _0x2aba09=_0x4b7581[_0x2fb0a1];return _0x2aba09;}process.env.LOXIA_PORT&&(options[a0_0x68a684(0x103)]=parseInt(process.env.LOXIA_PORT,0xa));!process[a0_0x68a684(0x102)][a0_0x68a684(0xed)]&&(console[a0_0x68a684(0xf2)](a0_0x68a684(0xe5)),console[a0_0x68a684(0xf2)](''),console[a0_0x68a684(0xf2)]('The\x20terminal\x20UI\x20cannot\x20run\x20in:'),console[a0_0x68a684(0xf2)](a0_0x68a684(0xf0)),console['error'](a0_0x68a684(0xe8)),console[a0_0x68a684(0xf2)](a0_0x68a684(0xec)),console['error']('\x20\x20-\x20Some\x20CI/CD\x20environments'),console[a0_0x68a684(0xf2)](''),console['error'](a0_0x68a684(0x101)),console['error']('\x20\x20npm\x20run\x20terminal-ui'),console[a0_0x68a684(0xf2)](''),console[a0_0x68a684(0xf2)](a0_0x68a684(0xf6)),console[a0_0x68a684(0xf2)](a0_0x68a684(0x100)),process['exit'](0x1));console['log'](a0_0x68a684(0xf5)),console['log']('Connecting\x20to:\x20'+options[a0_0x68a684(0x106)]+':'+options[a0_0x68a684(0x103)]),console['log'](a0_0x68a684(0x104));const instance=startTerminalUI(options);instance[a0_0x68a684(0xe2)]()[a0_0x68a684(0xf3)](()=>{const _0x1a570e=a0_0x68a684;console[_0x1a570e(0xe9)](_0x1a570e(0xe3)),process['exit'](0x0);})[a0_0x68a684(0xef)](_0x31b56e=>{const _0x9fe55e=a0_0x68a684;console[_0x9fe55e(0xf2)](_0x9fe55e(0xeb),_0x31b56e),process[_0x9fe55e(0xee)](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_0x3e7cd4=a0_0x19d6;(function(_0x37b740,_0x19dbb2){const _0x12da10=a0_0x19d6,_0x1cf12c=_0x37b740();while(!![]){try{const _0x1b836e=-parseInt(_0x12da10(0x1cc))/0x1*(-parseInt(_0x12da10(0x1ca))/0x2)+parseInt(_0x12da10(0x1c9))/0x3+parseInt(_0x12da10(0x1e8))/0x4*(-parseInt(_0x12da10(0x1f6))/0x5)+parseInt(_0x12da10(0x1e9))/0x6+-parseInt(_0x12da10(0x1e0))/0x7+parseInt(_0x12da10(0x1c8))/0x8*(-parseInt(_0x12da10(0x1ea))/0x9)+-parseInt(_0x12da10(0x1d4))/0xa*(-parseInt(_0x12da10(0x1e6))/0xb);if(_0x1b836e===_0x19dbb2)break;else _0x1cf12c['push'](_0x1cf12c['shift']());}catch(_0x3709fa){_0x1cf12c['push'](_0x1cf12c['shift']());}}}(a0_0x9dd0,0xb4750));function a0_0x9dd0(){const _0x1d3886=['8108436awPKDk','9rbVtXW','SIGINT','error','http://localhost:','🚀\x20Starting\x20Loxia\x20server...','destroy','kill','║\x20\x20\x20Loxia\x20AI\x20Agents\x20-\x20Server\x20+\x20Terminal\x20UI\x20\x20\x20\x20\x20\x20║','src','\x0a👋\x20Terminal\x20UI\x20closed.','🖥️\x20\x20Starting\x20Terminal\x20UI...','pipe','130085mcexxe','message','includes','statusCode','Server\x20exited\x20with\x20code\x20','index.js','8542064InkNbu','1316676pQdbJM','2kpZrGR','Failed\x20to\x20start\x20Terminal\x20UI:','43199eBXlPw','toString','╚════════════════════════════════════════════════╝','SIGKILL','╔════════════════════════════════════════════════╗','[SERVER\x20ERROR]\x20','log','trim','260Mwqgmv','exit','ExperimentalWarning','setTimeout','Server\x20returned\x20','loxia-terminal.js','🛑\x20Stopping\x20server...','SIGTERM','bin','/health','get','Timeout','9485294qzEnlg','killed','node','Failed\x20to\x20start\x20server:','stderr','⚠️\x20\x20Server\x20may\x20not\x20be\x20fully\x20ready,\x20but\x20continuing\x20anyway...','639089UXKvAi','✅\x20Server\x20is\x20ready!','28zYEPaz'];a0_0x9dd0=function(){return _0x1d3886;};return a0_0x9dd0();}import{spawn}from'child_process';import{fileURLToPath}from'url';import{dirname,join}from'path';import a0_0x14f181 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;async function checkServerReady(_0x369603=0xa,_0x57edb6=0x1f4){const _0x484a7f=a0_0x19d6;for(let _0x343b88=0x0;_0x343b88<_0x369603;_0x343b88++){try{return await new Promise((_0x1904d8,_0xd595ba)=>{const _0x2c1a89=a0_0x19d6,_0x3f02e0=a0_0x14f181[_0x2c1a89(0x1de)](_0x2c1a89(0x1ed)+SERVER_PORT+_0x2c1a89(0x1dd),_0x3e4091=>{const _0x3e1e68=_0x2c1a89;_0x3e4091[_0x3e1e68(0x1c5)]===0xc8?_0x1904d8():_0xd595ba(new Error(_0x3e1e68(0x1d8)+_0x3e4091[_0x3e1e68(0x1c5)]));});_0x3f02e0['on'](_0x2c1a89(0x1ec),_0xd595ba),_0x3f02e0[_0x2c1a89(0x1d7)](0x3e8,()=>{const _0x37a7e0=_0x2c1a89;_0x3f02e0[_0x37a7e0(0x1ef)](),_0xd595ba(new Error(_0x37a7e0(0x1df)));});}),console[_0x484a7f(0x1d2)](_0x484a7f(0x1e7)),!![];}catch(_0x14c5b2){_0x343b88<_0x369603-0x1&&await new Promise(_0x299ae2=>setTimeout(_0x299ae2,_0x57edb6));}}return console['log'](_0x484a7f(0x1e5)),![];}async function startServer(){return new Promise(_0x159c15=>{const _0x444bc9=a0_0x19d6;console['log'](_0x444bc9(0x1ee));const _0xf06a80=join(rootDir,_0x444bc9(0x1f2),_0x444bc9(0x1c7));serverProcess=spawn('node',[_0xf06a80],{'cwd':rootDir,'env':{...process.env},'stdio':['ignore',_0x444bc9(0x1f5),_0x444bc9(0x1f5)],'detached':![]}),serverProcess['stdout']['on']('data',_0x90257b=>{const _0x1f09df=_0x444bc9,_0x182b4c=_0x90257b[_0x1f09df(0x1cd)]()['trim']();_0x182b4c&&console['log']('[SERVER]\x20'+_0x182b4c);}),serverProcess[_0x444bc9(0x1e4)]['on']('data',_0x4923e5=>{const _0x1709f7=_0x444bc9,_0x45ada0=_0x4923e5[_0x1709f7(0x1cd)]()[_0x1709f7(0x1d3)]();_0x45ada0&&!_0x45ada0[_0x1709f7(0x1f8)](_0x1709f7(0x1d6))&&console[_0x1709f7(0x1ec)](_0x1709f7(0x1d1)+_0x45ada0);}),serverProcess['on'](_0x444bc9(0x1ec),_0x1be902=>{const _0x581f1a=_0x444bc9;console[_0x581f1a(0x1ec)](_0x581f1a(0x1e3),_0x1be902[_0x581f1a(0x1f7)]),process['exit'](0x1);}),serverProcess['on'](_0x444bc9(0x1d5),(_0x4918f9,_0x4bc545)=>{const _0x3b3800=_0x444bc9;_0x4918f9!==null&&_0x4918f9!==0x0&&(console[_0x3b3800(0x1ec)](_0x3b3800(0x1c6)+_0x4918f9),process['exit'](_0x4918f9));}),setTimeout(_0x159c15,STARTUP_WAIT);});}function a0_0x19d6(_0x4d90e7,_0xf15c94){_0x4d90e7=_0x4d90e7-0x1c5;const _0x9dd04a=a0_0x9dd0();let _0x19d6f6=_0x9dd04a[_0x4d90e7];return _0x19d6f6;}async function startTerminalUI(){const _0x2c0d76=a0_0x19d6;console['log'](_0x2c0d76(0x1f4)),console[_0x2c0d76(0x1d2)]('');const _0x296c7e=join(rootDir,_0x2c0d76(0x1dc),_0x2c0d76(0x1d9)),_0x3c7eff=spawn(_0x2c0d76(0x1e2),[_0x296c7e],{'cwd':rootDir,'env':{...process.env},'stdio':'inherit'});return _0x3c7eff['on']('error',_0x339216=>{const _0x3de964=_0x2c0d76;console['error'](_0x3de964(0x1cb),_0x339216['message']),cleanup(),process[_0x3de964(0x1d5)](0x1);}),_0x3c7eff['on'](_0x2c0d76(0x1d5),_0x477315=>{const _0x45dea7=_0x2c0d76;console[_0x45dea7(0x1d2)](_0x45dea7(0x1f3)),cleanup(),process[_0x45dea7(0x1d5)](_0x477315||0x0);}),_0x3c7eff;}function cleanup(){const _0x3da6ba=a0_0x19d6;serverProcess&&!serverProcess[_0x3da6ba(0x1e1)]&&(console[_0x3da6ba(0x1d2)](_0x3da6ba(0x1da)),serverProcess[_0x3da6ba(0x1f0)]('SIGTERM'),setTimeout(()=>{const _0x3ae3f4=_0x3da6ba;!serverProcess[_0x3ae3f4(0x1e1)]&&serverProcess['kill'](_0x3ae3f4(0x1cf));},0x1388));}process['on'](a0_0x3e7cd4(0x1eb),()=>{const _0x4ab0a7=a0_0x3e7cd4;console[_0x4ab0a7(0x1d2)]('\x0a⚠️\x20\x20Received\x20SIGINT,\x20shutting\x20down...'),cleanup(),process[_0x4ab0a7(0x1d5)](0x0);}),process['on'](a0_0x3e7cd4(0x1db),()=>{const _0x5cdf57=a0_0x3e7cd4;console[_0x5cdf57(0x1d2)]('\x0a⚠️\x20\x20Received\x20SIGTERM,\x20shutting\x20down...'),cleanup(),process[_0x5cdf57(0x1d5)](0x0);}),process['on'](a0_0x3e7cd4(0x1d5),()=>{cleanup();});async function main(){const _0x75dae8=a0_0x3e7cd4;console[_0x75dae8(0x1d2)](_0x75dae8(0x1d0)),console[_0x75dae8(0x1d2)](_0x75dae8(0x1f1)),console[_0x75dae8(0x1d2)](_0x75dae8(0x1ce)),console[_0x75dae8(0x1d2)]('');try{await startServer(),await checkServerReady(),await startTerminalUI(),await new Promise(()=>{});}catch(_0x5107cb){console[_0x75dae8(0x1ec)]('Error\x20during\x20startup:',_0x5107cb[_0x75dae8(0x1f7)]),cleanup(),process[_0x75dae8(0x1d5)](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.0",
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_0x31ee22=a0_0xaf5d;(function(_0x5a1c51,_0xad16a6){const _0x4c7460=a0_0xaf5d,_0x39d249=_0x5a1c51();while(!![]){try{const _0x56a4a1=parseInt(_0x4c7460(0x11a))/0x1+-parseInt(_0x4c7460(0x10d))/0x2+parseInt(_0x4c7460(0x129))/0x3*(parseInt(_0x4c7460(0x116))/0x4)+parseInt(_0x4c7460(0x10c))/0x5+-parseInt(_0x4c7460(0x131))/0x6+parseInt(_0x4c7460(0x11f))/0x7+-parseInt(_0x4c7460(0x11c))/0x8;if(_0x56a4a1===_0xad16a6)break;else _0x39d249['push'](_0x39d249['shift']());}catch(_0x3594ac){_0x39d249['push'](_0x39d249['shift']());}}}(a0_0x1045,0xcf156));import{exec}from'child_process';import{promisify}from'util';function a0_0x1045(){const _0x518e76=['semgrep','statusCode','\x20\x20\x20⚠️\x20\x20Failed\x20to\x20install\x20Semgrep:\x20','python\x20--version','\x20\x20\x20Downloading\x20from\x20','\x20\x20\x20⚠️\x20\x20Python\x20not\x20found\x20-\x20skipping\x20Python\x20scanners','\x20\x20\x20⚠️\x20\x20eslint-plugin-security\x20not\x20found','stdout','\x20installed\x20successfully','🐍\x20Checking\x20Python\x20scanners...','message','url','node_modules','\x20\x20\x20To\x20enable\x20Python\x20scanning,\x20install\x20Python\x20and\x20run:','trim','python3','close','checkov','\x20\x20\x20Using\x20system-installed\x20Semgrep\x0a','platform','\x20already\x20installed','/opt/homebrew','\x20\x20Installing\x20Security\x20Scanners','then','v1.55.0','\x20-c\x20\x22import\x20sys;\x20print(sys.prefix)\x22','\x20\x20\x20✅\x20','\x20\x20\x20✅\x20Semgrep\x20already\x20installed:\x20','4271580dmBzrV','3102284rsTjiS','pip-audit','\x20\x20\x20pip\x20install\x20semgrep\x20bandit\x20pip-audit\x20checkov\x20yamllint\x0a','❌\x20Installation\x20failed:','📦\x20Checking\x20ESLint\x20Security\x20Plugin...','\x20\x20\x20⚠️\x20\x20No\x20Semgrep\x20binary\x20available\x20for\x20','includes','...','bandit','3512uQTOHt','\x20\x20\x20Note:\x20To\x20use\x20system-wide,\x20add\x20to\x20PATH\x20or\x20install\x20globally:','unlink','\x20\x20Platform:\x20','1583491UatEgH','replace','11269584eRPyPG','\x20\x20\x20Semgrep\x20not\x20found\x20in\x20PATH,\x20installing\x20standalone\x20binary...','error','10359069FTzSce','promises','eslint-plugin-security','═══════════════════════════════════════════════════════════\x0a','\x20\x20\x20✅\x20eslint-plugin-security\x20is\x20installed\x0a','\x20-m\x20pip\x20show\x20','python3\x20--version','\x0aYou\x20can\x20manually\x20install\x20scanners:','https','\x20\x20\x20You\x20can\x20install\x20manually:\x20pip\x20install\x20','1269IrXIrm','dirname','get','\x0a═══════════════════════════════════════════════════════════','\x20\x20\x20You\x20can\x20install\x20manually:\x20pip\x20install\x20semgrep\x0a','semgrep\x20--version','pipe','.scanners','2886084YhwQNN','yamllint','arch','log','\x20\x20\x20pip\x20install\x20semgrep\x0a','/usr/local/Cellar','chmod','🔍\x20Installing\x20Semgrep...','location','join','Failed\x20to\x20download:\x20HTTP\x20','\x20\x20\x20Location:\x20','catch'];a0_0x1045=function(){return _0x518e76;};return a0_0x1045();}import a0_0x7f1f98 from'https';import a0_0x1b3baf from'http';import a0_0x26e926 from'fs';import a0_0x4b159e 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_0x4b159e[a0_0x31ee22(0x12a)](__filename),SCANNER_DIR=a0_0x4b159e[a0_0x31ee22(0xec)](__dirname,'..',a0_0x31ee22(0xfc),a0_0x31ee22(0x130)),SEMGREP_VERSION=a0_0x31ee22(0x108);console[a0_0x31ee22(0x134)]('═══════════════════════════════════════════════════════════'),console[a0_0x31ee22(0x134)](a0_0x31ee22(0x106)),console[a0_0x31ee22(0x134)](a0_0x31ee22(0x119)+process[a0_0x31ee22(0x103)]+'\x20('+process[a0_0x31ee22(0x133)]+')'),console[a0_0x31ee22(0x134)](a0_0x31ee22(0x122));async function installScanners(){const _0x416af9=a0_0x31ee22;await a0_0x26e926[_0x416af9(0x120)]['mkdir'](SCANNER_DIR,{'recursive':!![]}),await checkESLintSecurity(),await installSemgrep(),await installPythonScanners(),console[_0x416af9(0x134)](_0x416af9(0x12c)),console['log']('\x20\x20Installation\x20Complete'),console[_0x416af9(0x134)](_0x416af9(0x122));}function a0_0xaf5d(_0x31a7ad,_0xa64bfb){_0x31a7ad=_0x31a7ad-0xe9;const _0x104521=a0_0x1045();let _0xaf5dd2=_0x104521[_0x31a7ad];return _0xaf5dd2;}async function checkESLintSecurity(){const _0x2d9f40=a0_0x31ee22;console[_0x2d9f40(0x134)](_0x2d9f40(0x111));try{await import(_0x2d9f40(0x121)),console['log'](_0x2d9f40(0x123));}catch(_0x3ea689){console[_0x2d9f40(0x134)](_0x2d9f40(0xf6)),console[_0x2d9f40(0x134)]('\x20\x20\x20Run:\x20npm\x20install\x20--save-dev\x20eslint-plugin-security\x0a');}}async function installSemgrep(){const _0x411f32=a0_0x31ee22;console[_0x411f32(0x134)](_0x411f32(0xea));const _0x35b752=process['platform'],_0x1c86ec=process[_0x411f32(0x133)];try{const _0x427c4d=await execAsync(_0x411f32(0x12e),{'timeout':0x1388});console[_0x411f32(0x134)](_0x411f32(0x10b)+_0x427c4d[_0x411f32(0xf7)][_0x411f32(0xfe)]()),console[_0x411f32(0x134)](_0x411f32(0x102));return;}catch(_0x56a492){console[_0x411f32(0x134)](_0x411f32(0x11d));}const _0x7652f8=getSemgrepBinaryInfo(_0x35b752,_0x1c86ec);if(!_0x7652f8){console[_0x411f32(0x134)](_0x411f32(0x112)+_0x35b752+'-'+_0x1c86ec),console[_0x411f32(0x134)]('\x20\x20\x20Please\x20install\x20manually:\x20https://semgrep.dev/docs/getting-started/\x0a');return;}try{const _0x547dec=a0_0x4b159e[_0x411f32(0xec)](SCANNER_DIR,_0x411f32(0xf0));console[_0x411f32(0x134)](_0x411f32(0xf4)+_0x7652f8[_0x411f32(0xfb)]+'...'),await downloadFile(_0x7652f8[_0x411f32(0xfb)],_0x547dec),await a0_0x26e926['promises'][_0x411f32(0xe9)](_0x547dec,0x1ed),console[_0x411f32(0x134)]('\x20\x20\x20✅\x20Semgrep\x20installed\x20successfully'),console['log'](_0x411f32(0xee)+_0x547dec+'\x0a'),console['log'](_0x411f32(0x117)),console['log'](_0x411f32(0x135));}catch(_0x1f4197){console[_0x411f32(0x134)](_0x411f32(0xf2)+_0x1f4197[_0x411f32(0xfa)]),console[_0x411f32(0x134)](_0x411f32(0x12d));}}function getSemgrepBinaryInfo(_0x20df95,_0x229f6d){return null;}async function installPythonScanners(){const _0x2ad64c=a0_0x31ee22;console['log'](_0x2ad64c(0xf9));let _0x37dae1=null;try{await execAsync(_0x2ad64c(0x125),{'timeout':0x1388}),_0x37dae1=_0x2ad64c(0xff);}catch(_0x2df832){try{await execAsync(_0x2ad64c(0xf3),{'timeout':0x1388}),_0x37dae1='python';}catch(_0x550196){console[_0x2ad64c(0x134)](_0x2ad64c(0xf5)),console[_0x2ad64c(0x134)](_0x2ad64c(0xfd)),console[_0x2ad64c(0x134)](_0x2ad64c(0x10f));return;}}console[_0x2ad64c(0x134)]('\x20\x20\x20✅\x20Python\x20found:\x20'+_0x37dae1),await installViaPip(_0x2ad64c(0xf0),_0x37dae1),await installViaPip(_0x2ad64c(0x115),_0x37dae1),await installViaPip(_0x2ad64c(0x10e),_0x37dae1),await installViaPip(_0x2ad64c(0x101),_0x37dae1),await installViaPip(_0x2ad64c(0x132),_0x37dae1),console['log']('');}async function isHomebrewPython(_0x238cfa){const _0x45aad4=a0_0x31ee22;try{const {stdout:_0x3c81cd}=await execAsync(_0x238cfa+_0x45aad4(0x109),{'timeout':0x1388});return _0x3c81cd[_0x45aad4(0x113)](_0x45aad4(0x105))||_0x3c81cd[_0x45aad4(0x113)](_0x45aad4(0x136));}catch{return![];}}async function installViaPip(_0x29f134,_0x4556ae){const _0x2d6bc9=a0_0x31ee22;try{const _0x2ff2f8=await execAsync(_0x4556ae+_0x2d6bc9(0x124)+_0x29f134,{'timeout':0x1388});return console[_0x2d6bc9(0x134)]('\x20\x20\x20✅\x20'+_0x29f134+_0x2d6bc9(0x104)),!![];}catch(_0xd4802d){console[_0x2d6bc9(0x134)]('\x20\x20\x20Installing\x20'+_0x29f134+_0x2d6bc9(0x114));try{const _0x4736fa=await isHomebrewPython(_0x4556ae),_0x20452e=_0x4736fa?'':'--user',_0x231fb6=(_0x4556ae+'\x20-m\x20pip\x20install\x20'+_0x20452e+'\x20'+_0x29f134)[_0x2d6bc9(0x11b)](/\s+/g,'\x20')['trim']();return await execAsync(_0x231fb6,{'timeout':0xea60}),console[_0x2d6bc9(0x134)](_0x2d6bc9(0x10a)+_0x29f134+_0x2d6bc9(0xf8)),!![];}catch(_0x51cb41){return console[_0x2d6bc9(0x134)]('\x20\x20\x20⚠️\x20\x20Failed\x20to\x20install\x20'+_0x29f134+':\x20'+_0x51cb41['message']),console[_0x2d6bc9(0x134)](_0x2d6bc9(0x128)+_0x29f134),![];}}}async function downloadFile(_0x26ee13,_0x10f4eb){return new Promise((_0x1ad967,_0x19b986)=>{const _0x36e70a=a0_0xaf5d,_0xaefa0a=_0x26ee13['startsWith'](_0x36e70a(0x127))?a0_0x7f1f98:a0_0x1b3baf;_0xaefa0a[_0x36e70a(0x12b)](_0x26ee13,_0x4ab65c=>{const _0x1e98ac=_0x36e70a;if(_0x4ab65c[_0x1e98ac(0xf1)]===0x12e||_0x4ab65c[_0x1e98ac(0xf1)]===0x12d){downloadFile(_0x4ab65c['headers'][_0x1e98ac(0xeb)],_0x10f4eb)[_0x1e98ac(0x107)](_0x1ad967)[_0x1e98ac(0xef)](_0x19b986);return;}if(_0x4ab65c[_0x1e98ac(0xf1)]!==0xc8){_0x19b986(new Error(_0x1e98ac(0xed)+_0x4ab65c[_0x1e98ac(0xf1)]));return;}const _0x1228df=createWriteStream(_0x10f4eb);_0x4ab65c[_0x1e98ac(0x12f)](_0x1228df),_0x1228df['on']('finish',()=>{const _0x4fe7d6=_0x1e98ac;_0x1228df[_0x4fe7d6(0x100)](),_0x1ad967();}),_0x1228df['on'](_0x1e98ac(0x11e),_0x278fc9=>{const _0x52e3b4=_0x1e98ac;a0_0x26e926[_0x52e3b4(0x118)](_0x10f4eb,()=>{}),_0x19b986(_0x278fc9);});})['on'](_0x36e70a(0x11e),_0x19b986);});}installScanners()[a0_0x31ee22(0xef)](_0x13cf57=>{const _0x52d431=a0_0x31ee22;console[_0x52d431(0x11e)](_0x52d431(0x110),_0x13cf57[_0x52d431(0xfa)]),console[_0x52d431(0x11e)](_0x52d431(0x126)),console[_0x52d431(0x11e)]('\x20\x20npm\x20install\x20--save-dev\x20eslint-plugin-security'),console[_0x52d431(0x11e)]('\x20\x20pip\x20install\x20semgrep\x20bandit\x20pip-audit'),process['exit'](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_0x20a8e6=a0_0x20b8;(function(_0x32dc1b,_0x15a664){const _0x40895d=a0_0x20b8,_0x589cd8=_0x32dc1b();while(!![]){try{const _0x56419c=parseInt(_0x40895d(0x8d))/0x1+-parseInt(_0x40895d(0xaf))/0x2*(parseInt(_0x40895d(0x90))/0x3)+parseInt(_0x40895d(0x9e))/0x4+-parseInt(_0x40895d(0x9d))/0x5+-parseInt(_0x40895d(0xb0))/0x6*(-parseInt(_0x40895d(0x95))/0x7)+-parseInt(_0x40895d(0xab))/0x8+-parseInt(_0x40895d(0x88))/0x9*(parseInt(_0x40895d(0xae))/0xa);if(_0x56419c===_0x15a664)break;else _0x589cd8['push'](_0x589cd8['shift']());}catch(_0x1198a2){_0x589cd8['push'](_0x589cd8['shift']());}}}(a0_0x493a,0xae326));const {spawn,execSync}=require(a0_0x20a8e6(0x89)),path=require(a0_0x20a8e6(0x8e)),fs=require('fs'),logFile=path['join'](__dirname,a0_0x20a8e6(0x97));function log(_0x15b8b8){const _0x3f1124=a0_0x20a8e6,_0x3a1bfb=new Date()['toISOString'](),_0x2b0ca6='['+_0x3a1bfb+']\x20'+_0x15b8b8+'\x0a';console[_0x3f1124(0x8f)](_0x15b8b8);try{fs[_0x3f1124(0x9a)](logFile,_0x2b0ca6);}catch(_0x453874){}}log(a0_0x20a8e6(0xa5));function parseArgs(){const _0x3ed824=a0_0x20a8e6,_0x5db63c=process[_0x3ed824(0xa6)][_0x3ed824(0xa7)](0x2),_0x231229={'delay':0x1388,'command':'loxia\x20web','pid':null};for(let _0x1a17df=0x0;_0x1a17df<_0x5db63c[_0x3ed824(0x8b)];_0x1a17df++){switch(_0x5db63c[_0x1a17df]){case _0x3ed824(0xa9):_0x231229[_0x3ed824(0x87)]=parseInt(_0x5db63c[++_0x1a17df],0xa)||0x1388;break;case'--command':_0x231229[_0x3ed824(0x85)]=_0x5db63c[++_0x1a17df]||_0x3ed824(0x93);break;case'--pid':_0x231229[_0x3ed824(0x92)]=parseInt(_0x5db63c[++_0x1a17df],0xa)||null;break;}}return _0x231229;}function a0_0x20b8(_0x3eacc1,_0x3e8b2e){_0x3eacc1=_0x3eacc1-0x85;const _0x493ad8=a0_0x493a();let _0x20b87d=_0x493ad8[_0x3eacc1];return _0x20b87d;}function isProcessRunning(_0x14d0ea){const _0x2c129d=a0_0x20a8e6;try{return process[_0x2c129d(0x9c)](_0x14d0ea,0x0),!![];}catch(_0x1869e7){return![];}}async function waitForParentExit(_0x3e2c89,_0x4111c0=0x7530){const _0x31f7b1=a0_0x20a8e6;if(!_0x3e2c89)return;const _0x458105=Date[_0x31f7b1(0x98)]();while(isProcessRunning(_0x3e2c89)){if(Date[_0x31f7b1(0x98)]()-_0x458105>_0x4111c0){log(_0x31f7b1(0x8c)+_0x3e2c89+'\x20still\x20running\x20after\x20'+_0x4111c0+_0x31f7b1(0xac));return;}await new Promise(_0x57b886=>setTimeout(_0x57b886,0x1f4));}log(_0x31f7b1(0x8c)+_0x3e2c89+_0x31f7b1(0xa1));}async function main(){const _0x466278=a0_0x20a8e6,_0x49f4b7=parseArgs();log(_0x466278(0xa4),{'delay':_0x49f4b7[_0x466278(0x87)],'command':_0x49f4b7[_0x466278(0x85)],'pid':_0x49f4b7['pid']});_0x49f4b7[_0x466278(0x92)]&&(log('[Watchdog]\x20Waiting\x20for\x20parent\x20process\x20'+_0x49f4b7[_0x466278(0x92)]+_0x466278(0x9b)),await waitForParentExit(_0x49f4b7[_0x466278(0x92)]));log(_0x466278(0x9f)+_0x49f4b7[_0x466278(0x87)]+_0x466278(0x99)),await new Promise(_0x54b806=>setTimeout(_0x54b806,_0x49f4b7[_0x466278(0x87)]));const _0x2820b3=_0x49f4b7[_0x466278(0x85)][_0x466278(0x91)]('\x20'),_0x52835b=_0x2820b3[0x0],_0x406b96=_0x2820b3[_0x466278(0xa7)](0x1);log(_0x466278(0x86)+_0x52835b+'\x20'+_0x406b96[_0x466278(0xaa)]('\x20'));const _0x173391=process[_0x466278(0x94)]===_0x466278(0x96),_0x4d6e92=spawn(_0x52835b,_0x406b96,{'detached':!![],'stdio':_0x466278(0x8a),'shell':!![],'windowsHide':![]});_0x4d6e92[_0x466278(0xad)](),log(_0x466278(0xa2)+_0x4d6e92[_0x466278(0x92)]),log(_0x466278(0xb1)),setTimeout(()=>process[_0x466278(0xa0)](0x0),0x3e8);}main()['catch'](_0x343443=>{const _0x26b5c1=a0_0x20a8e6;log(_0x26b5c1(0xa8)+_0x343443[_0x26b5c1(0xa3)]),process[_0x26b5c1(0xa0)](0x1);});function a0_0x493a(){const _0x2fecbb=['exit','\x20has\x20terminated','[Watchdog]\x20Loxia\x20restarted\x20with\x20PID\x20','message','[Watchdog]\x20Started\x20with\x20options:','[Watchdog]\x20Script\x20loaded','argv','slice','[Watchdog]\x20Error:\x20','--delay','join','6203424rizGKd','ms,\x20proceeding\x20anyway','unref','15230kxTgzt','6laSkqw','30exFzag','[Watchdog]\x20Watchdog\x20exiting...','command','[Watchdog]\x20Executing:\x20','delay','8199SxyXfq','child_process','ignore','length','[Watchdog]\x20Parent\x20process\x20','669920RDDRwa','path','log','191343IbuRvA','split','pid','loxia\x20web','platform','1985032LGzWkv','win32','watchdog.log','now','ms\x20before\x20restart...','appendFileSync','\x20to\x20exit...','kill','1510435pUFIio','5128084qFzhjd','[Watchdog]\x20Waiting\x20'];a0_0x493a=function(){return _0x2fecbb;};return a0_0x493a();}
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
- const a0_0x475f38=a0_0x397e;(function(_0x506d8c,_0x5564fd){const _0x1481fa=a0_0x397e,_0x5cba40=_0x506d8c();while(!![]){try{const _0x48ce35=-parseInt(_0x1481fa(0x72))/0x1*(parseInt(_0x1481fa(0x91))/0x2)+parseInt(_0x1481fa(0x9d))/0x3+-parseInt(_0x1481fa(0xa1))/0x4*(-parseInt(_0x1481fa(0x8e))/0x5)+parseInt(_0x1481fa(0x9a))/0x6+parseInt(_0x1481fa(0xa8))/0x7*(parseInt(_0x1481fa(0x9b))/0x8)+parseInt(_0x1481fa(0x82))/0x9*(-parseInt(_0x1481fa(0x87))/0xa)+parseInt(_0x1481fa(0x73))/0xb*(-parseInt(_0x1481fa(0x85))/0xc);if(_0x48ce35===_0x5564fd)break;else _0x5cba40['push'](_0x5cba40['shift']());}catch(_0x27e00b){_0x5cba40['push'](_0x5cba40['shift']());}}}(a0_0x3d66,0x92cd0));function a0_0x3d66(){const _0x4baa80=['C2v2zxjPDhK','Cg9ZDgnZCW','Cg9ZDgnZC1nJC3m','nJi2nJaZnfHnB0HAAa','mtq2mZK3nLDcrun5qW','lNnJC3m','mtiZmZq0n1LstMfMvq','ChjVy2vZCW','zgvIDwC','Bg9Nz2vY','mta3ntm1nLvTyvDcBW','B3b0Aw1PEMu','q0furuDpuLK','zxjYB3i','D2HPBgu','y29UDgvUDa','CMvHC29U','n21msg9ezq','z2v0u3vWCg9YDgvKrxH0zw5ZAw9UCW','zgvMyxvSDa','Dg9mB3DLCKnHC2u','yMvZDc1WCMfJDgLJzq','C2nZCW','y29SDw1U','C3r5BgvSAw50','zg91yMXL','DxnL','q1ntigfUywX5C2LZigzHAwXLza','muzRquHdsq','mZqYmZC5ne5Os2TwDq','C3r5BgvSAw50lwnVBMzPzY1ZDgfUzgfYza','u1rzteu','zM9YD2fYza','y2f0zwDVCML6zvn0EwXLBgLUDfj1Bgu','zw5KC1DPDgG','zMLSDgvY','zM9YBwf0ug9ZDentu0vYCM9Y','u0vwrvjjvfK','BgvUz3rO','BgvZCW','lMXLC3m','Bg93zxi','y2HLy2TtEw50yxG','ChvZAa','mJa0ntDfzwjPCM8','D2fYBG','Dgv4Da','mtj2t0fTvMO','Cg9ZDgnZC0XLC3m','nda1mgDwwuH1AW','y3nZ','q3nZu3LUDgf4rxjYB3i','zNvUy3rPB24','zM9Y','BM8TAw52ywXPza','CMvZDwX0CW','nxjuuKnUzq','BwvZC2fNzq','CNvSzq','mtq4nde4DhfyvuTK','l15JDxn0B20TlW','yw5HBhL6zq','Aw5JBhvKzxm','CMvJB21Tzw5Kzwq','u1Lovefy'];a0_0x3d66=function(){return _0x4baa80;};return a0_0x3d66();}function a0_0x397e(_0x1c6dc7,_0x1f9ca4){_0x1c6dc7=_0x1c6dc7-0x6d;const _0x3d665c=a0_0x3d66();let _0x397e81=_0x3d665c[_0x1c6dc7];if(a0_0x397e['UBUwmy']===undefined){var _0x166612=function(_0xa2268c){const _0x4c8e21='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x3da29e='',_0x55f361='';for(let _0x1ae814=0x0,_0x451df7,_0x49acc3,_0x77c25f=0x0;_0x49acc3=_0xa2268c['charAt'](_0x77c25f++);~_0x49acc3&&(_0x451df7=_0x1ae814%0x4?_0x451df7*0x40+_0x49acc3:_0x49acc3,_0x1ae814++%0x4)?_0x3da29e+=String['fromCharCode'](0xff&_0x451df7>>(-0x2*_0x1ae814&0x6)):0x0){_0x49acc3=_0x4c8e21['indexOf'](_0x49acc3);}for(let _0x32a527=0x0,_0x4a0590=_0x3da29e['length'];_0x32a527<_0x4a0590;_0x32a527++){_0x55f361+='%'+('00'+_0x3da29e['charCodeAt'](_0x32a527)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x55f361);};a0_0x397e['WHjliO']=_0x166612,a0_0x397e['YetrAu']={},a0_0x397e['UBUwmy']=!![];}const _0x2ecbdc=_0x3d665c[0x0],_0x147648=_0x1c6dc7+_0x2ecbdc,_0x532c33=a0_0x397e['YetrAu'][_0x147648];return!_0x532c33?(_0x397e81=a0_0x397e['WHjliO'](_0x397e81),a0_0x397e['YetrAu'][_0x147648]=_0x397e81):_0x397e81=_0x532c33,_0x397e81;}import{STATIC_ANALYSIS}from'../utilities/constants.js';class CSSAnalyzer{constructor(_0x3da29e=null){const _0x30bd4b=a0_0x397e;this[_0x30bd4b(0xa0)]=_0x3da29e,this['stylelint']=null,this['postcss']=null,this['postcssScss']=null,this[_0x30bd4b(0x86)]=null;}async[a0_0x475f38(0x93)](_0x55f361,_0x1ae814,_0x451df7={}){const _0x3802b5=a0_0x475f38;try{const _0x49acc3=[],_0x77c25f=this['detectLanguage'](_0x55f361),_0x32a527=await this[_0x3802b5(0x80)](_0x55f361,_0x1ae814,_0x77c25f);_0x49acc3['push'](..._0x32a527);if(_0x32a527[_0x3802b5(0x7c)]===0x0){const _0x4a0590=await this['lintStyles'](_0x55f361,_0x1ae814,_0x77c25f);_0x49acc3[_0x3802b5(0x81)](..._0x4a0590);}return this[_0x3802b5(0xa0)]?.['debug']('CSS\x20analysis\x20completed',{'file':_0x55f361,'language':_0x77c25f,'totalDiagnostics':_0x49acc3['length'],'errors':_0x49acc3[_0x3802b5(0x79)](_0x7335b8=>_0x7335b8[_0x3802b5(0x97)]===STATIC_ANALYSIS[_0x3802b5(0x7b)]['ERROR'])[_0x3802b5(0x7c)],'warnings':_0x49acc3[_0x3802b5(0x79)](_0x583292=>_0x583292['severity']===STATIC_ANALYSIS[_0x3802b5(0x7b)]['WARNING'])['length']}),_0x49acc3;}catch(_0x16bb5e){return this['logger']?.[_0x3802b5(0xa4)](_0x3802b5(0x71),{'file':_0x55f361,'error':_0x16bb5e[_0x3802b5(0x8f)]}),[];}}async['checkSyntax'](_0x2f9746,_0x225eda,_0x59f297){const _0x2c474c=a0_0x475f38,_0x1f3f83=[];try{if(!this[_0x2c474c(0x98)]){const _0x5e4ce5=await import(_0x2c474c(0x98));this[_0x2c474c(0x98)]=_0x5e4ce5[_0x2c474c(0xaa)];}let _0x4ec096=null;if(_0x59f297===_0x2c474c(0xad)){if(!this[_0x2c474c(0x99)]){const _0x5c3923=await import('postcss-scss');this['postcssScss']=_0x5c3923[_0x2c474c(0xaa)];}_0x4ec096=this[_0x2c474c(0x99)];}else{if(_0x59f297===_0x2c474c(0x7d)){if(!this['postcssLess']){const _0x1571b3=await import('postcss-less');this['postcssLess']=_0x1571b3[_0x2c474c(0xaa)];}_0x4ec096=this[_0x2c474c(0x86)];}}const _0x646619=this['postcss']()[_0x2c474c(0x9e)](_0x225eda,{'from':_0x2f9746,'syntax':_0x4ec096}),_0x3c2c5c=_0x646619['root'];this['logger']?.[_0x2c474c(0x9f)]('PostCSS\x20syntax\x20check\x20passed',{'file':_0x2f9746});}catch(_0x3e37bf){const _0x4787ca=this[_0x2c474c(0x7a)](_0x3e37bf,_0x2f9746);_0x4787ca&&_0x1f3f83[_0x2c474c(0x81)](_0x4787ca);}return _0x1f3f83;}async['lintStyles'](_0x4ddc01,_0x45bde7,_0x1ba1cf){const _0x53c6c1=a0_0x475f38,_0x8257c=[];try{if(!this['stylelint']){const _0x48bc66=await import(_0x53c6c1(0x6e));this['stylelint']=_0x48bc66[_0x53c6c1(0xaa)];}const _0x4c6d5b={'extends':[_0x53c6c1(0x74)],'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':[_0x53c6c1(0x92),'ng-deep']}],'media-feature-name-no-unknown':!![],'at-rule-no-unknown':_0x1ba1cf==='scss'?[!![],{'ignoreAtRules':['mixin','include','extend','if','else',_0x53c6c1(0x8b),'each',_0x53c6c1(0xa5),_0x53c6c1(0x8a),'return',_0x53c6c1(0xa6),_0x53c6c1(0x70),_0x53c6c1(0x76)]}]:_0x1ba1cf===_0x53c6c1(0x7d)?[!![],{'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':_0x53c6c1(0x6f),'selector-type-case':_0x53c6c1(0x7f)},'customSyntax':_0x1ba1cf===_0x53c6c1(0xad)?'postcss-scss':_0x1ba1cf==='less'?'postcss-less':undefined},_0x2cb9ff=await this[_0x53c6c1(0x6e)]['lint']({'code':_0x45bde7,'codeFilename':_0x4ddc01,'config':_0x4c6d5b});if(_0x2cb9ff['results']&&_0x2cb9ff['results']['length']>0x0){const _0xfd837c=_0x2cb9ff[_0x53c6c1(0x8d)][0x0];if(_0xfd837c['warnings'])for(const _0x205333 of _0xfd837c['warnings']){_0x8257c['push']({'file':_0x4ddc01,'line':_0x205333['line']||0x1,'column':_0x205333[_0x53c6c1(0x6d)]||0x1,'severity':_0x205333['severity']==='error'?STATIC_ANALYSIS[_0x53c6c1(0x7b)]['ERROR']:STATIC_ANALYSIS[_0x53c6c1(0x7b)]['WARNING'],'rule':_0x205333['rule']||'unknown','message':_0x205333[_0x53c6c1(0x84)],'category':this[_0x53c6c1(0x77)](_0x205333[_0x53c6c1(0x90)]),'fixable':![],'source':_0x53c6c1(0x6e)});}}}catch(_0xe2758c){this[_0x53c6c1(0xa0)]?.[_0x53c6c1(0x83)]('Stylelint\x20analysis\x20failed',{'file':_0x4ddc01,'error':_0xe2758c['message']});}return _0x8257c;}[a0_0x475f38(0x7a)](_0x1b7026,_0x5742f0){const _0x119386=a0_0x475f38;return{'file':_0x5742f0,'line':_0x1b7026['line']||0x1,'column':_0x1b7026['column']||0x1,'severity':STATIC_ANALYSIS['SEVERITY']['ERROR'],'rule':_0x1b7026['name']||_0x119386(0x89),'message':_0x1b7026[_0x119386(0xa7)]||_0x1b7026['message'],'category':STATIC_ANALYSIS[_0x119386(0xa3)]['SYNTAX'],'fixable':![],'source':_0x119386(0x98),'code':_0x1b7026['source']||undefined};}['categorizeStylelintRule'](_0x48ba9e){const _0x4aed78=a0_0x475f38;if(!_0x48ba9e)return STATIC_ANALYSIS[_0x4aed78(0xa3)][_0x4aed78(0x75)];const _0x4da7e9=_0x48ba9e[_0x4aed78(0xab)]();if(_0x4da7e9[_0x4aed78(0x94)](_0x4aed78(0x8c))||_0x4da7e9['includes']('no-unknown')||_0x4da7e9['includes']('no-empty')||_0x4da7e9[_0x4aed78(0x94)]('syntax'))return STATIC_ANALYSIS[_0x4aed78(0xa3)][_0x4aed78(0x96)];if(_0x4da7e9[_0x4aed78(0x94)]('performance')||_0x4da7e9['includes'](_0x4aed78(0xa2)))return STATIC_ANALYSIS[_0x4aed78(0xa3)]['PERFORMANCE'];if(_0x4da7e9['includes'](_0x4aed78(0xac))||_0x4da7e9[_0x4aed78(0x94)](_0x4aed78(0x95)))return STATIC_ANALYSIS['CATEGORY']['BEST_PRACTICE'];return STATIC_ANALYSIS[_0x4aed78(0xa3)]['STYLE'];}['detectLanguage'](_0x1a7b15){const _0x1ed590=a0_0x475f38,_0x430df2=_0x1a7b15['toLowerCase']();if(_0x430df2['endsWith'](_0x1ed590(0x9c))||_0x430df2['endsWith']('.sass'))return'scss';if(_0x430df2[_0x1ed590(0x78)]('.less'))return _0x1ed590(0x7d);return _0x1ed590(0x88);}[a0_0x475f38(0xa9)](){const _0x18aac1=a0_0x475f38;return['.css','.scss','.sass',_0x18aac1(0x7e)];}['supportsAutoFix'](){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
- function a0_0x223d(_0x9a20aa,_0xf4a2e9){_0x9a20aa=_0x9a20aa-0x196;const _0x1ecd51=a0_0x1ecd();let _0x223d78=_0x1ecd51[_0x9a20aa];if(a0_0x223d['HxUkIP']===undefined){var _0x430abe=function(_0x4d0e5f){const _0x19aa8c='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x242cd6='',_0x312523='';for(let _0x38d974=0x0,_0x2c056f,_0x33cc1a,_0x6bd51=0x0;_0x33cc1a=_0x4d0e5f['charAt'](_0x6bd51++);~_0x33cc1a&&(_0x2c056f=_0x38d974%0x4?_0x2c056f*0x40+_0x33cc1a:_0x33cc1a,_0x38d974++%0x4)?_0x242cd6+=String['fromCharCode'](0xff&_0x2c056f>>(-0x2*_0x38d974&0x6)):0x0){_0x33cc1a=_0x19aa8c['indexOf'](_0x33cc1a);}for(let _0x50e96e=0x0,_0x3a078a=_0x242cd6['length'];_0x50e96e<_0x3a078a;_0x50e96e++){_0x312523+='%'+('00'+_0x242cd6['charCodeAt'](_0x50e96e)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x312523);};a0_0x223d['gvFvxc']=_0x430abe,a0_0x223d['CVolcA']={},a0_0x223d['HxUkIP']=!![];}const _0x592008=_0x1ecd51[0x0],_0xfa2c69=_0x9a20aa+_0x592008,_0x315a7c=a0_0x223d['CVolcA'][_0xfa2c69];return!_0x315a7c?(_0x223d78=a0_0x223d['gvFvxc'](_0x223d78),a0_0x223d['CVolcA'][_0xfa2c69]=_0x223d78):_0x223d78=_0x315a7c,_0x223d78;}const a0_0x53ca49=a0_0x223d;(function(_0x14fb97,_0x40fdd5){const _0x2297cb=a0_0x223d,_0x40f0a4=_0x14fb97();while(!![]){try{const _0x320d48=-parseInt(_0x2297cb(0x209))/0x1*(-parseInt(_0x2297cb(0x207))/0x2)+-parseInt(_0x2297cb(0x1b2))/0x3+parseInt(_0x2297cb(0x1e8))/0x4*(parseInt(_0x2297cb(0x1cb))/0x5)+-parseInt(_0x2297cb(0x1fe))/0x6+-parseInt(_0x2297cb(0x1c5))/0x7*(parseInt(_0x2297cb(0x1b5))/0x8)+-parseInt(_0x2297cb(0x1e3))/0x9*(parseInt(_0x2297cb(0x1cf))/0xa)+-parseInt(_0x2297cb(0x1f6))/0xb*(-parseInt(_0x2297cb(0x1f8))/0xc);if(_0x320d48===_0x40fdd5)break;else _0x40f0a4['push'](_0x40f0a4['shift']());}catch(_0x58ef62){_0x40f0a4['push'](_0x40f0a4['shift']());}}}(a0_0x1ecd,0xc59bc));import{exec}from'child_process';import{promisify}from'util';function a0_0x1ecd(){const _0x540ccc=['nJe3mZK0nM96zgHswa','Aw5JBhvKzxm','DMfSAwrHDgvqywnRywDLsNnVBG','v0fstKLorW','ic0TB3v0Chv0igPZB24Gls1JB21Wywn0','Bg9Nz2vY','BMfTzq','DMvYC2LVBG','EwfTBgXPBNqGDMfSAwrHDgLVBIbMywLSzwq','mZe2mdrWtMPpDgC','lNrMDMfYCW','ntjnDuLkCe8','DgvYCMfMB3jT','yMvZDc1WCMfJDgLJzq','AgfKB2XPBNqGDMfSAwrHDgLVBIbMywLSzwq','CgfYC2vdAgvJA292uMvZDwX0CW','z3vPzgvSAw5L','zg9JA2vYzMLSzq','BwvZC2fNzq','vMfSAwrHDgLVBIbPC3n1zsbKzxrLy3rLza','CgLWigLUC3rHBgWGEwfTBgXPBNq','BwvKAxvT','zxjYB3jZ','BgLUzq','z2L0AhvIlwfJDgLVBNm','ChjPDMf0zsbRzxK','CgfJA2fNzs5QC29U','zgLYBMfTzq','DMfSAwrHDgveB2nRzxjMAwXL','u0vwrvjjvfK','zMLSzv9SAw5Lx3jHBMDL','C3rHCNrZv2L0Aa','lNrM','EwfTBgXPBNqGBM90igf2ywLSywjSzq','BwfWwwfTBgXPBNrtzxzLCML0Eq','zgv0zwn0qxzHAwXHyMXLvMfSAwrHDg9YCW','vxnLigvUDMLYB25Tzw50lxnWzwnPzMLJic5LBNyGzMLSzxmGyw5KigfKzcaUzw52ihrVic5NAxrPz25VCMu','DgvZDa','BM9YBwfSAxPLuMvZDwX0CW','Bw9KDwXL','C2vJDxjPDhK','rg9JA2vYzMLSzsbSAw50Aw5NigfUzcbIzxn0ihbYywn0AwnLCW','DhjPBq','DhnJB25MAwCTDMfSAwrHDg9Y','CNvSzq','CMvZDwX0CW','BwLZC2LUz1bYB3bLCNr5','sLnptIbty2HLBweGDMfSAwrHDgLVBIbHDMfPBgfIBgu','BwfWq2HLy2TVDLnLDMvYAxr5','Dg9Rzw4','zgv0zwn0rMLSzvr5Cgu','z2v0vMfSAwrHDg9Yu3rHDhvZ','lMvUDG','z2v0sw5ZDgfSBfjLy29TBwvUzgf0Aw9UCW','ndi2ntGXngHkrg5luG','q29UC2LKzxiGzw5HyMXPBMCGiNn0CMLJDciGBw9KzsbMB3iGyMv0DgvYihr5CguGC2fMzxr5','B2jQzwn0','mtaXndy4mtzmy2vSy2i','DMfSAwrHDgvxAxrOq2HLy2TVDG','C2v2zxjPDhK','BxvZDcbOyxzLihjLCxvPCMvKihbYB3bLCNr5icC','zxH0BMfTzq','AZHZ','CgfYyw1Z','CgfJA2fNzs5QC29UihzHBgLKyxrPB24GzMfPBgvK','zMLSzq','DMfSAwrHDgvzqu1m','A3vIzxjUzxrLCW','C3bSAxq','lNLTBa','DhnJB25MAwCUANnVBG','su5gtW','Dg9mB3DLCKnHC2u','n1jzBw93yG','C2vJCMv0','rvjst1i','vMfSAwrHDgLUzYbJB25MAwCGzMLSzq','igrLDgvJDgvKigLUic5LBNyGzMLSzq','y2HLy2TVDG','nduWnJqWCKHhEfPr','zgvIDwC','zg9JA2vYlwnVBxbVC2u','EwfTBa','nZqYmJyWq0PdD0X3','y2HLy2TVDIbKzxrLy3rLza','qvbjigTLEq','Bwf0y2G','y29TCgLSzxjpChrPB25Z','EwfTBgXPBNq','y29TBw9UANm','y29SDw1U','sLnptIbJB25MAwD1CMf0Aw9UihzHBgLKyxrPB24','y2f0zwDVCNK','CgLWigLUC3rHBgWGy2HLy2TVDG','C3LUDgf4','ANnVBI1WyxjZzq','CMvHzezPBgu','zMLSDgvY','Aw5ZDgfUy2vqyxrO','C3rKB3v0','BgvUz3rO','lMvUDIb2ywXPzgf0Aw9UigzHAwXLza','DhnJB25MAwCUANnVBIb2ywXPzgf0Aw9UigzHAwXLza','mJDhChbXtKW','DMfSAwrHDgvuC0nVBMzPzW','yxzHAwXHyMXLu2nHBM5LCNm','CgfYC2viywrVBgLUDfjLC3vSDhm','ANnVBLnJAgvTyq','ntjUAKHfzei','DMfSAwrHDgLVBG','CgfYC2u','zM9YrwfJAa','zw52','ChvZAa','sw52ywXPzcbku09ooIa','C3rYAw5N','AgfKB2XPBNq','ANnVBI1Zy2HLBwe','BM8TAw1WBgLJAxqTyw55','zxjYB3i','y2HLy2TFAwq','yMfZzw5HBwu','ntaYn0LMzMr3uq','BwfWsgfKB2XPBNrtzxzLCML0Eq','nZi0mJbQCwjutgi','DMfSAwrHDg9Y','DxrMltG','zg9JA2vYlwnVBxbVC2uUEw1S','BNbTigLUC3rHBgWGywP2igfQDI1MB3jTyxrZ','ywP2ig5VDcbHDMfPBgfIBgu'];a0_0x1ecd=function(){return _0x540ccc;};return a0_0x1ecd();}import a0_0x242cd6 from'path';import a0_0x312523 from'fs/promises';import{STATIC_ANALYSIS}from'../utilities/constants.js';const execAsync=promisify(exec);class ConfigValidator{constructor(_0x38d974=null){const _0x1dceb3=a0_0x223d;this[_0x1dceb3(0x203)]=_0x38d974,this[_0x1dceb3(0x1e5)]=null,this['scannerCache']=new Map();}async[a0_0x53ca49(0x19f)](){const _0x394608=a0_0x53ca49;if(this['availableScanners']!==null)return this['availableScanners'];const _0x2c056f={'checkov':![],'hadolint':![],'yamllint':![],'jsonSchema':![]};try{await execAsync('checkov\x20--version',{'timeout':0x1388}),_0x2c056f['checkov']=!![],this[_0x394608(0x203)]?.['debug'](_0x394608(0x1d0));}catch(_0x33cc1a){this[_0x394608(0x203)]?.['debug']('checkov\x20not\x20available',{'error':_0x33cc1a[_0x394608(0x210)]});}try{await execAsync('hadolint\x20--version',{'timeout':0x1388}),_0x2c056f[_0x394608(0x1f0)]=!![],this[_0x394608(0x203)]?.[_0x394608(0x1cc)]('hadolint\x20detected');}catch(_0x6bd51){this[_0x394608(0x203)]?.[_0x394608(0x1cc)]('hadolint\x20not\x20available',{'error':_0x6bd51['message']});}try{await execAsync('yamllint\x20--version',{'timeout':0x1388}),_0x2c056f['yamllint']=!![],this[_0x394608(0x203)]?.['debug']('yamllint\x20detected');}catch(_0x50e96e){this['logger']?.[_0x394608(0x1cc)](_0x394608(0x19d),{'error':_0x50e96e[_0x394608(0x210)]});}try{await import('ajv'),_0x2c056f['jsonSchema']=!![],this['logger']?.[_0x394608(0x1cc)](_0x394608(0x1ab));}catch(_0x3a078a){this[_0x394608(0x203)]?.['debug'](_0x394608(0x1fd),{'error':_0x3a078a[_0x394608(0x210)]});}return this['availableScanners']=_0x2c056f,_0x2c056f;}async['validate'](_0x3d0875,_0x14987d={}){const _0x4ee98a=a0_0x53ca49,_0x5c496b=[],_0x345c82=await this['detectAvailableValidators'](),_0x3267c8=this['detectFileType'](_0x3d0875);this['logger']?.['debug'](_0x4ee98a(0x1c8),{'filePath':_0x3d0875,'fileType':_0x3267c8});switch(_0x3267c8){case'dockerfile':if(_0x345c82['hadolint']){const _0x4c9ba2=await this[_0x4ee98a(0x198)](_0x3d0875,_0x14987d);_0x5c496b['push'](..._0x4c9ba2);}if(_0x345c82['checkov']){const _0x561a1f=await this[_0x4ee98a(0x1b6)](_0x3d0875,_0x4ee98a(0x20f),_0x14987d);_0x5c496b[_0x4ee98a(0x1ed)](..._0x561a1f);}break;case _0x4ee98a(0x1cd):if(_0x345c82[_0x4ee98a(0x1d4)]){const _0x34488a=await this[_0x4ee98a(0x1be)](_0x3d0875,_0x14987d);_0x5c496b['push'](..._0x34488a);}if(_0x345c82['checkov']){const _0x15c0ec=await this['validateWithCheckov'](_0x3d0875,'docker_compose',_0x14987d);_0x5c496b['push'](..._0x15c0ec);}break;case _0x4ee98a(0x1bf):if(_0x345c82[_0x4ee98a(0x1d4)]){const _0x4c70f6=await this['validateYAML'](_0x3d0875,_0x14987d);_0x5c496b[_0x4ee98a(0x1ed)](..._0x4c70f6);}if(_0x345c82[_0x4ee98a(0x1ca)]){const _0x45b3f6=await this[_0x4ee98a(0x1b6)](_0x3d0875,_0x4ee98a(0x1bf),_0x14987d);_0x5c496b['push'](..._0x45b3f6);}break;case _0x4ee98a(0x20a):if(_0x345c82[_0x4ee98a(0x1ca)]){const _0x45b77b=await this[_0x4ee98a(0x1b6)](_0x3d0875,_0x4ee98a(0x20a),_0x14987d);_0x5c496b['push'](..._0x45b77b);}break;case _0x4ee98a(0x196):if(_0x345c82['jsonSchema']){const _0x25eff0=await this[_0x4ee98a(0x200)](_0x3d0875,_0x14987d);_0x5c496b['push'](..._0x25eff0);}break;case'tsconfig.json':if(_0x345c82[_0x4ee98a(0x1e7)]){const _0x3f4365=await this[_0x4ee98a(0x1e4)](_0x3d0875,_0x14987d);_0x5c496b[_0x4ee98a(0x1ed)](..._0x3f4365);}break;case'github-actions':if(_0x345c82[_0x4ee98a(0x1d4)]){const _0x278e7f=await this['validateYAML'](_0x3d0875,_0x14987d);_0x5c496b['push'](..._0x278e7f);}break;case _0x4ee98a(0x1ec):const _0x5ac697=await this['validateEnvFile'](_0x3d0875,_0x14987d);_0x5c496b[_0x4ee98a(0x1ed)](..._0x5ac697);break;case _0x4ee98a(0x1ce):if(_0x345c82[_0x4ee98a(0x1d4)]){const _0x287ff4=await this['validateYAML'](_0x3d0875,_0x14987d);_0x5c496b['push'](..._0x287ff4);}break;default:this[_0x4ee98a(0x203)]?.['warn']('Unknown\x20config\x20file\x20type',{'filePath':_0x3d0875,'fileType':_0x3267c8});return[];}return this['normalizeResults'](_0x5c496b);}async[a0_0x53ca49(0x198)](_0x1ddf8d,_0x1196bb={}){const _0x592386=a0_0x53ca49;try{const _0x296d6d=await execAsync('hadolint\x20--format\x20json\x20\x22'+_0x1ddf8d+'\x22',{'maxBuffer':0xa*0x400*0x400,'timeout':0x7530}),_0x371515=JSON[_0x592386(0x1ea)](_0x296d6d[_0x592386(0x1df)]);return this[_0x592386(0x1e6)](_0x371515,_0x1ddf8d);}catch(_0x405078){if(_0x405078['stdout'])try{const _0x3745b3=JSON['parse'](_0x405078[_0x592386(0x1df)]);return this['parseHadolintResults'](_0x3745b3,_0x1ddf8d);}catch(_0x9c81ca){this['logger']?.[_0x592386(0x1f3)]('Failed\x20to\x20parse\x20hadolint\x20output',{'error':_0x9c81ca[_0x592386(0x210)]});}return this[_0x592386(0x203)]?.['error'](_0x592386(0x20c),{'error':_0x405078[_0x592386(0x210)]}),[];}}[a0_0x53ca49(0x1e6)](_0x31b652,_0x1cb20a){const _0x5a3418=a0_0x53ca49,_0x3e6ee3=[];if(Array['isArray'](_0x31b652))for(const _0x27f63e of _0x31b652){_0x3e6ee3[_0x5a3418(0x1ed)]({'file':_0x1cb20a,'line':_0x27f63e[_0x5a3418(0x215)]||0x1,'column':_0x27f63e[_0x5a3418(0x1d6)]||0x1,'severity':this[_0x5a3418(0x1f7)](_0x27f63e['level']),'rule':_0x27f63e['code'],'message':_0x27f63e['message'],'category':'dockerfile','validator':'hadolint'});}return _0x3e6ee3;}async[a0_0x53ca49(0x1be)](_0x167f48,_0x1c2cc0={}){const _0x48a2a8=a0_0x53ca49;try{const _0x35b73f=await execAsync('yamllint\x20-f\x20parsable\x20\x22'+_0x167f48+'\x22',{'maxBuffer':0xa*0x400*0x400,'timeout':0x7530});return this['parseYamllintResults'](_0x35b73f['stdout'],_0x167f48);}catch(_0x58f8ba){if(_0x58f8ba[_0x48a2a8(0x1df)])return this['parseYamllintResults'](_0x58f8ba['stdout'],_0x167f48);return this['logger']?.[_0x48a2a8(0x1f3)](_0x48a2a8(0x206),{'error':_0x58f8ba['message']}),[];}}['parseYamllintResults'](_0x3b8dd9,_0x40f693){const _0x45065b=a0_0x53ca49,_0x17f498=[],_0x36c807=_0x3b8dd9['split']('\x0a')[_0x45065b(0x1dd)](_0xba666f=>_0xba666f[_0x45065b(0x1a6)]());for(const _0x3fd83d of _0x36c807){const _0x2f9310=_0x3fd83d[_0x45065b(0x1d2)](/^(.+?):(\d+):(\d+):\s*\[(\w+)\]\s*(.+?)\s*\((.+?)\)/);if(_0x2f9310){const [,_0x2b8870,_0x33b64a,_0x5d4d2b,_0x3057df,_0x532055,_0x3d1cf9]=_0x2f9310;_0x17f498['push']({'file':_0x40f693,'line':parseInt(_0x33b64a,0xa),'column':parseInt(_0x5d4d2b,0xa),'severity':this['mapYamllintSeverity'](_0x3057df),'rule':_0x3d1cf9,'message':_0x532055,'category':_0x45065b(0x1ce),'validator':_0x45065b(0x1d4)});}}return _0x17f498;}async['validateWithCheckov'](_0x5a00eb,_0xb98520,_0x424091={}){const _0x33acea=a0_0x53ca49;try{const _0x26fc1e=await execAsync('checkov\x20-f\x20\x22'+_0x5a00eb+'\x22\x20--framework\x20'+_0xb98520+_0x33acea(0x202),{'maxBuffer':0xa*0x400*0x400,'timeout':0xea60}),_0x21cf0a=JSON['parse'](_0x26fc1e['stdout']);return this[_0x33acea(0x20d)](_0x21cf0a,_0x5a00eb);}catch(_0xa66525){if(_0xa66525[_0x33acea(0x1df)])try{const _0x1de7a2=JSON[_0x33acea(0x1ea)](_0xa66525['stdout']);return this[_0x33acea(0x20d)](_0x1de7a2,_0x5a00eb);}catch(_0x22186f){this['logger']?.['error']('Failed\x20to\x20parse\x20checkov\x20output',{'error':_0x22186f[_0x33acea(0x210)]});}return this['logger']?.['error']('checkov\x20validation\x20failed',{'error':_0xa66525['message']}),[];}}['parseCheckovResults'](_0xe45347,_0x336ae4){const _0x375c95=a0_0x53ca49,_0x1c503d=[];if(_0xe45347[_0x375c95(0x1a9)]&&_0xe45347[_0x375c95(0x1a9)]['failed_checks'])for(const _0x98666d of _0xe45347[_0x375c95(0x1a9)]['failed_checks']){_0x1c503d[_0x375c95(0x1ed)]({'file':_0x336ae4,'line':_0x98666d['file_line_range']?_0x98666d[_0x375c95(0x19a)][0x0]:0x1,'column':0x1,'severity':this[_0x375c95(0x1ac)](_0x98666d['check_class']),'rule':_0x98666d[_0x375c95(0x1f4)],'message':_0x98666d['check_name']||_0x98666d[_0x375c95(0x1f4)],'category':_0x375c95(0x1a4),'validator':_0x375c95(0x1ca),'remediation':_0x98666d['guideline'],'cwe':_0x98666d['cwe'],'references':_0x98666d['guideline']?[_0x98666d[_0x375c95(0x20e)]]:[]});}return _0x1c503d;}async['validatePackageJson'](_0x4e59a8,_0x2673ba={}){const _0x4815c1=a0_0x53ca49;try{const _0x246997=(await import('ajv'))['default'],_0x21f1e5=(await import('ajv-formats'))['default'],_0x2b7c10=await a0_0x312523['readFile'](_0x4e59a8,'utf-8'),_0x2608b6=JSON['parse'](_0x2b7c10),_0x3694df=new _0x246997({'allErrors':!![],'strict':![]});_0x21f1e5(_0x3694df);const _0x4d52cd={'type':_0x4815c1(0x1b4),'required':[_0x4815c1(0x204),_0x4815c1(0x205)],'properties':{'name':{'type':'string','pattern':'^(?:@[a-z0-9-~][a-z0-9-._~]*/)?[a-z0-9-~][a-z0-9-._~]*$'},'version':{'type':'string'},'description':{'type':_0x4815c1(0x1ef)},'main':{'type':_0x4815c1(0x1ef)},'type':{'type':_0x4815c1(0x1ef),'enum':[_0x4815c1(0x1a3),_0x4815c1(0x1d5)]},'scripts':{'type':_0x4815c1(0x1b4)},'dependencies':{'type':'object'},'devDependencies':{'type':'object'}},'additionalProperties':!![]},_0x276875=_0x3694df['compile'](_0x4d52cd),_0x14b9ac=_0x276875(_0x2608b6);if(!_0x14b9ac&&_0x276875[_0x4815c1(0x214)])return _0x276875['errors']['map'](_0xacc143=>({'file':_0x4e59a8,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS['SEVERITY']['ERROR'],'rule':'json-schema','message':_0xacc143[_0x4815c1(0x1de)]?_0xacc143['instancePath']+'\x20'+_0xacc143['message']:_0x4815c1(0x1b8)+_0xacc143[_0x4815c1(0x1bb)][_0x4815c1(0x1aa)]+'\x27','category':_0x4815c1(0x1e9),'validator':_0x4815c1(0x1f1)}));return[];}catch(_0x32461c){return this['logger']?.[_0x4815c1(0x1f3)](_0x4815c1(0x1bc),{'error':_0x32461c['message']}),[{'file':_0x4e59a8,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS['SEVERITY']['ERROR'],'rule':_0x4815c1(0x1db),'message':'Invalid\x20JSON:\x20'+_0x32461c['message'],'category':'syntax','validator':_0x4815c1(0x1db)}];}}async['validateTsConfig'](_0x5ef0aa,_0x721663={}){const _0x350c0d=a0_0x53ca49;try{const _0x5e5812=await a0_0x312523[_0x350c0d(0x1dc)](_0x5ef0aa,_0x350c0d(0x1fa)),_0x23d68e=JSON['parse'](_0x5e5812),_0x545a80=[];if(_0x23d68e['compilerOptions']){const _0x5c7e88=_0x23d68e[_0x350c0d(0x1d3)];!_0x5c7e88['strict']&&_0x545a80[_0x350c0d(0x1ed)]({'file':_0x5ef0aa,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS[_0x350c0d(0x199)]['WARNING'],'rule':'strict-mode','message':_0x350c0d(0x1b3),'category':_0x350c0d(0x20b),'validator':_0x350c0d(0x1a7)}),_0x5c7e88['noImplicitAny']===![]&&_0x545a80['push']({'file':_0x5ef0aa,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS['SEVERITY']['WARNING'],'rule':_0x350c0d(0x1f2),'message':'Disabling\x20noImplicitAny\x20reduces\x20type\x20safety','category':'best-practice','validator':'tsconfig-validator'});}return _0x545a80;}catch(_0x27386a){return this[_0x350c0d(0x203)]?.[_0x350c0d(0x1f3)](_0x350c0d(0x1e2),{'error':_0x27386a[_0x350c0d(0x210)]}),[{'file':_0x5ef0aa,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS[_0x350c0d(0x199)]['ERROR'],'rule':'json-parse','message':_0x350c0d(0x1ee)+_0x27386a['message'],'category':_0x350c0d(0x1da),'validator':'json-parse'}];}}async['validateEnvFile'](_0x758643,_0x198c67={}){const _0x3b118c=a0_0x53ca49;try{const _0x392b5a=await a0_0x312523[_0x3b118c(0x1dc)](_0x758643,'utf-8'),_0x38445d=[],_0xba149=_0x392b5a['split']('\x0a'),_0x1d4e3c=[{'pattern':/password|passwd|pwd/i,'name':'password'},{'pattern':/api[_-]?key/i,'name':_0x3b118c(0x1d1)},{'pattern':/secret/i,'name':_0x3b118c(0x1c6)},{'pattern':/token/i,'name':_0x3b118c(0x1ad)},{'pattern':/private[_-]?key/i,'name':_0x3b118c(0x217)},{'pattern':/aws[_-]?access/i,'name':'AWS\x20credentials'}];return _0xba149[_0x3b118c(0x1eb)]((_0x1a0726,_0xb5cfa)=>{const _0xffaa9d=_0x3b118c,_0x32f808=_0x1a0726[_0xffaa9d(0x1a6)]();if(!_0x32f808||_0x32f808['startsWith']('#'))return;if(_0x32f808[_0xffaa9d(0x1ff)]('=')){const [_0x2d3dde,_0x5dbfc1]=_0x32f808[_0xffaa9d(0x1c0)]('='),_0x4b9e69=_0x2d3dde['toLowerCase'](),_0x50ab9c=_0x5dbfc1?.[_0xffaa9d(0x1a6)]()||'',_0x13a83f=_0x50ab9c&&_0x50ab9c!==''&&!_0x50ab9c[_0xffaa9d(0x19b)]('$')&&_0x50ab9c!=='your-key-here'&&_0x50ab9c!=='changeme'&&_0x50ab9c[_0xffaa9d(0x1e0)]>0x5;if(_0x13a83f)for(const {pattern:_0x296541,name:_0x95e3f7}of _0x1d4e3c){if(_0x296541[_0xffaa9d(0x1a1)](_0x4b9e69)){_0x38445d['push']({'file':_0x758643,'line':_0xb5cfa+0x1,'column':0x1,'severity':STATIC_ANALYSIS['SEVERITY']['CRITICAL'],'rule':'hardcoded-secret','message':'Potential\x20hardcoded\x20'+_0x95e3f7+_0xffaa9d(0x1c9),'category':_0xffaa9d(0x1a4),'validator':'env-validator','remediation':_0xffaa9d(0x1a0)});break;}}}}),_0x38445d;}catch(_0xbc834c){return this[_0x3b118c(0x203)]?.['error'](_0x3b118c(0x1e1),{'error':_0xbc834c['message']}),[];}}[a0_0x53ca49(0x1ae)](_0x294331){const _0x5c4794=a0_0x53ca49,_0x3c42e2=a0_0x242cd6[_0x5c4794(0x1f5)](_0x294331)['toLowerCase'](),_0x38cd43=a0_0x242cd6[_0x5c4794(0x197)](_0x294331);if(_0x3c42e2===_0x5c4794(0x20f))return _0x5c4794(0x20f);if(_0x3c42e2===_0x5c4794(0x1fb)||_0x3c42e2==='docker-compose.yaml')return _0x5c4794(0x1cd);if(_0x3c42e2===_0x5c4794(0x196))return'package.json';if(_0x3c42e2===_0x5c4794(0x1c2))return'tsconfig.json';if(_0x3c42e2==='.env'||_0x3c42e2['endsWith'](_0x5c4794(0x1b0)))return'env';if(_0x38cd43['includes']('.github/workflows'))return _0x5c4794(0x216);if(_0x38cd43['includes'](_0x5c4794(0x1bf))||_0x38cd43['includes'](_0x5c4794(0x1ba)))return _0x5c4794(0x1bf);const _0x51a488=a0_0x242cd6[_0x5c4794(0x1b9)](_0x294331)['toLowerCase']();if(_0x51a488===_0x5c4794(0x19c)||_0x51a488===_0x5c4794(0x208))return'terraform';if(_0x51a488===_0x5c4794(0x1c1)||_0x51a488==='.yaml')return'yaml';if(_0x51a488==='.json')return'json';return'unknown';}[a0_0x53ca49(0x1a2)](_0x1e7bc2){const _0x1cf229=a0_0x53ca49;return _0x1e7bc2['map'](_0x1fbc00=>({'file':_0x1fbc00[_0x1cf229(0x1bd)],'line':_0x1fbc00[_0x1cf229(0x215)]||0x1,'column':_0x1fbc00['column']||0x1,'severity':_0x1fbc00[_0x1cf229(0x1b7)]||STATIC_ANALYSIS[_0x1cf229(0x199)][_0x1cf229(0x201)],'rule':_0x1fbc00[_0x1cf229(0x1a8)]||'unknown','message':_0x1fbc00[_0x1cf229(0x210)]||_0x1cf229(0x211),'category':_0x1fbc00[_0x1cf229(0x1d8)]||_0x1cf229(0x1e9),'validator':_0x1fbc00[_0x1cf229(0x1f9)],'cwe':_0x1fbc00['cwe']||null,'remediation':_0x1fbc00['remediation']||null,'references':_0x1fbc00['references']||[]}));}[a0_0x53ca49(0x1f7)](_0x40f457){const _0xbd05bd=a0_0x53ca49,_0x468b03={'error':STATIC_ANALYSIS['SEVERITY'][_0xbd05bd(0x1c7)],'warning':STATIC_ANALYSIS[_0xbd05bd(0x199)][_0xbd05bd(0x201)],'info':STATIC_ANALYSIS[_0xbd05bd(0x199)][_0xbd05bd(0x1c3)],'style':STATIC_ANALYSIS['SEVERITY'][_0xbd05bd(0x1c3)]};return _0x468b03[_0x40f457?.['toLowerCase']()]||STATIC_ANALYSIS[_0xbd05bd(0x199)]['WARNING'];}[a0_0x53ca49(0x19e)](_0x526148){const _0x195665=a0_0x53ca49,_0x49365b={'error':STATIC_ANALYSIS[_0x195665(0x199)][_0x195665(0x1c7)],'warning':STATIC_ANALYSIS[_0x195665(0x199)]['WARNING']};return _0x49365b[_0x526148?.[_0x195665(0x1c4)]()]||STATIC_ANALYSIS['SEVERITY']['WARNING'];}['mapCheckovSeverity'](_0x1cbb1d){const _0x14e139=a0_0x53ca49;return STATIC_ANALYSIS['SEVERITY'][_0x14e139(0x1c7)];}async[a0_0x53ca49(0x1af)](){const _0x130609=a0_0x53ca49,_0x453897=await this['detectAvailableValidators']();return{'validators':_0x453897,'recommendations':this[_0x130609(0x1b1)](_0x453897)};}[a0_0x53ca49(0x1b1)](_0x3417bd){const _0x53bb8c=a0_0x53ca49,_0x5dda6a=[];return!_0x3417bd[_0x53bb8c(0x1ca)]&&_0x5dda6a[_0x53bb8c(0x1ed)]({'validator':_0x53bb8c(0x1ca),'reason':'Infrastructure\x20as\x20Code\x20security\x20scanning\x20(Docker,\x20Kubernetes,\x20Terraform)','install':_0x53bb8c(0x1d9),'priority':'high'}),!_0x3417bd['hadolint']&&_0x5dda6a['push']({'validator':'hadolint','reason':_0x53bb8c(0x1a5),'install':'Download from https://github.com/hadolint/hadolint/releases','priority':'high'}),!_0x3417bd[_0x53bb8c(0x1d4)]&&_0x5dda6a[_0x53bb8c(0x1ed)]({'validator':_0x53bb8c(0x1d4),'reason':'YAML\x20file\x20validation','install':_0x53bb8c(0x212),'priority':_0x53bb8c(0x213)}),!_0x3417bd[_0x53bb8c(0x1e7)]&&_0x5dda6a['push']({'validator':'ajv\x20(JSON\x20Schema)','reason':_0x53bb8c(0x1d7),'install':_0x53bb8c(0x1fc),'priority':'medium'}),_0x5dda6a;}}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;