@loxia-labs/loxia-autopilot-one 1.0.3 → 1.0.4

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 (115) hide show
  1. package/bin/cli.js +1 -1
  2. package/bin/loxia-terminal-v2.js +1 -1
  3. package/bin/loxia-terminal.js +1 -1
  4. package/bin/start-with-terminal.js +1 -1
  5. package/package.json +2 -1
  6. package/scripts/install-scanners.js +1 -1
  7. package/src/analyzers/CSSAnalyzer.js +1 -1
  8. package/src/analyzers/ConfigValidator.js +1 -1
  9. package/src/analyzers/ESLintAnalyzer.js +1 -1
  10. package/src/analyzers/JavaScriptAnalyzer.js +1 -1
  11. package/src/analyzers/PrettierFormatter.js +1 -1
  12. package/src/analyzers/PythonAnalyzer.js +1 -1
  13. package/src/analyzers/SecurityAnalyzer.js +1 -1
  14. package/src/analyzers/TypeScriptAnalyzer.js +1 -1
  15. package/src/analyzers/codeCloneDetector/analyzer.js +1 -1
  16. package/src/analyzers/codeCloneDetector/detector.js +1 -1
  17. package/src/analyzers/codeCloneDetector/index.js +1 -1
  18. package/src/analyzers/codeCloneDetector/parser.js +1 -1
  19. package/src/analyzers/codeCloneDetector/reporter.js +1 -1
  20. package/src/analyzers/codeCloneDetector/scanner.js +1 -1
  21. package/src/core/agentPool.js +1 -1
  22. package/src/core/agentScheduler.js +1 -1
  23. package/src/core/contextManager.js +1 -1
  24. package/src/core/messageProcessor.js +1 -1
  25. package/src/core/orchestrator.js +1 -1
  26. package/src/core/stateManager.js +1 -1
  27. package/src/index.js +1 -1
  28. package/src/interfaces/cli.js +1 -1
  29. package/src/interfaces/terminal/__tests__/smoke/advancedFeatures.test.js +1 -1
  30. package/src/interfaces/terminal/__tests__/smoke/agentControl.test.js +1 -1
  31. package/src/interfaces/terminal/__tests__/smoke/agents.test.js +1 -1
  32. package/src/interfaces/terminal/__tests__/smoke/components.test.js +1 -1
  33. package/src/interfaces/terminal/__tests__/smoke/connection.test.js +1 -1
  34. package/src/interfaces/terminal/__tests__/smoke/enhancements.test.js +1 -1
  35. package/src/interfaces/terminal/__tests__/smoke/imports.test.js +1 -1
  36. package/src/interfaces/terminal/__tests__/smoke/messages.test.js +1 -1
  37. package/src/interfaces/terminal/__tests__/smoke/tools.test.js +1 -1
  38. package/src/interfaces/terminal/api/apiClient.js +1 -1
  39. package/src/interfaces/terminal/api/messageRouter.js +1 -1
  40. package/src/interfaces/terminal/api/session.js +1 -1
  41. package/src/interfaces/terminal/api/websocket.js +1 -1
  42. package/src/interfaces/terminal/components/AgentCreator.js +1 -1
  43. package/src/interfaces/terminal/components/AgentEditor.js +1 -1
  44. package/src/interfaces/terminal/components/AgentSwitcher.js +1 -1
  45. package/src/interfaces/terminal/components/ErrorBoundary.js +1 -1
  46. package/src/interfaces/terminal/components/ErrorPanel.js +1 -1
  47. package/src/interfaces/terminal/components/Header.js +1 -1
  48. package/src/interfaces/terminal/components/HelpPanel.js +1 -1
  49. package/src/interfaces/terminal/components/InputBox.js +1 -1
  50. package/src/interfaces/terminal/components/Layout.js +1 -1
  51. package/src/interfaces/terminal/components/LoadingSpinner.js +1 -1
  52. package/src/interfaces/terminal/components/MessageList.js +1 -1
  53. package/src/interfaces/terminal/components/MultilineTextInput.js +1 -1
  54. package/src/interfaces/terminal/components/SearchPanel.js +1 -1
  55. package/src/interfaces/terminal/components/SettingsPanel.js +1 -1
  56. package/src/interfaces/terminal/components/StatusBar.js +1 -1
  57. package/src/interfaces/terminal/components/TextInput.js +1 -1
  58. package/src/interfaces/terminal/config/agentEditorConstants.js +1 -1
  59. package/src/interfaces/terminal/config/constants.js +1 -1
  60. package/src/interfaces/terminal/index.js +1 -1
  61. package/src/interfaces/terminal/state/useAgentControl.js +1 -1
  62. package/src/interfaces/terminal/state/useAgents.js +1 -1
  63. package/src/interfaces/terminal/state/useConnection.js +1 -1
  64. package/src/interfaces/terminal/state/useMessages.js +1 -1
  65. package/src/interfaces/terminal/state/useTools.js +1 -1
  66. package/src/interfaces/terminal/utils/debugLogger.js +1 -1
  67. package/src/interfaces/terminal/utils/settingsStorage.js +1 -1
  68. package/src/interfaces/terminal/utils/theme.js +1 -1
  69. package/src/interfaces/webServer.js +1 -1
  70. package/src/modules/fileExplorer/controller.js +1 -1
  71. package/src/modules/fileExplorer/index.js +1 -1
  72. package/src/modules/fileExplorer/middleware.js +1 -1
  73. package/src/modules/fileExplorer/routes.js +1 -1
  74. package/src/services/aiService.js +1 -1
  75. package/src/services/apiKeyManager.js +1 -1
  76. package/src/services/benchmarkService.js +1 -1
  77. package/src/services/budgetService.js +1 -1
  78. package/src/services/contextInjectionService.js +1 -1
  79. package/src/services/conversationCompactionService.js +1 -1
  80. package/src/services/errorHandler.js +1 -1
  81. package/src/services/fileAttachmentService.js +1 -1
  82. package/src/services/modelRouterService.js +1 -1
  83. package/src/services/modelsService.js +1 -1
  84. package/src/services/qualityInspector.js +1 -1
  85. package/src/services/tokenCountingService.js +1 -1
  86. package/src/tools/agentCommunicationTool.js +1 -1
  87. package/src/tools/agentDelayTool.js +1 -1
  88. package/src/tools/asyncToolManager.js +1 -1
  89. package/src/tools/baseTool.js +1 -1
  90. package/src/tools/browserTool.js +1 -1
  91. package/src/tools/cloneDetectionTool.js +1 -1
  92. package/src/tools/dependencyResolverTool.js +1 -1
  93. package/src/tools/fileContentReplaceTool.js +1 -1
  94. package/src/tools/fileSystemTool.js +1 -1
  95. package/src/tools/fileTreeTool.js +1 -1
  96. package/src/tools/imageTool.js +1 -1
  97. package/src/tools/importAnalyzerTool.js +1 -1
  98. package/src/tools/jobDoneTool.js +1 -1
  99. package/src/tools/seekTool.js +1 -1
  100. package/src/tools/staticAnalysisTool.js +1 -1
  101. package/src/tools/taskManagerTool.js +1 -1
  102. package/src/tools/terminalTool.js +1 -1
  103. package/src/tools/webTool.js +1 -1
  104. package/src/types/agent.js +1 -1
  105. package/src/types/contextReference.js +1 -1
  106. package/src/types/conversation.js +1 -1
  107. package/src/types/toolCommand.js +1 -1
  108. package/src/utilities/attachmentValidator.js +1 -1
  109. package/src/utilities/configManager.js +1 -1
  110. package/src/utilities/constants.js +1 -1
  111. package/src/utilities/directoryAccessManager.js +1 -1
  112. package/src/utilities/fileProcessor.js +1 -1
  113. package/src/utilities/logger.js +1 -1
  114. package/src/utilities/tagParser.js +1 -1
  115. package/src/utilities/toolConstants.js +1 -1
