@loxia-labs/loxia-autopilot-one 1.0.5 → 1.0.7

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 (120) hide show
  1. package/README.md +1 -1
  2. package/bin/cli.js +1 -1
  3. package/bin/loxia-terminal-v2.js +1 -1
  4. package/bin/loxia-terminal.js +1 -1
  5. package/bin/start-with-terminal.js +1 -1
  6. package/package.json +1 -1
  7. package/scripts/install-scanners.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/TypeScriptAnalyzer.js +1 -1
  16. package/src/analyzers/codeCloneDetector/analyzer.js +1 -1
  17. package/src/analyzers/codeCloneDetector/detector.js +1 -1
  18. package/src/analyzers/codeCloneDetector/index.js +1 -1
  19. package/src/analyzers/codeCloneDetector/parser.js +1 -1
  20. package/src/analyzers/codeCloneDetector/reporter.js +1 -1
  21. package/src/analyzers/codeCloneDetector/scanner.js +1 -1
  22. package/src/core/agentPool.js +1 -1
  23. package/src/core/agentScheduler.js +1 -1
  24. package/src/core/contextManager.js +1 -1
  25. package/src/core/messageProcessor.js +1 -1
  26. package/src/core/orchestrator.js +1 -1
  27. package/src/core/stateManager.js +1 -1
  28. package/src/index.js +1 -1
  29. package/src/interfaces/cli.js +1 -1
  30. package/src/interfaces/terminal/__tests__/smoke/advancedFeatures.test.js +1 -1
  31. package/src/interfaces/terminal/__tests__/smoke/agentControl.test.js +1 -1
  32. package/src/interfaces/terminal/__tests__/smoke/agents.test.js +1 -1
  33. package/src/interfaces/terminal/__tests__/smoke/components.test.js +1 -1
  34. package/src/interfaces/terminal/__tests__/smoke/connection.test.js +1 -1
  35. package/src/interfaces/terminal/__tests__/smoke/enhancements.test.js +1 -1
  36. package/src/interfaces/terminal/__tests__/smoke/imports.test.js +1 -1
  37. package/src/interfaces/terminal/__tests__/smoke/messages.test.js +1 -1
  38. package/src/interfaces/terminal/__tests__/smoke/tools.test.js +1 -1
  39. package/src/interfaces/terminal/api/apiClient.js +1 -1
  40. package/src/interfaces/terminal/api/messageRouter.js +1 -1
  41. package/src/interfaces/terminal/api/session.js +1 -1
  42. package/src/interfaces/terminal/api/websocket.js +1 -1
  43. package/src/interfaces/terminal/components/AgentCreator.js +1 -1
  44. package/src/interfaces/terminal/components/AgentEditor.js +1 -1
  45. package/src/interfaces/terminal/components/AgentSwitcher.js +1 -1
  46. package/src/interfaces/terminal/components/ErrorBoundary.js +1 -1
  47. package/src/interfaces/terminal/components/ErrorPanel.js +1 -1
  48. package/src/interfaces/terminal/components/Header.js +1 -1
  49. package/src/interfaces/terminal/components/HelpPanel.js +1 -1
  50. package/src/interfaces/terminal/components/InputBox.js +1 -1
  51. package/src/interfaces/terminal/components/Layout.js +1 -1
  52. package/src/interfaces/terminal/components/LoadingSpinner.js +1 -1
  53. package/src/interfaces/terminal/components/MessageList.js +1 -1
  54. package/src/interfaces/terminal/components/MultilineTextInput.js +1 -1
  55. package/src/interfaces/terminal/components/SearchPanel.js +1 -1
  56. package/src/interfaces/terminal/components/SettingsPanel.js +1 -1
  57. package/src/interfaces/terminal/components/StatusBar.js +1 -1
  58. package/src/interfaces/terminal/components/TextInput.js +1 -1
  59. package/src/interfaces/terminal/config/agentEditorConstants.js +1 -1
  60. package/src/interfaces/terminal/config/constants.js +1 -1
  61. package/src/interfaces/terminal/index.js +1 -1
  62. package/src/interfaces/terminal/state/useAgentControl.js +1 -1
  63. package/src/interfaces/terminal/state/useAgents.js +1 -1
  64. package/src/interfaces/terminal/state/useConnection.js +1 -1
  65. package/src/interfaces/terminal/state/useMessages.js +1 -1
  66. package/src/interfaces/terminal/state/useTools.js +1 -1
  67. package/src/interfaces/terminal/utils/debugLogger.js +1 -1
  68. package/src/interfaces/terminal/utils/settingsStorage.js +1 -1
  69. package/src/interfaces/terminal/utils/theme.js +1 -1
  70. package/src/interfaces/webServer.js +1 -1
  71. package/src/modules/fileExplorer/controller.js +1 -1
  72. package/src/modules/fileExplorer/index.js +1 -1
  73. package/src/modules/fileExplorer/middleware.js +1 -1
  74. package/src/modules/fileExplorer/routes.js +1 -1
  75. package/src/services/aiService.js +1 -1
  76. package/src/services/apiKeyManager.js +1 -1
  77. package/src/services/benchmarkService.js +1 -1
  78. package/src/services/budgetService.js +1 -1
  79. package/src/services/contextInjectionService.js +1 -1
  80. package/src/services/conversationCompactionService.js +1 -1
  81. package/src/services/errorHandler.js +1 -1
  82. package/src/services/fileAttachmentService.js +1 -1
  83. package/src/services/modelRouterService.js +1 -1
  84. package/src/services/modelsService.js +1 -1
  85. package/src/services/qualityInspector.js +1 -1
  86. package/src/services/tokenCountingService.js +1 -1
  87. package/src/tools/agentCommunicationTool.js +1 -1
  88. package/src/tools/agentDelayTool.js +1 -1
  89. package/src/tools/asyncToolManager.js +1 -1
  90. package/src/tools/baseTool.js +1 -1
  91. package/src/tools/browserTool.js +1 -1
  92. package/src/tools/cloneDetectionTool.js +1 -1
  93. package/src/tools/dependencyResolverTool.js +1 -1
  94. package/src/tools/fileContentReplaceTool.js +1 -1
  95. package/src/tools/fileSystemTool.js +1 -1
  96. package/src/tools/fileTreeTool.js +1 -1
  97. package/src/tools/imageTool.js +1 -1
  98. package/src/tools/importAnalyzerTool.js +1 -1
  99. package/src/tools/jobDoneTool.js +1 -1
  100. package/src/tools/seekTool.js +1 -1
  101. package/src/tools/staticAnalysisTool.js +1 -1
  102. package/src/tools/taskManagerTool.js +1 -1
  103. package/src/tools/terminalTool.js +1 -1
  104. package/src/tools/webTool.js +1 -1
  105. package/src/types/agent.js +1 -1
  106. package/src/types/contextReference.js +1 -1
  107. package/src/types/conversation.js +1 -1
  108. package/src/types/toolCommand.js +1 -1
  109. package/src/utilities/attachmentValidator.js +1 -1
  110. package/src/utilities/configManager.js +1 -1
  111. package/src/utilities/constants.js +1 -1
  112. package/src/utilities/directoryAccessManager.js +1 -1
  113. package/src/utilities/fileProcessor.js +1 -1
  114. package/src/utilities/logger.js +1 -1
  115. package/src/utilities/tagParser.js +1 -1
  116. package/src/utilities/toolConstants.js +1 -1
  117. package/web-ui/build/index.html +2 -2
  118. package/web-ui/build/static/index-BVF_10a5.css +1 -0
  119. package/web-ui/build/static/{index-lCBai6dX.js → index-DE5VFS1q.js} +121 -68
  120. package/web-ui/build/static/index-CClD1090.css +0 -1
package/README.md CHANGED
@@ -99,7 +99,7 @@ npm install -g @loxia-labs/loxia-autopilot-one
99
99
 
100
100
  ```bash
101
101
  loxia --version
102
- # Should display: Loxia Autopilot One v1.0.5
102
+ # Should display: Loxia Autopilot One v1.0.7
103
103
  ```
104
104
 
105
105
  ### 4. Create an API Key