package/bin/cli.js CHANGED
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- const a0_0x492338=a0_0x49db;(function(_0x167f21,_0x308583){const _0x3d2206=a0_0x49db,_0x4ef4c8=_0x167f21();while(!![]){try{const _0x2b2a81=-parseInt(_0x3d2206(0xb9))/0x1*(-parseInt(_0x3d2206(0xa5))/0x2)+parseInt(_0x3d2206(0xc9))/0x3*(-parseInt(_0x3d2206(0xba))/0x4)+-parseInt(_0x3d2206(0xb2))/0x5*(-parseInt(_0x3d2206(0x95))/0x6)+-parseInt(_0x3d2206(0xa8))/0x7*(parseInt(_0x3d2206(0xbf))/0x8)+parseInt(_0x3d2206(0xa2))/0x9+-parseInt(_0x3d2206(0xc4))/0xa+parseInt(_0x3d2206(0xad))/0xb;if(_0x2b2a81===_0x308583)break;else _0x4ef4c8['push'](_0x4ef4c8['shift']());}catch(_0x334588){_0x4ef4c8['push'](_0x4ef4c8['shift']());}}}(a0_0xcebc,0x85ca9));import{fileURLToPath}from'url';import{dirname,join}from'path';function a0_0xcebc(){const _0x565fcf=['argv','7815230JjafYS','Loxia\x20Autopilot\x20One\x20v','--host','unref','message','461331nIFRVl','length','--help','Server\x20running\x20at\x20','Starting\x20Terminal\x20UI...\x0a','setTimeout',')\x0a\x20\x20--host\x20<host>\x20\x20\x20\x20\x20Specify\x20host\x20(default:\x20','utf8','\x0aServer\x20may\x20still\x20be\x20starting.\x20Open\x20','http://','port','ceil','darwin','toString','\x0aServer\x20is\x20not\x20running\x20at\x20','destroy','--port','\x0aPlease\x20start\x20the\x20server\x20first:','--version','parse','ignore','1554684yCNCVz','src','start\x20\x22\x22\x20\x22','Waiting\x20for\x20server\x20to\x20start...','platform','get','Error:','env','host','win32','SIGTERM','exit','open\x20\x22','947394bNYQrc','\x20\x20loxia\x20web\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Start\x20server\x20+\x20Web\x20UI','version','27554HLSbZv','Checking\x20if\x20server\x20is\x20running...','package.json','70PPsOzD','xdg-open\x20\x22','LOXIA_HOST','Starting\x20Loxia\x20server\x20in\x20background...','web','14525731CniZFl','localhost','inherit','includes','SIGINT','5EcOEdY','kill','\x20\x20loxia\x20plus-terminal\x20\x20#\x20Start\x20server\x20+\x20Terminal\x20UI\x0a','log','\x0aOpening\x20Web\x20UI\x20at\x20','error','Starting\x20Loxia\x20server...\x0a','34VODEBi','4bCeQKV','index.js','Server\x20is\x20running\x20at\x20','\x0aShutting\x20down\x20server...','\x0aServer\x20failed\x20to\x20start.\x20Please\x20check\x20logs.','536008iHaCeG','catch','\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','statusCode'];a0_0xcebc=function(){return _0x565fcf;};return a0_0xcebc();}import{spawn,exec}from'child_process';import{readFileSync}from'fs';import a0_0x3656e4 from'http';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename),DEFAULT_PORT=0x1f90,DEFAULT_HOST=a0_0x492338(0xae),SERVER_STARTUP_TIMEOUT=0x3a98,SERVER_CHECK_INTERVAL=0x1f4,args=process[a0_0x492338(0xc3)]['slice'](0x2),command=args[0x0]&&!args[0x0]['startsWith']('--')?args[0x0]:null,flags={'port':null,'host':null,'help':args[a0_0x492338(0xb0)](a0_0x492338(0xcb))||args['includes']('-h'),'version':args[a0_0x492338(0xb0)](a0_0x492338(0xdb))||args[a0_0x492338(0xb0)]('-v')};for(let i=0x0;i<args[a0_0x492338(0xca)];i++){args[i]===a0_0x492338(0xd9)&&args[i+0x1]&&(flags[a0_0x492338(0xd3)]=parseInt(args[i+0x1],0xa)),args[i]===a0_0x492338(0xc6)&&args[i+0x1]&&(flags[a0_0x492338(0x9d)]=args[i+0x1]);}const port=flags[a0_0x492338(0xd3)]||DEFAULT_PORT,host=flags['host']||DEFAULT_HOST,serverUrl=a0_0x492338(0xd2)+host+':'+port;function a0_0x49db(_0x215c34,_0x330d43){_0x215c34=_0x215c34-0x93;const _0xcebc03=a0_0xcebc();let _0x49db4b=_0xcebc03[_0x215c34];return _0x49db4b;}if(flags['version']){const pkgPath=join(__dirname,'..',a0_0x492338(0xa7)),pkg=JSON['parse'](readFileSync(pkgPath,a0_0x492338(0xd0)));console[a0_0x492338(0xb5)](a0_0x492338(0xc5)+pkg[a0_0x492338(0xa4)]),process[a0_0x492338(0xa0)](0x0);}if(flags['help']||!command){const pkgPath=join(__dirname,'..',a0_0x492338(0xa7)),pkg=JSON[a0_0x492338(0x93)](readFileSync(pkgPath,'utf8'));console[a0_0x492338(0xb5)]('\x0aLoxia\x20Autopilot\x20One\x20v'+pkg[a0_0x492338(0xa4)]+a0_0x492338(0xc1)+DEFAULT_PORT+a0_0x492338(0xcf)+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_0x492338(0xa0)](0x0);}async function checkServerRunning(_0x2c56df,_0x4dbe06,_0x397bfe=0x1){for(let _0x5c1542=0x0;_0x5c1542<_0x397bfe;_0x5c1542++){const _0x5116dc=await new Promise(_0x1b4700=>{const _0x5a9594=a0_0x49db,_0xa6b477=a0_0x3656e4[_0x5a9594(0x9a)]('http://'+_0x2c56df+':'+_0x4dbe06+'/api/health',_0x4c92d4=>{const _0x323b86=_0x5a9594;_0x1b4700(_0x4c92d4[_0x323b86(0xc2)]===0xc8);});_0xa6b477['on'](_0x5a9594(0xb7),()=>_0x1b4700(![])),_0xa6b477[_0x5a9594(0xce)](0x7d0,()=>{const _0x57b17d=_0x5a9594;_0xa6b477[_0x57b17d(0xd8)](),_0x1b4700(![]);});});if(_0x5116dc)return!![];_0x5c1542<_0x397bfe-0x1&&await new Promise(_0x180b97=>setTimeout(_0x180b97,SERVER_CHECK_INTERVAL));}return![];}async function waitForServer(_0x423761,_0x31a991,_0x265b9c=SERVER_STARTUP_TIMEOUT){const _0x240a17=a0_0x492338,_0x73969a=Math[_0x240a17(0xd4)](_0x265b9c/SERVER_CHECK_INTERVAL);return checkServerRunning(_0x423761,_0x31a991,_0x73969a);}function openBrowser(_0x32622a){const _0x35d70a=a0_0x492338,_0x2c763e=process[_0x35d70a(0x99)];let _0x586647;if(_0x2c763e===_0x35d70a(0xd5))_0x586647=_0x35d70a(0xa1)+_0x32622a+'\x22';else _0x2c763e===_0x35d70a(0x9e)?_0x586647=_0x35d70a(0x97)+_0x32622a+'\x22':_0x586647=_0x35d70a(0xa9)+_0x32622a+'\x22';exec(_0x586647,_0x3d6bbb=>{const _0xe787a4=_0x35d70a;_0x3d6bbb&&(console[_0xe787a4(0xb5)]('Could\x20not\x20open\x20browser\x20automatically.'),console['log']('Please\x20open\x20manually:\x20'+_0x32622a));});}function startServer(_0x84d5e2=![]){const _0x38e80b=a0_0x492338,_0xe8546d={...process[_0x38e80b(0x9c)],'LOXIA_PORT':port[_0x38e80b(0xd6)](),'PORT':port[_0x38e80b(0xd6)]()};flags[_0x38e80b(0x9d)]&&(_0xe8546d[_0x38e80b(0xaa)]=flags['host']);const _0x52851b=join(__dirname,'..',_0x38e80b(0x96),_0x38e80b(0xbb)),_0x111ecc=spawn('node',[_0x52851b],{'cwd':join(__dirname,'..'),'env':_0xe8546d,'stdio':_0x84d5e2?[_0x38e80b(0x94),'ignore','ignore']:'inherit','detached':_0x84d5e2});return _0x84d5e2&&_0x111ecc[_0x38e80b(0xc7)](),_0x111ecc;}function startTerminalUI(){const _0x433b36=a0_0x492338,_0x2b76f3=join(__dirname,'loxia-terminal.js'),_0x32a06d={...process[_0x433b36(0x9c)],'LOXIA_PORT':port[_0x433b36(0xd6)](),'LOXIA_HOST':host},_0x330b7e=spawn('node',[_0x2b76f3],{'cwd':join(__dirname,'..'),'env':_0x32a06d,'stdio':_0x433b36(0xaf)});return _0x330b7e;}const commands={'web':async()=>{const _0x45a25e=a0_0x492338;console[_0x45a25e(0xb5)](_0x45a25e(0xb8));const _0x13c327=startServer(![]);console[_0x45a25e(0xb5)](_0x45a25e(0x98));const _0x1d8296=await waitForServer(host,port);_0x1d8296?(console[_0x45a25e(0xb5)](_0x45a25e(0xb6)+serverUrl),openBrowser(serverUrl)):console[_0x45a25e(0xb5)](_0x45a25e(0xd1)+serverUrl+'\x20manually.'),process['on'](_0x45a25e(0xb1),()=>_0x13c327[_0x45a25e(0xb3)]('SIGINT')),process['on']('SIGTERM',()=>_0x13c327['kill'](_0x45a25e(0x9f))),_0x13c327['on'](_0x45a25e(0xa0),_0x1dd5ba=>process[_0x45a25e(0xa0)](_0x1dd5ba||0x0));},'plus-web':async()=>{const _0xd20af6=a0_0x492338;await commands[_0xd20af6(0xac)]();},'terminal':async()=>{const _0x1ec4af=a0_0x492338;console[_0x1ec4af(0xb5)](_0x1ec4af(0xa6));const _0x1b0f27=await checkServerRunning(host,port);!_0x1b0f27&&(console[_0x1ec4af(0xb7)](_0x1ec4af(0xd7)+serverUrl),console['error'](_0x1ec4af(0xda)),console[_0x1ec4af(0xb7)](_0x1ec4af(0xa3)),console[_0x1ec4af(0xb7)](_0x1ec4af(0xb4)),process[_0x1ec4af(0xa0)](0x1));console[_0x1ec4af(0xb5)](_0x1ec4af(0xbc)+serverUrl),console['log'](_0x1ec4af(0xcd));const _0x21ebd9=startTerminalUI();process['on'](_0x1ec4af(0xb1),()=>_0x21ebd9[_0x1ec4af(0xb3)](_0x1ec4af(0xb1))),process['on']('SIGTERM',()=>_0x21ebd9[_0x1ec4af(0xb3)](_0x1ec4af(0x9f))),_0x21ebd9['on'](_0x1ec4af(0xa0),_0x839c8f=>process[_0x1ec4af(0xa0)](_0x839c8f||0x0));},'plus-terminal':async()=>{const _0x2e2d92=a0_0x492338;console[_0x2e2d92(0xb5)](_0x2e2d92(0xab));const _0x4e6b63=startServer(!![]),_0x31d499=await waitForServer(host,port);!_0x31d499&&(console[_0x2e2d92(0xb7)](_0x2e2d92(0xbe)),process[_0x2e2d92(0xa0)](0x1));console['log'](_0x2e2d92(0xcc)+serverUrl),console[_0x2e2d92(0xb5)](_0x2e2d92(0xcd));const _0x4af4c0=startTerminalUI();_0x4af4c0['on'](_0x2e2d92(0xa0),_0x227e77=>{const _0xb78bd3=_0x2e2d92;console['log'](_0xb78bd3(0xbd));try{process['kill'](_0x4e6b63['pid'],_0xb78bd3(0x9f));}catch(_0x11c2e0){}process[_0xb78bd3(0xa0)](_0x227e77||0x0);}),process['on'](_0x2e2d92(0xb1),()=>{const _0x204eec=_0x2e2d92;_0x4af4c0[_0x204eec(0xb3)](_0x204eec(0xb1));}),process['on'](_0x2e2d92(0x9f),()=>{const _0x4c8d30=_0x2e2d92;_0x4af4c0[_0x4c8d30(0xb3)]('SIGTERM');});}};commands[command]?commands[command]()[a0_0x492338(0xc0)](_0xab8138=>{const _0x241a13=a0_0x492338;console['error'](_0x241a13(0x9b),_0xab8138[_0x241a13(0xc8)]),process['exit'](0x1);}):(console['error']('Unknown\x20command:\x20'+command),console[a0_0x492338(0xb7)]('Run\x20\x22loxia\x20--help\x22\x20for\x20usage\x20information.'),process[a0_0x492338(0xa0)](0x1));
3
+ const a0_0x2846be=a0_0x5882;(function(_0x2438b1,_0x536d84){const _0xa7367f=a0_0x5882,_0x388bf1=_0x2438b1();while(!![]){try{const _0x53c487=-parseInt(_0xa7367f(0xc3))/0x1*(-parseInt(_0xa7367f(0x9f))/0x2)+parseInt(_0xa7367f(0xc2))/0x3+parseInt(_0xa7367f(0xb1))/0x4+-parseInt(_0xa7367f(0xbd))/0x5+-parseInt(_0xa7367f(0x9e))/0x6*(parseInt(_0xa7367f(0xd3))/0x7)+parseInt(_0xa7367f(0xa4))/0x8*(parseInt(_0xa7367f(0xae))/0x9)+-parseInt(_0xa7367f(0xaa))/0xa;if(_0x53c487===_0x536d84)break;else _0x388bf1['push'](_0x388bf1['shift']());}catch(_0x2937a5){_0x388bf1['push'](_0x388bf1['shift']());}}}(a0_0x5391,0x76df0));import{fileURLToPath}from'url';import{dirname,join}from'path';import{spawn,exec}from'child_process';import{readFileSync}from'fs';import a0_0x5288c8 from'http';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename),DEFAULT_PORT=0x1f90,DEFAULT_HOST=a0_0x2846be(0xd7),SERVER_STARTUP_TIMEOUT=0x3a98,SERVER_CHECK_INTERVAL=0x1f4,args=process[a0_0x2846be(0xb5)][a0_0x2846be(0xbc)](0x2),command=args[0x0]&&!args[0x0][a0_0x2846be(0xb6)]('--')?args[0x0]:null,flags={'port':null,'host':null,'help':args[a0_0x2846be(0xa1)](a0_0x2846be(0x99))||args['includes']('-h'),'version':args[a0_0x2846be(0xa1)](a0_0x2846be(0xad))||args['includes']('-v')};for(let i=0x0;i<args[a0_0x2846be(0xd2)];i++){args[i]==='--port'&&args[i+0x1]&&(flags[a0_0x2846be(0xd4)]=parseInt(args[i+0x1],0xa)),args[i]===a0_0x2846be(0xbf)&&args[i+0x1]&&(flags[a0_0x2846be(0x9c)]=args[i+0x1]);}const port=flags[a0_0x2846be(0xd4)]||DEFAULT_PORT,host=flags['host']||DEFAULT_HOST,serverUrl='http://'+host+':'+port;if(flags[a0_0x2846be(0xd6)]){const pkgPath=join(__dirname,'..','package.json'),pkg=JSON[a0_0x2846be(0xcb)](readFileSync(pkgPath,a0_0x2846be(0x9b)));console[a0_0x2846be(0xbb)](a0_0x2846be(0xcc)+pkg[a0_0x2846be(0xd6)]),process[a0_0x2846be(0xcf)](0x0);}if(flags[a0_0x2846be(0x9a)]||!command){const pkgPath=join(__dirname,'..',a0_0x2846be(0xa6)),pkg=JSON[a0_0x2846be(0xcb)](readFileSync(pkgPath,a0_0x2846be(0x9b)));console[a0_0x2846be(0xbb)](a0_0x2846be(0xc6)+pkg[a0_0x2846be(0xd6)]+'\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'+DEFAULT_PORT+a0_0x2846be(0xaf)+DEFAULT_HOST+a0_0x2846be(0xab)),process[a0_0x2846be(0xcf)](0x0);}async function checkServerRunning(_0x482eb8,_0x4bba8e,_0x35b70e=0x1){for(let _0x5bfe51=0x0;_0x5bfe51<_0x35b70e;_0x5bfe51++){const _0x136d8f=await new Promise(_0x35ee1f=>{const _0x309f1c=a0_0x5882,_0x1ee439=a0_0x5288c8[_0x309f1c(0xce)](_0x309f1c(0xb4)+_0x482eb8+':'+_0x4bba8e+_0x309f1c(0x9d),_0x541103=>{const _0x11d5e1=_0x309f1c;_0x35ee1f(_0x541103[_0x11d5e1(0xb9)]===0xc8);});_0x1ee439['on'](_0x309f1c(0xb8),()=>_0x35ee1f(![])),_0x1ee439[_0x309f1c(0xc7)](0x7d0,()=>{_0x1ee439['destroy'](),_0x35ee1f(![]);});});if(_0x136d8f)return!![];_0x5bfe51<_0x35b70e-0x1&&await new Promise(_0x261590=>setTimeout(_0x261590,SERVER_CHECK_INTERVAL));}return![];}async function waitForServer(_0xa557b5,_0x1e3df2,_0x5900c4=SERVER_STARTUP_TIMEOUT){const _0x5b9da9=a0_0x2846be,_0x362fbe=Math[_0x5b9da9(0x93)](_0x5900c4/SERVER_CHECK_INTERVAL);return checkServerRunning(_0xa557b5,_0x1e3df2,_0x362fbe);}function openBrowser(_0x34e544){const _0x22caab=a0_0x2846be,_0x1084a8=process[_0x22caab(0xa7)];let _0x25fccb;if(_0x1084a8==='darwin')_0x25fccb=_0x22caab(0xb0)+_0x34e544+'\x22';else _0x1084a8==='win32'?_0x25fccb='start\x20\x22\x22\x20\x22'+_0x34e544+'\x22':_0x25fccb=_0x22caab(0xa0)+_0x34e544+'\x22';exec(_0x25fccb,_0x39248a=>{const _0x1e4e36=_0x22caab;_0x39248a&&(console[_0x1e4e36(0xbb)](_0x1e4e36(0x95)),console['log'](_0x1e4e36(0xd5)+_0x34e544));});}function a0_0x5882(_0x27ee24,_0x54225a){_0x27ee24=_0x27ee24-0x93;const _0x5391cd=a0_0x5391();let _0x588248=_0x5391cd[_0x27ee24];return _0x588248;}function startServer(_0x3bf380=![]){const _0x18d825=a0_0x2846be,_0x2cf5f1={...process[_0x18d825(0xc4)],'LOXIA_PORT':port['toString'](),'PORT':port[_0x18d825(0x96)]()};flags[_0x18d825(0x9c)]&&(_0x2cf5f1[_0x18d825(0xa8)]=flags[_0x18d825(0x9c)]);const _0x3e19af=join(__dirname,'..',_0x18d825(0x94),_0x18d825(0xc8)),_0x5694fc=spawn(_0x18d825(0xc1),[_0x3e19af],{'cwd':join(__dirname,'..'),'env':_0x2cf5f1,'stdio':_0x3bf380?[_0x18d825(0xcd),_0x18d825(0xcd),'ignore']:_0x18d825(0xac),'detached':_0x3bf380});return _0x3bf380&&_0x5694fc['unref'](),_0x5694fc;}function startTerminalUI(){const _0x12c233=a0_0x2846be,_0x3efc46=join(__dirname,_0x12c233(0xd1)),_0x2e0eef={...process[_0x12c233(0xc4)],'LOXIA_PORT':port[_0x12c233(0x96)](),'LOXIA_HOST':host},_0x5557e5=spawn(_0x12c233(0xc1),[_0x3efc46],{'cwd':join(__dirname,'..'),'env':_0x2e0eef,'stdio':_0x12c233(0xac)});return _0x5557e5;}const commands={'web':async()=>{const _0xf510c1=a0_0x2846be;console[_0xf510c1(0xbb)](_0xf510c1(0xc0));const _0x565bb1=startServer(![]);console[_0xf510c1(0xbb)](_0xf510c1(0xba));const _0x1cd05d=await waitForServer(host,port);_0x1cd05d?(console[_0xf510c1(0xbb)]('\x0aOpening\x20Web\x20UI\x20at\x20'+serverUrl),openBrowser(serverUrl)):console['log']('\x0aServer\x20may\x20still\x20be\x20starting.\x20Open\x20'+serverUrl+_0xf510c1(0x97)),process['on'](_0xf510c1(0xa9),()=>_0x565bb1[_0xf510c1(0x98)](_0xf510c1(0xa9))),process['on'](_0xf510c1(0xd8),()=>_0x565bb1[_0xf510c1(0x98)](_0xf510c1(0xd8))),_0x565bb1['on']('exit',_0x5191f0=>process[_0xf510c1(0xcf)](_0x5191f0||0x0));},'plus-web':async()=>{await commands['web']();},'terminal':async()=>{const _0x40002=a0_0x2846be;console['log'](_0x40002(0xa2));const _0x5e6757=await checkServerRunning(host,port);!_0x5e6757&&(console[_0x40002(0xb8)]('\x0aServer\x20is\x20not\x20running\x20at\x20'+serverUrl),console['error']('\x0aPlease\x20start\x20the\x20server\x20first:'),console['error'](_0x40002(0xc9)),console[_0x40002(0xb8)]('\x20\x20loxia\x20plus-terminal\x20\x20#\x20Start\x20server\x20+\x20Terminal\x20UI\x0a'),process['exit'](0x1));console[_0x40002(0xbb)]('Server\x20is\x20running\x20at\x20'+serverUrl),console['log'](_0x40002(0xb2));const _0x23adf1=startTerminalUI();process['on'](_0x40002(0xa9),()=>_0x23adf1['kill']('SIGINT')),process['on']('SIGTERM',()=>_0x23adf1['kill'](_0x40002(0xd8))),_0x23adf1['on'](_0x40002(0xcf),_0x681ede=>process[_0x40002(0xcf)](_0x681ede||0x0));},'plus-terminal':async()=>{const _0x35c393=a0_0x2846be;console[_0x35c393(0xbb)](_0x35c393(0xc5));const _0x2660df=startServer(!![]),_0x2e8c46=await waitForServer(host,port);!_0x2e8c46&&(console[_0x35c393(0xb8)](_0x35c393(0xca)),process[_0x35c393(0xcf)](0x1));console[_0x35c393(0xbb)](_0x35c393(0xd0)+serverUrl),console[_0x35c393(0xbb)]('Starting\x20Terminal\x20UI...\x0a');const _0xf939b8=startTerminalUI();_0xf939b8['on']('exit',_0x581b99=>{const _0x27311a=_0x35c393;console[_0x27311a(0xbb)]('\x0aShutting\x20down\x20server...');try{process[_0x27311a(0x98)](_0x2660df['pid'],_0x27311a(0xd8));}catch(_0x47ad61){}process[_0x27311a(0xcf)](_0x581b99||0x0);}),process['on'](_0x35c393(0xa9),()=>{const _0x573e18=_0x35c393;_0xf939b8['kill'](_0x573e18(0xa9));}),process['on'](_0x35c393(0xd8),()=>{const _0x59cc0a=_0x35c393;_0xf939b8[_0x59cc0a(0x98)]('SIGTERM');});}};commands[command]?commands[command]()[a0_0x2846be(0xa5)](_0x2a978b=>{const _0x5b53ce=a0_0x2846be;console[_0x5b53ce(0xb8)](_0x5b53ce(0xb3),_0x2a978b[_0x5b53ce(0xb7)]),process[_0x5b53ce(0xcf)](0x1);}):(console[a0_0x2846be(0xb8)](a0_0x2846be(0xbe)+command),console[a0_0x2846be(0xb8)](a0_0x2846be(0xa3)),process[a0_0x2846be(0xcf)](0x1));function a0_0x5391(){const _0x400237=['1261253oLIEZC','port','Please\x20open\x20manually:\x20','version','localhost','SIGTERM','ceil','src','Could\x20not\x20open\x20browser\x20automatically.','toString','\x20manually.','kill','--help','help','utf8','host','/api/health','30iumBeC','68212nSryvx','xdg-open\x20\x22','includes','Checking\x20if\x20server\x20is\x20running...','Run\x20\x22loxia\x20--help\x22\x20for\x20usage\x20information.','7608Jjocvk','catch','package.json','platform','LOXIA_HOST','SIGINT','1863600midYka',')\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','inherit','--version','6210rKgRwn',')\x0a\x20\x20--host\x20<host>\x20\x20\x20\x20\x20Specify\x20host\x20(default:\x20','open\x20\x22','1105888nBLiPY','Starting\x20Terminal\x20UI...\x0a','Error:','http://','argv','startsWith','message','error','statusCode','Waiting\x20for\x20server\x20to\x20start...','log','slice','362935pvxJCo','Unknown\x20command:\x20','--host','Starting\x20Loxia\x20server...\x0a','node','1119048GxiSsz','10NifobK','env','Starting\x20Loxia\x20server\x20in\x20background...','\x0aLoxia\x20Autopilot\x20One\x20v','setTimeout','index.js','\x20\x20loxia\x20web\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Start\x20server\x20+\x20Web\x20UI','\x0aServer\x20failed\x20to\x20start.\x20Please\x20check\x20logs.','parse','Loxia\x20Autopilot\x20One\x20v','ignore','get','exit','Server\x20running\x20at\x20','loxia-terminal.js','length'];a0_0x5391=function(){return _0x400237;};return a0_0x5391();}
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- const a0_0x1c342f=a0_0x43f9;function a0_0x4ef6(){const _0x25b6ff=['6RWgHbQ','LOXIA_HOST','argv','toString','length','web','🎨\x20Launching\x20Ink-based\x20Terminal\x20UI...','843uDDfvl','ignore','✓\x20Server\x20is\x20already\x20running\x20at\x20','12IoSGhz','timeout','destroy','join','💡\x20Troubleshooting:','40361222Csjibq','stdout','dirname','Socket','--port','log','message','kill','pipe','1720YKfzrU','--host','slice','../src/interfaces/terminal/index.js','setTimeout','--ui','6026015Gqqrhi','920PXEqrl','...','\x20\x20\x202.\x20Try\x20running\x20the\x20server\x20manually:\x20node\x20bin/cli.js','error','7610967wdwTZy','node','env','LOXIA_PORT','now','🔍\x20Checking\x20if\x20server\x20is\x20running\x20at\x20','✗\x20Server\x20is\x20not\x20running','━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━','data','stderr','🚀\x20Starting\x20Loxia\x20server...','❌\x20Failed\x20to\x20start\x20Terminal\x20UI:','2649wxIziW','4604hOqmWt','35379EOiRgT','6087700BPSftN','Failed\x20to\x20start\x20server:'];a0_0x4ef6=function(){return _0x25b6ff;};return a0_0x4ef6();}(function(_0x4c13d8,_0x11a6eb){const _0x41ad82=a0_0x43f9,_0x3666e4=_0x4c13d8();while(!![]){try{const _0x15cdc=parseInt(_0x41ad82(0x158))/0x1*(-parseInt(_0x41ad82(0x135))/0x2)+-parseInt(_0x41ad82(0x14c))/0x3*(parseInt(_0x41ad82(0x14d))/0x4)+parseInt(_0x41ad82(0x13b))/0x5*(-parseInt(_0x41ad82(0x151))/0x6)+parseInt(_0x41ad82(0x140))/0x7+-parseInt(_0x41ad82(0x13c))/0x8*(parseInt(_0x41ad82(0x14e))/0x9)+-parseInt(_0x41ad82(0x14f))/0xa+-parseInt(_0x41ad82(0x12c))/0xb*(-parseInt(_0x41ad82(0x15b))/0xc);if(_0x15cdc===_0x11a6eb)break;else _0x3666e4['push'](_0x3666e4['shift']());}catch(_0x407e48){_0x3666e4['push'](_0x3666e4['shift']());}}}(a0_0x4ef6,0xb6e4c));import{spawn}from'child_process';import a0_0x4a2071 from'net';import a0_0xc5ae5e from'path';import{fileURLToPath}from'url';function a0_0x43f9(_0x5bdc67,_0x33a1e3){_0x5bdc67=_0x5bdc67-0x12a;const _0x4ef695=a0_0x4ef6();let _0x43f9ef=_0x4ef695[_0x5bdc67];return _0x43f9ef;}const __filename=fileURLToPath(import.meta.url),__dirname=a0_0xc5ae5e[a0_0x1c342f(0x12e)](__filename),projectRoot=a0_0xc5ae5e['dirname'](__dirname),DEFAULT_PORT=0x1f90,DEFAULT_HOST='localhost',SERVER_STARTUP_TIMEOUT=0x2710;async function isServerRunning(_0x24c626,_0x5a2baa){return new Promise(_0x6b22bd=>{const _0x27cf2e=a0_0x43f9,_0x278851=new a0_0x4a2071[(_0x27cf2e(0x12f))]();_0x278851[_0x27cf2e(0x139)](0x7d0),_0x278851['on']('connect',()=>{const _0x36336a=_0x27cf2e;_0x278851[_0x36336a(0x15d)](),_0x6b22bd(!![]);}),_0x278851['on'](_0x27cf2e(0x15c),()=>{const _0x2beebf=_0x27cf2e;_0x278851[_0x2beebf(0x15d)](),_0x6b22bd(![]);}),_0x278851['on']('error',()=>{const _0x345ae2=_0x27cf2e;_0x278851[_0x345ae2(0x15d)](),_0x6b22bd(![]);}),_0x278851['connect'](_0x5a2baa,_0x24c626);});}async function startServer(_0xc03f04,_0x1cfb44){const _0x37f85c=a0_0x1c342f;return console[_0x37f85c(0x131)](_0x37f85c(0x14a)),new Promise((_0x3514cd,_0x1c39c2)=>{const _0x574e8c=_0x37f85c,_0x37c1ba=spawn(_0x574e8c(0x141),[a0_0xc5ae5e[_0x574e8c(0x12a)](projectRoot,'bin/cli.js'),_0x574e8c(0x13a),_0x574e8c(0x156),_0x574e8c(0x136),_0xc03f04,_0x574e8c(0x130),_0x1cfb44[_0x574e8c(0x154)]()],{'detached':![],'stdio':[_0x574e8c(0x159),'pipe',_0x574e8c(0x134)]});_0x37c1ba[_0x574e8c(0x12d)]['on'](_0x574e8c(0x148),()=>{}),_0x37c1ba[_0x574e8c(0x149)]['on'](_0x574e8c(0x148),()=>{}),_0x37c1ba['on'](_0x574e8c(0x13f),_0x37a84e=>{const _0x1ff08e=_0x574e8c;console[_0x1ff08e(0x13f)](_0x1ff08e(0x150),_0x37a84e['message']),_0x1c39c2(_0x37a84e);});const _0x5d78fa=Date[_0x574e8c(0x144)](),_0x1b26fe=setInterval(async()=>{const _0x45e5a4=_0x574e8c,_0x2264af=await isServerRunning(_0xc03f04,_0x1cfb44);if(_0x2264af)clearInterval(_0x1b26fe),console['log']('✓\x20Server\x20started\x20at\x20'+_0xc03f04+':'+_0x1cfb44),_0x3514cd();else Date['now']()-_0x5d78fa>SERVER_STARTUP_TIMEOUT&&(clearInterval(_0x1b26fe),_0x37c1ba[_0x45e5a4(0x133)](),_0x1c39c2(new Error('Server\x20startup\x20timeout')));},0x1f4);});}async function main(){const _0x1f9c0d=a0_0x1c342f;try{console[_0x1f9c0d(0x131)](_0x1f9c0d(0x147)),console['log']('\x20\x20Loxia\x20Autopilot\x20One\x20-\x20Terminal\x20UI'),console[_0x1f9c0d(0x131)](_0x1f9c0d(0x147)),console['log']('');const _0x46552c=process[_0x1f9c0d(0x153)][_0x1f9c0d(0x137)](0x2);let _0x43f1c3=DEFAULT_HOST,_0x31312e=DEFAULT_PORT;for(let _0x3b99e8=0x0;_0x3b99e8<_0x46552c[_0x1f9c0d(0x155)];_0x3b99e8++){if(_0x46552c[_0x3b99e8]===_0x1f9c0d(0x136)&&_0x46552c[_0x3b99e8+0x1])_0x43f1c3=_0x46552c[_0x3b99e8+0x1],_0x3b99e8++;else _0x46552c[_0x3b99e8]===_0x1f9c0d(0x130)&&_0x46552c[_0x3b99e8+0x1]&&(_0x31312e=parseInt(_0x46552c[_0x3b99e8+0x1],0xa),_0x3b99e8++);}console['log'](_0x1f9c0d(0x145)+_0x43f1c3+':'+_0x31312e+_0x1f9c0d(0x13d));const _0x4fa8d2=await isServerRunning(_0x43f1c3,_0x31312e);!_0x4fa8d2?(console[_0x1f9c0d(0x131)](_0x1f9c0d(0x146)),await startServer(_0x43f1c3,_0x31312e)):console[_0x1f9c0d(0x131)](_0x1f9c0d(0x15a)+_0x43f1c3+':'+_0x31312e),console[_0x1f9c0d(0x131)](''),console['log'](_0x1f9c0d(0x157)),console[_0x1f9c0d(0x131)](''),await new Promise(_0x56f566=>setTimeout(_0x56f566,0x1f4)),process[_0x1f9c0d(0x142)][_0x1f9c0d(0x152)]=_0x43f1c3,process[_0x1f9c0d(0x142)][_0x1f9c0d(0x143)]=_0x31312e[_0x1f9c0d(0x154)](),await import(_0x1f9c0d(0x138));}catch(_0x32b5c8){console[_0x1f9c0d(0x13f)](''),console[_0x1f9c0d(0x13f)](_0x1f9c0d(0x14b)),console['error']('\x20\x20',_0x32b5c8[_0x1f9c0d(0x132)]),console['error'](''),console['error'](_0x1f9c0d(0x12b)),console[_0x1f9c0d(0x13f)]('\x20\x20\x201.\x20Make\x20sure\x20no\x20other\x20process\x20is\x20using\x20port\x208080'),console[_0x1f9c0d(0x13f)](_0x1f9c0d(0x13e)),console['error']('\x20\x20\x203.\x20Check\x20logs\x20for\x20more\x20details'),console[_0x1f9c0d(0x13f)](''),process['exit'](0x1);}}main();
3
+ const a0_0x1f3fc9=a0_0x388d;(function(_0x2a05f4,_0x4de26a){const _0x2ef324=a0_0x388d,_0x2238f3=_0x2a05f4();while(!![]){try{const _0x19e9b8=parseInt(_0x2ef324(0xe3))/0x1+-parseInt(_0x2ef324(0xbd))/0x2+-parseInt(_0x2ef324(0xc3))/0x3*(parseInt(_0x2ef324(0xe1))/0x4)+-parseInt(_0x2ef324(0xde))/0x5*(-parseInt(_0x2ef324(0xdd))/0x6)+parseInt(_0x2ef324(0xdb))/0x7*(-parseInt(_0x2ef324(0xca))/0x8)+parseInt(_0x2ef324(0xe4))/0x9*(-parseInt(_0x2ef324(0xec))/0xa)+parseInt(_0x2ef324(0xeb))/0xb;if(_0x19e9b8===_0x4de26a)break;else _0x2238f3['push'](_0x2238f3['shift']());}catch(_0xee91cc){_0x2238f3['push'](_0x2238f3['shift']());}}}(a0_0x53a4,0x43432));import{spawn}from'child_process';import a0_0x85aeed from'net';import a0_0x425cda from'path';import{fileURLToPath}from'url';const __filename=fileURLToPath(import.meta.url),__dirname=a0_0x425cda[a0_0x1f3fc9(0xcf)](__filename),projectRoot=a0_0x425cda[a0_0x1f3fc9(0xcf)](__dirname),DEFAULT_PORT=0x1f90,DEFAULT_HOST='localhost',SERVER_STARTUP_TIMEOUT=0x2710;async function isServerRunning(_0x1c93d0,_0x1b6ffe){return new Promise(_0x511d8c=>{const _0x10c97b=a0_0x388d,_0x4ed916=new a0_0x85aeed[(_0x10c97b(0xc0))]();_0x4ed916[_0x10c97b(0xd2)](0x7d0),_0x4ed916['on'](_0x10c97b(0xd4),()=>{const _0x51fb0d=_0x10c97b;_0x4ed916[_0x51fb0d(0xbc)](),_0x511d8c(!![]);}),_0x4ed916['on'](_0x10c97b(0xc2),()=>{const _0x25c0f5=_0x10c97b;_0x4ed916[_0x25c0f5(0xbc)](),_0x511d8c(![]);}),_0x4ed916['on']('error',()=>{const _0x436179=_0x10c97b;_0x4ed916[_0x436179(0xbc)](),_0x511d8c(![]);}),_0x4ed916[_0x10c97b(0xd4)](_0x1b6ffe,_0x1c93d0);});}function a0_0x388d(_0x4595ef,_0x22dfec){_0x4595ef=_0x4595ef-0xba;const _0x53a43e=a0_0x53a4();let _0x388d0a=_0x53a43e[_0x4595ef];return _0x388d0a;}async function startServer(_0x2bcdc8,_0x9ed093){const _0x3aeca4=a0_0x1f3fc9;return console[_0x3aeca4(0xd0)](_0x3aeca4(0xbb)),new Promise((_0x51d74a,_0x1670d0)=>{const _0x28bcb7=_0x3aeca4,_0x2d29f6=spawn(_0x28bcb7(0xc1),[a0_0x425cda[_0x28bcb7(0xe7)](projectRoot,_0x28bcb7(0xd1)),'--ui',_0x28bcb7(0xcc),_0x28bcb7(0xe0),_0x2bcdc8,_0x28bcb7(0xd5),_0x9ed093[_0x28bcb7(0xd8)]()],{'detached':![],'stdio':[_0x28bcb7(0xd3),_0x28bcb7(0xc6),_0x28bcb7(0xc6)]});_0x2d29f6['stdout']['on']('data',()=>{}),_0x2d29f6[_0x28bcb7(0xc9)]['on'](_0x28bcb7(0xdf),()=>{}),_0x2d29f6['on'](_0x28bcb7(0xd7),_0x2faea9=>{const _0x561ca4=_0x28bcb7;console[_0x561ca4(0xd7)](_0x561ca4(0xce),_0x2faea9[_0x561ca4(0xcb)]),_0x1670d0(_0x2faea9);});const _0x2ec30a=Date[_0x28bcb7(0xe6)](),_0x7b451a=setInterval(async()=>{const _0x23d550=_0x28bcb7,_0x173f3d=await isServerRunning(_0x2bcdc8,_0x9ed093);if(_0x173f3d)clearInterval(_0x7b451a),console[_0x23d550(0xd0)]('✓\x20Server\x20started\x20at\x20'+_0x2bcdc8+':'+_0x9ed093),_0x51d74a();else Date[_0x23d550(0xe6)]()-_0x2ec30a>SERVER_STARTUP_TIMEOUT&&(clearInterval(_0x7b451a),_0x2d29f6[_0x23d550(0xe2)](),_0x1670d0(new Error(_0x23d550(0xe8))));},0x1f4);});}function a0_0x53a4(){const _0x403f5e=['../src/interfaces/terminal/index.js','12rcERtJ','17240FNrGQw','data','--host','4eQaaVM','kill','28440SMQOjy','1836747TGJqYC','🎨\x20Launching\x20Ink-based\x20Terminal\x20UI...','now','join','Server\x20startup\x20timeout','LOXIA_HOST','━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━','13925131OeIXgK','10oUpxqy','exit','🚀\x20Starting\x20Loxia\x20server...','destroy','775672fFnhic','❌\x20Failed\x20to\x20start\x20Terminal\x20UI:','env','Socket','node','timeout','1118823HUPHal','argv','💡\x20Troubleshooting:','pipe','slice','\x20\x20\x203.\x20Check\x20logs\x20for\x20more\x20details','stderr','487128wdzQWU','message','web','\x20\x20\x202.\x20Try\x20running\x20the\x20server\x20manually:\x20node\x20bin/cli.js','Failed\x20to\x20start\x20server:','dirname','log','bin/cli.js','setTimeout','ignore','connect','--port','...','error','toString','LOXIA_PORT','✗\x20Server\x20is\x20not\x20running','7WINjyw'];a0_0x53a4=function(){return _0x403f5e;};return a0_0x53a4();}async function main(){const _0x1e0586=a0_0x1f3fc9;try{console['log'](_0x1e0586(0xea)),console[_0x1e0586(0xd0)]('\x20\x20Loxia\x20Autopilot\x20One\x20-\x20Terminal\x20UI'),console[_0x1e0586(0xd0)](_0x1e0586(0xea)),console[_0x1e0586(0xd0)]('');const _0xfb78c7=process[_0x1e0586(0xc4)][_0x1e0586(0xc7)](0x2);let _0x3b98e8=DEFAULT_HOST,_0x5e1c48=DEFAULT_PORT;for(let _0x52faf7=0x0;_0x52faf7<_0xfb78c7['length'];_0x52faf7++){if(_0xfb78c7[_0x52faf7]===_0x1e0586(0xe0)&&_0xfb78c7[_0x52faf7+0x1])_0x3b98e8=_0xfb78c7[_0x52faf7+0x1],_0x52faf7++;else _0xfb78c7[_0x52faf7]==='--port'&&_0xfb78c7[_0x52faf7+0x1]&&(_0x5e1c48=parseInt(_0xfb78c7[_0x52faf7+0x1],0xa),_0x52faf7++);}console[_0x1e0586(0xd0)]('🔍\x20Checking\x20if\x20server\x20is\x20running\x20at\x20'+_0x3b98e8+':'+_0x5e1c48+_0x1e0586(0xd6));const _0x4cae8a=await isServerRunning(_0x3b98e8,_0x5e1c48);!_0x4cae8a?(console['log'](_0x1e0586(0xda)),await startServer(_0x3b98e8,_0x5e1c48)):console[_0x1e0586(0xd0)]('✓\x20Server\x20is\x20already\x20running\x20at\x20'+_0x3b98e8+':'+_0x5e1c48),console[_0x1e0586(0xd0)](''),console[_0x1e0586(0xd0)](_0x1e0586(0xe5)),console[_0x1e0586(0xd0)](''),await new Promise(_0x3b54ce=>setTimeout(_0x3b54ce,0x1f4)),process[_0x1e0586(0xbf)][_0x1e0586(0xe9)]=_0x3b98e8,process[_0x1e0586(0xbf)][_0x1e0586(0xd9)]=_0x5e1c48[_0x1e0586(0xd8)](),await import(_0x1e0586(0xdc));}catch(_0x1663d7){console[_0x1e0586(0xd7)](''),console[_0x1e0586(0xd7)](_0x1e0586(0xbe)),console[_0x1e0586(0xd7)]('\x20\x20',_0x1663d7[_0x1e0586(0xcb)]),console[_0x1e0586(0xd7)](''),console[_0x1e0586(0xd7)](_0x1e0586(0xc5)),console['error']('\x20\x20\x201.\x20Make\x20sure\x20no\x20other\x20process\x20is\x20using\x20port\x208080'),console[_0x1e0586(0xd7)](_0x1e0586(0xcd)),console[_0x1e0586(0xd7)](_0x1e0586(0xc8)),console['error'](''),process[_0x1e0586(0xba)](0x1);}}main();
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- const a0_0x27de10=a0_0x19ad;(function(_0x383437,_0x1d2a8f){const _0x1f3f4f=a0_0x19ad,_0x4b71f4=_0x383437();while(!![]){try{const _0x2790d9=-parseInt(_0x1f3f4f(0x1b8))/0x1*(parseInt(_0x1f3f4f(0x1b9))/0x2)+parseInt(_0x1f3f4f(0x1c4))/0x3+-parseInt(_0x1f3f4f(0x1b0))/0x4*(parseInt(_0x1f3f4f(0x1c3))/0x5)+parseInt(_0x1f3f4f(0x1ce))/0x6*(parseInt(_0x1f3f4f(0x1b2))/0x7)+parseInt(_0x1f3f4f(0x1bb))/0x8+parseInt(_0x1f3f4f(0x1c2))/0x9*(-parseInt(_0x1f3f4f(0x1ca))/0xa)+parseInt(_0x1f3f4f(0x1be))/0xb*(-parseInt(_0x1f3f4f(0x1b3))/0xc);if(_0x2790d9===_0x1d2a8f)break;else _0x4b71f4['push'](_0x4b71f4['shift']());}catch(_0x50e7dd){_0x4b71f4['push'](_0x4b71f4['shift']());}}}(a0_0x23d3,0xdbf44));function a0_0x19ad(_0x2f5f4a,_0x57183c){_0x2f5f4a=_0x2f5f4a-0x1ac;const _0x23d326=a0_0x23d3();let _0x19ad3d=_0x23d326[_0x2f5f4a];return _0x19ad3d;}import{startTerminalUI}from'../src/interfaces/terminal/index.js';const args=process[a0_0x27de10(0x1b1)][a0_0x27de10(0x1b5)](0x2),options={'host':a0_0x27de10(0x1c5),'port':0x1f90};function a0_0x23d3(){const _0x34b0d9=['exit','log','90599qdYrIz','6XIMNqH','waitUntilExit','5117464smTZNB','Connecting\x20to:\x20','\x20\x20-\x20Piped\x20environments\x20(e.g.,\x20|\x20head,\x20|\x20grep)','11AZfktH','ERROR:\x20Terminal\x20UI\x20requires\x20an\x20interactive\x20terminal\x20(TTY).','Press\x20Ctrl+C\x20to\x20exit\x0a','port','20394XrxRLk','226595DGbgAD','3477186ZWxIET','localhost','error','host','then','\x20\x20npm\x20start','230AdSGUE','LOXIA_HOST','\x20\x20-\x20Background\x20processes\x20(e.g.,\x20&\x20at\x20the\x20end)','\x20\x20npm\x20run\x20terminal-ui','1908VQEIij','length','LOXIA_PORT','isTTY','--help','Or\x20use\x20the\x20web\x20UI\x20instead:','The\x20terminal\x20UI\x20cannot\x20run\x20in:','--host','\x20\x20-\x20Redirected\x20output\x20(e.g.,\x20>\x20file.txt,\x202>&1\x20|\x20...)','Please\x20run\x20this\x20command\x20in\x20a\x20real\x20terminal\x20without\x20pipes\x20or\x20redirection:','\x20\x20-\x20Some\x20CI/CD\x20environments','Starting\x20Loxia\x20Terminal\x20UI...','28qmLccX','argv','35161xKNvbS','22247748RtMlmI','env','slice'];a0_0x23d3=function(){return _0x34b0d9;};return a0_0x23d3();}for(let i=0x0;i<args[a0_0x27de10(0x1cf)];i++){const arg=args[i];if(arg===a0_0x27de10(0x1d5)||arg==='-h')options[a0_0x27de10(0x1c7)]=args[++i];else{if(arg==='--port'||arg==='-p')options[a0_0x27de10(0x1c1)]=parseInt(args[++i],0xa);else arg===a0_0x27de10(0x1d2)&&(console[a0_0x27de10(0x1b7)]('\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'),process['exit'](0x0));}}process['env'][a0_0x27de10(0x1cb)]&&(options['host']=process['env'][a0_0x27de10(0x1cb)]);process['env'][a0_0x27de10(0x1d0)]&&(options[a0_0x27de10(0x1c1)]=parseInt(process[a0_0x27de10(0x1b4)][a0_0x27de10(0x1d0)],0xa));!process['stdin'][a0_0x27de10(0x1d1)]&&(console['error'](a0_0x27de10(0x1bf)),console[a0_0x27de10(0x1c6)](''),console[a0_0x27de10(0x1c6)](a0_0x27de10(0x1d4)),console[a0_0x27de10(0x1c6)](a0_0x27de10(0x1bd)),console[a0_0x27de10(0x1c6)](a0_0x27de10(0x1ac)),console[a0_0x27de10(0x1c6)](a0_0x27de10(0x1cc)),console[a0_0x27de10(0x1c6)](a0_0x27de10(0x1ae)),console['error'](''),console['error'](a0_0x27de10(0x1ad)),console[a0_0x27de10(0x1c6)](a0_0x27de10(0x1cd)),console[a0_0x27de10(0x1c6)](''),console[a0_0x27de10(0x1c6)](a0_0x27de10(0x1d3)),console[a0_0x27de10(0x1c6)](a0_0x27de10(0x1c9)),process[a0_0x27de10(0x1b6)](0x1));console[a0_0x27de10(0x1b7)](a0_0x27de10(0x1af)),console[a0_0x27de10(0x1b7)](a0_0x27de10(0x1bc)+options[a0_0x27de10(0x1c7)]+':'+options[a0_0x27de10(0x1c1)]),console['log'](a0_0x27de10(0x1c0));const instance=startTerminalUI(options);instance[a0_0x27de10(0x1ba)]()[a0_0x27de10(0x1c8)](()=>{const _0x566653=a0_0x27de10;console[_0x566653(0x1b7)]('\x0aTerminal\x20UI\x20exited'),process[_0x566653(0x1b6)](0x0);})['catch'](_0x268176=>{console['error']('\x0aTerminal\x20UI\x20error:',_0x268176),process['exit'](0x1);});
3
+ const a0_0x564356=a0_0x4496;function a0_0x42e9(){const _0x1708b3=['1020IXjKMT','isTTY','--port','catch','49671mRwDWT','host','\x20\x20-\x20Redirected\x20output\x20(e.g.,\x20>\x20file.txt,\x202>&1\x20|\x20...)','98186dZCgWs','1030755rUOOFB','1634952yOrbbM','3420906nYmbgA','\x20\x20npm\x20run\x20terminal-ui','error','638196jUFEZE','--help','LOXIA_PORT','7133784vbcAfR','\x20\x20-\x20Some\x20CI/CD\x20environments','waitUntilExit','length','localhost','\x0aTerminal\x20UI\x20exited','Or\x20use\x20the\x20web\x20UI\x20instead:','slice','1VCxfRr','log','\x20\x20-\x20Background\x20processes\x20(e.g.,\x20&\x20at\x20the\x20end)','Press\x20Ctrl+C\x20to\x20exit\x0a','\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','port','168NzwNJw','env','--host','ERROR:\x20Terminal\x20UI\x20requires\x20an\x20interactive\x20terminal\x20(TTY).','exit','5kfMoaP'];a0_0x42e9=function(){return _0x1708b3;};return a0_0x42e9();}(function(_0x1b478f,_0x57e3b7){const _0x524175=a0_0x4496,_0x4ddbe7=_0x1b478f();while(!![]){try{const _0x52a25b=-parseInt(_0x524175(0xc8))/0x1*(parseInt(_0x524175(0xbd))/0x2)+-parseInt(_0x524175(0xb8))/0x3+parseInt(_0x524175(0xb9))/0x4+-parseInt(_0x524175(0xaf))/0x5*(-parseInt(_0x524175(0xba))/0x6)+parseInt(_0x524175(0xc0))/0x7+-parseInt(_0x524175(0xaa))/0x8*(-parseInt(_0x524175(0xb4))/0x9)+-parseInt(_0x524175(0xb0))/0xa*(parseInt(_0x524175(0xb7))/0xb);if(_0x52a25b===_0x57e3b7)break;else _0x4ddbe7['push'](_0x4ddbe7['shift']());}catch(_0x36b4ca){_0x4ddbe7['push'](_0x4ddbe7['shift']());}}}(a0_0x42e9,0x8405d));import{startTerminalUI}from'../src/interfaces/terminal/index.js';const args=process['argv'][a0_0x564356(0xc7)](0x2),options={'host':a0_0x564356(0xc4),'port':0x1f90};for(let i=0x0;i<args[a0_0x564356(0xc3)];i++){const arg=args[i];if(arg===a0_0x564356(0xac)||arg==='-h')options[a0_0x564356(0xb5)]=args[++i];else{if(arg===a0_0x564356(0xb2)||arg==='-p')options[a0_0x564356(0xa9)]=parseInt(args[++i],0xa);else arg===a0_0x564356(0xbe)&&(console[a0_0x564356(0xc9)](a0_0x564356(0xa8)),process[a0_0x564356(0xae)](0x0));}}process[a0_0x564356(0xab)]['LOXIA_HOST']&&(options[a0_0x564356(0xb5)]=process['env']['LOXIA_HOST']);process[a0_0x564356(0xab)][a0_0x564356(0xbf)]&&(options['port']=parseInt(process[a0_0x564356(0xab)]['LOXIA_PORT'],0xa));!process['stdin'][a0_0x564356(0xb1)]&&(console['error'](a0_0x564356(0xad)),console[a0_0x564356(0xbc)](''),console[a0_0x564356(0xbc)]('The\x20terminal\x20UI\x20cannot\x20run\x20in:'),console[a0_0x564356(0xbc)]('\x20\x20-\x20Piped\x20environments\x20(e.g.,\x20|\x20head,\x20|\x20grep)'),console[a0_0x564356(0xbc)](a0_0x564356(0xb6)),console['error'](a0_0x564356(0xca)),console['error'](a0_0x564356(0xc1)),console['error'](''),console[a0_0x564356(0xbc)]('Please\x20run\x20this\x20command\x20in\x20a\x20real\x20terminal\x20without\x20pipes\x20or\x20redirection:'),console[a0_0x564356(0xbc)](a0_0x564356(0xbb)),console['error'](''),console['error'](a0_0x564356(0xc6)),console[a0_0x564356(0xbc)]('\x20\x20npm\x20start'),process['exit'](0x1));console[a0_0x564356(0xc9)]('Starting\x20Loxia\x20Terminal\x20UI...'),console[a0_0x564356(0xc9)]('Connecting\x20to:\x20'+options[a0_0x564356(0xb5)]+':'+options[a0_0x564356(0xa9)]),console[a0_0x564356(0xc9)](a0_0x564356(0xcb));function a0_0x4496(_0x545134,_0x3c488d){_0x545134=_0x545134-0xa8;const _0x42e98=a0_0x42e9();let _0x449696=_0x42e98[_0x545134];return _0x449696;}const instance=startTerminalUI(options);instance[a0_0x564356(0xc2)]()['then'](()=>{const _0x232533=a0_0x564356;console[_0x232533(0xc9)](_0x232533(0xc5)),process[_0x232533(0xae)](0x0);})[a0_0x564356(0xb3)](_0x2a0d48=>{const _0x46e606=a0_0x564356;console[_0x46e606(0xbc)]('\x0aTerminal\x20UI\x20error:',_0x2a0d48),process[_0x46e606(0xae)](0x1);});
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- const a0_0x3d57a8=a0_0x5679;(function(_0x6c6c0,_0x4b45b5){const _0x348ca6=a0_0x5679,_0x4ecab0=_0x6c6c0();while(!![]){try{const _0x2f04d0=parseInt(_0x348ca6(0x125))/0x1+parseInt(_0x348ca6(0x11e))/0x2*(parseInt(_0x348ca6(0x11c))/0x3)+parseInt(_0x348ca6(0x138))/0x4*(-parseInt(_0x348ca6(0x110))/0x5)+parseInt(_0x348ca6(0x10a))/0x6+parseInt(_0x348ca6(0x124))/0x7*(-parseInt(_0x348ca6(0x12f))/0x8)+parseInt(_0x348ca6(0x132))/0x9+-parseInt(_0x348ca6(0x135))/0xa*(parseInt(_0x348ca6(0x12c))/0xb);if(_0x2f04d0===_0x4b45b5)break;else _0x4ecab0['push'](_0x4ecab0['shift']());}catch(_0x3942ec){_0x4ecab0['push'](_0x4ecab0['shift']());}}}(a0_0xaf81,0x3a430));function a0_0xaf81(){const _0x4ab069=['node','9038eHPETh','setTimeout','pipe','Server\x20returned\x20','stderr','🛑\x20Stopping\x20server...','1645wkQRnW','73295ZQtVBL','get','Server\x20exited\x20with\x20code\x20','🚀\x20Starting\x20Loxia\x20server...','exit','kill','data','679844TokHwX','index.js','env','5224BxjeDQ','SIGTERM','[SERVER]\x20','3268278lbZPKW','\x0a⚠️\x20\x20Received\x20SIGTERM,\x20shutting\x20down...','http://localhost:','50MopaxB','✅\x20Server\x20is\x20ready!','/health','372644mtYShK','Failed\x20to\x20start\x20Terminal\x20UI:','SIGKILL','🖥️\x20\x20Starting\x20Terminal\x20UI...','Error\x20during\x20startup:','1817496MJAext','bin','Timeout','src','message','toString','20ArCxCm','ExperimentalWarning','statusCode','error','killed','╔════════════════════════════════════════════════╗','log','[SERVER\x20ERROR]\x20','║\x20\x20\x20Loxia\x20AI\x20Agents\x20-\x20Server\x20+\x20Terminal\x20UI\x20\x20\x20\x20\x20\x20║','ignore','loxia-terminal.js','⚠️\x20\x20Server\x20may\x20not\x20be\x20fully\x20ready,\x20but\x20continuing\x20anyway...','222uXMiSl'];a0_0xaf81=function(){return _0x4ab069;};return a0_0xaf81();}import{spawn}from'child_process';import{fileURLToPath}from'url';import{dirname,join}from'path';import a0_0x58e978 from'http';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename),rootDir=join(__dirname,'..'),SERVER_PORT=process['env']['PORT']||0x1f90,STARTUP_WAIT=0x7d0;let serverProcess=null;function a0_0x5679(_0x10e6e1,_0x169292){_0x10e6e1=_0x10e6e1-0x10a;const _0xaf8146=a0_0xaf81();let _0x5679e2=_0xaf8146[_0x10e6e1];return _0x5679e2;}async function checkServerReady(_0x4f4d0e=0xa,_0x1b0719=0x1f4){const _0x4bb574=a0_0x5679;for(let _0x323e26=0x0;_0x323e26<_0x4f4d0e;_0x323e26++){try{return await new Promise((_0x1c4c9c,_0x2f596a)=>{const _0x278a21=a0_0x5679,_0x5415e9=a0_0x58e978[_0x278a21(0x126)](_0x278a21(0x134)+SERVER_PORT+_0x278a21(0x137),_0x2e2ecb=>{const _0xa87bca=_0x278a21;_0x2e2ecb['statusCode']===0xc8?_0x1c4c9c():_0x2f596a(new Error(_0xa87bca(0x121)+_0x2e2ecb[_0xa87bca(0x112)]));});_0x5415e9['on'](_0x278a21(0x113),_0x2f596a),_0x5415e9[_0x278a21(0x11f)](0x3e8,()=>{const _0x1cadb8=_0x278a21;_0x5415e9['destroy'](),_0x2f596a(new Error(_0x1cadb8(0x10c)));});}),console['log'](_0x4bb574(0x136)),!![];}catch(_0x4ec584){_0x323e26<_0x4f4d0e-0x1&&await new Promise(_0xa3c09f=>setTimeout(_0xa3c09f,_0x1b0719));}}return console[_0x4bb574(0x116)](_0x4bb574(0x11b)),![];}async function startServer(){return new Promise(_0x148d47=>{const _0x207c7f=a0_0x5679;console[_0x207c7f(0x116)](_0x207c7f(0x128));const _0x394389=join(rootDir,_0x207c7f(0x10d),_0x207c7f(0x12d));serverProcess=spawn(_0x207c7f(0x11d),[_0x394389],{'cwd':rootDir,'env':{...process['env']},'stdio':[_0x207c7f(0x119),_0x207c7f(0x120),_0x207c7f(0x120)],'detached':![]}),serverProcess['stdout']['on'](_0x207c7f(0x12b),_0x1de586=>{const _0x348080=_0x207c7f,_0xbf7953=_0x1de586['toString']()['trim']();_0xbf7953&&console[_0x348080(0x116)](_0x348080(0x131)+_0xbf7953);}),serverProcess[_0x207c7f(0x122)]['on'](_0x207c7f(0x12b),_0x5a3741=>{const _0x563bcf=_0x207c7f,_0x4beb9b=_0x5a3741[_0x563bcf(0x10f)]()['trim']();_0x4beb9b&&!_0x4beb9b['includes'](_0x563bcf(0x111))&&console[_0x563bcf(0x113)](_0x563bcf(0x117)+_0x4beb9b);}),serverProcess['on'](_0x207c7f(0x113),_0x313547=>{const _0x3c721c=_0x207c7f;console[_0x3c721c(0x113)]('Failed\x20to\x20start\x20server:',_0x313547[_0x3c721c(0x10e)]),process[_0x3c721c(0x129)](0x1);}),serverProcess['on'](_0x207c7f(0x129),(_0x54bb27,_0x256840)=>{const _0x2905d6=_0x207c7f;_0x54bb27!==null&&_0x54bb27!==0x0&&(console[_0x2905d6(0x113)](_0x2905d6(0x127)+_0x54bb27),process[_0x2905d6(0x129)](_0x54bb27));}),setTimeout(_0x148d47,STARTUP_WAIT);});}async function startTerminalUI(){const _0xb2fd15=a0_0x5679;console['log'](_0xb2fd15(0x13b)),console[_0xb2fd15(0x116)]('');const _0x471a18=join(rootDir,_0xb2fd15(0x10b),_0xb2fd15(0x11a)),_0x181828=spawn(_0xb2fd15(0x11d),[_0x471a18],{'cwd':rootDir,'env':{...process[_0xb2fd15(0x12e)]},'stdio':'inherit'});return _0x181828['on']('error',_0x341124=>{const _0x2c6c89=_0xb2fd15;console['error'](_0x2c6c89(0x139),_0x341124[_0x2c6c89(0x10e)]),cleanup(),process[_0x2c6c89(0x129)](0x1);}),_0x181828['on'](_0xb2fd15(0x129),_0x5aad2c=>{const _0x43049a=_0xb2fd15;console[_0x43049a(0x116)]('\x0a👋\x20Terminal\x20UI\x20closed.'),cleanup(),process[_0x43049a(0x129)](_0x5aad2c||0x0);}),_0x181828;}function cleanup(){const _0x332f77=a0_0x5679;serverProcess&&!serverProcess[_0x332f77(0x114)]&&(console[_0x332f77(0x116)](_0x332f77(0x123)),serverProcess[_0x332f77(0x12a)](_0x332f77(0x130)),setTimeout(()=>{const _0x577f0c=_0x332f77;!serverProcess[_0x577f0c(0x114)]&&serverProcess[_0x577f0c(0x12a)](_0x577f0c(0x13a));},0x1388));}process['on']('SIGINT',()=>{const _0x47bd1a=a0_0x5679;console[_0x47bd1a(0x116)]('\x0a⚠️\x20\x20Received\x20SIGINT,\x20shutting\x20down...'),cleanup(),process['exit'](0x0);}),process['on'](a0_0x3d57a8(0x130),()=>{const _0x18d957=a0_0x3d57a8;console[_0x18d957(0x116)](_0x18d957(0x133)),cleanup(),process[_0x18d957(0x129)](0x0);}),process['on']('exit',()=>{cleanup();});async function main(){const _0x300535=a0_0x3d57a8;console[_0x300535(0x116)](_0x300535(0x115)),console['log'](_0x300535(0x118)),console[_0x300535(0x116)]('╚════════════════════════════════════════════════╝'),console[_0x300535(0x116)]('');try{await startServer(),await checkServerReady(),await startTerminalUI(),await new Promise(()=>{});}catch(_0x468fcc){console['error'](_0x300535(0x13c),_0x468fcc[_0x300535(0x10e)]),cleanup(),process[_0x300535(0x129)](0x1);}}main();
3
+ const a0_0x117b0f=a0_0x35d7;(function(_0x27bcd4,_0x48481f){const _0x5df5da=a0_0x35d7,_0x17327e=_0x27bcd4();while(!![]){try{const _0x25e536=parseInt(_0x5df5da(0x110))/0x1+-parseInt(_0x5df5da(0xef))/0x2*(-parseInt(_0x5df5da(0xec))/0x3)+-parseInt(_0x5df5da(0xea))/0x4*(-parseInt(_0x5df5da(0x109))/0x5)+-parseInt(_0x5df5da(0xfb))/0x6+parseInt(_0x5df5da(0xe2))/0x7+parseInt(_0x5df5da(0xf3))/0x8*(-parseInt(_0x5df5da(0xfc))/0x9)+-parseInt(_0x5df5da(0x101))/0xa;if(_0x25e536===_0x48481f)break;else _0x17327e['push'](_0x17327e['shift']());}catch(_0x21d97f){_0x17327e['push'](_0x17327e['shift']());}}}(a0_0x28b5,0x3c2a9));import{spawn}from'child_process';import{fileURLToPath}from'url';function a0_0x35d7(_0x1b3200,_0x359a67){_0x1b3200=_0x1b3200-0xe2;const _0x28b501=a0_0x28b5();let _0x35d74e=_0x28b501[_0x1b3200];return _0x35d74e;}import{dirname,join}from'path';import a0_0x17120e from'http';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename),rootDir=join(__dirname,'..'),SERVER_PORT=process['env'][a0_0x117b0f(0xfe)]||0x1f90,STARTUP_WAIT=0x7d0;let serverProcess=null;async function checkServerReady(_0x28044a=0xa,_0x547fbf=0x1f4){const _0x545e07=a0_0x117b0f;for(let _0x3335f2=0x0;_0x3335f2<_0x28044a;_0x3335f2++){try{return await new Promise((_0x2bbc78,_0x3c09d8)=>{const _0x2bc8f2=a0_0x35d7,_0x23d98b=a0_0x17120e[_0x2bc8f2(0x103)](_0x2bc8f2(0xee)+SERVER_PORT+_0x2bc8f2(0xe3),_0x230ca8=>{const _0x5b51e6=_0x2bc8f2;_0x230ca8['statusCode']===0xc8?_0x2bbc78():_0x3c09d8(new Error(_0x5b51e6(0xf1)+_0x230ca8[_0x5b51e6(0x10e)]));});_0x23d98b['on'](_0x2bc8f2(0x105),_0x3c09d8),_0x23d98b['setTimeout'](0x3e8,()=>{const _0xea3c9a=_0x2bc8f2;_0x23d98b[_0xea3c9a(0x113)](),_0x3c09d8(new Error('Timeout'));});}),console[_0x545e07(0x108)]('✅\x20Server\x20is\x20ready!'),!![];}catch(_0x586e65){_0x3335f2<_0x28044a-0x1&&await new Promise(_0x5e7452=>setTimeout(_0x5e7452,_0x547fbf));}}return console[_0x545e07(0x108)](_0x545e07(0x116)),![];}async function startServer(){return new Promise(_0x465e1e=>{const _0x44703c=a0_0x35d7;console[_0x44703c(0x108)](_0x44703c(0x100));const _0x5c6257=join(rootDir,'src',_0x44703c(0xed));serverProcess=spawn(_0x44703c(0xe4),[_0x5c6257],{'cwd':rootDir,'env':{...process['env']},'stdio':[_0x44703c(0xe8),_0x44703c(0xf4),_0x44703c(0xf4)],'detached':![]}),serverProcess[_0x44703c(0x10c)]['on'](_0x44703c(0xf6),_0x367e69=>{const _0x35a2c6=_0x44703c,_0x25f4c6=_0x367e69['toString']()[_0x35a2c6(0xf8)]();_0x25f4c6&&console[_0x35a2c6(0x108)](_0x35a2c6(0xf0)+_0x25f4c6);}),serverProcess[_0x44703c(0xff)]['on'](_0x44703c(0xf6),_0x54b085=>{const _0x137542=_0x44703c,_0x32cd7d=_0x54b085[_0x137542(0xe7)]()['trim']();_0x32cd7d&&!_0x32cd7d[_0x137542(0x107)](_0x137542(0xeb))&&console[_0x137542(0x105)]('[SERVER\x20ERROR]\x20'+_0x32cd7d);}),serverProcess['on'](_0x44703c(0x105),_0x3c399d=>{const _0x3f8a6b=_0x44703c;console[_0x3f8a6b(0x105)](_0x3f8a6b(0x10d),_0x3c399d[_0x3f8a6b(0xf5)]),process[_0x3f8a6b(0x112)](0x1);}),serverProcess['on'](_0x44703c(0x112),(_0x3c31ad,_0x2f9d1a)=>{const _0x4611c8=_0x44703c;_0x3c31ad!==null&&_0x3c31ad!==0x0&&(console['error'](_0x4611c8(0x102)+_0x3c31ad),process[_0x4611c8(0x112)](_0x3c31ad));}),setTimeout(_0x465e1e,STARTUP_WAIT);});}async function startTerminalUI(){const _0x5b613a=a0_0x117b0f;console[_0x5b613a(0x108)](_0x5b613a(0x106)),console[_0x5b613a(0x108)]('');const _0x8c300e=join(rootDir,_0x5b613a(0xf7),_0x5b613a(0x104)),_0x8217c9=spawn(_0x5b613a(0xe4),[_0x8c300e],{'cwd':rootDir,'env':{...process[_0x5b613a(0xf9)]},'stdio':'inherit'});return _0x8217c9['on'](_0x5b613a(0x105),_0x245aa5=>{const _0x1fa6d6=_0x5b613a;console[_0x1fa6d6(0x105)](_0x1fa6d6(0x111),_0x245aa5[_0x1fa6d6(0xf5)]),cleanup(),process[_0x1fa6d6(0x112)](0x1);}),_0x8217c9['on'](_0x5b613a(0x112),_0x13b909=>{const _0x4bbcf8=_0x5b613a;console['log'](_0x4bbcf8(0xfa)),cleanup(),process[_0x4bbcf8(0x112)](_0x13b909||0x0);}),_0x8217c9;}function cleanup(){const _0xea4549=a0_0x117b0f;serverProcess&&!serverProcess['killed']&&(console[_0xea4549(0x108)](_0xea4549(0x115)),serverProcess[_0xea4549(0x10f)](_0xea4549(0xe9)),setTimeout(()=>{const _0x2c687c=_0xea4549;!serverProcess[_0x2c687c(0xfd)]&&serverProcess[_0x2c687c(0x10f)](_0x2c687c(0x10a));},0x1388));}process['on'](a0_0x117b0f(0x114),()=>{const _0x3c5f9c=a0_0x117b0f;console[_0x3c5f9c(0x108)](_0x3c5f9c(0xf2)),cleanup(),process[_0x3c5f9c(0x112)](0x0);}),process['on'](a0_0x117b0f(0xe9),()=>{console['log']('\x0a⚠️\x20\x20Received\x20SIGTERM,\x20shutting\x20down...'),cleanup(),process['exit'](0x0);}),process['on'](a0_0x117b0f(0x112),()=>{cleanup();});async function main(){const _0xb8f2f4=a0_0x117b0f;console[_0xb8f2f4(0x108)](_0xb8f2f4(0x10b)),console['log'](_0xb8f2f4(0xe5)),console[_0xb8f2f4(0x108)](_0xb8f2f4(0xe6)),console[_0xb8f2f4(0x108)]('');try{await startServer(),await checkServerReady(),await startTerminalUI(),await new Promise(()=>{});}catch(_0x1e082e){console[_0xb8f2f4(0x105)]('Error\x20during\x20startup:',_0x1e082e[_0xb8f2f4(0xf5)]),cleanup(),process[_0xb8f2f4(0x112)](0x1);}}main();function a0_0x28b5(){const _0xf849ec=['destroy','SIGINT','🛑\x20Stopping\x20server...','⚠️\x20\x20Server\x20may\x20not\x20be\x20fully\x20ready,\x20but\x20continuing\x20anyway...','1949717eBoZqg','/health','node','║\x20\x20\x20Loxia\x20AI\x20Agents\x20-\x20Server\x20+\x20Terminal\x20UI\x20\x20\x20\x20\x20\x20║','╚════════════════════════════════════════════════╝','toString','ignore','SIGTERM','4wLCGUR','ExperimentalWarning','78MNXOqp','index.js','http://localhost:','35732WFeyRW','[SERVER]\x20','Server\x20returned\x20','\x0a⚠️\x20\x20Received\x20SIGINT,\x20shutting\x20down...','16kvylCH','pipe','message','data','bin','trim','env','\x0a👋\x20Terminal\x20UI\x20closed.','549372ZULHrN','356571ZEdiOM','killed','PORT','stderr','🚀\x20Starting\x20Loxia\x20server...','9153840bDBSpz','Server\x20exited\x20with\x20code\x20','get','loxia-terminal.js','error','🖥️\x20\x20Starting\x20Terminal\x20UI...','includes','log','2213170jzozZK','SIGKILL','╔════════════════════════════════════════════════╗','stdout','Failed\x20to\x20start\x20server:','statusCode','kill','146944sDuNFp','Failed\x20to\x20start\x20Terminal\x20UI:','exit'];a0_0x28b5=function(){return _0xf849ec;};return a0_0x28b5();}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@loxia-labs/loxia-autopilot-one",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "description": "Loxia AI Agents System - No-code/vibe-code/companion-coder platform",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
@@ -63,6 +63,7 @@
63
63
  "stylelint-config-standard": "^39.0.1",