package/bin/cli.js CHANGED
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- const a0_0x26ffb9=a0_0x2479;(function(_0xd822b,_0x180529){const _0x582988=a0_0x2479,_0x3d866f=_0xd822b();while(!![]){try{const _0x26d81a=-parseInt(_0x582988(0x175))/0x1*(parseInt(_0x582988(0x15b))/0x2)+-parseInt(_0x582988(0x17d))/0x3+parseInt(_0x582988(0x150))/0x4+-parseInt(_0x582988(0x17e))/0x5*(-parseInt(_0x582988(0x165))/0x6)+-parseInt(_0x582988(0x154))/0x7+-parseInt(_0x582988(0x18e))/0x8+-parseInt(_0x582988(0x180))/0x9*(-parseInt(_0x582988(0x17f))/0xa);if(_0x26d81a===_0x180529)break;else _0x3d866f['push'](_0x3d866f['shift']());}catch(_0x23e1a3){_0x3d866f['push'](_0x3d866f['shift']());}}}(a0_0x29b8,0xcdc49));import{fileURLToPath}from'url';import{dirname,join}from'path';import{spawn,exec}from'child_process';import{readFileSync}from'fs';import a0_0x1100c6 from'http';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename),DEFAULT_PORT=0x1f90,DEFAULT_HOST=a0_0x26ffb9(0x179),SERVER_STARTUP_TIMEOUT=0x3a98,SERVER_CHECK_INTERVAL=0x1f4,args=process[a0_0x26ffb9(0x14d)][a0_0x26ffb9(0x185)](0x2),command=args[0x0]&&!args[0x0][a0_0x26ffb9(0x169)]('--')?args[0x0]:null,flags={'port':null,'host':null,'help':args['includes']('--help')||args[a0_0x26ffb9(0x186)]('-h'),'version':args['includes'](a0_0x26ffb9(0x15f))||args[a0_0x26ffb9(0x186)]('-v')};for(let i=0x0;i<args[a0_0x26ffb9(0x17c)];i++){args[i]===a0_0x26ffb9(0x166)&&args[i+0x1]&&(flags[a0_0x26ffb9(0x182)]=parseInt(args[i+0x1],0xa)),args[i]===a0_0x26ffb9(0x15c)&&args[i+0x1]&&(flags[a0_0x26ffb9(0x173)]=args[i+0x1]);}const port=flags[a0_0x26ffb9(0x182)]||DEFAULT_PORT,host=flags[a0_0x26ffb9(0x173)]||DEFAULT_HOST,serverUrl=a0_0x26ffb9(0x172)+host+':'+port;if(flags['version']){const pkgPath=join(__dirname,'..',a0_0x26ffb9(0x18c)),pkg=JSON['parse'](readFileSync(pkgPath,a0_0x26ffb9(0x188)));console[a0_0x26ffb9(0x160)]('Loxia\x20Autopilot\x20One\x20v'+pkg['version']),process[a0_0x26ffb9(0x156)](0x0);}function a0_0x29b8(){const _0x1f256a=['2TqnjjM','\x20manually.','\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\x20Start\x20server\x20+\x20open\x20Web\x20UI\x20in\x20browser\x0a\x20\x20terminal\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\x20Alias\x20for\x20\x27web\x27\x0a\x20\x20plus-terminal\x20\x20\x20Start\x20server\x20+\x20Terminal\x20UI\x20together\x0a\x0aOptions:\x0a\x20\x20--port\x20<number>\x20\x20\x20Specify\x20port\x20(default:\x20','\x0aServer\x20may\x20still\x20be\x20starting.\x20Open\x20','localhost','inherit','message','length','2993970WdyyDA','2255OVXHjD','9194490RiOGGi','9TBNiXm','statusCode','port','get','Starting\x20Terminal\x20UI...\x0a','slice','includes','ceil','utf8','Server\x20is\x20running\x20at\x20','SIGINT','Error:','package.json','\x0aLoxia\x20Autopilot\x20One\x20v','6750120zbuBUU','\x0aPlease\x20start\x20the\x20server\x20first:','pid','parse','\x20\x20loxia\x20plus-terminal\x20\x20#\x20Start\x20server\x20+\x20Terminal\x20UI\x0a','SIGTERM','loxia-terminal.js','argv','version',')\x0a\x20\x20--host\x20<host>\x20\x20\x20\x20\x20Specify\x20host\x20(default:\x20','6691212egZfyv','Unknown\x20command:\x20','web','help','4441843yPLbnD','Please\x20open\x20manually:\x20','exit','LOXIA_HOST','unref','catch','ignore','27646TLQaye','--host','destroy','open\x20\x22','--version','log','darwin','node','\x0aShutting\x20down\x20server...','\x0aOpening\x20Web\x20UI\x20at\x20','10038JiCWUi','--port','kill','Starting\x20Loxia\x20server\x20in\x20background...','startsWith','error','index.js','src','setTimeout','Could\x20not\x20open\x20browser\x20automatically.','xdg-open\x20\x22','Waiting\x20for\x20server\x20to\x20start...','Server\x20running\x20at\x20','http://','host','toString'];a0_0x29b8=function(){return _0x1f256a;};return a0_0x29b8();}if(flags[a0_0x26ffb9(0x153)]||!command){const pkgPath=join(__dirname,'..',a0_0x26ffb9(0x18c)),pkg=JSON[a0_0x26ffb9(0x149)](readFileSync(pkgPath,'utf8'));console[a0_0x26ffb9(0x160)](a0_0x26ffb9(0x18d)+pkg[a0_0x26ffb9(0x14e)]+a0_0x26ffb9(0x177)+DEFAULT_PORT+a0_0x26ffb9(0x14f)+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\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\x20custom\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\x0aDocumentation:\x0a\x20\x20https://autopilot.loxia.ai\x0a\x0a'),process[a0_0x26ffb9(0x156)](0x0);}async function checkServerRunning(_0x19b402,_0x3d2ed4,_0x5c8a52=0x1){for(let _0x16b4bf=0x0;_0x16b4bf<_0x5c8a52;_0x16b4bf++){const _0x4a07ee=await new Promise(_0x186d1a=>{const _0x26c4c6=a0_0x2479,_0x56d0f8=a0_0x1100c6[_0x26c4c6(0x183)](_0x26c4c6(0x172)+_0x19b402+':'+_0x3d2ed4+'/api/health',_0x55f30e=>{const _0x4482e9=_0x26c4c6;_0x186d1a(_0x55f30e[_0x4482e9(0x181)]===0xc8);});_0x56d0f8['on'](_0x26c4c6(0x16a),()=>_0x186d1a(![])),_0x56d0f8[_0x26c4c6(0x16d)](0x7d0,()=>{const _0x2bd103=_0x26c4c6;_0x56d0f8[_0x2bd103(0x15d)](),_0x186d1a(![]);});});if(_0x4a07ee)return!![];_0x16b4bf<_0x5c8a52-0x1&&await new Promise(_0x1d5471=>setTimeout(_0x1d5471,SERVER_CHECK_INTERVAL));}return![];}async function waitForServer(_0xe5a63a,_0xe65496,_0x4d75cd=SERVER_STARTUP_TIMEOUT){const _0x43bea4=a0_0x26ffb9,_0x5473b6=Math[_0x43bea4(0x187)](_0x4d75cd/SERVER_CHECK_INTERVAL);return checkServerRunning(_0xe5a63a,_0xe65496,_0x5473b6);}function a0_0x2479(_0x5d70f9,_0x520bc3){_0x5d70f9=_0x5d70f9-0x148;const _0x29b8c2=a0_0x29b8();let _0x247968=_0x29b8c2[_0x5d70f9];return _0x247968;}function openBrowser(_0x568ffa){const _0x297a78=a0_0x26ffb9,_0x4e3d38=process['platform'];let _0x2c5ffb;if(_0x4e3d38===_0x297a78(0x161))_0x2c5ffb=_0x297a78(0x15e)+_0x568ffa+'\x22';else _0x4e3d38==='win32'?_0x2c5ffb='start\x20\x22\x22\x20\x22'+_0x568ffa+'\x22':_0x2c5ffb=_0x297a78(0x16f)+_0x568ffa+'\x22';exec(_0x2c5ffb,_0x3b1eb4=>{const _0x4df78b=_0x297a78;_0x3b1eb4&&(console['log'](_0x4df78b(0x16e)),console[_0x4df78b(0x160)](_0x4df78b(0x155)+_0x568ffa));});}function startServer(_0x427113=![]){const _0x48f704=a0_0x26ffb9,_0x4fb730={...process['env'],'LOXIA_PORT':port['toString'](),'PORT':port['toString']()};flags[_0x48f704(0x173)]&&(_0x4fb730[_0x48f704(0x157)]=flags[_0x48f704(0x173)]);const _0xd665a4=join(__dirname,'..',_0x48f704(0x16c),_0x48f704(0x16b)),_0x782bb9=spawn(_0x48f704(0x162),[_0xd665a4],{'cwd':join(__dirname,'..'),'env':_0x4fb730,'stdio':_0x427113?[_0x48f704(0x15a),_0x48f704(0x15a),'ignore']:_0x48f704(0x17a),'detached':_0x427113});return _0x427113&&_0x782bb9[_0x48f704(0x158)](),_0x782bb9;}function startTerminalUI(){const _0x1e21bb=a0_0x26ffb9,_0x5a1b21=join(__dirname,_0x1e21bb(0x14c)),_0x4d5d51={...process['env'],'LOXIA_PORT':port[_0x1e21bb(0x174)](),'LOXIA_HOST':host},_0x7ed804=spawn(_0x1e21bb(0x162),[_0x5a1b21],{'cwd':join(__dirname,'..'),'env':_0x4d5d51,'stdio':'inherit'});return _0x7ed804;}const commands={'web':async()=>{const _0x4c3e01=a0_0x26ffb9;console[_0x4c3e01(0x160)]('Starting\x20Loxia\x20server...\x0a');const _0x4bb916=startServer(![]);console[_0x4c3e01(0x160)](_0x4c3e01(0x170));const _0x4c9f07=await waitForServer(host,port);_0x4c9f07?(console[_0x4c3e01(0x160)](_0x4c3e01(0x164)+serverUrl),openBrowser(serverUrl)):console[_0x4c3e01(0x160)](_0x4c3e01(0x178)+serverUrl+_0x4c3e01(0x176)),process['on'](_0x4c3e01(0x18a),()=>_0x4bb916[_0x4c3e01(0x167)](_0x4c3e01(0x18a))),process['on'](_0x4c3e01(0x14b),()=>_0x4bb916[_0x4c3e01(0x167)](_0x4c3e01(0x14b))),_0x4bb916['on'](_0x4c3e01(0x156),_0x394452=>process[_0x4c3e01(0x156)](_0x394452||0x0));},'plus-web':async()=>{const _0x3eb2a4=a0_0x26ffb9;await commands[_0x3eb2a4(0x152)]();},'terminal':async()=>{const _0x502636=a0_0x26ffb9;console['log']('Checking\x20if\x20server\x20is\x20running...');const _0x225f46=await checkServerRunning(host,port);!_0x225f46&&(console[_0x502636(0x16a)]('\x0aServer\x20is\x20not\x20running\x20at\x20'+serverUrl),console[_0x502636(0x16a)](_0x502636(0x18f)),console[_0x502636(0x16a)]('\x20\x20loxia\x20web\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Start\x20server\x20+\x20Web\x20UI'),console[_0x502636(0x16a)](_0x502636(0x14a)),process[_0x502636(0x156)](0x1));console[_0x502636(0x160)](_0x502636(0x189)+serverUrl),console[_0x502636(0x160)](_0x502636(0x184));const _0x5c6022=startTerminalUI();process['on'](_0x502636(0x18a),()=>_0x5c6022[_0x502636(0x167)](_0x502636(0x18a))),process['on'](_0x502636(0x14b),()=>_0x5c6022['kill'](_0x502636(0x14b))),_0x5c6022['on'](_0x502636(0x156),_0x5b61cc=>process[_0x502636(0x156)](_0x5b61cc||0x0));},'plus-terminal':async()=>{const _0x25d692=a0_0x26ffb9;console['log'](_0x25d692(0x168));const _0x51a100=startServer(!![]),_0x49248f=await waitForServer(host,port);!_0x49248f&&(console[_0x25d692(0x16a)]('\x0aServer\x20failed\x20to\x20start.\x20Please\x20check\x20logs.'),process['exit'](0x1));console[_0x25d692(0x160)](_0x25d692(0x171)+serverUrl),console['log'](_0x25d692(0x184));const _0x1b1aeb=startTerminalUI();_0x1b1aeb['on'](_0x25d692(0x156),_0x1e8ac2=>{const _0x5b1ff4=_0x25d692;console['log'](_0x5b1ff4(0x163));try{process[_0x5b1ff4(0x167)](_0x51a100[_0x5b1ff4(0x148)],_0x5b1ff4(0x14b));}catch(_0x35ef1f){}process[_0x5b1ff4(0x156)](_0x1e8ac2||0x0);}),process['on'](_0x25d692(0x18a),()=>{const _0x5adec4=_0x25d692;_0x1b1aeb['kill'](_0x5adec4(0x18a));}),process['on'](_0x25d692(0x14b),()=>{const _0x197ae8=_0x25d692;_0x1b1aeb['kill'](_0x197ae8(0x14b));});}};commands[command]?commands[command]()[a0_0x26ffb9(0x159)](_0x2e45e5=>{const _0x2c9c70=a0_0x26ffb9;console['error'](_0x2c9c70(0x18b),_0x2e45e5[_0x2c9c70(0x17b)]),process['exit'](0x1);}):(console['error'](a0_0x26ffb9(0x151)+command),console[a0_0x26ffb9(0x16a)]('Run\x20\x22loxia\x20--help\x22\x20for\x20usage\x20information.'),process[a0_0x26ffb9(0x156)](0x1));
3
+ const a0_0x27a322=a0_0x52bb;(function(_0x528674,_0xdc3d6a){const _0x18d418=a0_0x52bb,_0x3538d4=_0x528674();while(!![]){try{const _0x1a3ed1=parseInt(_0x18d418(0xa8))/0x1+parseInt(_0x18d418(0x99))/0x2*(parseInt(_0x18d418(0x95))/0x3)+-parseInt(_0x18d418(0xb2))/0x4*(parseInt(_0x18d418(0x9d))/0x5)+-parseInt(_0x18d418(0x8e))/0x6*(-parseInt(_0x18d418(0xb1))/0x7)+parseInt(_0x18d418(0x93))/0x8+parseInt(_0x18d418(0x88))/0x9+parseInt(_0x18d418(0x8f))/0xa*(-parseInt(_0x18d418(0x83))/0xb);if(_0x1a3ed1===_0xdc3d6a)break;else _0x3538d4['push'](_0x3538d4['shift']());}catch(_0x11ddb0){_0x3538d4['push'](_0x3538d4['shift']());}}}(a0_0x2461,0x2228e));import{fileURLToPath}from'url';import{dirname,join}from'path';import{spawn,exec}from'child_process';import{readFileSync}from'fs';import a0_0x4fa148 from'http';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename),DEFAULT_PORT=0x1f90,DEFAULT_HOST=a0_0x27a322(0x8b),SERVER_STARTUP_TIMEOUT=0x3a98,SERVER_CHECK_INTERVAL=0x1f4,args=process[a0_0x27a322(0x7c)][a0_0x27a322(0x9b)](0x2),command=args[0x0]&&!args[0x0]['startsWith']('--')?args[0x0]:null,flags={'port':null,'host':null,'help':args[a0_0x27a322(0x80)]('--help')||args['includes']('-h'),'version':args[a0_0x27a322(0x80)](a0_0x27a322(0xad))||args['includes']('-v')};for(let i=0x0;i<args[a0_0x27a322(0x94)];i++){args[i]==='--port'&&args[i+0x1]&&(flags[a0_0x27a322(0x82)]=parseInt(args[i+0x1],0xa)),args[i]===a0_0x27a322(0xa9)&&args[i+0x1]&&(flags['host']=args[i+0x1]);}const port=flags[a0_0x27a322(0x82)]||DEFAULT_PORT,host=flags['host']||DEFAULT_HOST,serverUrl=a0_0x27a322(0x86)+host+':'+port;if(flags[a0_0x27a322(0x92)]){const pkgPath=join(__dirname,'..',a0_0x27a322(0x9a)),pkg=JSON['parse'](readFileSync(pkgPath,a0_0x27a322(0x74)));console['log']('Loxia\x20Autopilot\x20One\x20v'+pkg[a0_0x27a322(0x92)]),process['exit'](0x0);}if(flags['help']||!command){const pkgPath=join(__dirname,'..',a0_0x27a322(0x9a)),pkg=JSON[a0_0x27a322(0x8c)](readFileSync(pkgPath,a0_0x27a322(0x74)));console[a0_0x27a322(0x9e)]('\x0aLoxia\x20Autopilot\x20One\x20v'+pkg['version']+a0_0x27a322(0x77)+DEFAULT_PORT+a0_0x27a322(0x97)+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\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\x20custom\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\x0aDocumentation:\x0a\x20\x20https://autopilot.loxia.ai\x0a\x0a'),process[a0_0x27a322(0x76)](0x0);}function a0_0x52bb(_0x31d8a3,_0x8dedec){_0x31d8a3=_0x31d8a3-0x72;const _0x24611f=a0_0x2461();let _0x52bbbc=_0x24611f[_0x31d8a3];return _0x52bbbc;}async function checkServerRunning(_0x6f3913,_0x5db77d,_0x3f0e82=0x1){for(let _0x2d9fd1=0x0;_0x2d9fd1<_0x3f0e82;_0x2d9fd1++){const _0x2f8730=await new Promise(_0x414701=>{const _0x38eb46=a0_0x52bb,_0x18c442=a0_0x4fa148[_0x38eb46(0x96)](_0x38eb46(0x86)+_0x6f3913+':'+_0x5db77d+'/api/health',_0x3691fb=>{const _0x1e9db5=_0x38eb46;_0x414701(_0x3691fb[_0x1e9db5(0x8d)]===0xc8);});_0x18c442['on'](_0x38eb46(0x84),()=>_0x414701(![])),_0x18c442[_0x38eb46(0xb0)](0x7d0,()=>{_0x18c442['destroy'](),_0x414701(![]);});});if(_0x2f8730)return!![];_0x2d9fd1<_0x3f0e82-0x1&&await new Promise(_0x32ae36=>setTimeout(_0x32ae36,SERVER_CHECK_INTERVAL));}return![];}async function waitForServer(_0x57e229,_0x504302,_0x54100d=SERVER_STARTUP_TIMEOUT){const _0x5c26c7=Math['ceil'](_0x54100d/SERVER_CHECK_INTERVAL);return checkServerRunning(_0x57e229,_0x504302,_0x5c26c7);}function openBrowser(_0x272672){const _0x4ef4c9=a0_0x27a322,_0x2314b5=process[_0x4ef4c9(0xa7)];let _0x5b4c83;if(_0x2314b5==='darwin')_0x5b4c83=_0x4ef4c9(0xac)+_0x272672+'\x22';else _0x2314b5===_0x4ef4c9(0x7e)?_0x5b4c83=_0x4ef4c9(0x87)+_0x272672+'\x22':_0x5b4c83=_0x4ef4c9(0xaa)+_0x272672+'\x22';exec(_0x5b4c83,_0x1aeab7=>{const _0x28d25e=_0x4ef4c9;_0x1aeab7&&(console[_0x28d25e(0x9e)](_0x28d25e(0x78)),console[_0x28d25e(0x9e)]('Please\x20open\x20manually:\x20'+_0x272672));});}function startServer(_0x40aba6=![]){const _0x3b2517=a0_0x27a322,_0x28df71={...process[_0x3b2517(0xa0)],'LOXIA_PORT':port[_0x3b2517(0xa4)](),'PORT':port[_0x3b2517(0xa4)]()};flags['host']&&(_0x28df71[_0x3b2517(0xa2)]=flags[_0x3b2517(0x7a)]);const _0x1ea5fb=join(__dirname,'..','src','index.js'),_0x4e8b23=spawn(_0x3b2517(0x75),[_0x1ea5fb],{'cwd':join(__dirname,'..'),'env':_0x28df71,'stdio':_0x40aba6?[_0x3b2517(0x9f),'ignore','ignore']:_0x3b2517(0x85),'detached':_0x40aba6});return _0x40aba6&&_0x4e8b23[_0x3b2517(0x7b)](),_0x4e8b23;}function a0_0x2461(){const _0x320109=['env','Error:','LOXIA_HOST','\x0aPlease\x20start\x20the\x20server\x20first:','toString','\x0aOpening\x20Web\x20UI\x20at\x20','Starting\x20Terminal\x20UI...\x0a','platform','217166KyufiH','--host','xdg-open\x20\x22','\x20\x20loxia\x20web\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Start\x20server\x20+\x20Web\x20UI','open\x20\x22','--version','Server\x20is\x20running\x20at\x20','Waiting\x20for\x20server\x20to\x20start...','setTimeout','6181npqlLi','44VvBFLn','SIGTERM','Run\x20\x22loxia\x20--help\x22\x20for\x20usage\x20information.','utf8','node','exit','\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\x20Start\x20server\x20+\x20open\x20Web\x20UI\x20in\x20browser\x0a\x20\x20terminal\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\x20Alias\x20for\x20\x27web\x27\x0a\x20\x20plus-terminal\x20\x20\x20Start\x20server\x20+\x20Terminal\x20UI\x20together\x0a\x0aOptions:\x0a\x20\x20--port\x20<number>\x20\x20\x20Specify\x20port\x20(default:\x20','Could\x20not\x20open\x20browser\x20automatically.','Starting\x20Loxia\x20server\x20in\x20background...','host','unref','argv','SIGINT','win32','Checking\x20if\x20server\x20is\x20running...','includes','Server\x20running\x20at\x20','port','2202959RGatvO','error','inherit','http://','start\x20\x22\x22\x20\x22','128673rlpRjd','web','\x0aServer\x20failed\x20to\x20start.\x20Please\x20check\x20logs.','localhost','parse','statusCode','822Kniulq','10lEnYPA','kill','catch','version','827808EvEcfK','length','687glahiM','get',')\x0a\x20\x20--host\x20<host>\x20\x20\x20\x20\x20Specify\x20host\x20(default:\x20','loxia-terminal.js','520orvCVX','package.json','slice','Unknown\x20command:\x20','79665zGreXO','log','ignore'];a0_0x2461=function(){return _0x320109;};return a0_0x2461();}function startTerminalUI(){const _0x3c389a=a0_0x27a322,_0x3a9c40=join(__dirname,_0x3c389a(0x98)),_0x34cc17={...process[_0x3c389a(0xa0)],'LOXIA_PORT':port[_0x3c389a(0xa4)](),'LOXIA_HOST':host},_0x4404e7=spawn(_0x3c389a(0x75),[_0x3a9c40],{'cwd':join(__dirname,'..'),'env':_0x34cc17,'stdio':_0x3c389a(0x85)});return _0x4404e7;}const commands={'web':async()=>{const _0x1275e8=a0_0x27a322;console[_0x1275e8(0x9e)]('Starting\x20Loxia\x20server...\x0a');const _0xf8fa17=startServer(![]);console[_0x1275e8(0x9e)](_0x1275e8(0xaf));const _0x5e7e1d=await waitForServer(host,port);_0x5e7e1d?(console[_0x1275e8(0x9e)](_0x1275e8(0xa5)+serverUrl),openBrowser(serverUrl)):console[_0x1275e8(0x9e)]('\x0aServer\x20may\x20still\x20be\x20starting.\x20Open\x20'+serverUrl+'\x20manually.'),process['on']('SIGINT',()=>_0xf8fa17[_0x1275e8(0x90)](_0x1275e8(0x7d))),process['on']('SIGTERM',()=>_0xf8fa17['kill']('SIGTERM')),_0xf8fa17['on'](_0x1275e8(0x76),_0x55900f=>process[_0x1275e8(0x76)](_0x55900f||0x0));},'plus-web':async()=>{const _0x404964=a0_0x27a322;await commands[_0x404964(0x89)]();},'terminal':async()=>{const _0x509afc=a0_0x27a322;console[_0x509afc(0x9e)](_0x509afc(0x7f));const _0x3cdb18=await checkServerRunning(host,port);!_0x3cdb18&&(console[_0x509afc(0x84)]('\x0aServer\x20is\x20not\x20running\x20at\x20'+serverUrl),console[_0x509afc(0x84)](_0x509afc(0xa3)),console['error'](_0x509afc(0xab)),console[_0x509afc(0x84)]('\x20\x20loxia\x20plus-terminal\x20\x20#\x20Start\x20server\x20+\x20Terminal\x20UI\x0a'),process['exit'](0x1));console[_0x509afc(0x9e)](_0x509afc(0xae)+serverUrl),console['log'](_0x509afc(0xa6));const _0xc19780=startTerminalUI();process['on'](_0x509afc(0x7d),()=>_0xc19780[_0x509afc(0x90)](_0x509afc(0x7d))),process['on'](_0x509afc(0x72),()=>_0xc19780['kill']('SIGTERM')),_0xc19780['on'](_0x509afc(0x76),_0x5a5be6=>process['exit'](_0x5a5be6||0x0));},'plus-terminal':async()=>{const _0x22c46e=a0_0x27a322;console[_0x22c46e(0x9e)](_0x22c46e(0x79));const _0x52f80f=startServer(!![]),_0x5e259d=await waitForServer(host,port);!_0x5e259d&&(console[_0x22c46e(0x84)](_0x22c46e(0x8a)),process['exit'](0x1));console[_0x22c46e(0x9e)](_0x22c46e(0x81)+serverUrl),console['log']('Starting\x20Terminal\x20UI...\x0a');const _0x451144=startTerminalUI();_0x451144['on'](_0x22c46e(0x76),_0x32972f=>{const _0x5344ac=_0x22c46e;console[_0x5344ac(0x9e)]('\x0aShutting\x20down\x20server...');try{process[_0x5344ac(0x90)](_0x52f80f['pid'],'SIGTERM');}catch(_0x3afe18){}process[_0x5344ac(0x76)](_0x32972f||0x0);}),process['on'](_0x22c46e(0x7d),()=>{const _0x41bffa=_0x22c46e;_0x451144['kill'](_0x41bffa(0x7d));}),process['on'](_0x22c46e(0x72),()=>{const _0x2aae1d=_0x22c46e;_0x451144[_0x2aae1d(0x90)](_0x2aae1d(0x72));});}};commands[command]?commands[command]()[a0_0x27a322(0x91)](_0x4ffc57=>{const _0x285d92=a0_0x27a322;console[_0x285d92(0x84)](_0x285d92(0xa1),_0x4ffc57['message']),process[_0x285d92(0x76)](0x1);}):(console['error'](a0_0x27a322(0x9c)+command),console[a0_0x27a322(0x84)](a0_0x27a322(0x73)),process[a0_0x27a322(0x76)](0x1));
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- function a0_0x590d(){const _0x28b8ec=['6130pRTcTr','connect','--host','🚀\x20Starting\x20Loxia\x20server...','ignore','now','\x20\x20\x201.\x20Make\x20sure\x20no\x20other\x20process\x20is\x20using\x20port\x208080','pipe','✓\x20Server\x20started\x20at\x20','\x20\x20\x202.\x20Try\x20running\x20the\x20server\x20manually:\x20node\x20bin/cli.js','../src/interfaces/terminal/index.js','join','\x20\x20Loxia\x20Autopilot\x20One\x20-\x20Terminal\x20UI','Server\x20startup\x20timeout','2565218xVCfKU','2804169aOxmzu','LOXIA_HOST','...','error','✗\x20Server\x20is\x20not\x20running','message','exit','✓\x20Server\x20is\x20already\x20running\x20at\x20','LOXIA_PORT','12949570mNrZKk','setTimeout','toString','env','timeout','--port','slice','975848mkROTM','localhost','99lCgAhc','Failed\x20to\x20start\x20server:','data','❌\x20Failed\x20to\x20start\x20Terminal\x20UI:','🔍\x20Checking\x20if\x20server\x20is\x20running\x20at\x20','stdout','💡\x20Troubleshooting:','36SinPOC','argv','log','bin/cli.js','220373CYMdNa','web','━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━','5588OZykwI','Socket','750512hzFlGa','dirname','destroy'];a0_0x590d=function(){return _0x28b8ec;};return a0_0x590d();}const a0_0x597a8=a0_0x3292;(function(_0x5d4e1d,_0x4c1362){const _0x5333df=a0_0x3292,_0x152d3e=_0x5d4e1d();while(!![]){try{const _0x448804=parseInt(_0x5333df(0x153))/0x1+parseInt(_0x5333df(0x169))/0x2+parseInt(_0x5333df(0x16a))/0x3+-parseInt(_0x5333df(0x156))/0x4*(-parseInt(_0x5333df(0x15b))/0x5)+parseInt(_0x5333df(0x183))/0x6*(-parseInt(_0x5333df(0x158))/0x7)+-parseInt(_0x5333df(0x17a))/0x8*(parseInt(_0x5333df(0x17c))/0x9)+-parseInt(_0x5333df(0x173))/0xa;if(_0x448804===_0x4c1362)break;else _0x152d3e['push'](_0x152d3e['shift']());}catch(_0x16b9e6){_0x152d3e['push'](_0x152d3e['shift']());}}}(a0_0x590d,0xd47ef));function a0_0x3292(_0x2ca414,_0x563d75){_0x2ca414=_0x2ca414-0x150;const _0x590d65=a0_0x590d();let _0x329240=_0x590d65[_0x2ca414];return _0x329240;}import{spawn}from'child_process';import a0_0x1c800a from'net';import a0_0x29baf7 from'path';import{fileURLToPath}from'url';const __filename=fileURLToPath(import.meta.url),__dirname=a0_0x29baf7[a0_0x597a8(0x159)](__filename),projectRoot=a0_0x29baf7[a0_0x597a8(0x159)](__dirname),DEFAULT_PORT=0x1f90,DEFAULT_HOST=a0_0x597a8(0x17b),SERVER_STARTUP_TIMEOUT=0x2710;async function isServerRunning(_0x431351,_0x334e21){return new Promise(_0x20ee15=>{const _0x3c3f2d=a0_0x3292,_0xe301bb=new a0_0x1c800a[(_0x3c3f2d(0x157))]();_0xe301bb[_0x3c3f2d(0x174)](0x7d0),_0xe301bb['on'](_0x3c3f2d(0x15c),()=>{const _0x4a2bba=_0x3c3f2d;_0xe301bb[_0x4a2bba(0x15a)](),_0x20ee15(!![]);}),_0xe301bb['on'](_0x3c3f2d(0x177),()=>{const _0x49abd7=_0x3c3f2d;_0xe301bb[_0x49abd7(0x15a)](),_0x20ee15(![]);}),_0xe301bb['on'](_0x3c3f2d(0x16d),()=>{const _0x75fa73=_0x3c3f2d;_0xe301bb[_0x75fa73(0x15a)](),_0x20ee15(![]);}),_0xe301bb[_0x3c3f2d(0x15c)](_0x334e21,_0x431351);});}async function startServer(_0x4122c4,_0x25aa73){const _0xf8c38c=a0_0x597a8;return console[_0xf8c38c(0x151)](_0xf8c38c(0x15e)),new Promise((_0x48ad51,_0x210530)=>{const _0x571709=_0xf8c38c,_0x335c56=spawn('node',[a0_0x29baf7[_0x571709(0x166)](projectRoot,_0x571709(0x152)),'--ui',_0x571709(0x154),_0x571709(0x15d),_0x4122c4,_0x571709(0x178),_0x25aa73[_0x571709(0x175)]()],{'detached':![],'stdio':[_0x571709(0x15f),_0x571709(0x162),_0x571709(0x162)]});_0x335c56[_0x571709(0x181)]['on']('data',()=>{}),_0x335c56['stderr']['on'](_0x571709(0x17e),()=>{}),_0x335c56['on'](_0x571709(0x16d),_0x5bd4a7=>{const _0x1406cb=_0x571709;console['error'](_0x1406cb(0x17d),_0x5bd4a7[_0x1406cb(0x16f)]),_0x210530(_0x5bd4a7);});const _0x3ee40b=Date[_0x571709(0x160)](),_0x716744=setInterval(async()=>{const _0x31af32=_0x571709,_0x33a37c=await isServerRunning(_0x4122c4,_0x25aa73);if(_0x33a37c)clearInterval(_0x716744),console[_0x31af32(0x151)](_0x31af32(0x163)+_0x4122c4+':'+_0x25aa73),_0x48ad51();else Date[_0x31af32(0x160)]()-_0x3ee40b>SERVER_STARTUP_TIMEOUT&&(clearInterval(_0x716744),_0x335c56['kill'](),_0x210530(new Error(_0x31af32(0x168))));},0x1f4);});}async function main(){const _0x30f168=a0_0x597a8;try{console[_0x30f168(0x151)]('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━'),console[_0x30f168(0x151)](_0x30f168(0x167)),console[_0x30f168(0x151)](_0x30f168(0x155)),console[_0x30f168(0x151)]('');const _0x40e929=process[_0x30f168(0x150)][_0x30f168(0x179)](0x2);let _0x3765b3=DEFAULT_HOST,_0x72ae0f=DEFAULT_PORT;for(let _0x288f64=0x0;_0x288f64<_0x40e929['length'];_0x288f64++){if(_0x40e929[_0x288f64]===_0x30f168(0x15d)&&_0x40e929[_0x288f64+0x1])_0x3765b3=_0x40e929[_0x288f64+0x1],_0x288f64++;else _0x40e929[_0x288f64]===_0x30f168(0x178)&&_0x40e929[_0x288f64+0x1]&&(_0x72ae0f=parseInt(_0x40e929[_0x288f64+0x1],0xa),_0x288f64++);}console[_0x30f168(0x151)](_0x30f168(0x180)+_0x3765b3+':'+_0x72ae0f+_0x30f168(0x16c));const _0x3cd721=await isServerRunning(_0x3765b3,_0x72ae0f);!_0x3cd721?(console[_0x30f168(0x151)](_0x30f168(0x16e)),await startServer(_0x3765b3,_0x72ae0f)):console[_0x30f168(0x151)](_0x30f168(0x171)+_0x3765b3+':'+_0x72ae0f),console[_0x30f168(0x151)](''),console[_0x30f168(0x151)]('🎨\x20Launching\x20Ink-based\x20Terminal\x20UI...'),console[_0x30f168(0x151)](''),await new Promise(_0x1c2348=>setTimeout(_0x1c2348,0x1f4)),process['env'][_0x30f168(0x16b)]=_0x3765b3,process[_0x30f168(0x176)][_0x30f168(0x172)]=_0x72ae0f[_0x30f168(0x175)](),await import(_0x30f168(0x165));}catch(_0x1eaf8e){console[_0x30f168(0x16d)](''),console[_0x30f168(0x16d)](_0x30f168(0x17f)),console[_0x30f168(0x16d)]('\x20\x20',_0x1eaf8e[_0x30f168(0x16f)]),console[_0x30f168(0x16d)](''),console[_0x30f168(0x16d)](_0x30f168(0x182)),console[_0x30f168(0x16d)](_0x30f168(0x161)),console['error'](_0x30f168(0x164)),console[_0x30f168(0x16d)]('\x20\x20\x203.\x20Check\x20logs\x20for\x20more\x20details'),console['error'](''),process[_0x30f168(0x170)](0x1);}}main();
3
+ const a0_0x333457=a0_0xf070;(function(_0x3efa29,_0x28f31e){const _0x51644d=a0_0xf070,_0x1a9327=_0x3efa29();while(!![]){try{const _0x15c1f3=-parseInt(_0x51644d(0xb2))/0x1+-parseInt(_0x51644d(0xac))/0x2+parseInt(_0x51644d(0xb8))/0x3+parseInt(_0x51644d(0xba))/0x4+parseInt(_0x51644d(0xd1))/0x5+-parseInt(_0x51644d(0xc6))/0x6*(parseInt(_0x51644d(0xbf))/0x7)+-parseInt(_0x51644d(0xcd))/0x8;if(_0x15c1f3===_0x28f31e)break;else _0x1a9327['push'](_0x1a9327['shift']());}catch(_0x5de381){_0x1a9327['push'](_0x1a9327['shift']());}}}(a0_0x36f9,0x31f79));import{spawn}from'child_process';import a0_0x53b19a from'net';import a0_0x1241b1 from'path';import{fileURLToPath}from'url';const __filename=fileURLToPath(import.meta.url),__dirname=a0_0x1241b1[a0_0x333457(0xd3)](__filename),projectRoot=a0_0x1241b1[a0_0x333457(0xd3)](__dirname),DEFAULT_PORT=0x1f90,DEFAULT_HOST=a0_0x333457(0xc7),SERVER_STARTUP_TIMEOUT=0x2710;async function isServerRunning(_0x3bafb1,_0x33690a){return new Promise(_0x2abffb=>{const _0xe7b43b=a0_0xf070,_0x5b8fec=new a0_0x53b19a[(_0xe7b43b(0xd5))]();_0x5b8fec[_0xe7b43b(0xb3)](0x7d0),_0x5b8fec['on']('connect',()=>{_0x5b8fec['destroy'](),_0x2abffb(!![]);}),_0x5b8fec['on'](_0xe7b43b(0xd2),()=>{const _0x10a3f1=_0xe7b43b;_0x5b8fec[_0x10a3f1(0xbe)](),_0x2abffb(![]);}),_0x5b8fec['on'](_0xe7b43b(0xbd),()=>{const _0x2277cf=_0xe7b43b;_0x5b8fec[_0x2277cf(0xbe)](),_0x2abffb(![]);}),_0x5b8fec[_0xe7b43b(0xd4)](_0x33690a,_0x3bafb1);});}async function startServer(_0x4b981e,_0x3a03e9){const _0x3644ad=a0_0x333457;return console[_0x3644ad(0xbc)](_0x3644ad(0xb5)),new Promise((_0x2a676e,_0x2d9fa0)=>{const _0x2439ae=_0x3644ad,_0x266fa7=spawn(_0x2439ae(0xcf),[a0_0x1241b1[_0x2439ae(0xc2)](projectRoot,_0x2439ae(0xc4)),_0x2439ae(0xaa),'web','--host',_0x4b981e,_0x2439ae(0xd0),_0x3a03e9[_0x2439ae(0xbb)]()],{'detached':![],'stdio':[_0x2439ae(0xd9),_0x2439ae(0xcc),_0x2439ae(0xcc)]});_0x266fa7[_0x2439ae(0xc8)]['on'](_0x2439ae(0xc3),()=>{}),_0x266fa7[_0x2439ae(0xa8)]['on'](_0x2439ae(0xc3),()=>{}),_0x266fa7['on'](_0x2439ae(0xbd),_0x412511=>{console['error']('Failed\x20to\x20start\x20server:',_0x412511['message']),_0x2d9fa0(_0x412511);});const _0x4acce7=Date[_0x2439ae(0xae)](),_0x5b9174=setInterval(async()=>{const _0x3e824a=_0x2439ae,_0x5b314f=await isServerRunning(_0x4b981e,_0x3a03e9);if(_0x5b314f)clearInterval(_0x5b9174),console[_0x3e824a(0xbc)]('✓\x20Server\x20started\x20at\x20'+_0x4b981e+':'+_0x3a03e9),_0x2a676e();else Date[_0x3e824a(0xae)]()-_0x4acce7>SERVER_STARTUP_TIMEOUT&&(clearInterval(_0x5b9174),_0x266fa7[_0x3e824a(0xce)](),_0x2d9fa0(new Error(_0x3e824a(0xc1))));},0x1f4);});}function a0_0xf070(_0x1d0300,_0x24912d){_0x1d0300=_0x1d0300-0xa8;const _0x36f9ed=a0_0x36f9();let _0xf070aa=_0x36f9ed[_0x1d0300];return _0xf070aa;}async function main(){const _0x3f1b4f=a0_0x333457;try{console[_0x3f1b4f(0xbc)]('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━'),console[_0x3f1b4f(0xbc)]('\x20\x20Loxia\x20Autopilot\x20One\x20-\x20Terminal\x20UI'),console['log'](_0x3f1b4f(0xc0)),console[_0x3f1b4f(0xbc)]('');const _0x20581e=process[_0x3f1b4f(0xcb)][_0x3f1b4f(0xc9)](0x2);let _0x5d5346=DEFAULT_HOST,_0x43541d=DEFAULT_PORT;for(let _0x594330=0x0;_0x594330<_0x20581e[_0x3f1b4f(0xa9)];_0x594330++){if(_0x20581e[_0x594330]===_0x3f1b4f(0xca)&&_0x20581e[_0x594330+0x1])_0x5d5346=_0x20581e[_0x594330+0x1],_0x594330++;else _0x20581e[_0x594330]===_0x3f1b4f(0xd0)&&_0x20581e[_0x594330+0x1]&&(_0x43541d=parseInt(_0x20581e[_0x594330+0x1],0xa),_0x594330++);}console['log'](_0x3f1b4f(0xb1)+_0x5d5346+':'+_0x43541d+_0x3f1b4f(0xc5));const _0x50aaf1=await isServerRunning(_0x5d5346,_0x43541d);!_0x50aaf1?(console['log'](_0x3f1b4f(0xd6)),await startServer(_0x5d5346,_0x43541d)):console['log']('✓\x20Server\x20is\x20already\x20running\x20at\x20'+_0x5d5346+':'+_0x43541d),console[_0x3f1b4f(0xbc)](''),console['log'](_0x3f1b4f(0xad)),console[_0x3f1b4f(0xbc)](''),await new Promise(_0x1049b2=>setTimeout(_0x1049b2,0x1f4)),process['env'][_0x3f1b4f(0xd7)]=_0x5d5346,process[_0x3f1b4f(0xb9)][_0x3f1b4f(0xb4)]=_0x43541d[_0x3f1b4f(0xbb)](),await import(_0x3f1b4f(0xab));}catch(_0x51ba7c){console[_0x3f1b4f(0xbd)](''),console[_0x3f1b4f(0xbd)]('❌\x20Failed\x20to\x20start\x20Terminal\x20UI:'),console[_0x3f1b4f(0xbd)]('\x20\x20',_0x51ba7c[_0x3f1b4f(0xd8)]),console[_0x3f1b4f(0xbd)](''),console[_0x3f1b4f(0xbd)](_0x3f1b4f(0xaf)),console['error']('\x20\x20\x201.\x20Make\x20sure\x20no\x20other\x20process\x20is\x20using\x20port\x208080'),console[_0x3f1b4f(0xbd)](_0x3f1b4f(0xb0)),console[_0x3f1b4f(0xbd)](_0x3f1b4f(0xb6)),console[_0x3f1b4f(0xbd)](''),process[_0x3f1b4f(0xb7)](0x1);}}main();function a0_0x36f9(){const _0x3c2d1e=['Socket','✗\x20Server\x20is\x20not\x20running','LOXIA_HOST','message','ignore','stderr','length','--ui','../src/interfaces/terminal/index.js','656880yAUvJx','🎨\x20Launching\x20Ink-based\x20Terminal\x20UI...','now','💡\x20Troubleshooting:','\x20\x20\x202.\x20Try\x20running\x20the\x20server\x20manually:\x20node\x20bin/cli.js','🔍\x20Checking\x20if\x20server\x20is\x20running\x20at\x20','22734IAVfBQ','setTimeout','LOXIA_PORT','🚀\x20Starting\x20Loxia\x20server...','\x20\x20\x203.\x20Check\x20logs\x20for\x20more\x20details','exit','282945LHhCUt','env','1356348xMDYvk','toString','log','error','destroy','7322tmhDjJ','━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━','Server\x20startup\x20timeout','join','data','bin/cli.js','...','1368noUOQE','localhost','stdout','slice','--host','argv','pipe','101816BwKpjE','kill','node','--port','1868260sdDgUb','timeout','dirname','connect'];a0_0x36f9=function(){return _0x3c2d1e;};return a0_0x36f9();}
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- const a0_0x324cbc=a0_0x1c0e;(function(_0x85e984,_0x4822d6){const _0x3f28c9=a0_0x1c0e,_0x177afe=_0x85e984();while(!![]){try{const _0x7e334e=parseInt(_0x3f28c9(0x12c))/0x1*(parseInt(_0x3f28c9(0x114))/0x2)+-parseInt(_0x3f28c9(0x132))/0x3+-parseInt(_0x3f28c9(0x113))/0x4+parseInt(_0x3f28c9(0x11a))/0x5+-parseInt(_0x3f28c9(0x127))/0x6*(-parseInt(_0x3f28c9(0x125))/0x7)+parseInt(_0x3f28c9(0x118))/0x8+-parseInt(_0x3f28c9(0x121))/0x9;if(_0x7e334e===_0x4822d6)break;else _0x177afe['push'](_0x177afe['shift']());}catch(_0x59c761){_0x177afe['push'](_0x177afe['shift']());}}}(a0_0x4617,0x456bc));function a0_0x1c0e(_0x58b36f,_0x24a03e){_0x58b36f=_0x58b36f-0x113;const _0x46173c=a0_0x4617();let _0x1c0eb3=_0x46173c[_0x58b36f];return _0x1c0eb3;}function a0_0x4617(){const _0x16188e=['274hmJMbW','LOXIA_PORT','host','port','2452896JboWBP','\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','2392675ttpkVd','LOXIA_HOST','--host','env','log','\x20\x20-\x20Background\x20processes\x20(e.g.,\x20&\x20at\x20the\x20end)','exit','3975642ntcxmq','Connecting\x20to:\x20','length','waitUntilExit','1373365vqIkhW','ERROR:\x20Terminal\x20UI\x20requires\x20an\x20interactive\x20terminal\x20(TTY).','6hvSlqh','isTTY','\x20\x20-\x20Some\x20CI/CD\x20environments','argv','catch','97AFTrUR','error','--help','slice','\x20\x20-\x20Redirected\x20output\x20(e.g.,\x20>\x20file.txt,\x202>&1\x20|\x20...)','\x20\x20-\x20Piped\x20environments\x20(e.g.,\x20|\x20head,\x20|\x20grep)','431703LiFsuv','stdin','498576pfSRrM'];a0_0x4617=function(){return _0x16188e;};return a0_0x4617();}import{startTerminalUI}from'../src/interfaces/terminal/index.js';const args=process[a0_0x324cbc(0x12a)][a0_0x324cbc(0x12f)](0x2),options={'host':'localhost','port':0x1f90};for(let i=0x0;i<args[a0_0x324cbc(0x123)];i++){const arg=args[i];if(arg===a0_0x324cbc(0x11c)||arg==='-h')options[a0_0x324cbc(0x116)]=args[++i];else{if(arg==='--port'||arg==='-p')options[a0_0x324cbc(0x117)]=parseInt(args[++i],0xa);else arg===a0_0x324cbc(0x12e)&&(console['log'](a0_0x324cbc(0x119)),process[a0_0x324cbc(0x120)](0x0));}}process[a0_0x324cbc(0x11d)]['LOXIA_HOST']&&(options[a0_0x324cbc(0x116)]=process['env'][a0_0x324cbc(0x11b)]);process[a0_0x324cbc(0x11d)][a0_0x324cbc(0x115)]&&(options[a0_0x324cbc(0x117)]=parseInt(process['env']['LOXIA_PORT'],0xa));!process[a0_0x324cbc(0x133)][a0_0x324cbc(0x128)]&&(console['error'](a0_0x324cbc(0x126)),console[a0_0x324cbc(0x12d)](''),console['error']('The\x20terminal\x20UI\x20cannot\x20run\x20in:'),console[a0_0x324cbc(0x12d)](a0_0x324cbc(0x131)),console['error'](a0_0x324cbc(0x130)),console['error'](a0_0x324cbc(0x11f)),console[a0_0x324cbc(0x12d)](a0_0x324cbc(0x129)),console[a0_0x324cbc(0x12d)](''),console[a0_0x324cbc(0x12d)]('Please\x20run\x20this\x20command\x20in\x20a\x20real\x20terminal\x20without\x20pipes\x20or\x20redirection:'),console[a0_0x324cbc(0x12d)]('\x20\x20npm\x20run\x20terminal-ui'),console[a0_0x324cbc(0x12d)](''),console[a0_0x324cbc(0x12d)]('Or\x20use\x20the\x20web\x20UI\x20instead:'),console[a0_0x324cbc(0x12d)]('\x20\x20npm\x20start'),process[a0_0x324cbc(0x120)](0x1));console[a0_0x324cbc(0x11e)]('Starting\x20Loxia\x20Terminal\x20UI...'),console[a0_0x324cbc(0x11e)](a0_0x324cbc(0x122)+options[a0_0x324cbc(0x116)]+':'+options[a0_0x324cbc(0x117)]),console[a0_0x324cbc(0x11e)]('Press\x20Ctrl+C\x20to\x20exit\x0a');const instance=startTerminalUI(options);instance[a0_0x324cbc(0x124)]()['then'](()=>{console['log']('\x0aTerminal\x20UI\x20exited'),process['exit'](0x0);})[a0_0x324cbc(0x12b)](_0x5d5560=>{const _0x271f06=a0_0x324cbc;console['error']('\x0aTerminal\x20UI\x20error:',_0x5d5560),process[_0x271f06(0x120)](0x1);});
3
+ const a0_0x46aa30=a0_0x4c74;(function(_0x4af109,_0xbb0d0d){const _0x955920=a0_0x4c74,_0xc3acf3=_0x4af109();while(!![]){try{const _0x218f70=parseInt(_0x955920(0x1cb))/0x1+parseInt(_0x955920(0x1a8))/0x2*(-parseInt(_0x955920(0x1c3))/0x3)+parseInt(_0x955920(0x1bf))/0x4+parseInt(_0x955920(0x1c9))/0x5*(parseInt(_0x955920(0x1cd))/0x6)+-parseInt(_0x955920(0x1b5))/0x7+parseInt(_0x955920(0x1c8))/0x8*(-parseInt(_0x955920(0x1a7))/0x9)+parseInt(_0x955920(0x1b6))/0xa*(parseInt(_0x955920(0x1ae))/0xb);if(_0x218f70===_0xbb0d0d)break;else _0xc3acf3['push'](_0xc3acf3['shift']());}catch(_0x5c09e4){_0xc3acf3['push'](_0xc3acf3['shift']());}}}(a0_0x4dde,0x4430b));function a0_0x4dde(){const _0x39908b=['Connecting\x20to:\x20','6012DUIIsa','748elSHNT','\x0aTerminal\x20UI\x20error:','Press\x20Ctrl+C\x20to\x20exit\x0a','\x20\x20npm\x20start','\x20\x20-\x20Background\x20processes\x20(e.g.,\x20&\x20at\x20the\x20end)','--host','902ZlpfHD','--help','stdin','localhost','length','exit','LOXIA_PORT','2911734ZXNvKe','90490TZtURh','env','\x20\x20-\x20Redirected\x20output\x20(e.g.,\x20>\x20file.txt,\x202>&1\x20|\x20...)','error','Starting\x20Loxia\x20Terminal\x20UI...','\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','log','LOXIA_HOST','waitUntilExit','1481612WnBYZx','argv','\x20\x20-\x20Piped\x20environments\x20(e.g.,\x20|\x20head,\x20|\x20grep)','The\x20terminal\x20UI\x20cannot\x20run\x20in:','2370RNZYPd','host','isTTY','Please\x20run\x20this\x20command\x20in\x20a\x20real\x20terminal\x20without\x20pipes\x20or\x20redirection:','\x20\x20-\x20Some\x20CI/CD\x20environments','6576hvNiYP','695795btHkFJ','ERROR:\x20Terminal\x20UI\x20requires\x20an\x20interactive\x20terminal\x20(TTY).','288245GaqbPD','port','6bILsEq','--port','\x20\x20npm\x20run\x20terminal-ui'];a0_0x4dde=function(){return _0x39908b;};return a0_0x4dde();}import{startTerminalUI}from'../src/interfaces/terminal/index.js';const args=process[a0_0x46aa30(0x1c0)]['slice'](0x2),options={'host':a0_0x46aa30(0x1b1),'port':0x1f90};function a0_0x4c74(_0x2fdb24,_0x3cec33){_0x2fdb24=_0x2fdb24-0x1a5;const _0x4dde0d=a0_0x4dde();let _0x4c7470=_0x4dde0d[_0x2fdb24];return _0x4c7470;}for(let i=0x0;i<args[a0_0x46aa30(0x1b2)];i++){const arg=args[i];if(arg===a0_0x46aa30(0x1ad)||arg==='-h')options['host']=args[++i];else{if(arg===a0_0x46aa30(0x1ce)||arg==='-p')options[a0_0x46aa30(0x1cc)]=parseInt(args[++i],0xa);else arg===a0_0x46aa30(0x1af)&&(console['log'](a0_0x46aa30(0x1bb)),process[a0_0x46aa30(0x1b3)](0x0));}}process[a0_0x46aa30(0x1b7)][a0_0x46aa30(0x1bd)]&&(options[a0_0x46aa30(0x1c4)]=process[a0_0x46aa30(0x1b7)][a0_0x46aa30(0x1bd)]);process[a0_0x46aa30(0x1b7)][a0_0x46aa30(0x1b4)]&&(options[a0_0x46aa30(0x1cc)]=parseInt(process['env']['LOXIA_PORT'],0xa));!process[a0_0x46aa30(0x1b0)][a0_0x46aa30(0x1c5)]&&(console['error'](a0_0x46aa30(0x1ca)),console['error'](''),console['error'](a0_0x46aa30(0x1c2)),console[a0_0x46aa30(0x1b9)](a0_0x46aa30(0x1c1)),console[a0_0x46aa30(0x1b9)](a0_0x46aa30(0x1b8)),console[a0_0x46aa30(0x1b9)](a0_0x46aa30(0x1ac)),console[a0_0x46aa30(0x1b9)](a0_0x46aa30(0x1c7)),console[a0_0x46aa30(0x1b9)](''),console[a0_0x46aa30(0x1b9)](a0_0x46aa30(0x1c6)),console['error'](a0_0x46aa30(0x1a5)),console['error'](''),console[a0_0x46aa30(0x1b9)]('Or\x20use\x20the\x20web\x20UI\x20instead:'),console[a0_0x46aa30(0x1b9)](a0_0x46aa30(0x1ab)),process[a0_0x46aa30(0x1b3)](0x1));console[a0_0x46aa30(0x1bc)](a0_0x46aa30(0x1ba)),console['log'](a0_0x46aa30(0x1a6)+options[a0_0x46aa30(0x1c4)]+':'+options[a0_0x46aa30(0x1cc)]),console[a0_0x46aa30(0x1bc)](a0_0x46aa30(0x1aa));const instance=startTerminalUI(options);instance[a0_0x46aa30(0x1be)]()['then'](()=>{const _0x677d46=a0_0x46aa30;console[_0x677d46(0x1bc)]('\x0aTerminal\x20UI\x20exited'),process[_0x677d46(0x1b3)](0x0);})['catch'](_0x4bec82=>{const _0x4d996f=a0_0x46aa30;console[_0x4d996f(0x1b9)](_0x4d996f(0x1a9),_0x4bec82),process[_0x4d996f(0x1b3)](0x1);});
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- const a0_0x30bd90=a0_0x1637;(function(_0x1c3d03,_0x2c2eb7){const _0xc9b422=a0_0x1637,_0x44f6c4=_0x1c3d03();while(!![]){try{const _0x37150f=parseInt(_0xc9b422(0x1ce))/0x1+-parseInt(_0xc9b422(0x1b7))/0x2+parseInt(_0xc9b422(0x1a2))/0x3+-parseInt(_0xc9b422(0x1ba))/0x4*(-parseInt(_0xc9b422(0x1c3))/0x5)+-parseInt(_0xc9b422(0x1ad))/0x6+-parseInt(_0xc9b422(0x1d1))/0x7+-parseInt(_0xc9b422(0x1b5))/0x8*(-parseInt(_0xc9b422(0x1a7))/0x9);if(_0x37150f===_0x2c2eb7)break;else _0x44f6c4['push'](_0x44f6c4['shift']());}catch(_0x294ce4){_0x44f6c4['push'](_0x44f6c4['shift']());}}}(a0_0x3e92,0x39dee));import{spawn}from'child_process';import{fileURLToPath}from'url';function a0_0x1637(_0x568003,_0x5ab689){_0x568003=_0x568003-0x19f;const _0x3e92d1=a0_0x3e92();let _0x1637b3=_0x3e92d1[_0x568003];return _0x1637b3;}import{dirname,join}from'path';import a0_0x497fdc from'http';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename),rootDir=join(__dirname,'..'),SERVER_PORT=process['env'][a0_0x30bd90(0x1b6)]||0x1f90,STARTUP_WAIT=0x7d0;let serverProcess=null;async function checkServerReady(_0x56f617=0xa,_0x18a67c=0x1f4){const _0xa2ea3c=a0_0x30bd90;for(let _0x479b9c=0x0;_0x479b9c<_0x56f617;_0x479b9c++){try{return await new Promise((_0x14ce61,_0x5f1dbe)=>{const _0x2fbe90=a0_0x1637,_0xa803f=a0_0x497fdc[_0x2fbe90(0x1b3)](_0x2fbe90(0x1af)+SERVER_PORT+'/health',_0x36b95f=>{const _0xbce4c1=_0x2fbe90;_0x36b95f['statusCode']===0xc8?_0x14ce61():_0x5f1dbe(new Error(_0xbce4c1(0x1c7)+_0x36b95f[_0xbce4c1(0x1cc)]));});_0xa803f['on'](_0x2fbe90(0x1b9),_0x5f1dbe),_0xa803f[_0x2fbe90(0x1a4)](0x3e8,()=>{const _0x1a7648=_0x2fbe90;_0xa803f[_0x1a7648(0x1bc)](),_0x5f1dbe(new Error(_0x1a7648(0x1d2)));});}),console[_0xa2ea3c(0x1cf)](_0xa2ea3c(0x1cb)),!![];}catch(_0x156e00){_0x479b9c<_0x56f617-0x1&&await new Promise(_0xf70640=>setTimeout(_0xf70640,_0x18a67c));}}return console[_0xa2ea3c(0x1cf)]('⚠️\x20\x20Server\x20may\x20not\x20be\x20fully\x20ready,\x20but\x20continuing\x20anyway...'),![];}async function startServer(){return new Promise(_0x16a436=>{const _0x5b6f05=a0_0x1637;console['log'](_0x5b6f05(0x1b4));const _0x2b0821=join(rootDir,_0x5b6f05(0x1bf),_0x5b6f05(0x1ca));serverProcess=spawn(_0x5b6f05(0x1c9),[_0x2b0821],{'cwd':rootDir,'env':{...process[_0x5b6f05(0x1a8)]},'stdio':[_0x5b6f05(0x1a1),_0x5b6f05(0x1a9),_0x5b6f05(0x1a9)],'detached':![]}),serverProcess[_0x5b6f05(0x1a3)]['on']('data',_0x44e768=>{const _0x295bfb=_0x5b6f05,_0x140d5d=_0x44e768[_0x295bfb(0x1b8)]()[_0x295bfb(0x1c5)]();_0x140d5d&&console[_0x295bfb(0x1cf)](_0x295bfb(0x1ab)+_0x140d5d);}),serverProcess[_0x5b6f05(0x1bb)]['on'](_0x5b6f05(0x1d0),_0x4d3fd5=>{const _0x292417=_0x5b6f05,_0x2a120a=_0x4d3fd5[_0x292417(0x1b8)]()[_0x292417(0x1c5)]();_0x2a120a&&!_0x2a120a['includes']('ExperimentalWarning')&&console['error'](_0x292417(0x1b0)+_0x2a120a);}),serverProcess['on'](_0x5b6f05(0x1b9),_0x2fd4bb=>{const _0x4b2571=_0x5b6f05;console['error'](_0x4b2571(0x1b2),_0x2fd4bb[_0x4b2571(0x1c6)]),process['exit'](0x1);}),serverProcess['on'](_0x5b6f05(0x1aa),(_0x3993ee,_0x4a06d4)=>{const _0x18b544=_0x5b6f05;_0x3993ee!==null&&_0x3993ee!==0x0&&(console[_0x18b544(0x1b9)](_0x18b544(0x1cd)+_0x3993ee),process[_0x18b544(0x1aa)](_0x3993ee));}),setTimeout(_0x16a436,STARTUP_WAIT);});}async function startTerminalUI(){const _0x40847c=a0_0x30bd90;console[_0x40847c(0x1cf)](_0x40847c(0x1c1)),console[_0x40847c(0x1cf)]('');const _0x57a478=join(rootDir,_0x40847c(0x1c4),'loxia-terminal.js'),_0xee790a=spawn('node',[_0x57a478],{'cwd':rootDir,'env':{...process[_0x40847c(0x1a8)]},'stdio':_0x40847c(0x1a6)});return _0xee790a['on']('error',_0x2bf173=>{const _0x17a00b=_0x40847c;console[_0x17a00b(0x1b9)](_0x17a00b(0x1c2),_0x2bf173[_0x17a00b(0x1c6)]),cleanup(),process[_0x17a00b(0x1aa)](0x1);}),_0xee790a['on']('exit',_0x94c138=>{const _0x1cd988=_0x40847c;console[_0x1cd988(0x1cf)](_0x1cd988(0x1c0)),cleanup(),process[_0x1cd988(0x1aa)](_0x94c138||0x0);}),_0xee790a;}function cleanup(){const _0x4eace4=a0_0x30bd90;serverProcess&&!serverProcess[_0x4eace4(0x1be)]&&(console[_0x4eace4(0x1cf)](_0x4eace4(0x1c8)),serverProcess['kill'](_0x4eace4(0x1a0)),setTimeout(()=>{const _0xe46bc2=_0x4eace4;!serverProcess[_0xe46bc2(0x1be)]&&serverProcess['kill'](_0xe46bc2(0x1bd));},0x1388));}process['on']('SIGINT',()=>{const _0x4667a5=a0_0x30bd90;console[_0x4667a5(0x1cf)](_0x4667a5(0x1a5)),cleanup(),process[_0x4667a5(0x1aa)](0x0);}),process['on'](a0_0x30bd90(0x1a0),()=>{const _0xb4fee1=a0_0x30bd90;console[_0xb4fee1(0x1cf)]('\x0a⚠️\x20\x20Received\x20SIGTERM,\x20shutting\x20down...'),cleanup(),process['exit'](0x0);}),process['on'](a0_0x30bd90(0x1aa),()=>{cleanup();});function a0_0x3e92(){const _0xf9a5d9=['1537878USmWQA','╚════════════════════════════════════════════════╝','http://localhost:','[SERVER\x20ERROR]\x20','Error\x20during\x20startup:','Failed\x20to\x20start\x20server:','get','🚀\x20Starting\x20Loxia\x20server...','5704DdNgQD','PORT','77852HtTwyr','toString','error','158252NQnSaF','stderr','destroy','SIGKILL','killed','src','\x0a👋\x20Terminal\x20UI\x20closed.','🖥️\x20\x20Starting\x20Terminal\x20UI...','Failed\x20to\x20start\x20Terminal\x20UI:','45bKemgu','bin','trim','message','Server\x20returned\x20','🛑\x20Stopping\x20server...','node','index.js','✅\x20Server\x20is\x20ready!','statusCode','Server\x20exited\x20with\x20code\x20','458317hSWqYO','log','data','3152394AEGztO','Timeout','╔════════════════════════════════════════════════╗','SIGTERM','ignore','76905QUcKai','stdout','setTimeout','\x0a⚠️\x20\x20Received\x20SIGINT,\x20shutting\x20down...','inherit','1800WFgGOF','env','pipe','exit','[SERVER]\x20','║\x20\x20\x20Loxia\x20AI\x20Agents\x20-\x20Server\x20+\x20Terminal\x20UI\x20\x20\x20\x20\x20\x20║'];a0_0x3e92=function(){return _0xf9a5d9;};return a0_0x3e92();}async function main(){const _0x978a9=a0_0x30bd90;console[_0x978a9(0x1cf)](_0x978a9(0x19f)),console[_0x978a9(0x1cf)](_0x978a9(0x1ac)),console[_0x978a9(0x1cf)](_0x978a9(0x1ae)),console[_0x978a9(0x1cf)]('');try{await startServer(),await checkServerReady(),await startTerminalUI(),await new Promise(()=>{});}catch(_0x575159){console[_0x978a9(0x1b9)](_0x978a9(0x1b1),_0x575159[_0x978a9(0x1c6)]),cleanup(),process[_0x978a9(0x1aa)](0x1);}}main();
3
+ const a0_0x471d8e=a0_0x2e89;(function(_0x5720d1,_0x2c544f){const _0x41d41b=a0_0x2e89,_0x2f3647=_0x5720d1();while(!![]){try{const _0x4dc530=-parseInt(_0x41d41b(0x131))/0x1*(parseInt(_0x41d41b(0x142))/0x2)+-parseInt(_0x41d41b(0x11f))/0x3*(parseInt(_0x41d41b(0x124))/0x4)+parseInt(_0x41d41b(0x145))/0x5*(-parseInt(_0x41d41b(0x12a))/0x6)+parseInt(_0x41d41b(0x14a))/0x7+parseInt(_0x41d41b(0x139))/0x8*(parseInt(_0x41d41b(0x123))/0x9)+parseInt(_0x41d41b(0x13f))/0xa*(-parseInt(_0x41d41b(0x120))/0xb)+parseInt(_0x41d41b(0x147))/0xc;if(_0x4dc530===_0x2c544f)break;else _0x2f3647['push'](_0x2f3647['shift']());}catch(_0x19bf7e){_0x2f3647['push'](_0x2f3647['shift']());}}}(a0_0x49fe,0x57118));import{spawn}from'child_process';import{fileURLToPath}from'url';import{dirname,join}from'path';import a0_0x549628 from'http';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename),rootDir=join(__dirname,'..'),SERVER_PORT=process[a0_0x471d8e(0x11e)]['PORT']||0x1f90,STARTUP_WAIT=0x7d0;let serverProcess=null;async function checkServerReady(_0x17a8ff=0xa,_0x5a9c63=0x1f4){const _0x5410bf=a0_0x471d8e;for(let _0x556241=0x0;_0x556241<_0x17a8ff;_0x556241++){try{return await new Promise((_0x34c122,_0x333525)=>{const _0x9fdd1d=a0_0x2e89,_0x27ab58=a0_0x549628['get'](_0x9fdd1d(0x128)+SERVER_PORT+_0x9fdd1d(0x121),_0x16a614=>{const _0x4621c8=_0x9fdd1d;_0x16a614['statusCode']===0xc8?_0x34c122():_0x333525(new Error(_0x4621c8(0x11c)+_0x16a614[_0x4621c8(0x13d)]));});_0x27ab58['on']('error',_0x333525),_0x27ab58['setTimeout'](0x3e8,()=>{const _0x3695f9=_0x9fdd1d;_0x27ab58[_0x3695f9(0x14b)](),_0x333525(new Error(_0x3695f9(0x13e)));});}),console['log'](_0x5410bf(0x12f)),!![];}catch(_0x4bfa36){_0x556241<_0x17a8ff-0x1&&await new Promise(_0x3dd0ba=>setTimeout(_0x3dd0ba,_0x5a9c63));}}return console['log']('⚠️\x20\x20Server\x20may\x20not\x20be\x20fully\x20ready,\x20but\x20continuing\x20anyway...'),![];}function a0_0x49fe(){const _0x4fddc9=['6dyVPnV','133804ODpOOX','/health','includes','13554MZKWLk','974692TYJkGg','\x0a⚠️\x20\x20Received\x20SIGTERM,\x20shutting\x20down...','src','Failed\x20to\x20start\x20Terminal\x20UI:','http://localhost:','╔════════════════════════════════════════════════╗','264930iQCZtA','node','error','SIGTERM','╚════════════════════════════════════════════════╝','✅\x20Server\x20is\x20ready!','toString','6344dcbTJl','[SERVER]\x20','log','ExperimentalWarning','\x0a👋\x20Terminal\x20UI\x20closed.','║\x20\x20\x20Loxia\x20AI\x20Agents\x20-\x20Server\x20+\x20Terminal\x20UI\x20\x20\x20\x20\x20\x20║','ignore','data','1704NCHxXf','killed','stderr','trim','statusCode','Timeout','140twvnKh','Server\x20exited\x20with\x20code\x20','pipe','24QQsaxg','message','kill','80fugdQY','exit','14557596yNMRPj','[SERVER\x20ERROR]\x20','Failed\x20to\x20start\x20server:','1840797foOgBF','destroy','index.js','inherit','stdout','SIGINT','🚀\x20Starting\x20Loxia\x20server...','Server\x20returned\x20','bin','env'];a0_0x49fe=function(){return _0x4fddc9;};return a0_0x49fe();}async function startServer(){return new Promise(_0x4a2d0d=>{const _0x2afcbf=a0_0x2e89;console[_0x2afcbf(0x133)](_0x2afcbf(0x11b));const _0x515a27=join(rootDir,_0x2afcbf(0x126),_0x2afcbf(0x14c));serverProcess=spawn(_0x2afcbf(0x12b),[_0x515a27],{'cwd':rootDir,'env':{...process[_0x2afcbf(0x11e)]},'stdio':[_0x2afcbf(0x137),_0x2afcbf(0x141),_0x2afcbf(0x141)],'detached':![]}),serverProcess[_0x2afcbf(0x14e)]['on'](_0x2afcbf(0x138),_0x16e6b3=>{const _0x594567=_0x2afcbf,_0x215be0=_0x16e6b3[_0x594567(0x130)]()[_0x594567(0x13c)]();_0x215be0&&console['log'](_0x594567(0x132)+_0x215be0);}),serverProcess[_0x2afcbf(0x13b)]['on'](_0x2afcbf(0x138),_0x2392c6=>{const _0x321b80=_0x2afcbf,_0x4872b2=_0x2392c6[_0x321b80(0x130)]()[_0x321b80(0x13c)]();_0x4872b2&&!_0x4872b2[_0x321b80(0x122)](_0x321b80(0x134))&&console[_0x321b80(0x12c)](_0x321b80(0x148)+_0x4872b2);}),serverProcess['on']('error',_0x1369d7=>{const _0x461608=_0x2afcbf;console['error'](_0x461608(0x149),_0x1369d7[_0x461608(0x143)]),process[_0x461608(0x146)](0x1);}),serverProcess['on'](_0x2afcbf(0x146),(_0x3d2f2f,_0x49dfde)=>{const _0x4e730d=_0x2afcbf;_0x3d2f2f!==null&&_0x3d2f2f!==0x0&&(console[_0x4e730d(0x12c)](_0x4e730d(0x140)+_0x3d2f2f),process['exit'](_0x3d2f2f));}),setTimeout(_0x4a2d0d,STARTUP_WAIT);});}async function startTerminalUI(){const _0x538bed=a0_0x471d8e;console[_0x538bed(0x133)]('🖥️\x20\x20Starting\x20Terminal\x20UI...'),console[_0x538bed(0x133)]('');const _0x1ac397=join(rootDir,_0x538bed(0x11d),'loxia-terminal.js'),_0x4d59af=spawn(_0x538bed(0x12b),[_0x1ac397],{'cwd':rootDir,'env':{...process[_0x538bed(0x11e)]},'stdio':_0x538bed(0x14d)});return _0x4d59af['on'](_0x538bed(0x12c),_0x3f228d=>{const _0x4343c6=_0x538bed;console[_0x4343c6(0x12c)](_0x4343c6(0x127),_0x3f228d[_0x4343c6(0x143)]),cleanup(),process[_0x4343c6(0x146)](0x1);}),_0x4d59af['on'](_0x538bed(0x146),_0x11ab95=>{const _0x45dea0=_0x538bed;console['log'](_0x45dea0(0x135)),cleanup(),process[_0x45dea0(0x146)](_0x11ab95||0x0);}),_0x4d59af;}function a0_0x2e89(_0x5d720c,_0x217d8a){_0x5d720c=_0x5d720c-0x11a;const _0x49fe2e=a0_0x49fe();let _0x2e8964=_0x49fe2e[_0x5d720c];return _0x2e8964;}function cleanup(){const _0x4c9a2e=a0_0x471d8e;serverProcess&&!serverProcess[_0x4c9a2e(0x13a)]&&(console[_0x4c9a2e(0x133)]('🛑\x20Stopping\x20server...'),serverProcess[_0x4c9a2e(0x144)](_0x4c9a2e(0x12d)),setTimeout(()=>{const _0x2ef9b1=_0x4c9a2e;!serverProcess['killed']&&serverProcess[_0x2ef9b1(0x144)]('SIGKILL');},0x1388));}process['on'](a0_0x471d8e(0x11a),()=>{const _0x20f8e2=a0_0x471d8e;console[_0x20f8e2(0x133)]('\x0a⚠️\x20\x20Received\x20SIGINT,\x20shutting\x20down...'),cleanup(),process[_0x20f8e2(0x146)](0x0);}),process['on'](a0_0x471d8e(0x12d),()=>{const _0xfb03d6=a0_0x471d8e;console['log'](_0xfb03d6(0x125)),cleanup(),process['exit'](0x0);}),process['on']('exit',()=>{cleanup();});async function main(){const _0x545afe=a0_0x471d8e;console['log'](_0x545afe(0x129)),console[_0x545afe(0x133)](_0x545afe(0x136)),console[_0x545afe(0x133)](_0x545afe(0x12e)),console[_0x545afe(0x133)]('');try{await startServer(),await checkServerReady(),await startTerminalUI(),await new Promise(()=>{});}catch(_0x4636b8){console[_0x545afe(0x12c)]('Error\x20during\x20startup:',_0x4636b8[_0x545afe(0x143)]),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": "1.0.5",
3
+ "version": "1.0.7",
4
4
  "description": "Loxia AI Agents System - No-code/vibe-code/companion-coder platform",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- const a0_0x1d159b=a0_0x2484;(function(_0x16a2d3,_0x36508e){const _0x1d9b6b=a0_0x2484,_0x3c9fca=_0x16a2d3();while(!![]){try{const _0xc0120=-parseInt(_0x1d9b6b(0xea))/0x1+parseInt(_0x1d9b6b(0x100))/0x2+-parseInt(_0x1d9b6b(0xcf))/0x3*(-parseInt(_0x1d9b6b(0x103))/0x4)+-parseInt(_0x1d9b6b(0xf1))/0x5*(parseInt(_0x1d9b6b(0x108))/0x6)+-parseInt(_0x1d9b6b(0xd7))/0x7*(-parseInt(_0x1d9b6b(0xe7))/0x8)+parseInt(_0x1d9b6b(0x10a))/0x9+-parseInt(_0x1d9b6b(0xce))/0xa*(parseInt(_0x1d9b6b(0xfc))/0xb);if(_0xc0120===_0x36508e)break;else _0x3c9fca['push'](_0x3c9fca['shift']());}catch(_0x23e10c){_0x3c9fca['push'](_0x3c9fca['shift']());}}}(a0_0x2116,0x3403c));function a0_0x2116(){const _0x1a2d20=['192322pdHRIF','\x20\x20pip\x20install\x20semgrep\x20bandit\x20pip-audit','\x20\x20\x20⚠️\x20\x20Failed\x20to\x20install\x20','1027204CCIEJq','\x20\x20\x20Location:\x20','\x20\x20\x20Note:\x20To\x20use\x20system-wide,\x20add\x20to\x20PATH\x20or\x20install\x20globally:','\x20\x20\x20⚠️\x20\x20eslint-plugin-security\x20not\x20found','\x20-m\x20pip\x20show\x20','6RdYQZb','get','2687976LMDDLR','.scanners','startsWith','location','\x20\x20\x20pip\x20install\x20semgrep\x20bandit\x20pip-audit\x20checkov\x20yamllint\x0a','semgrep','📦\x20Checking\x20ESLint\x20Security\x20Plugin...','\x20\x20\x20⚠️\x20\x20No\x20Semgrep\x20binary\x20available\x20for\x20','statusCode','\x20\x20\x20Using\x20system-installed\x20Semgrep\x0a','error','platform','close','5540FByeDp','3EUahrh','yamllint','\x20\x20\x20✅\x20Semgrep\x20already\x20installed:\x20','https','\x20\x20\x20✅\x20eslint-plugin-security\x20is\x20installed\x0a','\x20\x20\x20pip\x20install\x20semgrep\x0a','Failed\x20to\x20download:\x20HTTP\x20','python','749IjgTPr','pipe','═══════════════════════════════════════════════════════════\x0a','\x20\x20\x20✅\x20Python\x20found:\x20','join','\x20\x20\x20You\x20can\x20install\x20manually:\x20pip\x20install\x20','\x20\x20\x20Please\x20install\x20manually:\x20https://semgrep.dev/docs/getting-started/\x0a','pip-audit','promises','═══════════════════════════════════════════════════════════','\x20\x20npm\x20install\x20--save-dev\x20eslint-plugin-security','🐍\x20Checking\x20Python\x20scanners...','\x20\x20\x20⚠️\x20\x20Python\x20not\x20found\x20-\x20skipping\x20Python\x20scanners','python\x20--version','finish','log','21208apIobo','then','🔍\x20Installing\x20Semgrep...','3974TeWVib','message','\x20\x20\x20Installing\x20','\x20\x20\x20✅\x20','\x20\x20Installing\x20Security\x20Scanners','\x20installed\x20successfully','\x20\x20\x20Run:\x20npm\x20install\x20--save-dev\x20eslint-plugin-security\x0a','511045LfbfVc','url','semgrep\x20--version','\x20\x20\x20To\x20enable\x20Python\x20scanning,\x20install\x20Python\x20and\x20run:','v1.55.0','node_modules','stdout','exit','\x20\x20\x20✅\x20Semgrep\x20installed\x20successfully','\x20\x20\x20Semgrep\x20not\x20found\x20in\x20PATH,\x20installing\x20standalone\x20binary...','trim','12232SXCaTD','\x20\x20\x20You\x20can\x20install\x20manually:\x20pip\x20install\x20semgrep\x0a','dirname','...'];a0_0x2116=function(){return _0x1a2d20;};return a0_0x2116();}import{exec}from'child_process';import{promisify}from'util';import a0_0x3b027f from'https';import a0_0x397531 from'http';import a0_0x8223b5 from'fs';import a0_0x573003 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_0x573003[a0_0x1d159b(0xfe)](__filename),SCANNER_DIR=a0_0x573003[a0_0x1d159b(0xdb)](__dirname,'..',a0_0x1d159b(0xf6),a0_0x1d159b(0x10b)),SEMGREP_VERSION=a0_0x1d159b(0xf5);console[a0_0x1d159b(0xe6)](a0_0x1d159b(0xe0)),console[a0_0x1d159b(0xe6)](a0_0x1d159b(0xee)),console[a0_0x1d159b(0xe6)](a0_0x1d159b(0xd9));async function installScanners(){const _0x8953ff=a0_0x1d159b;await a0_0x8223b5[_0x8953ff(0xdf)]['mkdir'](SCANNER_DIR,{'recursive':!![]}),await checkESLintSecurity(),await installSemgrep(),await installPythonScanners(),console[_0x8953ff(0xe6)]('\x0a═══════════════════════════════════════════════════════════'),console[_0x8953ff(0xe6)]('\x20\x20Installation\x20Complete'),console[_0x8953ff(0xe6)](_0x8953ff(0xd9));}async function checkESLintSecurity(){const _0x2c2cc6=a0_0x1d159b;console['log'](_0x2c2cc6(0x110));try{await import('eslint-plugin-security'),console[_0x2c2cc6(0xe6)](_0x2c2cc6(0xd3));}catch(_0x2ceb0e){console['log'](_0x2c2cc6(0x106)),console[_0x2c2cc6(0xe6)](_0x2c2cc6(0xf0));}}async function installSemgrep(){const _0x38b9a9=a0_0x1d159b;console[_0x38b9a9(0xe6)](_0x38b9a9(0xe9));const _0x4accb7=process[_0x38b9a9(0xcc)],_0x23fa45=process['arch'];try{const _0xcb0fa4=await execAsync(_0x38b9a9(0xf3),{'timeout':0x1388});console['log'](_0x38b9a9(0xd1)+_0xcb0fa4[_0x38b9a9(0xf7)][_0x38b9a9(0xfb)]()),console['log'](_0x38b9a9(0x113));return;}catch(_0x59cba3){console['log'](_0x38b9a9(0xfa));}const _0x39a13e=getSemgrepBinaryInfo(_0x4accb7,_0x23fa45);if(!_0x39a13e){console['log'](_0x38b9a9(0x111)+_0x4accb7+'-'+_0x23fa45),console[_0x38b9a9(0xe6)](_0x38b9a9(0xdd));return;}try{const _0x159fcc=a0_0x573003[_0x38b9a9(0xdb)](SCANNER_DIR,'semgrep');console[_0x38b9a9(0xe6)]('\x20\x20\x20Downloading\x20from\x20'+_0x39a13e[_0x38b9a9(0xf2)]+_0x38b9a9(0xff)),await downloadFile(_0x39a13e['url'],_0x159fcc),await a0_0x8223b5[_0x38b9a9(0xdf)]['chmod'](_0x159fcc,0x1ed),console[_0x38b9a9(0xe6)](_0x38b9a9(0xf9)),console[_0x38b9a9(0xe6)](_0x38b9a9(0x104)+_0x159fcc+'\x0a'),console['log'](_0x38b9a9(0x105)),console['log'](_0x38b9a9(0xd4));}catch(_0x2f304e){console['log']('\x20\x20\x20⚠️\x20\x20Failed\x20to\x20install\x20Semgrep:\x20'+_0x2f304e[_0x38b9a9(0xeb)]),console[_0x38b9a9(0xe6)](_0x38b9a9(0xfd));}}function getSemgrepBinaryInfo(_0xd4aa66,_0x256a38){return null;}async function installPythonScanners(){const _0x2b16bd=a0_0x1d159b;console['log'](_0x2b16bd(0xe2));let _0x3b0e8f=null;try{await execAsync('python3\x20--version',{'timeout':0x1388}),_0x3b0e8f='python3';}catch(_0xa1d3cd){try{await execAsync(_0x2b16bd(0xe4),{'timeout':0x1388}),_0x3b0e8f=_0x2b16bd(0xd6);}catch(_0x2cf2e8){console[_0x2b16bd(0xe6)](_0x2b16bd(0xe3)),console[_0x2b16bd(0xe6)](_0x2b16bd(0xf4)),console[_0x2b16bd(0xe6)](_0x2b16bd(0x10e));return;}}console['log'](_0x2b16bd(0xda)+_0x3b0e8f),await installViaPip(_0x2b16bd(0x10f),_0x3b0e8f),await installViaPip('bandit',_0x3b0e8f),await installViaPip(_0x2b16bd(0xde),_0x3b0e8f),await installViaPip('checkov',_0x3b0e8f),await installViaPip(_0x2b16bd(0xd0),_0x3b0e8f),console[_0x2b16bd(0xe6)]('');}async function installViaPip(_0x3ba79f,_0x152e02){const _0x55e3ba=a0_0x1d159b;try{const _0x1e7c8f=await execAsync(_0x152e02+_0x55e3ba(0x107)+_0x3ba79f,{'timeout':0x1388});return console[_0x55e3ba(0xe6)](_0x55e3ba(0xed)+_0x3ba79f+'\x20already\x20installed'),!![];}catch(_0x200db7){console['log'](_0x55e3ba(0xec)+_0x3ba79f+_0x55e3ba(0xff));try{return await execAsync(_0x152e02+'\x20-m\x20pip\x20install\x20--user\x20'+_0x3ba79f,{'timeout':0xea60}),console[_0x55e3ba(0xe6)](_0x55e3ba(0xed)+_0x3ba79f+_0x55e3ba(0xef)),!![];}catch(_0x58ed59){return console[_0x55e3ba(0xe6)](_0x55e3ba(0x102)+_0x3ba79f+':\x20'+_0x58ed59[_0x55e3ba(0xeb)]),console['log'](_0x55e3ba(0xdc)+_0x3ba79f),![];}}}async function downloadFile(_0x2a1a6e,_0x1b9692){return new Promise((_0x555722,_0x2f16b2)=>{const _0x89ec5a=a0_0x2484,_0x43c9e0=_0x2a1a6e[_0x89ec5a(0x10c)](_0x89ec5a(0xd2))?a0_0x3b027f:a0_0x397531;_0x43c9e0[_0x89ec5a(0x109)](_0x2a1a6e,_0x4d9eb9=>{const _0x5375be=_0x89ec5a;if(_0x4d9eb9[_0x5375be(0x112)]===0x12e||_0x4d9eb9[_0x5375be(0x112)]===0x12d){downloadFile(_0x4d9eb9['headers'][_0x5375be(0x10d)],_0x1b9692)[_0x5375be(0xe8)](_0x555722)['catch'](_0x2f16b2);return;}if(_0x4d9eb9[_0x5375be(0x112)]!==0xc8){_0x2f16b2(new Error(_0x5375be(0xd5)+_0x4d9eb9[_0x5375be(0x112)]));return;}const _0x44e5c3=createWriteStream(_0x1b9692);_0x4d9eb9[_0x5375be(0xd8)](_0x44e5c3),_0x44e5c3['on'](_0x5375be(0xe5),()=>{const _0x1eb7d0=_0x5375be;_0x44e5c3[_0x1eb7d0(0xcd)](),_0x555722();}),_0x44e5c3['on'](_0x5375be(0xcb),_0x48b435=>{a0_0x8223b5['unlink'](_0x1b9692,()=>{}),_0x2f16b2(_0x48b435);});})['on'](_0x89ec5a(0xcb),_0x2f16b2);});}function a0_0x2484(_0x411c83,_0x289072){_0x411c83=_0x411c83-0xcb;const _0x211641=a0_0x2116();let _0x2484b9=_0x211641[_0x411c83];return _0x2484b9;}installScanners()['catch'](_0x36f92b=>{const _0x5064b8=a0_0x1d159b;console[_0x5064b8(0xcb)]('❌\x20Installation\x20failed:',_0x36f92b[_0x5064b8(0xeb)]),console[_0x5064b8(0xcb)]('\x0aYou\x20can\x20manually\x20install\x20scanners:'),console[_0x5064b8(0xcb)](_0x5064b8(0xe1)),console[_0x5064b8(0xcb)](_0x5064b8(0x101)),process[_0x5064b8(0xf8)](0x0);});
2
+ const a0_0x379162=a0_0x1a8e;(function(_0x1e6128,_0x74437){const _0x37be9b=a0_0x1a8e,_0x268b14=_0x1e6128();while(!![]){try{const _0x1a4497=parseInt(_0x37be9b(0x1d0))/0x1*(-parseInt(_0x37be9b(0x1e1))/0x2)+parseInt(_0x37be9b(0x1ae))/0x3*(parseInt(_0x37be9b(0x1c3))/0x4)+parseInt(_0x37be9b(0x1cd))/0x5*(-parseInt(_0x37be9b(0x1c4))/0x6)+parseInt(_0x37be9b(0x1e2))/0x7*(-parseInt(_0x37be9b(0x1ac))/0x8)+-parseInt(_0x37be9b(0x1c5))/0x9*(-parseInt(_0x37be9b(0x1e3))/0xa)+-parseInt(_0x37be9b(0x1dd))/0xb*(-parseInt(_0x37be9b(0x19d))/0xc)+parseInt(_0x37be9b(0x19c))/0xd;if(_0x1a4497===_0x74437)break;else _0x268b14['push'](_0x268b14['shift']());}catch(_0x6f1da5){_0x268b14['push'](_0x268b14['shift']());}}}(a0_0x21fb,0x7784c));import{exec}from'child_process';import{promisify}from'util';import a0_0x577dee from'https';function a0_0x1a8e(_0x54d7fe,_0x10b55d){_0x54d7fe=_0x54d7fe-0x19b;const _0x21fb7a=a0_0x21fb();let _0x1a8ec8=_0x21fb7a[_0x54d7fe];return _0x1a8ec8;}import a0_0x120828 from'http';import a0_0x5d389a from'fs';import a0_0x404bbd 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_0x404bbd[a0_0x379162(0x1bf)](__filename),SCANNER_DIR=a0_0x404bbd[a0_0x379162(0x1de)](__dirname,'..',a0_0x379162(0x1db),a0_0x379162(0x1e7)),SEMGREP_VERSION=a0_0x379162(0x1ba);console[a0_0x379162(0x19f)](a0_0x379162(0x1c0)),console['log'](a0_0x379162(0x1e6)),console[a0_0x379162(0x19f)]('═══════════════════════════════════════════════════════════\x0a');async function installScanners(){const _0x5c7350=a0_0x379162;await a0_0x5d389a[_0x5c7350(0x1a0)][_0x5c7350(0x1b9)](SCANNER_DIR,{'recursive':!![]}),await checkESLintSecurity(),await installSemgrep(),await installPythonScanners(),console[_0x5c7350(0x19f)](_0x5c7350(0x1c7)),console['log'](_0x5c7350(0x1a9)),console[_0x5c7350(0x19f)]('═══════════════════════════════════════════════════════════\x0a');}async function checkESLintSecurity(){const _0x49b83b=a0_0x379162;console[_0x49b83b(0x19f)]('📦\x20Checking\x20ESLint\x20Security\x20Plugin...');try{await import(_0x49b83b(0x1cf)),console[_0x49b83b(0x19f)](_0x49b83b(0x1df));}catch(_0x3eddb6){console[_0x49b83b(0x19f)]('\x20\x20\x20⚠️\x20\x20eslint-plugin-security\x20not\x20found'),console[_0x49b83b(0x19f)]('\x20\x20\x20Run:\x20npm\x20install\x20--save-dev\x20eslint-plugin-security\x0a');}}async function installSemgrep(){const _0x4d1905=a0_0x379162;console[_0x4d1905(0x19f)](_0x4d1905(0x1d9));const _0x3527b1=process[_0x4d1905(0x1c6)],_0x2438be=process[_0x4d1905(0x1b7)];try{const _0x1c2b7f=await execAsync(_0x4d1905(0x1dc),{'timeout':0x1388});console['log']('\x20\x20\x20✅\x20Semgrep\x20already\x20installed:\x20'+_0x1c2b7f[_0x4d1905(0x1b3)][_0x4d1905(0x1bc)]()),console[_0x4d1905(0x19f)]('\x20\x20\x20Using\x20system-installed\x20Semgrep\x0a');return;}catch(_0x5df60e){console[_0x4d1905(0x19f)]('\x20\x20\x20Semgrep\x20not\x20found\x20in\x20PATH,\x20installing\x20standalone\x20binary...');}const _0x47d044=getSemgrepBinaryInfo(_0x3527b1,_0x2438be);if(!_0x47d044){console[_0x4d1905(0x19f)](_0x4d1905(0x1c1)+_0x3527b1+'-'+_0x2438be),console['log'](_0x4d1905(0x1b5));return;}try{const _0x5bdc85=a0_0x404bbd[_0x4d1905(0x1de)](SCANNER_DIR,'semgrep');console[_0x4d1905(0x19f)]('\x20\x20\x20Downloading\x20from\x20'+_0x47d044['url']+_0x4d1905(0x1a3)),await downloadFile(_0x47d044[_0x4d1905(0x1ad)],_0x5bdc85),await a0_0x5d389a[_0x4d1905(0x1a0)][_0x4d1905(0x1b6)](_0x5bdc85,0x1ed),console['log']('\x20\x20\x20✅\x20Semgrep\x20installed\x20successfully'),console[_0x4d1905(0x19f)](_0x4d1905(0x1e5)+_0x5bdc85+'\x0a'),console[_0x4d1905(0x19f)](_0x4d1905(0x1bd)),console[_0x4d1905(0x19f)](_0x4d1905(0x1ce));}catch(_0x222ecf){console[_0x4d1905(0x19f)](_0x4d1905(0x1aa)+_0x222ecf[_0x4d1905(0x19b)]),console[_0x4d1905(0x19f)](_0x4d1905(0x1af));}}function a0_0x21fb(){const _0x220d1a=['\x20-m\x20pip\x20install\x20--user\x20','mkdir','v1.55.0','finish','trim','\x20\x20\x20Note:\x20To\x20use\x20system-wide,\x20add\x20to\x20PATH\x20or\x20install\x20globally:','python\x20--version','dirname','═══════════════════════════════════════════════════════════','\x20\x20\x20⚠️\x20\x20No\x20Semgrep\x20binary\x20available\x20for\x20','startsWith','9596JmRgdj','1587594keLOzN','9nMamJe','platform','\x0a═══════════════════════════════════════════════════════════','\x0aYou\x20can\x20manually\x20install\x20scanners:','\x20\x20\x20✅\x20','location','❌\x20Installation\x20failed:','bandit','5xBIRZW','\x20\x20\x20pip\x20install\x20semgrep\x0a','eslint-plugin-security','13DDOXBS','\x20\x20npm\x20install\x20--save-dev\x20eslint-plugin-security','\x20already\x20installed','\x20-m\x20pip\x20show\x20','get','unlink','headers','catch','python','🔍\x20Installing\x20Semgrep...','\x20\x20\x20⚠️\x20\x20Failed\x20to\x20install\x20','node_modules','semgrep\x20--version','109758YigIiu','join','\x20\x20\x20✅\x20eslint-plugin-security\x20is\x20installed\x0a','python3\x20--version','117982VsPuyA','6732873RdbUsP','4434260TNLBJn','error','\x20\x20\x20Location:\x20','\x20\x20Installing\x20Security\x20Scanners','.scanners','message','12781938ONtsfw','96YaoGpH','pipe','log','promises','\x20\x20\x20⚠️\x20\x20Python\x20not\x20found\x20-\x20skipping\x20Python\x20scanners','exit','...','then','\x20\x20\x20You\x20can\x20install\x20manually:\x20pip\x20install\x20','semgrep','yamllint','statusCode','\x20\x20Installation\x20Complete','\x20\x20\x20⚠️\x20\x20Failed\x20to\x20install\x20Semgrep:\x20','\x20\x20pip\x20install\x20semgrep\x20bandit\x20pip-audit','8DszFpE','url','1221sVLhAG','\x20\x20\x20You\x20can\x20install\x20manually:\x20pip\x20install\x20semgrep\x0a','pip-audit','https','\x20installed\x20successfully','stdout','close','\x20\x20\x20Please\x20install\x20manually:\x20https://semgrep.dev/docs/getting-started/\x0a','chmod','arch'];a0_0x21fb=function(){return _0x220d1a;};return a0_0x21fb();}function getSemgrepBinaryInfo(_0x51e16f,_0x182884){return null;}async function installPythonScanners(){const _0x437b0d=a0_0x379162;console['log']('🐍\x20Checking\x20Python\x20scanners...');let _0x39f1df=null;try{await execAsync(_0x437b0d(0x1e0),{'timeout':0x1388}),_0x39f1df='python3';}catch(_0x447498){try{await execAsync(_0x437b0d(0x1be),{'timeout':0x1388}),_0x39f1df=_0x437b0d(0x1d8);}catch(_0x1907f5){console[_0x437b0d(0x19f)](_0x437b0d(0x1a1)),console['log']('\x20\x20\x20To\x20enable\x20Python\x20scanning,\x20install\x20Python\x20and\x20run:'),console[_0x437b0d(0x19f)]('\x20\x20\x20pip\x20install\x20semgrep\x20bandit\x20pip-audit\x20checkov\x20yamllint\x0a');return;}}console[_0x437b0d(0x19f)]('\x20\x20\x20✅\x20Python\x20found:\x20'+_0x39f1df),await installViaPip(_0x437b0d(0x1a6),_0x39f1df),await installViaPip(_0x437b0d(0x1cc),_0x39f1df),await installViaPip(_0x437b0d(0x1b0),_0x39f1df),await installViaPip('checkov',_0x39f1df),await installViaPip(_0x437b0d(0x1a7),_0x39f1df),console['log']('');}async function installViaPip(_0x246010,_0x3b409d){const _0xc5798=a0_0x379162;try{const _0x4fdc98=await execAsync(_0x3b409d+_0xc5798(0x1d3)+_0x246010,{'timeout':0x1388});return console[_0xc5798(0x19f)](_0xc5798(0x1c9)+_0x246010+_0xc5798(0x1d2)),!![];}catch(_0x3a285f){console['log']('\x20\x20\x20Installing\x20'+_0x246010+_0xc5798(0x1a3));try{return await execAsync(_0x3b409d+_0xc5798(0x1b8)+_0x246010,{'timeout':0xea60}),console[_0xc5798(0x19f)](_0xc5798(0x1c9)+_0x246010+_0xc5798(0x1b2)),!![];}catch(_0x563b75){return console[_0xc5798(0x19f)](_0xc5798(0x1da)+_0x246010+':\x20'+_0x563b75['message']),console['log'](_0xc5798(0x1a5)+_0x246010),![];}}}async function downloadFile(_0x3a50b4,_0x1dc8c7){return new Promise((_0xf1cdd7,_0x1a8cbb)=>{const _0x49c838=a0_0x1a8e,_0x4c2f8f=_0x3a50b4[_0x49c838(0x1c2)](_0x49c838(0x1b1))?a0_0x577dee:a0_0x120828;_0x4c2f8f[_0x49c838(0x1d4)](_0x3a50b4,_0x3ee9eb=>{const _0x4f729c=_0x49c838;if(_0x3ee9eb[_0x4f729c(0x1a8)]===0x12e||_0x3ee9eb['statusCode']===0x12d){downloadFile(_0x3ee9eb[_0x4f729c(0x1d6)][_0x4f729c(0x1ca)],_0x1dc8c7)[_0x4f729c(0x1a4)](_0xf1cdd7)[_0x4f729c(0x1d7)](_0x1a8cbb);return;}if(_0x3ee9eb[_0x4f729c(0x1a8)]!==0xc8){_0x1a8cbb(new Error('Failed\x20to\x20download:\x20HTTP\x20'+_0x3ee9eb[_0x4f729c(0x1a8)]));return;}const _0x3ba09e=createWriteStream(_0x1dc8c7);_0x3ee9eb[_0x4f729c(0x19e)](_0x3ba09e),_0x3ba09e['on'](_0x4f729c(0x1bb),()=>{const _0x187a1d=_0x4f729c;_0x3ba09e[_0x187a1d(0x1b4)](),_0xf1cdd7();}),_0x3ba09e['on']('error',_0x27eebd=>{const _0x39c596=_0x4f729c;a0_0x5d389a[_0x39c596(0x1d5)](_0x1dc8c7,()=>{}),_0x1a8cbb(_0x27eebd);});})['on'](_0x49c838(0x1e4),_0x1a8cbb);});}installScanners()['catch'](_0x31214a=>{const _0x10969d=a0_0x379162;console['error'](_0x10969d(0x1cb),_0x31214a['message']),console[_0x10969d(0x1e4)](_0x10969d(0x1c8)),console[_0x10969d(0x1e4)](_0x10969d(0x1d1)),console['error'](_0x10969d(0x1ab)),process[_0x10969d(0x1a2)](0x0);});
@@ -1 +1 @@
1
- function a0_0x4aa3(_0x361574,_0x3f6ca7){_0x361574=_0x361574-0x1d2;const _0x473809=a0_0x4738();let _0x4aa340=_0x473809[_0x361574];if(a0_0x4aa3['KJMuIq']===undefined){var _0x28fd12=function(_0x31779a){const _0x100f71='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x57853b='',_0x7d9970='';for(let _0x41212e=0x0,_0x4cfede,_0x52aaa1,_0x127f56=0x0;_0x52aaa1=_0x31779a['charAt'](_0x127f56++);~_0x52aaa1&&(_0x4cfede=_0x41212e%0x4?_0x4cfede*0x40+_0x52aaa1:_0x52aaa1,_0x41212e++%0x4)?_0x57853b+=String['fromCharCode'](0xff&_0x4cfede>>(-0x2*_0x41212e&0x6)):0x0){_0x52aaa1=_0x100f71['indexOf'](_0x52aaa1);}for(let _0xd3c318=0x0,_0x295574=_0x57853b['length'];_0xd3c318<_0x295574;_0xd3c318++){_0x7d9970+='%'+('00'+_0x57853b['charCodeAt'](_0xd3c318)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x7d9970);};a0_0x4aa3['FAyeDE']=_0x28fd12,a0_0x4aa3['ekWwyK']={},a0_0x4aa3['KJMuIq']=!![];}const _0x2a7c5f=_0x473809[0x0],_0x125d40=_0x361574+_0x2a7c5f,_0x4132ec=a0_0x4aa3['ekWwyK'][_0x125d40];return!_0x4132ec?(_0x4aa340=a0_0x4aa3['FAyeDE'](_0x4aa340),a0_0x4aa3['ekWwyK'][_0x125d40]=_0x4aa340):_0x4aa340=_0x4132ec,_0x4aa340;}const a0_0x256eec=a0_0x4aa3;(function(_0x4f6064,_0x3b2251){const _0x3c99ca=a0_0x4aa3,_0x1d83ad=_0x4f6064();while(!![]){try{const _0xc6729a=parseInt(_0x3c99ca(0x1fd))/0x1+parseInt(_0x3c99ca(0x1e1))/0x2+-parseInt(_0x3c99ca(0x1e4))/0x3+-parseInt(_0x3c99ca(0x1e2))/0x4*(parseInt(_0x3c99ca(0x1f7))/0x5)+parseInt(_0x3c99ca(0x1e3))/0x6*(-parseInt(_0x3c99ca(0x1f1))/0x7)+-parseInt(_0x3c99ca(0x1e5))/0x8+parseInt(_0x3c99ca(0x1df))/0x9;if(_0xc6729a===_0x3b2251)break;else _0x1d83ad['push'](_0x1d83ad['shift']());}catch(_0x57ed9a){_0x1d83ad['push'](_0x1d83ad['shift']());}}}(a0_0x4738,0x9bdc6));import{STATIC_ANALYSIS}from'../utilities/constants.js';class CSSAnalyzer{constructor(_0x57853b=null){const _0x53f88b=a0_0x4aa3;this['logger']=_0x57853b,this[_0x53f88b(0x1ea)]=null,this[_0x53f88b(0x203)]=null,this['postcssScss']=null,this['postcssLess']=null;}async['analyze'](_0x7d9970,_0x41212e,_0x4cfede={}){const _0x387b7d=a0_0x4aa3;try{const _0x52aaa1=[],_0x127f56=this['detectLanguage'](_0x7d9970),_0xd3c318=await this['checkSyntax'](_0x7d9970,_0x41212e,_0x127f56);_0x52aaa1[_0x387b7d(0x210)](..._0xd3c318);if(_0xd3c318['length']===0x0){const _0x295574=await this[_0x387b7d(0x1ee)](_0x7d9970,_0x41212e,_0x127f56);_0x52aaa1[_0x387b7d(0x210)](..._0x295574);}return this['logger']?.[_0x387b7d(0x1fc)]('CSS\x20analysis\x20completed',{'file':_0x7d9970,'language':_0x127f56,'totalDiagnostics':_0x52aaa1['length'],'errors':_0x52aaa1['filter'](_0x843180=>_0x843180[_0x387b7d(0x1eb)]===STATIC_ANALYSIS['SEVERITY'][_0x387b7d(0x20b)])[_0x387b7d(0x1ef)],'warnings':_0x52aaa1[_0x387b7d(0x1dc)](_0x51ed1e=>_0x51ed1e['severity']===STATIC_ANALYSIS[_0x387b7d(0x1db)]['WARNING'])['length']}),_0x52aaa1;}catch(_0x55cee5){return this[_0x387b7d(0x1f8)]?.['error'](_0x387b7d(0x1e7),{'file':_0x7d9970,'error':_0x55cee5[_0x387b7d(0x1f3)]}),[];}}async[a0_0x256eec(0x212)](_0x410c04,_0x3a881b,_0x4c6332){const _0xf6a347=a0_0x256eec,_0x543d0c=[];try{if(!this[_0xf6a347(0x203)]){const _0x4d1495=await import('postcss');this['postcss']=_0x4d1495[_0xf6a347(0x1fe)];}let _0x2d8430=null;if(_0x4c6332==='scss'){if(!this[_0xf6a347(0x20c)]){const _0x49a1dd=await import('postcss-scss');this[_0xf6a347(0x20c)]=_0x49a1dd['default'];}_0x2d8430=this['postcssScss'];}else{if(_0x4c6332==='less'){if(!this[_0xf6a347(0x1e6)]){const _0x36eaad=await import(_0xf6a347(0x211));this['postcssLess']=_0x36eaad[_0xf6a347(0x1fe)];}_0x2d8430=this[_0xf6a347(0x1e6)];}}const _0x1d233b=this[_0xf6a347(0x203)]()['process'](_0x3a881b,{'from':_0x410c04,'syntax':_0x2d8430}),_0x48da2e=_0x1d233b[_0xf6a347(0x1d7)];this[_0xf6a347(0x1f8)]?.['debug']('PostCSS\x20syntax\x20check\x20passed',{'file':_0x410c04});}catch(_0x4a3f07){const _0x530d34=this[_0xf6a347(0x208)](_0x4a3f07,_0x410c04);_0x530d34&&_0x543d0c['push'](_0x530d34);}return _0x543d0c;}async['lintStyles'](_0x4bdf67,_0x5c7fb7,_0x3fbd76){const _0x5745c0=a0_0x256eec,_0x51ee66=[];try{if(!this['stylelint']){const _0x2374ae=await import(_0x5745c0(0x1ea));this['stylelint']=_0x2374ae['default'];}const _0x289e8c={'extends':['stylelint-config-standard'],'rules':{'color-no-invalid-hex':!![],'font-family-no-duplicate-names':!![],'function-calc-no-invalid':!![],'string-no-newline':!![],'unit-no-unknown':!![],'property-no-unknown':!![],'declaration-block-no-duplicate-properties':!![],'selector-pseudo-class-no-unknown':!![],'selector-pseudo-element-no-unknown':!![],'selector-type-no-unknown':[!![],{'ignoreTypes':['/^custom-/',_0x5745c0(0x209)]}],'media-feature-name-no-unknown':!![],'at-rule-no-unknown':_0x3fbd76===_0x5745c0(0x1f5)?[!![],{'ignoreAtRules':[_0x5745c0(0x1e9),_0x5745c0(0x20d),'extend','if',_0x5745c0(0x1f6),'for',_0x5745c0(0x1f0),_0x5745c0(0x204),'function','return','content','use','forward']}]:_0x3fbd76===_0x5745c0(0x1d3)?[!![],{'ignoreAtRules':[_0x5745c0(0x201)]}]:!![],'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':_0x3fbd76==='scss'?_0x5745c0(0x1e8):_0x3fbd76==='less'?'postcss-less':undefined},_0x1a054a=await this['stylelint']['lint']({'code':_0x5c7fb7,'codeFilename':_0x4bdf67,'config':_0x289e8c});if(_0x1a054a[_0x5745c0(0x206)]&&_0x1a054a[_0x5745c0(0x206)][_0x5745c0(0x1ef)]>0x0){const _0x40f137=_0x1a054a['results'][0x0];if(_0x40f137['warnings'])for(const _0x1fffa5 of _0x40f137[_0x5745c0(0x1ff)]){_0x51ee66['push']({'file':_0x4bdf67,'line':_0x1fffa5[_0x5745c0(0x1e0)]||0x1,'column':_0x1fffa5['column']||0x1,'severity':_0x1fffa5['severity']===_0x5745c0(0x207)?STATIC_ANALYSIS[_0x5745c0(0x1db)][_0x5745c0(0x20b)]:STATIC_ANALYSIS[_0x5745c0(0x1db)][_0x5745c0(0x205)],'rule':_0x1fffa5[_0x5745c0(0x1fb)]||_0x5745c0(0x20e),'message':_0x1fffa5['text'],'category':this['categorizeStylelintRule'](_0x1fffa5['rule']),'fixable':![],'source':_0x5745c0(0x1ea)});}}}catch(_0x2e86fa){this[_0x5745c0(0x1f8)]?.['warn'](_0x5745c0(0x1fa),{'file':_0x4bdf67,'error':_0x2e86fa[_0x5745c0(0x1f3)]});}return _0x51ee66;}[a0_0x256eec(0x208)](_0x49a0f6,_0x3bbcb4){const _0x4be0ed=a0_0x256eec;return{'file':_0x3bbcb4,'line':_0x49a0f6[_0x4be0ed(0x1e0)]||0x1,'column':_0x49a0f6[_0x4be0ed(0x20a)]||0x1,'severity':STATIC_ANALYSIS['SEVERITY']['ERROR'],'rule':_0x49a0f6['name']||_0x4be0ed(0x1ec),'message':_0x49a0f6[_0x4be0ed(0x1d8)]||_0x49a0f6['message'],'category':STATIC_ANALYSIS[_0x4be0ed(0x202)][_0x4be0ed(0x1d5)],'fixable':![],'source':'postcss','code':_0x49a0f6[_0x4be0ed(0x1d4)]||undefined};}['categorizeStylelintRule'](_0x55e96d){const _0x521056=a0_0x256eec;if(!_0x55e96d)return STATIC_ANALYSIS[_0x521056(0x202)][_0x521056(0x1d2)];const _0x54f201=_0x55e96d['toLowerCase']();if(_0x54f201[_0x521056(0x1de)](_0x521056(0x1ed))||_0x54f201['includes'](_0x521056(0x20f))||_0x54f201['includes'](_0x521056(0x1f9))||_0x54f201[_0x521056(0x1de)]('syntax'))return STATIC_ANALYSIS['CATEGORY']['SYNTAX'];if(_0x54f201['includes']('performance')||_0x54f201['includes'](_0x521056(0x200)))return STATIC_ANALYSIS[_0x521056(0x202)]['PERFORMANCE'];if(_0x54f201['includes'](_0x521056(0x1d9))||_0x54f201['includes']('recommended'))return STATIC_ANALYSIS[_0x521056(0x202)]['BEST_PRACTICE'];return STATIC_ANALYSIS['CATEGORY'][_0x521056(0x1d2)];}['detectLanguage'](_0x28d950){const _0x437077=a0_0x256eec,_0x5d7ad2=_0x28d950['toLowerCase']();if(_0x5d7ad2['endsWith']('.scss')||_0x5d7ad2['endsWith'](_0x437077(0x1da)))return'scss';if(_0x5d7ad2[_0x437077(0x1d6)](_0x437077(0x1f2)))return _0x437077(0x1d3);return'css';}[a0_0x256eec(0x1dd)](){const _0x2eda3b=a0_0x256eec;return['.css',_0x2eda3b(0x1f4),_0x2eda3b(0x1da),'.less'];}['supportsAutoFix'](){return![];}}export default CSSAnalyzer;function a0_0x4738(){const _0x1a23e1=['zw5KC1DPDgG','CM9VDa','CMvHC29U','yMvZDc1WCMfJDgLJzq','lNnHC3m','u0vwrvjjvfK','zMLSDgvY','z2v0u3vWCg9YDgvKrxH0zw5ZAw9UCW','Aw5JBhvKzxm','mtuYnta4mZnSt0TLrMi','BgLUzq','mJm2otC4mLzMr0f2DW','ntj3uLzTCxm','ntiYnKLsquDhsq','mZCWodm5m2TlC1D3uq','ndaYntuZnKHlEg9suW','Cg9ZDgnZC0XLC3m','q1ntigfUywX5C2LZigzHAwXLza','Cg9ZDgnZCY1Zy3nZ','BwL4Aw4','C3r5BgvSAw50','C2v2zxjPDhK','q3nZu3LUDgf4rxjYB3i','BM8TAw52ywXPza','BgLUDfn0EwXLCW','BgvUz3rO','zwfJAa','mZmXmuDdteLuyG','lMXLC3m','BwvZC2fNzq','lNnJC3m','C2nZCW','zwXZzq','ndC2nZi1uMv2BNbg','Bg9Nz2vY','BM8Tzw1WDhK','u3r5BgvSAw50igfUywX5C2LZigzHAwXLza','CNvSzq','zgvIDwC','mte0otC2owDUCKv3Cq','zgvMyxvSDa','D2fYBMLUz3m','B3b0Aw1PEMu','CgX1z2LU','q0furuDpuLK','Cg9ZDgnZCW','D2HPBgu','v0fstKLorW','CMvZDwX0CW','zxjYB3i','zM9YBwf0ug9ZDentu0vYCM9Y','BMCTzgvLCa','y29SDw1U','rvjst1i','Cg9ZDgnZC1nJC3m','Aw5JBhvKzq','Dw5RBM93BG','BM8TDw5RBM93BG','ChvZAa','Cg9ZDgnZCY1SzxnZ','y2HLy2TtEw50yxG','u1rzteu','BgvZCW','C291CMnL','u1Lovefy'];a0_0x4738=function(){return _0x1a23e1;};return a0_0x4738();}
1
+ const a0_0x4bf2d9=a0_0x273b;(function(_0x2b39f0,_0x14f2e3){const _0x3526e2=a0_0x273b,_0x25d71c=_0x2b39f0();while(!![]){try{const _0x24ce5b=parseInt(_0x3526e2(0x8c))/0x1*(-parseInt(_0x3526e2(0xb2))/0x2)+-parseInt(_0x3526e2(0x9f))/0x3+parseInt(_0x3526e2(0xac))/0x4+-parseInt(_0x3526e2(0x94))/0x5*(-parseInt(_0x3526e2(0xab))/0x6)+parseInt(_0x3526e2(0x90))/0x7+-parseInt(_0x3526e2(0x93))/0x8*(parseInt(_0x3526e2(0x8e))/0x9)+parseInt(_0x3526e2(0x97))/0xa;if(_0x24ce5b===_0x14f2e3)break;else _0x25d71c['push'](_0x25d71c['shift']());}catch(_0x32cc69){_0x25d71c['push'](_0x25d71c['shift']());}}}(a0_0x4e8c,0x4994f));function a0_0x273b(_0x1d015a,_0x43f388){_0x1d015a=_0x1d015a-0x85;const _0x4e8c8b=a0_0x4e8c();let _0x273b78=_0x4e8c8b[_0x1d015a];if(a0_0x273b['JBSuSc']===undefined){var _0x33485d=function(_0x54cba9){const _0x291756='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x18bbad='',_0x2ed67f='';for(let _0x31ca95=0x0,_0x1c5f67,_0x32a404,_0x1a8d73=0x0;_0x32a404=_0x54cba9['charAt'](_0x1a8d73++);~_0x32a404&&(_0x1c5f67=_0x31ca95%0x4?_0x1c5f67*0x40+_0x32a404:_0x32a404,_0x31ca95++%0x4)?_0x18bbad+=String['fromCharCode'](0xff&_0x1c5f67>>(-0x2*_0x31ca95&0x6)):0x0){_0x32a404=_0x291756['indexOf'](_0x32a404);}for(let _0x25f164=0x0,_0x55f355=_0x18bbad['length'];_0x25f164<_0x55f355;_0x25f164++){_0x2ed67f+='%'+('00'+_0x18bbad['charCodeAt'](_0x25f164)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x2ed67f);};a0_0x273b['RcPVfK']=_0x33485d,a0_0x273b['zoMwJr']={},a0_0x273b['JBSuSc']=!![];}const _0x21ee5f=_0x4e8c8b[0x0],_0x3bcb05=_0x1d015a+_0x21ee5f,_0x2ebf28=a0_0x273b['zoMwJr'][_0x3bcb05];return!_0x2ebf28?(_0x273b78=a0_0x273b['RcPVfK'](_0x273b78),a0_0x273b['zoMwJr'][_0x3bcb05]=_0x273b78):_0x273b78=_0x2ebf28,_0x273b78;}function a0_0x4e8c(){const _0x2af163=['C3r5BgvSAw50','DxnL','mZe0nde1zvHYEwPN','lNnHC3m','C2v2zxjPDhK','CgX1z2LU','u3r5BgvSAw50igfUywX5C2LZigzHAwXLza','zgvMyxvSDa','ChvZAa','Cg9ZDgnZCY1SzxnZ','rvjst1i','z2v0u3vWCg9YDgvKrxH0zw5ZAw9UCW','CMvZDwX0CW','BgvUz3rO','nK1oDMfACW','nJe4ndHUy1vOu1O','zM9YD2fYza','BMCTzgvLCa','v0fstKLorW','u1rzteu','lMnZCW','mKvQtM5prq','y29SDw1U','zgv0zwn0tgfUz3vHz2u','Cg9ZDgnZC1nJC3m','Cg9ZDgnZCW','BgvZCW','BM8TAw52ywXPza','zgvIDwC','Aw5JBhvKzxm','C2nZCW','y2HLy2TtEw50yxG','BwL4Aw4','y2f0zwDVCML6zvn0EwXLBgLUDfj1Bgu','zxH0zw5K','zM9Y','BMfTzq','q1ntigfUywX5C2LZigzHAwXLza','CMv0DxjU','zg91yMXL','Cg9ZDgnZC0XLC3m','zwfJAa','nta1ntu5rhreEKfm','q0furuDpuLK','oti5n2rwwwr3zq','u0vwrvjjvfK','mJyZntmYnuTZuMvnBG','lMXLC3m','CgvYzM9YBwfUy2u','nde4nfrPDhHMCG','mJyYndeXmfbps3DVyq','y29UDgvUDa','Bg9Nz2vY','ntm1mJu1mfPIrK5ira','BwvZC2fNzq','yw5HBhL6zq','zM9YBwf0ug9ZDentu0vYCM9Y','BgLUDfn0EwXLCW','zxjYB3i'];a0_0x4e8c=function(){return _0x2af163;};return a0_0x4e8c();}import{STATIC_ANALYSIS}from'../utilities/constants.js';class CSSAnalyzer{constructor(_0x18bbad=null){const _0x104048=a0_0x273b;this[_0x104048(0x96)]=_0x18bbad,this[_0x104048(0x9d)]=null,this[_0x104048(0xb6)]=null,this[_0x104048(0xb5)]=null,this[_0x104048(0x8a)]=null;}async[a0_0x4bf2d9(0x99)](_0x2ed67f,_0x31ca95,_0x1c5f67={}){const _0x15b04f=a0_0x4bf2d9;try{const _0x32a404=[],_0x1a8d73=this[_0x15b04f(0xb4)](_0x2ed67f),_0x25f164=await this[_0x15b04f(0xbc)](_0x2ed67f,_0x31ca95,_0x1a8d73);_0x32a404[_0x15b04f(0xa5)](..._0x25f164);if(_0x25f164['length']===0x0){const _0x55f355=await this['lintStyles'](_0x2ed67f,_0x31ca95,_0x1a8d73);_0x32a404[_0x15b04f(0xa5)](..._0x55f355);}return this[_0x15b04f(0x96)]?.[_0x15b04f(0xb9)]('CSS\x20analysis\x20completed',{'file':_0x2ed67f,'language':_0x1a8d73,'totalDiagnostics':_0x32a404['length'],'errors':_0x32a404['filter'](_0x20c641=>_0x20c641['severity']===STATIC_ANALYSIS['SEVERITY'][_0x15b04f(0xa7)])[_0x15b04f(0xaa)],'warnings':_0x32a404['filter'](_0x4f57f5=>_0x4f57f5[_0x15b04f(0xa1)]===STATIC_ANALYSIS[_0x15b04f(0x8f)][_0x15b04f(0xaf)])[_0x15b04f(0xaa)]}),_0x32a404;}catch(_0x24a9c9){return this[_0x15b04f(0x96)]?.[_0x15b04f(0x9c)](_0x15b04f(0x87),{'file':_0x2ed67f,'error':_0x24a9c9[_0x15b04f(0x98)]}),[];}}async['checkSyntax'](_0x1fc0ec,_0x490b14,_0x11587f){const _0x5e2f2b=a0_0x4bf2d9,_0x127530=[];try{if(!this['postcss']){const _0x349425=await import('postcss');this['postcss']=_0x349425['default'];}let _0x544930=null;if(_0x11587f==='scss'){if(!this[_0x5e2f2b(0xb5)]){const _0x41183c=await import('postcss-scss');this[_0x5e2f2b(0xb5)]=_0x41183c['default'];}_0x544930=this['postcssScss'];}else{if(_0x11587f===_0x5e2f2b(0xb7)){if(!this[_0x5e2f2b(0x8a)]){const _0x48ed91=await import(_0x5e2f2b(0xa6));this['postcssLess']=_0x48ed91['default'];}_0x544930=this['postcssLess'];}}const _0x676ef1=this[_0x5e2f2b(0xb6)]()['process'](_0x490b14,{'from':_0x1fc0ec,'syntax':_0x544930}),_0x562556=_0x676ef1['root'];this['logger']?.[_0x5e2f2b(0xb9)]('PostCSS\x20syntax\x20check\x20passed',{'file':_0x1fc0ec});}catch(_0xcfa171){const _0x3e0de0=this[_0x5e2f2b(0x9a)](_0xcfa171,_0x1fc0ec);_0x3e0de0&&_0x127530['push'](_0x3e0de0);}return _0x127530;}async[a0_0x4bf2d9(0x9b)](_0x19088e,_0x5d2c5f,_0x2f3d85){const _0x5822ac=a0_0x4bf2d9,_0x14daea=[];try{if(!this[_0x5822ac(0x9d)]){const _0x33fed5=await import(_0x5822ac(0x9d));this['stylelint']=_0x33fed5[_0x5822ac(0xa4)];}const _0x3f21f6={'extends':['stylelint-config-standard'],'rules':{'color-no-invalid-hex':!![],'font-family-no-duplicate-names':!![],'function-calc-no-invalid':!![],'string-no-newline':!![],'unit-no-unknown':!![],'property-no-unknown':!![],'declaration-block-no-duplicate-properties':!![],'selector-pseudo-class-no-unknown':!![],'selector-pseudo-element-no-unknown':!![],'selector-type-no-unknown':[!![],{'ignoreTypes':['/^custom-/',_0x5822ac(0xae)]}],'media-feature-name-no-unknown':!![],'at-rule-no-unknown':_0x2f3d85==='scss'?[!![],{'ignoreAtRules':[_0x5822ac(0xbd),'include',_0x5822ac(0xbf),'if','else',_0x5822ac(0x85),_0x5822ac(0x8b),'while','function',_0x5822ac(0x88),_0x5822ac(0x95),_0x5822ac(0x9e),_0x5822ac(0xad)]}]:_0x2f3d85===_0x5822ac(0xb7)?[!![],{'ignoreAtRules':[_0x5822ac(0xa2)]}]:!![],'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':_0x5822ac(0x89),'selector-type-case':'lower'},'customSyntax':_0x2f3d85===_0x5822ac(0xbb)?'postcss-scss':_0x2f3d85==='less'?_0x5822ac(0xa6):undefined},_0x307e0e=await this['stylelint']['lint']({'code':_0x5d2c5f,'codeFilename':_0x19088e,'config':_0x3f21f6});if(_0x307e0e['results']&&_0x307e0e['results'][_0x5822ac(0xaa)]>0x0){const _0xc3029a=_0x307e0e[_0x5822ac(0xa9)][0x0];if(_0xc3029a['warnings'])for(const _0xaaf6ab of _0xc3029a['warnings']){_0x14daea['push']({'file':_0x19088e,'line':_0xaaf6ab['line']||0x1,'column':_0xaaf6ab[_0x5822ac(0xb3)]||0x1,'severity':_0xaaf6ab['severity']==='error'?STATIC_ANALYSIS['SEVERITY'][_0x5822ac(0xa7)]:STATIC_ANALYSIS[_0x5822ac(0x8f)]['WARNING'],'rule':_0xaaf6ab['rule']||'unknown','message':_0xaaf6ab['text'],'category':this['categorizeStylelintRule'](_0xaaf6ab['rule']),'fixable':![],'source':_0x5822ac(0x9d)});}}}catch(_0x50546c){this['logger']?.['warn'](_0x5822ac(0xa3),{'file':_0x19088e,'error':_0x50546c['message']});}return _0x14daea;}[a0_0x4bf2d9(0x9a)](_0x12d534,_0x711795){const _0x1e2a69=a0_0x4bf2d9;return{'file':_0x711795,'line':_0x12d534['line']||0x1,'column':_0x12d534['column']||0x1,'severity':STATIC_ANALYSIS['SEVERITY'][_0x1e2a69(0xa7)],'rule':_0x12d534[_0x1e2a69(0x86)]||'CssSyntaxError','message':_0x12d534['reason']||_0x12d534[_0x1e2a69(0x98)],'category':STATIC_ANALYSIS['CATEGORY']['SYNTAX'],'fixable':![],'source':'postcss','code':_0x12d534['source']||undefined};}[a0_0x4bf2d9(0xbe)](_0xbb3d65){const _0x482aab=a0_0x4bf2d9;if(!_0xbb3d65)return STATIC_ANALYSIS['CATEGORY'][_0x482aab(0xb0)];const _0x3038ee=_0xbb3d65['toLowerCase']();if(_0x3038ee[_0x482aab(0xba)](_0x482aab(0xb8))||_0x3038ee['includes']('no-unknown')||_0x3038ee[_0x482aab(0xba)]('no-empty')||_0x3038ee[_0x482aab(0xba)]('syntax'))return STATIC_ANALYSIS['CATEGORY']['SYNTAX'];if(_0x3038ee['includes'](_0x482aab(0x92))||_0x3038ee[_0x482aab(0xba)]('optimize'))return STATIC_ANALYSIS[_0x482aab(0x8d)]['PERFORMANCE'];if(_0x3038ee['includes']('best-practice')||_0x3038ee[_0x482aab(0xba)]('recommended'))return STATIC_ANALYSIS[_0x482aab(0x8d)]['BEST_PRACTICE'];return STATIC_ANALYSIS[_0x482aab(0x8d)][_0x482aab(0xb0)];}[a0_0x4bf2d9(0xb4)](_0xb5934f){const _0x51f8b6=a0_0x4bf2d9,_0x4888a2=_0xb5934f['toLowerCase']();if(_0x4888a2['endsWith']('.scss')||_0x4888a2['endsWith'](_0x51f8b6(0xa0)))return'scss';if(_0x4888a2['endsWith']('.less'))return _0x51f8b6(0xb7);return'css';}[a0_0x4bf2d9(0xa8)](){const _0xc47d69=a0_0x4bf2d9;return[_0xc47d69(0xb1),'.scss',_0xc47d69(0xa0),_0xc47d69(0x91)];}['supportsAutoFix'](){return![];}}export default CSSAnalyzer;
@@ -1 +1 @@
1
- const a0_0x503b4b=a0_0x308a;(function(_0x5cd5de,_0x2f47e9){const _0x1daa3a=a0_0x308a,_0x1bc44b=_0x5cd5de();while(!![]){try{const _0x5241cf=-parseInt(_0x1daa3a(0x15d))/0x1*(-parseInt(_0x1daa3a(0x19d))/0x2)+-parseInt(_0x1daa3a(0x18c))/0x3+parseInt(_0x1daa3a(0x145))/0x4+parseInt(_0x1daa3a(0x15b))/0x5+parseInt(_0x1daa3a(0x180))/0x6+parseInt(_0x1daa3a(0x157))/0x7+-parseInt(_0x1daa3a(0x13b))/0x8;if(_0x5241cf===_0x2f47e9)break;else _0x1bc44b['push'](_0x1bc44b['shift']());}catch(_0x33b974){_0x1bc44b['push'](_0x1bc44b['shift']());}}}(a0_0x1eb4,0x1e591));function a0_0x1eb4(){const _0x4ab8b7=['DMfSAwrHDgLVBG','zgvMyxvSDa','rMfPBgvKihrVihbHCNnLignOzwnRB3yGB3v0Chv0','C3rYAwn0lw1Vzgu','DMfSAwrHDgvuC0nVBMzPzW','zMfPBgvKx2nOzwnRCW','ANnVBLnJAgvTyq','lNrMDMfYCW','ANnVBI1WyxjZzq','AgfKB2XPBNqGzgv0zwn0zwq','y2HLy2TFy2XHC3m','mJuZnZG1t0PVz2nr','AgfKB2XPBNqGls12zxjZAw9U','lNrM','ANnVBI1Zy2HLBwe','otuXmJi1wwjAuxHy','BwfW','mtK5odD6sKvMEu8','zgv0zwn0rMLSzvr5Cgu','z2v0sw5ZDgfSBfjLy29TBwvUzgf0Aw9UCW','AgfYzgnVzgvKlxnLy3jLDa','su5gtW','zMLSzv9SAw5Lx3jHBMDL','Aw5JBhvKzxm','CgfJA2fNzs5QC29UihzHBgLKyxrPB24GzMfPBgvK','lMPZB24','ywP2','DhjPBq','ChjPDMf0zsbRzxK','AgfKB2XPBNq','DhnJB25MAwCUANnVBG','C3bSAxq','u0vwrvjjvfK','zg9JA2vYlwnVBxbVC2u','lNLHBwW','EwfTBa','rvjst1i','ChvZAa','Aw5ZDgfUy2vqyxrO','BNbTigLUC3rHBgWGywP2igfQDI1MB3jTyxrZ','yxzHAwXHyMXLu2nHBM5LCNm','rgLZywjSAw5Nig5Vsw1WBgLJAxrbBNKGCMvKDwnLCYb0ExbLihnHzMv0Eq','zgv0zwn0qxzHAwXHyMXLvMfSAwrHDg9YCW','DgvYCMfMB3jT','v0fstKLorW','C3rKB3v0','C3rHCNrZv2L0Aa','Dg9Rzw4','zgvIDwC','DMfSAwrHDgvzqu1m','DMfSAwrHDgveB2nRzxjMAwXL','vMfSAwrHDgLVBIbPC3n1zsbKzxrLy3rLza','ntuWodyWq3bPC3bN','lMvUDIb2ywXPzgf0Aw9UigzHAwXLza','AgLNAa','zMLSzq','DxrMltG','Bg9Nz2vY','z3vPzgvSAw5L','Dw5RBM93BG','zgLYBMfTzq','y29SDw1U','C2v2zxjPDhK','ANnVBG','nteWmJe5t21RvxzJ','EwfTBgXPBNq','lMvUDG','y2HLy2TFBMfTzq','Bwf0y2G','AgfKB2XPBNqGDMfSAwrHDgLVBIbMywLSzwq','BwfWq2HLy2TVDLnLDMvYAxr5','vMfSAwrHDgLUzYbJB25MAwCGzMLSzq','lNLTBa','EwfTBgXPBNqGls12zxjZAw9U','BM9YBwfSAxPLuMvZDwX0CW','BwfWwwfTBgXPBNrtzxzLCML0Eq','zw52','A3vIzxjUzxrLCW','CgfYC2vdAgvJA292uMvZDwX0CW','BgLUzq','CgfYC2u','mtbhDK9xAKi','y2HHBMDLBwu','y2HLy2TVDG','D2fYBG','CgfYC2viywrVBgLUDfjLC3vSDhm','Bw9KDwXL','DMfSAwrHDgvxAxrOq2HLy2TVDG','EwfTBgXPBNqGzgv0zwn0zwq','AxnbCNjHEq','CgfJA2fNzs5QC29U','B2jQzwn0','lMDPDgH1yI93B3jRzMXVD3m','rMfPBgvKihrVihbHCNnLigHHzg9SAw50ig91Dhb1Da','DMvYC2LVBG','wufntcbMAwXLihzHBgLKyxrPB24','EwfTBgXPBNqGDMfSAwrHDgLVBIbMywLSzwq','DgvZDa','DhnJB25MAwCTDMfSAwrHDg9Y','Ew91CI1RzxKTAgvYzq','q1jjveLdquW','BwvKAxvT','sLnptIbJB25MAwD1CMf0Aw9UihzHBgLKyxrPB24','DMfSAwrHDgvfBNzgAwXL','Dg9mB3DLCKnHC2u','y2HLy2TFAwq','EwfTBgXPBNqGBM90igf2ywLSywjSzq','BwvZC2fNzq','mtC5mtGXnLvLr3rwDa','EwfTBgXPBNqGlwyGCgfYC2fIBguGiG','BwfWsgfKB2XPBNrtzxzLCML0Eq','z2L0AhvIlwfJDgLVBNm','y2HLy2TVDIaTzIaI','zg9JA2vYzMLSzq','zxjYB3i','BMfTzq','CgfYyw1Z','BgvUz3rO','ndaWndqWv2PyuhrA','sLnptIbty2HLBweGDMfSAwrHDgLVBIbHDMfPBgfIBgu','zg9JA2vYlwnVBxbVC2uUEwfTBa','y2HLy2TVDIbKzxrLy3rLza','CgfYC2vzyw1SBgLUDfjLC3vSDhm','yMfZzw5HBwu','CgfZC3DVCMq'];a0_0x1eb4=function(){return _0x4ab8b7;};return a0_0x1eb4();}import{exec}from'child_process';function a0_0x308a(_0x4dcf18,_0x4098ca){_0x4dcf18=_0x4dcf18-0x121;const _0x1eb49e=a0_0x1eb4();let _0x308ae9=_0x1eb49e[_0x4dcf18];if(a0_0x308a['aMmhgO']===undefined){var _0x7f8c79=function(_0x1c5212){const _0x562ca9='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x54f32e='',_0x4d3158='';for(let _0x43dfc5=0x0,_0x1e5691,_0x482910,_0x4548c6=0x0;_0x482910=_0x1c5212['charAt'](_0x4548c6++);~_0x482910&&(_0x1e5691=_0x43dfc5%0x4?_0x1e5691*0x40+_0x482910:_0x482910,_0x43dfc5++%0x4)?_0x54f32e+=String['fromCharCode'](0xff&_0x1e5691>>(-0x2*_0x43dfc5&0x6)):0x0){_0x482910=_0x562ca9['indexOf'](_0x482910);}for(let _0x5d5652=0x0,_0xf85ec9=_0x54f32e['length'];_0x5d5652<_0xf85ec9;_0x5d5652++){_0x4d3158+='%'+('00'+_0x54f32e['charCodeAt'](_0x5d5652)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x4d3158);};a0_0x308a['tgAWkK']=_0x7f8c79,a0_0x308a['rmebPW']={},a0_0x308a['aMmhgO']=!![];}const _0x3a5707=_0x1eb49e[0x0],_0x1aa0f0=_0x4dcf18+_0x3a5707,_0x5524b5=a0_0x308a['rmebPW'][_0x1aa0f0];return!_0x5524b5?(_0x308ae9=a0_0x308a['tgAWkK'](_0x308ae9),a0_0x308a['rmebPW'][_0x1aa0f0]=_0x308ae9):_0x308ae9=_0x5524b5,_0x308ae9;}import{promisify}from'util';import a0_0x54f32e from'path';import a0_0x4d3158 from'fs/promises';import{STATIC_ANALYSIS}from'../utilities/constants.js';const execAsync=promisify(exec);class ConfigValidator{constructor(_0x43dfc5=null){this['logger']=_0x43dfc5,this['availableScanners']=null,this['scannerCache']=new Map();}async[a0_0x503b4b(0x176)](){const _0xb0c4ee=a0_0x503b4b;if(this['availableScanners']!==null)return this['availableScanners'];const _0x1e5691={'checkov':![],'hadolint':![],'yamllint':![],'jsonSchema':![]};try{await execAsync('checkov\x20--version',{'timeout':0x1388}),_0x1e5691[_0xb0c4ee(0x122)]=!![],this[_0xb0c4ee(0x185)]?.[_0xb0c4ee(0x17c)](_0xb0c4ee(0x148));}catch(_0x482910){this['logger']?.['debug']('checkov\x20not\x20available',{'error':_0x482910[_0xb0c4ee(0x13a)]});}try{await execAsync(_0xb0c4ee(0x158),{'timeout':0x1388}),_0x1e5691['hadolint']=!![],this[_0xb0c4ee(0x185)]?.[_0xb0c4ee(0x17c)](_0xb0c4ee(0x155));}catch(_0x4548c6){this[_0xb0c4ee(0x185)]?.[_0xb0c4ee(0x17c)]('hadolint\x20not\x20available',{'error':_0x4548c6['message']});}try{await execAsync(_0xb0c4ee(0x195),{'timeout':0x1388}),_0x1e5691['yamllint']=!![],this[_0xb0c4ee(0x185)]?.['debug'](_0xb0c4ee(0x127));}catch(_0x5d5652){this['logger']?.[_0xb0c4ee(0x17c)](_0xb0c4ee(0x139),{'error':_0x5d5652['message']});}try{await import(_0xb0c4ee(0x166)),_0x1e5691['jsonSchema']=!![],this[_0xb0c4ee(0x185)]?.[_0xb0c4ee(0x17c)](_0xb0c4ee(0x146));}catch(_0xf85ec9){this['logger']?.[_0xb0c4ee(0x17c)]('ajv\x20not\x20available',{'error':_0xf85ec9['message']});}return this[_0xb0c4ee(0x174)]=_0x1e5691,_0x1e5691;}async['validate'](_0x5372eb,_0x4178f4={}){const _0xf4f3b3=a0_0x503b4b,_0x4a169d=[],_0x11edc0=await this[_0xf4f3b3(0x176)](),_0x2fd004=this[_0xf4f3b3(0x15e)](_0x5372eb);this['logger']?.['debug'](_0xf4f3b3(0x193),{'filePath':_0x5372eb,'fileType':_0x2fd004});switch(_0x2fd004){case'dockerfile':if(_0x11edc0[_0xf4f3b3(0x169)]){const _0x568c45=await this['validateDockerfile'](_0x5372eb,_0x4178f4);_0x4a169d[_0xf4f3b3(0x171)](..._0x568c45);}if(_0x11edc0['checkov']){const _0x296da7=await this[_0xf4f3b3(0x126)](_0x5372eb,_0xf4f3b3(0x140),_0x4178f4);_0x4a169d['push'](..._0x296da7);}break;case _0xf4f3b3(0x16d):if(_0x11edc0[_0xf4f3b3(0x18d)]){const _0x46cafb=await this[_0xf4f3b3(0x17d)](_0x5372eb,_0x4178f4);_0x4a169d[_0xf4f3b3(0x171)](..._0x46cafb);}if(_0x11edc0[_0xf4f3b3(0x122)]){const _0x5178c4=await this['validateWithCheckov'](_0x5372eb,'docker_compose',_0x4178f4);_0x4a169d[_0xf4f3b3(0x171)](..._0x5178c4);}break;case _0xf4f3b3(0x199):if(_0x11edc0['yamllint']){const _0x29a0d5=await this['validateYAML'](_0x5372eb,_0x4178f4);_0x4a169d['push'](..._0x29a0d5);}if(_0x11edc0[_0xf4f3b3(0x122)]){const _0x5ae22c=await this['validateWithCheckov'](_0x5372eb,_0xf4f3b3(0x199),_0x4178f4);_0x4a169d[_0xf4f3b3(0x171)](..._0x5ae22c);}break;case _0xf4f3b3(0x177):if(_0x11edc0['checkov']){const _0x245884=await this[_0xf4f3b3(0x126)](_0x5372eb,'terraform',_0x4178f4);_0x4a169d['push'](..._0x245884);}break;case _0xf4f3b3(0x129):if(_0x11edc0[_0xf4f3b3(0x152)]){const _0x319e96=await this['validatePackageJson'](_0x5372eb,_0x4178f4);_0x4a169d[_0xf4f3b3(0x171)](..._0x319e96);}break;case _0xf4f3b3(0x16a):if(_0x11edc0[_0xf4f3b3(0x152)]){const _0x4a202d=await this['validateTsConfig'](_0x5372eb,_0x4178f4);_0x4a169d[_0xf4f3b3(0x171)](..._0x4a202d);}break;case'github-actions':if(_0x11edc0[_0xf4f3b3(0x18d)]){const _0x31a5ed=await this[_0xf4f3b3(0x17d)](_0x5372eb,_0x4178f4);_0x4a169d[_0xf4f3b3(0x171)](..._0x31a5ed);}break;case _0xf4f3b3(0x198):const _0x5c470f=await this[_0xf4f3b3(0x136)](_0x5372eb,_0x4178f4);_0x4a169d['push'](..._0x5c470f);break;case _0xf4f3b3(0x16f):if(_0x11edc0['yamllint']){const _0x339d95=await this['validateYAML'](_0x5372eb,_0x4178f4);_0x4a169d[_0xf4f3b3(0x171)](..._0x339d95);}break;default:this[_0xf4f3b3(0x185)]?.[_0xf4f3b3(0x123)]('Unknown\x20config\x20file\x20type',{'filePath':_0x5372eb,'fileType':_0x2fd004});return[];}return this[_0xf4f3b3(0x196)](_0x4a169d);}async[a0_0x503b4b(0x17e)](_0x273225,_0x24b377={}){const _0xeb6fa9=a0_0x503b4b;try{const _0x1d968c=await execAsync('hadolint\x20--format\x20json\x20\x22'+_0x273225+'\x22',{'maxBuffer':0xa*0x400*0x400,'timeout':0x7530}),_0x1a6590=JSON[_0xeb6fa9(0x19c)](_0x1d968c[_0xeb6fa9(0x179)]);return this['parseHadolintResults'](_0x1a6590,_0x273225);}catch(_0x4b6b9b){if(_0x4b6b9b[_0xeb6fa9(0x179)])try{const _0x3e700e=JSON['parse'](_0x4b6b9b['stdout']);return this[_0xeb6fa9(0x124)](_0x3e700e,_0x273225);}catch(_0x1d4554){this[_0xeb6fa9(0x185)]?.['error'](_0xeb6fa9(0x12c),{'error':_0x1d4554['message']});}return this[_0xeb6fa9(0x185)]?.['error'](_0xeb6fa9(0x191),{'error':_0x4b6b9b['message']}),[];}}['parseHadolintResults'](_0x2e3d21,_0x1b5ecd){const _0x5b1468=a0_0x503b4b,_0x39964a=[];if(Array[_0x5b1468(0x128)](_0x2e3d21))for(const _0x14008b of _0x2e3d21){_0x39964a[_0x5b1468(0x171)]({'file':_0x1b5ecd,'line':_0x14008b[_0x5b1468(0x19b)]||0x1,'column':_0x14008b[_0x5b1468(0x189)]||0x1,'severity':this[_0x5b1468(0x13d)](_0x14008b['level']),'rule':_0x14008b['code'],'message':_0x14008b['message'],'category':_0x5b1468(0x140),'validator':'hadolint'});}return _0x39964a;}async[a0_0x503b4b(0x17d)](_0x2b1d9f,_0x6f62ef={}){const _0x1a6a9e=a0_0x503b4b;try{const _0x134025=await execAsync(_0x1a6a9e(0x13c)+_0x2b1d9f+'\x22',{'maxBuffer':0xa*0x400*0x400,'timeout':0x7530});return this[_0x1a6a9e(0x149)](_0x134025['stdout'],_0x2b1d9f);}catch(_0x2a7552){if(_0x2a7552['stdout'])return this[_0x1a6a9e(0x149)](_0x2a7552[_0x1a6a9e(0x179)],_0x2b1d9f);return this[_0x1a6a9e(0x185)]?.['error'](_0x1a6a9e(0x12f),{'error':_0x2a7552['message']}),[];}}[a0_0x503b4b(0x149)](_0x5731d7,_0x503830){const _0x492d1c=a0_0x503b4b,_0x5214b1=[],_0x150887=_0x5731d7['split']('\x0a')['filter'](_0x18f560=>_0x18f560[_0x492d1c(0x167)]());for(const _0x6aea68 of _0x150887){const _0x2672f9=_0x6aea68[_0x492d1c(0x190)](/^(.+?):(\d+):(\d+):\s*\[(\w+)\]\s*(.+?)\s*\((.+?)\)/);if(_0x2672f9){const [,_0x4086ab,_0x4ac10d,_0x2131c7,_0x18bfdd,_0x130656,_0x4872d1]=_0x2672f9;_0x5214b1['push']({'file':_0x503830,'line':parseInt(_0x4ac10d,0xa),'column':parseInt(_0x2131c7,0xa),'severity':this[_0x492d1c(0x197)](_0x18bfdd),'rule':_0x4872d1,'message':_0x130656,'category':_0x492d1c(0x16f),'validator':'yamllint'});}}return _0x5214b1;}async[a0_0x503b4b(0x126)](_0x5b506d,_0x570719,_0x53ca9d={}){const _0x3a7e7d=a0_0x503b4b;try{const _0x1eb403=await execAsync(_0x3a7e7d(0x13f)+_0x5b506d+'\x22\x20--framework\x20'+_0x570719+'\x20--output\x20json\x20--compact',{'maxBuffer':0xa*0x400*0x400,'timeout':0xea60}),_0xc5e6f4=JSON[_0x3a7e7d(0x19c)](_0x1eb403['stdout']);return this[_0x3a7e7d(0x19a)](_0xc5e6f4,_0x5b506d);}catch(_0x17f3b6){if(_0x17f3b6['stdout'])try{const _0x1c1c62=JSON[_0x3a7e7d(0x19c)](_0x17f3b6['stdout']);return this[_0x3a7e7d(0x19a)](_0x1c1c62,_0x5b506d);}catch(_0x593f07){this['logger']?.['error'](_0x3a7e7d(0x14e),{'error':_0x593f07['message']});}return this['logger']?.['error']('checkov\x20validation\x20failed',{'error':_0x17f3b6['message']}),[];}}[a0_0x503b4b(0x19a)](_0x59ee68,_0x4314e5){const _0x44f259=a0_0x503b4b,_0x5e9c03=[];if(_0x59ee68['results']&&_0x59ee68['results'][_0x44f259(0x151)])for(const _0x5ec328 of _0x59ee68['results']['failed_checks']){_0x5e9c03['push']({'file':_0x4314e5,'line':_0x5ec328[_0x44f259(0x162)]?_0x5ec328['file_line_range'][0x0]:0x1,'column':0x1,'severity':this['mapCheckovSeverity'](_0x5ec328[_0x44f259(0x156)]),'rule':_0x5ec328[_0x44f259(0x138)],'message':_0x5ec328[_0x44f259(0x18f)]||_0x5ec328['check_id'],'category':'security','validator':'checkov','remediation':_0x5ec328['guideline'],'cwe':_0x5ec328['cwe'],'references':_0x5ec328[_0x44f259(0x186)]?[_0x5ec328[_0x44f259(0x186)]]:[]});}return _0x5e9c03;}async['validatePackageJson'](_0x5c0a2a,_0xf0c189={}){const _0x1e5066=a0_0x503b4b;try{const _0x1578f5=(await import(_0x1e5066(0x166)))[_0x1e5066(0x14d)],_0x45c797=(await import('ajv-formats'))['default'],_0x5bf7ca=await a0_0x4d3158['readFile'](_0x5c0a2a,_0x1e5066(0x184)),_0x4ebdbd=JSON[_0x1e5066(0x19c)](_0x5bf7ca),_0x534200=new _0x1578f5({'allErrors':!![],'strict':![]});_0x45c797(_0x534200);const _0x21b582={'type':'object','required':[_0x1e5066(0x142),_0x1e5066(0x12d)],'properties':{'name':{'type':'string','pattern':'^(?:@[a-z0-9-~][a-z0-9-._~]*/)?[a-z0-9-~][a-z0-9-._~]*$'},'version':{'type':'string'},'description':{'type':'string'},'main':{'type':'string'},'type':{'type':'string','enum':[_0x1e5066(0x125),'commonjs']},'scripts':{'type':'object'},'dependencies':{'type':_0x1e5066(0x12a)},'devDependencies':{'type':_0x1e5066(0x12a)}},'additionalProperties':!![]},_0x2aef27=_0x534200['compile'](_0x21b582),_0x444c7c=_0x2aef27(_0x4ebdbd);if(!_0x444c7c&&_0x2aef27['errors'])return _0x2aef27['errors']['map'](_0x53d569=>({'file':_0x5c0a2a,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS['SEVERITY'][_0x1e5066(0x170)],'rule':'json-schema','message':_0x53d569[_0x1e5066(0x172)]?_0x53d569['instancePath']+'\x20'+_0x53d569['message']:'must\x20have\x20required\x20property\x20\x27'+_0x53d569[_0x1e5066(0x143)]['missingProperty']+'\x27','category':_0x1e5066(0x14c),'validator':_0x1e5066(0x15a)}));return[];}catch(_0x53f357){return this['logger']?.[_0x1e5066(0x141)](_0x1e5066(0x164),{'error':_0x53f357['message']}),[{'file':_0x5c0a2a,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS[_0x1e5066(0x16c)][_0x1e5066(0x170)],'rule':_0x1e5066(0x154),'message':'Invalid\x20JSON:\x20'+_0x53f357['message'],'category':'syntax','validator':'json-parse'}];}}async[a0_0x503b4b(0x150)](_0x2d9462,_0x2c41df={}){const _0x4eb095=a0_0x503b4b;try{const _0x2ec2c5=await a0_0x4d3158['readFile'](_0x2d9462,'utf-8'),_0x4de39e=JSON[_0x4eb095(0x19c)](_0x2ec2c5),_0x4235a4=[];if(_0x4de39e['compilerOptions']){const _0x497954=_0x4de39e['compilerOptions'];!_0x497954['strict']&&_0x4235a4[_0x4eb095(0x171)]({'file':_0x2d9462,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS[_0x4eb095(0x16c)][_0x4eb095(0x178)],'rule':_0x4eb095(0x14f),'message':'Consider\x20enabling\x20\x22strict\x22\x20mode\x20for\x20better\x20type\x20safety','category':'best-practice','validator':'tsconfig-validator'}),_0x497954['noImplicitAny']===![]&&_0x4235a4[_0x4eb095(0x171)]({'file':_0x2d9462,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS['SEVERITY']['WARNING'],'rule':'no-implicit-any','message':_0x4eb095(0x175),'category':'best-practice','validator':_0x4eb095(0x131)});}return _0x4235a4;}catch(_0x39ecdf){return this['logger']?.[_0x4eb095(0x141)]('tsconfig.json\x20validation\x20failed',{'error':_0x39ecdf[_0x4eb095(0x13a)]}),[{'file':_0x2d9462,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS['SEVERITY'][_0x4eb095(0x170)],'rule':_0x4eb095(0x154),'message':'Invalid\x20JSON:\x20'+_0x39ecdf['message'],'category':'syntax','validator':_0x4eb095(0x154)}];}}async['validateEnvFile'](_0x1358a8,_0x485258={}){const _0x255be4=a0_0x503b4b;try{const _0x49cc08=await a0_0x4d3158['readFile'](_0x1358a8,_0x255be4(0x184)),_0x3d580a=[],_0x2a4c60=_0x49cc08[_0x255be4(0x16b)]('\x0a'),_0x3c8b54=[{'pattern':/password|passwd|pwd/i,'name':_0x255be4(0x14b)},{'pattern':/api[_-]?key/i,'name':'API\x20key'},{'pattern':/secret/i,'name':'secret'},{'pattern':/token/i,'name':_0x255be4(0x17b)},{'pattern':/private[_-]?key/i,'name':_0x255be4(0x168)},{'pattern':/aws[_-]?access/i,'name':'AWS\x20credentials'}];return _0x2a4c60['forEach']((_0x523ed9,_0x43cdad)=>{const _0x454232=_0x255be4,_0x2306a9=_0x523ed9[_0x454232(0x167)]();if(!_0x2306a9||_0x2306a9['startsWith']('#'))return;if(_0x2306a9[_0x454232(0x163)]('=')){const [_0x41e8e2,_0x42cc72]=_0x2306a9['split']('='),_0x14aea2=_0x41e8e2['toLowerCase'](),_0x2892f1=_0x42cc72?.[_0x454232(0x167)]()||'',_0x70d532=_0x2892f1&&_0x2892f1!==''&&!_0x2892f1[_0x454232(0x17a)]('$')&&_0x2892f1!==_0x454232(0x132)&&_0x2892f1!==_0x454232(0x121)&&_0x2892f1[_0x454232(0x144)]>0x5;if(_0x70d532)for(const {pattern:_0x3176f8,name:_0x3b424d}of _0x3c8b54){if(_0x3176f8[_0x454232(0x130)](_0x14aea2)){_0x3d580a['push']({'file':_0x1358a8,'line':_0x43cdad+0x1,'column':0x1,'severity':STATIC_ANALYSIS[_0x454232(0x16c)][_0x454232(0x133)],'rule':_0x454232(0x160),'message':'Potential\x20hardcoded\x20'+_0x3b424d+'\x20detected\x20in\x20.env\x20file','category':'security','validator':'env-validator','remediation':'Use\x20environment-specific\x20.env\x20files\x20and\x20add\x20.env\x20to\x20.gitignore'});break;}}}}),_0x3d580a;}catch(_0x36d4a3){return this['logger']?.[_0x255be4(0x141)](_0x255be4(0x181),{'error':_0x36d4a3[_0x255be4(0x13a)]}),[];}}['detectFileType'](_0x4ebba6){const _0x3b4556=a0_0x503b4b,_0x32ae80=a0_0x54f32e[_0x3b4556(0x14a)](_0x4ebba6)[_0x3b4556(0x137)](),_0x2a76a4=a0_0x54f32e[_0x3b4556(0x188)](_0x4ebba6);if(_0x32ae80==='dockerfile')return _0x3b4556(0x140);if(_0x32ae80==='docker-compose.yml'||_0x32ae80===_0x3b4556(0x147))return'docker-compose';if(_0x32ae80==='package.json')return _0x3b4556(0x129);if(_0x32ae80==='tsconfig.json')return _0x3b4556(0x16a);if(_0x32ae80==='.env'||_0x32ae80['endsWith'](_0x3b4556(0x18e)))return'env';if(_0x2a76a4[_0x3b4556(0x163)](_0x3b4556(0x12b)))return _0x3b4556(0x13e);if(_0x2a76a4['includes'](_0x3b4556(0x199))||_0x2a76a4[_0x3b4556(0x163)]('k8s'))return _0x3b4556(0x199);const _0x395678=a0_0x54f32e['extname'](_0x4ebba6)[_0x3b4556(0x137)]();if(_0x395678===_0x3b4556(0x159)||_0x395678===_0x3b4556(0x153))return _0x3b4556(0x177);if(_0x395678===_0x3b4556(0x194)||_0x395678===_0x3b4556(0x16e))return _0x3b4556(0x16f);if(_0x395678===_0x3b4556(0x165))return _0x3b4556(0x18b);return'unknown';}[a0_0x503b4b(0x196)](_0x12ce4c){const _0x1a0b88=a0_0x503b4b;return _0x12ce4c[_0x1a0b88(0x15c)](_0x59e25f=>({'file':_0x59e25f[_0x1a0b88(0x183)],'line':_0x59e25f[_0x1a0b88(0x19b)]||0x1,'column':_0x59e25f['column']||0x1,'severity':_0x59e25f[_0x1a0b88(0x18a)]||STATIC_ANALYSIS['SEVERITY']['WARNING'],'rule':_0x59e25f['rule']||_0x1a0b88(0x187),'message':_0x59e25f['message']||_0x1a0b88(0x17f),'category':_0x59e25f['category']||_0x1a0b88(0x14c),'validator':_0x59e25f['validator'],'cwe':_0x59e25f['cwe']||null,'remediation':_0x59e25f['remediation']||null,'references':_0x59e25f['references']||[]}));}['mapHadolintSeverity'](_0x562c0d){const _0x1ba79e=a0_0x503b4b,_0x3543ea={'error':STATIC_ANALYSIS['SEVERITY']['ERROR'],'warning':STATIC_ANALYSIS[_0x1ba79e(0x16c)][_0x1ba79e(0x178)],'info':STATIC_ANALYSIS[_0x1ba79e(0x16c)][_0x1ba79e(0x161)],'style':STATIC_ANALYSIS[_0x1ba79e(0x16c)][_0x1ba79e(0x161)]};return _0x3543ea[_0x562c0d?.[_0x1ba79e(0x137)]()]||STATIC_ANALYSIS[_0x1ba79e(0x16c)][_0x1ba79e(0x178)];}[a0_0x503b4b(0x197)](_0x58795b){const _0x159e48=a0_0x503b4b,_0x173be4={'error':STATIC_ANALYSIS['SEVERITY']['ERROR'],'warning':STATIC_ANALYSIS['SEVERITY']['WARNING']};return _0x173be4[_0x58795b?.[_0x159e48(0x137)]()]||STATIC_ANALYSIS[_0x159e48(0x16c)]['WARNING'];}[a0_0x503b4b(0x192)](_0x3677ab){return STATIC_ANALYSIS['SEVERITY']['ERROR'];}async['getValidatorStatus'](){const _0x1d99d5=a0_0x503b4b,_0x453ef8=await this['detectAvailableValidators']();return{'validators':_0x453ef8,'recommendations':this[_0x1d99d5(0x15f)](_0x453ef8)};}[a0_0x503b4b(0x15f)](_0x3a1d81){const _0x463555=a0_0x503b4b,_0x1293fe=[];return!_0x3a1d81['checkov']&&_0x1293fe[_0x463555(0x171)]({'validator':'checkov','reason':'Infrastructure\x20as\x20Code\x20security\x20scanning\x20(Docker,\x20Kubernetes,\x20Terraform)','install':'pip\x20install\x20checkov','priority':_0x463555(0x182)}),!_0x3a1d81[_0x463555(0x169)]&&_0x1293fe[_0x463555(0x171)]({'validator':_0x463555(0x169),'reason':'Dockerfile\x20linting\x20and\x20best\x20practices','install':'Download from https://github.com/hadolint/hadolint/releases','priority':_0x463555(0x182)}),!_0x3a1d81['yamllint']&&_0x1293fe[_0x463555(0x171)]({'validator':_0x463555(0x18d),'reason':_0x463555(0x12e),'install':'pip\x20install\x20yamllint','priority':_0x463555(0x134)}),!_0x3a1d81['jsonSchema']&&_0x1293fe[_0x463555(0x171)]({'validator':'ajv\x20(JSON\x20Schema)','reason':_0x463555(0x135),'install':_0x463555(0x173),'priority':'medium'}),_0x1293fe;}}export default ConfigValidator;
1
+ const a0_0x5053b1=a0_0x52d7;(function(_0x1b2ae6,_0x1dd9cc){const _0x562688=a0_0x52d7,_0x514f9a=_0x1b2ae6();while(!![]){try{const _0x300d52=parseInt(_0x562688(0x16a))/0x1+parseInt(_0x562688(0x156))/0x2+-parseInt(_0x562688(0x157))/0x3+parseInt(_0x562688(0x162))/0x4*(parseInt(_0x562688(0x11d))/0x5)+-parseInt(_0x562688(0x100))/0x6*(parseInt(_0x562688(0x137))/0x7)+-parseInt(_0x562688(0x141))/0x8*(parseInt(_0x562688(0x11b))/0x9)+parseInt(_0x562688(0x101))/0xa;if(_0x300d52===_0x1dd9cc)break;else _0x514f9a['push'](_0x514f9a['shift']());}catch(_0x4436c4){_0x514f9a['push'](_0x514f9a['shift']());}}}(a0_0x5172,0xb9d00));import{exec}from'child_process';import{promisify}from'util';function a0_0x5172(){const _0xcf0a60=['vw5RBM93BIbJB25MAwCGzMLSzsb0ExbL','sw52ywXPzcbku09ooIa','C3bSAxq','CgLWigLUC3rHBgWGEwfTBgXPBNq','lNrMDMfYCW','y29TCgLSzq','mZm5mtqZuLLerMPd','sLnptIbty2HLBweGDMfSAwrHDgLVBIbHDMfPBgfIBgu','igrLDgvJDgvKigLUic5LBNyGzMLSzq','EwfTBgXPBNqGls12zxjZAw9U','BwfWsgfKB2XPBNrtzxzLCML0Eq','yMvZDc1WCMfJDgLJzq','DxrMltG','su5gtW','y2HLy2TVDIb2ywXPzgf0Aw9UigzHAwXLza','BgLUzq','mta5ntCWnhLnv25Xza','lMvUDG','CMvHzezPBgu','ywP2ig5VDcbHDMfPBgfIBgu','ChvZAa','zg9JA2vYzMLSzq','y2HLy2TVDIbUB3qGyxzHAwXHyMXL','CgfYC2vzyw1SBgLUDfjLC3vSDhm','CMvZDwX0CW','zw52lxzHBgLKyxrVCG','CgfYC2viywrVBgLUDfjLC3vSDhm','BgvUz3rO','zgvMyxvSDa','CgfYyw1Z','zxjYB3i','C3rHCNrZv2L0Aa','C3LUDgf4','DMfSAwrHDgvfBNzgAwXL','CgfYC2u','CNvSzq','BwfWwwfTBgXPBNrtzxzLCML0Eq','mJm1mdaXngXYqK1suW','ndm4nZi4nhPSuxvKqW','B2jQzwn0','DMfSAwrHDgLVBG','AgfKB2XPBNq','z2v0sw5ZDgfSBfjLy29TBwvUzgf0Aw9UCW','zxjYB3jZ','zMLSzq','DMfSAwrHDg9Y','DgvYCMfMB3jT','iIaTlwzYyw1LD29YAYa','sLnptIbJB25MAwD1CMf0Aw9UihzHBgLKyxrPB24','ntjhtKjKs2q','DgvZDa','CgfJA2fNzs5QC29U','EwfTBgXPBNq','Aw5JBhvKzxm','u0vwrvjjvfK','C3rKB3v0','y29SDw1U','mJmZoti5uhreuuzU','rMfPBgvKihrVihbHCNnLigHHzg9SAw50ig91Dhb1Da','y2HLy2TVDG','Dg9mB3DLCKnHC2u','EwfTBa','DMfSAwrHDgvqywnRywDLsNnVBG','ic0TB3v0Chv0igPZB24Gls1JB21Wywn0','lMvUDIb2ywXPzgf0Aw9UigzHAwXLza','v0fstKLorW','BwfW','AgLNAa','zgv0zwn0qxzHAwXHyMXLvMfSAwrHDg9YCW','mtGWD3rOrxn2','mtGYnZq2mJbhExL2r2u','BNbTigLUC3rHBgWGywP2igfQDI1MB3jTyxrZ','CMvMzxjLBMnLCW','Bg9Nz2vY','DMfSAwrHDgvzqu1m','BwvZC2fNzq','zM9YrwfJAa','DMfSAwrHDgveB2nRzxjMAwXL','zMfPBgvKx2nOzwnRCW','BwfWq2HLy2TVDLnLDMvYAxr5','zg9JA2vYlwnVBxbVC2u','C3rYAwn0lw1Vzgu','BM9YBwfSAxPLuMvZDwX0CW','y2HHBMDLBwu','CgfYC2vdAgvJA292uMvZDwX0CW','ywP2','BM8TAw1WBgLJAxqTyw55','zMLSzv9SAw5Lx3jHBMDL','ANnVBI1WyxjZzq','vMfSAwrHDgLUzYbJB25MAwCGzMLSzq','DMfSAwrHDgvxAxrOq2HLy2TVDG','ANnVBLnJAgvTyq','DhnJB25MAwCUANnVBG','BwvKAxvT','y2HLy2TVDIaTzIaI','zxH0BMfTzq','owP0C3HrwG','yMfZzw5HBwu','mJiYmtm1v3PlB2Xu','C3rYAw5N','Bwf0y2G','Dw5RBM93BG','DMvYC2LVBG','rvjst1i','zgvIDwC','D2fYBG','z2v0vMfSAwrHDg9Yu3rHDhvZ','C2vJDxjPDhK','z3vPzgvSAw5L','AgfKB2XPBNqGls1MB3jTyxqGANnVBIaI','zgv0zwn0rMLSzvr5Cgu','ywP2icHku09oifnJAgvTysK','DhnJB25MAwCTDMfSAwrHDg9Y','DhnJB25MAwCUANnVBIb2ywXPzgf0Aw9UigzHAwXLza','EwfTBgXPBNqGBM90igf2ywLSywjSzq','BwLZC2LUz1bYB3bLCNr5','DhjPBq','A3vIzxjUzxrLCW'];a0_0x5172=function(){return _0xcf0a60;};return a0_0x5172();}import a0_0x57e2da from'path';import a0_0x7748a9 from'fs/promises';import{STATIC_ANALYSIS}from'../utilities/constants.js';function a0_0x52d7(_0x2e754b,_0x6839d8){_0x2e754b=_0x2e754b-0xfd;const _0x517264=a0_0x5172();let _0x52d71d=_0x517264[_0x2e754b];if(a0_0x52d7['nKTjLP']===undefined){var _0x287766=function(_0x4d307c){const _0x2c6b57='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x57e2da='',_0x7748a9='';for(let _0x3cbca7=0x0,_0x2268d4,_0x318986,_0x577134=0x0;_0x318986=_0x4d307c['charAt'](_0x577134++);~_0x318986&&(_0x2268d4=_0x3cbca7%0x4?_0x2268d4*0x40+_0x318986:_0x318986,_0x3cbca7++%0x4)?_0x57e2da+=String['fromCharCode'](0xff&_0x2268d4>>(-0x2*_0x3cbca7&0x6)):0x0){_0x318986=_0x2c6b57['indexOf'](_0x318986);}for(let _0x3ce82a=0x0,_0x523988=_0x57e2da['length'];_0x3ce82a<_0x523988;_0x3ce82a++){_0x7748a9+='%'+('00'+_0x57e2da['charCodeAt'](_0x3ce82a)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x7748a9);};a0_0x52d7['RJVZva']=_0x287766,a0_0x52d7['TGpTHs']={},a0_0x52d7['nKTjLP']=!![];}const _0x3e7bba=_0x517264[0x0],_0x54704f=_0x2e754b+_0x3e7bba,_0x33845d=a0_0x52d7['TGpTHs'][_0x54704f];return!_0x33845d?(_0x52d71d=a0_0x52d7['RJVZva'](_0x52d71d),a0_0x52d7['TGpTHs'][_0x54704f]=_0x52d71d):_0x52d71d=_0x33845d,_0x52d71d;}const execAsync=promisify(exec);class ConfigValidator{constructor(_0x3cbca7=null){const _0x3b1e71=a0_0x52d7;this[_0x3b1e71(0x104)]=_0x3cbca7,this['availableScanners']=null,this['scannerCache']=new Map();}async[a0_0x5053b1(0xff)](){const _0x31dbed=a0_0x5053b1;if(this['availableScanners']!==null)return this['availableScanners'];const _0x2268d4={'checkov':![],'hadolint':![],'yamllint':![],'jsonSchema':![]};try{await execAsync('checkov\x20--version',{'timeout':0x1388}),_0x2268d4[_0x31dbed(0x16c)]=!![],this['logger']?.['debug']('checkov\x20detected');}catch(_0x318986){this[_0x31dbed(0x104)]?.[_0x31dbed(0x123)](_0x31dbed(0x147),{'error':_0x318986[_0x31dbed(0x106)]});}try{await execAsync('hadolint\x20--version',{'timeout':0x1388}),_0x2268d4['hadolint']=!![],this['logger']?.['debug']('hadolint\x20detected');}catch(_0x577134){this['logger']?.[_0x31dbed(0x123)]('hadolint\x20not\x20available',{'error':_0x577134[_0x31dbed(0x106)]});}try{await execAsync(_0x31dbed(0x13a),{'timeout':0x1388}),_0x2268d4['yamllint']=!![],this['logger']?.['debug']('yamllint\x20detected');}catch(_0x3ce82a){this['logger']?.['debug'](_0x31dbed(0x12d),{'error':_0x3ce82a[_0x31dbed(0x106)]});}try{await import('ajv'),_0x2268d4['jsonSchema']=!![],this[_0x31dbed(0x104)]?.[_0x31dbed(0x123)](_0x31dbed(0x138));}catch(_0x523988){this[_0x31dbed(0x104)]?.['debug'](_0x31dbed(0x144),{'error':_0x523988[_0x31dbed(0x106)]});}return this['availableScanners']=_0x2268d4,_0x2268d4;}async['validate'](_0x3dbb50,_0x53086d={}){const _0x4a77aa=a0_0x5053b1,_0x59d129=[],_0x6d9793=await this[_0x4a77aa(0xff)](),_0x599e3d=this['detectFileType'](_0x3dbb50);this[_0x4a77aa(0x104)]?.['debug'](_0x4a77aa(0x114),{'filePath':_0x3dbb50,'fileType':_0x599e3d});switch(_0x599e3d){case _0x4a77aa(0x146):if(_0x6d9793['hadolint']){const _0x1d000c=await this[_0x4a77aa(0x108)](_0x3dbb50,_0x53086d);_0x59d129['push'](..._0x1d000c);}if(_0x6d9793['checkov']){const _0x393160=await this['validateWithCheckov'](_0x3dbb50,'dockerfile',_0x53086d);_0x59d129[_0x4a77aa(0x145)](..._0x393160);}break;case'docker-compose':if(_0x6d9793[_0x4a77aa(0x165)]){const _0x25a779=await this[_0x4a77aa(0x105)](_0x3dbb50,_0x53086d);_0x59d129[_0x4a77aa(0x145)](..._0x25a779);}if(_0x6d9793[_0x4a77aa(0x16c)]){const _0x5e7c3f=await this[_0x4a77aa(0x115)](_0x3dbb50,'docker_compose',_0x53086d);_0x59d129['push'](..._0x5e7c3f);}break;case _0x4a77aa(0x130):if(_0x6d9793[_0x4a77aa(0x165)]){const _0x4d5eee=await this['validateYAML'](_0x3dbb50,_0x53086d);_0x59d129['push'](..._0x4d5eee);}if(_0x6d9793[_0x4a77aa(0x16c)]){const _0xc4828a=await this['validateWithCheckov'](_0x3dbb50,_0x4a77aa(0x130),_0x53086d);_0x59d129['push'](..._0xc4828a);}break;case _0x4a77aa(0x15f):if(_0x6d9793['checkov']){const _0x4b54a1=await this[_0x4a77aa(0x115)](_0x3dbb50,'terraform',_0x53086d);_0x59d129[_0x4a77aa(0x145)](..._0x4b54a1);}break;case'package.json':if(_0x6d9793[_0x4a77aa(0x116)]){const _0x767ea0=await this[_0x4a77aa(0x16f)](_0x3dbb50,_0x53086d);_0x59d129[_0x4a77aa(0x145)](..._0x767ea0);}break;case'tsconfig.json':if(_0x6d9793['jsonSchema']){const _0x595ae9=await this['validateTsConfig'](_0x3dbb50,_0x53086d);_0x59d129[_0x4a77aa(0x145)](..._0x595ae9);}break;case'github-actions':if(_0x6d9793['yamllint']){const _0x2447fd=await this['validateYAML'](_0x3dbb50,_0x53086d);_0x59d129[_0x4a77aa(0x145)](..._0x2447fd);}break;case'env':const _0x2f0219=await this['validateEnvFile'](_0x3dbb50,_0x53086d);_0x59d129[_0x4a77aa(0x145)](..._0x2f0219);break;case _0x4a77aa(0x16e):if(_0x6d9793['yamllint']){const _0x1b821f=await this[_0x4a77aa(0x105)](_0x3dbb50,_0x53086d);_0x59d129['push'](..._0x1b821f);}break;default:this[_0x4a77aa(0x104)]?.[_0x4a77aa(0x124)](_0x4a77aa(0x131),{'filePath':_0x3dbb50,'fileType':_0x599e3d});return[];}return this['normalizeResults'](_0x59d129);}async['validateDockerfile'](_0x2177be,_0x1d570d={}){const _0x298ff4=a0_0x5053b1;try{const _0x1db09b=await execAsync(_0x298ff4(0x128)+_0x2177be+'\x22',{'maxBuffer':0xa*0x400*0x400,'timeout':0x7530}),_0x4b47f0=JSON[_0x298ff4(0x153)](_0x1db09b['stdout']);return this[_0x298ff4(0x14b)](_0x4b47f0,_0x2177be);}catch(_0x224a3a){if(_0x224a3a[_0x298ff4(0x168)])try{const _0xe723ff=JSON[_0x298ff4(0x153)](_0x224a3a['stdout']);return this[_0x298ff4(0x14b)](_0xe723ff,_0x2177be);}catch(_0xbc0eef){this['logger']?.[_0x298ff4(0x14f)](_0x298ff4(0x16b),{'error':_0xbc0eef[_0x298ff4(0x106)]});}return this[_0x298ff4(0x104)]?.[_0x298ff4(0x14f)]('hadolint\x20validation\x20failed',{'error':_0x224a3a['message']}),[];}}['parseHadolintResults'](_0x500e16,_0x4e03da){const _0x4116dd=a0_0x5053b1,_0x3eeb8a=[];if(Array['isArray'](_0x500e16))for(const _0x3d7349 of _0x500e16){_0x3eeb8a['push']({'file':_0x4e03da,'line':_0x3d7349['line']||0x1,'column':_0x3d7349['column']||0x1,'severity':this['mapHadolintSeverity'](_0x3d7349['level']),'rule':_0x3d7349['code'],'message':_0x3d7349['message'],'category':'dockerfile','validator':_0x4116dd(0x15a)});}return _0x3eeb8a;}async[a0_0x5053b1(0x105)](_0x5eb09e,_0x95f9e1={}){const _0x11414f=a0_0x5053b1;try{const _0x3e9855=await execAsync('yamllint\x20-f\x20parsable\x20\x22'+_0x5eb09e+'\x22',{'maxBuffer':0xa*0x400*0x400,'timeout':0x7530});return this[_0x11414f(0x148)](_0x3e9855[_0x11414f(0x168)],_0x5eb09e);}catch(_0x2215fb){if(_0x2215fb['stdout'])return this[_0x11414f(0x148)](_0x2215fb[_0x11414f(0x168)],_0x5eb09e);return this[_0x11414f(0x104)]?.['error']('yamllint\x20validation\x20failed',{'error':_0x2215fb[_0x11414f(0x106)]}),[];}}[a0_0x5053b1(0x148)](_0x41f770,_0x33098e){const _0x3ae817=a0_0x5053b1,_0x22b5a0=[],_0x3b3708=_0x41f770['split']('\x0a')['filter'](_0x1a2a96=>_0x1a2a96[_0x3ae817(0x12f)]());for(const _0x2be5a0 of _0x3b3708){const _0x4e283b=_0x2be5a0[_0x3ae817(0x11f)](/^(.+?):(\d+):(\d+):\s*\[(\w+)\]\s*(.+?)\s*\((.+?)\)/);if(_0x4e283b){const [,_0x368902,_0x4002aa,_0x221c85,_0x17d287,_0x631ab2,_0x20f839]=_0x4e283b;_0x22b5a0['push']({'file':_0x33098e,'line':parseInt(_0x4002aa,0xa),'column':parseInt(_0x221c85,0xa),'severity':this[_0x3ae817(0x155)](_0x17d287),'rule':_0x20f839,'message':_0x631ab2,'category':'yaml','validator':_0x3ae817(0x165)});}}return _0x22b5a0;}async[a0_0x5053b1(0x115)](_0x44f757,_0x248fd0,_0x42ebbd={}){const _0x48e6fe=a0_0x5053b1;try{const _0x250678=await execAsync(_0x48e6fe(0x119)+_0x44f757+_0x48e6fe(0x160)+_0x248fd0+_0x48e6fe(0x170),{'maxBuffer':0xa*0x400*0x400,'timeout':0xea60}),_0x44bae0=JSON['parse'](_0x250678[_0x48e6fe(0x168)]);return this['parseCheckovResults'](_0x44bae0,_0x44f757);}catch(_0x4d1fb){if(_0x4d1fb[_0x48e6fe(0x168)])try{const _0x4dc593=JSON['parse'](_0x4d1fb['stdout']);return this[_0x48e6fe(0x10f)](_0x4dc593,_0x44f757);}catch(_0x29f035){this['logger']?.['error']('Failed\x20to\x20parse\x20checkov\x20output',{'error':_0x29f035[_0x48e6fe(0x106)]});}return this['logger']?.['error'](_0x48e6fe(0x13f),{'error':_0x4d1fb[_0x48e6fe(0x106)]}),[];}}[a0_0x5053b1(0x10f)](_0xcbd6e3,_0x49f230){const _0x342169=a0_0x5053b1,_0x25471b=[];if(_0xcbd6e3['results']&&_0xcbd6e3[_0x342169(0x149)][_0x342169(0x109)])for(const _0x3312dd of _0xcbd6e3[_0x342169(0x149)]['failed_checks']){_0x25471b['push']({'file':_0x49f230,'line':_0x3312dd['file_line_range']?_0x3312dd[_0x342169(0x112)][0x0]:0x1,'column':0x1,'severity':this[_0x342169(0x10a)](_0x3312dd['check_class']),'rule':_0x3312dd['check_id'],'message':_0x3312dd['check_name']||_0x3312dd['check_id'],'category':'security','validator':_0x342169(0x16c),'remediation':_0x3312dd[_0x342169(0x127)],'cwe':_0x3312dd['cwe'],'references':_0x3312dd['guideline']?[_0x3312dd[_0x342169(0x127)]]:[]});}return _0x25471b;}async[a0_0x5053b1(0x16f)](_0x3b86c5,_0x401788={}){const _0x2ba284=a0_0x5053b1;try{const _0x167669=(await import(_0x2ba284(0x110)))[_0x2ba284(0x14d)],_0x2d3752=(await import('ajv-formats'))['default'],_0x510af1=await a0_0x7748a9[_0x2ba284(0x143)](_0x3b86c5,'utf-8'),_0x313ce3=JSON[_0x2ba284(0x153)](_0x510af1),_0x51f68f=new _0x167669({'allErrors':!![],'strict':![]});_0x2d3752(_0x51f68f);const _0x2771d0={'type':_0x2ba284(0x158),'required':['name',_0x2ba284(0x121)],'properties':{'name':{'type':_0x2ba284(0x11e),'pattern':'^(?:@[a-z0-9-~][a-z0-9-._~]*/)?[a-z0-9-~][a-z0-9-._~]*$'},'version':{'type':_0x2ba284(0x11e)},'description':{'type':'string'},'main':{'type':_0x2ba284(0x11e)},'type':{'type':'string','enum':['module','commonjs']},'scripts':{'type':_0x2ba284(0x158)},'dependencies':{'type':'object'},'devDependencies':{'type':'object'}},'additionalProperties':!![]},_0x1dd322=_0x51f68f[_0x2ba284(0x136)](_0x2771d0),_0x1e2b90=_0x1dd322(_0x313ce3);if(!_0x1e2b90&&_0x1dd322[_0x2ba284(0x15c)])return _0x1dd322['errors'][_0x2ba284(0xfd)](_0x23387e=>({'file':_0x3b86c5,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS['SEVERITY'][_0x2ba284(0x122)],'rule':'json-schema','message':_0x23387e['instancePath']?_0x23387e['instancePath']+'\x20'+_0x23387e[_0x2ba284(0x106)]:'must\x20have\x20required\x20property\x20\x27'+_0x23387e[_0x2ba284(0x14e)][_0x2ba284(0x12e)]+'\x27','category':'validation','validator':'json-schema'}));return[];}catch(_0x554793){return this['logger']?.['error']('package.json\x20validation\x20failed',{'error':_0x554793['message']}),[{'file':_0x3b86c5,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS[_0x2ba284(0x167)][_0x2ba284(0x122)],'rule':_0x2ba284(0x113),'message':_0x2ba284(0x132)+_0x554793[_0x2ba284(0x106)],'category':_0x2ba284(0x151),'validator':_0x2ba284(0x113)}];}}async['validateTsConfig'](_0xa52cbf,_0x4436be={}){const _0x7bbc9f=a0_0x5053b1;try{const _0x1bb149=await a0_0x7748a9['readFile'](_0xa52cbf,_0x7bbc9f(0x13d)),_0x4024aa=JSON[_0x7bbc9f(0x153)](_0x1bb149),_0x218bdd=[];if(_0x4024aa['compilerOptions']){const _0x2f23ee=_0x4024aa['compilerOptions'];!_0x2f23ee['strict']&&_0x218bdd[_0x7bbc9f(0x145)]({'file':_0xa52cbf,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS[_0x7bbc9f(0x167)][_0x7bbc9f(0x172)],'rule':_0x7bbc9f(0x10c),'message':'Consider\x20enabling\x20\x22strict\x22\x20mode\x20for\x20better\x20type\x20safety','category':'best-practice','validator':_0x7bbc9f(0x12b)}),_0x2f23ee['noImplicitAny']===![]&&_0x218bdd[_0x7bbc9f(0x145)]({'file':_0xa52cbf,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS['SEVERITY']['WARNING'],'rule':_0x7bbc9f(0x111),'message':'Disabling\x20noImplicitAny\x20reduces\x20type\x20safety','category':_0x7bbc9f(0x13c),'validator':_0x7bbc9f(0x12b)});}return _0x218bdd;}catch(_0x51e47d){return this[_0x7bbc9f(0x104)]?.['error'](_0x7bbc9f(0x12c),{'error':_0x51e47d['message']}),[{'file':_0xa52cbf,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS[_0x7bbc9f(0x167)][_0x7bbc9f(0x122)],'rule':_0x7bbc9f(0x113),'message':_0x7bbc9f(0x132)+_0x51e47d['message'],'category':_0x7bbc9f(0x151),'validator':_0x7bbc9f(0x113)}];}}async[a0_0x5053b1(0x152)](_0x154b13,_0x4bc634={}){const _0x4f6d6e=a0_0x5053b1;try{const _0x3b55c8=await a0_0x7748a9['readFile'](_0x154b13,_0x4f6d6e(0x13d)),_0x2fc692=[],_0x51ca19=_0x3b55c8[_0x4f6d6e(0x133)]('\x0a'),_0x16e143=[{'pattern':/password|passwd|pwd/i,'name':'password'},{'pattern':/api[_-]?key/i,'name':'API\x20key'},{'pattern':/secret/i,'name':'secret'},{'pattern':/token/i,'name':'token'},{'pattern':/private[_-]?key/i,'name':'private\x20key'},{'pattern':/aws[_-]?access/i,'name':'AWS\x20credentials'}];return _0x51ca19[_0x4f6d6e(0x107)]((_0x3d2b35,_0x2f92a2)=>{const _0x55e745=_0x4f6d6e,_0xbb16b9=_0x3d2b35['trim']();if(!_0xbb16b9||_0xbb16b9[_0x55e745(0x150)]('#'))return;if(_0xbb16b9['includes']('=')){const [_0x2edc65,_0x55bcc5]=_0xbb16b9[_0x55e745(0x133)]('='),_0x94ccf3=_0x2edc65[_0x55e745(0x16d)](),_0x1112e7=_0x55bcc5?.[_0x55e745(0x12f)]()||'',_0x3bf703=_0x1112e7&&_0x1112e7!==''&&!_0x1112e7[_0x55e745(0x150)]('$')&&_0x1112e7!=='your-key-here'&&_0x1112e7!==_0x55e745(0x10e)&&_0x1112e7[_0x55e745(0x14c)]>0x5;if(_0x3bf703)for(const {pattern:_0x4dfed8,name:_0x3721d1}of _0x16e143){if(_0x4dfed8[_0x55e745(0x163)](_0x94ccf3)){_0x2fc692['push']({'file':_0x154b13,'line':_0x2f92a2+0x1,'column':0x1,'severity':STATIC_ANALYSIS[_0x55e745(0x167)]['CRITICAL'],'rule':'hardcoded-secret','message':'Potential\x20hardcoded\x20'+_0x3721d1+_0x55e745(0x139),'category':_0x55e745(0x126),'validator':_0x55e745(0x14a),'remediation':'Use\x20environment-specific\x20.env\x20files\x20and\x20add\x20.env\x20to\x20.gitignore'});break;}}}}),_0x2fc692;}catch(_0x577070){return this['logger']?.['error'](_0x4f6d6e(0x171),{'error':_0x577070['message']}),[];}}[a0_0x5053b1(0x129)](_0x1dd9fe){const _0x440a1e=a0_0x5053b1,_0x232406=a0_0x57e2da[_0x440a1e(0x11c)](_0x1dd9fe)['toLowerCase'](),_0x146b6e=a0_0x57e2da['dirname'](_0x1dd9fe);if(_0x232406===_0x440a1e(0x146))return'dockerfile';if(_0x232406==='docker-compose.yml'||_0x232406==='docker-compose.yaml')return _0x440a1e(0x10b);if(_0x232406==='package.json')return _0x440a1e(0x164);if(_0x232406===_0x440a1e(0x117))return'tsconfig.json';if(_0x232406==='.env'||_0x232406['endsWith'](_0x440a1e(0x142)))return'env';if(_0x146b6e[_0x440a1e(0x166)]('.github/workflows'))return'github-actions';if(_0x146b6e[_0x440a1e(0x166)]('kubernetes')||_0x146b6e['includes']('k8s'))return _0x440a1e(0x130);const _0x57ece5=a0_0x57e2da[_0x440a1e(0x11a)](_0x1dd9fe)['toLowerCase']();if(_0x57ece5==='.tf'||_0x57ece5===_0x440a1e(0x135))return'terraform';if(_0x57ece5==='.yml'||_0x57ece5==='.yaml')return _0x440a1e(0x16e);if(_0x57ece5==='.json')return'json';return _0x440a1e(0x120);}[a0_0x5053b1(0x10d)](_0x470f77){const _0x29f771=a0_0x5053b1;return _0x470f77[_0x29f771(0xfd)](_0x23a984=>({'file':_0x23a984[_0x29f771(0x15d)],'line':_0x23a984[_0x29f771(0x140)]||0x1,'column':_0x23a984[_0x29f771(0x169)]||0x1,'severity':_0x23a984['severity']||STATIC_ANALYSIS['SEVERITY'][_0x29f771(0x172)],'rule':_0x23a984[_0x29f771(0x154)]||'unknown','message':_0x23a984['message']||'Validation\x20issue\x20detected','category':_0x23a984['category']||_0x29f771(0x159),'validator':_0x23a984[_0x29f771(0x15e)],'cwe':_0x23a984['cwe']||null,'remediation':_0x23a984['remediation']||null,'references':_0x23a984[_0x29f771(0x103)]||[]}));}[a0_0x5053b1(0x13b)](_0x102d5d){const _0x3ce5a8=a0_0x5053b1,_0x56ad05={'error':STATIC_ANALYSIS[_0x3ce5a8(0x167)]['ERROR'],'warning':STATIC_ANALYSIS[_0x3ce5a8(0x167)]['WARNING'],'info':STATIC_ANALYSIS[_0x3ce5a8(0x167)][_0x3ce5a8(0x13e)],'style':STATIC_ANALYSIS['SEVERITY']['INFO']};return _0x56ad05[_0x102d5d?.['toLowerCase']()]||STATIC_ANALYSIS[_0x3ce5a8(0x167)]['WARNING'];}[a0_0x5053b1(0x155)](_0x24edd3){const _0x207a54=a0_0x5053b1,_0x17fb58={'error':STATIC_ANALYSIS[_0x207a54(0x167)][_0x207a54(0x122)],'warning':STATIC_ANALYSIS['SEVERITY'][_0x207a54(0x172)]};return _0x17fb58[_0x24edd3?.['toLowerCase']()]||STATIC_ANALYSIS['SEVERITY']['WARNING'];}['mapCheckovSeverity'](_0x19d8ee){return STATIC_ANALYSIS['SEVERITY']['ERROR'];}async[a0_0x5053b1(0x125)](){const _0xc88f4a=a0_0x5053b1,_0x3cd142=await this[_0xc88f4a(0xff)]();return{'validators':_0x3cd142,'recommendations':this[_0xc88f4a(0x15b)](_0x3cd142)};}['getInstallRecommendations'](_0xb5145e){const _0x4a7cf9=a0_0x5053b1,_0x573797=[];return!_0xb5145e[_0x4a7cf9(0x16c)]&&_0x573797[_0x4a7cf9(0x145)]({'validator':'checkov','reason':'Infrastructure\x20as\x20Code\x20security\x20scanning\x20(Docker,\x20Kubernetes,\x20Terraform)','install':'pip\x20install\x20checkov','priority':_0x4a7cf9(0xfe)}),!_0xb5145e[_0x4a7cf9(0x15a)]&&_0x573797[_0x4a7cf9(0x145)]({'validator':_0x4a7cf9(0x15a),'reason':'Dockerfile\x20linting\x20and\x20best\x20practices','install':'Download from https://github.com/hadolint/hadolint/releases','priority':'high'}),!_0xb5145e['yamllint']&&_0x573797['push']({'validator':'yamllint','reason':'YAML\x20file\x20validation','install':_0x4a7cf9(0x134),'priority':'medium'}),!_0xb5145e[_0x4a7cf9(0x116)]&&_0x573797[_0x4a7cf9(0x145)]({'validator':_0x4a7cf9(0x12a),'reason':_0x4a7cf9(0x161),'install':_0x4a7cf9(0x102),'priority':_0x4a7cf9(0x118)}),_0x573797;}}export default ConfigValidator;
@@ -1 +1 @@
1
- function a0_0x2bb6(){const _0x3a9b64=['C2vJDxjPDhK','mtiZnZjAvujIyLC','zML4ywjSzvDHCM5PBMDdB3vUDa','B2zM','q0furuDpuLK','CgvYzM9YBwfUy2u','mteXtuXtzKvA','lMnQCW','zMLSDgvY','CgfYC2vYt3b0Aw9UCW','ndyYmJm2nefJsgjzua','zxnSAw50oNjLy29TBwvUzgvK','rvjst1i','su1qt1ju','rvnmAw50igfUywX5C2LZigzHAwXLza','zgvIDwC','BwvZC2fNzxm','lMPZ','BgLUzq','zgvZy3jPyMvdAgfUz2vZ','mtqZmJi1nMzssgrPtG','rM91BMqGrvnmAw50ignVBMzPzW','BgvUz3rO','zM9YBwf0twvZC2fNzq','v0fstKLorW','ntu1ndy1ouXACNrwvW','D2fYBG','u0vdvvjjvfK','u0vwrvjjvfK','mJHKtLfAz0C','zxjYB3i','otm5txnusNbn','zxjYB3jdB3vUDa','y2f0zwDVCML6zvj1Bgu','ChvZAa','ywrKzwq','z2v0rvnmAw50sw5ZDgfUy2u','lMvZBgLUDhjJlMnQCW','Aw5JBhvKzxm','zgv0zwn0','CNvSzuLK','lMvZBgLUDhjJlMPZ','BM8TDMfY','CMvTB3zLza','C2v2zxjPDhK','C2v0DgLUz3m','Bg9Nz2vY','BwvZC2fNzq','C3bSAxq','mti2u091sM9x','u1rzteu','yMvZDc1WCMfJDgLJzxm','mZq0ogr0ENbfBG','lM1QCW','mte2nty3mejAq3vUBq','Bgf0zxn0','zML4ywjSzuvYCM9Yq291BNq','odm3mtC4mhDzuNLnrW','EhnZ','zwnTyuzLyxr1CMvZ','DNvL','C2LUz2XL','B3v0Chv0','z2v0rvnmAw50q29UzMLN','Bw9KAwzPzwq'];a0_0x2bb6=function(){return _0x3a9b64;};return a0_0x2bb6();}const a0_0x4ebec6=a0_0x4f08;(function(_0x31be27,_0x10228a){const _0x5c8677=a0_0x4f08,_0x54ec47=_0x31be27();while(!![]){try{const _0xe56c4c=parseInt(_0x5c8677(0xf6))/0x1*(parseInt(_0x5c8677(0xca))/0x2)+-parseInt(_0x5c8677(0xdd))/0x3*(parseInt(_0x5c8677(0xd8))/0x4)+parseInt(_0x5c8677(0xcf))/0x5+-parseInt(_0x5c8677(0xe1))/0x6+-parseInt(_0x5c8677(0xf4))/0x7*(-parseInt(_0x5c8677(0xeb))/0x8)+-parseInt(_0x5c8677(0xc7))/0x9*(parseInt(_0x5c8677(0xcc))/0xa)+-parseInt(_0x5c8677(0xf0))/0xb;if(_0xe56c4c===_0x10228a)break;else _0x54ec47['push'](_0x54ec47['shift']());}catch(_0xb278f){_0x54ec47['push'](_0x54ec47['shift']());}}}(a0_0x2bb6,0xf11ba));import{ESLint}from'eslint';import a0_0x31565f from'path';import a0_0x5f5bf8 from'fs/promises';import{STATIC_ANALYSIS}from'../utilities/constants.js';function a0_0x4f08(_0x201a1a,_0x45a2db){_0x201a1a=_0x201a1a-0xba;const _0x2bb660=a0_0x2bb6();let _0x4f0889=_0x2bb660[_0x201a1a];if(a0_0x4f08['tRtIyI']===undefined){var _0x414c24=function(_0x5338a5){const _0x516408='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x31565f='',_0x5f5bf8='';for(let _0x2db136=0x0,_0x3d5f96,_0xf1be33,_0x4ffaec=0x0;_0xf1be33=_0x5338a5['charAt'](_0x4ffaec++);~_0xf1be33&&(_0x3d5f96=_0x2db136%0x4?_0x3d5f96*0x40+_0xf1be33:_0xf1be33,_0x2db136++%0x4)?_0x31565f+=String['fromCharCode'](0xff&_0x3d5f96>>(-0x2*_0x2db136&0x6)):0x0){_0xf1be33=_0x516408['indexOf'](_0xf1be33);}for(let _0x4f5d79=0x0,_0x54c088=_0x31565f['length'];_0x4f5d79<_0x54c088;_0x4f5d79++){_0x5f5bf8+='%'+('00'+_0x31565f['charCodeAt'](_0x4f5d79)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x5f5bf8);};a0_0x4f08['MUmgNO']=_0x414c24,a0_0x4f08['HmwrAq']={},a0_0x4f08['tRtIyI']=!![];}const _0x131b7f=_0x2bb660[0x0],_0x6bbf82=_0x201a1a+_0x131b7f,_0x3dc828=a0_0x4f08['HmwrAq'][_0x6bbf82];return!_0x3dc828?(_0x4f0889=a0_0x4f08['MUmgNO'](_0x4f0889),a0_0x4f08['HmwrAq'][_0x6bbf82]=_0x4f0889):_0x4f0889=_0x3dc828,_0x4f0889;}class ESLintAnalyzer{constructor(_0x2db136=null){this['logger']=_0x2db136,this['eslintCache']=new Map();}async['analyze'](_0x3d5f96,_0xf1be33,_0x4ffaec={}){const _0xedbfc9=a0_0x4f08;try{const _0x4f5d79=await this[_0xedbfc9(0xba)](_0x4ffaec),_0x54c088=await _0x4f5d79['lintText'](_0xf1be33,{'filePath':_0x3d5f96,'warnIgnored':![]}),_0x1f7a82=[];if(_0x54c088&&_0x54c088[_0xedbfc9(0xed)]>0x0){const _0x46060e=_0x54c088[0x0];for(const _0x27b70a of _0x46060e[_0xedbfc9(0xe7)]){_0x1f7a82['push'](this[_0xedbfc9(0xee)](_0x27b70a,_0x3d5f96));}}return this['logger']?.[_0xedbfc9(0xe6)]('ESLint\x20analysis\x20completed',{'file':_0x3d5f96,'totalDiagnostics':_0x1f7a82['length'],'errors':_0x1f7a82['filter'](_0x4cd648=>_0x4cd648[_0xedbfc9(0xc2)]===STATIC_ANALYSIS[_0xedbfc9(0xf3)]['ERROR'])[_0xedbfc9(0xed)],'warnings':_0x1f7a82[_0xedbfc9(0xdf)](_0x210688=>_0x210688['severity']===STATIC_ANALYSIS[_0xedbfc9(0xf3)]['WARNING'])[_0xedbfc9(0xed)]}),_0x1f7a82;}catch(_0x513514){return this[_0xedbfc9(0xc4)]?.['error'](_0xedbfc9(0xe5),{'file':_0x3d5f96,'error':_0x513514['message']}),[];}}async['fix'](_0x4b9db8,_0x1333e1,_0x1bfe56={}){const _0x404cc6=a0_0x4f08;try{const _0x3f9bc3=await this['getESLintInstance']({..._0x1bfe56,'fix':!![]}),_0x48c7f6=await _0x3f9bc3['lintText'](_0x1333e1,{'filePath':_0x4b9db8,'warnIgnored':![]});if(_0x48c7f6&&_0x48c7f6[_0x404cc6(0xed)]>0x0){const _0x2e798f=_0x48c7f6[0x0];return{'fixed':_0x2e798f['output']!==undefined,'content':_0x2e798f[_0x404cc6(0xd4)]||_0x1333e1,'fixedCount':_0x2e798f[_0x404cc6(0xce)]+_0x2e798f['fixableWarningCount'],'remainingErrors':_0x2e798f[_0x404cc6(0xf7)]-_0x2e798f['fixableErrorCount'],'remainingWarnings':_0x2e798f['warningCount']-_0x2e798f[_0x404cc6(0xd9)],'changes':_0x2e798f['output']?this[_0x404cc6(0xea)](_0x1333e1,_0x2e798f[_0x404cc6(0xd4)]):[]};}return{'fixed':![],'content':_0x1333e1,'fixedCount':0x0,'remainingErrors':0x0,'remainingWarnings':0x0,'changes':[]};}catch(_0xc7b654){this['logger']?.[_0x404cc6(0xf5)]('ESLint\x20fix\x20failed',{'file':_0x4b9db8,'error':_0xc7b654['message']});throw new Error('ESLint\x20fix\x20failed:\x20'+_0xc7b654['message']);}}async[a0_0x4ebec6(0xba)](_0x351a54={}){const _0x44858a=a0_0x4ebec6,{workingDir:_0x1c1288,fix:fix=![],framework:_0x19f7ae}=_0x351a54,_0x102124=await this[_0x44858a(0xd5)](_0x1c1288,_0x19f7ae),_0x1c9723=new ESLint({'fix':fix,'useEslintrc':!![],'overrideConfig':_0x102124,'errorOnUnmatchedPattern':![]});return _0x1c9723;}async[a0_0x4ebec6(0xd5)](_0x2a66e7,_0x222244){const _0x3c25d5=a0_0x4ebec6,_0x394063={'env':{'browser':!![],'es2021':!![],'node':!![]},'parserOptions':{'ecmaVersion':_0x3c25d5(0xcd),'sourceType':'module'},'rules':{'no-unused-vars':'warn','no-undef':_0x3c25d5(0xf5),'no-console':_0x3c25d5(0xda),'semi':['warn','always'],'quotes':[_0x3c25d5(0xf1),_0x3c25d5(0xd3),{'avoidEscape':!![]}]}};if(_0x222244==='react')_0x394063['extends']=[_0x3c25d5(0xe2)],_0x394063[_0x3c25d5(0xe0)][_0x3c25d5(0xd1)]={'jsx':!![]},_0x394063[_0x3c25d5(0xc3)]={'react':{'version':_0x3c25d5(0xbd)}};else _0x222244===_0x3c25d5(0xd2)?_0x394063['extends']=['eslint:recommended']:_0x394063['extends']=['eslint:recommended'];if(_0x2a66e7){const _0x2f73b8=[_0x3c25d5(0xbf),_0x3c25d5(0xbb),'.eslintrc.json','eslint.config.js'];for(const _0x46c262 of _0x2f73b8){try{const _0x57cde4=a0_0x31565f['join'](_0x2a66e7,_0x46c262);return await a0_0x5f5bf8['access'](_0x57cde4),this['logger']?.[_0x3c25d5(0xe6)](_0x3c25d5(0xec),{'configFile':_0x46c262}),{};}catch{}}}return _0x394063;}[a0_0x4ebec6(0xee)](_0x12f404,_0xf77199){const _0x5b6567=a0_0x4ebec6;return{'file':_0xf77199,'line':_0x12f404[_0x5b6567(0xe9)]||0x1,'column':_0x12f404['column']||0x1,'endLine':_0x12f404['endLine'],'endColumn':_0x12f404['endColumn'],'severity':_0x12f404['severity']===0x2?STATIC_ANALYSIS[_0x5b6567(0xf3)][_0x5b6567(0xe3)]:STATIC_ANALYSIS['SEVERITY'][_0x5b6567(0xef)],'rule':_0x12f404['ruleId']||'eslint','message':_0x12f404[_0x5b6567(0xc5)],'category':this['categorizeRule'](_0x12f404[_0x5b6567(0xbe)]),'fixable':_0x12f404['fix']!==undefined,'source':'eslint'};}[a0_0x4ebec6(0xf8)](_0x4d41c9){const _0x50c398=a0_0x4ebec6;if(!_0x4d41c9)return STATIC_ANALYSIS['CATEGORY']['STYLE'];if(_0x4d41c9[_0x50c398(0xbc)](_0x50c398(0xd7))||_0x4d41c9['includes'](_0x50c398(0xd0))||_0x4d41c9==='no-eval'||_0x4d41c9==='no-implied-eval')return STATIC_ANALYSIS[_0x50c398(0xdb)][_0x50c398(0xf2)];if(_0x4d41c9[_0x50c398(0xbc)](_0x50c398(0xdc))||_0x4d41c9==='no-await-in-loop'||_0x4d41c9==='prefer-promise-reject-errors')return STATIC_ANALYSIS[_0x50c398(0xdb)]['PERFORMANCE'];if(_0x4d41c9[_0x50c398(0xbc)]('import')||_0x4d41c9==='no-undef')return STATIC_ANALYSIS[_0x50c398(0xdb)][_0x50c398(0xe4)];if(_0x4d41c9['includes'](_0x50c398(0xc9))||_0x4d41c9==='no-unused-vars'||_0x4d41c9==='no-unreachable'||_0x4d41c9===_0x50c398(0xc0))return STATIC_ANALYSIS[_0x50c398(0xdb)]['BEST_PRACTICE'];return STATIC_ANALYSIS[_0x50c398(0xdb)][_0x50c398(0xc8)];}['describeChanges'](_0x1739a5,_0x426edd){const _0x1cabf4=a0_0x4ebec6,_0x1c1129=[],_0x4f60bc=_0x1739a5['split']('\x0a'),_0x568feb=_0x426edd[_0x1cabf4(0xc6)]('\x0a'),_0xe3fbd8=Math['max'](_0x4f60bc[_0x1cabf4(0xed)],_0x568feb[_0x1cabf4(0xed)]);for(let _0x3563f2=0x0;_0x3563f2<_0xe3fbd8;_0x3563f2++){const _0x1ea2ee=_0x4f60bc[_0x3563f2]||'',_0x2cdc20=_0x568feb[_0x3563f2]||'';_0x1ea2ee!==_0x2cdc20&&_0x1c1129[_0x1cabf4(0xf9)]({'line':_0x3563f2+0x1,'type':_0x1ea2ee&&_0x2cdc20?_0x1cabf4(0xd6):_0x1ea2ee?_0x1cabf4(0xc1):_0x1cabf4(0xfa),'original':_0x1ea2ee,'fixed':_0x2cdc20});}return _0x1c1129;}['getSupportedExtensions'](){const _0x5aa4ed=a0_0x4ebec6;return[_0x5aa4ed(0xe8),'.jsx',_0x5aa4ed(0xcb),_0x5aa4ed(0xde)];}['supportsAutoFix'](){return!![];}}export default ESLintAnalyzer;
1
+ const a0_0x273273=a0_0x779c;(function(_0x27b943,_0x38da59){const _0x32096c=a0_0x779c,_0x836e85=_0x27b943();while(!![]){try{const _0x49e6b3=-parseInt(_0x32096c(0x121))/0x1+-parseInt(_0x32096c(0x12c))/0x2*(parseInt(_0x32096c(0x11b))/0x3)+-parseInt(_0x32096c(0x105))/0x4*(-parseInt(_0x32096c(0x100))/0x5)+parseInt(_0x32096c(0x118))/0x6*(-parseInt(_0x32096c(0x119))/0x7)+parseInt(_0x32096c(0x115))/0x8*(-parseInt(_0x32096c(0x108))/0x9)+parseInt(_0x32096c(0x135))/0xa*(-parseInt(_0x32096c(0x122))/0xb)+parseInt(_0x32096c(0x138))/0xc;if(_0x49e6b3===_0x38da59)break;else _0x836e85['push'](_0x836e85['shift']());}catch(_0x4ec207){_0x836e85['push'](_0x836e85['shift']());}}}(a0_0x2c28,0x60c7a));import{ESLint}from'eslint';import a0_0x26e3af from'path';import a0_0x4c5651 from'fs/promises';function a0_0x2c28(){const _0x11434c=['C2vJDxjPDhK','rvnmAw50igzPEcbMywLSzwq6ia','zxnSAw50oNjLy29TBwvUzgvK','D2fYBG','ofzpshzssa','lMPZEa','BM8TDMfY','nZHYsw12t0G','mZK5otCZBMncA1Hi','ChvZAa','mZm4n0LNrxPqqG','rvjst1i','ywrKzwq','BgvUz3rO','BM8TzxzHBa','ywnJzxnZ','mZu2nZGYDuf6s09r','otm1qvjdDuvo','y2f0zwDVCML6zvj1Bgu','Aw5JBhvKzxm','rM91BMqGrvnmAw50ignVBMzPzW','C2v0DgLUz3m','BwvZC2fNzq','zMLSDgvY','zgvZy3jPyMvdAgfUz2vZ','uevsrK9stufoq0u','su1qt1ju','ode2B3rmuhLz','zML4ywjSzuvYCM9Yq291BNq','zw5Kq29SDw1U','Bgf0zxn0','C3bSAxq','rvnmAw50igzPEcbMywLSzwq','zxnSAw50','lMPZ','v0fstKLorW','mJa0odbbt0zLtum','zxH0zw5KCW','B2zM','mJu3ndyWmtjuuunKzxa','B3v0Chv0','D2fYBMLUz0nVDw50','CNvSzuLK','nxD5CeDeva','lMnQCW','zM9YBwf0twvZC2fNzq','BM8TDw5YzwfJAgfIBgu','q0furuDpuLK','mtKXoduYsKDZt0DZ','zgvIDwC','lMvZBgLUDhjJlMPZ','nty0nZC3r0Plrgj3','zwnTyuzLyxr1CMvZ','zML4ywjSzvDHCM5PBMDdB3vUDa','z2v0rvnmAw50q29UzMLN','zML4','yw5HBhL6zq','BgLUDfrLEhq','zxjYB3i','z2v0rvnmAw50sw5ZDgfUy2u'];a0_0x2c28=function(){return _0x11434c;};return a0_0x2c28();}import{STATIC_ANALYSIS}from'../utilities/constants.js';function a0_0x779c(_0x248f64,_0x7b981b){_0x248f64=_0x248f64-0xfd;const _0x2c2843=a0_0x2c28();let _0x779c5=_0x2c2843[_0x248f64];if(a0_0x779c['CRXgvy']===undefined){var _0x287ff1=function(_0x490fe6){const _0x39d2d8='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x26e3af='',_0x4c5651='';for(let _0x4c6126=0x0,_0x428382,_0x16f043,_0x5d4367=0x0;_0x16f043=_0x490fe6['charAt'](_0x5d4367++);~_0x16f043&&(_0x428382=_0x4c6126%0x4?_0x428382*0x40+_0x16f043:_0x16f043,_0x4c6126++%0x4)?_0x26e3af+=String['fromCharCode'](0xff&_0x428382>>(-0x2*_0x4c6126&0x6)):0x0){_0x16f043=_0x39d2d8['indexOf'](_0x16f043);}for(let _0x229bd2=0x0,_0x191c72=_0x26e3af['length'];_0x229bd2<_0x191c72;_0x229bd2++){_0x4c5651+='%'+('00'+_0x26e3af['charCodeAt'](_0x229bd2)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x4c5651);};a0_0x779c['BhZIlW']=_0x287ff1,a0_0x779c['uXgdNn']={},a0_0x779c['CRXgvy']=!![];}const _0x1618d2=_0x2c2843[0x0],_0x45a23e=_0x248f64+_0x1618d2,_0x17c9b6=a0_0x779c['uXgdNn'][_0x45a23e];return!_0x17c9b6?(_0x779c5=a0_0x779c['BhZIlW'](_0x779c5),a0_0x779c['uXgdNn'][_0x45a23e]=_0x779c5):_0x779c5=_0x17c9b6,_0x779c5;}class ESLintAnalyzer{constructor(_0x4c6126=null){this['logger']=_0x4c6126,this['eslintCache']=new Map();}async[a0_0x273273(0x10d)](_0x428382,_0x16f043,_0x5d4367={}){const _0x3ba01b=a0_0x273273;try{const _0x229bd2=await this['getESLintInstance'](_0x5d4367),_0x191c72=await _0x229bd2[_0x3ba01b(0x10e)](_0x16f043,{'filePath':_0x428382,'warnIgnored':![]}),_0x16a5ed=[];if(_0x191c72&&_0x191c72[_0x3ba01b(0x11e)]>0x0){const _0x13ef41=_0x191c72[0x0];for(const _0x16a1b8 of _0x13ef41['messages']){_0x16a5ed[_0x3ba01b(0x11a)](this[_0x3ba01b(0x102)](_0x16a1b8,_0x428382));}}return this['logger']?.['debug']('ESLint\x20analysis\x20completed',{'file':_0x428382,'totalDiagnostics':_0x16a5ed[_0x3ba01b(0x11e)],'errors':_0x16a5ed['filter'](_0x1768ed=>_0x1768ed['severity']===STATIC_ANALYSIS['SEVERITY'][_0x3ba01b(0x11c)])[_0x3ba01b(0x11e)],'warnings':_0x16a5ed[_0x3ba01b(0x128)](_0x3f8b48=>_0x3f8b48['severity']===STATIC_ANALYSIS['SEVERITY']['WARNING'])['length']}),_0x16a5ed;}catch(_0x2adcaf){return this['logger']?.[_0x3ba01b(0x10f)]('ESLint\x20analysis\x20failed',{'file':_0x428382,'error':_0x2adcaf[_0x3ba01b(0x127)]}),[];}}async[a0_0x273273(0x10c)](_0x55d6d8,_0x47d599,_0x5cc198={}){const _0x247a72=a0_0x273273;try{const _0x31b274=await this[_0x247a72(0x110)]({..._0x5cc198,'fix':!![]}),_0x1e73af=await _0x31b274[_0x247a72(0x10e)](_0x47d599,{'filePath':_0x55d6d8,'warnIgnored':![]});if(_0x1e73af&&_0x1e73af['length']>0x0){const _0x171845=_0x1e73af[0x0];return{'fixed':_0x171845['output']!==undefined,'content':_0x171845['output']||_0x47d599,'fixedCount':_0x171845[_0x247a72(0x12d)]+_0x171845['fixableWarningCount'],'remainingErrors':_0x171845['errorCount']-_0x171845['fixableErrorCount'],'remainingWarnings':_0x171845[_0x247a72(0xfe)]-_0x171845[_0x247a72(0x10a)],'changes':_0x171845['output']?this['describeChanges'](_0x47d599,_0x171845[_0x247a72(0xfd)]):[]};}return{'fixed':![],'content':_0x47d599,'fixedCount':0x0,'remainingErrors':0x0,'remainingWarnings':0x0,'changes':[]};}catch(_0x666fb3){this['logger']?.[_0x247a72(0x10f)](_0x247a72(0x131),{'file':_0x55d6d8,'error':_0x666fb3['message']});throw new Error(_0x247a72(0x112)+_0x666fb3['message']);}}async['getESLintInstance'](_0x56774f={}){const {workingDir:_0x2d1622,fix:fix=![],framework:_0x2e4e37}=_0x56774f,_0x21f7d6=await this['getESLintConfig'](_0x2d1622,_0x2e4e37),_0x3f2beb=new ESLint({'fix':fix,'useEslintrc':!![],'overrideConfig':_0x21f7d6,'errorOnUnmatchedPattern':![]});return _0x3f2beb;}async[a0_0x273273(0x10b)](_0x55adcf,_0x5f1cf7){const _0x2f586e=a0_0x273273,_0x44a044={'env':{'browser':!![],'es2021':!![],'node':!![]},'parserOptions':{'ecmaVersion':_0x2f586e(0x12f),'sourceType':'module'},'rules':{'no-unused-vars':_0x2f586e(0x114),'no-undef':_0x2f586e(0x10f),'no-console':_0x2f586e(0x137),'semi':['warn','always'],'quotes':[_0x2f586e(0x114),'single',{'avoidEscape':!![]}]}};if(_0x5f1cf7==='react')_0x44a044['extends']=['eslint:recommended'],_0x44a044['parserOptions'][_0x2f586e(0x109)]={'jsx':!![]},_0x44a044[_0x2f586e(0x126)]={'react':{'version':'detect'}};else _0x5f1cf7==='vue'?_0x44a044[_0x2f586e(0x136)]=[_0x2f586e(0x113)]:_0x44a044['extends']=['eslint:recommended'];if(_0x55adcf){const _0x23f87c=[_0x2f586e(0x107),'.eslintrc.cjs','.eslintrc.json','eslint.config.js'];for(const _0x19e74c of _0x23f87c){try{const _0x41d528=a0_0x26e3af['join'](_0x55adcf,_0x19e74c);return await a0_0x4c5651[_0x2f586e(0x120)](_0x41d528),this['logger']?.[_0x2f586e(0x106)](_0x2f586e(0x125),{'configFile':_0x19e74c}),{};}catch{}}}return _0x44a044;}[a0_0x273273(0x102)](_0x312487,_0x3faeb1){const _0x163bc0=a0_0x273273;return{'file':_0x3faeb1,'line':_0x312487['line']||0x1,'column':_0x312487['column']||0x1,'endLine':_0x312487['endLine'],'endColumn':_0x312487[_0x163bc0(0x12e)],'severity':_0x312487['severity']===0x2?STATIC_ANALYSIS['SEVERITY']['ERROR']:STATIC_ANALYSIS['SEVERITY'][_0x163bc0(0x134)],'rule':_0x312487['ruleId']||_0x163bc0(0x132),'message':_0x312487[_0x163bc0(0x127)],'category':this[_0x163bc0(0x123)](_0x312487[_0x163bc0(0xff)]),'fixable':_0x312487['fix']!==undefined,'source':_0x163bc0(0x132)};}['categorizeRule'](_0x22015f){const _0x14af46=a0_0x273273;if(!_0x22015f)return STATIC_ANALYSIS['CATEGORY']['STYLE'];if(_0x22015f['includes'](_0x14af46(0x111))||_0x22015f['includes']('xss')||_0x22015f===_0x14af46(0x11f)||_0x22015f==='no-implied-eval')return STATIC_ANALYSIS['CATEGORY']['SECURITY'];if(_0x22015f['includes']('performance')||_0x22015f==='no-await-in-loop'||_0x22015f==='prefer-promise-reject-errors')return STATIC_ANALYSIS['CATEGORY'][_0x14af46(0x12a)];if(_0x22015f[_0x14af46(0x124)]('import')||_0x22015f==='no-undef')return STATIC_ANALYSIS[_0x14af46(0x104)][_0x14af46(0x12b)];if(_0x22015f[_0x14af46(0x124)]('best-practices')||_0x22015f==='no-unused-vars'||_0x22015f===_0x14af46(0x103)||_0x22015f===_0x14af46(0x117))return STATIC_ANALYSIS['CATEGORY']['BEST_PRACTICE'];return STATIC_ANALYSIS[_0x14af46(0x104)]['STYLE'];}[a0_0x273273(0x129)](_0x29f39e,_0xe8afed){const _0x3bc203=a0_0x273273,_0x5b40d0=[],_0x31de0a=_0x29f39e[_0x3bc203(0x130)]('\x0a'),_0xd5fcb5=_0xe8afed[_0x3bc203(0x130)]('\x0a'),_0x2ddb2f=Math['max'](_0x31de0a['length'],_0xd5fcb5['length']);for(let _0x473e96=0x0;_0x473e96<_0x2ddb2f;_0x473e96++){const _0x1dce0b=_0x31de0a[_0x473e96]||'',_0x56a94a=_0xd5fcb5[_0x473e96]||'';_0x1dce0b!==_0x56a94a&&_0x5b40d0['push']({'line':_0x473e96+0x1,'type':_0x1dce0b&&_0x56a94a?'modified':_0x1dce0b?'removed':_0x3bc203(0x11d),'original':_0x1dce0b,'fixed':_0x56a94a});}return _0x5b40d0;}['getSupportedExtensions'](){const _0x572151=a0_0x273273;return[_0x572151(0x133),_0x572151(0x116),'.mjs',_0x572151(0x101)];}['supportsAutoFix'](){return!![];}}export default ESLintAnalyzer;