64
64
  "tiktoken": "^1.0.15",
65
65
  "typescript": "^5.9.3",
66
+ "uuid": "^11.1.0",
66
67
  "ws": "^8.16.0"
67
68
  },
68
69
  "jest": {
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- const a0_0xd91e0e=a0_0x3f52;(function(_0x4f74d1,_0x37b7eb){const _0x170bae=a0_0x3f52,_0x3478cb=_0x4f74d1();while(!![]){try{const _0x19876d=-parseInt(_0x170bae(0x197))/0x1*(-parseInt(_0x170bae(0x17a))/0x2)+-parseInt(_0x170bae(0x1b8))/0x3+-parseInt(_0x170bae(0x1a8))/0x4*(-parseInt(_0x170bae(0x19a))/0x5)+-parseInt(_0x170bae(0x18c))/0x6+parseInt(_0x170bae(0x194))/0x7+parseInt(_0x170bae(0x190))/0x8+parseInt(_0x170bae(0x17d))/0x9*(parseInt(_0x170bae(0x181))/0xa);if(_0x19876d===_0x37b7eb)break;else _0x3478cb['push'](_0x3478cb['shift']());}catch(_0x13b3a5){_0x3478cb['push'](_0x3478cb['shift']());}}}(a0_0x5542,0x98991));import{exec}from'child_process';import{promisify}from'util';import a0_0x1da570 from'https';import a0_0x36e13f from'http';import a0_0x3f26ce from'fs';import a0_0x4226c8 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_0x4226c8[a0_0xd91e0e(0x18e)](__filename),SCANNER_DIR=a0_0x4226c8[a0_0xd91e0e(0x1b2)](__dirname,'..',a0_0xd91e0e(0x195),a0_0xd91e0e(0x18a)),SEMGREP_VERSION=a0_0xd91e0e(0x1b1);function a0_0x3f52(_0xc2c20b,_0x5ed607){_0xc2c20b=_0xc2c20b-0x179;const _0x55422c=a0_0x5542();let _0x3f5223=_0x55422c[_0xc2c20b];return _0x3f5223;}console[a0_0xd91e0e(0x1af)](a0_0xd91e0e(0x17b)),console[a0_0xd91e0e(0x1af)]('\x20\x20Installing\x20Security\x20Scanners'),console[a0_0xd91e0e(0x1af)](a0_0xd91e0e(0x188));async function installScanners(){const _0x288d12=a0_0xd91e0e;await a0_0x3f26ce[_0x288d12(0x1a7)]['mkdir'](SCANNER_DIR,{'recursive':!![]}),await checkESLintSecurity(),await installSemgrep(),await installPythonScanners(),console['log']('\x0a═══════════════════════════════════════════════════════════'),console[_0x288d12(0x1af)](_0x288d12(0x1c0)),console[_0x288d12(0x1af)](_0x288d12(0x188));}async function checkESLintSecurity(){const _0xb6beb9=a0_0xd91e0e;console[_0xb6beb9(0x1af)](_0xb6beb9(0x17c));try{await import(_0xb6beb9(0x18f)),console[_0xb6beb9(0x1af)]('\x20\x20\x20✅\x20eslint-plugin-security\x20is\x20installed\x0a');}catch(_0x1c5980){console[_0xb6beb9(0x1af)](_0xb6beb9(0x1a5)),console[_0xb6beb9(0x1af)]('\x20\x20\x20Run:\x20npm\x20install\x20--save-dev\x20eslint-plugin-security\x0a');}}async function installSemgrep(){const _0x4abc82=a0_0xd91e0e;console[_0x4abc82(0x1af)](_0x4abc82(0x196));const _0x287f95=process[_0x4abc82(0x19f)],_0x38c66c=process['arch'];try{const _0x43ceb7=await execAsync(_0x4abc82(0x180),{'timeout':0x1388});console['log'](_0x4abc82(0x1a0)+_0x43ceb7['stdout']['trim']()),console['log'](_0x4abc82(0x1ae));return;}catch(_0xa9a255){console[_0x4abc82(0x1af)](_0x4abc82(0x19d));}const _0x440350=getSemgrepBinaryInfo(_0x287f95,_0x38c66c);if(!_0x440350){console[_0x4abc82(0x1af)](_0x4abc82(0x1ab)+_0x287f95+'-'+_0x38c66c),console[_0x4abc82(0x1af)](_0x4abc82(0x1b3));return;}try{const _0x5625ce=a0_0x4226c8['join'](SCANNER_DIR,_0x4abc82(0x184));console[_0x4abc82(0x1af)](_0x4abc82(0x1c1)+_0x440350['url']+_0x4abc82(0x186)),await downloadFile(_0x440350[_0x4abc82(0x1b4)],_0x5625ce),await a0_0x3f26ce[_0x4abc82(0x1a7)][_0x4abc82(0x1a4)](_0x5625ce,0x1ed),console[_0x4abc82(0x1af)]('\x20\x20\x20✅\x20Semgrep\x20installed\x20successfully'),console[_0x4abc82(0x1af)](_0x4abc82(0x1b9)+_0x5625ce+'\x0a'),console['log']('\x20\x20\x20Note:\x20To\x20use\x20system-wide,\x20add\x20to\x20PATH\x20or\x20install\x20globally:'),console[_0x4abc82(0x1af)](_0x4abc82(0x187));}catch(_0x351e1c){console[_0x4abc82(0x1af)](_0x4abc82(0x1b0)+_0x351e1c[_0x4abc82(0x1b5)]),console[_0x4abc82(0x1af)](_0x4abc82(0x1bd));}}function getSemgrepBinaryInfo(_0x1384b2,_0x5789c2){return null;}function a0_0x5542(){const _0x43eeb2=['\x0aYou\x20can\x20manually\x20install\x20scanners:','location','895QCAkjx','\x20\x20\x20You\x20can\x20install\x20manually:\x20pip\x20install\x20','error','\x20\x20\x20Semgrep\x20not\x20found\x20in\x20PATH,\x20installing\x20standalone\x20binary...','\x20\x20\x20To\x20enable\x20Python\x20scanning,\x20install\x20Python\x20and\x20run:','platform','\x20\x20\x20✅\x20Semgrep\x20already\x20installed:\x20','python3','get','pipe','chmod','\x20\x20\x20⚠️\x20\x20eslint-plugin-security\x20not\x20found','\x20installed\x20successfully','promises','11492NFtUdT','Failed\x20to\x20download:\x20HTTP\x20','https','\x20\x20\x20⚠️\x20\x20No\x20Semgrep\x20binary\x20available\x20for\x20','headers','close','\x20\x20\x20Using\x20system-installed\x20Semgrep\x0a','log','\x20\x20\x20⚠️\x20\x20Failed\x20to\x20install\x20Semgrep:\x20','v1.55.0','join','\x20\x20\x20Please\x20install\x20manually:\x20https://semgrep.dev/docs/getting-started/\x0a','url','message','pip-audit','statusCode','1676073QxhuQH','\x20\x20\x20Location:\x20','🐍\x20Checking\x20Python\x20scanners...','❌\x20Installation\x20failed:','catch','\x20\x20\x20You\x20can\x20install\x20manually:\x20pip\x20install\x20semgrep\x0a','python\x20--version','\x20-m\x20pip\x20show\x20','\x20\x20Installation\x20Complete','\x20\x20\x20Downloading\x20from\x20','exit','2lVNxlb','═══════════════════════════════════════════════════════════','📦\x20Checking\x20ESLint\x20Security\x20Plugin...','403659tJXvLH','\x20-m\x20pip\x20install\x20--user\x20','\x20already\x20installed','semgrep\x20--version','10ZiTVdm','\x20\x20npm\x20install\x20--save-dev\x20eslint-plugin-security','python','semgrep','\x20\x20\x20✅\x20Python\x20found:\x20','...','\x20\x20\x20pip\x20install\x20semgrep\x0a','═══════════════════════════════════════════════════════════\x0a','\x20\x20\x20⚠️\x20\x20Failed\x20to\x20install\x20','.scanners','checkov','6972486QxWmEX','then','dirname','eslint-plugin-security','2818552TpduYQ','startsWith','\x20\x20\x20Installing\x20','\x20\x20\x20✅\x20','1703793VQkKgJ','node_modules','🔍\x20Installing\x20Semgrep...','1190977RYauCp'];a0_0x5542=function(){return _0x43eeb2;};return a0_0x5542();}async function installPythonScanners(){const _0x12c29a=a0_0xd91e0e;console[_0x12c29a(0x1af)](_0x12c29a(0x1ba));let _0x5bc52d=null;try{await execAsync('python3\x20--version',{'timeout':0x1388}),_0x5bc52d=_0x12c29a(0x1a1);}catch(_0x2532f6){try{await execAsync(_0x12c29a(0x1be),{'timeout':0x1388}),_0x5bc52d=_0x12c29a(0x183);}catch(_0x4f8d2d){console[_0x12c29a(0x1af)]('\x20\x20\x20⚠️\x20\x20Python\x20not\x20found\x20-\x20skipping\x20Python\x20scanners'),console[_0x12c29a(0x1af)](_0x12c29a(0x19e)),console[_0x12c29a(0x1af)]('\x20\x20\x20pip\x20install\x20semgrep\x20bandit\x20pip-audit\x20checkov\x20yamllint\x0a');return;}}console['log'](_0x12c29a(0x185)+_0x5bc52d),await installViaPip(_0x12c29a(0x184),_0x5bc52d),await installViaPip('bandit',_0x5bc52d),await installViaPip(_0x12c29a(0x1b6),_0x5bc52d),await installViaPip(_0x12c29a(0x18b),_0x5bc52d),await installViaPip('yamllint',_0x5bc52d),console[_0x12c29a(0x1af)]('');}async function installViaPip(_0x3a7825,_0x4a99bb){const _0x5237f3=a0_0xd91e0e;try{const _0xbc4779=await execAsync(_0x4a99bb+_0x5237f3(0x1bf)+_0x3a7825,{'timeout':0x1388});return console['log'](_0x5237f3(0x193)+_0x3a7825+_0x5237f3(0x17f)),!![];}catch(_0x547c1e){console[_0x5237f3(0x1af)](_0x5237f3(0x192)+_0x3a7825+_0x5237f3(0x186));try{return await execAsync(_0x4a99bb+_0x5237f3(0x17e)+_0x3a7825,{'timeout':0xea60}),console['log'](_0x5237f3(0x193)+_0x3a7825+_0x5237f3(0x1a6)),!![];}catch(_0x363d58){return console['log'](_0x5237f3(0x189)+_0x3a7825+':\x20'+_0x363d58[_0x5237f3(0x1b5)]),console[_0x5237f3(0x1af)](_0x5237f3(0x19b)+_0x3a7825),![];}}}async function downloadFile(_0x37a548,_0x53b753){return new Promise((_0x4d8a1c,_0x1a7776)=>{const _0x4efcc5=a0_0x3f52,_0x44d5da=_0x37a548[_0x4efcc5(0x191)](_0x4efcc5(0x1aa))?a0_0x1da570:a0_0x36e13f;_0x44d5da[_0x4efcc5(0x1a2)](_0x37a548,_0x32f2ec=>{const _0x5dfbe8=_0x4efcc5;if(_0x32f2ec[_0x5dfbe8(0x1b7)]===0x12e||_0x32f2ec[_0x5dfbe8(0x1b7)]===0x12d){downloadFile(_0x32f2ec[_0x5dfbe8(0x1ac)][_0x5dfbe8(0x199)],_0x53b753)[_0x5dfbe8(0x18d)](_0x4d8a1c)[_0x5dfbe8(0x1bc)](_0x1a7776);return;}if(_0x32f2ec[_0x5dfbe8(0x1b7)]!==0xc8){_0x1a7776(new Error(_0x5dfbe8(0x1a9)+_0x32f2ec['statusCode']));return;}const _0x1eda56=createWriteStream(_0x53b753);_0x32f2ec[_0x5dfbe8(0x1a3)](_0x1eda56),_0x1eda56['on']('finish',()=>{const _0x5e7716=_0x5dfbe8;_0x1eda56[_0x5e7716(0x1ad)](),_0x4d8a1c();}),_0x1eda56['on'](_0x5dfbe8(0x19c),_0x2ad452=>{a0_0x3f26ce['unlink'](_0x53b753,()=>{}),_0x1a7776(_0x2ad452);});})['on'](_0x4efcc5(0x19c),_0x1a7776);});}installScanners()['catch'](_0x57b03b=>{const _0x5bb91f=a0_0xd91e0e;console['error'](_0x5bb91f(0x1bb),_0x57b03b[_0x5bb91f(0x1b5)]),console[_0x5bb91f(0x19c)](_0x5bb91f(0x198)),console[_0x5bb91f(0x19c)](_0x5bb91f(0x182)),console[_0x5bb91f(0x19c)]('\x20\x20pip\x20install\x20semgrep\x20bandit\x20pip-audit'),process[_0x5bb91f(0x179)](0x0);});
2
+ const a0_0x570fe3=a0_0x5db4;(function(_0x47e640,_0x195092){const _0x37f2b9=a0_0x5db4,_0x4d1317=_0x47e640();while(!![]){try{const _0x281b76=parseInt(_0x37f2b9(0x20b))/0x1*(-parseInt(_0x37f2b9(0x217))/0x2)+parseInt(_0x37f2b9(0x225))/0x3+parseInt(_0x37f2b9(0x224))/0x4*(-parseInt(_0x37f2b9(0x1f7))/0x5)+parseInt(_0x37f2b9(0x1f3))/0x6*(-parseInt(_0x37f2b9(0x1df))/0x7)+-parseInt(_0x37f2b9(0x208))/0x8+parseInt(_0x37f2b9(0x1f4))/0x9+-parseInt(_0x37f2b9(0x20c))/0xa;if(_0x281b76===_0x195092)break;else _0x4d1317['push'](_0x4d1317['shift']());}catch(_0x34c577){_0x4d1317['push'](_0x4d1317['shift']());}}}(a0_0x34cb,0x43a6c));import{exec}from'child_process';import{promisify}from'util';import a0_0x3a3dea from'https';import a0_0x3bb35b from'http';import a0_0x4aa9b4 from'fs';import a0_0x5805e8 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_0x5805e8[a0_0x570fe3(0x1fe)](__filename),SCANNER_DIR=a0_0x5805e8[a0_0x570fe3(0x1e3)](__dirname,'..','node_modules','.scanners'),SEMGREP_VERSION=a0_0x570fe3(0x1fc);console[a0_0x570fe3(0x223)](a0_0x570fe3(0x1f8)),console[a0_0x570fe3(0x223)](a0_0x570fe3(0x1fa)),console[a0_0x570fe3(0x223)](a0_0x570fe3(0x222));function a0_0x5db4(_0x274527,_0x1161d5){_0x274527=_0x274527-0x1df;const _0x34cb5a=a0_0x34cb();let _0x5db4b4=_0x34cb5a[_0x274527];return _0x5db4b4;}async function installScanners(){const _0x5a3b1e=a0_0x570fe3;await a0_0x4aa9b4[_0x5a3b1e(0x1f0)][_0x5a3b1e(0x207)](SCANNER_DIR,{'recursive':!![]}),await checkESLintSecurity(),await installSemgrep(),await installPythonScanners(),console['log']('\x0a═══════════════════════════════════════════════════════════'),console[_0x5a3b1e(0x223)](_0x5a3b1e(0x1e1)),console[_0x5a3b1e(0x223)](_0x5a3b1e(0x222));}async function checkESLintSecurity(){const _0x94689c=a0_0x570fe3;console[_0x94689c(0x223)](_0x94689c(0x203));try{await import(_0x94689c(0x204)),console[_0x94689c(0x223)](_0x94689c(0x1e0));}catch(_0x1a1cef){console[_0x94689c(0x223)]('\x20\x20\x20⚠️\x20\x20eslint-plugin-security\x20not\x20found'),console[_0x94689c(0x223)](_0x94689c(0x21b));}}async function installSemgrep(){const _0x40b25e=a0_0x570fe3;console[_0x40b25e(0x223)]('🔍\x20Installing\x20Semgrep...');const _0x2150ee=process[_0x40b25e(0x20d)],_0x49f217=process[_0x40b25e(0x213)];try{const _0x4d4658=await execAsync(_0x40b25e(0x206),{'timeout':0x1388});console[_0x40b25e(0x223)](_0x40b25e(0x1f5)+_0x4d4658[_0x40b25e(0x219)]['trim']()),console[_0x40b25e(0x223)]('\x20\x20\x20Using\x20system-installed\x20Semgrep\x0a');return;}catch(_0x237db6){console[_0x40b25e(0x223)](_0x40b25e(0x228));}const _0x18cf18=getSemgrepBinaryInfo(_0x2150ee,_0x49f217);if(!_0x18cf18){console[_0x40b25e(0x223)]('\x20\x20\x20⚠️\x20\x20No\x20Semgrep\x20binary\x20available\x20for\x20'+_0x2150ee+'-'+_0x49f217),console['log'](_0x40b25e(0x1f1));return;}try{const _0x1adfa6=a0_0x5805e8[_0x40b25e(0x1e3)](SCANNER_DIR,_0x40b25e(0x1ec));console[_0x40b25e(0x223)](_0x40b25e(0x20f)+_0x18cf18['url']+_0x40b25e(0x1ee)),await downloadFile(_0x18cf18['url'],_0x1adfa6),await a0_0x4aa9b4[_0x40b25e(0x1f0)][_0x40b25e(0x209)](_0x1adfa6,0x1ed),console[_0x40b25e(0x223)](_0x40b25e(0x200)),console['log'](_0x40b25e(0x1e7)+_0x1adfa6+'\x0a'),console['log'](_0x40b25e(0x1ea)),console['log'](_0x40b25e(0x215));}catch(_0x5e3cd2){console[_0x40b25e(0x223)](_0x40b25e(0x1fb)+_0x5e3cd2[_0x40b25e(0x214)]),console[_0x40b25e(0x223)](_0x40b25e(0x205));}}function a0_0x34cb(){const _0x40c04f=['yamllint','catch','\x20-m\x20pip\x20show\x20','\x20\x20\x20You\x20can\x20install\x20manually:\x20pip\x20install\x20','═══════════════════════════════════════════════════════════\x0a','log','17356ZWLSDg','1385766PRgart','\x20\x20npm\x20install\x20--save-dev\x20eslint-plugin-security','close','\x20\x20\x20Semgrep\x20not\x20found\x20in\x20PATH,\x20installing\x20standalone\x20binary...','7xTQKwa','\x20\x20\x20✅\x20eslint-plugin-security\x20is\x20installed\x0a','\x20\x20Installation\x20Complete','\x20\x20pip\x20install\x20semgrep\x20bandit\x20pip-audit','join','❌\x20Installation\x20failed:','startsWith','Failed\x20to\x20download:\x20HTTP\x20','\x20\x20\x20Location:\x20','python3','\x20\x20\x20pip\x20install\x20semgrep\x20bandit\x20pip-audit\x20checkov\x20yamllint\x0a','\x20\x20\x20Note:\x20To\x20use\x20system-wide,\x20add\x20to\x20PATH\x20or\x20install\x20globally:','bandit','semgrep','\x0aYou\x20can\x20manually\x20install\x20scanners:','...','unlink','promises','\x20\x20\x20Please\x20install\x20manually:\x20https://semgrep.dev/docs/getting-started/\x0a','\x20-m\x20pip\x20install\x20--user\x20','282432lXXpJO','2955357ixrIxp','\x20\x20\x20✅\x20Semgrep\x20already\x20installed:\x20','error','220seyjHO','═══════════════════════════════════════════════════════════','finish','\x20\x20Installing\x20Security\x20Scanners','\x20\x20\x20⚠️\x20\x20Failed\x20to\x20install\x20Semgrep:\x20','v1.55.0','\x20\x20\x20To\x20enable\x20Python\x20scanning,\x20install\x20Python\x20and\x20run:','dirname','\x20\x20\x20Installing\x20','\x20\x20\x20✅\x20Semgrep\x20installed\x20successfully','get','\x20\x20\x20✅\x20','📦\x20Checking\x20ESLint\x20Security\x20Plugin...','eslint-plugin-security','\x20\x20\x20You\x20can\x20install\x20manually:\x20pip\x20install\x20semgrep\x0a','semgrep\x20--version','mkdir','1536496zuMzUQ','chmod','\x20installed\x20successfully','4682dUowCD','456890vgOdGw','platform','checkov','\x20\x20\x20Downloading\x20from\x20','🐍\x20Checking\x20Python\x20scanners...','\x20\x20\x20⚠️\x20\x20Failed\x20to\x20install\x20','pipe','arch','message','\x20\x20\x20pip\x20install\x20semgrep\x0a','then','16cvvpiO','exit','stdout','statusCode','\x20\x20\x20Run:\x20npm\x20install\x20--save-dev\x20eslint-plugin-security\x0a','https','location'];a0_0x34cb=function(){return _0x40c04f;};return a0_0x34cb();}function getSemgrepBinaryInfo(_0x5890fa,_0x115797){return null;}async function installPythonScanners(){const _0x25b35c=a0_0x570fe3;console[_0x25b35c(0x223)](_0x25b35c(0x210));let _0x215e37=null;try{await execAsync('python3\x20--version',{'timeout':0x1388}),_0x215e37=_0x25b35c(0x1e8);}catch(_0x5acdee){try{await execAsync('python\x20--version',{'timeout':0x1388}),_0x215e37='python';}catch(_0x14f825){console[_0x25b35c(0x223)]('\x20\x20\x20⚠️\x20\x20Python\x20not\x20found\x20-\x20skipping\x20Python\x20scanners'),console[_0x25b35c(0x223)](_0x25b35c(0x1fd)),console[_0x25b35c(0x223)](_0x25b35c(0x1e9));return;}}console[_0x25b35c(0x223)]('\x20\x20\x20✅\x20Python\x20found:\x20'+_0x215e37),await installViaPip(_0x25b35c(0x1ec),_0x215e37),await installViaPip(_0x25b35c(0x1eb),_0x215e37),await installViaPip('pip-audit',_0x215e37),await installViaPip(_0x25b35c(0x20e),_0x215e37),await installViaPip(_0x25b35c(0x21e),_0x215e37),console['log']('');}async function installViaPip(_0x42fb33,_0x3c85c1){const _0x295783=a0_0x570fe3;try{const _0xf43ca4=await execAsync(_0x3c85c1+_0x295783(0x220)+_0x42fb33,{'timeout':0x1388});return console['log'](_0x295783(0x202)+_0x42fb33+'\x20already\x20installed'),!![];}catch(_0x219b65){console['log'](_0x295783(0x1ff)+_0x42fb33+_0x295783(0x1ee));try{return await execAsync(_0x3c85c1+_0x295783(0x1f2)+_0x42fb33,{'timeout':0xea60}),console[_0x295783(0x223)](_0x295783(0x202)+_0x42fb33+_0x295783(0x20a)),!![];}catch(_0x50fced){return console[_0x295783(0x223)](_0x295783(0x211)+_0x42fb33+':\x20'+_0x50fced[_0x295783(0x214)]),console[_0x295783(0x223)](_0x295783(0x221)+_0x42fb33),![];}}}async function downloadFile(_0x408a77,_0x2e4133){return new Promise((_0x780847,_0x5a579d)=>{const _0xc9979a=a0_0x5db4,_0xc55ac8=_0x408a77[_0xc9979a(0x1e5)](_0xc9979a(0x21c))?a0_0x3a3dea:a0_0x3bb35b;_0xc55ac8[_0xc9979a(0x201)](_0x408a77,_0x125c43=>{const _0x2781b8=_0xc9979a;if(_0x125c43[_0x2781b8(0x21a)]===0x12e||_0x125c43[_0x2781b8(0x21a)]===0x12d){downloadFile(_0x125c43['headers'][_0x2781b8(0x21d)],_0x2e4133)[_0x2781b8(0x216)](_0x780847)[_0x2781b8(0x21f)](_0x5a579d);return;}if(_0x125c43['statusCode']!==0xc8){_0x5a579d(new Error(_0x2781b8(0x1e6)+_0x125c43[_0x2781b8(0x21a)]));return;}const _0x141344=createWriteStream(_0x2e4133);_0x125c43[_0x2781b8(0x212)](_0x141344),_0x141344['on'](_0x2781b8(0x1f9),()=>{const _0x544536=_0x2781b8;_0x141344[_0x544536(0x227)](),_0x780847();}),_0x141344['on']('error',_0x41121f=>{const _0x523975=_0x2781b8;a0_0x4aa9b4[_0x523975(0x1ef)](_0x2e4133,()=>{}),_0x5a579d(_0x41121f);});})['on'](_0xc9979a(0x1f6),_0x5a579d);});}installScanners()[a0_0x570fe3(0x21f)](_0x4711c1=>{const _0x2f649d=a0_0x570fe3;console[_0x2f649d(0x1f6)](_0x2f649d(0x1e4),_0x4711c1[_0x2f649d(0x214)]),console[_0x2f649d(0x1f6)](_0x2f649d(0x1ed)),console[_0x2f649d(0x1f6)](_0x2f649d(0x226)),console[_0x2f649d(0x1f6)](_0x2f649d(0x1e2)),process[_0x2f649d(0x218)](0x0);});
@@ -1 +1 @@
1
- const a0_0x5836a2=a0_0x54e1;function a0_0x549b(){const _0x2c46a4=['Cg9ZDgnZCY1SzxnZ','u1rzteu','C2nZCW','y2f0zwDVCML6zvn0EwXLBgLUDfj1Bgu','mtq0mteXmeHfu09psa','mtyYodi0ndb1DMfZBgW','D2HPBgu','BwL4Aw4','Cg9ZDgnZCY1Zy3nZ','BgvZCW','y29SDw1U','q0furuDpuLK','BMCTzgvLCa','Aw5JBhvKzq','CMvJB21Tzw5Kzwq','Cg9ZDgnZC1nJC3m','zMLSDgvY','Cg9ZDgnZC0XLC3m','u1Lovefy','BgLUzq','ug9ZDentuYbZEw50yxGGy2HLy2SGCgfZC2vK','zM9YD2fYza','zw5KC1DPDgG','q3nZu3LUDgf4rxjYB3i','y3nZ','Bg9Nz2vY','zgvMyxvSDa','BgvUz3rO','CNvSzq','lMnZCW','y2HLy2TtEw50yxG','Aw5JBhvKzxm','ChjVy2vZCW','zxjYB3i','C2v2zxjPDhK','ntqZntu3Bfr1y3PA','nxrQsK13vW','ndy2mZa0ng9xDKvotq','D2fYBG','Cg9ZDgnZCW','CMvZDwX0CW','BgLUDfn0EwXLCW','q1ntigfUywX5C2LZigzHAwXLza','ntC0odG4CNHLuK9K','u0vwrvjjvfK','m0PQweHZsW','uevsrK9stufoq0u','ndiZodC3nK9Tr1Dtta','C3vWCg9YDhnbDxrVrML4','C3r5BgvSAw50lwnVBMzPzY1ZDgfUzgfYza','ntzTBM5ky2K','ndC4ntaYCM5qr2n2','u3r5BgvSAw50igfUywX5C2LZigzHAwXLza','D2fYBMLUz3m','Dgv4Da','rvjst1i','z2v0u3vWCg9YDgvKrxH0zw5ZAw9UCW','zgv0zwn0tgfUz3vHz2u','yw5HBhL6zq','ChvZAa','zgvIDwC','lMXLC3m','zxH0zw5K','C3r5BgvSAw50','zwXZzq','v0fstKLorW'];a0_0x549b=function(){return _0x2c46a4;};return a0_0x549b();}(function(_0x302181,_0x4f5f34){const _0x1c9d33=a0_0x54e1,_0x5ef55e=_0x302181();while(!![]){try{const _0x2616bc=-parseInt(_0x1c9d33(0x1df))/0x1+parseInt(_0x1c9d33(0x1ef))/0x2*(-parseInt(_0x1c9d33(0x1e9))/0x3)+-parseInt(_0x1c9d33(0x1eb))/0x4*(-parseInt(_0x1c9d33(0x1e0))/0x5)+-parseInt(_0x1c9d33(0x202))/0x6+parseInt(_0x1c9d33(0x1ee))/0x7*(-parseInt(_0x1c9d33(0x1e7))/0x8)+-parseInt(_0x1c9d33(0x1e1))/0x9+parseInt(_0x1c9d33(0x203))/0xa;if(_0x2616bc===_0x4f5f34)break;else _0x5ef55e['push'](_0x5ef55e['shift']());}catch(_0x2b5cb1){_0x5ef55e['push'](_0x5ef55e['shift']());}}}(a0_0x549b,0x8ba25));import{STATIC_ANALYSIS}from'../utilities/constants.js';function a0_0x54e1(_0x1c5464,_0xd10c6c){_0x1c5464=_0x1c5464-0x1da;const _0x549b7e=a0_0x549b();let _0x54e1dc=_0x549b7e[_0x1c5464];if(a0_0x54e1['rwfuhz']===undefined){var _0x480d7f=function(_0x385933){const _0x3d9d97='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x4102ce='',_0xd1c067='';for(let _0x23dc07=0x0,_0x1361df,_0x5a44b7,_0x19d97f=0x0;_0x5a44b7=_0x385933['charAt'](_0x19d97f++);~_0x5a44b7&&(_0x1361df=_0x23dc07%0x4?_0x1361df*0x40+_0x5a44b7:_0x5a44b7,_0x23dc07++%0x4)?_0x4102ce+=String['fromCharCode'](0xff&_0x1361df>>(-0x2*_0x23dc07&0x6)):0x0){_0x5a44b7=_0x3d9d97['indexOf'](_0x5a44b7);}for(let _0xb806ae=0x0,_0xb55b42=_0x4102ce['length'];_0xb806ae<_0xb55b42;_0xb806ae++){_0xd1c067+='%'+('00'+_0x4102ce['charCodeAt'](_0xb806ae)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0xd1c067);};a0_0x54e1['zOzphd']=_0x480d7f,a0_0x54e1['iIPLaf']={},a0_0x54e1['rwfuhz']=!![];}const _0x381656=_0x549b7e[0x0],_0x5cc940=_0x1c5464+_0x381656,_0x5b0f9c=a0_0x54e1['iIPLaf'][_0x5cc940];return!_0x5b0f9c?(_0x54e1dc=a0_0x54e1['zOzphd'](_0x54e1dc),a0_0x54e1['iIPLaf'][_0x5cc940]=_0x54e1dc):_0x54e1dc=_0x5b0f9c,_0x54e1dc;}class CSSAnalyzer{constructor(_0x4102ce=null){const _0x437fa9=a0_0x54e1;this['logger']=_0x4102ce,this['stylelint']=null,this[_0x437fa9(0x1e3)]=null,this['postcssScss']=null,this[_0x437fa9(0x20f)]=null;}async[a0_0x5836a2(0x1f6)](_0xd1c067,_0x23dc07,_0x1361df={}){const _0x29d388=a0_0x5836a2;try{const _0x5a44b7=[],_0x19d97f=this[_0x29d388(0x1f5)](_0xd1c067),_0xb806ae=await this[_0x29d388(0x1da)](_0xd1c067,_0x23dc07,_0x19d97f);_0x5a44b7['push'](..._0xb806ae);if(_0xb806ae[_0x29d388(0x219)]===0x0){const _0xb55b42=await this['lintStyles'](_0xd1c067,_0x23dc07,_0x19d97f);_0x5a44b7['push'](..._0xb55b42);}return this[_0x29d388(0x217)]?.['debug']('CSS\x20analysis\x20completed',{'file':_0xd1c067,'language':_0x19d97f,'totalDiagnostics':_0x5a44b7[_0x29d388(0x219)],'errors':_0x5a44b7['filter'](_0x494380=>_0x494380[_0x29d388(0x1de)]===STATIC_ANALYSIS['SEVERITY']['ERROR'])['length'],'warnings':_0x5a44b7[_0x29d388(0x20e)](_0x29811c=>_0x29811c[_0x29d388(0x1de)]===STATIC_ANALYSIS['SEVERITY'][_0x29d388(0x1fd)])['length']}),_0x5a44b7;}catch(_0x327adb){return this[_0x29d388(0x217)]?.['error'](_0x29d388(0x1e6),{'file':_0xd1c067,'error':_0x327adb['message']}),[];}}async[a0_0x5836a2(0x1da)](_0x32e7e4,_0x3dfcaa,_0x2354ca){const _0x3424ef=a0_0x5836a2,_0x51598d=[];try{if(!this[_0x3424ef(0x1e3)]){const _0xce7db4=await import('postcss');this['postcss']=_0xce7db4['default'];}let _0x542d36=null;if(_0x2354ca==='scss'){if(!this[_0x3424ef(0x20d)]){const _0x50f5e1=await import(_0x3424ef(0x206));this[_0x3424ef(0x20d)]=_0x50f5e1['default'];}_0x542d36=this[_0x3424ef(0x20d)];}else{if(_0x2354ca===_0x3424ef(0x207)){if(!this['postcssLess']){const _0x3f5d62=await import(_0x3424ef(0x1fe));this['postcssLess']=_0x3f5d62[_0x3424ef(0x218)];}_0x542d36=this[_0x3424ef(0x20f)];}}const _0x4d6893=this['postcss']()[_0x3424ef(0x1dc)](_0x3dfcaa,{'from':_0x32e7e4,'syntax':_0x542d36}),_0x53b381=_0x4d6893['root'];this['logger']?.[_0x3424ef(0x1f8)](_0x3424ef(0x212),{'file':_0x32e7e4});}catch(_0x1cf37d){const _0x23c958=this['formatPostCSSError'](_0x1cf37d,_0x32e7e4);_0x23c958&&_0x51598d[_0x3424ef(0x1f7)](_0x23c958);}return _0x51598d;}async[a0_0x5836a2(0x1e5)](_0x3cbc5c,_0x2f676c,_0x534d31){const _0x205257=a0_0x5836a2,_0x40bcec=[];try{if(!this['stylelint']){const _0x1e254b=await import('stylelint');this[_0x205257(0x1fb)]=_0x1e254b['default'];}const _0x3c8276={'extends':[_0x205257(0x1ed)],'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-/',_0x205257(0x20a)]}],'media-feature-name-no-unknown':!![],'at-rule-no-unknown':_0x534d31===_0x205257(0x200)?[!![],{'ignoreAtRules':[_0x205257(0x205),_0x205257(0x20b),_0x205257(0x1fa),'if',_0x205257(0x1fc),'for','each',_0x205257(0x204),'function','return','content','use',_0x205257(0x213)]}]:_0x534d31===_0x205257(0x207)?[!![],{'ignoreAtRules':['plugin']}]:!![],'comment-no-empty':!![],'no-duplicate-selectors':!![],'no-empty-source':null,'block-no-empty':!![],'declaration-block-no-shorthand-property-overrides':!![],'font-family-no-missing-generic-family-keyword':!![],'function-linear-gradient-no-nonstandard-direction':!![],'no-descending-specificity':null,'no-duplicate-at-import-rules':!![],'no-extra-semicolons':!![],'no-invalid-double-slash-comments':!![],'selector-pseudo-element-colon-notation':'double','selector-type-case':'lower'},'customSyntax':_0x534d31==='scss'?_0x205257(0x206):_0x534d31===_0x205257(0x207)?_0x205257(0x1fe):undefined},_0x205644=await this['stylelint']['lint']({'code':_0x2f676c,'codeFilename':_0x3cbc5c,'config':_0x3c8276});if(_0x205644['results']&&_0x205644[_0x205257(0x1e4)][_0x205257(0x219)]>0x0){const _0x1bb9b7=_0x205644['results'][0x0];if(_0x1bb9b7[_0x205257(0x1f1)])for(const _0x5ab2cb of _0x1bb9b7['warnings']){_0x40bcec['push']({'file':_0x3cbc5c,'line':_0x5ab2cb[_0x205257(0x211)]||0x1,'column':_0x5ab2cb[_0x205257(0x208)]||0x1,'severity':_0x5ab2cb['severity']===_0x205257(0x1dd)?STATIC_ANALYSIS['SEVERITY'][_0x205257(0x1f3)]:STATIC_ANALYSIS[_0x205257(0x1e8)]['WARNING'],'rule':_0x5ab2cb['rule']||'unknown','message':_0x5ab2cb[_0x205257(0x1f2)],'category':this['categorizeStylelintRule'](_0x5ab2cb[_0x205257(0x21a)]),'fixable':![],'source':_0x205257(0x1fb)});}}}catch(_0x2bd429){this['logger']?.[_0x205257(0x1e2)](_0x205257(0x1f0),{'file':_0x3cbc5c,'error':_0x2bd429['message']});}return _0x40bcec;}['formatPostCSSError'](_0x3e6834,_0x36a4bd){const _0x17febe=a0_0x5836a2;return{'file':_0x36a4bd,'line':_0x3e6834[_0x17febe(0x211)]||0x1,'column':_0x3e6834[_0x17febe(0x208)]||0x1,'severity':STATIC_ANALYSIS['SEVERITY']['ERROR'],'rule':_0x3e6834['name']||_0x17febe(0x215),'message':_0x3e6834['reason']||_0x3e6834['message'],'category':STATIC_ANALYSIS['CATEGORY']['SYNTAX'],'fixable':![],'source':_0x17febe(0x1e3),'code':_0x3e6834['source']||undefined};}[a0_0x5836a2(0x201)](_0x6e9d4f){const _0x4d6675=a0_0x5836a2;if(!_0x6e9d4f)return STATIC_ANALYSIS['CATEGORY'][_0x4d6675(0x1ff)];const _0x1fc636=_0x6e9d4f['toLowerCase']();if(_0x1fc636['includes']('no-invalid')||_0x1fc636['includes']('no-unknown')||_0x1fc636['includes']('no-empty')||_0x1fc636['includes']('syntax'))return STATIC_ANALYSIS['CATEGORY'][_0x4d6675(0x210)];if(_0x1fc636[_0x4d6675(0x1db)]('performance')||_0x1fc636[_0x4d6675(0x1db)]('optimize'))return STATIC_ANALYSIS['CATEGORY'][_0x4d6675(0x1ea)];if(_0x1fc636[_0x4d6675(0x1db)]('best-practice')||_0x1fc636[_0x4d6675(0x1db)](_0x4d6675(0x20c)))return STATIC_ANALYSIS['CATEGORY']['BEST_PRACTICE'];return STATIC_ANALYSIS[_0x4d6675(0x209)]['STYLE'];}['detectLanguage'](_0x409716){const _0xefefa7=a0_0x5836a2,_0x2e1b2e=_0x409716['toLowerCase']();if(_0x2e1b2e[_0xefefa7(0x214)]('.scss')||_0x2e1b2e[_0xefefa7(0x214)]('.sass'))return'scss';if(_0x2e1b2e[_0xefefa7(0x214)]('.less'))return'less';return _0xefefa7(0x216);}[a0_0x5836a2(0x1f4)](){const _0x41c655=a0_0x5836a2;return[_0x41c655(0x21b),'.scss','.sass',_0x41c655(0x1f9)];}[a0_0x5836a2(0x1ec)](){return![];}}export default CSSAnalyzer;
1
+ const a0_0x3c1b62=a0_0x2137;(function(_0x182bac,_0x50c3ac){const _0x5a187c=a0_0x2137,_0x125a3e=_0x182bac();while(!![]){try{const _0x208023=parseInt(_0x5a187c(0x1df))/0x1+parseInt(_0x5a187c(0x1de))/0x2+-parseInt(_0x5a187c(0x1c8))/0x3*(-parseInt(_0x5a187c(0x1f7))/0x4)+parseInt(_0x5a187c(0x1f9))/0x5*(parseInt(_0x5a187c(0x1f5))/0x6)+parseInt(_0x5a187c(0x1ef))/0x7*(parseInt(_0x5a187c(0x1e4))/0x8)+-parseInt(_0x5a187c(0x1e8))/0x9+-parseInt(_0x5a187c(0x1f2))/0xa*(parseInt(_0x5a187c(0x1cf))/0xb);if(_0x208023===_0x50c3ac)break;else _0x125a3e['push'](_0x125a3e['shift']());}catch(_0x77e2d8){_0x125a3e['push'](_0x125a3e['shift']());}}}(a0_0x3f8b,0x436a7));function a0_0x3f8b(){const _0x143450=['u0vwrvjjvfK','zM9YBwf0ug9ZDentu0vYCM9Y','u1rzteu','yw5HBhL6zq','CNvSzq','BM8TAw52ywXPza','Bg9Nz2vY','B3b0Aw1PEMu','CMvHC29U','D2fYBMLUz3m','Cg9ZDgnZC1nJC3m','C2nZCW','Dg9mB3DLCKnHC2u','lNnHC3m','mZu0otaZru1XAgvt','Aw5JBhvKzxm','y29SDw1U','C3r5BgvSAw50','BgLUzq','CM9VDa','BgLUDfn0EwXLCW','nZu4ndKYovrQDLLyyq','q0furuDpuLK','lNnJC3m','zw5KC1DPDgG','BwvZC2fNzq','ChjVy2vZCW','qKvtvf9quKfdveLdrq','BM8TDw5RBM93BG','y2f0zwDVCML6zvn0EwXLBgLUDfj1Bgu','rvjst1i','CMvZDwX0CW','C3r5BgvSAw50lwnVBMzPzY1ZDgfUzgfYza','ug9ZDentuYbZEw50yxGGy2HLy2SGCgfZC2vK','Bg93zxi','zwXZzq','mZm3nJqYCwzfC29p','mJCZoty0vMHYBNDY','zxH0zw5K','BgvUz3rO','y29UDgvUDa','C3vWCg9YDhnbDxrVrML4','mta5mZuYtNj3DKPQ','u1Lovefy','lMnZCW','uevsrK9stufoq0u','mZq4ndy4m3DZvK9dvG','zwfJAa','BgvZCW','C291CMnL','Cg9ZDgnZC0XLC3m','Cg9ZDgnZCY1SzxnZ','zgvMyxvSDa','mJe3tvHzturQ','Cg9ZDgnZCW','zgvIDwC','mtbPzxzwqu8','zg91yMXL','q3nZu3LUDgf4rxjYB3i','otK4otrXA05Iwgq','BgLUDa','ofjyr3fzDG','y2HLy2TtEw50yxG','nZvpBgfKr2G','ChvZAa','Dgv4Da','BM8Tzw1WDhK','v0fstKLorW','C3LUDgf4','zgv0zwn0tgfUz3vHz2u'];a0_0x3f8b=function(){return _0x143450;};return a0_0x3f8b();}import{STATIC_ANALYSIS}from'../utilities/constants.js';class CSSAnalyzer{constructor(_0x1e8679=null){const _0x820b16=a0_0x2137;this['logger']=_0x1e8679,this[_0x820b16(0x1cb)]=null,this['postcss']=null,this['postcssScss']=null,this[_0x820b16(0x1ec)]=null;}async[a0_0x3c1b62(0x1bd)](_0x584447,_0x26ae36,_0x36eee6={}){const _0x517cb1=a0_0x3c1b62;try{const _0x57a8a8=[],_0x7719b6=this['detectLanguage'](_0x584447),_0x597546=await this[_0x517cb1(0x1f8)](_0x584447,_0x26ae36,_0x7719b6);_0x57a8a8[_0x517cb1(0x1fa)](..._0x597546);if(_0x597546[_0x517cb1(0x1e1)]===0x0){const _0x36880d=await this[_0x517cb1(0x1ce)](_0x584447,_0x26ae36,_0x7719b6);_0x57a8a8['push'](..._0x36880d);}return this[_0x517cb1(0x1c0)]?.['debug']('CSS\x20analysis\x20completed',{'file':_0x584447,'language':_0x7719b6,'totalDiagnostics':_0x57a8a8['length'],'errors':_0x57a8a8['filter'](_0x40927a=>_0x40927a['severity']===STATIC_ANALYSIS[_0x517cb1(0x1ba)][_0x517cb1(0x1d8)])['length'],'warnings':_0x57a8a8['filter'](_0x366c99=>_0x366c99['severity']===STATIC_ANALYSIS[_0x517cb1(0x1ba)][_0x517cb1(0x1fd)])['length']}),_0x57a8a8;}catch(_0x135b9f){return this['logger']?.['error']('CSS\x20analysis\x20failed',{'file':_0x584447,'error':_0x135b9f[_0x517cb1(0x1d3)]}),[];}}async['checkSyntax'](_0x1fc2fb,_0x3fc4db,_0x2b8381){const _0x376f5f=a0_0x3c1b62,_0x514d2a=[];try{if(!this[_0x376f5f(0x1f0)]){const _0xf4ff1a=await import('postcss');this[_0x376f5f(0x1f0)]=_0xf4ff1a[_0x376f5f(0x1ee)];}let _0x43add2=null;if(_0x2b8381==='scss'){if(!this['postcssScss']){const _0x419505=await import('postcss-scss');this[_0x376f5f(0x1c4)]=_0x419505[_0x376f5f(0x1ee)];}_0x43add2=this[_0x376f5f(0x1c4)];}else{if(_0x2b8381===_0x376f5f(0x1ea)){if(!this['postcssLess']){const _0x1238ce=await import('postcss-less');this[_0x376f5f(0x1ec)]=_0x1238ce[_0x376f5f(0x1ee)];}_0x43add2=this['postcssLess'];}}const _0x1ea37b=this['postcss']()[_0x376f5f(0x1d4)](_0x3fc4db,{'from':_0x1fc2fb,'syntax':_0x43add2}),_0x480dc5=_0x1ea37b[_0x376f5f(0x1cd)];this[_0x376f5f(0x1c0)]?.[_0x376f5f(0x1f1)](_0x376f5f(0x1db),{'file':_0x1fc2fb});}catch(_0x367460){const _0x450923=this[_0x376f5f(0x1bb)](_0x367460,_0x1fc2fb);_0x450923&&_0x514d2a[_0x376f5f(0x1fa)](_0x450923);}return _0x514d2a;}async['lintStyles'](_0x4785d9,_0x48314a,_0x386709){const _0x1c14c9=a0_0x3c1b62,_0xd9e7d4=[];try{if(!this['stylelint']){const _0xff9dfb=await import('stylelint');this[_0x1c14c9(0x1cb)]=_0xff9dfb['default'];}const _0xe599a3={'extends':[_0x1c14c9(0x1da)],'rules':{'color-no-invalid-hex':!![],'font-family-no-duplicate-names':!![],'function-calc-no-invalid':!![],'string-no-newline':!![],'unit-no-unknown':!![],'property-no-unknown':!![],'declaration-block-no-duplicate-properties':!![],'selector-pseudo-class-no-unknown':!![],'selector-pseudo-element-no-unknown':!![],'selector-type-no-unknown':[!![],{'ignoreTypes':['/^custom-/','ng-deep']}],'media-feature-name-no-unknown':!![],'at-rule-no-unknown':_0x386709===_0x1c14c9(0x1c5)?[!![],{'ignoreAtRules':['mixin','include',_0x1c14c9(0x1e0),'if',_0x1c14c9(0x1dd),'for',_0x1c14c9(0x1e9),'while','function','return',_0x1c14c9(0x1e2),'use','forward']}]:_0x386709===_0x1c14c9(0x1ea)?[!![],{'ignoreAtRules':['plugin']}]:!![],'comment-no-empty':!![],'no-duplicate-selectors':!![],'no-empty-source':null,'block-no-empty':!![],'declaration-block-no-shorthand-property-overrides':!![],'font-family-no-missing-generic-family-keyword':!![],'function-linear-gradient-no-nonstandard-direction':!![],'no-descending-specificity':null,'no-duplicate-at-import-rules':!![],'no-extra-semicolons':!![],'no-invalid-double-slash-comments':!![],'selector-pseudo-element-colon-notation':_0x1c14c9(0x1f3),'selector-type-case':_0x1c14c9(0x1dc)},'customSyntax':_0x386709==='scss'?'postcss-scss':_0x386709==='less'?_0x1c14c9(0x1ed):undefined},_0x167417=await this[_0x1c14c9(0x1cb)][_0x1c14c9(0x1f6)]({'code':_0x48314a,'codeFilename':_0x4785d9,'config':_0xe599a3});if(_0x167417[_0x1c14c9(0x1d9)]&&_0x167417[_0x1c14c9(0x1d9)][_0x1c14c9(0x1e1)]>0x0){const _0x65de78=_0x167417[_0x1c14c9(0x1d9)][0x0];if(_0x65de78[_0x1c14c9(0x1c3)])for(const _0x3bb61f of _0x65de78['warnings']){_0xd9e7d4[_0x1c14c9(0x1fa)]({'file':_0x4785d9,'line':_0x3bb61f[_0x1c14c9(0x1cc)]||0x1,'column':_0x3bb61f['column']||0x1,'severity':_0x3bb61f['severity']==='error'?STATIC_ANALYSIS[_0x1c14c9(0x1ba)]['ERROR']:STATIC_ANALYSIS['SEVERITY'][_0x1c14c9(0x1fd)],'rule':_0x3bb61f[_0x1c14c9(0x1be)]||'unknown','message':_0x3bb61f[_0x1c14c9(0x1fb)],'category':this[_0x1c14c9(0x1d7)](_0x3bb61f[_0x1c14c9(0x1be)]),'fixable':![],'source':'stylelint'});}}}catch(_0x1c0582){this['logger']?.['warn']('Stylelint\x20analysis\x20failed',{'file':_0x4785d9,'error':_0x1c0582['message']});}return _0xd9e7d4;}['formatPostCSSError'](_0x136ac6,_0x378624){const _0x200c1c=a0_0x3c1b62;return{'file':_0x378624,'line':_0x136ac6[_0x200c1c(0x1cc)]||0x1,'column':_0x136ac6[_0x200c1c(0x1ca)]||0x1,'severity':STATIC_ANALYSIS['SEVERITY']['ERROR'],'rule':_0x136ac6['name']||_0x200c1c(0x1f4),'message':_0x136ac6[_0x200c1c(0x1c2)]||_0x136ac6['message'],'category':STATIC_ANALYSIS['CATEGORY'][_0x200c1c(0x1e5)],'fixable':![],'source':_0x200c1c(0x1f0),'code':_0x136ac6[_0x200c1c(0x1eb)]||undefined};}[a0_0x3c1b62(0x1d7)](_0x55a969){const _0x5eaf48=a0_0x3c1b62;if(!_0x55a969)return STATIC_ANALYSIS['CATEGORY']['STYLE'];const _0x4de4bc=_0x55a969['toLowerCase']();if(_0x4de4bc['includes'](_0x5eaf48(0x1bf))||_0x4de4bc[_0x5eaf48(0x1c9)](_0x5eaf48(0x1d6))||_0x4de4bc['includes'](_0x5eaf48(0x1fc))||_0x4de4bc[_0x5eaf48(0x1c9)](_0x5eaf48(0x1fe)))return STATIC_ANALYSIS[_0x5eaf48(0x1d0)][_0x5eaf48(0x1e5)];if(_0x4de4bc['includes']('performance')||_0x4de4bc['includes'](_0x5eaf48(0x1c1)))return STATIC_ANALYSIS[_0x5eaf48(0x1d0)][_0x5eaf48(0x1e7)];if(_0x4de4bc['includes']('best-practice')||_0x4de4bc[_0x5eaf48(0x1c9)]('recommended'))return STATIC_ANALYSIS['CATEGORY'][_0x5eaf48(0x1d5)];return STATIC_ANALYSIS['CATEGORY'][_0x5eaf48(0x1bc)];}[a0_0x3c1b62(0x1ff)](_0x43167d){const _0x44072f=a0_0x3c1b62,_0x2fc7c3=_0x43167d[_0x44072f(0x1c6)]();if(_0x2fc7c3[_0x44072f(0x1d2)](_0x44072f(0x1d1))||_0x2fc7c3[_0x44072f(0x1d2)]('.sass'))return _0x44072f(0x1c5);if(_0x2fc7c3[_0x44072f(0x1d2)]('.less'))return'less';return'css';}['getSupportedExtensions'](){const _0x4f4279=a0_0x3c1b62;return[_0x4f4279(0x1e6),'.scss',_0x4f4279(0x1c7),'.less'];}[a0_0x3c1b62(0x1e3)](){return![];}}function a0_0x2137(_0x292efe,_0x7b7589){_0x292efe=_0x292efe-0x1ba;const _0x3f8bb6=a0_0x3f8b();let _0x21374d=_0x3f8bb6[_0x292efe];if(a0_0x2137['nTvEVs']===undefined){var _0x3c1455=function(_0x2aa1d4){const _0x4cf79b='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x1e8679='',_0x584447='';for(let _0x26ae36=0x0,_0x36eee6,_0x57a8a8,_0x7719b6=0x0;_0x57a8a8=_0x2aa1d4['charAt'](_0x7719b6++);~_0x57a8a8&&(_0x36eee6=_0x26ae36%0x4?_0x36eee6*0x40+_0x57a8a8:_0x57a8a8,_0x26ae36++%0x4)?_0x1e8679+=String['fromCharCode'](0xff&_0x36eee6>>(-0x2*_0x26ae36&0x6)):0x0){_0x57a8a8=_0x4cf79b['indexOf'](_0x57a8a8);}for(let _0x597546=0x0,_0x36880d=_0x1e8679['length'];_0x597546<_0x36880d;_0x597546++){_0x584447+='%'+('00'+_0x1e8679['charCodeAt'](_0x597546)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x584447);};a0_0x2137['CgeVBw']=_0x3c1455,a0_0x2137['kWgVYh']={},a0_0x2137['nTvEVs']=!![];}const _0x4caa06=_0x3f8bb6[0x0],_0x166c18=_0x292efe+_0x4caa06,_0x1b7423=a0_0x2137['kWgVYh'][_0x166c18];return!_0x1b7423?(_0x21374d=a0_0x2137['CgeVBw'](_0x21374d),a0_0x2137['kWgVYh'][_0x166c18]=_0x21374d):_0x21374d=_0x1b7423,_0x21374d;}export default CSSAnalyzer;
@@ -1 +1 @@
1
- const a0_0x271c1c=a0_0x5021;(function(_0x150aa3,_0x483e44){const _0x3fd058=a0_0x5021,_0x35e91b=_0x150aa3();while(!![]){try{const _0x2eafc8=parseInt(_0x3fd058(0x131))/0x1+-parseInt(_0x3fd058(0x153))/0x2+parseInt(_0x3fd058(0x189))/0x3+-parseInt(_0x3fd058(0x161))/0x4*(parseInt(_0x3fd058(0x142))/0x5)+-parseInt(_0x3fd058(0x16f))/0x6+parseInt(_0x3fd058(0x19b))/0x7+parseInt(_0x3fd058(0x192))/0x8*(parseInt(_0x3fd058(0x134))/0x9);if(_0x2eafc8===_0x483e44)break;else _0x35e91b['push'](_0x35e91b['shift']());}catch(_0xbd959){_0x35e91b['push'](_0x35e91b['shift']());}}}(a0_0x4ada,0x83457));import{exec}from'child_process';import{promisify}from'util';function a0_0x4ada(){const _0x288d8b=['u0vwrvjjvfK','D2fYBG','nde4mdq2m21ct3D6CG','CgfJA2fNzs5QC29UihzHBgLKyxrPB24GzMfPBgvK','zxjYB3i','rMfPBgvKihrVihbHCNnLignOzwnRB3yGB3v0Chv0','CgfJA2fNzs5QC29U','CgLWigLUC3rHBgWGEwfTBgXPBNq','zgv0zwn0qxzHAwXHyMXLvMfSAwrHDg9YCW','y2HLy2TVDG','ANnVBI1Zy2HLBwe','lNLTBa','z2L0AhvIlwfJDgLVBNm','sw52ywXPzcbku09ooIa','AgfKB2XPBNq','zg9JA2vYzMLSzq','Aw5ZDgfUy2vqyxrO','C3rKB3v0','C3bSAxq','sLnptIbJB25MAwD1CMf0Aw9UihzHBgLKyxrPB24','DMfSAwrHDgvzqu1m','nJC5nZmZrKPeAuLh','ANnVBI1WyxjZzq','CMvTzwrPyxrPB24','mtm3nJuYm3Dcq3HIta','ANnVBLnJAgvTyq','y2HLy2TFy2XHC3m','Ew91CI1RzxKTAgvYzq','vxnLigvUDMLYB25Tzw50lxnWzwnPzMLJic5LBNyGzMLSzxmGyw5KigfKzcaUzw52ihrVic5NAxrPz25VCMu','ywP2','yxzHAwXHyMXLu2nHBM5LCNm','DhjPBq','ChvZAa','BwfWq2HLy2TVDLnLDMvYAxr5','Bg9Nz2vY','EwfTBa','zgvIDwC','z2v0sw5ZDgfSBfjLy29TBwvUzgf0Aw9UCW','mtGXodvNruTbrK0','ANnVBG','y29Kzq','vMfSAwrHDgLUzYbJB25MAwCGzMLSzq','vMfSAwrHDgLVBIbPC3n1zsbKzxrLy3rLza','DMfSAwrHDgvxAxrOq2HLy2TVDG','BwvZC2fNzq','zxjYB3jZ','DgvYCMfMB3jT','AgfKB2XPBNqGls1MB3jTyxqGANnVBIaI','rg9JA2vYzMLSzsbSAw50Aw5NigfUzcbIzxn0ihbYywn0AwnLCW','zgLYBMfTzq','v0fstKLorW','DhnJB25MAwCUANnVBG','ug90zw50AwfSigHHCMrJB2rLzca','AgfKB2XPBNqGBM90igf2ywLSywjSzq','BgLUzq','mtCWode2nfbkq0Xxva','zg9JA2vYlwnVBxbVC2uUEw1S','zMLSzq','y29TCgLSzq','C2vJDxjPDhK','DMfSAwrHDgLVBG','AgfYzgnVzgvKlxnLy3jLDa','CgfYC2vdAgvJA292uMvZDwX0CW','BxvZDcbOyxzLihjLCxvPCMvKihbYB3bLCNr5icC','y2HHBMDLBwu','BgvUz3rO','DMfSAwrHDg9Y','AgLNAa','CMvHzezPBgu','odm2wMrrqvn1','DMfSAwrHDgvfBNzgAwXL','Dg9mB3DLCKnHC2u','CgfYyw1Z','yMvZDc1WCMfJDgLJzq','BwfWwwfTBgXPBNrtzxzLCML0Eq','A3vIzxjUzxrLCW','Bgv2zwW','lMDPDgH1yI93B3jRzMXVD3m','igrLDgvJDgvKigLUic5LBNyGzMLSzq','rvjst1i','Dw5RBM93BG','BwfWsgfKB2XPBNrtzxzLCML0Eq','CgfYC2viywrVBgLUDfjLC3vSDhm','mJmXmdC1mgzlswj4uG','rMfPBgvKihrVihbHCNnLigHHzg9SAw50ig91Dhb1Da','BwLZC2LUz1bYB3bLCNr5','CgfYC2u','wufntcbMAwXLihzHBgLKyxrPB24','C2nHBM5LCKnHy2HL','EwfTBgXPBNqGDMfSAwrHDgLVBIbMywLSzwq','ywP2icHku09oifnJAgvTysK','C2v2zxjPDhK','EwfTBgXPBNq','BwvKAxvT','DxrMltG','C3LUDgf4','DhnJB25MAwCUANnVBIb2ywXPzgf0Aw9UigzHAwXLza','y2HLy2TVDIaTlxzLCNnPB24','Aw5JBhvKzxm','EwfTBgXPBNqGzgv0zwn0zwq','BM9YBwfSAxPLuMvZDwX0CW','zMLSzv9SAw5Lx3jHBMDL','y2HLy2TFAwq','C3rYAwn0lw1Vzgu','C3rYAw5N','CgLWigLUC3rHBgWGy2HLy2TVDG','zMfPBgvKx2nOzwnRCW','AgfKB2XPBNqGDMfSAwrHDgLVBIbMywLSzwq','C3rHCNrZv2L0Aa','mJqWmZCZmKrZCvv4uW','CNvSzq','qvDtignYzwrLBNrPywXZ','zgv0zwn0rMLSzvr5Cgu','lNrM','lNrMDMfYCW','zg9JA2vYlwnVBxbVC2u','CMvZDwX0CW','B2jQzwn0','mJr6CMjbsLK','z3vPzgvSAw5L','CgfYC2vzyw1SBgLUDfjLC3vSDhm','ywP2lwzVCM1HDhm','C3rYAwn0','lNLHBwW','zw52lxzHBgLKyxrVCG'];a0_0x4ada=function(){return _0x288d8b;};return a0_0x4ada();}import a0_0x93ea92 from'path';import a0_0x110e41 from'fs/promises';import{STATIC_ANALYSIS}from'../utilities/constants.js';const execAsync=promisify(exec);class ConfigValidator{constructor(_0x40cb36=null){const _0x56703c=a0_0x5021;this['logger']=_0x40cb36,this[_0x56703c(0x13a)]=null,this[_0x56703c(0x174)]=new Map();}async[a0_0x271c1c(0x124)](){const _0x1d5fa0=a0_0x271c1c;if(this['availableScanners']!==null)return this[_0x1d5fa0(0x13a)];const _0x55ed33={'checkov':![],'hadolint':![],'yamllint':![],'jsonSchema':![]};try{await execAsync(_0x1d5fa0(0x17d),{'timeout':0x1388}),_0x55ed33['checkov']=!![],this[_0x1d5fa0(0x13e)]?.['debug']('checkov\x20detected');}catch(_0x1a6027){this[_0x1d5fa0(0x13e)]?.[_0x1d5fa0(0x140)]('checkov\x20not\x20available',{'error':_0x1a6027[_0x1d5fa0(0x148)]});}try{await execAsync('hadolint\x20--version',{'timeout':0x1388}),_0x55ed33[_0x1d5fa0(0x12a)]=!![],this[_0x1d5fa0(0x13e)]?.[_0x1d5fa0(0x140)]('hadolint\x20detected');}catch(_0x1e12ae){this['logger']?.['debug'](_0x1d5fa0(0x151),{'error':_0x1e12ae[_0x1d5fa0(0x148)]});}try{await execAsync('yamllint\x20--version',{'timeout':0x1388}),_0x55ed33[_0x1d5fa0(0x178)]=!![],this['logger']?.['debug'](_0x1d5fa0(0x17f));}catch(_0x3fac13){this['logger']?.['debug']('yamllint\x20not\x20available',{'error':_0x3fac13[_0x1d5fa0(0x148)]});}try{await import(_0x1d5fa0(0x139)),_0x55ed33['jsonSchema']=!![],this['logger']?.[_0x1d5fa0(0x140)]('JSON\x20Schema\x20validation\x20available');}catch(_0xb494e0){this['logger']?.['debug']('ajv\x20not\x20available',{'error':_0xb494e0[_0x1d5fa0(0x148)]});}return this[_0x1d5fa0(0x13a)]=_0x55ed33,_0x55ed33;}async['validate'](_0x188ab1,_0x563622={}){const _0x5c2ad7=a0_0x271c1c,_0x291894=[],_0x5d68eb=await this['detectAvailableValidators'](),_0x5bfd30=this[_0x5c2ad7(0x18c)](_0x188ab1);this['logger']?.[_0x5c2ad7(0x140)](_0x5c2ad7(0x145),{'filePath':_0x188ab1,'fileType':_0x5bfd30});switch(_0x5bfd30){case'dockerfile':if(_0x5d68eb['hadolint']){const _0x16f097=await this['validateDockerfile'](_0x188ab1,_0x563622);_0x291894[_0x5c2ad7(0x13c)](..._0x16f097);}if(_0x5d68eb['checkov']){const _0x49f71c=await this['validateWithCheckov'](_0x188ab1,'dockerfile',_0x563622);_0x291894['push'](..._0x49f71c);}break;case _0x5c2ad7(0x18f):if(_0x5d68eb[_0x5c2ad7(0x178)]){const _0x387b8d=await this[_0x5c2ad7(0x130)](_0x188ab1,_0x563622);_0x291894[_0x5c2ad7(0x13c)](..._0x387b8d);}if(_0x5d68eb[_0x5c2ad7(0x125)]){const _0x59ed27=await this['validateWithCheckov'](_0x188ab1,'docker_compose',_0x563622);_0x291894[_0x5c2ad7(0x13c)](..._0x59ed27);}break;case _0x5c2ad7(0x167):if(_0x5d68eb['yamllint']){const _0x30fc38=await this[_0x5c2ad7(0x130)](_0x188ab1,_0x563622);_0x291894[_0x5c2ad7(0x13c)](..._0x30fc38);}if(_0x5d68eb['checkov']){const _0x1bc14e=await this[_0x5c2ad7(0x147)](_0x188ab1,_0x5c2ad7(0x167),_0x563622);_0x291894[_0x5c2ad7(0x13c)](..._0x1bc14e);}break;case'terraform':if(_0x5d68eb['checkov']){const _0x3a2b32=await this[_0x5c2ad7(0x147)](_0x188ab1,'terraform',_0x563622);_0x291894[_0x5c2ad7(0x13c)](..._0x3a2b32);}break;case _0x5c2ad7(0x122):if(_0x5d68eb[_0x5c2ad7(0x135)]){const _0x9ca265=await this['validatePackageJson'](_0x188ab1,_0x563622);_0x291894[_0x5c2ad7(0x13c)](..._0x9ca265);}break;case _0x5c2ad7(0x14f):if(_0x5d68eb['jsonSchema']){const _0x520947=await this['validateTsConfig'](_0x188ab1,_0x563622);_0x291894[_0x5c2ad7(0x13c)](..._0x520947);}break;case _0x5c2ad7(0x128):if(_0x5d68eb['yamllint']){const _0x38f97b=await this[_0x5c2ad7(0x130)](_0x188ab1,_0x563622);_0x291894[_0x5c2ad7(0x13c)](..._0x38f97b);}break;case'env':const _0x4fcc23=await this[_0x5c2ad7(0x162)](_0x188ab1,_0x563622);_0x291894['push'](..._0x4fcc23);break;case'yaml':if(_0x5d68eb[_0x5c2ad7(0x178)]){const _0x235ee0=await this[_0x5c2ad7(0x130)](_0x188ab1,_0x563622);_0x291894[_0x5c2ad7(0x13c)](..._0x235ee0);}break;default:this[_0x5c2ad7(0x13e)]?.[_0x5c2ad7(0x19a)]('Unknown\x20config\x20file\x20type',{'filePath':_0x188ab1,'fileType':_0x5bfd30});return[];}return this['normalizeResults'](_0x291894);}async['validateDockerfile'](_0x9577e3,_0x2394e3={}){const _0xd8a849=a0_0x271c1c;try{const _0x28b04f=await execAsync(_0xd8a849(0x14b)+_0x9577e3+'\x22',{'maxBuffer':0xa*0x400*0x400,'timeout':0x7530}),_0x248246=JSON[_0xd8a849(0x172)](_0x28b04f['stdout']);return this[_0xd8a849(0x16e)](_0x248246,_0x9577e3);}catch(_0x5f1360){if(_0x5f1360['stdout'])try{const _0x1e7d03=JSON[_0xd8a849(0x172)](_0x5f1360['stdout']);return this[_0xd8a849(0x16e)](_0x1e7d03,_0x9577e3);}catch(_0x5aa668){this[_0xd8a849(0x13e)]?.[_0xd8a849(0x19d)](_0xd8a849(0x170),{'error':_0x5aa668['message']});}return this[_0xd8a849(0x13e)]?.['error'](_0xd8a849(0x187),{'error':_0x5f1360['message']}),[];}}[a0_0x271c1c(0x16e)](_0x151185,_0x4cf6b1){const _0x59ed34=a0_0x271c1c,_0x578758=[];if(Array['isArray'](_0x151185))for(const _0x5b688f of _0x151185){_0x578758[_0x59ed34(0x13c)]({'file':_0x4cf6b1,'line':_0x5b688f[_0x59ed34(0x152)]||0x1,'column':_0x5b688f['column']||0x1,'severity':this[_0x59ed34(0x16d)](_0x5b688f[_0x59ed34(0x168)]),'rule':_0x5b688f[_0x59ed34(0x144)],'message':_0x5b688f[_0x59ed34(0x148)],'category':'dockerfile','validator':_0x59ed34(0x12a)});}return _0x578758;}async['validateYAML'](_0x290904,_0x2d8d3f={}){const _0x385f1e=a0_0x271c1c;try{const _0x245937=await execAsync('yamllint\x20-f\x20parsable\x20\x22'+_0x290904+'\x22',{'maxBuffer':0xa*0x400*0x400,'timeout':0x7530});return this[_0x385f1e(0x194)](_0x245937[_0x385f1e(0x12d)],_0x290904);}catch(_0x38ff87){if(_0x38ff87['stdout'])return this['parseYamllintResults'](_0x38ff87[_0x385f1e(0x12d)],_0x290904);return this['logger']?.[_0x385f1e(0x19d)](_0x385f1e(0x175),{'error':_0x38ff87[_0x385f1e(0x148)]}),[];}}['parseYamllintResults'](_0x2a0aa8,_0x20f3b4){const _0x4696a2=a0_0x271c1c,_0x4ca861=[],_0x3e36c3=_0x2a0aa8[_0x4696a2(0x12e)]('\x0a')['filter'](_0x4919b2=>_0x4919b2[_0x4696a2(0x13b)]());for(const _0x525979 of _0x3e36c3){const _0x57481a=_0x525979['match'](/^(.+?):(\d+):(\d+):\s*\[(\w+)\]\s*(.+?)\s*\((.+?)\)/);if(_0x57481a){const [,_0x4bdc0e,_0xa53462,_0x3dd132,_0x2a7a59,_0x43a980,_0x2594a7]=_0x57481a;_0x4ca861['push']({'file':_0x20f3b4,'line':parseInt(_0xa53462,0xa),'column':parseInt(_0x3dd132,0xa),'severity':this[_0x4696a2(0x166)](_0x2a7a59),'rule':_0x2594a7,'message':_0x43a980,'category':'yaml','validator':'yamllint'});}}return _0x4ca861;}async[a0_0x271c1c(0x147)](_0x48d896,_0x54ab1c,_0x289402={}){const _0x202575=a0_0x271c1c;try{const _0x41fee9=await execAsync('checkov\x20-f\x20\x22'+_0x48d896+'\x22\x20--framework\x20'+_0x54ab1c+'\x20--output\x20json\x20--compact',{'maxBuffer':0xa*0x400*0x400,'timeout':0xea60}),_0x554e8d=JSON[_0x202575(0x172)](_0x41fee9[_0x202575(0x12d)]);return this[_0x202575(0x15a)](_0x554e8d,_0x48d896);}catch(_0x8dcb7a){if(_0x8dcb7a['stdout'])try{const _0xf71fad=JSON[_0x202575(0x172)](_0x8dcb7a['stdout']);return this['parseCheckovResults'](_0xf71fad,_0x48d896);}catch(_0x8bbe2d){this['logger']?.[_0x202575(0x19d)](_0x202575(0x121),{'error':_0x8bbe2d[_0x202575(0x148)]});}return this[_0x202575(0x13e)]?.[_0x202575(0x19d)]('checkov\x20validation\x20failed',{'error':_0x8dcb7a[_0x202575(0x148)]}),[];}}[a0_0x271c1c(0x15a)](_0x4009dc,_0xe45095){const _0x11f162=a0_0x271c1c,_0x19125e=[];if(_0x4009dc['results']&&_0x4009dc['results'][_0x11f162(0x186)])for(const _0x2b627e of _0x4009dc[_0x11f162(0x190)][_0x11f162(0x186)]){_0x19125e[_0x11f162(0x13c)]({'file':_0xe45095,'line':_0x2b627e['file_line_range']?_0x2b627e[_0x11f162(0x181)][0x0]:0x1,'column':0x1,'severity':this[_0x11f162(0x13d)](_0x2b627e[_0x11f162(0x136)]),'rule':_0x2b627e['check_id'],'message':_0x2b627e['check_name']||_0x2b627e[_0x11f162(0x182)],'category':_0x11f162(0x157),'validator':'checkov','remediation':_0x2b627e[_0x11f162(0x193)],'cwe':_0x2b627e['cwe'],'references':_0x2b627e[_0x11f162(0x193)]?[_0x2b627e['guideline']]:[]});}return _0x19125e;}async['validatePackageJson'](_0x99a87f,_0x319cd9={}){const _0x4902b3=a0_0x271c1c;try{const _0x44ae93=(await import(_0x4902b3(0x139)))['default'],_0x27c9f=(await import(_0x4902b3(0x195)))['default'],_0x22a26e=await a0_0x110e41['readFile'](_0x99a87f,'utf-8'),_0x9caa7c=JSON[_0x4902b3(0x172)](_0x22a26e),_0x421efd=new _0x44ae93({'allErrors':!![],'strict':![]});_0x27c9f(_0x421efd);const _0x4a88bd={'type':'object','required':['name','version'],'properties':{'name':{'type':_0x4902b3(0x184),'pattern':'^(?:@[a-z0-9-~][a-z0-9-._~]*/)?[a-z0-9-~][a-z0-9-._~]*$'},'version':{'type':'string'},'description':{'type':'string'},'main':{'type':_0x4902b3(0x184)},'type':{'type':'string','enum':['module','commonjs']},'scripts':{'type':_0x4902b3(0x191)},'dependencies':{'type':'object'},'devDependencies':{'type':'object'}},'additionalProperties':!![]},_0x117cc3=_0x421efd[_0x4902b3(0x156)](_0x4a88bd),_0x1599e6=_0x117cc3(_0x9caa7c);if(!_0x1599e6&&_0x117cc3['errors'])return _0x117cc3[_0x4902b3(0x149)]['map'](_0x45bab5=>({'file':_0x99a87f,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS['SEVERITY'][_0x4902b3(0x16b)],'rule':_0x4902b3(0x126),'message':_0x45bab5[_0x4902b3(0x12c)]?_0x45bab5['instancePath']+'\x20'+_0x45bab5[_0x4902b3(0x148)]:_0x4902b3(0x15b)+_0x45bab5[_0x4902b3(0x164)][_0x4902b3(0x171)]+'\x27','category':_0x4902b3(0x158),'validator':'json-schema'}));return[];}catch(_0x10fe52){return this[_0x4902b3(0x13e)]?.[_0x4902b3(0x19d)](_0x4902b3(0x19c),{'error':_0x10fe52['message']}),[{'file':_0x99a87f,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS[_0x4902b3(0x199)]['ERROR'],'rule':'json-parse','message':_0x4902b3(0x129)+_0x10fe52['message'],'category':_0x4902b3(0x17b),'validator':_0x4902b3(0x132)}];}}async['validateTsConfig'](_0x357c41,_0x41bc21={}){const _0x3e3687=a0_0x271c1c;try{const _0x4cebac=await a0_0x110e41[_0x3e3687(0x160)](_0x357c41,_0x3e3687(0x17a)),_0x30e347=JSON[_0x3e3687(0x172)](_0x4cebac),_0x1dbcdf=[];if(_0x30e347['compilerOptions']){const _0xbb4db1=_0x30e347['compilerOptions'];!_0xbb4db1[_0x3e3687(0x196)]&&_0x1dbcdf[_0x3e3687(0x13c)]({'file':_0x357c41,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS['SEVERITY']['WARNING'],'rule':_0x3e3687(0x183),'message':'Consider\x20enabling\x20\x22strict\x22\x20mode\x20for\x20better\x20type\x20safety','category':_0x3e3687(0x165),'validator':'tsconfig-validator'}),_0xbb4db1['noImplicitAny']===![]&&_0x1dbcdf[_0x3e3687(0x13c)]({'file':_0x357c41,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS['SEVERITY'][_0x3e3687(0x14e)],'rule':'no-implicit-any','message':'Disabling\x20noImplicitAny\x20reduces\x20type\x20safety','category':'best-practice','validator':'tsconfig-validator'});}return _0x1dbcdf;}catch(_0x254da7){return this[_0x3e3687(0x13e)]?.[_0x3e3687(0x19d)](_0x3e3687(0x17c),{'error':_0x254da7['message']}),[{'file':_0x357c41,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS[_0x3e3687(0x199)][_0x3e3687(0x16b)],'rule':_0x3e3687(0x132),'message':_0x3e3687(0x129)+_0x254da7[_0x3e3687(0x148)],'category':_0x3e3687(0x17b),'validator':'json-parse'}];}}async[a0_0x271c1c(0x162)](_0x159fcd,_0x44c65b={}){const _0x364880=a0_0x271c1c;try{const _0x3da7ca=await a0_0x110e41['readFile'](_0x159fcd,_0x364880(0x17a)),_0x2448d0=[],_0x2e9558=_0x3da7ca['split']('\x0a'),_0x5d904c=[{'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':_0x364880(0x18b)}];return _0x2e9558['forEach']((_0x10d18a,_0x4c0113)=>{const _0x2f1145=_0x364880,_0x1e221d=_0x10d18a[_0x2f1145(0x13b)]();if(!_0x1e221d||_0x1e221d['startsWith']('#'))return;if(_0x1e221d[_0x2f1145(0x17e)]('=')){const [_0x3e6bec,_0x54a176]=_0x1e221d[_0x2f1145(0x12e)]('='),_0x2c5db5=_0x3e6bec['toLowerCase'](),_0x305bd2=_0x54a176?.[_0x2f1145(0x13b)]()||'',_0x22f52a=_0x305bd2&&_0x305bd2!==''&&!_0x305bd2[_0x2f1145(0x188)]('$')&&_0x305bd2!==_0x2f1145(0x137)&&_0x305bd2!==_0x2f1145(0x15c)&&_0x305bd2[_0x2f1145(0x15d)]>0x5;if(_0x22f52a)for(const {pattern:_0x1c11eb,name:_0x52ba33}of _0x5d904c){if(_0x1c11eb['test'](_0x2c5db5)){_0x2448d0[_0x2f1145(0x13c)]({'file':_0x159fcd,'line':_0x4c0113+0x1,'column':0x1,'severity':STATIC_ANALYSIS[_0x2f1145(0x199)]['CRITICAL'],'rule':_0x2f1145(0x159),'message':_0x2f1145(0x150)+_0x52ba33+_0x2f1145(0x16a),'category':'security','validator':_0x2f1145(0x198),'remediation':_0x2f1145(0x138)});break;}}}}),_0x2448d0;}catch(_0x2b68ba){return this['logger']?.['error']('.env\x20validation\x20failed',{'error':_0x2b68ba['message']}),[];}}[a0_0x271c1c(0x18c)](_0x2a2f02){const _0x5e3951=a0_0x271c1c,_0x56546a=a0_0x93ea92['basename'](_0x2a2f02)[_0x5e3951(0x163)](),_0x5ecc41=a0_0x93ea92[_0x5e3951(0x14d)](_0x2a2f02);if(_0x56546a==='dockerfile')return _0x5e3951(0x12b);if(_0x56546a===_0x5e3951(0x154)||_0x56546a==='docker-compose.yaml')return'docker-compose';if(_0x56546a===_0x5e3951(0x122))return'package.json';if(_0x56546a==='tsconfig.json')return'tsconfig.json';if(_0x56546a==='.env'||_0x56546a['endsWith']('.env'))return'env';if(_0x5ecc41[_0x5e3951(0x17e)](_0x5e3951(0x169)))return _0x5e3951(0x128);if(_0x5ecc41[_0x5e3951(0x17e)]('kubernetes')||_0x5ecc41[_0x5e3951(0x17e)]('k8s'))return _0x5e3951(0x167);const _0x5e9b88=a0_0x93ea92['extname'](_0x2a2f02)[_0x5e3951(0x163)]();if(_0x5e9b88===_0x5e3951(0x18d)||_0x5e9b88===_0x5e3951(0x18e))return _0x5e3951(0x14a);if(_0x5e9b88===_0x5e3951(0x127)||_0x5e9b88===_0x5e3951(0x197))return _0x5e3951(0x13f);if(_0x5e9b88==='.json')return _0x5e3951(0x143);return _0x5e3951(0x16c);}[a0_0x271c1c(0x180)](_0x4b4264){const _0x7f6348=a0_0x271c1c;return _0x4b4264['map'](_0x2469f7=>({'file':_0x2469f7[_0x7f6348(0x155)],'line':_0x2469f7[_0x7f6348(0x152)]||0x1,'column':_0x2469f7['column']||0x1,'severity':_0x2469f7[_0x7f6348(0x177)]||STATIC_ANALYSIS['SEVERITY'][_0x7f6348(0x14e)],'rule':_0x2469f7[_0x7f6348(0x18a)]||_0x7f6348(0x16c),'message':_0x2469f7[_0x7f6348(0x148)]||_0x7f6348(0x146),'category':_0x2469f7['category']||_0x7f6348(0x158),'validator':_0x2469f7[_0x7f6348(0x15e)],'cwe':_0x2469f7['cwe']||null,'remediation':_0x2469f7[_0x7f6348(0x133)]||null,'references':_0x2469f7['references']||[]}));}['mapHadolintSeverity'](_0xc2cdbc){const _0x109218=a0_0x271c1c,_0x1e8ac4={'error':STATIC_ANALYSIS[_0x109218(0x199)]['ERROR'],'warning':STATIC_ANALYSIS[_0x109218(0x199)][_0x109218(0x14e)],'info':STATIC_ANALYSIS[_0x109218(0x199)]['INFO'],'style':STATIC_ANALYSIS['SEVERITY']['INFO']};return _0x1e8ac4[_0xc2cdbc?.['toLowerCase']()]||STATIC_ANALYSIS['SEVERITY']['WARNING'];}['mapYamllintSeverity'](_0x2e9f96){const _0x5cfb55=a0_0x271c1c,_0x2a0b46={'error':STATIC_ANALYSIS[_0x5cfb55(0x199)][_0x5cfb55(0x16b)],'warning':STATIC_ANALYSIS[_0x5cfb55(0x199)]['WARNING']};return _0x2a0b46[_0x2e9f96?.[_0x5cfb55(0x163)]()]||STATIC_ANALYSIS['SEVERITY']['WARNING'];}['mapCheckovSeverity'](_0x2565df){const _0x551de5=a0_0x271c1c;return STATIC_ANALYSIS['SEVERITY'][_0x551de5(0x16b)];}async['getValidatorStatus'](){const _0x52bd9f=a0_0x271c1c,_0x5512a8=await this[_0x52bd9f(0x124)]();return{'validators':_0x5512a8,'recommendations':this['getInstallRecommendations'](_0x5512a8)};}[a0_0x271c1c(0x141)](_0x235060){const _0x3cfe23=a0_0x271c1c,_0x2219a4=[];return!_0x235060[_0x3cfe23(0x125)]&&_0x2219a4['push']({'validator':_0x3cfe23(0x125),'reason':'Infrastructure\x20as\x20Code\x20security\x20scanning\x20(Docker,\x20Kubernetes,\x20Terraform)','install':_0x3cfe23(0x185),'priority':_0x3cfe23(0x15f)}),!_0x235060[_0x3cfe23(0x12a)]&&_0x2219a4[_0x3cfe23(0x13c)]({'validator':_0x3cfe23(0x12a),'reason':_0x3cfe23(0x14c),'install':'Download from https://github.com/hadolint/hadolint/releases','priority':'high'}),!_0x235060[_0x3cfe23(0x178)]&&_0x2219a4[_0x3cfe23(0x13c)]({'validator':'yamllint','reason':_0x3cfe23(0x173),'install':_0x3cfe23(0x123),'priority':_0x3cfe23(0x179)}),!_0x235060['jsonSchema']&&_0x2219a4['push']({'validator':_0x3cfe23(0x176),'reason':_0x3cfe23(0x12f),'install':'npm\x20install\x20ajv\x20ajv-formats','priority':'medium'}),_0x2219a4;}}function a0_0x5021(_0x3396ca,_0x5c3ac4){_0x3396ca=_0x3396ca-0x121;const _0x4ada90=a0_0x4ada();let _0x50214b=_0x4ada90[_0x3396ca];if(a0_0x5021['VFySla']===undefined){var _0x1d674f=function(_0x3ef6a6){const _0x47f929='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x93ea92='',_0x110e41='';for(let _0x40cb36=0x0,_0x55ed33,_0x1a6027,_0x1e12ae=0x0;_0x1a6027=_0x3ef6a6['charAt'](_0x1e12ae++);~_0x1a6027&&(_0x55ed33=_0x40cb36%0x4?_0x55ed33*0x40+_0x1a6027:_0x1a6027,_0x40cb36++%0x4)?_0x93ea92+=String['fromCharCode'](0xff&_0x55ed33>>(-0x2*_0x40cb36&0x6)):0x0){_0x1a6027=_0x47f929['indexOf'](_0x1a6027);}for(let _0x3fac13=0x0,_0xb494e0=_0x93ea92['length'];_0x3fac13<_0xb494e0;_0x3fac13++){_0x110e41+='%'+('00'+_0x93ea92['charCodeAt'](_0x3fac13)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x110e41);};a0_0x5021['JqVOCZ']=_0x1d674f,a0_0x5021['eBVWXp']={},a0_0x5021['VFySla']=!![];}const _0x2ac695=_0x4ada90[0x0],_0x40356a=_0x3396ca+_0x2ac695,_0x471e62=a0_0x5021['eBVWXp'][_0x40356a];return!_0x471e62?(_0x50214b=a0_0x5021['JqVOCZ'](_0x50214b),a0_0x5021['eBVWXp'][_0x40356a]=_0x50214b):_0x50214b=_0x471e62,_0x50214b;}export default ConfigValidator;
1
+ const a0_0x586458=a0_0x5e58;(function(_0x35c3cd,_0x3c549e){const _0x3644b3=a0_0x5e58,_0x151018=_0x35c3cd();while(!![]){try{const _0x56dc0a=-parseInt(_0x3644b3(0x104))/0x1+parseInt(_0x3644b3(0x11f))/0x2+parseInt(_0x3644b3(0xcc))/0x3+parseInt(_0x3644b3(0xb3))/0x4*(parseInt(_0x3644b3(0xc0))/0x5)+parseInt(_0x3644b3(0x123))/0x6+parseInt(_0x3644b3(0xef))/0x7+-parseInt(_0x3644b3(0xd5))/0x8*(parseInt(_0x3644b3(0xc9))/0x9);if(_0x56dc0a===_0x3c549e)break;else _0x151018['push'](_0x151018['shift']());}catch(_0x45cef7){_0x151018['push'](_0x151018['shift']());}}}(a0_0x3982,0x99c19));function a0_0x5e58(_0x3353b0,_0x35e7fd){_0x3353b0=_0x3353b0-0xb1;const _0x39823a=a0_0x3982();let _0x5e584e=_0x39823a[_0x3353b0];if(a0_0x5e58['Vrotfd']===undefined){var _0x2b98d4=function(_0x4cb4f9){const _0x39b724='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x278bd0='',_0x2551d8='';for(let _0x45eaa1=0x0,_0x276455,_0x31c172,_0x3094d2=0x0;_0x31c172=_0x4cb4f9['charAt'](_0x3094d2++);~_0x31c172&&(_0x276455=_0x45eaa1%0x4?_0x276455*0x40+_0x31c172:_0x31c172,_0x45eaa1++%0x4)?_0x278bd0+=String['fromCharCode'](0xff&_0x276455>>(-0x2*_0x45eaa1&0x6)):0x0){_0x31c172=_0x39b724['indexOf'](_0x31c172);}for(let _0x1b895f=0x0,_0x46bed4=_0x278bd0['length'];_0x1b895f<_0x46bed4;_0x1b895f++){_0x2551d8+='%'+('00'+_0x278bd0['charCodeAt'](_0x1b895f)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x2551d8);};a0_0x5e58['kZNAMi']=_0x2b98d4,a0_0x5e58['pyFUaE']={},a0_0x5e58['Vrotfd']=!![];}const _0x2e447a=_0x39823a[0x0],_0xacbb97=_0x3353b0+_0x2e447a,_0x1d7a82=a0_0x5e58['pyFUaE'][_0xacbb97];return!_0x1d7a82?(_0x5e584e=a0_0x5e58['kZNAMi'](_0x5e584e),a0_0x5e58['pyFUaE'][_0xacbb97]=_0x5e584e):_0x5e584e=_0x1d7a82,_0x5e584e;}import{exec}from'child_process';import{promisify}from'util';import a0_0x278bd0 from'path';import a0_0x2551d8 from'fs/promises';import{STATIC_ANALYSIS}from'../utilities/constants.js';const execAsync=promisify(exec);class ConfigValidator{constructor(_0x45eaa1=null){const _0x3ff73a=a0_0x5e58;this[_0x3ff73a(0x114)]=_0x45eaa1,this['availableScanners']=null,this[_0x3ff73a(0xc3)]=new Map();}async['detectAvailableValidators'](){const _0x2cbeb2=a0_0x5e58;if(this[_0x2cbeb2(0xee)]!==null)return this['availableScanners'];const _0x276455={'checkov':![],'hadolint':![],'yamllint':![],'jsonSchema':![]};try{await execAsync(_0x2cbeb2(0xdd),{'timeout':0x1388}),_0x276455[_0x2cbeb2(0xe4)]=!![],this['logger']?.[_0x2cbeb2(0xb7)]('checkov\x20detected');}catch(_0x31c172){this['logger']?.[_0x2cbeb2(0xb7)]('checkov\x20not\x20available',{'error':_0x31c172[_0x2cbeb2(0xf8)]});}try{await execAsync(_0x2cbeb2(0xc2),{'timeout':0x1388}),_0x276455[_0x2cbeb2(0xc8)]=!![],this['logger']?.['debug'](_0x2cbeb2(0xe9));}catch(_0x3094d2){this[_0x2cbeb2(0x114)]?.[_0x2cbeb2(0xb7)]('hadolint\x20not\x20available',{'error':_0x3094d2[_0x2cbeb2(0xf8)]});}try{await execAsync(_0x2cbeb2(0xe1),{'timeout':0x1388}),_0x276455['yamllint']=!![],this[_0x2cbeb2(0x114)]?.['debug'](_0x2cbeb2(0x110));}catch(_0x1b895f){this['logger']?.[_0x2cbeb2(0xb7)]('yamllint\x20not\x20available',{'error':_0x1b895f['message']});}try{await import(_0x2cbeb2(0xd6)),_0x276455[_0x2cbeb2(0xbe)]=!![],this['logger']?.['debug']('JSON\x20Schema\x20validation\x20available');}catch(_0x46bed4){this[_0x2cbeb2(0x114)]?.['debug']('ajv\x20not\x20available',{'error':_0x46bed4['message']});}return this['availableScanners']=_0x276455,_0x276455;}async['validate'](_0x2c8ffe,_0x581320={}){const _0x4dd8ea=a0_0x5e58,_0x26a8a7=[],_0x5ebced=await this['detectAvailableValidators'](),_0x53fb3e=this[_0x4dd8ea(0x10d)](_0x2c8ffe);this['logger']?.[_0x4dd8ea(0xb7)](_0x4dd8ea(0xd3),{'filePath':_0x2c8ffe,'fileType':_0x53fb3e});switch(_0x53fb3e){case'dockerfile':if(_0x5ebced[_0x4dd8ea(0xc8)]){const _0x2c6591=await this['validateDockerfile'](_0x2c8ffe,_0x581320);_0x26a8a7[_0x4dd8ea(0x117)](..._0x2c6591);}if(_0x5ebced['checkov']){const _0x192d3c=await this['validateWithCheckov'](_0x2c8ffe,_0x4dd8ea(0x116),_0x581320);_0x26a8a7[_0x4dd8ea(0x117)](..._0x192d3c);}break;case _0x4dd8ea(0xfb):if(_0x5ebced[_0x4dd8ea(0xb9)]){const _0x3bb9a1=await this['validateYAML'](_0x2c8ffe,_0x581320);_0x26a8a7[_0x4dd8ea(0x117)](..._0x3bb9a1);}if(_0x5ebced['checkov']){const _0x2881de=await this[_0x4dd8ea(0x11c)](_0x2c8ffe,_0x4dd8ea(0xec),_0x581320);_0x26a8a7['push'](..._0x2881de);}break;case _0x4dd8ea(0xda):if(_0x5ebced['yamllint']){const _0x2b1f14=await this[_0x4dd8ea(0xbc)](_0x2c8ffe,_0x581320);_0x26a8a7[_0x4dd8ea(0x117)](..._0x2b1f14);}if(_0x5ebced[_0x4dd8ea(0xe4)]){const _0x131049=await this['validateWithCheckov'](_0x2c8ffe,_0x4dd8ea(0xda),_0x581320);_0x26a8a7['push'](..._0x131049);}break;case'terraform':if(_0x5ebced[_0x4dd8ea(0xe4)]){const _0x466df5=await this['validateWithCheckov'](_0x2c8ffe,_0x4dd8ea(0xe5),_0x581320);_0x26a8a7[_0x4dd8ea(0x117)](..._0x466df5);}break;case'package.json':if(_0x5ebced[_0x4dd8ea(0xbe)]){const _0x4183a8=await this['validatePackageJson'](_0x2c8ffe,_0x581320);_0x26a8a7['push'](..._0x4183a8);}break;case'tsconfig.json':if(_0x5ebced[_0x4dd8ea(0xbe)]){const _0x119ddb=await this[_0x4dd8ea(0xde)](_0x2c8ffe,_0x581320);_0x26a8a7[_0x4dd8ea(0x117)](..._0x119ddb);}break;case'github-actions':if(_0x5ebced[_0x4dd8ea(0xb9)]){const _0x211789=await this[_0x4dd8ea(0xbc)](_0x2c8ffe,_0x581320);_0x26a8a7[_0x4dd8ea(0x117)](..._0x211789);}break;case'env':const _0x2c9863=await this['validateEnvFile'](_0x2c8ffe,_0x581320);_0x26a8a7[_0x4dd8ea(0x117)](..._0x2c9863);break;case'yaml':if(_0x5ebced[_0x4dd8ea(0xb9)]){const _0x54d14b=await this[_0x4dd8ea(0xbc)](_0x2c8ffe,_0x581320);_0x26a8a7['push'](..._0x54d14b);}break;default:this['logger']?.[_0x4dd8ea(0xf9)]('Unknown\x20config\x20file\x20type',{'filePath':_0x2c8ffe,'fileType':_0x53fb3e});return[];}return this['normalizeResults'](_0x26a8a7);}async['validateDockerfile'](_0x1a5460,_0x3821bd={}){const _0x98e1fd=a0_0x5e58;try{const _0x441077=await execAsync(_0x98e1fd(0x101)+_0x1a5460+'\x22',{'maxBuffer':0xa*0x400*0x400,'timeout':0x7530}),_0x387040=JSON[_0x98e1fd(0xf7)](_0x441077['stdout']);return this[_0x98e1fd(0xf1)](_0x387040,_0x1a5460);}catch(_0x384876){if(_0x384876['stdout'])try{const _0xdce353=JSON[_0x98e1fd(0xf7)](_0x384876['stdout']);return this[_0x98e1fd(0xf1)](_0xdce353,_0x1a5460);}catch(_0x364250){this['logger']?.[_0x98e1fd(0xbf)](_0x98e1fd(0xb8),{'error':_0x364250[_0x98e1fd(0xf8)]});}return this['logger']?.['error'](_0x98e1fd(0xf3),{'error':_0x384876[_0x98e1fd(0xf8)]}),[];}}['parseHadolintResults'](_0x1f32ce,_0x5440b3){const _0x338d94=a0_0x5e58,_0x526d6c=[];if(Array[_0x338d94(0xc1)](_0x1f32ce))for(const _0x51fe12 of _0x1f32ce){_0x526d6c[_0x338d94(0x117)]({'file':_0x5440b3,'line':_0x51fe12[_0x338d94(0xcd)]||0x1,'column':_0x51fe12[_0x338d94(0xdf)]||0x1,'severity':this['mapHadolintSeverity'](_0x51fe12[_0x338d94(0x121)]),'rule':_0x51fe12[_0x338d94(0xc6)],'message':_0x51fe12['message'],'category':'dockerfile','validator':_0x338d94(0xc8)});}return _0x526d6c;}async['validateYAML'](_0x4f6073,_0x2ac88c={}){const _0x1a36f6=a0_0x5e58;try{const _0x49b3b1=await execAsync(_0x1a36f6(0xbd)+_0x4f6073+'\x22',{'maxBuffer':0xa*0x400*0x400,'timeout':0x7530});return this[_0x1a36f6(0xf6)](_0x49b3b1['stdout'],_0x4f6073);}catch(_0x5c5e5b){if(_0x5c5e5b['stdout'])return this['parseYamllintResults'](_0x5c5e5b['stdout'],_0x4f6073);return this[_0x1a36f6(0x114)]?.['error']('yamllint\x20validation\x20failed',{'error':_0x5c5e5b['message']}),[];}}[a0_0x586458(0xf6)](_0x2dd4cd,_0x320049){const _0x5bb419=a0_0x586458,_0x1e8965=[],_0x17fcb4=_0x2dd4cd['split']('\x0a')['filter'](_0x86ef3e=>_0x86ef3e[_0x5bb419(0xf2)]());for(const _0x31e3b3 of _0x17fcb4){const _0x5744c8=_0x31e3b3[_0x5bb419(0xb1)](/^(.+?):(\d+):(\d+):\s*\[(\w+)\]\s*(.+?)\s*\((.+?)\)/);if(_0x5744c8){const [,_0x414391,_0x4f6f61,_0x2c4600,_0x3e2b7f,_0x32f189,_0x22c6bb]=_0x5744c8;_0x1e8965['push']({'file':_0x320049,'line':parseInt(_0x4f6f61,0xa),'column':parseInt(_0x2c4600,0xa),'severity':this['mapYamllintSeverity'](_0x3e2b7f),'rule':_0x22c6bb,'message':_0x32f189,'category':_0x5bb419(0xd2),'validator':'yamllint'});}}return _0x1e8965;}async['validateWithCheckov'](_0x3ae2de,_0x51f4b7,_0x25229e={}){const _0x279510=a0_0x586458;try{const _0x2d4455=await execAsync(_0x279510(0x11a)+_0x3ae2de+'\x22\x20--framework\x20'+_0x51f4b7+_0x279510(0xe2),{'maxBuffer':0xa*0x400*0x400,'timeout':0xea60}),_0x41125b=JSON['parse'](_0x2d4455[_0x279510(0xeb)]);return this[_0x279510(0x120)](_0x41125b,_0x3ae2de);}catch(_0x557347){if(_0x557347['stdout'])try{const _0x54b49b=JSON['parse'](_0x557347['stdout']);return this[_0x279510(0x120)](_0x54b49b,_0x3ae2de);}catch(_0x1dca15){this['logger']?.[_0x279510(0xbf)]('Failed\x20to\x20parse\x20checkov\x20output',{'error':_0x1dca15['message']});}return this[_0x279510(0x114)]?.['error']('checkov\x20validation\x20failed',{'error':_0x557347[_0x279510(0xf8)]}),[];}}['parseCheckovResults'](_0x23afb8,_0x154a11){const _0x5d3893=a0_0x586458,_0x15f5b2=[];if(_0x23afb8[_0x5d3893(0xfe)]&&_0x23afb8['results'][_0x5d3893(0xb4)])for(const _0x2552d4 of _0x23afb8['results']['failed_checks']){_0x15f5b2[_0x5d3893(0x117)]({'file':_0x154a11,'line':_0x2552d4[_0x5d3893(0xd4)]?_0x2552d4['file_line_range'][0x0]:0x1,'column':0x1,'severity':this['mapCheckovSeverity'](_0x2552d4[_0x5d3893(0x11e)]),'rule':_0x2552d4[_0x5d3893(0x124)],'message':_0x2552d4['check_name']||_0x2552d4[_0x5d3893(0x124)],'category':'security','validator':_0x5d3893(0xe4),'remediation':_0x2552d4['guideline'],'cwe':_0x2552d4['cwe'],'references':_0x2552d4[_0x5d3893(0xb5)]?[_0x2552d4['guideline']]:[]});}return _0x15f5b2;}async[a0_0x586458(0x106)](_0x59a5de,_0x2205f6={}){const _0x599357=a0_0x586458;try{const _0x3e7ef6=(await import('ajv'))[_0x599357(0xfc)],_0x352c42=(await import(_0x599357(0xdb)))[_0x599357(0xfc)],_0x3366da=await a0_0x2551d8['readFile'](_0x59a5de,'utf-8'),_0x5ca12d=JSON[_0x599357(0xf7)](_0x3366da),_0x7c7171=new _0x3e7ef6({'allErrors':!![],'strict':![]});_0x352c42(_0x7c7171);const _0x1e4e57={'type':'object','required':['name','version'],'properties':{'name':{'type':_0x599357(0x11b),'pattern':'^(?:@[a-z0-9-~][a-z0-9-._~]*/)?[a-z0-9-~][a-z0-9-._~]*$'},'version':{'type':'string'},'description':{'type':_0x599357(0x11b)},'main':{'type':'string'},'type':{'type':_0x599357(0x11b),'enum':['module','commonjs']},'scripts':{'type':'object'},'dependencies':{'type':_0x599357(0x112)},'devDependencies':{'type':'object'}},'additionalProperties':!![]},_0x250206=_0x7c7171[_0x599357(0x107)](_0x1e4e57),_0x47e0ae=_0x250206(_0x5ca12d);if(!_0x47e0ae&&_0x250206['errors'])return _0x250206['errors']['map'](_0x7d432a=>({'file':_0x59a5de,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS[_0x599357(0x109)][_0x599357(0xc5)],'rule':_0x599357(0x118),'message':_0x7d432a['instancePath']?_0x7d432a[_0x599357(0xd7)]+'\x20'+_0x7d432a['message']:_0x599357(0xb6)+_0x7d432a[_0x599357(0x108)][_0x599357(0x10b)]+'\x27','category':'validation','validator':'json-schema'}));return[];}catch(_0x1d6da4){return this['logger']?.['error']('package.json\x20validation\x20failed',{'error':_0x1d6da4[_0x599357(0xf8)]}),[{'file':_0x59a5de,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS['SEVERITY'][_0x599357(0xc5)],'rule':_0x599357(0xbb),'message':'Invalid\x20JSON:\x20'+_0x1d6da4[_0x599357(0xf8)],'category':'syntax','validator':_0x599357(0xbb)}];}}async[a0_0x586458(0xde)](_0xb4ec7b,_0xd9e96a={}){const _0x374b7b=a0_0x586458;try{const _0x17d492=await a0_0x2551d8['readFile'](_0xb4ec7b,_0x374b7b(0xea)),_0x5df003=JSON['parse'](_0x17d492),_0x938cdb=[];if(_0x5df003[_0x374b7b(0xcb)]){const _0x28664e=_0x5df003[_0x374b7b(0xcb)];!_0x28664e['strict']&&_0x938cdb[_0x374b7b(0x117)]({'file':_0xb4ec7b,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS[_0x374b7b(0x109)]['WARNING'],'rule':'strict-mode','message':'Consider\x20enabling\x20\x22strict\x22\x20mode\x20for\x20better\x20type\x20safety','category':'best-practice','validator':'tsconfig-validator'}),_0x28664e['noImplicitAny']===![]&&_0x938cdb[_0x374b7b(0x117)]({'file':_0xb4ec7b,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS[_0x374b7b(0x109)]['WARNING'],'rule':_0x374b7b(0xd9),'message':'Disabling\x20noImplicitAny\x20reduces\x20type\x20safety','category':'best-practice','validator':'tsconfig-validator'});}return _0x938cdb;}catch(_0x107f2d){return this[_0x374b7b(0x114)]?.['error']('tsconfig.json\x20validation\x20failed',{'error':_0x107f2d['message']}),[{'file':_0xb4ec7b,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS['SEVERITY'][_0x374b7b(0xc5)],'rule':'json-parse','message':'Invalid\x20JSON:\x20'+_0x107f2d['message'],'category':_0x374b7b(0xb2),'validator':'json-parse'}];}}async['validateEnvFile'](_0x44e354,_0x1adef2={}){const _0x20e14f=a0_0x586458;try{const _0x2ba652=await a0_0x2551d8[_0x20e14f(0xba)](_0x44e354,_0x20e14f(0xea)),_0x4c5eca=[],_0x16b553=_0x2ba652[_0x20e14f(0x119)]('\x0a'),_0x1ac4cd=[{'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':_0x20e14f(0xd8)},{'pattern':/aws[_-]?access/i,'name':'AWS\x20credentials'}];return _0x16b553[_0x20e14f(0xfa)]((_0x445543,_0x44be88)=>{const _0xe563b=_0x20e14f,_0x12c713=_0x445543[_0xe563b(0xf2)]();if(!_0x12c713||_0x12c713[_0xe563b(0xd0)]('#'))return;if(_0x12c713[_0xe563b(0x113)]('=')){const [_0x529fff,_0x34176]=_0x12c713['split']('='),_0x79c175=_0x529fff['toLowerCase'](),_0x20def7=_0x34176?.[_0xe563b(0xf2)]()||'',_0x2fe992=_0x20def7&&_0x20def7!==''&&!_0x20def7[_0xe563b(0xd0)]('$')&&_0x20def7!=='your-key-here'&&_0x20def7!=='changeme'&&_0x20def7[_0xe563b(0xf0)]>0x5;if(_0x2fe992)for(const {pattern:_0x53fdf6,name:_0x2692c5}of _0x1ac4cd){if(_0x53fdf6['test'](_0x79c175)){_0x4c5eca[_0xe563b(0x117)]({'file':_0x44e354,'line':_0x44be88+0x1,'column':0x1,'severity':STATIC_ANALYSIS[_0xe563b(0x109)][_0xe563b(0xdc)],'rule':_0xe563b(0x10f),'message':_0xe563b(0x105)+_0x2692c5+'\x20detected\x20in\x20.env\x20file','category':_0xe563b(0x10e),'validator':'env-validator','remediation':_0xe563b(0x103)});break;}}}}),_0x4c5eca;}catch(_0x6e73f4){return this['logger']?.[_0x20e14f(0xbf)](_0x20e14f(0xed),{'error':_0x6e73f4['message']}),[];}}['detectFileType'](_0x887416){const _0x22cecb=a0_0x586458,_0x4100fe=a0_0x278bd0[_0x22cecb(0xe0)](_0x887416)['toLowerCase'](),_0x335a8c=a0_0x278bd0[_0x22cecb(0xf5)](_0x887416);if(_0x4100fe==='dockerfile')return'dockerfile';if(_0x4100fe===_0x22cecb(0xce)||_0x4100fe==='docker-compose.yaml')return _0x22cecb(0xfb);if(_0x4100fe==='package.json')return _0x22cecb(0xf4);if(_0x4100fe===_0x22cecb(0x100))return _0x22cecb(0x100);if(_0x4100fe===_0x22cecb(0x122)||_0x4100fe['endsWith'](_0x22cecb(0x122)))return'env';if(_0x335a8c[_0x22cecb(0x113)](_0x22cecb(0x11d)))return'github-actions';if(_0x335a8c[_0x22cecb(0x113)](_0x22cecb(0xda))||_0x335a8c[_0x22cecb(0x113)]('k8s'))return _0x22cecb(0xda);const _0x506dec=a0_0x278bd0['extname'](_0x887416)[_0x22cecb(0x102)]();if(_0x506dec==='.tf'||_0x506dec==='.tfvars')return'terraform';if(_0x506dec===_0x22cecb(0xc4)||_0x506dec===_0x22cecb(0xe8))return'yaml';if(_0x506dec===_0x22cecb(0x125))return'json';return'unknown';}['normalizeResults'](_0x1f9c26){const _0x5a3244=a0_0x586458;return _0x1f9c26[_0x5a3244(0x10a)](_0x3b48d1=>({'file':_0x3b48d1['file'],'line':_0x3b48d1['line']||0x1,'column':_0x3b48d1['column']||0x1,'severity':_0x3b48d1[_0x5a3244(0xfd)]||STATIC_ANALYSIS['SEVERITY'][_0x5a3244(0x111)],'rule':_0x3b48d1['rule']||'unknown','message':_0x3b48d1[_0x5a3244(0xf8)]||'Validation\x20issue\x20detected','category':_0x3b48d1['category']||'validation','validator':_0x3b48d1['validator'],'cwe':_0x3b48d1['cwe']||null,'remediation':_0x3b48d1['remediation']||null,'references':_0x3b48d1[_0x5a3244(0xca)]||[]}));}[a0_0x586458(0xe3)](_0x41d322){const _0x3cd5cd=a0_0x586458,_0x1820f5={'error':STATIC_ANALYSIS['SEVERITY']['ERROR'],'warning':STATIC_ANALYSIS[_0x3cd5cd(0x109)]['WARNING'],'info':STATIC_ANALYSIS[_0x3cd5cd(0x109)]['INFO'],'style':STATIC_ANALYSIS['SEVERITY'][_0x3cd5cd(0xe7)]};return _0x1820f5[_0x41d322?.[_0x3cd5cd(0x102)]()]||STATIC_ANALYSIS['SEVERITY'][_0x3cd5cd(0x111)];}['mapYamllintSeverity'](_0x578cb1){const _0x191604=a0_0x586458,_0x2dee29={'error':STATIC_ANALYSIS[_0x191604(0x109)]['ERROR'],'warning':STATIC_ANALYSIS[_0x191604(0x109)]['WARNING']};return _0x2dee29[_0x578cb1?.[_0x191604(0x102)]()]||STATIC_ANALYSIS[_0x191604(0x109)]['WARNING'];}['mapCheckovSeverity'](_0x4bd7fc){const _0x20ac25=a0_0x586458;return STATIC_ANALYSIS[_0x20ac25(0x109)][_0x20ac25(0xc5)];}async['getValidatorStatus'](){const _0x29111c=a0_0x586458,_0x5bea5d=await this[_0x29111c(0xe6)]();return{'validators':_0x5bea5d,'recommendations':this['getInstallRecommendations'](_0x5bea5d)};}[a0_0x586458(0xcf)](_0x4039fd){const _0x17ca34=a0_0x586458,_0x5b1c4b=[];return!_0x4039fd['checkov']&&_0x5b1c4b['push']({'validator':_0x17ca34(0xe4),'reason':'Infrastructure\x20as\x20Code\x20security\x20scanning\x20(Docker,\x20Kubernetes,\x20Terraform)','install':_0x17ca34(0xff),'priority':'high'}),!_0x4039fd['hadolint']&&_0x5b1c4b['push']({'validator':_0x17ca34(0xc8),'reason':_0x17ca34(0x115),'install':'Download from https://github.com/hadolint/hadolint/releases','priority':'high'}),!_0x4039fd[_0x17ca34(0xb9)]&&_0x5b1c4b['push']({'validator':_0x17ca34(0xb9),'reason':_0x17ca34(0xc7),'install':'pip\x20install\x20yamllint','priority':_0x17ca34(0x10c)}),!_0x4039fd['jsonSchema']&&_0x5b1c4b[_0x17ca34(0x117)]({'validator':'ajv\x20(JSON\x20Schema)','reason':'JSON\x20configuration\x20validation','install':_0x17ca34(0xd1),'priority':_0x17ca34(0x10c)}),_0x5b1c4b;}}export default ConfigValidator;function a0_0x3982(){const _0x4bb5ce=['C2vJDxjPDhK','AgfYzgnVzgvKlxnLy3jLDa','EwfTBgXPBNqGzgv0zwn0zwq','v0fstKLorW','B2jQzwn0','Aw5JBhvKzxm','Bg9Nz2vY','rg9JA2vYzMLSzsbSAw50Aw5NigfUzcbIzxn0ihbYywn0AwnLCW','zg9JA2vYzMLSzq','ChvZAa','ANnVBI1Zy2HLBwe','C3bSAxq','y2HLy2TVDIaTzIaI','C3rYAw5N','DMfSAwrHDgvxAxrOq2HLy2TVDG','lMDPDgH1yI93B3jRzMXVD3m','y2HLy2TFy2XHC3m','mJiWndKYmKrxCLrnua','CgfYC2vdAgvJA292uMvZDwX0CW','Bgv2zwW','lMvUDG','mta3mZy1mNzNDfH1vq','y2HLy2TFAwq','lMPZB24','Bwf0y2G','C3LUDgf4','nejiweLrsa','zMfPBgvKx2nOzwnRCW','z3vPzgvSAw5L','BxvZDcbOyxzLihjLCxvPCMvKihbYB3bLCNr5icC','zgvIDwC','rMfPBgvKihrVihbHCNnLigHHzg9SAw50ig91Dhb1Da','EwfTBgXPBNq','CMvHzezPBgu','ANnVBI1WyxjZzq','DMfSAwrHDgvzqu1m','EwfTBgXPBNqGlwyGCgfYC2fIBguGiG','ANnVBLnJAgvTyq','zxjYB3i','mZq5mJC1uM1zwLzJ','AxnbCNjHEq','AgfKB2XPBNqGls12zxjZAw9U','C2nHBM5LCKnHy2HL','lNLTBa','rvjst1i','y29Kzq','wufntcbMAwXLihzHBgLKyxrPB24','AgfKB2XPBNq','ntuYodDWtxfdD3a','CMvMzxjLBMnLCW','y29TCgLSzxjpChrPB25Z','nJy0nde2qwjeCK9m','BgLUzq','zg9JA2vYlwnVBxbVC2uUEw1S','z2v0sw5ZDgfSBfjLy29TBwvUzgf0Aw9UCW','C3rHCNrZv2L0Aa','BNbTigLUC3rHBgWGywP2igfQDI1MB3jTyxrZ','EwfTBa','vMfSAwrHDgLUzYbJB25MAwCGzMLSzq','zMLSzv9SAw5Lx3jHBMDL','mty2nfn2rurlta','ywP2','Aw5ZDgfUy2vqyxrO','ChjPDMf0zsbRzxK','BM8TAw1WBgLJAxqTyw55','A3vIzxjUzxrLCW','ywP2lwzVCM1HDhm','q1jjveLdquW','y2HLy2TVDIaTlxzLCNnPB24','DMfSAwrHDgvuC0nVBMzPzW','y29SDw1U','yMfZzw5HBwu','EwfTBgXPBNqGls12zxjZAw9U','ic0TB3v0Chv0igPZB24Gls1JB21Wywn0','BwfWsgfKB2XPBNrtzxzLCML0Eq','y2HLy2TVDG','DgvYCMfMB3jT','zgv0zwn0qxzHAwXHyMXLvMfSAwrHDg9YCW','su5gtW','lNLHBwW','AgfKB2XPBNqGzgv0zwn0zwq','DxrMltG','C3rKB3v0','zg9JA2vYx2nVBxbVC2u','lMvUDIb2ywXPzgf0Aw9UigzHAwXLza','yxzHAwXHyMXLu2nHBM5LCNm','ntu3mJm3ohDpvxfusW','BgvUz3rO','CgfYC2viywrVBgLUDfjLC3vSDhm','DhjPBq','AgfKB2XPBNqGDMfSAwrHDgLVBIbMywLSzwq','CgfJA2fNzs5QC29U','zgLYBMfTzq','CgfYC2vzyw1SBgLUDfjLC3vSDhm','CgfYC2u','BwvZC2fNzq','D2fYBG','zM9YrwfJAa','zg9JA2vYlwnVBxbVC2u','zgvMyxvSDa','C2v2zxjPDhK','CMvZDwX0CW','CgLWigLUC3rHBgWGy2HLy2TVDG','DhnJB25MAwCUANnVBG','AgfKB2XPBNqGls1MB3jTyxqGANnVBIaI','Dg9mB3DLCKnHC2u','vxnLigvUDMLYB25Tzw50lxnWzwnPzMLJic5LBNyGzMLSzxmGyw5KigfKzcaUzw52ihrVic5NAxrPz25VCMu','ndyXmJu1BKj3A0vL','ug90zw50AwfSigHHCMrJB2rLzca','DMfSAwrHDgvqywnRywDLsNnVBG','y29TCgLSzq','CgfYyw1Z','u0vwrvjjvfK','BwfW','BwLZC2LUz1bYB3bLCNr5','BwvKAxvT','zgv0zwn0rMLSzvr5Cgu'];a0_0x3982=function(){return _0x4bb5ce;};return a0_0x3982();}
@@ -1 +1 @@
1
- function a0_0x59db(){const _0x1f8d38=['Bw9KAwzPzwq','lMPZ','mZyZotG0ofHKs0fTvW','B2zM','y2f0zwDVCML6zvj1Bgu','BgvUz3rO','zM9YBwf0twvZC2fNzq','rvnmAw50igfUywX5C2LZigzHAwXLza','u0vwrvjjvfK','BwvZC2fNzq','mtaXmtG3mtbuu2fxzMW','mw9wz29YEq','C2LUz2XL','u1rzteu','zML4ywjSzuvYCM9Yq291BNq','lMvZBgLUDhjJlMnQCW','zxnSAw50','BgLUzq','zw5KtgLUzq','rvnmAw50igzPEcbMywLSzwq6ia','y29SDw1U','v0fstKLorW','D2fYBG','C2v2zxjPDhK','Aw5JBhvKzxm','DNvL','mJG2mdjXwgzpse4','nZzPqxrqzKK','EhnZ','BM8TAw1WBgLLzc1LDMfS','mtuYndnvu3DwCKK','zML4ywjSzvDHCM5PBMDdB3vUDa','zxjYB3i','C3bSAxq','Bw9KDwXL','BgLUDfrLEhq','uevsrK9stufoq0u','mtGXndKZmxHqBLvuyq','z2v0rvnmAw50sw5ZDgfUy2u','Bgf0zxn0','ChjLzMvYlxbYB21PC2uTCMvQzwn0lwvYCM9YCW','z2v0rvnmAw50q29UzMLN','q0furuDpuLK','zgvZy3jPyMvdAgfUz2vZ','mtG5tujMvw9t','mJqXnta0mg14vvnJCW','CNvSzuLK','rvjst1i','Bg9Nz2vY','nZy2ndy2yvfKv3zM','ywnJzxnZ','CgvYzM9YBwfUy2u','D2fYBMLUz0nVDw50','zgvIDwC','AM9PBG','su1qt1ju','ChvZAa','BwvZC2fNzxm'];a0_0x59db=function(){return _0x1f8d38;};return a0_0x59db();}const a0_0x3d73b8=a0_0x4edd;(function(_0x3cd62b,_0x39a271){const _0x5c9d04=a0_0x4edd,_0x1d1767=_0x3cd62b();while(!![]){try{const _0x198261=parseInt(_0x5c9d04(0x1c7))/0x1*(parseInt(_0x5c9d04(0x1b3))/0x2)+-parseInt(_0x5c9d04(0x1a0))/0x3*(parseInt(_0x5c9d04(0x19d))/0x4)+-parseInt(_0x5c9d04(0x1af))/0x5+parseInt(_0x5c9d04(0x19c))/0x6*(parseInt(_0x5c9d04(0x1ae))/0x7)+-parseInt(_0x5c9d04(0x1be))/0x8+-parseInt(_0x5c9d04(0x1a7))/0x9+parseInt(_0x5c9d04(0x1c6))/0xa;if(_0x198261===_0x39a271)break;else _0x1d1767['push'](_0x1d1767['shift']());}catch(_0xc3cd36){_0x1d1767['push'](_0x1d1767['shift']());}}}(a0_0x59db,0x4638a));import{ESLint}from'eslint';import a0_0x11cbaf from'path';function a0_0x4edd(_0x519aad,_0x24fb0a){_0x519aad=_0x519aad-0x19b;const _0x59dbe9=a0_0x59db();let _0x4eddda=_0x59dbe9[_0x519aad];if(a0_0x4edd['jBwMIm']===undefined){var _0x461126=function(_0x512250){const _0x4bf6a1='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x11cbaf='',_0xa75e8='';for(let _0x293df6=0x0,_0x2883b9,_0x5a205d,_0x52e105=0x0;_0x5a205d=_0x512250['charAt'](_0x52e105++);~_0x5a205d&&(_0x2883b9=_0x293df6%0x4?_0x2883b9*0x40+_0x5a205d:_0x5a205d,_0x293df6++%0x4)?_0x11cbaf+=String['fromCharCode'](0xff&_0x2883b9>>(-0x2*_0x293df6&0x6)):0x0){_0x5a205d=_0x4bf6a1['indexOf'](_0x5a205d);}for(let _0x29af81=0x0,_0x2c5573=_0x11cbaf['length'];_0x29af81<_0x2c5573;_0x29af81++){_0xa75e8+='%'+('00'+_0x11cbaf['charCodeAt'](_0x29af81)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0xa75e8);};a0_0x4edd['UnqNYi']=_0x461126,a0_0x4edd['HrbnfB']={},a0_0x4edd['jBwMIm']=!![];}const _0x1e441b=_0x59dbe9[0x0],_0x43eaf4=_0x519aad+_0x1e441b,_0x102b2f=a0_0x4edd['HrbnfB'][_0x43eaf4];return!_0x102b2f?(_0x4eddda=a0_0x4edd['UnqNYi'](_0x4eddda),a0_0x4edd['HrbnfB'][_0x43eaf4]=_0x4eddda):_0x4eddda=_0x102b2f,_0x4eddda;}import a0_0xa75e8 from'fs/promises';import{STATIC_ANALYSIS}from'../utilities/constants.js';class ESLintAnalyzer{constructor(_0x293df6=null){const _0x348ff5=a0_0x4edd;this[_0x348ff5(0x1b2)]=_0x293df6,this['eslintCache']=new Map();}async['analyze'](_0x2883b9,_0x5a205d,_0x52e105={}){const _0x52aabc=a0_0x4edd;try{const _0x29af81=await this['getESLintInstance'](_0x52e105),_0x2c5573=await _0x29af81[_0x52aabc(0x1a5)](_0x5a205d,{'filePath':_0x2883b9,'warnIgnored':![]}),_0x2b5dec=[];if(_0x2c5573&&_0x2c5573['length']>0x0){const _0x31b0c9=_0x2c5573[0x0];for(const _0x540d38 of _0x31b0c9[_0x52aabc(0x1bb)]){_0x2b5dec['push'](this[_0x52aabc(0x1c2)](_0x540d38,_0x2883b9));}}return this[_0x52aabc(0x1b2)]?.[_0x52aabc(0x1b7)]('ESLint\x20analysis\x20completed',{'file':_0x2883b9,'totalDiagnostics':_0x2b5dec['length'],'errors':_0x2b5dec['filter'](_0x30eb4f=>_0x30eb4f[_0x52aabc(0x1d3)]===STATIC_ANALYSIS[_0x52aabc(0x1c4)][_0x52aabc(0x1b1)])[_0x52aabc(0x1c1)],'warnings':_0x2b5dec['filter'](_0x158139=>_0x158139[_0x52aabc(0x1d3)]===STATIC_ANALYSIS[_0x52aabc(0x1c4)]['WARNING'])[_0x52aabc(0x1c1)]}),_0x2b5dec;}catch(_0x2a7838){return this['logger']?.[_0x52aabc(0x1a2)](_0x52aabc(0x1c3),{'file':_0x2883b9,'error':_0x2a7838[_0x52aabc(0x1c5)]}),[];}}async['fix'](_0x504b57,_0x2a5a8c,_0x3a0e10={}){const _0x17fe40=a0_0x4edd;try{const _0x4e8124=await this[_0x17fe40(0x1a8)]({..._0x3a0e10,'fix':!![]}),_0x757de6=await _0x4e8124[_0x17fe40(0x1a5)](_0x2a5a8c,{'filePath':_0x504b57,'warnIgnored':![]});if(_0x757de6&&_0x757de6[_0x17fe40(0x1c1)]>0x0){const _0x5773dc=_0x757de6[0x0];return{'fixed':_0x5773dc['output']!==undefined,'content':_0x5773dc['output']||_0x2a5a8c,'fixedCount':_0x5773dc[_0x17fe40(0x1ca)]+_0x5773dc[_0x17fe40(0x1a1)],'remainingErrors':_0x5773dc['errorCount']-_0x5773dc[_0x17fe40(0x1ca)],'remainingWarnings':_0x5773dc[_0x17fe40(0x1b6)]-_0x5773dc['fixableWarningCount'],'changes':_0x5773dc['output']?this[_0x17fe40(0x1ad)](_0x2a5a8c,_0x5773dc['output']):[]};}return{'fixed':![],'content':_0x2a5a8c,'fixedCount':0x0,'remainingErrors':0x0,'remainingWarnings':0x0,'changes':[]};}catch(_0x1966d2){this['logger']?.[_0x17fe40(0x1a2)]('ESLint\x20fix\x20failed',{'file':_0x504b57,'error':_0x1966d2['message']});throw new Error(_0x17fe40(0x1cf)+_0x1966d2[_0x17fe40(0x1c5)]);}}async[a0_0x3d73b8(0x1a8)](_0x2fb71a={}){const _0x29b291=a0_0x3d73b8,{workingDir:_0x21dd00,fix:fix=![],framework:_0x3c8474}=_0x2fb71a,_0x40f5eb=await this[_0x29b291(0x1ab)](_0x21dd00,_0x3c8474),_0x52302d=new ESLint({'fix':fix,'useEslintrc':!![],'overrideConfig':_0x40f5eb,'errorOnUnmatchedPattern':![]});return _0x52302d;}async[a0_0x3d73b8(0x1ab)](_0x2f02b7,_0x382ebd){const _0x49264f=a0_0x3d73b8,_0x336266={'env':{'browser':!![],'es2021':!![],'node':!![]},'parserOptions':{'ecmaVersion':_0x49264f(0x1a9),'sourceType':_0x49264f(0x1a4)},'rules':{'no-unused-vars':_0x49264f(0x1d2),'no-undef':'error','no-console':_0x49264f(0x1bf),'semi':['warn','always'],'quotes':[_0x49264f(0x1d2),_0x49264f(0x1c8),{'avoidEscape':!![]}]}};if(_0x382ebd==='react')_0x336266['extends']=['eslint:recommended'],_0x336266['parserOptions']['ecmaFeatures']={'jsx':!![]},_0x336266['settings']={'react':{'version':'detect'}};else _0x382ebd===_0x49264f(0x19b)?_0x336266['extends']=['eslint:recommended']:_0x336266['extends']=['eslint:recommended'];if(_0x2f02b7){const _0x9dc53a=['.eslintrc.js',_0x49264f(0x1cb),'.eslintrc.json','eslint.config.js'];for(const _0x5b3061 of _0x9dc53a){try{const _0xc4a375=a0_0x11cbaf[_0x49264f(0x1b8)](_0x2f02b7,_0x5b3061);return await a0_0xa75e8[_0x49264f(0x1b4)](_0xc4a375),this['logger']?.[_0x49264f(0x1b7)]('Found\x20ESLint\x20config',{'configFile':_0x5b3061}),{};}catch{}}}return _0x336266;}['formatMessage'](_0x32acf0,_0x451480){const _0x1905ee=a0_0x3d73b8;return{'file':_0x451480,'line':_0x32acf0[_0x1905ee(0x1cd)]||0x1,'column':_0x32acf0[_0x1905ee(0x1d0)]||0x1,'endLine':_0x32acf0[_0x1905ee(0x1ce)],'endColumn':_0x32acf0['endColumn'],'severity':_0x32acf0['severity']===0x2?STATIC_ANALYSIS[_0x1905ee(0x1c4)][_0x1905ee(0x1b1)]:STATIC_ANALYSIS[_0x1905ee(0x1c4)][_0x1905ee(0x1d1)],'rule':_0x32acf0[_0x1905ee(0x1b0)]||'eslint','message':_0x32acf0[_0x1905ee(0x1c5)],'category':this['categorizeRule'](_0x32acf0['ruleId']),'fixable':_0x32acf0['fix']!==undefined,'source':_0x1905ee(0x1cc)};}[a0_0x3d73b8(0x1c0)](_0x56ed0c){const _0x21fbe5=a0_0x3d73b8;if(!_0x56ed0c)return STATIC_ANALYSIS[_0x21fbe5(0x1ac)][_0x21fbe5(0x1c9)];if(_0x56ed0c['includes']('security')||_0x56ed0c[_0x21fbe5(0x1d4)](_0x21fbe5(0x19e))||_0x56ed0c==='no-eval'||_0x56ed0c===_0x21fbe5(0x19f))return STATIC_ANALYSIS[_0x21fbe5(0x1ac)]['SECURITY'];if(_0x56ed0c[_0x21fbe5(0x1d4)](_0x21fbe5(0x1b5))||_0x56ed0c==='no-await-in-loop'||_0x56ed0c===_0x21fbe5(0x1aa))return STATIC_ANALYSIS['CATEGORY'][_0x21fbe5(0x1a6)];if(_0x56ed0c['includes']('import')||_0x56ed0c==='no-undef')return STATIC_ANALYSIS[_0x21fbe5(0x1ac)][_0x21fbe5(0x1b9)];if(_0x56ed0c['includes']('best-practices')||_0x56ed0c==='no-unused-vars'||_0x56ed0c==='no-unreachable'||_0x56ed0c==='no-var')return STATIC_ANALYSIS[_0x21fbe5(0x1ac)]['BEST_PRACTICE'];return STATIC_ANALYSIS[_0x21fbe5(0x1ac)]['STYLE'];}[a0_0x3d73b8(0x1ad)](_0xf16068,_0x5e957e){const _0x15ff5b=a0_0x3d73b8,_0x1c597e=[],_0x496840=_0xf16068['split']('\x0a'),_0x2c6f15=_0x5e957e[_0x15ff5b(0x1a3)]('\x0a'),_0x559a34=Math['max'](_0x496840[_0x15ff5b(0x1c1)],_0x2c6f15['length']);for(let _0x46e57c=0x0;_0x46e57c<_0x559a34;_0x46e57c++){const _0x68bbc5=_0x496840[_0x46e57c]||'',_0x4c2394=_0x2c6f15[_0x46e57c]||'';_0x68bbc5!==_0x4c2394&&_0x1c597e[_0x15ff5b(0x1ba)]({'line':_0x46e57c+0x1,'type':_0x68bbc5&&_0x4c2394?_0x15ff5b(0x1bc):_0x68bbc5?'removed':'added','original':_0x68bbc5,'fixed':_0x4c2394});}return _0x1c597e;}['getSupportedExtensions'](){const _0x1d7cd7=a0_0x3d73b8;return[_0x1d7cd7(0x1bd),'.jsx','.mjs','.cjs'];}['supportsAutoFix'](){return!![];}}export default ESLintAnalyzer;
1
+ const a0_0x2c0877=a0_0x8d56;(function(_0x13b8fd,_0x5c0200){const _0x3dfffa=a0_0x8d56,_0xae9b3a=_0x13b8fd();while(!![]){try{const _0x1f5898=-parseInt(_0x3dfffa(0x1a1))/0x1*(-parseInt(_0x3dfffa(0x1a2))/0x2)+-parseInt(_0x3dfffa(0x1b2))/0x3+parseInt(_0x3dfffa(0x18b))/0x4+-parseInt(_0x3dfffa(0x187))/0x5+parseInt(_0x3dfffa(0x19c))/0x6+parseInt(_0x3dfffa(0x19a))/0x7+-parseInt(_0x3dfffa(0x177))/0x8;if(_0x1f5898===_0x5c0200)break;else _0xae9b3a['push'](_0xae9b3a['shift']());}catch(_0x2006e0){_0xae9b3a['push'](_0xae9b3a['shift']());}}}(a0_0x3d01,0x3a1d4));import{ESLint}from'eslint';import a0_0x8ec45d from'path';function a0_0x3d01(){const _0x1f182f=['u1rzteu','zxjYB3i','nJa5nZiZr1jtCML2','BM8TzxzHBa','rvnmAw50igfUywX5C2LZignVBxbSzxrLza','Bw9KAwzPzwq','BM8TDMfY','ywnJzxnZ','mtmZmdi1nK5PB2zHzq','lMnQCW','q0furuDpuLK','v0fstKLorW','ywX3yxLZ','uevsrK9stufoq0u','lMvZBgLUDhjJlMPZB24','y2f0zwDVCML6zvj1Bgu','rvnmAw50igzPEcbMywLSzwq','u0vdvvjjvfK','rvjst1i','BM8TAw1WBgLLzc1LDMfS','C2v2zxjPDhK','u0vwrvjjvfK','zM9YBwf0twvZC2fNzq','rM91BMqGrvnmAw50ignVBMzPzW','mtm4mJi0nuXuEuPuqq','AM9PBG','CNvSzuLK','Aw5JBhvKzxm','mtyZmduYne1JqwnUua','C2LUz2XL','zxnSAw50lMnVBMzPzY5QCW','Bwf4','BwvZC2fNzq','z2v0rvnmAw50sw5ZDgfUy2u','BgvUz3rO','C2v0DgLUz3m','ywrKzwq','zML4ywjSzuvYCM9Yq291BNq','zgv0zwn0','BgLUDfrLEhq','D2fYBG','rvnmAw50igzPEcbMywLSzwq6ia','zML4ywjSzvDHCM5PBMDdB3vUDa','mtaXntmYmNrTBLHKsa','zxH0zw5KCW','mtC2mJm5mLfZyuryrq','zxnSAw50oNjLy29TBwvUzgvK','zMLSDgvY','zw5Kq29SDw1U','BwvZC2fNzxm','odnfz1nlA08','ota2A29gzKLl','zwnTyuzLyxr1CMvZ','zML4','C3vWCg9YDhnbDxrVrML4','zxnSAw50q2fJAgu','lMPZEa','CMvHy3q','C2vJDxjPDhK','yw5HBhL6zq','qKvtvf9quKfdveLdrq','yMvZDc1WCMfJDgLJzxm','Bg9Nz2vY','zxnSAw50','zxjYB3jdB3vUDa'];a0_0x3d01=function(){return _0x1f182f;};return a0_0x3d01();}import a0_0x5a4115 from'fs/promises';import{STATIC_ANALYSIS}from'../utilities/constants.js';class ESLintAnalyzer{constructor(_0x3d70b3=null){const _0x3ae2e8=a0_0x8d56;this[_0x3ae2e8(0x1ad)]=_0x3d70b3,this[_0x3ae2e8(0x1a6)]=new Map();}async[a0_0x2c0877(0x1aa)](_0x92e208,_0x1022ac,_0x2b101a={}){const _0x202b33=a0_0x2c0877;try{const _0x2b9b9e=await this['getESLintInstance'](_0x2b101a),_0x431352=await _0x2b9b9e[_0x202b33(0x196)](_0x1022ac,{'filePath':_0x92e208,'warnIgnored':![]}),_0x3fc518=[];if(_0x431352&&_0x431352['length']>0x0){const _0x5e20e4=_0x431352[0x0];for(const _0x5dd528 of _0x5e20e4[_0x202b33(0x1a0)]){_0x3fc518['push'](this['formatMessage'](_0x5dd528,_0x92e208));}}return this['logger']?.['debug'](_0x202b33(0x1b4),{'file':_0x92e208,'totalDiagnostics':_0x3fc518['length'],'errors':_0x3fc518[_0x202b33(0x19e)](_0x4783ce=>_0x4783ce[_0x202b33(0x183)]===STATIC_ANALYSIS['SEVERITY'][_0x202b33(0x181)])['length'],'warnings':_0x3fc518[_0x202b33(0x19e)](_0xbf0564=>_0xbf0564['severity']===STATIC_ANALYSIS['SEVERITY'][_0x202b33(0x17a)])[_0x202b33(0x191)]}),_0x3fc518;}catch(_0x814040){return this['logger']?.['error']('ESLint\x20analysis\x20failed',{'file':_0x92e208,'error':_0x814040[_0x202b33(0x18f)]}),[];}}async[a0_0x2c0877(0x1a4)](_0x2a3a51,_0x2fab4a,_0x56e825={}){const _0x43728f=a0_0x2c0877;try{const _0x5dc4f2=await this['getESLintInstance']({..._0x56e825,'fix':!![]}),_0x22bb7f=await _0x5dc4f2[_0x43728f(0x196)](_0x2fab4a,{'filePath':_0x2a3a51,'warnIgnored':![]});if(_0x22bb7f&&_0x22bb7f[_0x43728f(0x191)]>0x0){const _0x3d8fa0=_0x22bb7f[0x0];return{'fixed':_0x3d8fa0['output']!==undefined,'content':_0x3d8fa0['output']||_0x2fab4a,'fixedCount':_0x3d8fa0['fixableErrorCount']+_0x3d8fa0['fixableWarningCount'],'remainingErrors':_0x3d8fa0[_0x43728f(0x1af)]-_0x3d8fa0[_0x43728f(0x194)],'remainingWarnings':_0x3d8fa0['warningCount']-_0x3d8fa0[_0x43728f(0x199)],'changes':_0x3d8fa0['output']?this['describeChanges'](_0x2fab4a,_0x3d8fa0['output']):[]};}return{'fixed':![],'content':_0x2fab4a,'fixedCount':0x0,'remainingErrors':0x0,'remainingWarnings':0x0,'changes':[]};}catch(_0x23bd22){this[_0x43728f(0x1ad)]?.[_0x43728f(0x1b1)](_0x43728f(0x17f),{'file':_0x2a3a51,'error':_0x23bd22['message']});throw new Error(_0x43728f(0x198)+_0x23bd22['message']);}}async[a0_0x2c0877(0x190)](_0x504db9={}){const {workingDir:_0x199311,fix:fix=![],framework:_0x534ccd}=_0x504db9,_0x5989b1=await this['getESLintConfig'](_0x199311,_0x534ccd),_0x343f58=new ESLint({'fix':fix,'useEslintrc':!![],'overrideConfig':_0x5989b1,'errorOnUnmatchedPattern':![]});return _0x343f58;}async['getESLintConfig'](_0x5673be,_0x132fe4){const _0x130ad0=a0_0x2c0877,_0x370ca8={'env':{'browser':!![],'es2021':!![],'node':!![]},'parserOptions':{'ecmaVersion':'latest','sourceType':'module'},'rules':{'no-unused-vars':'warn','no-undef':'error','no-console':'off','semi':[_0x130ad0(0x197),_0x130ad0(0x17b)],'quotes':['warn',_0x130ad0(0x18c),{'avoidEscape':!![]}]}};if(_0x132fe4===_0x130ad0(0x1a8))_0x370ca8['extends']=[_0x130ad0(0x19d)],_0x370ca8['parserOptions'][_0x130ad0(0x1a3)]={'jsx':!![]},_0x370ca8[_0x130ad0(0x192)]={'react':{'version':_0x130ad0(0x195)}};else _0x132fe4==='vue'?_0x370ca8[_0x130ad0(0x19b)]=['eslint:recommended']:_0x370ca8['extends']=[_0x130ad0(0x19d)];if(_0x5673be){const _0x4e1c13=['.eslintrc.js','.eslintrc.cjs',_0x130ad0(0x17d),_0x130ad0(0x18d)];for(const _0x4cf663 of _0x4e1c13){try{const _0x2d3d5=a0_0x8ec45d[_0x130ad0(0x188)](_0x5673be,_0x4cf663);return await a0_0x5a4115[_0x130ad0(0x176)](_0x2d3d5),this['logger']?.['debug'](_0x130ad0(0x186),{'configFile':_0x4cf663}),{};}catch{}}}return _0x370ca8;}[a0_0x2c0877(0x185)](_0x54dbda,_0x4528f4){const _0x169436=a0_0x2c0877;return{'file':_0x4528f4,'line':_0x54dbda['line']||0x1,'column':_0x54dbda['column']||0x1,'endLine':_0x54dbda['endLine'],'endColumn':_0x54dbda[_0x169436(0x19f)],'severity':_0x54dbda['severity']===0x2?STATIC_ANALYSIS[_0x169436(0x184)]['ERROR']:STATIC_ANALYSIS[_0x169436(0x184)]['WARNING'],'rule':_0x54dbda[_0x169436(0x189)]||'eslint','message':_0x54dbda[_0x169436(0x18f)],'category':this[_0x169436(0x17e)](_0x54dbda[_0x169436(0x189)]),'fixable':_0x54dbda['fix']!==undefined,'source':_0x169436(0x1ae)};}['categorizeRule'](_0x49ba85){const _0x251e66=a0_0x2c0877;if(!_0x49ba85)return STATIC_ANALYSIS[_0x251e66(0x179)][_0x251e66(0x1b0)];if(_0x49ba85['includes'](_0x251e66(0x1a9))||_0x49ba85['includes']('xss')||_0x49ba85===_0x251e66(0x1b3)||_0x49ba85===_0x251e66(0x182))return STATIC_ANALYSIS['CATEGORY'][_0x251e66(0x180)];if(_0x49ba85['includes']('performance')||_0x49ba85==='no-await-in-loop'||_0x49ba85==='prefer-promise-reject-errors')return STATIC_ANALYSIS[_0x251e66(0x179)][_0x251e66(0x17c)];if(_0x49ba85[_0x251e66(0x18a)]('import')||_0x49ba85==='no-undef')return STATIC_ANALYSIS['CATEGORY']['IMPORT'];if(_0x49ba85[_0x251e66(0x18a)](_0x251e66(0x1ac))||_0x49ba85==='no-unused-vars'||_0x49ba85==='no-unreachable'||_0x49ba85===_0x251e66(0x175))return STATIC_ANALYSIS['CATEGORY'][_0x251e66(0x1ab)];return STATIC_ANALYSIS[_0x251e66(0x179)][_0x251e66(0x1b0)];}['describeChanges'](_0x576617,_0x3ea0e7){const _0x44a2c9=a0_0x2c0877,_0x2657ef=[],_0x559f82=_0x576617['split']('\x0a'),_0x4bf76e=_0x3ea0e7['split']('\x0a'),_0x5bf60c=Math[_0x44a2c9(0x18e)](_0x559f82[_0x44a2c9(0x191)],_0x4bf76e[_0x44a2c9(0x191)]);for(let _0x1d061e=0x0;_0x1d061e<_0x5bf60c;_0x1d061e++){const _0x244097=_0x559f82[_0x1d061e]||'',_0x3da4f9=_0x4bf76e[_0x1d061e]||'';_0x244097!==_0x3da4f9&&_0x2657ef['push']({'line':_0x1d061e+0x1,'type':_0x244097&&_0x3da4f9?_0x44a2c9(0x174):_0x244097?'removed':_0x44a2c9(0x193),'original':_0x244097,'fixed':_0x3da4f9});}return _0x2657ef;}['getSupportedExtensions'](){const _0x41ee88=a0_0x2c0877;return['.js',_0x41ee88(0x1a7),'.mjs',_0x41ee88(0x178)];}[a0_0x2c0877(0x1a5)](){return!![];}}function a0_0x8d56(_0x15102e,_0x53a2c3){_0x15102e=_0x15102e-0x174;const _0x3d011d=a0_0x3d01();let _0x8d5600=_0x3d011d[_0x15102e];if(a0_0x8d56['RtdDfn']===undefined){var _0x4a5244=function(_0x7367f1){const _0x307821='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x8ec45d='',_0x5a4115='';for(let _0x3d70b3=0x0,_0x92e208,_0x1022ac,_0x2b101a=0x0;_0x1022ac=_0x7367f1['charAt'](_0x2b101a++);~_0x1022ac&&(_0x92e208=_0x3d70b3%0x4?_0x92e208*0x40+_0x1022ac:_0x1022ac,_0x3d70b3++%0x4)?_0x8ec45d+=String['fromCharCode'](0xff&_0x92e208>>(-0x2*_0x3d70b3&0x6)):0x0){_0x1022ac=_0x307821['indexOf'](_0x1022ac);}for(let _0x2b9b9e=0x0,_0x431352=_0x8ec45d['length'];_0x2b9b9e<_0x431352;_0x2b9b9e++){_0x5a4115+='%'+('00'+_0x8ec45d['charCodeAt'](_0x2b9b9e)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x5a4115);};a0_0x8d56['KvcBnK']=_0x4a5244,a0_0x8d56['RRXxBy']={},a0_0x8d56['RtdDfn']=!![];}const _0x4f19ba=_0x3d011d[0x0],_0x175d84=_0x15102e+_0x4f19ba,_0x292f14=a0_0x8d56['RRXxBy'][_0x175d84];return!_0x292f14?(_0x8d5600=a0_0x8d56['KvcBnK'](_0x8d5600),a0_0x8d56['RRXxBy'][_0x175d84]=_0x8d5600):_0x8d5600=_0x292f14,_0x8d5600;}export default ESLintAnalyzer;