@loxia-labs/loxia-autopilot-one 1.0.18 → 1.0.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (120) hide show
  1. package/README.md +2 -2
  2. package/bin/cli.js +1 -1
  3. package/bin/loxia-terminal-v2.js +1 -1
  4. package/bin/loxia-terminal.js +1 -1
  5. package/bin/start-with-terminal.js +1 -1
  6. package/package.json +1 -1
  7. package/scripts/install-scanners.js +1 -1
  8. package/src/analyzers/CSSAnalyzer.js +1 -1
  9. package/src/analyzers/ConfigValidator.js +1 -1
  10. package/src/analyzers/ESLintAnalyzer.js +1 -1
  11. package/src/analyzers/JavaScriptAnalyzer.js +1 -1
  12. package/src/analyzers/PrettierFormatter.js +1 -1
  13. package/src/analyzers/PythonAnalyzer.js +1 -1
  14. package/src/analyzers/SecurityAnalyzer.js +1 -1
  15. package/src/analyzers/TypeScriptAnalyzer.js +1 -1
  16. package/src/analyzers/codeCloneDetector/analyzer.js +1 -1
  17. package/src/analyzers/codeCloneDetector/detector.js +1 -1
  18. package/src/analyzers/codeCloneDetector/index.js +1 -1
  19. package/src/analyzers/codeCloneDetector/parser.js +1 -1
  20. package/src/analyzers/codeCloneDetector/reporter.js +1 -1
  21. package/src/analyzers/codeCloneDetector/scanner.js +1 -1
  22. package/src/core/agentPool.js +1 -1
  23. package/src/core/agentScheduler.js +1 -1
  24. package/src/core/contextManager.js +1 -1
  25. package/src/core/messageProcessor.js +1 -1
  26. package/src/core/orchestrator.js +1 -1
  27. package/src/core/stateManager.js +1 -1
  28. package/src/index.js +1 -1
  29. package/src/interfaces/cli.js +1 -1
  30. package/src/interfaces/terminal/__tests__/smoke/advancedFeatures.test.js +1 -1
  31. package/src/interfaces/terminal/__tests__/smoke/agentControl.test.js +1 -1
  32. package/src/interfaces/terminal/__tests__/smoke/agents.test.js +1 -1
  33. package/src/interfaces/terminal/__tests__/smoke/components.test.js +1 -1
  34. package/src/interfaces/terminal/__tests__/smoke/connection.test.js +1 -1
  35. package/src/interfaces/terminal/__tests__/smoke/enhancements.test.js +1 -1
  36. package/src/interfaces/terminal/__tests__/smoke/imports.test.js +1 -1
  37. package/src/interfaces/terminal/__tests__/smoke/messages.test.js +1 -1
  38. package/src/interfaces/terminal/__tests__/smoke/tools.test.js +1 -1
  39. package/src/interfaces/terminal/api/apiClient.js +1 -1
  40. package/src/interfaces/terminal/api/messageRouter.js +1 -1
  41. package/src/interfaces/terminal/api/session.js +1 -1
  42. package/src/interfaces/terminal/api/websocket.js +1 -1
  43. package/src/interfaces/terminal/components/AgentCreator.js +1 -1
  44. package/src/interfaces/terminal/components/AgentEditor.js +1 -1
  45. package/src/interfaces/terminal/components/AgentSwitcher.js +1 -1
  46. package/src/interfaces/terminal/components/ErrorBoundary.js +1 -1
  47. package/src/interfaces/terminal/components/ErrorPanel.js +1 -1
  48. package/src/interfaces/terminal/components/Header.js +1 -1
  49. package/src/interfaces/terminal/components/HelpPanel.js +1 -1
  50. package/src/interfaces/terminal/components/InputBox.js +1 -1
  51. package/src/interfaces/terminal/components/Layout.js +1 -1
  52. package/src/interfaces/terminal/components/LoadingSpinner.js +1 -1
  53. package/src/interfaces/terminal/components/MessageList.js +1 -1
  54. package/src/interfaces/terminal/components/MultilineTextInput.js +1 -1
  55. package/src/interfaces/terminal/components/SearchPanel.js +1 -1
  56. package/src/interfaces/terminal/components/SettingsPanel.js +1 -1
  57. package/src/interfaces/terminal/components/StatusBar.js +1 -1
  58. package/src/interfaces/terminal/components/TextInput.js +1 -1
  59. package/src/interfaces/terminal/config/agentEditorConstants.js +1 -1
  60. package/src/interfaces/terminal/config/constants.js +1 -1
  61. package/src/interfaces/terminal/index.js +1 -1
  62. package/src/interfaces/terminal/state/useAgentControl.js +1 -1
  63. package/src/interfaces/terminal/state/useAgents.js +1 -1
  64. package/src/interfaces/terminal/state/useConnection.js +1 -1
  65. package/src/interfaces/terminal/state/useMessages.js +1 -1
  66. package/src/interfaces/terminal/state/useTools.js +1 -1
  67. package/src/interfaces/terminal/utils/debugLogger.js +1 -1
  68. package/src/interfaces/terminal/utils/settingsStorage.js +1 -1
  69. package/src/interfaces/terminal/utils/theme.js +1 -1
  70. package/src/interfaces/webServer.js +1 -1
  71. package/src/modules/fileExplorer/controller.js +1 -1
  72. package/src/modules/fileExplorer/index.js +1 -1
  73. package/src/modules/fileExplorer/middleware.js +1 -1
  74. package/src/modules/fileExplorer/routes.js +1 -1
  75. package/src/services/agentActivityService.js +1 -1
  76. package/src/services/aiService.js +1 -1
  77. package/src/services/apiKeyManager.js +1 -1
  78. package/src/services/benchmarkService.js +1 -1
  79. package/src/services/budgetService.js +1 -1
  80. package/src/services/contextInjectionService.js +1 -1
  81. package/src/services/conversationCompactionService.js +1 -1
  82. package/src/services/errorHandler.js +1 -1
  83. package/src/services/fileAttachmentService.js +1 -1
  84. package/src/services/modelRouterService.js +1 -1
  85. package/src/services/modelsService.js +1 -1
  86. package/src/services/qualityInspector.js +1 -1
  87. package/src/services/tokenCountingService.js +1 -1
  88. package/src/tools/agentCommunicationTool.js +1 -1
  89. package/src/tools/agentDelayTool.js +1 -1
  90. package/src/tools/asyncToolManager.js +1 -1
  91. package/src/tools/baseTool.js +1 -1
  92. package/src/tools/browserTool.js +1 -1
  93. package/src/tools/cloneDetectionTool.js +1 -1
  94. package/src/tools/dependencyResolverTool.js +1 -1
  95. package/src/tools/fileContentReplaceTool.js +1 -1
  96. package/src/tools/fileSystemTool.js +1 -1
  97. package/src/tools/fileTreeTool.js +1 -1
  98. package/src/tools/imageTool.js +1 -1
  99. package/src/tools/importAnalyzerTool.js +1 -1
  100. package/src/tools/jobDoneTool.js +1 -1
  101. package/src/tools/seekTool.js +1 -1
  102. package/src/tools/staticAnalysisTool.js +1 -1
  103. package/src/tools/taskManagerTool.js +1 -1
  104. package/src/tools/terminalTool.js +1 -1
  105. package/src/tools/webTool.js +1 -1
  106. package/src/types/agent.js +1 -1
  107. package/src/types/contextReference.js +1 -1
  108. package/src/types/conversation.js +1 -1
  109. package/src/types/toolCommand.js +1 -1
  110. package/src/utilities/attachmentValidator.js +1 -1
  111. package/src/utilities/configManager.js +1 -1
  112. package/src/utilities/constants.js +1 -1
  113. package/src/utilities/directoryAccessManager.js +1 -1
  114. package/src/utilities/fileProcessor.js +1 -1
  115. package/src/utilities/logger.js +1 -1
  116. package/src/utilities/tagParser.js +1 -1
  117. package/src/utilities/toolConstants.js +1 -1
  118. package/src/utilities/userDataDir.js +1 -1
  119. package/web-ui/build/index.html +1 -1
  120. package/web-ui/build/static/{index-DL2-PyNX.js → index-CcwO7jS4.js} +8 -8
package/README.md CHANGED
@@ -99,7 +99,7 @@ npm install -g @loxia-labs/loxia-autopilot-one
99
99
 
100
100
  ```bash
101
101
  loxia --version
102
- # Should display: Loxia Autopilot One v1.0.18
102
+ # Should display: Loxia Autopilot One v1.0.19
103
103
  ```
104
104
 
105
105
  ### 4. Create an API Key
@@ -369,7 +369,7 @@ Loxia automatically compacts long conversations to stay within token limits:
369
369
 
370
370
  ## 🛣️ Roadmap
371
371
 
372
- ### Current Version (1.0.18)
372
+ ### Current Version (1.0.19)
373
373
 
374
374
  - ✅ Multi-agent orchestration
375
375
  - ✅ 18+ specialized tools
package/bin/cli.js CHANGED
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- const a0_0x17e29c=a0_0x4da5;(function(_0x36c68a,_0x1ff2ef){const _0x47a18c=a0_0x4da5,_0x79798e=_0x36c68a();while(!![]){try{const _0x486473=-parseInt(_0x47a18c(0x14a))/0x1+parseInt(_0x47a18c(0x124))/0x2+parseInt(_0x47a18c(0x144))/0x3+parseInt(_0x47a18c(0x15c))/0x4+parseInt(_0x47a18c(0x139))/0x5+-parseInt(_0x47a18c(0x13a))/0x6+-parseInt(_0x47a18c(0x135))/0x7*(parseInt(_0x47a18c(0x123))/0x8);if(_0x486473===_0x1ff2ef)break;else _0x79798e['push'](_0x79798e['shift']());}catch(_0x206354){_0x79798e['push'](_0x79798e['shift']());}}}(a0_0x579c,0xaf695));import{fileURLToPath}from'url';import{dirname,join}from'path';import{spawn,exec}from'child_process';import{readFileSync}from'fs';import a0_0x4ce4f1 from'http';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename),DEFAULT_PORT=0x1f90,DEFAULT_HOST=a0_0x17e29c(0x142),SERVER_STARTUP_TIMEOUT=0x3a98,SERVER_CHECK_INTERVAL=0x1f4,args=process['argv'][a0_0x17e29c(0x156)](0x2),command=args[0x0]&&!args[0x0][a0_0x17e29c(0x149)]('--')?args[0x0]:null,flags={'port':null,'host':null,'help':args[a0_0x17e29c(0x160)]('--help')||args[a0_0x17e29c(0x160)]('-h'),'version':args['includes'](a0_0x17e29c(0x132))||args[a0_0x17e29c(0x160)]('-v')};function a0_0x4da5(_0x409975,_0x591818){_0x409975=_0x409975-0x121;const _0x579c6d=a0_0x579c();let _0x4da5d4=_0x579c6d[_0x409975];return _0x4da5d4;}for(let i=0x0;i<args[a0_0x17e29c(0x12c)];i++){args[i]===a0_0x17e29c(0x12d)&&args[i+0x1]&&(flags[a0_0x17e29c(0x130)]=parseInt(args[i+0x1],0xa)),args[i]===a0_0x17e29c(0x14e)&&args[i+0x1]&&(flags[a0_0x17e29c(0x157)]=args[i+0x1]);}const port=flags[a0_0x17e29c(0x130)]||DEFAULT_PORT,host=flags[a0_0x17e29c(0x157)]||DEFAULT_HOST,serverUrl=a0_0x17e29c(0x154)+host+':'+port;if(flags['version']){const pkgPath=join(__dirname,'..',a0_0x17e29c(0x146)),pkg=JSON[a0_0x17e29c(0x133)](readFileSync(pkgPath,a0_0x17e29c(0x134)));console[a0_0x17e29c(0x167)](a0_0x17e29c(0x15f)+pkg['version']),process[a0_0x17e29c(0x169)](0x0);}if(flags['help']||!command){const pkgPath=join(__dirname,'..',a0_0x17e29c(0x146)),pkg=JSON[a0_0x17e29c(0x133)](readFileSync(pkgPath,a0_0x17e29c(0x134)));console[a0_0x17e29c(0x167)](a0_0x17e29c(0x143)+pkg[a0_0x17e29c(0x125)]+a0_0x17e29c(0x162)+DEFAULT_PORT+a0_0x17e29c(0x12f)+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_0x17e29c(0x169)](0x0);}async function checkServerRunning(_0x2692a1,_0x39bae7,_0x53cd21=0x1){for(let _0x5cb1bb=0x0;_0x5cb1bb<_0x53cd21;_0x5cb1bb++){const _0x42cc7f=await new Promise(_0x2bb33c=>{const _0x478dcc=a0_0x4da5,_0x23b566=a0_0x4ce4f1[_0x478dcc(0x127)](_0x478dcc(0x154)+_0x2692a1+':'+_0x39bae7+_0x478dcc(0x12e),_0x227794=>{const _0x3dc341=_0x478dcc;_0x2bb33c(_0x227794[_0x3dc341(0x13d)]===0xc8);});_0x23b566['on'](_0x478dcc(0x14f),()=>_0x2bb33c(![])),_0x23b566[_0x478dcc(0x164)](0x7d0,()=>{const _0x3afbb2=_0x478dcc;_0x23b566[_0x3afbb2(0x13c)](),_0x2bb33c(![]);});});if(_0x42cc7f)return!![];_0x5cb1bb<_0x53cd21-0x1&&await new Promise(_0x39201c=>setTimeout(_0x39201c,SERVER_CHECK_INTERVAL));}return![];}async function waitForServer(_0x45660a,_0x24aed4,_0x291e5c=SERVER_STARTUP_TIMEOUT){const _0x4b6ee9=a0_0x17e29c,_0x5cb5be=Math[_0x4b6ee9(0x148)](_0x291e5c/SERVER_CHECK_INTERVAL);return checkServerRunning(_0x45660a,_0x24aed4,_0x5cb5be);}function openBrowser(_0x1cc75e){const _0x53b815=a0_0x17e29c,_0x456ee2=process['platform'];let _0x315e94;if(_0x456ee2==='darwin')_0x315e94=_0x53b815(0x138)+_0x1cc75e+'\x22';else _0x456ee2===_0x53b815(0x141)?_0x315e94=_0x53b815(0x151)+_0x1cc75e+'\x22':_0x315e94=_0x53b815(0x166)+_0x1cc75e+'\x22';exec(_0x315e94,_0x54ee8e=>{const _0x443bf6=_0x53b815;_0x54ee8e&&(console[_0x443bf6(0x167)](_0x443bf6(0x161)),console[_0x443bf6(0x167)](_0x443bf6(0x136)+_0x1cc75e));});}function startServer(_0x184f9b=![]){const _0x36f1d5=a0_0x17e29c,_0x21a131={...process[_0x36f1d5(0x150)],'LOXIA_PORT':port[_0x36f1d5(0x163)](),'PORT':port['toString']()};flags['host']&&(_0x21a131[_0x36f1d5(0x13f)]=flags[_0x36f1d5(0x157)]);const _0x4f4b72=join(__dirname,'..',_0x36f1d5(0x145),_0x36f1d5(0x129)),_0x5efcf3=spawn(_0x36f1d5(0x15a),[_0x4f4b72],{'cwd':join(__dirname,'..'),'env':_0x21a131,'stdio':_0x184f9b?['ignore',_0x36f1d5(0x14d),_0x36f1d5(0x14d)]:_0x36f1d5(0x15b),'detached':_0x184f9b});return _0x184f9b&&_0x5efcf3[_0x36f1d5(0x147)](),_0x5efcf3;}function startTerminalUI(){const _0x2c6454=a0_0x17e29c,_0x2e3fcf=join(__dirname,_0x2c6454(0x131)),_0x22a0c5={...process[_0x2c6454(0x150)],'LOXIA_PORT':port[_0x2c6454(0x163)](),'LOXIA_HOST':host},_0x22c242=spawn(_0x2c6454(0x15a),[_0x2e3fcf],{'cwd':join(__dirname,'..'),'env':_0x22a0c5,'stdio':_0x2c6454(0x15b)});return _0x22c242;}function a0_0x579c(){const _0x3cdbe0=['1127ONLyEQ','Please\x20open\x20manually:\x20','Server\x20is\x20running\x20at\x20','open\x20\x22','3165875wUZZYV','3359808YEMXQw','Server\x20running\x20at\x20','destroy','statusCode','\x0aShutting\x20down\x20server...','LOXIA_HOST','SIGTERM','win32','localhost','\x0aLoxia\x20Autopilot\x20One\x20v','2300232nUosUU','src','package.json','unref','ceil','startsWith','1174173DEptse','Error:','Waiting\x20for\x20server\x20to\x20start...','ignore','--host','error','env','start\x20\x22\x22\x20\x22','Starting\x20Terminal\x20UI...\x0a','catch','http://','Starting\x20Loxia\x20server\x20in\x20background...','slice','host','Starting\x20Loxia\x20server...\x0a','\x0aPlease\x20start\x20the\x20server\x20first:','node','inherit','4251924sRPCXB','\x0aServer\x20may\x20still\x20be\x20starting.\x20Open\x20','Run\x20\x22loxia\x20--help\x22\x20for\x20usage\x20information.','Loxia\x20Autopilot\x20One\x20v','includes','Could\x20not\x20open\x20browser\x20automatically.','\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','toString','setTimeout','\x20\x20loxia\x20plus-terminal\x20\x20#\x20Start\x20server\x20+\x20Terminal\x20UI\x0a','xdg-open\x20\x22','log','SIGINT','exit','pid','kill','41744tfgyNe','1659648pTlIMh','version','\x0aServer\x20is\x20not\x20running\x20at\x20','get','\x20\x20loxia\x20web\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Start\x20server\x20+\x20Web\x20UI','index.js','Checking\x20if\x20server\x20is\x20running...','\x0aServer\x20failed\x20to\x20start.\x20Please\x20check\x20logs.','length','--port','/api/health',')\x0a\x20\x20--host\x20<host>\x20\x20\x20\x20\x20Specify\x20host\x20(default:\x20','port','loxia-terminal.js','--version','parse','utf8'];a0_0x579c=function(){return _0x3cdbe0;};return a0_0x579c();}const commands={'web':async()=>{const _0x4048ef=a0_0x17e29c;console[_0x4048ef(0x167)](_0x4048ef(0x158));const _0x38d306=startServer(![]);console[_0x4048ef(0x167)](_0x4048ef(0x14c));const _0x2dbb94=await waitForServer(host,port);_0x2dbb94?(console[_0x4048ef(0x167)]('\x0aOpening\x20Web\x20UI\x20at\x20'+serverUrl),openBrowser(serverUrl)):console['log'](_0x4048ef(0x15d)+serverUrl+'\x20manually.'),process['on'](_0x4048ef(0x168),()=>_0x38d306[_0x4048ef(0x122)]('SIGINT')),process['on'](_0x4048ef(0x140),()=>_0x38d306[_0x4048ef(0x122)](_0x4048ef(0x140))),_0x38d306['on'](_0x4048ef(0x169),_0xec8d14=>process[_0x4048ef(0x169)](_0xec8d14||0x0));},'plus-web':async()=>{await commands['web']();},'terminal':async()=>{const _0x5ec065=a0_0x17e29c;console[_0x5ec065(0x167)](_0x5ec065(0x12a));const _0x53769d=await checkServerRunning(host,port);!_0x53769d&&(console['error'](_0x5ec065(0x126)+serverUrl),console[_0x5ec065(0x14f)](_0x5ec065(0x159)),console['error'](_0x5ec065(0x128)),console[_0x5ec065(0x14f)](_0x5ec065(0x165)),process[_0x5ec065(0x169)](0x1));console[_0x5ec065(0x167)](_0x5ec065(0x137)+serverUrl),console[_0x5ec065(0x167)](_0x5ec065(0x152));const _0x401f44=startTerminalUI();process['on']('SIGINT',()=>_0x401f44[_0x5ec065(0x122)]('SIGINT')),process['on'](_0x5ec065(0x140),()=>_0x401f44[_0x5ec065(0x122)](_0x5ec065(0x140))),_0x401f44['on']('exit',_0x2959e5=>process[_0x5ec065(0x169)](_0x2959e5||0x0));},'plus-terminal':async()=>{const _0x4cdd31=a0_0x17e29c;console[_0x4cdd31(0x167)](_0x4cdd31(0x155));const _0x14bc80=startServer(!![]),_0x41320a=await waitForServer(host,port);!_0x41320a&&(console[_0x4cdd31(0x14f)](_0x4cdd31(0x12b)),process['exit'](0x1));console[_0x4cdd31(0x167)](_0x4cdd31(0x13b)+serverUrl),console[_0x4cdd31(0x167)](_0x4cdd31(0x152));const _0x5aa800=startTerminalUI();_0x5aa800['on']('exit',_0x588ad2=>{const _0x4f6568=_0x4cdd31;console[_0x4f6568(0x167)](_0x4f6568(0x13e));try{process['kill'](_0x14bc80[_0x4f6568(0x121)],_0x4f6568(0x140));}catch(_0x594efe){}process[_0x4f6568(0x169)](_0x588ad2||0x0);}),process['on'](_0x4cdd31(0x168),()=>{const _0x521956=_0x4cdd31;_0x5aa800[_0x521956(0x122)](_0x521956(0x168));}),process['on']('SIGTERM',()=>{const _0x4dd42e=_0x4cdd31;_0x5aa800[_0x4dd42e(0x122)]('SIGTERM');});}};commands[command]?commands[command]()[a0_0x17e29c(0x153)](_0xe1d898=>{const _0x23cc14=a0_0x17e29c;console[_0x23cc14(0x14f)](_0x23cc14(0x14b),_0xe1d898['message']),process['exit'](0x1);}):(console[a0_0x17e29c(0x14f)]('Unknown\x20command:\x20'+command),console[a0_0x17e29c(0x14f)](a0_0x17e29c(0x15e)),process[a0_0x17e29c(0x169)](0x1));
3
+ const a0_0x3455d4=a0_0x2017;(function(_0x55acdf,_0x4ff77b){const _0x5511e8=a0_0x2017,_0x3e5950=_0x55acdf();while(!![]){try{const _0xf92874=-parseInt(_0x5511e8(0xcf))/0x1+parseInt(_0x5511e8(0xb3))/0x2+-parseInt(_0x5511e8(0xde))/0x3*(parseInt(_0x5511e8(0xbe))/0x4)+parseInt(_0x5511e8(0xb2))/0x5+parseInt(_0x5511e8(0xc0))/0x6+-parseInt(_0x5511e8(0xf3))/0x7+parseInt(_0x5511e8(0xd9))/0x8*(parseInt(_0x5511e8(0xea))/0x9);if(_0xf92874===_0x4ff77b)break;else _0x3e5950['push'](_0x3e5950['shift']());}catch(_0x4d9248){_0x3e5950['push'](_0x3e5950['shift']());}}}(a0_0x2864,0xc7936));import{fileURLToPath}from'url';import{dirname,join}from'path';import{spawn,exec}from'child_process';import{readFileSync}from'fs';function a0_0x2864(){const _0x42f83b=['web','package.json','8216757byoQgw',')\x0a\x20\x20--host\x20<host>\x20\x20\x20\x20\x20Specify\x20host\x20(default:\x20','inherit','startsWith','\x20\x20loxia\x20web\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Start\x20server\x20+\x20Web\x20UI','message','Starting\x20Loxia\x20server\x20in\x20background...','utf8','platform','10149580SHAiKC','\x0aPlease\x20start\x20the\x20server\x20first:','exit','2276085MsoMpp','2005510VALhxr','SIGINT','Please\x20open\x20manually:\x20','catch','log','start\x20\x22\x22\x20\x22','setTimeout','--version','includes','Loxia\x20Autopilot\x20One\x20v','http://','709264qHgMhT','ceil','8449206VoudTp','Checking\x20if\x20server\x20is\x20running...','Run\x20\x22loxia\x20--help\x22\x20for\x20usage\x20information.','port','destroy','\x0aServer\x20failed\x20to\x20start.\x20Please\x20check\x20logs.','xdg-open\x20\x22','node','statusCode','host','\x20manually.','env','src','\x0aLoxia\x20Autopilot\x20One\x20v','help','1538137sDjJsm','Starting\x20Loxia\x20server...\x0a','toString','\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','version','argv','pid','ignore','parse','SIGTERM','16ZPuHfh','\x0aShutting\x20down\x20server...','--port','\x0aOpening\x20Web\x20UI\x20at\x20','kill','15rpNXzk','--host','Unknown\x20command:\x20','win32','length','error','Could\x20not\x20open\x20browser\x20automatically.','\x0aServer\x20is\x20not\x20running\x20at\x20','/api/health','index.js'];a0_0x2864=function(){return _0x42f83b;};return a0_0x2864();}import a0_0x1c80b4 from'http';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename),DEFAULT_PORT=0x1f90,DEFAULT_HOST='localhost',SERVER_STARTUP_TIMEOUT=0x3a98,SERVER_CHECK_INTERVAL=0x1f4,args=process[a0_0x3455d4(0xd4)]['slice'](0x2),command=args[0x0]&&!args[0x0][a0_0x3455d4(0xed)]('--')?args[0x0]:null,flags={'port':null,'host':null,'help':args['includes']('--help')||args[a0_0x3455d4(0xbb)]('-h'),'version':args[a0_0x3455d4(0xbb)](a0_0x3455d4(0xba))||args[a0_0x3455d4(0xbb)]('-v')};for(let i=0x0;i<args[a0_0x3455d4(0xe2)];i++){args[i]===a0_0x3455d4(0xdb)&&args[i+0x1]&&(flags['port']=parseInt(args[i+0x1],0xa)),args[i]===a0_0x3455d4(0xdf)&&args[i+0x1]&&(flags[a0_0x3455d4(0xc9)]=args[i+0x1]);}const port=flags[a0_0x3455d4(0xc3)]||DEFAULT_PORT,host=flags[a0_0x3455d4(0xc9)]||DEFAULT_HOST,serverUrl=a0_0x3455d4(0xbd)+host+':'+port;if(flags['version']){const pkgPath=join(__dirname,'..',a0_0x3455d4(0xe9)),pkg=JSON[a0_0x3455d4(0xd7)](readFileSync(pkgPath,a0_0x3455d4(0xf1)));console[a0_0x3455d4(0xb7)](a0_0x3455d4(0xbc)+pkg[a0_0x3455d4(0xd3)]),process['exit'](0x0);}if(flags[a0_0x3455d4(0xce)]||!command){const pkgPath=join(__dirname,'..',a0_0x3455d4(0xe9)),pkg=JSON[a0_0x3455d4(0xd7)](readFileSync(pkgPath,a0_0x3455d4(0xf1)));console['log'](a0_0x3455d4(0xcd)+pkg['version']+a0_0x3455d4(0xd2)+DEFAULT_PORT+a0_0x3455d4(0xeb)+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['exit'](0x0);}async function checkServerRunning(_0x251934,_0x5aad9d,_0x4b9add=0x1){for(let _0x434726=0x0;_0x434726<_0x4b9add;_0x434726++){const _0x1d8da2=await new Promise(_0x189b29=>{const _0x589d55=a0_0x2017,_0xa67843=a0_0x1c80b4['get'](_0x589d55(0xbd)+_0x251934+':'+_0x5aad9d+_0x589d55(0xe6),_0x1258b3=>{const _0x58a2db=_0x589d55;_0x189b29(_0x1258b3[_0x58a2db(0xc8)]===0xc8);});_0xa67843['on']('error',()=>_0x189b29(![])),_0xa67843[_0x589d55(0xb9)](0x7d0,()=>{const _0x2cdc52=_0x589d55;_0xa67843[_0x2cdc52(0xc4)](),_0x189b29(![]);});});if(_0x1d8da2)return!![];_0x434726<_0x4b9add-0x1&&await new Promise(_0x1552f5=>setTimeout(_0x1552f5,SERVER_CHECK_INTERVAL));}return![];}async function waitForServer(_0x480fb2,_0xa7a71a,_0x3342d1=SERVER_STARTUP_TIMEOUT){const _0x350cf8=a0_0x3455d4,_0x1cd0d1=Math[_0x350cf8(0xbf)](_0x3342d1/SERVER_CHECK_INTERVAL);return checkServerRunning(_0x480fb2,_0xa7a71a,_0x1cd0d1);}function openBrowser(_0x4a620f){const _0x326a53=a0_0x3455d4,_0x44d295=process[_0x326a53(0xf2)];let _0x2675bd;if(_0x44d295==='darwin')_0x2675bd='open\x20\x22'+_0x4a620f+'\x22';else _0x44d295===_0x326a53(0xe1)?_0x2675bd=_0x326a53(0xb8)+_0x4a620f+'\x22':_0x2675bd=_0x326a53(0xc6)+_0x4a620f+'\x22';exec(_0x2675bd,_0x48b1d5=>{const _0x7fa4c0=_0x326a53;_0x48b1d5&&(console[_0x7fa4c0(0xb7)](_0x7fa4c0(0xe4)),console[_0x7fa4c0(0xb7)](_0x7fa4c0(0xb5)+_0x4a620f));});}function startServer(_0x5f54ae=![]){const _0x339ffd=a0_0x3455d4,_0x697ca3={...process[_0x339ffd(0xcb)],'LOXIA_PORT':port[_0x339ffd(0xd1)](),'PORT':port[_0x339ffd(0xd1)]()};flags['host']&&(_0x697ca3['LOXIA_HOST']=flags[_0x339ffd(0xc9)]);const _0x23559f=join(__dirname,'..',_0x339ffd(0xcc),_0x339ffd(0xe7)),_0x5ba812=spawn(_0x339ffd(0xc7),[_0x23559f],{'cwd':join(__dirname,'..'),'env':_0x697ca3,'stdio':_0x5f54ae?[_0x339ffd(0xd6),_0x339ffd(0xd6),_0x339ffd(0xd6)]:_0x339ffd(0xec),'detached':_0x5f54ae});return _0x5f54ae&&_0x5ba812['unref'](),_0x5ba812;}function a0_0x2017(_0x244b06,_0x229135){_0x244b06=_0x244b06-0xb0;const _0x286474=a0_0x2864();let _0x2017e9=_0x286474[_0x244b06];return _0x2017e9;}function startTerminalUI(){const _0x1399f9=a0_0x3455d4,_0x129c59=join(__dirname,'loxia-terminal.js'),_0x4f25e5={...process[_0x1399f9(0xcb)],'LOXIA_PORT':port[_0x1399f9(0xd1)](),'LOXIA_HOST':host},_0x5b270e=spawn(_0x1399f9(0xc7),[_0x129c59],{'cwd':join(__dirname,'..'),'env':_0x4f25e5,'stdio':'inherit'});return _0x5b270e;}const commands={'web':async()=>{const _0x426440=a0_0x3455d4;console[_0x426440(0xb7)](_0x426440(0xd0));const _0x3298ce=startServer(![]);console[_0x426440(0xb7)]('Waiting\x20for\x20server\x20to\x20start...');const _0x5ae852=await waitForServer(host,port);_0x5ae852?(console[_0x426440(0xb7)](_0x426440(0xdc)+serverUrl),openBrowser(serverUrl)):console['log']('\x0aServer\x20may\x20still\x20be\x20starting.\x20Open\x20'+serverUrl+_0x426440(0xca)),process['on'](_0x426440(0xb4),()=>_0x3298ce['kill']('SIGINT')),process['on'](_0x426440(0xd8),()=>_0x3298ce[_0x426440(0xdd)]('SIGTERM')),_0x3298ce['on']('exit',_0x2ae4b0=>process['exit'](_0x2ae4b0||0x0));},'plus-web':async()=>{const _0x440e89=a0_0x3455d4;await commands[_0x440e89(0xe8)]();},'terminal':async()=>{const _0x3bece4=a0_0x3455d4;console[_0x3bece4(0xb7)](_0x3bece4(0xc1));const _0x239f78=await checkServerRunning(host,port);!_0x239f78&&(console[_0x3bece4(0xe3)](_0x3bece4(0xe5)+serverUrl),console['error'](_0x3bece4(0xb0)),console[_0x3bece4(0xe3)](_0x3bece4(0xee)),console['error']('\x20\x20loxia\x20plus-terminal\x20\x20#\x20Start\x20server\x20+\x20Terminal\x20UI\x0a'),process[_0x3bece4(0xb1)](0x1));console[_0x3bece4(0xb7)]('Server\x20is\x20running\x20at\x20'+serverUrl),console['log']('Starting\x20Terminal\x20UI...\x0a');const _0x3e7c93=startTerminalUI();process['on'](_0x3bece4(0xb4),()=>_0x3e7c93[_0x3bece4(0xdd)](_0x3bece4(0xb4))),process['on'](_0x3bece4(0xd8),()=>_0x3e7c93[_0x3bece4(0xdd)](_0x3bece4(0xd8))),_0x3e7c93['on'](_0x3bece4(0xb1),_0x5ed981=>process['exit'](_0x5ed981||0x0));},'plus-terminal':async()=>{const _0x4cc0c6=a0_0x3455d4;console[_0x4cc0c6(0xb7)](_0x4cc0c6(0xf0));const _0x28eb00=startServer(!![]),_0x4c00c3=await waitForServer(host,port);!_0x4c00c3&&(console[_0x4cc0c6(0xe3)](_0x4cc0c6(0xc5)),process[_0x4cc0c6(0xb1)](0x1));console['log']('Server\x20running\x20at\x20'+serverUrl),console['log']('Starting\x20Terminal\x20UI...\x0a');const _0x570402=startTerminalUI();_0x570402['on'](_0x4cc0c6(0xb1),_0x53e784=>{const _0x3593e7=_0x4cc0c6;console[_0x3593e7(0xb7)](_0x3593e7(0xda));try{process['kill'](_0x28eb00[_0x3593e7(0xd5)],_0x3593e7(0xd8));}catch(_0x44beda){}process['exit'](_0x53e784||0x0);}),process['on'](_0x4cc0c6(0xb4),()=>{const _0x35d37c=_0x4cc0c6;_0x570402[_0x35d37c(0xdd)](_0x35d37c(0xb4));}),process['on'](_0x4cc0c6(0xd8),()=>{const _0x3b9d1a=_0x4cc0c6;_0x570402[_0x3b9d1a(0xdd)](_0x3b9d1a(0xd8));});}};commands[command]?commands[command]()[a0_0x3455d4(0xb6)](_0x5625fe=>{const _0x569bdd=a0_0x3455d4;console[_0x569bdd(0xe3)]('Error:',_0x5625fe[_0x569bdd(0xef)]),process[_0x569bdd(0xb1)](0x1);}):(console[a0_0x3455d4(0xe3)](a0_0x3455d4(0xe0)+command),console[a0_0x3455d4(0xe3)](a0_0x3455d4(0xc2)),process['exit'](0x1));
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- const a0_0x2cf118=a0_0x3b76;function a0_0x3b76(_0x4d9bee,_0xf0b11){_0x4d9bee=_0x4d9bee-0xaf;const _0x4b1ca4=a0_0x4b1c();let _0x3b7662=_0x4b1ca4[_0x4d9bee];return _0x3b7662;}(function(_0x7ed920,_0x2ea2c6){const _0x57d557=a0_0x3b76,_0x1653f9=_0x7ed920();while(!![]){try{const _0x5ec719=parseInt(_0x57d557(0xd8))/0x1+parseInt(_0x57d557(0xbf))/0x2*(parseInt(_0x57d557(0xb6))/0x3)+parseInt(_0x57d557(0xcf))/0x4+parseInt(_0x57d557(0xd2))/0x5*(-parseInt(_0x57d557(0xce))/0x6)+parseInt(_0x57d557(0xaf))/0x7*(-parseInt(_0x57d557(0xbe))/0x8)+parseInt(_0x57d557(0xb8))/0x9*(parseInt(_0x57d557(0xda))/0xa)+-parseInt(_0x57d557(0xc4))/0xb;if(_0x5ec719===_0x2ea2c6)break;else _0x1653f9['push'](_0x1653f9['shift']());}catch(_0x7c68e0){_0x1653f9['push'](_0x1653f9['shift']());}}}(a0_0x4b1c,0x7c63a));import{spawn}from'child_process';function a0_0x4b1c(){const _0x4650de=['node','localhost','--port','\x20\x20\x203.\x20Check\x20logs\x20for\x20more\x20details','ignore','1220808NuaQjc','681670gJHnpD','\x20\x20\x202.\x20Try\x20running\x20the\x20server\x20manually:\x20node\x20bin/cli.js','error','🔍\x20Checking\x20if\x20server\x20is\x20running\x20at\x20','../src/interfaces/terminal/index.js','13417283RxBxaJ','now','🎨\x20Launching\x20Ink-based\x20Terminal\x20UI...','dirname','stderr','pipe','--ui','join','kill','Failed\x20to\x20start\x20server:','31386GdIPJc','824820hcjZZM','destroy','length','185HzCnyy','━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━','slice','stdout','✗\x20Server\x20is\x20not\x20running','\x20\x20Loxia\x20Autopilot\x20One\x20-\x20Terminal\x20UI','806179bNGeeL','--host','762690koLkQz','Server\x20startup\x20timeout','env','\x20\x20\x201.\x20Make\x20sure\x20no\x20other\x20process\x20is\x20using\x20port\x208080','message','💡\x20Troubleshooting:','7BvMDqh','🚀\x20Starting\x20Loxia\x20server...','timeout','log','LOXIA_PORT','data','...','6RVskqN','connect','45OUaxuD'];a0_0x4b1c=function(){return _0x4650de;};return a0_0x4b1c();}import a0_0x52991e from'net';import a0_0x379c42 from'path';import{fileURLToPath}from'url';const __filename=fileURLToPath(import.meta.url),__dirname=a0_0x379c42[a0_0x2cf118(0xc7)](__filename),projectRoot=a0_0x379c42[a0_0x2cf118(0xc7)](__dirname),DEFAULT_PORT=0x1f90,DEFAULT_HOST=a0_0x2cf118(0xba),SERVER_STARTUP_TIMEOUT=0x2710;async function isServerRunning(_0x2601fa,_0x189d20){return new Promise(_0x3323ba=>{const _0x4c5281=a0_0x3b76,_0x2742ef=new a0_0x52991e['Socket']();_0x2742ef['setTimeout'](0x7d0),_0x2742ef['on'](_0x4c5281(0xb7),()=>{const _0x52bae7=_0x4c5281;_0x2742ef[_0x52bae7(0xd0)](),_0x3323ba(!![]);}),_0x2742ef['on'](_0x4c5281(0xb1),()=>{_0x2742ef['destroy'](),_0x3323ba(![]);}),_0x2742ef['on'](_0x4c5281(0xc1),()=>{const _0x33e579=_0x4c5281;_0x2742ef[_0x33e579(0xd0)](),_0x3323ba(![]);}),_0x2742ef[_0x4c5281(0xb7)](_0x189d20,_0x2601fa);});}async function startServer(_0x832155,_0x522127){const _0x5d8deb=a0_0x2cf118;return console[_0x5d8deb(0xb2)](_0x5d8deb(0xb0)),new Promise((_0xa711b8,_0x673d4d)=>{const _0x3ab309=_0x5d8deb,_0x339f90=spawn(_0x3ab309(0xb9),[a0_0x379c42[_0x3ab309(0xcb)](projectRoot,'bin/cli.js'),_0x3ab309(0xca),'web',_0x3ab309(0xd9),_0x832155,_0x3ab309(0xbb),_0x522127['toString']()],{'detached':![],'stdio':[_0x3ab309(0xbd),_0x3ab309(0xc9),_0x3ab309(0xc9)]});_0x339f90[_0x3ab309(0xd5)]['on'](_0x3ab309(0xb4),()=>{}),_0x339f90[_0x3ab309(0xc8)]['on'](_0x3ab309(0xb4),()=>{}),_0x339f90['on']('error',_0x328242=>{const _0x1e1efb=_0x3ab309;console[_0x1e1efb(0xc1)](_0x1e1efb(0xcd),_0x328242[_0x1e1efb(0xde)]),_0x673d4d(_0x328242);});const _0x4b6d69=Date[_0x3ab309(0xc5)](),_0xeed3e1=setInterval(async()=>{const _0x4a5eb9=_0x3ab309,_0x29b425=await isServerRunning(_0x832155,_0x522127);if(_0x29b425)clearInterval(_0xeed3e1),console[_0x4a5eb9(0xb2)]('✓\x20Server\x20started\x20at\x20'+_0x832155+':'+_0x522127),_0xa711b8();else Date[_0x4a5eb9(0xc5)]()-_0x4b6d69>SERVER_STARTUP_TIMEOUT&&(clearInterval(_0xeed3e1),_0x339f90[_0x4a5eb9(0xcc)](),_0x673d4d(new Error(_0x4a5eb9(0xdb))));},0x1f4);});}async function main(){const _0x48e7af=a0_0x2cf118;try{console[_0x48e7af(0xb2)](_0x48e7af(0xd3)),console[_0x48e7af(0xb2)](_0x48e7af(0xd7)),console[_0x48e7af(0xb2)](_0x48e7af(0xd3)),console[_0x48e7af(0xb2)]('');const _0x4ea6d8=process['argv'][_0x48e7af(0xd4)](0x2);let _0x5b5507=DEFAULT_HOST,_0x5673b9=DEFAULT_PORT;for(let _0x57c2e4=0x0;_0x57c2e4<_0x4ea6d8[_0x48e7af(0xd1)];_0x57c2e4++){if(_0x4ea6d8[_0x57c2e4]==='--host'&&_0x4ea6d8[_0x57c2e4+0x1])_0x5b5507=_0x4ea6d8[_0x57c2e4+0x1],_0x57c2e4++;else _0x4ea6d8[_0x57c2e4]===_0x48e7af(0xbb)&&_0x4ea6d8[_0x57c2e4+0x1]&&(_0x5673b9=parseInt(_0x4ea6d8[_0x57c2e4+0x1],0xa),_0x57c2e4++);}console['log'](_0x48e7af(0xc2)+_0x5b5507+':'+_0x5673b9+_0x48e7af(0xb5));const _0xe19392=await isServerRunning(_0x5b5507,_0x5673b9);!_0xe19392?(console['log'](_0x48e7af(0xd6)),await startServer(_0x5b5507,_0x5673b9)):console[_0x48e7af(0xb2)]('✓\x20Server\x20is\x20already\x20running\x20at\x20'+_0x5b5507+':'+_0x5673b9),console[_0x48e7af(0xb2)](''),console[_0x48e7af(0xb2)](_0x48e7af(0xc6)),console[_0x48e7af(0xb2)](''),await new Promise(_0x6718ba=>setTimeout(_0x6718ba,0x1f4)),process[_0x48e7af(0xdc)]['LOXIA_HOST']=_0x5b5507,process['env'][_0x48e7af(0xb3)]=_0x5673b9['toString'](),await import(_0x48e7af(0xc3));}catch(_0x39ec28){console[_0x48e7af(0xc1)](''),console[_0x48e7af(0xc1)]('❌\x20Failed\x20to\x20start\x20Terminal\x20UI:'),console[_0x48e7af(0xc1)]('\x20\x20',_0x39ec28['message']),console[_0x48e7af(0xc1)](''),console[_0x48e7af(0xc1)](_0x48e7af(0xdf)),console[_0x48e7af(0xc1)](_0x48e7af(0xdd)),console[_0x48e7af(0xc1)](_0x48e7af(0xc0)),console[_0x48e7af(0xc1)](_0x48e7af(0xbc)),console[_0x48e7af(0xc1)](''),process['exit'](0x1);}}main();
3
+ const a0_0x28d422=a0_0xce81;(function(_0x20648c,_0x28fc5b){const _0x283b51=a0_0xce81,_0x31d8ad=_0x20648c();while(!![]){try{const _0x14fccd=-parseInt(_0x283b51(0xc4))/0x1*(parseInt(_0x283b51(0xb7))/0x2)+parseInt(_0x283b51(0xda))/0x3*(-parseInt(_0x283b51(0xc0))/0x4)+-parseInt(_0x283b51(0xd3))/0x5*(parseInt(_0x283b51(0xdd))/0x6)+parseInt(_0x283b51(0xdf))/0x7*(-parseInt(_0x283b51(0xb1))/0x8)+-parseInt(_0x283b51(0xd6))/0x9+-parseInt(_0x283b51(0xbe))/0xa*(parseInt(_0x283b51(0xc6))/0xb)+parseInt(_0x283b51(0xc9))/0xc;if(_0x14fccd===_0x28fc5b)break;else _0x31d8ad['push'](_0x31d8ad['shift']());}catch(_0x32a85e){_0x31d8ad['push'](_0x31d8ad['shift']());}}}(a0_0x44b3,0x7fe6c));import{spawn}from'child_process';import a0_0xee82d6 from'net';import a0_0x48a9cf from'path';import{fileURLToPath}from'url';const __filename=fileURLToPath(import.meta.url),__dirname=a0_0x48a9cf[a0_0x28d422(0xb6)](__filename),projectRoot=a0_0x48a9cf['dirname'](__dirname),DEFAULT_PORT=0x1f90,DEFAULT_HOST=a0_0x28d422(0xc7),SERVER_STARTUP_TIMEOUT=0x2710;function a0_0x44b3(){const _0x1f0322=['\x20\x20\x202.\x20Try\x20running\x20the\x20server\x20manually:\x20node\x20bin/cli.js','dirname','2nRYgmG','kill','━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━','\x20\x20Loxia\x20Autopilot\x20One\x20-\x20Terminal\x20UI','\x20\x20\x203.\x20Check\x20logs\x20for\x20more\x20details','❌\x20Failed\x20to\x20start\x20Terminal\x20UI:','--port','20rYaljw','LOXIA_HOST','1608cBizWl','LOXIA_PORT','timeout','log','949570JamhPg','pipe','155177yEGuNY','localhost','bin/cli.js','43437672vngODF','slice','--host','destroy','message','ignore','🔍\x20Checking\x20if\x20server\x20is\x20running\x20at\x20','error','data','web','1985JhaVtT','../src/interfaces/terminal/index.js','--ui','8035470BjuFJR','connect','length','now','6717PdsZSa','node','argv','1614tuLMCa','stderr','7szzBdl','✗\x20Server\x20is\x20not\x20running','🚀\x20Starting\x20Loxia\x20server...','✓\x20Server\x20started\x20at\x20','Failed\x20to\x20start\x20server:','1747496qEDWmn','join','Server\x20startup\x20timeout','🎨\x20Launching\x20Ink-based\x20Terminal\x20UI...'];a0_0x44b3=function(){return _0x1f0322;};return a0_0x44b3();}async function isServerRunning(_0x1cbddc,_0x1de971){return new Promise(_0x4f6ea2=>{const _0x2a85e8=a0_0xce81,_0x3e70fe=new a0_0xee82d6['Socket']();_0x3e70fe['setTimeout'](0x7d0),_0x3e70fe['on'](_0x2a85e8(0xd7),()=>{_0x3e70fe['destroy'](),_0x4f6ea2(!![]);}),_0x3e70fe['on'](_0x2a85e8(0xc2),()=>{const _0x3336fd=_0x2a85e8;_0x3e70fe[_0x3336fd(0xcc)](),_0x4f6ea2(![]);}),_0x3e70fe['on'](_0x2a85e8(0xd0),()=>{_0x3e70fe['destroy'](),_0x4f6ea2(![]);}),_0x3e70fe[_0x2a85e8(0xd7)](_0x1de971,_0x1cbddc);});}async function startServer(_0x2acd4d,_0x536f7f){const _0x3b68a5=a0_0x28d422;return console['log'](_0x3b68a5(0xae)),new Promise((_0x4a74e3,_0xc3bdd1)=>{const _0x543a94=_0x3b68a5,_0x2d36a1=spawn(_0x543a94(0xdb),[a0_0x48a9cf[_0x543a94(0xb2)](projectRoot,_0x543a94(0xc8)),_0x543a94(0xd5),_0x543a94(0xd2),_0x543a94(0xcb),_0x2acd4d,'--port',_0x536f7f['toString']()],{'detached':![],'stdio':[_0x543a94(0xce),_0x543a94(0xc5),'pipe']});_0x2d36a1['stdout']['on'](_0x543a94(0xd1),()=>{}),_0x2d36a1[_0x543a94(0xde)]['on'](_0x543a94(0xd1),()=>{}),_0x2d36a1['on'](_0x543a94(0xd0),_0x3fafaf=>{const _0x3d4490=_0x543a94;console[_0x3d4490(0xd0)](_0x3d4490(0xb0),_0x3fafaf['message']),_0xc3bdd1(_0x3fafaf);});const _0x57fb5d=Date[_0x543a94(0xd9)](),_0x3633e3=setInterval(async()=>{const _0x1d9c9d=_0x543a94,_0x3ee46c=await isServerRunning(_0x2acd4d,_0x536f7f);if(_0x3ee46c)clearInterval(_0x3633e3),console['log'](_0x1d9c9d(0xaf)+_0x2acd4d+':'+_0x536f7f),_0x4a74e3();else Date['now']()-_0x57fb5d>SERVER_STARTUP_TIMEOUT&&(clearInterval(_0x3633e3),_0x2d36a1[_0x1d9c9d(0xb8)](),_0xc3bdd1(new Error(_0x1d9c9d(0xb3))));},0x1f4);});}async function main(){const _0x33880c=a0_0x28d422;try{console[_0x33880c(0xc3)](_0x33880c(0xb9)),console['log'](_0x33880c(0xba)),console[_0x33880c(0xc3)]('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━'),console[_0x33880c(0xc3)]('');const _0xb5ea49=process[_0x33880c(0xdc)][_0x33880c(0xca)](0x2);let _0x2aa5d4=DEFAULT_HOST,_0x279386=DEFAULT_PORT;for(let _0x1ca92b=0x0;_0x1ca92b<_0xb5ea49[_0x33880c(0xd8)];_0x1ca92b++){if(_0xb5ea49[_0x1ca92b]===_0x33880c(0xcb)&&_0xb5ea49[_0x1ca92b+0x1])_0x2aa5d4=_0xb5ea49[_0x1ca92b+0x1],_0x1ca92b++;else _0xb5ea49[_0x1ca92b]===_0x33880c(0xbd)&&_0xb5ea49[_0x1ca92b+0x1]&&(_0x279386=parseInt(_0xb5ea49[_0x1ca92b+0x1],0xa),_0x1ca92b++);}console[_0x33880c(0xc3)](_0x33880c(0xcf)+_0x2aa5d4+':'+_0x279386+'...');const _0x5bcc74=await isServerRunning(_0x2aa5d4,_0x279386);!_0x5bcc74?(console[_0x33880c(0xc3)](_0x33880c(0xe0)),await startServer(_0x2aa5d4,_0x279386)):console[_0x33880c(0xc3)]('✓\x20Server\x20is\x20already\x20running\x20at\x20'+_0x2aa5d4+':'+_0x279386),console[_0x33880c(0xc3)](''),console['log'](_0x33880c(0xb4)),console[_0x33880c(0xc3)](''),await new Promise(_0x575fb0=>setTimeout(_0x575fb0,0x1f4)),process['env'][_0x33880c(0xbf)]=_0x2aa5d4,process['env'][_0x33880c(0xc1)]=_0x279386['toString'](),await import(_0x33880c(0xd4));}catch(_0x2c46b4){console[_0x33880c(0xd0)](''),console['error'](_0x33880c(0xbc)),console['error']('\x20\x20',_0x2c46b4[_0x33880c(0xcd)]),console[_0x33880c(0xd0)](''),console[_0x33880c(0xd0)]('💡\x20Troubleshooting:'),console[_0x33880c(0xd0)]('\x20\x20\x201.\x20Make\x20sure\x20no\x20other\x20process\x20is\x20using\x20port\x208080'),console['error'](_0x33880c(0xb5)),console[_0x33880c(0xd0)](_0x33880c(0xbb)),console[_0x33880c(0xd0)](''),process['exit'](0x1);}}function a0_0xce81(_0x2a5d4d,_0x3de434){_0x2a5d4d=_0x2a5d4d-0xae;const _0x44b3a8=a0_0x44b3();let _0xce8137=_0x44b3a8[_0x2a5d4d];return _0xce8137;}main();
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- const a0_0x4dd9fd=a0_0x3a1e;(function(_0x4996f,_0x2df47d){const _0x24f075=a0_0x3a1e,_0x14827f=_0x4996f();while(!![]){try{const _0x5eac02=parseInt(_0x24f075(0xcc))/0x1+-parseInt(_0x24f075(0xe5))/0x2+parseInt(_0x24f075(0xdb))/0x3*(parseInt(_0x24f075(0xcf))/0x4)+-parseInt(_0x24f075(0xe4))/0x5*(-parseInt(_0x24f075(0xda))/0x6)+-parseInt(_0x24f075(0xce))/0x7+parseInt(_0x24f075(0xe7))/0x8*(parseInt(_0x24f075(0xd8))/0x9)+-parseInt(_0x24f075(0xde))/0xa;if(_0x5eac02===_0x2df47d)break;else _0x14827f['push'](_0x14827f['shift']());}catch(_0x700f6c){_0x14827f['push'](_0x14827f['shift']());}}}(a0_0x3671,0x6f980));function a0_0x3a1e(_0x7e0635,_0x32bcaf){_0x7e0635=_0x7e0635-0xc2;const _0x367159=a0_0x3671();let _0x3a1e17=_0x367159[_0x7e0635];return _0x3a1e17;}import{startTerminalUI}from'../src/interfaces/terminal/index.js';const args=process[a0_0x4dd9fd(0xe6)]['slice'](0x2),options={'host':a0_0x4dd9fd(0xdc),'port':0x1f90};for(let i=0x0;i<args[a0_0x4dd9fd(0xca)];i++){const arg=args[i];if(arg===a0_0x4dd9fd(0xc5)||arg==='-h')options[a0_0x4dd9fd(0xc7)]=args[++i];else{if(arg===a0_0x4dd9fd(0xcb)||arg==='-p')options[a0_0x4dd9fd(0xc6)]=parseInt(args[++i],0xa);else arg===a0_0x4dd9fd(0xc3)&&(console['log'](a0_0x4dd9fd(0xe0)),process['exit'](0x0));}}process[a0_0x4dd9fd(0xdf)][a0_0x4dd9fd(0xc8)]&&(options['host']=process['env'][a0_0x4dd9fd(0xc8)]);process['env'][a0_0x4dd9fd(0xd4)]&&(options[a0_0x4dd9fd(0xc6)]=parseInt(process[a0_0x4dd9fd(0xdf)][a0_0x4dd9fd(0xd4)],0xa));!process[a0_0x4dd9fd(0xe1)][a0_0x4dd9fd(0xc2)]&&(console[a0_0x4dd9fd(0xdd)]('ERROR:\x20Terminal\x20UI\x20requires\x20an\x20interactive\x20terminal\x20(TTY).'),console[a0_0x4dd9fd(0xdd)](''),console[a0_0x4dd9fd(0xdd)](a0_0x4dd9fd(0xe2)),console['error'](a0_0x4dd9fd(0xd0)),console[a0_0x4dd9fd(0xdd)](a0_0x4dd9fd(0xd9)),console[a0_0x4dd9fd(0xdd)](a0_0x4dd9fd(0xc9)),console[a0_0x4dd9fd(0xdd)]('\x20\x20-\x20Some\x20CI/CD\x20environments'),console[a0_0x4dd9fd(0xdd)](''),console['error']('Please\x20run\x20this\x20command\x20in\x20a\x20real\x20terminal\x20without\x20pipes\x20or\x20redirection:'),console[a0_0x4dd9fd(0xdd)]('\x20\x20npm\x20run\x20terminal-ui'),console[a0_0x4dd9fd(0xdd)](''),console['error'](a0_0x4dd9fd(0xd2)),console[a0_0x4dd9fd(0xdd)]('\x20\x20npm\x20start'),process['exit'](0x1));console[a0_0x4dd9fd(0xd6)](a0_0x4dd9fd(0xe3)),console['log'](a0_0x4dd9fd(0xcd)+options[a0_0x4dd9fd(0xc7)]+':'+options['port']),console[a0_0x4dd9fd(0xd6)](a0_0x4dd9fd(0xd7));const instance=startTerminalUI(options);instance['waitUntilExit']()[a0_0x4dd9fd(0xd5)](()=>{const _0x4ed653=a0_0x4dd9fd;console[_0x4ed653(0xd6)](_0x4ed653(0xc4)),process[_0x4ed653(0xd1)](0x0);})['catch'](_0x38c5f8=>{const _0x27e2c8=a0_0x4dd9fd;console[_0x27e2c8(0xdd)](_0x27e2c8(0xd3),_0x38c5f8),process[_0x27e2c8(0xd1)](0x1);});function a0_0x3671(){const _0x2642ca=['\x20\x20-\x20Piped\x20environments\x20(e.g.,\x20|\x20head,\x20|\x20grep)','exit','Or\x20use\x20the\x20web\x20UI\x20instead:','\x0aTerminal\x20UI\x20error:','LOXIA_PORT','then','log','Press\x20Ctrl+C\x20to\x20exit\x0a','9qOHVfG','\x20\x20-\x20Redirected\x20output\x20(e.g.,\x20>\x20file.txt,\x202>&1\x20|\x20...)','6xRwLxw','3hRTWbw','localhost','error','14590680syMieF','env','\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','stdin','The\x20terminal\x20UI\x20cannot\x20run\x20in:','Starting\x20Loxia\x20Terminal\x20UI...','4253290mQkgHu','1331396OXBgoa','argv','5655112fVaRWI','isTTY','--help','\x0aTerminal\x20UI\x20exited','--host','port','host','LOXIA_HOST','\x20\x20-\x20Background\x20processes\x20(e.g.,\x20&\x20at\x20the\x20end)','length','--port','719892uxAnSQ','Connecting\x20to:\x20','2417492REHQic','2599084SUrVUs'];a0_0x3671=function(){return _0x2642ca;};return a0_0x3671();}
3
+ const a0_0x27ab6f=a0_0x23a5;(function(_0x31e463,_0x10b9b1){const _0x59e947=a0_0x23a5,_0x212aaf=_0x31e463();while(!![]){try{const _0x4bec8d=parseInt(_0x59e947(0x191))/0x1*(parseInt(_0x59e947(0x1b1))/0x2)+parseInt(_0x59e947(0x19f))/0x3*(-parseInt(_0x59e947(0x19e))/0x4)+parseInt(_0x59e947(0x1aa))/0x5*(parseInt(_0x59e947(0x19a))/0x6)+parseInt(_0x59e947(0x1a7))/0x7+parseInt(_0x59e947(0x190))/0x8*(parseInt(_0x59e947(0x1a0))/0x9)+parseInt(_0x59e947(0x1ae))/0xa+-parseInt(_0x59e947(0x199))/0xb*(parseInt(_0x59e947(0x19b))/0xc);if(_0x4bec8d===_0x10b9b1)break;else _0x212aaf['push'](_0x212aaf['shift']());}catch(_0x39f9de){_0x212aaf['push'](_0x212aaf['shift']());}}}(a0_0xb436,0xcaf1d));import{startTerminalUI}from'../src/interfaces/terminal/index.js';const args=process[a0_0x27ab6f(0x198)][a0_0x27ab6f(0x19c)](0x2),options={'host':'localhost','port':0x1f90};for(let i=0x0;i<args[a0_0x27ab6f(0x1af)];i++){const arg=args[i];if(arg==='--host'||arg==='-h')options['host']=args[++i];else{if(arg===a0_0x27ab6f(0x1a4)||arg==='-p')options[a0_0x27ab6f(0x194)]=parseInt(args[++i],0xa);else arg==='--help'&&(console[a0_0x27ab6f(0x1a6)](a0_0x27ab6f(0x1a2)),process[a0_0x27ab6f(0x1b0)](0x0));}}process[a0_0x27ab6f(0x1ad)][a0_0x27ab6f(0x192)]&&(options[a0_0x27ab6f(0x197)]=process[a0_0x27ab6f(0x1ad)][a0_0x27ab6f(0x192)]);process[a0_0x27ab6f(0x1ad)][a0_0x27ab6f(0x19d)]&&(options[a0_0x27ab6f(0x194)]=parseInt(process['env'][a0_0x27ab6f(0x19d)],0xa));!process[a0_0x27ab6f(0x1b3)][a0_0x27ab6f(0x1a5)]&&(console[a0_0x27ab6f(0x195)]('ERROR:\x20Terminal\x20UI\x20requires\x20an\x20interactive\x20terminal\x20(TTY).'),console['error'](''),console[a0_0x27ab6f(0x195)](a0_0x27ab6f(0x1ac)),console[a0_0x27ab6f(0x195)](a0_0x27ab6f(0x18e)),console['error']('\x20\x20-\x20Redirected\x20output\x20(e.g.,\x20>\x20file.txt,\x202>&1\x20|\x20...)'),console['error']('\x20\x20-\x20Background\x20processes\x20(e.g.,\x20&\x20at\x20the\x20end)'),console['error'](a0_0x27ab6f(0x1a8)),console[a0_0x27ab6f(0x195)](''),console[a0_0x27ab6f(0x195)](a0_0x27ab6f(0x1a3)),console[a0_0x27ab6f(0x195)](a0_0x27ab6f(0x193)),console[a0_0x27ab6f(0x195)](''),console[a0_0x27ab6f(0x195)]('Or\x20use\x20the\x20web\x20UI\x20instead:'),console['error']('\x20\x20npm\x20start'),process['exit'](0x1));console[a0_0x27ab6f(0x1a6)](a0_0x27ab6f(0x1a9)),console[a0_0x27ab6f(0x1a6)]('Connecting\x20to:\x20'+options[a0_0x27ab6f(0x197)]+':'+options[a0_0x27ab6f(0x194)]),console[a0_0x27ab6f(0x1a6)](a0_0x27ab6f(0x1a1));function a0_0xb436(){const _0x5e11fc=['catch','72jGArlf','10mUCdij','LOXIA_HOST','\x20\x20npm\x20run\x20terminal-ui','port','error','waitUntilExit','host','argv','187Qdpzxr','6nqpdwa','1164108FyWdCO','slice','LOXIA_PORT','476NxxefA','2841WDNvpJ','361764SJRUWt','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','Please\x20run\x20this\x20command\x20in\x20a\x20real\x20terminal\x20without\x20pipes\x20or\x20redirection:','--port','isTTY','log','3729943xLgXAQ','\x20\x20-\x20Some\x20CI/CD\x20environments','Starting\x20Loxia\x20Terminal\x20UI...','1341455iNtyMv','\x0aTerminal\x20UI\x20error:','The\x20terminal\x20UI\x20cannot\x20run\x20in:','env','13486230UZiEkw','length','exit','16316jyKXjv','then','stdin','\x20\x20-\x20Piped\x20environments\x20(e.g.,\x20|\x20head,\x20|\x20grep)'];a0_0xb436=function(){return _0x5e11fc;};return a0_0xb436();}function a0_0x23a5(_0x409262,_0x28cf2d){_0x409262=_0x409262-0x18e;const _0xb43605=a0_0xb436();let _0x23a5d7=_0xb43605[_0x409262];return _0x23a5d7;}const instance=startTerminalUI(options);instance[a0_0x27ab6f(0x196)]()[a0_0x27ab6f(0x1b2)](()=>{const _0x14b2d1=a0_0x27ab6f;console['log']('\x0aTerminal\x20UI\x20exited'),process[_0x14b2d1(0x1b0)](0x0);})[a0_0x27ab6f(0x18f)](_0x15d676=>{const _0x3d107a=a0_0x27ab6f;console[_0x3d107a(0x195)](_0x3d107a(0x1ab),_0x15d676),process[_0x3d107a(0x1b0)](0x1);});
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- const a0_0x3da864=a0_0x5c33;(function(_0x5c4bc5,_0x245558){const _0x1e9e47=a0_0x5c33,_0x50c306=_0x5c4bc5();while(!![]){try{const _0x1196a9=-parseInt(_0x1e9e47(0x1a8))/0x1*(-parseInt(_0x1e9e47(0x1ae))/0x2)+-parseInt(_0x1e9e47(0x192))/0x3+parseInt(_0x1e9e47(0x1a4))/0x4*(-parseInt(_0x1e9e47(0x1a9))/0x5)+parseInt(_0x1e9e47(0x198))/0x6+-parseInt(_0x1e9e47(0x197))/0x7*(-parseInt(_0x1e9e47(0x19f))/0x8)+parseInt(_0x1e9e47(0x18a))/0x9+-parseInt(_0x1e9e47(0x18b))/0xa*(parseInt(_0x1e9e47(0x1b6))/0xb);if(_0x1196a9===_0x245558)break;else _0x50c306['push'](_0x50c306['shift']());}catch(_0x1c3b6b){_0x50c306['push'](_0x50c306['shift']());}}}(a0_0x5052,0x4a793));import{spawn}from'child_process';function a0_0x5c33(_0x292d91,_0xeb3aa){_0x292d91=_0x292d91-0x188;const _0x5052fa=a0_0x5052();let _0x5c3365=_0x5052fa[_0x292d91];return _0x5c3365;}import{fileURLToPath}from'url';import{dirname,join}from'path';import a0_0x2f290b from'http';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename),rootDir=join(__dirname,'..'),SERVER_PORT=process[a0_0x3da864(0x18c)][a0_0x3da864(0x1af)]||0x1f90,STARTUP_WAIT=0x7d0;let serverProcess=null;async function checkServerReady(_0x57427e=0xa,_0x498ee7=0x1f4){const _0x5e3224=a0_0x3da864;for(let _0x51cf4b=0x0;_0x51cf4b<_0x57427e;_0x51cf4b++){try{return await new Promise((_0x5ac546,_0x3dc032)=>{const _0xa588ae=a0_0x5c33,_0x2612a3=a0_0x2f290b['get'](_0xa588ae(0x18f)+SERVER_PORT+_0xa588ae(0x1a6),_0x31a986=>{const _0x31153f=_0xa588ae;_0x31a986[_0x31153f(0x19d)]===0xc8?_0x5ac546():_0x3dc032(new Error(_0x31153f(0x1a0)+_0x31a986[_0x31153f(0x19d)]));});_0x2612a3['on'](_0xa588ae(0x1bc),_0x3dc032),_0x2612a3[_0xa588ae(0x1b1)](0x3e8,()=>{const _0x281390=_0xa588ae;_0x2612a3[_0x281390(0x188)](),_0x3dc032(new Error(_0x281390(0x19a)));});}),console[_0x5e3224(0x18e)](_0x5e3224(0x194)),!![];}catch(_0x2ec31b){_0x51cf4b<_0x57427e-0x1&&await new Promise(_0x39683b=>setTimeout(_0x39683b,_0x498ee7));}}return console[_0x5e3224(0x18e)]('⚠️\x20\x20Server\x20may\x20not\x20be\x20fully\x20ready,\x20but\x20continuing\x20anyway...'),![];}async function startServer(){return new Promise(_0x341a12=>{const _0x3e56eb=a0_0x5c33;console['log'](_0x3e56eb(0x1a1));const _0x4859ca=join(rootDir,_0x3e56eb(0x1b4),_0x3e56eb(0x195));serverProcess=spawn(_0x3e56eb(0x1a5),[_0x4859ca],{'cwd':rootDir,'env':{...process['env']},'stdio':['ignore',_0x3e56eb(0x1ac),'pipe'],'detached':![]}),serverProcess[_0x3e56eb(0x1b9)]['on']('data',_0x54ab2b=>{const _0x3b6193=_0x3e56eb,_0x56ce0b=_0x54ab2b[_0x3b6193(0x1bb)]()[_0x3b6193(0x1ba)]();_0x56ce0b&&console[_0x3b6193(0x18e)](_0x3b6193(0x1a7)+_0x56ce0b);}),serverProcess[_0x3e56eb(0x19b)]['on']('data',_0x5bf5ad=>{const _0x42ec58=_0x3e56eb,_0x2163c7=_0x5bf5ad['toString']()['trim']();_0x2163c7&&!_0x2163c7[_0x42ec58(0x1b5)]('ExperimentalWarning')&&console[_0x42ec58(0x1bc)](_0x42ec58(0x191)+_0x2163c7);}),serverProcess['on']('error',_0x1631cd=>{const _0x1e10bf=_0x3e56eb;console[_0x1e10bf(0x1bc)]('Failed\x20to\x20start\x20server:',_0x1631cd[_0x1e10bf(0x1b7)]),process[_0x1e10bf(0x190)](0x1);}),serverProcess['on'](_0x3e56eb(0x190),(_0x4656a7,_0x8dde1f)=>{const _0x4a43d7=_0x3e56eb;_0x4656a7!==null&&_0x4656a7!==0x0&&(console[_0x4a43d7(0x1bc)]('Server\x20exited\x20with\x20code\x20'+_0x4656a7),process[_0x4a43d7(0x190)](_0x4656a7));}),setTimeout(_0x341a12,STARTUP_WAIT);});}async function startTerminalUI(){const _0x9a1898=a0_0x3da864;console[_0x9a1898(0x18e)](_0x9a1898(0x1b0)),console[_0x9a1898(0x18e)]('');const _0x48fb26=join(rootDir,_0x9a1898(0x199),_0x9a1898(0x1aa)),_0x86ca71=spawn(_0x9a1898(0x1a5),[_0x48fb26],{'cwd':rootDir,'env':{...process[_0x9a1898(0x18c)]},'stdio':'inherit'});return _0x86ca71['on']('error',_0x28b3f8=>{const _0x5d633d=_0x9a1898;console['error'](_0x5d633d(0x1ad),_0x28b3f8[_0x5d633d(0x1b7)]),cleanup(),process['exit'](0x1);}),_0x86ca71['on'](_0x9a1898(0x190),_0x5abfc2=>{const _0x336103=_0x9a1898;console[_0x336103(0x18e)](_0x336103(0x18d)),cleanup(),process[_0x336103(0x190)](_0x5abfc2||0x0);}),_0x86ca71;}function cleanup(){const _0x2993ed=a0_0x3da864;serverProcess&&!serverProcess[_0x2993ed(0x196)]&&(console['log'](_0x2993ed(0x193)),serverProcess['kill'](_0x2993ed(0x19e)),setTimeout(()=>{const _0x2c4623=_0x2993ed;!serverProcess['killed']&&serverProcess[_0x2c4623(0x189)]('SIGKILL');},0x1388));}function a0_0x5052(){const _0x175e8d=['toString','error','destroy','kill','1976958ymiUZW','365470JyyZnw','env','\x0a👋\x20Terminal\x20UI\x20closed.','log','http://localhost:','exit','[SERVER\x20ERROR]\x20','1676595aEwssK','🛑\x20Stopping\x20server...','✅\x20Server\x20is\x20ready!','index.js','killed','1559537DRuhpN','1106526DrbpaI','bin','Timeout','stderr','SIGINT','statusCode','SIGTERM','8HGThaw','Server\x20returned\x20','🚀\x20Starting\x20Loxia\x20server...','\x0a⚠️\x20\x20Received\x20SIGTERM,\x20shutting\x20down...','╔════════════════════════════════════════════════╗','8CZWnyS','node','/health','[SERVER]\x20','67JQPWRD','30530FXxEIu','loxia-terminal.js','\x0a⚠️\x20\x20Received\x20SIGINT,\x20shutting\x20down...','pipe','Failed\x20to\x20start\x20Terminal\x20UI:','11804uOOlPR','PORT','🖥️\x20\x20Starting\x20Terminal\x20UI...','setTimeout','╚════════════════════════════════════════════════╝','Error\x20during\x20startup:','src','includes','44cCUNPQ','message','║\x20\x20\x20Loxia\x20AI\x20Agents\x20-\x20Server\x20+\x20Terminal\x20UI\x20\x20\x20\x20\x20\x20║','stdout','trim'];a0_0x5052=function(){return _0x175e8d;};return a0_0x5052();}process['on'](a0_0x3da864(0x19c),()=>{const _0x17bfba=a0_0x3da864;console[_0x17bfba(0x18e)](_0x17bfba(0x1ab)),cleanup(),process[_0x17bfba(0x190)](0x0);}),process['on'](a0_0x3da864(0x19e),()=>{const _0x18c2ed=a0_0x3da864;console[_0x18c2ed(0x18e)](_0x18c2ed(0x1a2)),cleanup(),process[_0x18c2ed(0x190)](0x0);}),process['on'](a0_0x3da864(0x190),()=>{cleanup();});async function main(){const _0x258839=a0_0x3da864;console['log'](_0x258839(0x1a3)),console['log'](_0x258839(0x1b8)),console[_0x258839(0x18e)](_0x258839(0x1b2)),console[_0x258839(0x18e)]('');try{await startServer(),await checkServerReady(),await startTerminalUI(),await new Promise(()=>{});}catch(_0x179e6b){console['error'](_0x258839(0x1b3),_0x179e6b[_0x258839(0x1b7)]),cleanup(),process[_0x258839(0x190)](0x1);}}main();
3
+ function a0_0x467a(){const _0x5dd6f3=['killed','get','32ZnEieH','env','SIGKILL','5380HXkReR','loxia-terminal.js','24150402TcZFSN','stderr','includes','752BlMmEN','[SERVER\x20ERROR]\x20','kill','message','ignore','1845600grHaBq','index.js','log','⚠️\x20\x20Server\x20may\x20not\x20be\x20fully\x20ready,\x20but\x20continuing\x20anyway...','/health','[SERVER]\x20','stdout','error','✅\x20Server\x20is\x20ready!','setTimeout','Error\x20during\x20startup:','node','PORT','SIGTERM','trim','Timeout','5644667yhGOQO','Failed\x20to\x20start\x20server:','SIGINT','exit','ExperimentalWarning','statusCode','\x0a⚠️\x20\x20Received\x20SIGTERM,\x20shutting\x20down...','toString','http://localhost:','1599drFIAm','data','\x0a⚠️\x20\x20Received\x20SIGINT,\x20shutting\x20down...','1376886bylIMq','Failed\x20to\x20start\x20Terminal\x20UI:','pipe','╚════════════════════════════════════════════════╝','6893368zNtKzd'];a0_0x467a=function(){return _0x5dd6f3;};return a0_0x467a();}const a0_0x39716b=a0_0x359a;(function(_0x1a28d5,_0x1e3c91){const _0x383ca4=a0_0x359a,_0x325fe7=_0x1a28d5();while(!![]){try{const _0x737023=-parseInt(_0x383ca4(0x214))/0x1*(parseInt(_0x383ca4(0x217))/0x2)+parseInt(_0x383ca4(0x20a))/0x3*(-parseInt(_0x383ca4(0x21c))/0x4)+-parseInt(_0x383ca4(0x1f1))/0x5+parseInt(_0x383ca4(0x20d))/0x6+-parseInt(_0x383ca4(0x201))/0x7+-parseInt(_0x383ca4(0x211))/0x8+parseInt(_0x383ca4(0x219))/0x9;if(_0x737023===_0x1e3c91)break;else _0x325fe7['push'](_0x325fe7['shift']());}catch(_0xa1c19b){_0x325fe7['push'](_0x325fe7['shift']());}}}(a0_0x467a,0xa84fb));import{spawn}from'child_process';import{fileURLToPath}from'url';import{dirname,join}from'path';import a0_0x2b4e08 from'http';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename),rootDir=join(__dirname,'..'),SERVER_PORT=process[a0_0x39716b(0x215)][a0_0x39716b(0x1fd)]||0x1f90,STARTUP_WAIT=0x7d0;let serverProcess=null;async function checkServerReady(_0x38f5d5=0xa,_0x3fa063=0x1f4){const _0x489246=a0_0x39716b;for(let _0x122108=0x0;_0x122108<_0x38f5d5;_0x122108++){try{return await new Promise((_0x302a42,_0x219b90)=>{const _0x952297=a0_0x359a,_0xd38e4c=a0_0x2b4e08[_0x952297(0x213)](_0x952297(0x209)+SERVER_PORT+_0x952297(0x1f5),_0x5146b3=>{const _0x1f9524=_0x952297;_0x5146b3['statusCode']===0xc8?_0x302a42():_0x219b90(new Error('Server\x20returned\x20'+_0x5146b3[_0x1f9524(0x206)]));});_0xd38e4c['on']('error',_0x219b90),_0xd38e4c[_0x952297(0x1fa)](0x3e8,()=>{const _0x585f02=_0x952297;_0xd38e4c['destroy'](),_0x219b90(new Error(_0x585f02(0x200)));});}),console[_0x489246(0x1f3)](_0x489246(0x1f9)),!![];}catch(_0x53a465){_0x122108<_0x38f5d5-0x1&&await new Promise(_0x1af219=>setTimeout(_0x1af219,_0x3fa063));}}return console[_0x489246(0x1f3)](_0x489246(0x1f4)),![];}async function startServer(){return new Promise(_0xc148b0=>{const _0x1e243d=a0_0x359a;console[_0x1e243d(0x1f3)]('🚀\x20Starting\x20Loxia\x20server...');const _0x202acf=join(rootDir,'src',_0x1e243d(0x1f2));serverProcess=spawn('node',[_0x202acf],{'cwd':rootDir,'env':{...process[_0x1e243d(0x215)]},'stdio':[_0x1e243d(0x1f0),'pipe',_0x1e243d(0x20f)],'detached':![]}),serverProcess[_0x1e243d(0x1f7)]['on'](_0x1e243d(0x20b),_0x46c54e=>{const _0x5bc08e=_0x1e243d,_0x28cc2c=_0x46c54e['toString']()['trim']();_0x28cc2c&&console[_0x5bc08e(0x1f3)](_0x5bc08e(0x1f6)+_0x28cc2c);}),serverProcess[_0x1e243d(0x21a)]['on'](_0x1e243d(0x20b),_0x2194fd=>{const _0x2d49ea=_0x1e243d,_0x4a0415=_0x2194fd[_0x2d49ea(0x208)]()[_0x2d49ea(0x1ff)]();_0x4a0415&&!_0x4a0415[_0x2d49ea(0x21b)](_0x2d49ea(0x205))&&console[_0x2d49ea(0x1f8)](_0x2d49ea(0x21d)+_0x4a0415);}),serverProcess['on'](_0x1e243d(0x1f8),_0x2e158b=>{const _0x231f3f=_0x1e243d;console['error'](_0x231f3f(0x202),_0x2e158b[_0x231f3f(0x1ef)]),process['exit'](0x1);}),serverProcess['on'](_0x1e243d(0x204),(_0x13e88b,_0x4e3164)=>{const _0x555232=_0x1e243d;_0x13e88b!==null&&_0x13e88b!==0x0&&(console[_0x555232(0x1f8)]('Server\x20exited\x20with\x20code\x20'+_0x13e88b),process[_0x555232(0x204)](_0x13e88b));}),setTimeout(_0xc148b0,STARTUP_WAIT);});}async function startTerminalUI(){const _0x29724f=a0_0x39716b;console['log']('🖥️\x20\x20Starting\x20Terminal\x20UI...'),console[_0x29724f(0x1f3)]('');const _0x899312=join(rootDir,'bin',_0x29724f(0x218)),_0x24e83a=spawn(_0x29724f(0x1fc),[_0x899312],{'cwd':rootDir,'env':{...process[_0x29724f(0x215)]},'stdio':'inherit'});return _0x24e83a['on'](_0x29724f(0x1f8),_0x447749=>{const _0x53b7fc=_0x29724f;console[_0x53b7fc(0x1f8)](_0x53b7fc(0x20e),_0x447749['message']),cleanup(),process[_0x53b7fc(0x204)](0x1);}),_0x24e83a['on'](_0x29724f(0x204),_0x1fa490=>{const _0xe84f95=_0x29724f;console[_0xe84f95(0x1f3)]('\x0a👋\x20Terminal\x20UI\x20closed.'),cleanup(),process[_0xe84f95(0x204)](_0x1fa490||0x0);}),_0x24e83a;}function a0_0x359a(_0x36e3c8,_0x284bc2){_0x36e3c8=_0x36e3c8-0x1ef;const _0x467a71=a0_0x467a();let _0x359a19=_0x467a71[_0x36e3c8];return _0x359a19;}function cleanup(){const _0x5f0270=a0_0x39716b;serverProcess&&!serverProcess[_0x5f0270(0x212)]&&(console[_0x5f0270(0x1f3)]('🛑\x20Stopping\x20server...'),serverProcess[_0x5f0270(0x21e)](_0x5f0270(0x1fe)),setTimeout(()=>{const _0x299b0c=_0x5f0270;!serverProcess['killed']&&serverProcess[_0x299b0c(0x21e)](_0x299b0c(0x216));},0x1388));}process['on'](a0_0x39716b(0x203),()=>{const _0x1ab788=a0_0x39716b;console[_0x1ab788(0x1f3)](_0x1ab788(0x20c)),cleanup(),process[_0x1ab788(0x204)](0x0);}),process['on']('SIGTERM',()=>{const _0x2538a4=a0_0x39716b;console[_0x2538a4(0x1f3)](_0x2538a4(0x207)),cleanup(),process[_0x2538a4(0x204)](0x0);}),process['on'](a0_0x39716b(0x204),()=>{cleanup();});async function main(){const _0x38ba27=a0_0x39716b;console[_0x38ba27(0x1f3)]('╔════════════════════════════════════════════════╗'),console[_0x38ba27(0x1f3)]('║\x20\x20\x20Loxia\x20AI\x20Agents\x20-\x20Server\x20+\x20Terminal\x20UI\x20\x20\x20\x20\x20\x20║'),console['log'](_0x38ba27(0x210)),console[_0x38ba27(0x1f3)]('');try{await startServer(),await checkServerReady(),await startTerminalUI(),await new Promise(()=>{});}catch(_0x243709){console[_0x38ba27(0x1f8)](_0x38ba27(0x1fb),_0x243709[_0x38ba27(0x1ef)]),cleanup(),process[_0x38ba27(0x204)](0x1);}}main();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@loxia-labs/loxia-autopilot-one",
3
- "version": "1.0.18",
3
+ "version": "1.0.19",
4
4
  "description": "Loxia AI Agents System - No-code/vibe-code/companion-coder platform",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- const a0_0x389d31=a0_0x184e;(function(_0x190f97,_0x40e3ef){const _0x149564=a0_0x184e,_0x392fa0=_0x190f97();while(!![]){try{const _0x22d520=parseInt(_0x149564(0xed))/0x1*(-parseInt(_0x149564(0xea))/0x2)+parseInt(_0x149564(0x104))/0x3*(-parseInt(_0x149564(0xe9))/0x4)+parseInt(_0x149564(0xef))/0x5*(-parseInt(_0x149564(0xd0))/0x6)+-parseInt(_0x149564(0xf8))/0x7+parseInt(_0x149564(0xd6))/0x8*(parseInt(_0x149564(0xdd))/0x9)+parseInt(_0x149564(0xfd))/0xa*(-parseInt(_0x149564(0xe5))/0xb)+-parseInt(_0x149564(0xfa))/0xc*(-parseInt(_0x149564(0x112))/0xd);if(_0x22d520===_0x40e3ef)break;else _0x392fa0['push'](_0x392fa0['shift']());}catch(_0x1fca07){_0x392fa0['push'](_0x392fa0['shift']());}}}(a0_0x3feb,0x5da68));import{exec}from'child_process';import{promisify}from'util';import a0_0x5b54b4 from'https';import a0_0x4f2fe3 from'http';import a0_0x47a92e from'fs';import a0_0x56ef16 from'path';import{fileURLToPath}from'url';function a0_0x184e(_0x3ae31e,_0x13ae83){_0x3ae31e=_0x3ae31e-0xc9;const _0x3feba1=a0_0x3feb();let _0x184e2a=_0x3feba1[_0x3ae31e];return _0x184e2a;}import{createWriteStream}from'fs';import{pipeline}from'stream/promises';const execAsync=promisify(exec),__filename=fileURLToPath(import.meta.url),__dirname=a0_0x56ef16[a0_0x389d31(0xcf)](__filename),SCANNER_DIR=a0_0x56ef16[a0_0x389d31(0x100)](__dirname,'..',a0_0x389d31(0xd1),a0_0x389d31(0xce)),SEMGREP_VERSION='v1.55.0';console['log']('═══════════════════════════════════════════════════════════'),console[a0_0x389d31(0xe3)](a0_0x389d31(0xeb)),console[a0_0x389d31(0xe3)]('═══════════════════════════════════════════════════════════\x0a');async function installScanners(){const _0x5a2f1e=a0_0x389d31;await a0_0x47a92e['promises'][_0x5a2f1e(0xee)](SCANNER_DIR,{'recursive':!![]}),await checkESLintSecurity(),await installSemgrep(),await installPythonScanners(),console[_0x5a2f1e(0xe3)](_0x5a2f1e(0x10d)),console[_0x5a2f1e(0xe3)](_0x5a2f1e(0xcd)),console[_0x5a2f1e(0xe3)](_0x5a2f1e(0xf0));}async function checkESLintSecurity(){const _0x377197=a0_0x389d31;console['log'](_0x377197(0xd4));try{await import(_0x377197(0xe7)),console[_0x377197(0xe3)]('\x20\x20\x20✅\x20eslint-plugin-security\x20is\x20installed\x0a');}catch(_0x583f33){console[_0x377197(0xe3)](_0x377197(0xd9)),console[_0x377197(0xe3)](_0x377197(0xf5));}}async function installSemgrep(){const _0xf894f9=a0_0x389d31;console[_0xf894f9(0xe3)](_0xf894f9(0xf4));const _0x13e78e=process[_0xf894f9(0xd3)],_0x11e5b3=process['arch'];try{const _0x5563d8=await execAsync(_0xf894f9(0x10f),{'timeout':0x1388});console[_0xf894f9(0xe3)](_0xf894f9(0xdb)+_0x5563d8[_0xf894f9(0xff)]['trim']()),console[_0xf894f9(0xe3)](_0xf894f9(0xf1));return;}catch(_0x8ffd14){console[_0xf894f9(0xe3)]('\x20\x20\x20Semgrep\x20not\x20found\x20in\x20PATH,\x20installing\x20standalone\x20binary...');}const _0x17cce5=getSemgrepBinaryInfo(_0x13e78e,_0x11e5b3);if(!_0x17cce5){console[_0xf894f9(0xe3)]('\x20\x20\x20⚠️\x20\x20No\x20Semgrep\x20binary\x20available\x20for\x20'+_0x13e78e+'-'+_0x11e5b3),console[_0xf894f9(0xe3)](_0xf894f9(0xd5));return;}try{const _0x1c6563=a0_0x56ef16['join'](SCANNER_DIR,'semgrep');console[_0xf894f9(0xe3)]('\x20\x20\x20Downloading\x20from\x20'+_0x17cce5[_0xf894f9(0xfc)]+_0xf894f9(0x111)),await downloadFile(_0x17cce5['url'],_0x1c6563),await a0_0x47a92e[_0xf894f9(0x110)]['chmod'](_0x1c6563,0x1ed),console['log']('\x20\x20\x20✅\x20Semgrep\x20installed\x20successfully'),console['log']('\x20\x20\x20Location:\x20'+_0x1c6563+'\x0a'),console[_0xf894f9(0xe3)](_0xf894f9(0xe2)),console['log'](_0xf894f9(0xd8));}catch(_0x2e6d54){console['log'](_0xf894f9(0x107)+_0x2e6d54[_0xf894f9(0x10e)]),console['log']('\x20\x20\x20You\x20can\x20install\x20manually:\x20pip\x20install\x20semgrep\x0a');}}function getSemgrepBinaryInfo(_0x512186,_0x5e6243){return null;}async function installPythonScanners(){const _0x3dc3b2=a0_0x389d31;console['log'](_0x3dc3b2(0xec));let _0x29aa6c=null;try{await execAsync(_0x3dc3b2(0x114),{'timeout':0x1388}),_0x29aa6c=_0x3dc3b2(0x108);}catch(_0x1df1c8){try{await execAsync(_0x3dc3b2(0xe4),{'timeout':0x1388}),_0x29aa6c=_0x3dc3b2(0x10a);}catch(_0x19bb23){console[_0x3dc3b2(0xe3)](_0x3dc3b2(0xf9)),console['log'](_0x3dc3b2(0xca)),console[_0x3dc3b2(0xe3)](_0x3dc3b2(0xf6));return;}}console[_0x3dc3b2(0xe3)](_0x3dc3b2(0xd2)+_0x29aa6c),await installViaPip(_0x3dc3b2(0xfe),_0x29aa6c),await installViaPip(_0x3dc3b2(0xe1),_0x29aa6c),await installViaPip(_0x3dc3b2(0xd7),_0x29aa6c),await installViaPip(_0x3dc3b2(0x109),_0x29aa6c),await installViaPip(_0x3dc3b2(0x102),_0x29aa6c),console['log']('');}function a0_0x3feb(){const _0x3d98c9=['pip-audit','\x20\x20\x20pip\x20install\x20semgrep\x0a','\x20\x20\x20⚠️\x20\x20eslint-plugin-security\x20not\x20found','❌\x20Installation\x20failed:','\x20\x20\x20✅\x20Semgrep\x20already\x20installed:\x20','pipe','48249yqGYfJ','finish','\x20installed\x20successfully','error','bandit','\x20\x20\x20Note:\x20To\x20use\x20system-wide,\x20add\x20to\x20PATH\x20or\x20install\x20globally:','log','python\x20--version','357225hIZRpm','\x20-m\x20pip\x20show\x20','eslint-plugin-security','\x20already\x20installed','2227076MXILbf','68Kmdojt','\x20\x20Installing\x20Security\x20Scanners','🐍\x20Checking\x20Python\x20scanners...','7262WJpdrq','mkdir','3699715yEfFXh','═══════════════════════════════════════════════════════════\x0a','\x20\x20\x20Using\x20system-installed\x20Semgrep\x0a','close','Failed\x20to\x20download:\x20HTTP\x20','🔍\x20Installing\x20Semgrep...','\x20\x20\x20Run:\x20npm\x20install\x20--save-dev\x20eslint-plugin-security\x0a','\x20\x20\x20pip\x20install\x20semgrep\x20bandit\x20pip-audit\x20checkov\x20yamllint\x0a','catch','699860bHfukW','\x20\x20\x20⚠️\x20\x20Python\x20not\x20found\x20-\x20skipping\x20Python\x20scanners','41028CsTEsr','\x20\x20npm\x20install\x20--save-dev\x20eslint-plugin-security','url','70HKxvNL','semgrep','stdout','join','headers','yamllint','location','3pLileH','\x20\x20pip\x20install\x20semgrep\x20bandit\x20pip-audit','\x20\x20\x20You\x20can\x20install\x20manually:\x20pip\x20install\x20','\x20\x20\x20⚠️\x20\x20Failed\x20to\x20install\x20Semgrep:\x20','python3','checkov','python','https','\x20-m\x20pip\x20install\x20--user\x20','\x0a═══════════════════════════════════════════════════════════','message','semgrep\x20--version','promises','...','5902Ddsdjz','startsWith','python3\x20--version','\x20\x20\x20⚠️\x20\x20Failed\x20to\x20install\x20','\x20\x20\x20To\x20enable\x20Python\x20scanning,\x20install\x20Python\x20and\x20run:','statusCode','\x20\x20\x20✅\x20','\x20\x20Installation\x20Complete','.scanners','dirname','6yWkVeS','node_modules','\x20\x20\x20✅\x20Python\x20found:\x20','platform','📦\x20Checking\x20ESLint\x20Security\x20Plugin...','\x20\x20\x20Please\x20install\x20manually:\x20https://semgrep.dev/docs/getting-started/\x0a','1048qXEIPZ'];a0_0x3feb=function(){return _0x3d98c9;};return a0_0x3feb();}async function installViaPip(_0xb34f4e,_0x341442){const _0x44707c=a0_0x389d31;try{const _0x906571=await execAsync(_0x341442+_0x44707c(0xe6)+_0xb34f4e,{'timeout':0x1388});return console[_0x44707c(0xe3)](_0x44707c(0xcc)+_0xb34f4e+_0x44707c(0xe8)),!![];}catch(_0xad7e26){console['log']('\x20\x20\x20Installing\x20'+_0xb34f4e+_0x44707c(0x111));try{return await execAsync(_0x341442+_0x44707c(0x10c)+_0xb34f4e,{'timeout':0xea60}),console[_0x44707c(0xe3)]('\x20\x20\x20✅\x20'+_0xb34f4e+_0x44707c(0xdf)),!![];}catch(_0x5c6772){return console[_0x44707c(0xe3)](_0x44707c(0xc9)+_0xb34f4e+':\x20'+_0x5c6772[_0x44707c(0x10e)]),console[_0x44707c(0xe3)](_0x44707c(0x106)+_0xb34f4e),![];}}}async function downloadFile(_0x37601e,_0x233e65){return new Promise((_0x10ffbc,_0x4b4431)=>{const _0x2e2e2a=a0_0x184e,_0x1c709f=_0x37601e[_0x2e2e2a(0x113)](_0x2e2e2a(0x10b))?a0_0x5b54b4:a0_0x4f2fe3;_0x1c709f['get'](_0x37601e,_0x2c8ebb=>{const _0x3e51b2=_0x2e2e2a;if(_0x2c8ebb[_0x3e51b2(0xcb)]===0x12e||_0x2c8ebb[_0x3e51b2(0xcb)]===0x12d){downloadFile(_0x2c8ebb[_0x3e51b2(0x101)][_0x3e51b2(0x103)],_0x233e65)['then'](_0x10ffbc)[_0x3e51b2(0xf7)](_0x4b4431);return;}if(_0x2c8ebb[_0x3e51b2(0xcb)]!==0xc8){_0x4b4431(new Error(_0x3e51b2(0xf3)+_0x2c8ebb['statusCode']));return;}const _0x3a4fb5=createWriteStream(_0x233e65);_0x2c8ebb[_0x3e51b2(0xdc)](_0x3a4fb5),_0x3a4fb5['on'](_0x3e51b2(0xde),()=>{const _0x5513bb=_0x3e51b2;_0x3a4fb5[_0x5513bb(0xf2)](),_0x10ffbc();}),_0x3a4fb5['on']('error',_0xeaaabf=>{a0_0x47a92e['unlink'](_0x233e65,()=>{}),_0x4b4431(_0xeaaabf);});})['on'](_0x2e2e2a(0xe0),_0x4b4431);});}installScanners()[a0_0x389d31(0xf7)](_0x44552f=>{const _0x2e4339=a0_0x389d31;console[_0x2e4339(0xe0)](_0x2e4339(0xda),_0x44552f[_0x2e4339(0x10e)]),console['error']('\x0aYou\x20can\x20manually\x20install\x20scanners:'),console[_0x2e4339(0xe0)](_0x2e4339(0xfb)),console[_0x2e4339(0xe0)](_0x2e4339(0x105)),process['exit'](0x0);});
2
+ const a0_0x2f1259=a0_0x303c;(function(_0x26dd2f,_0x3ce7b9){const _0x2d4658=a0_0x303c,_0x380c4f=_0x26dd2f();while(!![]){try{const _0x37171d=parseInt(_0x2d4658(0x1cc))/0x1*(parseInt(_0x2d4658(0x1cb))/0x2)+-parseInt(_0x2d4658(0x1a5))/0x3*(parseInt(_0x2d4658(0x1af))/0x4)+-parseInt(_0x2d4658(0x1d0))/0x5*(-parseInt(_0x2d4658(0x19c))/0x6)+-parseInt(_0x2d4658(0x1cd))/0x7+-parseInt(_0x2d4658(0x1a7))/0x8*(parseInt(_0x2d4658(0x19f))/0x9)+parseInt(_0x2d4658(0x1cf))/0xa+parseInt(_0x2d4658(0x1c6))/0xb*(parseInt(_0x2d4658(0x1ce))/0xc);if(_0x37171d===_0x3ce7b9)break;else _0x380c4f['push'](_0x380c4f['shift']());}catch(_0x19860c){_0x380c4f['push'](_0x380c4f['shift']());}}}(a0_0x47b5,0xf32cf));import{exec}from'child_process';import{promisify}from'util';import a0_0x4e2f58 from'https';import a0_0x437ed9 from'http';function a0_0x303c(_0x2df0bd,_0x1b93ac){_0x2df0bd=_0x2df0bd-0x19c;const _0x47b50d=a0_0x47b5();let _0x303c2e=_0x47b50d[_0x2df0bd];return _0x303c2e;}import a0_0x571029 from'fs';import a0_0x39804b from'path';import{fileURLToPath}from'url';import{createWriteStream}from'fs';function a0_0x47b5(){const _0x120041=['Failed\x20to\x20download:\x20HTTP\x20','unlink','4411kMheag','\x20installed\x20successfully','\x20\x20Installation\x20Complete','python3\x20--version','\x20\x20\x20Installing\x20','4pyCauv','451810TSOnUS','1913877DaYVzA','46572UhFKjD','4882920YBoloa','3646645OZavTA','═══════════════════════════════════════════════════════════\x0a','\x0a═══════════════════════════════════════════════════════════','\x20\x20\x20You\x20can\x20install\x20manually:\x20pip\x20install\x20','checkov','catch','\x20\x20\x20✅\x20Semgrep\x20already\x20installed:\x20','\x20\x20\x20To\x20enable\x20Python\x20scanning,\x20install\x20Python\x20and\x20run:','startsWith','\x0aYou\x20can\x20manually\x20install\x20scanners:','message','🔍\x20Installing\x20Semgrep...','...','\x20-m\x20pip\x20show\x20','log','finish','get','yamllint','chmod','url','\x20\x20\x20pip\x20install\x20semgrep\x20bandit\x20pip-audit\x20checkov\x20yamllint\x0a','\x20\x20\x20⚠️\x20\x20Failed\x20to\x20install\x20','exit','6qUTjGz','python3','\x20\x20\x20Downloading\x20from\x20','4456845kEJhUE','\x20\x20\x20⚠️\x20\x20eslint-plugin-security\x20not\x20found','📦\x20Checking\x20ESLint\x20Security\x20Plugin...','\x20\x20\x20⚠️\x20\x20Python\x20not\x20found\x20-\x20skipping\x20Python\x20scanners','\x20\x20\x20Please\x20install\x20manually:\x20https://semgrep.dev/docs/getting-started/\x0a','dirname','2787BElBsM','bandit','16puYXYg','\x20\x20pip\x20install\x20semgrep\x20bandit\x20pip-audit','arch','python\x20--version','\x20\x20\x20✅\x20Semgrep\x20installed\x20successfully','\x20\x20\x20✅\x20','\x20\x20Installing\x20Security\x20Scanners','location','6104LfKfYg','then','\x20already\x20installed','mkdir','semgrep\x20--version','join','stdout','❌\x20Installation\x20failed:','\x20\x20\x20Run:\x20npm\x20install\x20--save-dev\x20eslint-plugin-security\x0a','node_modules','error','\x20\x20\x20Location:\x20','🐍\x20Checking\x20Python\x20scanners...','\x20\x20\x20Note:\x20To\x20use\x20system-wide,\x20add\x20to\x20PATH\x20or\x20install\x20globally:','python','\x20\x20\x20✅\x20eslint-plugin-security\x20is\x20installed\x0a','https','\x20\x20\x20pip\x20install\x20semgrep\x0a','statusCode','promises','eslint-plugin-security'];a0_0x47b5=function(){return _0x120041;};return a0_0x47b5();}import{pipeline}from'stream/promises';const execAsync=promisify(exec),__filename=fileURLToPath(import.meta.url),__dirname=a0_0x39804b[a0_0x2f1259(0x1a4)](__filename),SCANNER_DIR=a0_0x39804b[a0_0x2f1259(0x1b4)](__dirname,'..',a0_0x2f1259(0x1b8),'.scanners'),SEMGREP_VERSION='v1.55.0';console['log']('═══════════════════════════════════════════════════════════'),console['log'](a0_0x2f1259(0x1ad)),console[a0_0x2f1259(0x1de)](a0_0x2f1259(0x1d1));async function installScanners(){const _0x2e275d=a0_0x2f1259;await a0_0x571029[_0x2e275d(0x1c2)][_0x2e275d(0x1b2)](SCANNER_DIR,{'recursive':!![]}),await checkESLintSecurity(),await installSemgrep(),await installPythonScanners(),console['log'](_0x2e275d(0x1d2)),console[_0x2e275d(0x1de)](_0x2e275d(0x1c8)),console['log']('═══════════════════════════════════════════════════════════\x0a');}async function checkESLintSecurity(){const _0x3783c6=a0_0x2f1259;console[_0x3783c6(0x1de)](_0x3783c6(0x1a1));try{await import(_0x3783c6(0x1c3)),console[_0x3783c6(0x1de)](_0x3783c6(0x1be));}catch(_0x9c3a6e){console[_0x3783c6(0x1de)](_0x3783c6(0x1a0)),console['log'](_0x3783c6(0x1b7));}}async function installSemgrep(){const _0x4d5ca1=a0_0x2f1259;console[_0x4d5ca1(0x1de)](_0x4d5ca1(0x1db));const _0x3259e8=process['platform'],_0x4a4d87=process[_0x4d5ca1(0x1a9)];try{const _0x117784=await execAsync(_0x4d5ca1(0x1b3),{'timeout':0x1388});console[_0x4d5ca1(0x1de)](_0x4d5ca1(0x1d6)+_0x117784[_0x4d5ca1(0x1b5)]['trim']()),console['log']('\x20\x20\x20Using\x20system-installed\x20Semgrep\x0a');return;}catch(_0x39965c){console[_0x4d5ca1(0x1de)]('\x20\x20\x20Semgrep\x20not\x20found\x20in\x20PATH,\x20installing\x20standalone\x20binary...');}const _0x4a21ee=getSemgrepBinaryInfo(_0x3259e8,_0x4a4d87);if(!_0x4a21ee){console['log']('\x20\x20\x20⚠️\x20\x20No\x20Semgrep\x20binary\x20available\x20for\x20'+_0x3259e8+'-'+_0x4a4d87),console[_0x4d5ca1(0x1de)](_0x4d5ca1(0x1a3));return;}try{const _0x2013b9=a0_0x39804b[_0x4d5ca1(0x1b4)](SCANNER_DIR,'semgrep');console[_0x4d5ca1(0x1de)](_0x4d5ca1(0x19e)+_0x4a21ee[_0x4d5ca1(0x1e3)]+'...'),await downloadFile(_0x4a21ee['url'],_0x2013b9),await a0_0x571029[_0x4d5ca1(0x1c2)][_0x4d5ca1(0x1e2)](_0x2013b9,0x1ed),console[_0x4d5ca1(0x1de)](_0x4d5ca1(0x1ab)),console[_0x4d5ca1(0x1de)](_0x4d5ca1(0x1ba)+_0x2013b9+'\x0a'),console['log'](_0x4d5ca1(0x1bc)),console[_0x4d5ca1(0x1de)](_0x4d5ca1(0x1c0));}catch(_0x551813){console[_0x4d5ca1(0x1de)]('\x20\x20\x20⚠️\x20\x20Failed\x20to\x20install\x20Semgrep:\x20'+_0x551813[_0x4d5ca1(0x1da)]),console[_0x4d5ca1(0x1de)]('\x20\x20\x20You\x20can\x20install\x20manually:\x20pip\x20install\x20semgrep\x0a');}}function getSemgrepBinaryInfo(_0x3d6b28,_0x49f16c){return null;}async function installPythonScanners(){const _0x364473=a0_0x2f1259;console[_0x364473(0x1de)](_0x364473(0x1bb));let _0x350e51=null;try{await execAsync(_0x364473(0x1c9),{'timeout':0x1388}),_0x350e51=_0x364473(0x19d);}catch(_0x6f664a){try{await execAsync(_0x364473(0x1aa),{'timeout':0x1388}),_0x350e51=_0x364473(0x1bd);}catch(_0x6d3779){console[_0x364473(0x1de)](_0x364473(0x1a2)),console[_0x364473(0x1de)](_0x364473(0x1d7)),console['log'](_0x364473(0x1e4));return;}}console[_0x364473(0x1de)]('\x20\x20\x20✅\x20Python\x20found:\x20'+_0x350e51),await installViaPip('semgrep',_0x350e51),await installViaPip(_0x364473(0x1a6),_0x350e51),await installViaPip('pip-audit',_0x350e51),await installViaPip(_0x364473(0x1d4),_0x350e51),await installViaPip(_0x364473(0x1e1),_0x350e51),console['log']('');}async function installViaPip(_0x5400f2,_0x32fca3){const _0x4ea5d5=a0_0x2f1259;try{const _0x204c7d=await execAsync(_0x32fca3+_0x4ea5d5(0x1dd)+_0x5400f2,{'timeout':0x1388});return console[_0x4ea5d5(0x1de)](_0x4ea5d5(0x1ac)+_0x5400f2+_0x4ea5d5(0x1b1)),!![];}catch(_0x1e35fd){console[_0x4ea5d5(0x1de)](_0x4ea5d5(0x1ca)+_0x5400f2+_0x4ea5d5(0x1dc));try{return await execAsync(_0x32fca3+'\x20-m\x20pip\x20install\x20--user\x20'+_0x5400f2,{'timeout':0xea60}),console[_0x4ea5d5(0x1de)](_0x4ea5d5(0x1ac)+_0x5400f2+_0x4ea5d5(0x1c7)),!![];}catch(_0x179aea){return console[_0x4ea5d5(0x1de)](_0x4ea5d5(0x1e5)+_0x5400f2+':\x20'+_0x179aea[_0x4ea5d5(0x1da)]),console[_0x4ea5d5(0x1de)](_0x4ea5d5(0x1d3)+_0x5400f2),![];}}}async function downloadFile(_0x57b8b9,_0x3e575e){return new Promise((_0x144363,_0x54e157)=>{const _0x2da9f5=a0_0x303c,_0x5458c6=_0x57b8b9[_0x2da9f5(0x1d8)](_0x2da9f5(0x1bf))?a0_0x4e2f58:a0_0x437ed9;_0x5458c6[_0x2da9f5(0x1e0)](_0x57b8b9,_0x1f1780=>{const _0x2a6e0e=_0x2da9f5;if(_0x1f1780[_0x2a6e0e(0x1c1)]===0x12e||_0x1f1780['statusCode']===0x12d){downloadFile(_0x1f1780['headers'][_0x2a6e0e(0x1ae)],_0x3e575e)[_0x2a6e0e(0x1b0)](_0x144363)['catch'](_0x54e157);return;}if(_0x1f1780[_0x2a6e0e(0x1c1)]!==0xc8){_0x54e157(new Error(_0x2a6e0e(0x1c4)+_0x1f1780[_0x2a6e0e(0x1c1)]));return;}const _0x204615=createWriteStream(_0x3e575e);_0x1f1780['pipe'](_0x204615),_0x204615['on'](_0x2a6e0e(0x1df),()=>{_0x204615['close'](),_0x144363();}),_0x204615['on'](_0x2a6e0e(0x1b9),_0x3bd2b6=>{const _0x27f399=_0x2a6e0e;a0_0x571029[_0x27f399(0x1c5)](_0x3e575e,()=>{}),_0x54e157(_0x3bd2b6);});})['on'](_0x2da9f5(0x1b9),_0x54e157);});}installScanners()[a0_0x2f1259(0x1d5)](_0x67f9ce=>{const _0x21b8ad=a0_0x2f1259;console[_0x21b8ad(0x1b9)](_0x21b8ad(0x1b6),_0x67f9ce[_0x21b8ad(0x1da)]),console['error'](_0x21b8ad(0x1d9)),console[_0x21b8ad(0x1b9)]('\x20\x20npm\x20install\x20--save-dev\x20eslint-plugin-security'),console[_0x21b8ad(0x1b9)](_0x21b8ad(0x1a8)),process[_0x21b8ad(0x1e6)](0x0);});
@@ -1 +1 @@
1
- const a0_0x135ca4=a0_0x4484;(function(_0x5979dd,_0x4bf512){const _0x5e1f64=a0_0x4484,_0x621a33=_0x5979dd();while(!![]){try{const _0x5a9e92=-parseInt(_0x5e1f64(0x105))/0x1+-parseInt(_0x5e1f64(0x12d))/0x2*(parseInt(_0x5e1f64(0x12b))/0x3)+-parseInt(_0x5e1f64(0x123))/0x4*(-parseInt(_0x5e1f64(0x117))/0x5)+parseInt(_0x5e1f64(0x10d))/0x6+parseInt(_0x5e1f64(0x13c))/0x7+-parseInt(_0x5e1f64(0x10e))/0x8*(-parseInt(_0x5e1f64(0xfd))/0x9)+parseInt(_0x5e1f64(0x10f))/0xa;if(_0x5a9e92===_0x4bf512)break;else _0x621a33['push'](_0x621a33['shift']());}catch(_0x1981bc){_0x621a33['push'](_0x621a33['shift']());}}}(a0_0x512e,0xcc66e));function a0_0x4484(_0x562967,_0xb92561){_0x562967=_0x562967-0xfd;const _0x512eaf=a0_0x512e();let _0x4484f6=_0x512eaf[_0x562967];if(a0_0x4484['bBoDFy']===undefined){var _0x269231=function(_0x5da136){const _0x266df9='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x3cc5f7='',_0x2fcdb8='';for(let _0x57a87d=0x0,_0x2c5dc5,_0x2cb8af,_0xc825a1=0x0;_0x2cb8af=_0x5da136['charAt'](_0xc825a1++);~_0x2cb8af&&(_0x2c5dc5=_0x57a87d%0x4?_0x2c5dc5*0x40+_0x2cb8af:_0x2cb8af,_0x57a87d++%0x4)?_0x3cc5f7+=String['fromCharCode'](0xff&_0x2c5dc5>>(-0x2*_0x57a87d&0x6)):0x0){_0x2cb8af=_0x266df9['indexOf'](_0x2cb8af);}for(let _0xedcd67=0x0,_0x6bcf13=_0x3cc5f7['length'];_0xedcd67<_0x6bcf13;_0xedcd67++){_0x2fcdb8+='%'+('00'+_0x3cc5f7['charCodeAt'](_0xedcd67)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x2fcdb8);};a0_0x4484['uBFlMT']=_0x269231,a0_0x4484['YAPOEx']={},a0_0x4484['bBoDFy']=!![];}const _0x3c02b0=_0x512eaf[0x0],_0x970fc5=_0x562967+_0x3c02b0,_0x2fbdbd=a0_0x4484['YAPOEx'][_0x970fc5];return!_0x2fbdbd?(_0x4484f6=a0_0x4484['uBFlMT'](_0x4484f6),a0_0x4484['YAPOEx'][_0x970fc5]=_0x4484f6):_0x4484f6=_0x2fbdbd,_0x4484f6;}import{STATIC_ANALYSIS}from'../utilities/constants.js';function a0_0x512e(){const _0x1fda9e=['CgvYzM9YBwfUy2u','zgv0zwn0tgfUz3vHz2u','lNnJC3m','Cg9ZDgnZCW','y29SDw1U','zM9YBwf0ug9ZDentu0vYCM9Y','Cg9ZDgnZC1nJC3m','ug9ZDentuYbZEw50yxGGy2HLy2SGCgfZC2vK','neDivuvszW','C3LUDgf4','ChvZAa','BwvZC2fNzq','BM8TAw52ywXPza','Cg9ZDgnZC0XLC3m','y3nZ','CgX1z2LU','mtmYmfzcuxrssW','zgvMyxvSDa','mtKYtgXfwfPT','ChjVy2vZCW','zNvUy3rPB24','y2f0zwDVCML6zvn0EwXLBgLUDfj1Bgu','zMLSDgvY','zxjYB3i','BgvZCW','u1Lovefy','Cg9ZDgnZCY1Zy3nZ','qKvtvf9quKfdveLdrq','BwL4Aw4','zgvIDwC','BgLUDa','DxnL','lMnZCW','ntC3oteZmgz6uenkra','Cg9ZDgnZCY1SzxnZ','C2nZCW','mZCWndq5Eg9cq1vX','Aw5JBhvKzxm','y29UDgvUDa','lMXLC3m','u3r5BgvSAw50igfUywX5C2LZigzHAwXLza','Bg9Nz2vY','BM8TDw5RBM93BG','BgLUDfn0EwXLCW','mtu3oty1nwXbCfjszW','CMvHC29U','q1ntigfUywX5C2LZigzHAwXLza','zw5KC1DPDgG','CMvJB21Tzw5Kzwq','BMCTzgvLCa','CMvZDwX0CW','CM9VDa','mtG5ndG3mKLnuMjPCa','mJa4yMTSugjg','mJqWnZq3mhHYwMHQqq','BMfTzq','y2HLy2TtEw50yxG','C3vWCg9YDhnbDxrVrML4','lNnHC3m','BgvUz3rO','C3r5BgvSAw50','u0vwrvjjvfK','mZm5ntbltgDQwfu','yw5HBhL6zq','uevsrK9stufoq0u','q0furuDpuLK'];a0_0x512e=function(){return _0x1fda9e;};return a0_0x512e();}class CSSAnalyzer{constructor(_0x3cc5f7=null){const _0x3a469c=a0_0x4484;this['logger']=_0x3cc5f7,this[_0x3a469c(0x115)]=null,this[_0x3a469c(0x11e)]=null,this[_0x3a469c(0x121)]=null,this['postcssLess']=null;}async[a0_0x135ca4(0x118)](_0x2fcdb8,_0x57a87d,_0x2c5dc5={}){const _0x3d12cd=a0_0x135ca4;try{const _0x2cb8af=[],_0xc825a1=this[_0x3d12cd(0x11c)](_0x2fcdb8),_0xedcd67=await this[_0x3d12cd(0x111)](_0x2fcdb8,_0x57a87d,_0xc825a1);_0x2cb8af[_0x3d12cd(0x125)](..._0xedcd67);if(_0xedcd67[_0x3d12cd(0x114)]===0x0){const _0x6bcf13=await this['lintStyles'](_0x2fcdb8,_0x57a87d,_0xc825a1);_0x2cb8af[_0x3d12cd(0x125)](..._0x6bcf13);}return this[_0x3d12cd(0x102)]?.['debug']('CSS\x20analysis\x20completed',{'file':_0x2fcdb8,'language':_0xc825a1,'totalDiagnostics':_0x2cb8af['length'],'errors':_0x2cb8af['filter'](_0x35639b=>_0x35639b['severity']===STATIC_ANALYSIS[_0x3d12cd(0x116)]['ERROR'])['length'],'warnings':_0x2cb8af[_0x3d12cd(0x131)](_0x2affcb=>_0x2affcb['severity']===STATIC_ANALYSIS['SEVERITY']['WARNING'])['length']}),_0x2cb8af;}catch(_0x426a51){return this[_0x3d12cd(0x102)]?.[_0x3d12cd(0x132)](_0x3d12cd(0x107),{'file':_0x2fcdb8,'error':_0x426a51[_0x3d12cd(0x126)]}),[];}}async[a0_0x135ca4(0x111)](_0x28530a,_0xbc5cb4,_0x3a2224){const _0x32e331=a0_0x135ca4,_0xb37413=[];try{if(!this['postcss']){const _0x3ab67a=await import(_0x32e331(0x11e));this[_0x32e331(0x11e)]=_0x3ab67a[_0x32e331(0x12c)];}let _0x163864=null;if(_0x3a2224==='scss'){if(!this['postcssScss']){const _0x5d33bb=await import(_0x32e331(0x135));this[_0x32e331(0x121)]=_0x5d33bb[_0x32e331(0x12c)];}_0x163864=this['postcssScss'];}else{if(_0x3a2224===_0x32e331(0x133)){if(!this['postcssLess']){const _0x4c8b39=await import(_0x32e331(0x13d));this['postcssLess']=_0x4c8b39[_0x32e331(0x12c)];}_0x163864=this[_0x32e331(0x128)];}}const _0x3d47da=this['postcss']()[_0x32e331(0x12e)](_0xbc5cb4,{'from':_0x28530a,'syntax':_0x163864}),_0xb72381=_0x3d47da[_0x32e331(0x10c)];this['logger']?.[_0x32e331(0x138)](_0x32e331(0x122),{'file':_0x28530a});}catch(_0x503e1f){const _0x12b920=this[_0x32e331(0x120)](_0x503e1f,_0x28530a);_0x12b920&&_0xb37413['push'](_0x12b920);}return _0xb37413;}async[a0_0x135ca4(0x104)](_0x8bde9d,_0x20c02c,_0x55ce38){const _0x55b839=a0_0x135ca4,_0x314a72=[];try{if(!this['stylelint']){const _0x2e7561=await import('stylelint');this[_0x55b839(0x115)]=_0x2e7561[_0x55b839(0x12c)];}const _0x47d1b1={'extends':['stylelint-config-standard'],'rules':{'color-no-invalid-hex':!![],'font-family-no-duplicate-names':!![],'function-calc-no-invalid':!![],'string-no-newline':!![],'unit-no-unknown':!![],'property-no-unknown':!![],'declaration-block-no-duplicate-properties':!![],'selector-pseudo-class-no-unknown':!![],'selector-pseudo-element-no-unknown':!![],'selector-type-no-unknown':[!![],{'ignoreTypes':['/^custom-/',_0x55b839(0x10a)]}],'media-feature-name-no-unknown':!![],'at-rule-no-unknown':_0x55ce38===_0x55b839(0x13e)?[!![],{'ignoreAtRules':[_0x55b839(0x137),'include','extend','if','else','for','each','while',_0x55b839(0x12f),'return',_0x55b839(0xff),_0x55b839(0x13a),'forward']}]:_0x55ce38===_0x55b839(0x133)?[!![],{'ignoreAtRules':[_0x55b839(0x12a)]}]:!![],'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':_0x55ce38===_0x55b839(0x13e)?_0x55b839(0x135):_0x55ce38===_0x55b839(0x133)?_0x55b839(0x13d):undefined},_0x420841=await this[_0x55b839(0x115)][_0x55b839(0x139)]({'code':_0x20c02c,'codeFilename':_0x8bde9d,'config':_0x47d1b1});if(_0x420841['results']&&_0x420841[_0x55b839(0x10b)]['length']>0x0){const _0xa5803=_0x420841[_0x55b839(0x10b)][0x0];if(_0xa5803['warnings'])for(const _0x2a97af of _0xa5803['warnings']){_0x314a72[_0x55b839(0x125)]({'file':_0x8bde9d,'line':_0x2a97af['line']||0x1,'column':_0x2a97af[_0x55b839(0x11f)]||0x1,'severity':_0x2a97af['severity']==='error'?STATIC_ANALYSIS[_0x55b839(0x116)]['ERROR']:STATIC_ANALYSIS[_0x55b839(0x116)]['WARNING'],'rule':_0x2a97af['rule']||'unknown','message':_0x2a97af['text'],'category':this['categorizeStylelintRule'](_0x2a97af['rule']),'fixable':![],'source':'stylelint'});}}}catch(_0x5f3373){this[_0x55b839(0x102)]?.['warn'](_0x55b839(0x101),{'file':_0x8bde9d,'error':_0x5f3373['message']});}return _0x314a72;}['formatPostCSSError'](_0x7fb618,_0x59f01a){const _0x33f121=a0_0x135ca4;return{'file':_0x59f01a,'line':_0x7fb618['line']||0x1,'column':_0x7fb618[_0x33f121(0x11f)]||0x1,'severity':STATIC_ANALYSIS['SEVERITY']['ERROR'],'rule':_0x7fb618[_0x33f121(0x110)]||'CssSyntaxError','message':_0x7fb618[_0x33f121(0x106)]||_0x7fb618[_0x33f121(0x126)],'category':STATIC_ANALYSIS[_0x33f121(0x11a)][_0x33f121(0x134)],'fixable':![],'source':_0x33f121(0x11e),'code':_0x7fb618['source']||undefined};}[a0_0x135ca4(0x130)](_0x57decb){const _0x310e5c=a0_0x135ca4;if(!_0x57decb)return STATIC_ANALYSIS[_0x310e5c(0x11a)]['STYLE'];const _0x251818=_0x57decb['toLowerCase']();if(_0x251818['includes'](_0x310e5c(0x127))||_0x251818['includes'](_0x310e5c(0x103))||_0x251818['includes']('no-empty')||_0x251818['includes'](_0x310e5c(0x124)))return STATIC_ANALYSIS['CATEGORY']['SYNTAX'];if(_0x251818[_0x310e5c(0xfe)](_0x310e5c(0x11b))||_0x251818['includes']('optimize'))return STATIC_ANALYSIS[_0x310e5c(0x11a)][_0x310e5c(0x119)];if(_0x251818['includes']('best-practice')||_0x251818[_0x310e5c(0xfe)](_0x310e5c(0x109)))return STATIC_ANALYSIS[_0x310e5c(0x11a)][_0x310e5c(0x136)];return STATIC_ANALYSIS[_0x310e5c(0x11a)]['STYLE'];}['detectLanguage'](_0x55cffc){const _0x3fd48d=a0_0x135ca4,_0x501e25=_0x55cffc['toLowerCase']();if(_0x501e25[_0x3fd48d(0x108)](_0x3fd48d(0x11d))||_0x501e25['endsWith'](_0x3fd48d(0x113)))return _0x3fd48d(0x13e);if(_0x501e25['endsWith']('.less'))return _0x3fd48d(0x133);return _0x3fd48d(0x129);}['getSupportedExtensions'](){const _0x59bf48=a0_0x135ca4;return[_0x59bf48(0x13b),'.scss','.sass',_0x59bf48(0x100)];}[a0_0x135ca4(0x112)](){return![];}}export default CSSAnalyzer;
1
+ const a0_0x53dc92=a0_0x2edc;(function(_0x179ec5,_0x1aa4bf){const _0x2976e9=a0_0x2edc,_0x293122=_0x179ec5();while(!![]){try{const _0x4ec662=-parseInt(_0x2976e9(0x1af))/0x1+-parseInt(_0x2976e9(0x1ae))/0x2+-parseInt(_0x2976e9(0x1bb))/0x3+-parseInt(_0x2976e9(0x19c))/0x4+parseInt(_0x2976e9(0x1bf))/0x5*(parseInt(_0x2976e9(0x1ad))/0x6)+parseInt(_0x2976e9(0x1b8))/0x7+parseInt(_0x2976e9(0x19e))/0x8*(parseInt(_0x2976e9(0x18b))/0x9);if(_0x4ec662===_0x1aa4bf)break;else _0x293122['push'](_0x293122['shift']());}catch(_0x5b5b29){_0x293122['push'](_0x293122['shift']());}}}(a0_0x3441,0x43f93));import{STATIC_ANALYSIS}from'../utilities/constants.js';class CSSAnalyzer{constructor(_0x10ac85=null){const _0x1d6fee=a0_0x2edc;this[_0x1d6fee(0x1b4)]=_0x10ac85,this['stylelint']=null,this[_0x1d6fee(0x198)]=null,this['postcssScss']=null,this[_0x1d6fee(0x195)]=null;}async[a0_0x53dc92(0x1ca)](_0x2ed7ee,_0x138e9b,_0x24a939={}){const _0x58dccb=a0_0x53dc92;try{const _0x49828c=[],_0x247ca1=this[_0x58dccb(0x1cc)](_0x2ed7ee),_0x37f111=await this['checkSyntax'](_0x2ed7ee,_0x138e9b,_0x247ca1);_0x49828c[_0x58dccb(0x1ac)](..._0x37f111);if(_0x37f111['length']===0x0){const _0x31d2e6=await this['lintStyles'](_0x2ed7ee,_0x138e9b,_0x247ca1);_0x49828c[_0x58dccb(0x1ac)](..._0x31d2e6);}return this[_0x58dccb(0x1b4)]?.['debug'](_0x58dccb(0x1a3),{'file':_0x2ed7ee,'language':_0x247ca1,'totalDiagnostics':_0x49828c['length'],'errors':_0x49828c['filter'](_0x5b850e=>_0x5b850e[_0x58dccb(0x18c)]===STATIC_ANALYSIS['SEVERITY'][_0x58dccb(0x197)])['length'],'warnings':_0x49828c[_0x58dccb(0x1be)](_0x4dc48a=>_0x4dc48a[_0x58dccb(0x18c)]===STATIC_ANALYSIS['SEVERITY']['WARNING'])['length']}),_0x49828c;}catch(_0x41fd32){return this['logger']?.[_0x58dccb(0x1c0)]('CSS\x20analysis\x20failed',{'file':_0x2ed7ee,'error':_0x41fd32[_0x58dccb(0x1b5)]}),[];}}async['checkSyntax'](_0x3e0547,_0x558682,_0x182e33){const _0x562580=a0_0x53dc92,_0x51c170=[];try{if(!this['postcss']){const _0x23d2c4=await import(_0x562580(0x198));this['postcss']=_0x23d2c4['default'];}let _0x264577=null;if(_0x182e33==='scss'){if(!this['postcssScss']){const _0x197720=await import(_0x562580(0x19b));this[_0x562580(0x19f)]=_0x197720['default'];}_0x264577=this['postcssScss'];}else{if(_0x182e33===_0x562580(0x1a9)){if(!this[_0x562580(0x195)]){const _0xc94ba=await import('postcss-less');this[_0x562580(0x195)]=_0xc94ba['default'];}_0x264577=this[_0x562580(0x195)];}}const _0x5f1944=this['postcss']()[_0x562580(0x1c4)](_0x558682,{'from':_0x3e0547,'syntax':_0x264577}),_0x4a276d=_0x5f1944['root'];this['logger']?.['debug'](_0x562580(0x1c9),{'file':_0x3e0547});}catch(_0x5f14e4){const _0x46949e=this[_0x562580(0x18e)](_0x5f14e4,_0x3e0547);_0x46949e&&_0x51c170[_0x562580(0x1ac)](_0x46949e);}return _0x51c170;}async[a0_0x53dc92(0x1bd)](_0x3ac300,_0x2ec45b,_0x1f183d){const _0x9c2caa=a0_0x53dc92,_0x2a1108=[];try{if(!this['stylelint']){const _0x3dbe40=await import(_0x9c2caa(0x194));this['stylelint']=_0x3dbe40[_0x9c2caa(0x199)];}const _0x1cbd80={'extends':['stylelint-config-standard'],'rules':{'color-no-invalid-hex':!![],'font-family-no-duplicate-names':!![],'function-calc-no-invalid':!![],'string-no-newline':!![],'unit-no-unknown':!![],'property-no-unknown':!![],'declaration-block-no-duplicate-properties':!![],'selector-pseudo-class-no-unknown':!![],'selector-pseudo-element-no-unknown':!![],'selector-type-no-unknown':[!![],{'ignoreTypes':[_0x9c2caa(0x1ab),_0x9c2caa(0x1cd)]}],'media-feature-name-no-unknown':!![],'at-rule-no-unknown':_0x1f183d===_0x9c2caa(0x191)?[!![],{'ignoreAtRules':['mixin',_0x9c2caa(0x18f),_0x9c2caa(0x1b0),'if','else','for','each',_0x9c2caa(0x1a2),_0x9c2caa(0x1a5),_0x9c2caa(0x1cb),_0x9c2caa(0x1b2),_0x9c2caa(0x192),'forward']}]:_0x1f183d===_0x9c2caa(0x1a9)?[!![],{'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':_0x9c2caa(0x1c8)},'customSyntax':_0x1f183d===_0x9c2caa(0x191)?'postcss-scss':_0x1f183d==='less'?_0x9c2caa(0x19d):undefined},_0x3cdc4a=await this[_0x9c2caa(0x194)]['lint']({'code':_0x2ec45b,'codeFilename':_0x3ac300,'config':_0x1cbd80});if(_0x3cdc4a['results']&&_0x3cdc4a[_0x9c2caa(0x18d)]['length']>0x0){const _0x58b390=_0x3cdc4a[_0x9c2caa(0x18d)][0x0];if(_0x58b390[_0x9c2caa(0x1b1)])for(const _0x1d6959 of _0x58b390[_0x9c2caa(0x1b1)]){_0x2a1108[_0x9c2caa(0x1ac)]({'file':_0x3ac300,'line':_0x1d6959['line']||0x1,'column':_0x1d6959['column']||0x1,'severity':_0x1d6959['severity']==='error'?STATIC_ANALYSIS['SEVERITY'][_0x9c2caa(0x197)]:STATIC_ANALYSIS['SEVERITY']['WARNING'],'rule':_0x1d6959['rule']||'unknown','message':_0x1d6959[_0x9c2caa(0x1aa)],'category':this[_0x9c2caa(0x1ce)](_0x1d6959[_0x9c2caa(0x1a4)]),'fixable':![],'source':_0x9c2caa(0x194)});}}}catch(_0x293c08){this[_0x9c2caa(0x1b4)]?.['warn'](_0x9c2caa(0x1a7),{'file':_0x3ac300,'error':_0x293c08['message']});}return _0x2a1108;}['formatPostCSSError'](_0x2c8499,_0xfe939f){const _0x461838=a0_0x53dc92;return{'file':_0xfe939f,'line':_0x2c8499['line']||0x1,'column':_0x2c8499[_0x461838(0x1c6)]||0x1,'severity':STATIC_ANALYSIS['SEVERITY'][_0x461838(0x197)],'rule':_0x2c8499[_0x461838(0x1a0)]||_0x461838(0x1a8),'message':_0x2c8499['reason']||_0x2c8499['message'],'category':STATIC_ANALYSIS['CATEGORY'][_0x461838(0x1c7)],'fixable':![],'source':_0x461838(0x198),'code':_0x2c8499[_0x461838(0x1c5)]||undefined};}['categorizeStylelintRule'](_0x5d737f){const _0x178f97=a0_0x53dc92;if(!_0x5d737f)return STATIC_ANALYSIS[_0x178f97(0x1c1)][_0x178f97(0x193)];const _0x4b4d4e=_0x5d737f['toLowerCase']();if(_0x4b4d4e['includes'](_0x178f97(0x1b6))||_0x4b4d4e[_0x178f97(0x1c3)]('no-unknown')||_0x4b4d4e[_0x178f97(0x1c3)](_0x178f97(0x1a1))||_0x4b4d4e[_0x178f97(0x1c3)](_0x178f97(0x1c2)))return STATIC_ANALYSIS['CATEGORY']['SYNTAX'];if(_0x4b4d4e[_0x178f97(0x1c3)]('performance')||_0x4b4d4e['includes'](_0x178f97(0x1bc)))return STATIC_ANALYSIS['CATEGORY'][_0x178f97(0x1b7)];if(_0x4b4d4e[_0x178f97(0x1c3)]('best-practice')||_0x4b4d4e['includes']('recommended'))return STATIC_ANALYSIS['CATEGORY']['BEST_PRACTICE'];return STATIC_ANALYSIS[_0x178f97(0x1c1)][_0x178f97(0x193)];}['detectLanguage'](_0x5dc46e){const _0x16f9dd=a0_0x53dc92,_0x511ef0=_0x5dc46e[_0x16f9dd(0x1b9)]();if(_0x511ef0['endsWith']('.scss')||_0x511ef0[_0x16f9dd(0x1ba)](_0x16f9dd(0x196)))return'scss';if(_0x511ef0['endsWith'](_0x16f9dd(0x19a)))return _0x16f9dd(0x1a9);return'css';}[a0_0x53dc92(0x190)](){const _0x5205dd=a0_0x53dc92;return['.css',_0x5205dd(0x1b3),'.sass',_0x5205dd(0x19a)];}[a0_0x53dc92(0x1a6)](){return![];}}function a0_0x2edc(_0xae005,_0x5e8982){_0xae005=_0xae005-0x18b;const _0x3441f8=a0_0x3441();let _0x2edc01=_0x3441f8[_0xae005];if(a0_0x2edc['ZYzuBJ']===undefined){var _0x209f8b=function(_0x1331d8){const _0x43e772='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x10ac85='',_0x2ed7ee='';for(let _0x138e9b=0x0,_0x24a939,_0x49828c,_0x247ca1=0x0;_0x49828c=_0x1331d8['charAt'](_0x247ca1++);~_0x49828c&&(_0x24a939=_0x138e9b%0x4?_0x24a939*0x40+_0x49828c:_0x49828c,_0x138e9b++%0x4)?_0x10ac85+=String['fromCharCode'](0xff&_0x24a939>>(-0x2*_0x138e9b&0x6)):0x0){_0x49828c=_0x43e772['indexOf'](_0x49828c);}for(let _0x37f111=0x0,_0x31d2e6=_0x10ac85['length'];_0x37f111<_0x31d2e6;_0x37f111++){_0x2ed7ee+='%'+('00'+_0x10ac85['charCodeAt'](_0x37f111)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x2ed7ee);};a0_0x2edc['tYDqin']=_0x209f8b,a0_0x2edc['MIiWbH']={},a0_0x2edc['ZYzuBJ']=!![];}const _0x13b5e2=_0x3441f8[0x0],_0x57e700=_0xae005+_0x13b5e2,_0x14986f=a0_0x2edc['MIiWbH'][_0x57e700];return!_0x14986f?(_0x2edc01=a0_0x2edc['tYDqin'](_0x2edc01),a0_0x2edc['MIiWbH'][_0x57e700]=_0x2edc01):_0x2edc01=_0x14986f,_0x2edc01;}function a0_0x3441(){const _0x5c34a0=['zNvUy3rPB24','C3vWCg9YDhnbDxrVrML4','u3r5BgvSAw50igfUywX5C2LZigzHAwXLza','q3nZu3LUDgf4rxjYB3i','BgvZCW','Dgv4Da','l15JDxn0B20TlW','ChvZAa','mta4nMTOuKnTta','ndq5mJmYuM10yuP5','mJKWmZu5EvjwrePj','zxH0zw5K','D2fYBMLUz3m','y29UDgvUDa','lNnJC3m','Bg9Nz2vY','BwvZC2fNzq','BM8TAw52ywXPza','uevsrK9stufoq0u','odiYnta3twHAzwLI','Dg9mB3DLCKnHC2u','zw5KC1DPDgG','mte2mJu2mfH3AufVsa','B3b0Aw1PEMu','BgLUDfn0EwXLCW','zMLSDgvY','mtiYotvss2DJA2q','zxjYB3i','q0furuDpuLK','C3LUDgf4','Aw5JBhvKzxm','ChjVy2vZCW','C291CMnL','y29SDw1U','u1Lovefy','Bg93zxi','ug9ZDentuYbZEw50yxGGy2HLy2SGCgfZC2vK','yw5HBhL6zq','CMv0DxjU','zgv0zwn0tgfUz3vHz2u','BMCTzgvLCa','y2f0zwDVCML6zvn0EwXLBgLUDfj1Bgu','odq1mujSC1HKuG','C2v2zxjPDhK','CMvZDwX0CW','zM9YBwf0ug9ZDentu0vYCM9Y','Aw5JBhvKzq','z2v0u3vWCg9YDgvKrxH0zw5ZAw9UCW','C2nZCW','DxnL','u1rzteu','C3r5BgvSAw50','Cg9ZDgnZC0XLC3m','lNnHC3m','rvjst1i','Cg9ZDgnZCW','zgvMyxvSDa','lMXLC3m','Cg9ZDgnZCY1Zy3nZ','mtmWntiWmgvkuwjeDq','Cg9ZDgnZCY1SzxnZ','oda0ohfrD0jwtq','Cg9ZDgnZC1nJC3m','BMfTzq','BM8Tzw1WDhK','D2HPBgu','q1ntigfUywX5C2LZignVBxbSzxrLza','CNvSzq'];a0_0x3441=function(){return _0x5c34a0;};return a0_0x3441();}export default CSSAnalyzer;
@@ -1 +1 @@
1
- function a0_0x2d11(_0x3b935c,_0x2f1fc9){_0x3b935c=_0x3b935c-0xbd;const _0x16c64a=a0_0x16c6();let _0x2d1160=_0x16c64a[_0x3b935c];if(a0_0x2d11['dpcqOi']===undefined){var _0x673de=function(_0x3c3a97){const _0x184aae='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x261839='',_0x2e4034='';for(let _0x8a0624=0x0,_0x20249c,_0x49bc61,_0x27a936=0x0;_0x49bc61=_0x3c3a97['charAt'](_0x27a936++);~_0x49bc61&&(_0x20249c=_0x8a0624%0x4?_0x20249c*0x40+_0x49bc61:_0x49bc61,_0x8a0624++%0x4)?_0x261839+=String['fromCharCode'](0xff&_0x20249c>>(-0x2*_0x8a0624&0x6)):0x0){_0x49bc61=_0x184aae['indexOf'](_0x49bc61);}for(let _0x56190d=0x0,_0x14281f=_0x261839['length'];_0x56190d<_0x14281f;_0x56190d++){_0x2e4034+='%'+('00'+_0x261839['charCodeAt'](_0x56190d)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x2e4034);};a0_0x2d11['CjmAar']=_0x673de,a0_0x2d11['YtNalB']={},a0_0x2d11['dpcqOi']=!![];}const _0x4f1e68=_0x16c64a[0x0],_0x35576d=_0x3b935c+_0x4f1e68,_0x350336=a0_0x2d11['YtNalB'][_0x35576d];return!_0x350336?(_0x2d1160=a0_0x2d11['CjmAar'](_0x2d1160),a0_0x2d11['YtNalB'][_0x35576d]=_0x2d1160):_0x2d1160=_0x350336,_0x2d1160;}const a0_0x495851=a0_0x2d11;function a0_0x16c6(){const _0x78736c=['rvjst1i','C3rHCNrZv2L0Aa','z3vPzgvSAw5L','CgfYC2u','AxnbCNjHEq','BMfTzq','q1jjveLdquW','CgfZC3DVCMq','y2f0zwDVCNK','zgvIDwC','DMfSAwrHDg9Y','B2jQzwn0','AgfKB2XPBNq','u0vwrvjjvfK','y2HLy2TVDIbUB3qGyxzHAwXHyMXL','v0fstKLorW','Dg9mB3DLCKnHC2u','y2HLy2TVDIaTlxzLCNnPB24','C2v2zxjPDhK','lNrMDMfYCW','BwvZC2fNzq','y29TCgLSzq','Bgv2zwW','vMfSAwrHDgLVBIbPC3n1zsbKzxrLy3rLza','CNvSzq','vxnLigvUDMLYB25Tzw50lxnWzwnPzMLJic5LBNyGzMLSzxmGyw5KigfKzcaUzw52ihrVic5NAxrPz25VCMu','y29TBw9UANm','vw5RBM93BIbJB25MAwCGzMLSzsb0ExbL','C2vJDxjPDhK','y2HLy2TVDIb2ywXPzgf0Aw9UigzHAwXLza','C2vJCMv0','CgfYC2viywrVBgLUDfjLC3vSDhm','zg9JA2vYzMLSzq','EwfTBgXPBNqGlwyGCgfYC2fIBguGiG','y3DL','nNb1Avbcvq','y2HLy2TFAwq','EwfTBgXPBNqGBM90igf2ywLSywjSzq','mtmXodGWmuHtAgT3za','BM8TAw1WBgLJAxqTyw55','BwvKAxvT','nJbruM1WC28','lNrM','C3rKB3v0','EwfTBgXPBNq','BxvZDcbOyxzLihjLCxvPCMvKihbYB3bLCNr5icC','sw52ywXPzcbku09ooIa','zgv0zwn0qxzHAwXHyMXLvMfSAwrHDg9YCW','mJDHturfrfe','yMvZDc1WCMfJDgLJzq','ANnVBI1WyxjZzq','DhnJB25MAwCUANnVBG','zg9JA2vYx2nVBxbVC2u','ChvZAa','otuXotq0vwXzsxzW','nKfXy1zQsG','EwfTBgXPBNqGzgv0zwn0zwq','CgfYC2vdAgvJA292uMvZDwX0CW','zxjYB3i','DMfSAwrHDgvfBNzgAwXL','zgvMyxvSDa','ANnVBI1Zy2HLBwe','DxrMltG','C3rYAwn0','su5gtW','wufntcbMAwXLihzHBgLKyxrPB24','y2HLy2TFy2XHC3m','BwfWwwfTBgXPBNrtzxzLCML0Eq','zg9JA2vYlwnVBxbVC2u','CgfYyw1Z','q29UC2LKzxiGzw5HyMXPBMCGiNn0CMLJDciGBw9KzsbMB3iGyMv0DgvYihr5CguGC2fMzxr5','yxzHAwXHyMXLu2nHBM5LCNm','sw5MCMfZDhj1y3r1CMuGyxmGq29KzsbZzwn1CML0EsbZy2fUBMLUzYaOrg9JA2vYlcblDwjLCM5LDgvZlcbuzxjYywzVCM0P','CgfJA2fNzs5QC29U','z2L0AhvIlwfJDgLVBNm','CMvZDwX0CW','DMfSAwrHDgvxAxrOq2HLy2TVDG','BwfWsgfKB2XPBNrtzxzLCML0Eq','C3rYAw5N','rMfPBgvKihrVihbHCNnLigHHzg9SAw50ig91Dhb1Da','BM9jBxbSAwnPDefUEq','Bg9Nz2vY','DhjPBq','DgvYCMfMB3jT','y2HLy2TVDG','rMfPBgvKihrVihbHCNnLignOzwnRB3yGB3v0Chv0','Aw5ZDgfUy2vqyxrO','CMvTzwrPyxrPB24','D2fYBG','y2HLy2TVDIaTzIaI','EwfTBa','A3vIzxjUzxrLCW','DMfSAwrHDgvuC0nVBMzPzW','zMLSzq','y29SDw1U','CgfJA2fNzs5QC29UihzHBgLKyxrPB24GzMfPBgvK','BgLUzq','mJm5mdi2mNHiqMHnta','y29TCgLSzxjpChrPB25Z','DMfSAwrHDgvzqu1m','DMfSAwrHDgveB2nRzxjMAwXL','AgLNAa','Bw9KDwXL','CMvHzezPBgu','CgfYC2vzyw1SBgLUDfjLC3vSDhm','ChjPDMf0zsbRzxK','zw52lxzHBgLKyxrVCG','BgvUz3rO','ywP2','lNLHBwW','iIaTlwzYyw1LD29YAYa','DMfSAwrHDgLVBG','ywP2icHku09oifnJAgvTysK','mJC4mdCZnvHpBw1rzq','mtmYmtm2muDsr1LgyW','mtm2oteYm3foCw5Xrq','mtKZmJrPwgP0CfK','DgvZDa'];a0_0x16c6=function(){return _0x78736c;};return a0_0x16c6();}(function(_0x27ea0b,_0x5c07c5){const _0x5ebcae=a0_0x2d11,_0x5d8f07=_0x27ea0b();while(!![]){try{const _0x4a8ca2=parseInt(_0x5ebcae(0xc3))/0x1+-parseInt(_0x5ebcae(0x128))/0x2+parseInt(_0x5ebcae(0xea))/0x3*(parseInt(_0x5ebcae(0xc5))/0x4)+parseInt(_0x5ebcae(0xc2))/0x5*(parseInt(_0x5ebcae(0xfe))/0x6)+-parseInt(_0x5ebcae(0xc4))/0x7+parseInt(_0x5ebcae(0xfd))/0x8*(-parseInt(_0x5ebcae(0xf7))/0x9)+parseInt(_0x5ebcae(0xf0))/0xa*(parseInt(_0x5ebcae(0xed))/0xb);if(_0x4a8ca2===_0x5c07c5)break;else _0x5d8f07['push'](_0x5d8f07['shift']());}catch(_0x5eeed5){_0x5d8f07['push'](_0x5d8f07['shift']());}}}(a0_0x16c6,0xd1ac1));import{exec}from'child_process';import{promisify}from'util';import a0_0x261839 from'path';import a0_0x2e4034 from'fs/promises';import{STATIC_ANALYSIS}from'../utilities/constants.js';const execAsync=promisify(exec);class ConfigValidator{constructor(_0x8a0624=null){const _0x362b82=a0_0x2d11;this[_0x362b82(0x118)]=_0x8a0624,this['availableScanners']=null,this['scannerCache']=new Map();}async['detectAvailableValidators'](){const _0x214b28=a0_0x2d11;if(this['availableScanners']!==null)return this[_0x214b28(0x10e)];const _0x20249c={'checkov':![],'hadolint':![],'yamllint':![],'jsonSchema':![]};try{await execAsync(_0x214b28(0xd8),{'timeout':0x1388}),_0x20249c[_0x214b28(0x11b)]=!![],this['logger']?.[_0x214b28(0xd0)]('checkov\x20detected');}catch(_0x49bc61){this[_0x214b28(0x118)]?.['debug'](_0x214b28(0xd5),{'error':_0x49bc61['message']});}try{await execAsync('hadolint\x20--version',{'timeout':0x1388}),_0x20249c[_0x214b28(0xd3)]=!![],this['logger']?.[_0x214b28(0xd0)]('hadolint\x20detected');}catch(_0x27a936){this['logger']?.['debug']('hadolint\x20not\x20available',{'error':_0x27a936[_0x214b28(0xdb)]});}try{await execAsync('yamllint\x20--version',{'timeout':0x1388}),_0x20249c['yamllint']=!![],this[_0x214b28(0x118)]?.[_0x214b28(0xd0)](_0x214b28(0xff));}catch(_0x56190d){this[_0x214b28(0x118)]?.[_0x214b28(0xd0)](_0x214b28(0xec),{'error':_0x56190d['message']});}try{await import(_0x214b28(0xbd)),_0x20249c['jsonSchema']=!![],this[_0x214b28(0x118)]?.[_0x214b28(0xd0)]('JSON\x20Schema\x20validation\x20available');}catch(_0x14281f){this['logger']?.[_0x214b28(0xd0)]('ajv\x20not\x20available',{'error':_0x14281f['message']});}return this[_0x214b28(0x10e)]=_0x20249c,_0x20249c;}async['validate'](_0x5dcf82,_0x1f9484={}){const _0x3df534=a0_0x2d11,_0x23bd38=[],_0x309e78=await this[_0x3df534(0xf6)](),_0x1d868a=this['detectFileType'](_0x5dcf82);this[_0x3df534(0x118)]?.[_0x3df534(0xd0)]('Validating\x20config\x20file',{'filePath':_0x5dcf82,'fileType':_0x1d868a});switch(_0x1d868a){case'dockerfile':if(_0x309e78['hadolint']){const _0x99110f=await this[_0x3df534(0x12b)](_0x5dcf82,_0x1f9484);_0x23bd38[_0x3df534(0xfc)](..._0x99110f);}if(_0x309e78['checkov']){const _0x260fc2=await this['validateWithCheckov'](_0x5dcf82,'dockerfile',_0x1f9484);_0x23bd38[_0x3df534(0xfc)](..._0x260fc2);}break;case _0x3df534(0x10b):if(_0x309e78['yamllint']){const _0x15d70c=await this['validateYAML'](_0x5dcf82,_0x1f9484);_0x23bd38[_0x3df534(0xfc)](..._0x15d70c);}if(_0x309e78['checkov']){const _0x15ba67=await this[_0x3df534(0x113)](_0x5dcf82,_0x3df534(0xfb),_0x1f9484);_0x23bd38[_0x3df534(0xfc)](..._0x15ba67);}break;case _0x3df534(0x122):if(_0x309e78['yamllint']){const _0x5b0398=await this['validateYAML'](_0x5dcf82,_0x1f9484);_0x23bd38['push'](..._0x5b0398);}if(_0x309e78[_0x3df534(0x11b)]){const _0x7db949=await this['validateWithCheckov'](_0x5dcf82,'kubernetes',_0x1f9484);_0x23bd38[_0x3df534(0xfc)](..._0x7db949);}break;case _0x3df534(0x11a):if(_0x309e78[_0x3df534(0x11b)]){const _0x10025a=await this['validateWithCheckov'](_0x5dcf82,'terraform',_0x1f9484);_0x23bd38['push'](..._0x10025a);}break;case'package.json':if(_0x309e78['jsonSchema']){const _0x1da038=await this['validatePackageJson'](_0x5dcf82,_0x1f9484);_0x23bd38[_0x3df534(0xfc)](..._0x1da038);}break;case'tsconfig.json':if(_0x309e78['jsonSchema']){const _0x1af709=await this[_0x3df534(0x123)](_0x5dcf82,_0x1f9484);_0x23bd38['push'](..._0x1af709);}break;case _0x3df534(0x111):if(_0x309e78[_0x3df534(0xf3)]){const _0x226cd8=await this['validateYAML'](_0x5dcf82,_0x1f9484);_0x23bd38[_0x3df534(0xfc)](..._0x226cd8);}break;case'env':const _0x214968=await this[_0x3df534(0x102)](_0x5dcf82,_0x1f9484);_0x23bd38['push'](..._0x214968);break;case _0x3df534(0x121):if(_0x309e78[_0x3df534(0xf3)]){const _0xac0657=await this[_0x3df534(0x12a)](_0x5dcf82,_0x1f9484);_0x23bd38['push'](..._0xac0657);}break;default:this['logger']?.[_0x3df534(0x11f)](_0x3df534(0xe2),{'filePath':_0x5dcf82,'fileType':_0x1d868a});return[];}return this['normalizeResults'](_0x23bd38);}async[a0_0x495851(0x12b)](_0x3e9a2f,_0x2353b2={}){const _0xac8205=a0_0x495851;try{const _0x4a9c78=await execAsync('hadolint\x20--format\x20json\x20\x22'+_0x3e9a2f+'\x22',{'maxBuffer':0xa*0x400*0x400,'timeout':0x7530}),_0x2babf4=JSON['parse'](_0x4a9c78[_0xac8205(0xf2)]);return this[_0xac8205(0xe6)](_0x2babf4,_0x3e9a2f);}catch(_0x3ebbac){if(_0x3ebbac[_0xac8205(0xf2)])try{const _0x4a17d5=JSON[_0xac8205(0xca)](_0x3ebbac['stdout']);return this['parseHadolintResults'](_0x4a17d5,_0x3e9a2f);}catch(_0x142362){this['logger']?.['error'](_0xac8205(0x116),{'error':_0x142362['message']});}return this[_0xac8205(0x118)]?.[_0xac8205(0x101)]('hadolint\x20validation\x20failed',{'error':_0x3ebbac[_0xac8205(0xdb)]}),[];}}['parseHadolintResults'](_0x5c06a0,_0x3cbfe7){const _0x4a283a=a0_0x495851,_0x52ce=[];if(Array[_0x4a283a(0xcb)](_0x5c06a0))for(const _0x46327e of _0x5c06a0){_0x52ce[_0x4a283a(0xfc)]({'file':_0x3cbfe7,'line':_0x46327e['line']||0x1,'column':_0x46327e['column']||0x1,'severity':this['mapHadolintSeverity'](_0x46327e[_0x4a283a(0xdd)]),'rule':_0x46327e['code'],'message':_0x46327e['message'],'category':_0x4a283a(0xe7),'validator':_0x4a283a(0xd3)});}return _0x52ce;}async['validateYAML'](_0x374e22,_0x40cd76={}){const _0x518b2a=a0_0x495851;try{const _0x5e272d=await execAsync(_0x518b2a(0xe8)+_0x374e22+'\x22',{'maxBuffer':0xa*0x400*0x400,'timeout':0x7530});return this[_0x518b2a(0x12f)](_0x5e272d[_0x518b2a(0xf2)],_0x374e22);}catch(_0x423a95){if(_0x423a95['stdout'])return this['parseYamllintResults'](_0x423a95['stdout'],_0x374e22);return this['logger']?.[_0x518b2a(0x101)]('yamllint\x20validation\x20failed',{'error':_0x423a95['message']}),[];}}[a0_0x495851(0x12f)](_0x3a42dd,_0x302cc4){const _0xc750d2=a0_0x495851,_0x198688=[],_0x4c9a80=_0x3a42dd['split']('\x0a')['filter'](_0x387a74=>_0x387a74['trim']());for(const _0x12aa4f of _0x4c9a80){const _0x55e397=_0x12aa4f['match'](/^(.+?):(\d+):(\d+):\s*\[(\w+)\]\s*(.+?)\s*\((.+?)\)/);if(_0x55e397){const [,_0x31232a,_0x47718d,_0x32d677,_0x2add7d,_0x414e25,_0x379d50]=_0x55e397;_0x198688[_0xc750d2(0xfc)]({'file':_0x302cc4,'line':parseInt(_0x47718d,0xa),'column':parseInt(_0x32d677,0xa),'severity':this['mapYamllintSeverity'](_0x2add7d),'rule':_0x379d50,'message':_0x414e25,'category':_0xc750d2(0x121),'validator':_0xc750d2(0xf3)});}}return _0x198688;}async[a0_0x495851(0x113)](_0x256b40,_0x12bf0d,_0x4d6f8c={}){const _0x3f96b1=a0_0x495851;try{const _0x17e4f9=await execAsync(_0x3f96b1(0x120)+_0x256b40+_0x3f96b1(0xbf)+_0x12bf0d+'\x20--output\x20json\x20--compact',{'maxBuffer':0xa*0x400*0x400,'timeout':0xea60}),_0x26730f=JSON[_0x3f96b1(0xca)](_0x17e4f9[_0x3f96b1(0xf2)]);return this['parseCheckovResults'](_0x26730f,_0x256b40);}catch(_0x471899){if(_0x471899[_0x3f96b1(0xf2)])try{const _0x25a17e=JSON['parse'](_0x471899['stdout']);return this['parseCheckovResults'](_0x25a17e,_0x256b40);}catch(_0x44a11d){this['logger']?.['error'](_0x3f96b1(0x11c),{'error':_0x44a11d[_0x3f96b1(0xdb)]});}return this['logger']?.[_0x3f96b1(0x101)](_0x3f96b1(0xe4),{'error':_0x471899[_0x3f96b1(0xdb)]}),[];}}[a0_0x495851(0x100)](_0x44a526,_0x4220f7){const _0x2dee79=a0_0x495851,_0x25153c=[];if(_0x44a526['results']&&_0x44a526[_0x2dee79(0x112)]['failed_checks'])for(const _0x58af71 of _0x44a526[_0x2dee79(0x112)]['failed_checks']){_0x25153c[_0x2dee79(0xfc)]({'file':_0x4220f7,'line':_0x58af71['file_line_range']?_0x58af71['file_line_range'][0x0]:0x1,'column':0x1,'severity':this['mapCheckovSeverity'](_0x58af71[_0x2dee79(0x109)]),'rule':_0x58af71['check_id'],'message':_0x58af71['check_name']||_0x58af71[_0x2dee79(0xeb)],'category':_0x2dee79(0xe3),'validator':_0x2dee79(0x11b),'remediation':_0x58af71[_0x2dee79(0xc9)],'cwe':_0x58af71[_0x2dee79(0xe9)],'references':_0x58af71['guideline']?[_0x58af71['guideline']]:[]});}return _0x25153c;}async['validatePackageJson'](_0x19354d,_0x2766b9={}){const _0x1944bb=a0_0x495851;try{const _0x132eed=(await import('ajv'))['default'],_0x4a5ec4=(await import('ajv-formats'))[_0x1944bb(0x103)],_0x425b13=await a0_0x2e4034[_0x1944bb(0x12e)](_0x19354d,'utf-8'),_0x558add=JSON[_0x1944bb(0xca)](_0x425b13),_0x49ee91=new _0x132eed({'allErrors':!![],'strict':![]});_0x4a5ec4(_0x49ee91);const _0x333f13={'type':_0x1944bb(0xd2),'required':[_0x1944bb(0xcc),'version'],'properties':{'name':{'type':'string','pattern':'^(?:@[a-z0-9-~][a-z0-9-._~]*/)?[a-z0-9-~][a-z0-9-._~]*$'},'version':{'type':_0x1944bb(0x115)},'description':{'type':'string'},'main':{'type':'string'},'type':{'type':'string','enum':[_0x1944bb(0x12d),_0x1944bb(0xe1)]},'scripts':{'type':_0x1944bb(0xd2)},'dependencies':{'type':_0x1944bb(0xd2)},'devDependencies':{'type':_0x1944bb(0xd2)}},'additionalProperties':!![]},_0xf3d429=_0x49ee91[_0x1944bb(0xdc)](_0x333f13),_0x353e52=_0xf3d429(_0x558add);if(!_0x353e52&&_0xf3d429['errors'])return _0xf3d429['errors']['map'](_0x47ee08=>({'file':_0x19354d,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS['SEVERITY']['ERROR'],'rule':'json-schema','message':_0x47ee08[_0x1944bb(0x11d)]?_0x47ee08['instancePath']+'\x20'+_0x47ee08['message']:_0x1944bb(0xf4)+_0x47ee08[_0x1944bb(0x10c)]['missingProperty']+'\x27','category':_0x1944bb(0xc0),'validator':_0x1944bb(0x104)}));return[];}catch(_0x14eab1){return this['logger']?.[_0x1944bb(0x101)](_0x1944bb(0x126),{'error':_0x14eab1['message']}),[{'file':_0x19354d,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS['SEVERITY'][_0x1944bb(0xc7)],'rule':'json-parse','message':'Invalid\x20JSON:\x20'+_0x14eab1[_0x1944bb(0xdb)],'category':'syntax','validator':'json-parse'}];}}async['validateTsConfig'](_0x11f0bb,_0x385af1={}){const _0x4cf1d2=a0_0x495851;try{const _0x4daff4=await a0_0x2e4034['readFile'](_0x11f0bb,_0x4cf1d2(0x105)),_0x51aa3f=JSON[_0x4cf1d2(0xca)](_0x4daff4),_0x177988=[];if(_0x51aa3f[_0x4cf1d2(0x129)]){const _0x270d57=_0x51aa3f[_0x4cf1d2(0x129)];!_0x270d57[_0x4cf1d2(0x106)]&&_0x177988[_0x4cf1d2(0xfc)]({'file':_0x11f0bb,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS['SEVERITY']['WARNING'],'rule':'strict-mode','message':_0x4cf1d2(0x10d),'category':'best-practice','validator':'tsconfig-validator'}),_0x270d57[_0x4cf1d2(0x117)]===![]&&_0x177988['push']({'file':_0x11f0bb,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS['SEVERITY']['WARNING'],'rule':_0x4cf1d2(0xee),'message':'Disabling\x20noImplicitAny\x20reduces\x20type\x20safety','category':_0x4cf1d2(0xf8),'validator':'tsconfig-validator'});}return _0x177988;}catch(_0x5db71a){return this[_0x4cf1d2(0x118)]?.[_0x4cf1d2(0x101)]('tsconfig.json\x20validation\x20failed',{'error':_0x5db71a[_0x4cf1d2(0xdb)]}),[{'file':_0x11f0bb,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS['SEVERITY']['ERROR'],'rule':_0x4cf1d2(0xf9),'message':_0x4cf1d2(0xf5)+_0x5db71a[_0x4cf1d2(0xdb)],'category':'syntax','validator':'json-parse'}];}}async['validateEnvFile'](_0x3f19c4,_0x364fcc={}){const _0x56caaa=a0_0x495851;try{const _0x2406b2=await a0_0x2e4034[_0x56caaa(0x12e)](_0x3f19c4,'utf-8'),_0x2e2c37=[],_0x40e7ae=_0x2406b2['split']('\x0a'),_0x587a48=[{'pattern':/password|passwd|pwd/i,'name':_0x56caaa(0xce)},{'pattern':/api[_-]?key/i,'name':'API\x20key'},{'pattern':/secret/i,'name':_0x56caaa(0xe5)},{'pattern':/token/i,'name':'token'},{'pattern':/private[_-]?key/i,'name':_0x56caaa(0x130)},{'pattern':/aws[_-]?access/i,'name':'AWS\x20credentials'}];return _0x40e7ae['forEach']((_0x50ba2b,_0x4d7339)=>{const _0xc50be4=_0x56caaa,_0x4e30ba=_0x50ba2b[_0xc50be4(0x119)]();if(!_0x4e30ba||_0x4e30ba[_0xc50be4(0xc8)]('#'))return;if(_0x4e30ba['includes']('=')){const [_0x3ae033,_0xd72ee6]=_0x4e30ba['split']('='),_0x33e379=_0x3ae033[_0xc50be4(0xd7)](),_0x4dffbf=_0xd72ee6?.['trim']()||'',_0x35d4d9=_0x4dffbf&&_0x4dffbf!==''&&!_0x4dffbf[_0xc50be4(0xc8)]('$')&&_0x4dffbf!=='your-key-here'&&_0x4dffbf!=='changeme'&&_0x4dffbf[_0xc50be4(0x132)]>0x5;if(_0x35d4d9)for(const {pattern:_0x2b66ce,name:_0x568bfb}of _0x587a48){if(_0x2b66ce[_0xc50be4(0xc6)](_0x33e379)){_0x2e2c37['push']({'file':_0x3f19c4,'line':_0x4d7339+0x1,'column':0x1,'severity':STATIC_ANALYSIS['SEVERITY'][_0xc50be4(0xcd)],'rule':'hardcoded-secret','message':'Potential\x20hardcoded\x20'+_0x568bfb+'\x20detected\x20in\x20.env\x20file','category':_0xc50be4(0xe3),'validator':_0xc50be4(0x131),'remediation':_0xc50be4(0xe0)});break;}}}}),_0x2e2c37;}catch(_0x2882aa){return this['logger']?.[_0x56caaa(0x101)]('.env\x20validation\x20failed',{'error':_0x2882aa[_0x56caaa(0xdb)]}),[];}}['detectFileType'](_0x11fad0){const _0x24746d=a0_0x495851,_0x199a4d=a0_0x261839['basename'](_0x11fad0)['toLowerCase'](),_0x4f26b0=a0_0x261839['dirname'](_0x11fad0);if(_0x199a4d==='dockerfile')return _0x24746d(0xe7);if(_0x199a4d==='docker-compose.yml'||_0x199a4d==='docker-compose.yaml')return'docker-compose';if(_0x199a4d===_0x24746d(0x110))return'package.json';if(_0x199a4d===_0x24746d(0xfa))return'tsconfig.json';if(_0x199a4d==='.env'||_0x199a4d['endsWith']('.env'))return'env';if(_0x4f26b0['includes']('.github/workflows'))return _0x24746d(0x111);if(_0x4f26b0['includes']('kubernetes')||_0x4f26b0['includes']('k8s'))return'kubernetes';const _0x1830c9=a0_0x261839['extname'](_0x11fad0)[_0x24746d(0xd7)]();if(_0x1830c9===_0x24746d(0xf1)||_0x1830c9===_0x24746d(0xda))return _0x24746d(0x11a);if(_0x1830c9==='.yml'||_0x1830c9===_0x24746d(0xbe))return'yaml';if(_0x1830c9==='.json')return'json';return'unknown';}['normalizeResults'](_0x4dab13){const _0xace169=a0_0x495851;return _0x4dab13['map'](_0x42f44d=>({'file':_0x42f44d[_0xace169(0x124)],'line':_0x42f44d[_0xace169(0x127)]||0x1,'column':_0x42f44d[_0xace169(0x125)]||0x1,'severity':_0x42f44d[_0xace169(0xd9)]||STATIC_ANALYSIS[_0xace169(0xd4)][_0xace169(0xd6)],'rule':_0x42f44d[_0xace169(0xdf)]||'unknown','message':_0x42f44d[_0xace169(0xdb)]||_0xace169(0xde),'category':_0x42f44d[_0xace169(0xcf)]||_0xace169(0xc0),'validator':_0x42f44d[_0xace169(0xd1)],'cwe':_0x42f44d[_0xace169(0xe9)]||null,'remediation':_0x42f44d[_0xace169(0x11e)]||null,'references':_0x42f44d['references']||[]}));}[a0_0x495851(0x114)](_0x57b47e){const _0x49ee16=a0_0x495851,_0x3f7b8c={'error':STATIC_ANALYSIS[_0x49ee16(0xd4)]['ERROR'],'warning':STATIC_ANALYSIS[_0x49ee16(0xd4)][_0x49ee16(0xd6)],'info':STATIC_ANALYSIS['SEVERITY'][_0x49ee16(0x107)],'style':STATIC_ANALYSIS['SEVERITY'][_0x49ee16(0x107)]};return _0x3f7b8c[_0x57b47e?.[_0x49ee16(0xd7)]()]||STATIC_ANALYSIS[_0x49ee16(0xd4)]['WARNING'];}[a0_0x495851(0x10a)](_0x2b4590){const _0x18399d=a0_0x495851,_0x3adffc={'error':STATIC_ANALYSIS[_0x18399d(0xd4)]['ERROR'],'warning':STATIC_ANALYSIS['SEVERITY']['WARNING']};return _0x3adffc[_0x2b4590?.[_0x18399d(0xd7)]()]||STATIC_ANALYSIS[_0x18399d(0xd4)]['WARNING'];}['mapCheckovSeverity'](_0x16efc2){const _0x185b77=a0_0x495851;return STATIC_ANALYSIS[_0x185b77(0xd4)]['ERROR'];}async['getValidatorStatus'](){const _0x1ba7ed=await this['detectAvailableValidators']();return{'validators':_0x1ba7ed,'recommendations':this['getInstallRecommendations'](_0x1ba7ed)};}['getInstallRecommendations'](_0x1ebb9d){const _0x29b1c0=a0_0x495851,_0x1f31de=[];return!_0x1ebb9d['checkov']&&_0x1f31de[_0x29b1c0(0xfc)]({'validator':'checkov','reason':_0x29b1c0(0x10f),'install':'pip\x20install\x20checkov','priority':_0x29b1c0(0x12c)}),!_0x1ebb9d[_0x29b1c0(0xd3)]&&_0x1f31de[_0x29b1c0(0xfc)]({'validator':'hadolint','reason':'Dockerfile\x20linting\x20and\x20best\x20practices','install':'Download from https://github.com/hadolint/hadolint/releases','priority':'high'}),!_0x1ebb9d[_0x29b1c0(0xf3)]&&_0x1f31de['push']({'validator':_0x29b1c0(0xf3),'reason':_0x29b1c0(0x108),'install':'pip\x20install\x20yamllint','priority':_0x29b1c0(0xef)}),!_0x1ebb9d['jsonSchema']&&_0x1f31de['push']({'validator':_0x29b1c0(0xc1),'reason':'JSON\x20configuration\x20validation','install':'npm\x20install\x20ajv\x20ajv-formats','priority':'medium'}),_0x1f31de;}}export default ConfigValidator;
1
+ const a0_0x4d3ea4=a0_0x2efc;(function(_0x4afd58,_0x15b86d){const _0x153b4b=a0_0x2efc,_0x336e9a=_0x4afd58();while(!![]){try{const _0xc81983=-parseInt(_0x153b4b(0x188))/0x1*(-parseInt(_0x153b4b(0x151))/0x2)+-parseInt(_0x153b4b(0x14c))/0x3*(-parseInt(_0x153b4b(0x18b))/0x4)+-parseInt(_0x153b4b(0x13c))/0x5*(-parseInt(_0x153b4b(0x186))/0x6)+-parseInt(_0x153b4b(0x141))/0x7+-parseInt(_0x153b4b(0x160))/0x8+-parseInt(_0x153b4b(0x163))/0x9*(-parseInt(_0x153b4b(0x194))/0xa)+parseInt(_0x153b4b(0x173))/0xb*(-parseInt(_0x153b4b(0x15f))/0xc);if(_0xc81983===_0x15b86d)break;else _0x336e9a['push'](_0x336e9a['shift']());}catch(_0x1562f4){_0x336e9a['push'](_0x336e9a['shift']());}}}(a0_0x15f0,0x2ee01));import{exec}from'child_process';import{promisify}from'util';import a0_0x4adbeb from'path';import a0_0x2062e9 from'fs/promises';import{STATIC_ANALYSIS}from'../utilities/constants.js';function a0_0x2efc(_0x4910c1,_0x22f173){_0x4910c1=_0x4910c1-0x135;const _0x15f0c4=a0_0x15f0();let _0x2efcf4=_0x15f0c4[_0x4910c1];if(a0_0x2efc['tkHfgw']===undefined){var _0x3d0533=function(_0x514ceb){const _0x325a8f='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x4adbeb='',_0x2062e9='';for(let _0x16bc25=0x0,_0x4e3466,_0x2672d2,_0x135daa=0x0;_0x2672d2=_0x514ceb['charAt'](_0x135daa++);~_0x2672d2&&(_0x4e3466=_0x16bc25%0x4?_0x4e3466*0x40+_0x2672d2:_0x2672d2,_0x16bc25++%0x4)?_0x4adbeb+=String['fromCharCode'](0xff&_0x4e3466>>(-0x2*_0x16bc25&0x6)):0x0){_0x2672d2=_0x325a8f['indexOf'](_0x2672d2);}for(let _0x55bfca=0x0,_0x3b0e27=_0x4adbeb['length'];_0x55bfca<_0x3b0e27;_0x55bfca++){_0x2062e9+='%'+('00'+_0x4adbeb['charCodeAt'](_0x55bfca)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x2062e9);};a0_0x2efc['CXXTUW']=_0x3d0533,a0_0x2efc['qZWCnW']={},a0_0x2efc['tkHfgw']=!![];}const _0x464f44=_0x15f0c4[0x0],_0x3da50d=_0x4910c1+_0x464f44,_0x2a8667=a0_0x2efc['qZWCnW'][_0x3da50d];return!_0x2a8667?(_0x2efcf4=a0_0x2efc['CXXTUW'](_0x2efcf4),a0_0x2efc['qZWCnW'][_0x3da50d]=_0x2efcf4):_0x2efcf4=_0x2a8667,_0x2efcf4;}function a0_0x15f0(){const _0x1a8abe=['mJbZBvjWtKy','CMvZDwX0CW','lNLHBwW','u0vwrvjjvfK','yxzHAwXHyMXLu2nHBM5LCNm','C2nHBM5LCKnHy2HL','C3bSAxq','zxH0BMfTzq','AgfKB2XPBNqGls1MB3jTyxqGANnVBIaI','EwfTBgXPBNqGls12zxjZAw9U','rMfPBgvKihrVihbHCNnLigHHzg9SAw50ig91Dhb1Da','BxvZDcbOyxzLihjLCxvPCMvKihbYB3bLCNr5icC','Aw5ZDgfUy2vqyxrO','C3rYAwn0lw1Vzgu','C3rKB3v0','CgfYC2viywrVBgLUDfjLC3vSDhm','zMLSzq','ANnVBG','EwfTBgXPBNqGlwyGCgfYC2fIBguGiG','BMfTzq','vMfSAwrHDgLVBIbPC3n1zsbKzxrLy3rLza','ywP2','AgfKB2XPBNq','C3rYAw5N','DhnJB25MAwCUANnVBG','zw52','mZvpC3zKChu','qvDtignYzwrLBNrPywXZ','Bwf0y2G','B2jQzwn0','ywP2icHku09oifnJAgvTysK','mtiYmte0m2HetKPOsG','zg9JA2vYzMLSzq','DMfSAwrHDgvqywnRywDLsNnVBG','CgfYC2vdAgvJA292uMvZDwX0CW','zg9JA2vYlwnVBxbVC2uUEw1S','ug90zw50AwfSigHHCMrJB2rLzca','zMfPBgvKx2nOzwnRCW','zgvMyxvSDa','C2vJDxjPDhK','AgLNAa','BwfWq2HLy2TVDLnLDMvYAxr5','otLlB0HhvuS','CgfYyw1Z','EwfTBa','BwfW','ywP2ig5VDcbHDMfPBgfIBgu','mte4r21IBMvg','BwLZC2LUz1bYB3bLCNr5','DhnJB25MAwCTDMfSAwrHDg9Y','DgvZDa','zg9JA2vYx2nVBxbVC2u','CgfYC2vzyw1SBgLUDfjLC3vSDhm','y2HLy2TFAwq','C3LUDgf4','sw52ywXPzcbku09ooIa','DMfSAwrHDgLVBG','ChvZAa','y2HLy2TVDG','AgfKB2XPBNqGDMfSAwrHDgLVBIbMywLSzwq','DMfSAwrHDgvxAxrOq2HLy2TVDG','mtjwANnwqKK','mte1nZG3mNjNtLzXyW','v0fstKLorW','DMfSAwrHDgvfBNzgAwXL','mtq3nte4muzVDMTpvW','Bg9Nz2vY','yMvZDc1WCMfJDgLJzq','BgLUzq','AxnbCNjHEq','Dg9mB3DLCKnHC2u','zgvIDwC','iIaTlwzYyw1LD29YAYa','Dg9Rzw4','z2L0AhvIlwfJDgLVBNm','A3vIzxjUzxrLCW','Dw5RBM93BG','ANnVBI1WyxjZzq','z2v0sw5ZDgfSBfjLy29TBwvUzgf0Aw9UCW','BwfWsgfKB2XPBNrtzxzLCML0Eq','CMvTzwrPyxrPB24','mteZnte3ofnsBhPisq','DgvYCMfMB3jT','EwfTBgXPBNq','Ew91CI1RzxKTAgvYzq','BM9jBxbSAwnPDefUEq','BwfWwwfTBgXPBNrtzxzLCML0Eq','DhjPBq','z2v0vMfSAwrHDg9Yu3rHDhvZ','CMvHzezPBgu','Aw5JBhvKzxm','EwfTBgXPBNqGBM90igf2ywLSywjSzq','zxjYB3i','y2HLy2TFBMfTzq','CMvMzxjLBMnLCW','lNLTBa','su5gtW','CgfJA2fNzs5QC29U','z3vPzgvSAw5L','DMfSAwrHDgvzqu1m','mJy3ndjSAfDZzhm','BwvKAxvT','mte0ngzRsKfkwG','y29Kzq','D2fYBG','mJi3nZj1Bg9ru3i','zg9JA2vYlwnVBxbVC2u','ic0TB3v0Chv0igPZB24Gls1JB21Wywn0','BM9YBwfSAxPLuMvZDwX0CW','zw5KC1DPDgG','zMLSDgvY','DxrMltG','BwvZC2fNzq','y29TCgLSzq'];a0_0x15f0=function(){return _0x1a8abe;};return a0_0x15f0();}const execAsync=promisify(exec);class ConfigValidator{constructor(_0x16bc25=null){const _0x4bf13a=a0_0x2efc;this[_0x4bf13a(0x164)]=_0x16bc25,this['availableScanners']=null,this[_0x4bf13a(0x199)]=new Map();}async['detectAvailableValidators'](){const _0x54a45d=a0_0x2efc;if(this['availableScanners']!==null)return this[_0x54a45d(0x198)];const _0x4e3466={'checkov':![],'hadolint':![],'yamllint':![],'jsonSchema':![]};try{await execAsync('checkov\x20--version',{'timeout':0x1388}),_0x4e3466[_0x54a45d(0x15c)]=!![],this[_0x54a45d(0x164)]?.[_0x54a45d(0x169)]('checkov\x20detected');}catch(_0x2672d2){this[_0x54a45d(0x164)]?.[_0x54a45d(0x169)]('checkov\x20not\x20available',{'error':_0x2672d2[_0x54a45d(0x192)]});}try{await execAsync('hadolint\x20--version',{'timeout':0x1388}),_0x4e3466['hadolint']=!![],this['logger']?.[_0x54a45d(0x169)]('hadolint\x20detected');}catch(_0x135daa){this['logger']?.[_0x54a45d(0x169)]('hadolint\x20not\x20available',{'error':_0x135daa['message']});}try{await execAsync(_0x54a45d(0x19d),{'timeout':0x1388}),_0x4e3466[_0x54a45d(0x175)]=!![],this['logger']?.['debug']('yamllint\x20detected');}catch(_0x55bfca){this[_0x54a45d(0x164)]?.[_0x54a45d(0x169)](_0x54a45d(0x17d),{'error':_0x55bfca['message']});}try{await import(_0x54a45d(0x137)),_0x4e3466['jsonSchema']=!![],this[_0x54a45d(0x164)]?.['debug']('JSON\x20Schema\x20validation\x20available');}catch(_0x3b0e27){this['logger']?.[_0x54a45d(0x169)](_0x54a45d(0x150),{'error':_0x3b0e27['message']});}return this[_0x54a45d(0x198)]=_0x4e3466,_0x4e3466;}async['validate'](_0x4105e5,_0x5ba214={}){const _0x469170=a0_0x2efc,_0x261ece=[],_0xa5d812=await this['detectAvailableValidators'](),_0x241fb6=this['detectFileType'](_0x4105e5);this['logger']?.['debug']('Validating\x20config\x20file',{'filePath':_0x4105e5,'fileType':_0x241fb6});switch(_0x241fb6){case _0x469170(0x142):if(_0xa5d812[_0x469170(0x138)]){const _0x49405f=await this['validateDockerfile'](_0x4105e5,_0x5ba214);_0x261ece['push'](..._0x49405f);}if(_0xa5d812[_0x469170(0x15c)]){const _0x728fb9=await this['validateWithCheckov'](_0x4105e5,'dockerfile',_0x5ba214);_0x261ece[_0x469170(0x15b)](..._0x728fb9);}break;case _0x469170(0x18c):if(_0xa5d812['yamllint']){const _0x2fca47=await this[_0x469170(0x185)](_0x4105e5,_0x5ba214);_0x261ece[_0x469170(0x15b)](..._0x2fca47);}if(_0xa5d812['checkov']){const _0x1c0c98=await this[_0x469170(0x15e)](_0x4105e5,_0x469170(0x155),_0x5ba214);_0x261ece['push'](..._0x1c0c98);}break;case'kubernetes':if(_0xa5d812['yamllint']){const _0x238e37=await this[_0x469170(0x185)](_0x4105e5,_0x5ba214);_0x261ece['push'](..._0x238e37);}if(_0xa5d812[_0x469170(0x15c)]){const _0x766439=await this[_0x469170(0x15e)](_0x4105e5,'kubernetes',_0x5ba214);_0x261ece[_0x469170(0x15b)](..._0x766439);}break;case'terraform':if(_0xa5d812['checkov']){const _0x60fd5b=await this['validateWithCheckov'](_0x4105e5,'terraform',_0x5ba214);_0x261ece[_0x469170(0x15b)](..._0x60fd5b);}break;case _0x469170(0x183):if(_0xa5d812['jsonSchema']){const _0x5a3075=await this[_0x469170(0x143)](_0x4105e5,_0x5ba214);_0x261ece[_0x469170(0x15b)](..._0x5a3075);}break;case _0x469170(0x13a):if(_0xa5d812['jsonSchema']){const _0xb99b1c=await this['validateTsConfig'](_0x4105e5,_0x5ba214);_0x261ece[_0x469170(0x15b)](..._0xb99b1c);}break;case _0x469170(0x16c):if(_0xa5d812['yamllint']){const _0x1fa8bf=await this['validateYAML'](_0x4105e5,_0x5ba214);_0x261ece['push'](..._0x1fa8bf);}break;case _0x469170(0x13b):const _0x52b260=await this[_0x469170(0x162)](_0x4105e5,_0x5ba214);_0x261ece['push'](..._0x52b260);break;case'yaml':if(_0xa5d812[_0x469170(0x175)]){const _0x2303bb=await this['validateYAML'](_0x4105e5,_0x5ba214);_0x261ece['push'](..._0x2303bb);}break;default:this[_0x469170(0x164)]?.[_0x469170(0x18a)]('Unknown\x20config\x20file\x20type',{'filePath':_0x4105e5,'fileType':_0x241fb6});return[];}return this[_0x469170(0x18e)](_0x261ece);}async['validateDockerfile'](_0xa5d818,_0xafef6a={}){const _0x26108d=a0_0x2efc;try{const _0x47d9cb=await execAsync(_0x26108d(0x19c)+_0xa5d818+'\x22',{'maxBuffer':0xa*0x400*0x400,'timeout':0x7530}),_0x257588=JSON['parse'](_0x47d9cb[_0x26108d(0x1a2)]);return this[_0x26108d(0x1a3)](_0x257588,_0xa5d818);}catch(_0x426de7){if(_0x426de7['stdout'])try{const _0x2243d5=JSON['parse'](_0x426de7[_0x26108d(0x1a2)]);return this['parseHadolintResults'](_0x2243d5,_0xa5d818);}catch(_0x5eeed1){this[_0x26108d(0x164)]?.['error'](_0x26108d(0x19e),{'error':_0x5eeed1['message']});}return this['logger']?.['error'](_0x26108d(0x15d),{'error':_0x426de7[_0x26108d(0x192)]}),[];}}['parseHadolintResults'](_0x215db3,_0x37a4be){const _0x180bd9=a0_0x2efc,_0x15a043=[];if(Array[_0x180bd9(0x167)](_0x215db3))for(const _0x347683 of _0x215db3){_0x15a043[_0x180bd9(0x15b)]({'file':_0x37a4be,'line':_0x347683['line']||0x1,'column':_0x347683['column']||0x1,'severity':this[_0x180bd9(0x171)](_0x347683['level']),'rule':_0x347683[_0x180bd9(0x189)],'message':_0x347683[_0x180bd9(0x192)],'category':'dockerfile','validator':'hadolint'});}return _0x15a043;}async[a0_0x4d3ea4(0x185)](_0x4f86d1,_0x4646c4={}){const _0x35c45c=a0_0x4d3ea4;try{const _0x40bd12=await execAsync(_0x35c45c(0x1a6)+_0x4f86d1+'\x22',{'maxBuffer':0xa*0x400*0x400,'timeout':0x7530});return this[_0x35c45c(0x156)](_0x40bd12[_0x35c45c(0x1a2)],_0x4f86d1);}catch(_0x1c0c73){if(_0x1c0c73[_0x35c45c(0x1a2)])return this[_0x35c45c(0x156)](_0x1c0c73[_0x35c45c(0x1a2)],_0x4f86d1);return this['logger']?.['error']('yamllint\x20validation\x20failed',{'error':_0x1c0c73[_0x35c45c(0x192)]}),[];}}['parseYamllintResults'](_0x3c490f,_0x4276a0){const _0x1fa2ce=a0_0x4d3ea4,_0x4bee91=[],_0x1753f9=_0x3c490f[_0x1fa2ce(0x19a)]('\x0a')[_0x1fa2ce(0x190)](_0x868a25=>_0x868a25[_0x1fa2ce(0x179)]());for(const _0x39ff05 of _0x1753f9){const _0x3b4b61=_0x39ff05[_0x1fa2ce(0x13e)](/^(.+?):(\d+):(\d+):\s*\[(\w+)\]\s*(.+?)\s*\((.+?)\)/);if(_0x3b4b61){const [,_0x56d553,_0x2162d9,_0x1a541a,_0x157441,_0x2a79b6,_0x142ca2]=_0x3b4b61;_0x4bee91[_0x1fa2ce(0x15b)]({'file':_0x4276a0,'line':parseInt(_0x2162d9,0xa),'column':parseInt(_0x1a541a,0xa),'severity':this[_0x1fa2ce(0x178)](_0x157441),'rule':_0x142ca2,'message':_0x2a79b6,'category':_0x1fa2ce(0x14e),'validator':'yamllint'});}}return _0x4bee91;}async[a0_0x4d3ea4(0x15e)](_0x54a72f,_0x58426c,_0x36b325={}){const _0xa508f=a0_0x4d3ea4;try{const _0x4b3b25=await execAsync('checkov\x20-f\x20\x22'+_0x54a72f+_0xa508f(0x16a)+_0x58426c+_0xa508f(0x18d),{'maxBuffer':0xa*0x400*0x400,'timeout':0xea60}),_0x4d1d90=JSON['parse'](_0x4b3b25[_0xa508f(0x1a2)]);return this[_0xa508f(0x144)](_0x4d1d90,_0x54a72f);}catch(_0x1b304b){if(_0x1b304b[_0xa508f(0x1a2)])try{const _0x32a729=JSON['parse'](_0x1b304b[_0xa508f(0x1a2)]);return this[_0xa508f(0x144)](_0x32a729,_0x54a72f);}catch(_0x4564b1){this[_0xa508f(0x164)]?.[_0xa508f(0x17e)]('Failed\x20to\x20parse\x20checkov\x20output',{'error':_0x4564b1[_0xa508f(0x192)]});}return this['logger']?.[_0xa508f(0x17e)]('checkov\x20validation\x20failed',{'error':_0x1b304b['message']}),[];}}['parseCheckovResults'](_0x7cb4e0,_0x1b512b){const _0x45d67b=a0_0x4d3ea4,_0xabe313=[];if(_0x7cb4e0[_0x45d67b(0x195)]&&_0x7cb4e0['results']['failed_checks'])for(const _0x57bb6d of _0x7cb4e0['results'][_0x45d67b(0x147)]){_0xabe313['push']({'file':_0x1b512b,'line':_0x57bb6d['file_line_range']?_0x57bb6d['file_line_range'][0x0]:0x1,'column':0x1,'severity':this['mapCheckovSeverity'](_0x57bb6d['check_class']),'rule':_0x57bb6d['check_id'],'message':_0x57bb6d[_0x45d67b(0x17f)]||_0x57bb6d[_0x45d67b(0x157)],'category':_0x45d67b(0x149),'validator':'checkov','remediation':_0x57bb6d['guideline'],'cwe':_0x57bb6d['cwe'],'references':_0x57bb6d[_0x45d67b(0x184)]?[_0x57bb6d['guideline']]:[]});}return _0xabe313;}async['validatePackageJson'](_0x447844,_0x523a18={}){const _0x23937a=a0_0x4d3ea4;try{const _0x23c8a6=(await import('ajv'))['default'],_0x463e59=(await import('ajv-formats'))[_0x23937a(0x148)],_0x1a258e=await a0_0x2062e9[_0x23937a(0x17b)](_0x447844,_0x23937a(0x191)),_0x5ed360=JSON['parse'](_0x1a258e),_0x58902d=new _0x23c8a6({'allErrors':!![],'strict':![]});_0x463e59(_0x58902d);const _0x3cf7a6={'type':'object','required':[_0x23937a(0x135),'version'],'properties':{'name':{'type':'string','pattern':'^(?:@[a-z0-9-~][a-z0-9-._~]*/)?[a-z0-9-~][a-z0-9-._~]*$'},'version':{'type':'string'},'description':{'type':'string'},'main':{'type':'string'},'type':{'type':_0x23937a(0x139),'enum':['module','commonjs']},'scripts':{'type':_0x23937a(0x13f)},'dependencies':{'type':'object'},'devDependencies':{'type':'object'}},'additionalProperties':!![]},_0x14bdb4=_0x58902d[_0x23937a(0x193)](_0x3cf7a6),_0x12565d=_0x14bdb4(_0x5ed360);if(!_0x12565d&&_0x14bdb4['errors'])return _0x14bdb4['errors'][_0x23937a(0x14f)](_0xc279db=>({'file':_0x447844,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS['SEVERITY']['ERROR'],'rule':'json-schema','message':_0xc279db['instancePath']?_0xc279db[_0x23937a(0x1a0)]+'\x20'+_0xc279db[_0x23937a(0x192)]:_0x23937a(0x19f)+_0xc279db[_0x23937a(0x14d)][_0x23937a(0x152)]+'\x27','category':'validation','validator':'json-schema'}));return[];}catch(_0x21dcd5){return this['logger']?.['error']('package.json\x20validation\x20failed',{'error':_0x21dcd5['message']}),[{'file':_0x447844,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS[_0x23937a(0x197)]['ERROR'],'rule':_0x23937a(0x16f),'message':_0x23937a(0x159)+_0x21dcd5[_0x23937a(0x192)],'category':_0x23937a(0x158),'validator':_0x23937a(0x16f)}];}}async['validateTsConfig'](_0xdecc0c,_0x1d52c4={}){const _0x3613ec=a0_0x4d3ea4;try{const _0x48ce47=await a0_0x2062e9['readFile'](_0xdecc0c,_0x3613ec(0x191)),_0x42ee98=JSON['parse'](_0x48ce47),_0x1898c8=[];if(_0x42ee98['compilerOptions']){const _0x29b447=_0x42ee98['compilerOptions'];!_0x29b447['strict']&&_0x1898c8[_0x3613ec(0x15b)]({'file':_0xdecc0c,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS[_0x3613ec(0x197)][_0x3613ec(0x161)],'rule':_0x3613ec(0x1a1),'message':'Consider\x20enabling\x20\x22strict\x22\x20mode\x20for\x20better\x20type\x20safety','category':'best-practice','validator':'tsconfig-validator'}),_0x29b447[_0x3613ec(0x177)]===![]&&_0x1898c8['push']({'file':_0xdecc0c,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS[_0x3613ec(0x197)][_0x3613ec(0x161)],'rule':'no-implicit-any','message':'Disabling\x20noImplicitAny\x20reduces\x20type\x20safety','category':_0x3613ec(0x165),'validator':_0x3613ec(0x153)});}return _0x1898c8;}catch(_0x4f778b){return this['logger']?.['error']('tsconfig.json\x20validation\x20failed',{'error':_0x4f778b[_0x3613ec(0x192)]}),[{'file':_0xdecc0c,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS[_0x3613ec(0x197)]['ERROR'],'rule':_0x3613ec(0x16f),'message':_0x3613ec(0x159)+_0x4f778b[_0x3613ec(0x192)],'category':'syntax','validator':_0x3613ec(0x16f)}];}}async[a0_0x4d3ea4(0x162)](_0x5d63ea,_0x29eb24={}){const _0x181f42=a0_0x4d3ea4;try{const _0x4bd782=await a0_0x2062e9['readFile'](_0x5d63ea,_0x181f42(0x191)),_0x2a9b3d=[],_0x214ea4=_0x4bd782['split']('\x0a'),_0x5d3f19=[{'pattern':/password|passwd|pwd/i,'name':'password'},{'pattern':/api[_-]?key/i,'name':'API\x20key'},{'pattern':/secret/i,'name':'secret'},{'pattern':/token/i,'name':_0x181f42(0x16b)},{'pattern':/private[_-]?key/i,'name':'private\x20key'},{'pattern':/aws[_-]?access/i,'name':_0x181f42(0x13d)}];return _0x214ea4['forEach']((_0x4b39ce,_0x2bf55b)=>{const _0x178e87=_0x181f42,_0x2f900a=_0x4b39ce['trim']();if(!_0x2f900a||_0x2f900a['startsWith']('#'))return;if(_0x2f900a[_0x178e87(0x17c)]('=')){const [_0x5e542b,_0x59f497]=_0x2f900a['split']('='),_0x45b176=_0x5e542b[_0x178e87(0x168)](),_0xe1d433=_0x59f497?.['trim']()||'',_0x33bfa8=_0xe1d433&&_0xe1d433!==''&&!_0xe1d433['startsWith']('$')&&_0xe1d433!==_0x178e87(0x176)&&_0xe1d433!=='changeme'&&_0xe1d433['length']>0x5;if(_0x33bfa8)for(const {pattern:_0x573f37,name:_0x2de40f}of _0x5d3f19){if(_0x573f37[_0x178e87(0x154)](_0x45b176)){_0x2a9b3d['push']({'file':_0x5d63ea,'line':_0x2bf55b+0x1,'column':0x1,'severity':STATIC_ANALYSIS['SEVERITY']['CRITICAL'],'rule':'hardcoded-secret','message':_0x178e87(0x146)+_0x2de40f+'\x20detected\x20in\x20.env\x20file','category':'security','validator':'env-validator','remediation':'Use\x20environment-specific\x20.env\x20files\x20and\x20add\x20.env\x20to\x20.gitignore'});break;}}}}),_0x2a9b3d;}catch(_0x4aa7eb){return this['logger']?.['error']('.env\x20validation\x20failed',{'error':_0x4aa7eb['message']}),[];}}['detectFileType'](_0x1965b6){const _0x56c77f=a0_0x4d3ea4,_0xdaa9f5=a0_0x4adbeb['basename'](_0x1965b6)[_0x56c77f(0x168)](),_0x5b705c=a0_0x4adbeb['dirname'](_0x1965b6);if(_0xdaa9f5===_0x56c77f(0x142))return _0x56c77f(0x142);if(_0xdaa9f5===_0x56c77f(0x145)||_0xdaa9f5==='docker-compose.yaml')return'docker-compose';if(_0xdaa9f5==='package.json')return'package.json';if(_0xdaa9f5===_0x56c77f(0x13a))return'tsconfig.json';if(_0xdaa9f5==='.env'||_0xdaa9f5[_0x56c77f(0x18f)]('.env'))return _0x56c77f(0x13b);if(_0x5b705c['includes']('.github/workflows'))return'github-actions';if(_0x5b705c[_0x56c77f(0x17c)]('kubernetes')||_0x5b705c['includes']('k8s'))return _0x56c77f(0x16d);const _0x8fe64e=a0_0x4adbeb[_0x56c77f(0x19b)](_0x1965b6)[_0x56c77f(0x168)]();if(_0x8fe64e==='.tf'||_0x8fe64e==='.tfvars')return _0x56c77f(0x174);if(_0x8fe64e===_0x56c77f(0x181)||_0x8fe64e===_0x56c77f(0x196))return'yaml';if(_0x8fe64e==='.json')return _0x56c77f(0x1a5);return'unknown';}[a0_0x4d3ea4(0x18e)](_0x15d87d){const _0xd82e1=a0_0x4d3ea4;return _0x15d87d[_0xd82e1(0x14f)](_0x17a8a4=>({'file':_0x17a8a4[_0xd82e1(0x1a4)],'line':_0x17a8a4[_0xd82e1(0x166)]||0x1,'column':_0x17a8a4['column']||0x1,'severity':_0x17a8a4['severity']||STATIC_ANALYSIS['SEVERITY'][_0xd82e1(0x161)],'rule':_0x17a8a4['rule']||_0xd82e1(0x16e),'message':_0x17a8a4['message']||_0xd82e1(0x136),'category':_0x17a8a4['category']||_0xd82e1(0x15a),'validator':_0x17a8a4['validator'],'cwe':_0x17a8a4['cwe']||null,'remediation':_0x17a8a4[_0xd82e1(0x172)]||null,'references':_0x17a8a4[_0xd82e1(0x180)]||[]}));}['mapHadolintSeverity'](_0x31aaec){const _0x123077=a0_0x4d3ea4,_0x2682a4={'error':STATIC_ANALYSIS[_0x123077(0x197)]['ERROR'],'warning':STATIC_ANALYSIS['SEVERITY'][_0x123077(0x161)],'info':STATIC_ANALYSIS['SEVERITY'][_0x123077(0x182)],'style':STATIC_ANALYSIS['SEVERITY'][_0x123077(0x182)]};return _0x2682a4[_0x31aaec?.[_0x123077(0x168)]()]||STATIC_ANALYSIS[_0x123077(0x197)]['WARNING'];}[a0_0x4d3ea4(0x178)](_0x35e476){const _0x2c8ef5=a0_0x4d3ea4,_0x423211={'error':STATIC_ANALYSIS['SEVERITY']['ERROR'],'warning':STATIC_ANALYSIS[_0x2c8ef5(0x197)]['WARNING']};return _0x423211[_0x35e476?.[_0x2c8ef5(0x168)]()]||STATIC_ANALYSIS[_0x2c8ef5(0x197)]['WARNING'];}[a0_0x4d3ea4(0x14b)](_0x4e3581){const _0x20091e=a0_0x4d3ea4;return STATIC_ANALYSIS[_0x20091e(0x197)]['ERROR'];}async[a0_0x4d3ea4(0x17a)](){const _0x4f4750=a0_0x4d3ea4,_0x36d229=await this['detectAvailableValidators']();return{'validators':_0x36d229,'recommendations':this[_0x4f4750(0x170)](_0x36d229)};}[a0_0x4d3ea4(0x170)](_0x29bd6d){const _0x5afeab=a0_0x4d3ea4,_0x1105a8=[];return!_0x29bd6d[_0x5afeab(0x15c)]&&_0x1105a8[_0x5afeab(0x15b)]({'validator':_0x5afeab(0x15c),'reason':'Infrastructure\x20as\x20Code\x20security\x20scanning\x20(Docker,\x20Kubernetes,\x20Terraform)','install':'pip\x20install\x20checkov','priority':'high'}),!_0x29bd6d['hadolint']&&_0x1105a8['push']({'validator':'hadolint','reason':'Dockerfile\x20linting\x20and\x20best\x20practices','install':'Download from https://github.com/hadolint/hadolint/releases','priority':_0x5afeab(0x14a)}),!_0x29bd6d[_0x5afeab(0x175)]&&_0x1105a8[_0x5afeab(0x15b)]({'validator':_0x5afeab(0x175),'reason':'YAML\x20file\x20validation','install':'pip\x20install\x20yamllint','priority':_0x5afeab(0x187)}),!_0x29bd6d['jsonSchema']&&_0x1105a8['push']({'validator':_0x5afeab(0x140),'reason':'JSON\x20configuration\x20validation','install':'npm\x20install\x20ajv\x20ajv-formats','priority':'medium'}),_0x1105a8;}}export default ConfigValidator;
@@ -1 +1 @@
1
- function a0_0x37d3(_0xc13bf1,_0x32a1fc){_0xc13bf1=_0xc13bf1-0x1b3;const _0x48cf11=a0_0x48cf();let _0x37d3b3=_0x48cf11[_0xc13bf1];if(a0_0x37d3['hBomBP']===undefined){var _0x20faee=function(_0x4db229){const _0x1b7581='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x49e829='',_0x388515='';for(let _0x271bd9=0x0,_0x1ba8af,_0x329141,_0x509afe=0x0;_0x329141=_0x4db229['charAt'](_0x509afe++);~_0x329141&&(_0x1ba8af=_0x271bd9%0x4?_0x1ba8af*0x40+_0x329141:_0x329141,_0x271bd9++%0x4)?_0x49e829+=String['fromCharCode'](0xff&_0x1ba8af>>(-0x2*_0x271bd9&0x6)):0x0){_0x329141=_0x1b7581['indexOf'](_0x329141);}for(let _0x16efd0=0x0,_0x288d57=_0x49e829['length'];_0x16efd0<_0x288d57;_0x16efd0++){_0x388515+='%'+('00'+_0x49e829['charCodeAt'](_0x16efd0)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x388515);};a0_0x37d3['Dtpwac']=_0x20faee,a0_0x37d3['DBXWDx']={},a0_0x37d3['hBomBP']=!![];}const _0x5647ea=_0x48cf11[0x0],_0x4bc776=_0xc13bf1+_0x5647ea,_0x258066=a0_0x37d3['DBXWDx'][_0x4bc776];return!_0x258066?(_0x37d3b3=a0_0x37d3['Dtpwac'](_0x37d3b3),a0_0x37d3['DBXWDx'][_0x4bc776]=_0x37d3b3):_0x37d3b3=_0x258066,_0x37d3b3;}const a0_0x520035=a0_0x37d3;(function(_0x25c182,_0x11f861){const _0x4ce0eb=a0_0x37d3,_0x144be6=_0x25c182();while(!![]){try{const _0x421f32=parseInt(_0x4ce0eb(0x1e6))/0x1*(parseInt(_0x4ce0eb(0x1da))/0x2)+-parseInt(_0x4ce0eb(0x1ec))/0x3*(parseInt(_0x4ce0eb(0x1c3))/0x4)+-parseInt(_0x4ce0eb(0x1ef))/0x5+parseInt(_0x4ce0eb(0x1dc))/0x6*(-parseInt(_0x4ce0eb(0x1ca))/0x7)+parseInt(_0x4ce0eb(0x1e8))/0x8*(-parseInt(_0x4ce0eb(0x1d3))/0x9)+-parseInt(_0x4ce0eb(0x1dd))/0xa*(-parseInt(_0x4ce0eb(0x1cf))/0xb)+parseInt(_0x4ce0eb(0x1c0))/0xc;if(_0x421f32===_0x11f861)break;else _0x144be6['push'](_0x144be6['shift']());}catch(_0x2a6697){_0x144be6['push'](_0x144be6['shift']());}}}(a0_0x48cf,0x574de));import{ESLint}from'eslint';import a0_0x49e829 from'path';function a0_0x48cf(){const _0x4d0b46=['lM1QCW','oda2ndzAz3rXDwu','D2fYBG','mtm2ELzuDfr0','lMPZEa','ChvZAa','rvnmAw50igfUywX5C2LZignVBxbSzxrLza','oxrdsKrLDG','rM91BMqGrvnmAw50ignVBMzPzW','BgLUDfrLEhq','mZaWmtq0mhDzvg1PrG','y2f0zwDVCML6zvj1Bgu','BM8TAw1WBgLLzc1LDMfS','z2v0rvnmAw50sw5ZDgfUy2u','zML4ywjSzuvYCM9Yq291BNq','Bg9Nz2vY','zMLSDgvY','u0vwrvjjvfK','C2v0DgLUz3m','u1rzteu','BM8TzxzHBa','Aw5JBhvKzxm','v0fstKLorW','C2LUz2XL','zgvIDwC','q0furuDpuLK','mJeWndKZmKzIzxrwzW','zxjYB3i','z2v0rvnmAw50q29UzMLN','ote4mdrLqMrdANa','BwvZC2fNzxm','B2zM','zgvZy3jPyMvdAgfUz2vZ','Bw9KAwzPzwq','zxnSAw50oNjLy29TBwvUzgvK','u0vdvvjjvfK','mZe5nJLOvKPuswC','Bwf4','ywrKzwq','BgvUz3rO','C3bSAxq','nJCZntG5nhH0suTIuW','ywX3yxLZ','su1qt1ju','zgv0zwn0','nJm0nuLmrwP2vG','BM8TDw5YzwfJAgfIBgu','zxnSAw50','BgLUzq','zM9YBwf0twvZC2fNzq','rvnmAw50igfUywX5C2LZigzHAwXLza','BwvZC2fNzq','mtjYCvrJzMW','zxH0zw5KCW','mZa2svDxt0zM','mtbuCfbzwLy','zxnSAw50lMnVBMzPzY5QCW','zML4','yMvZDc1WCMfJDgLJzxm','B3v0Chv0','zML4ywjSzvDHCM5PBMDdB3vUDa','BM8TDMfY','lMvZBgLUDhjJlMnQCW'];a0_0x48cf=function(){return _0x4d0b46;};return a0_0x48cf();}import a0_0x388515 from'fs/promises';import{STATIC_ANALYSIS}from'../utilities/constants.js';class ESLintAnalyzer{constructor(_0x271bd9=null){this['logger']=_0x271bd9,this['eslintCache']=new Map();}async['analyze'](_0x1ba8af,_0x329141,_0x509afe={}){const _0x114f8a=a0_0x37d3;try{const _0x16efd0=await this['getESLintInstance'](_0x509afe),_0x288d57=await _0x16efd0[_0x114f8a(0x1ee)](_0x329141,{'filePath':_0x1ba8af,'warnIgnored':![]}),_0x1d740b=[];if(_0x288d57&&_0x288d57[_0x114f8a(0x1cd)]>0x0){const _0x1952a9=_0x288d57[0x0];for(const _0x19032e of _0x1952a9[_0x114f8a(0x1c4)]){_0x1d740b[_0x114f8a(0x1ea)](this[_0x114f8a(0x1d7)](_0x19032e,_0x1ba8af));}}return this[_0x114f8a(0x1b5)]?.[_0x114f8a(0x1be)](_0x114f8a(0x1eb),{'file':_0x1ba8af,'totalDiagnostics':_0x1d740b['length'],'errors':_0x1d740b['filter'](_0x42146c=>_0x42146c['severity']===STATIC_ANALYSIS['SEVERITY']['ERROR'])['length'],'warnings':_0x1d740b[_0x114f8a(0x1b6)](_0x47656d=>_0x47656d['severity']===STATIC_ANALYSIS['SEVERITY'][_0x114f8a(0x1bc)])[_0x114f8a(0x1cd)]}),_0x1d740b;}catch(_0x3197ac){return this['logger']?.['error'](_0x114f8a(0x1d8),{'file':_0x1ba8af,'error':_0x3197ac[_0x114f8a(0x1d9)]}),[];}}async['fix'](_0x17ae92,_0x454ef4,_0xdbea34={}){const _0x48abc7=a0_0x37d3;try{const _0xb6879b=await this[_0x48abc7(0x1b3)]({..._0xdbea34,'fix':!![]}),_0x50e0bf=await _0xb6879b['lintText'](_0x454ef4,{'filePath':_0x17ae92,'warnIgnored':![]});if(_0x50e0bf&&_0x50e0bf['length']>0x0){const _0x4f4ec3=_0x50e0bf[0x0];return{'fixed':_0x4f4ec3['output']!==undefined,'content':_0x4f4ec3['output']||_0x454ef4,'fixedCount':_0x4f4ec3[_0x48abc7(0x1b4)]+_0x4f4ec3[_0x48abc7(0x1e2)],'remainingErrors':_0x4f4ec3['errorCount']-_0x4f4ec3[_0x48abc7(0x1b4)],'remainingWarnings':_0x4f4ec3['warningCount']-_0x4f4ec3[_0x48abc7(0x1e2)],'changes':_0x4f4ec3[_0x48abc7(0x1e1)]?this[_0x48abc7(0x1c6)](_0x454ef4,_0x4f4ec3[_0x48abc7(0x1e1)]):[]};}return{'fixed':![],'content':_0x454ef4,'fixedCount':0x0,'remainingErrors':0x0,'remainingWarnings':0x0,'changes':[]};}catch(_0x46ef47){this['logger']?.['error']('ESLint\x20fix\x20failed',{'file':_0x17ae92,'error':_0x46ef47['message']});throw new Error('ESLint\x20fix\x20failed:\x20'+_0x46ef47[_0x48abc7(0x1d9)]);}}async['getESLintInstance'](_0x437111={}){const _0x2d4c5f=a0_0x37d3,{workingDir:_0x2ccf69,fix:fix=![],framework:_0x34c89c}=_0x437111,_0x376d05=await this[_0x2d4c5f(0x1c2)](_0x2ccf69,_0x34c89c),_0x2f3453=new ESLint({'fix':fix,'useEslintrc':!![],'overrideConfig':_0x376d05,'errorOnUnmatchedPattern':![]});return _0x2f3453;}async['getESLintConfig'](_0x359eac,_0x42f4c1){const _0xd60dbf=a0_0x37d3,_0x2c1fc8={'env':{'browser':!![],'es2021':!![],'node':!![]},'parserOptions':{'ecmaVersion':'latest','sourceType':'module'},'rules':{'no-unused-vars':_0xd60dbf(0x1e7),'no-undef':_0xd60dbf(0x1c1),'no-console':_0xd60dbf(0x1c5),'semi':[_0xd60dbf(0x1e7),_0xd60dbf(0x1d0)],'quotes':['warn',_0xd60dbf(0x1bd),{'avoidEscape':!![]}]}};if(_0x42f4c1==='react')_0x2c1fc8['extends']=['eslint:recommended'],_0x2c1fc8['parserOptions']['ecmaFeatures']={'jsx':!![]},_0x2c1fc8[_0xd60dbf(0x1b8)]={'react':{'version':_0xd60dbf(0x1d2)}};else _0x42f4c1==='vue'?_0x2c1fc8[_0xd60dbf(0x1db)]=['eslint:recommended']:_0x2c1fc8[_0xd60dbf(0x1db)]=[_0xd60dbf(0x1c8)];if(_0x359eac){const _0x5aa83e=['.eslintrc.js',_0xd60dbf(0x1e4),'.eslintrc.json',_0xd60dbf(0x1de)];for(const _0x14b277 of _0x5aa83e){try{const _0x18788f=a0_0x49e829['join'](_0x359eac,_0x14b277);return await a0_0x388515['access'](_0x18788f),this[_0xd60dbf(0x1b5)]?.['debug'](_0xd60dbf(0x1ed),{'configFile':_0x14b277}),{};}catch{}}}return _0x2c1fc8;}[a0_0x520035(0x1d7)](_0x3b784f,_0x411319){const _0x54fc46=a0_0x520035;return{'file':_0x411319,'line':_0x3b784f[_0x54fc46(0x1d6)]||0x1,'column':_0x3b784f['column']||0x1,'endLine':_0x3b784f['endLine'],'endColumn':_0x3b784f['endColumn'],'severity':_0x3b784f['severity']===0x2?STATIC_ANALYSIS['SEVERITY']['ERROR']:STATIC_ANALYSIS[_0x54fc46(0x1b7)]['WARNING'],'rule':_0x3b784f['ruleId']||_0x54fc46(0x1d5),'message':_0x3b784f[_0x54fc46(0x1d9)],'category':this[_0x54fc46(0x1f0)](_0x3b784f['ruleId']),'fixable':_0x3b784f[_0x54fc46(0x1df)]!==undefined,'source':'eslint'};}[a0_0x520035(0x1f0)](_0x3fd782){const _0x541e85=a0_0x520035;if(!_0x3fd782)return STATIC_ANALYSIS[_0x541e85(0x1bf)][_0x541e85(0x1b9)];if(_0x3fd782[_0x541e85(0x1bb)]('security')||_0x3fd782[_0x541e85(0x1bb)]('xss')||_0x3fd782===_0x541e85(0x1ba)||_0x3fd782===_0x541e85(0x1f1))return STATIC_ANALYSIS[_0x541e85(0x1bf)][_0x541e85(0x1c9)];if(_0x3fd782[_0x541e85(0x1bb)]('performance')||_0x3fd782==='no-await-in-loop'||_0x3fd782==='prefer-promise-reject-errors')return STATIC_ANALYSIS['CATEGORY']['PERFORMANCE'];if(_0x3fd782['includes']('import')||_0x3fd782==='no-undef')return STATIC_ANALYSIS['CATEGORY'][_0x541e85(0x1d1)];if(_0x3fd782['includes'](_0x541e85(0x1e0))||_0x3fd782==='no-unused-vars'||_0x3fd782===_0x541e85(0x1d4)||_0x3fd782===_0x541e85(0x1e3))return STATIC_ANALYSIS[_0x541e85(0x1bf)]['BEST_PRACTICE'];return STATIC_ANALYSIS['CATEGORY']['STYLE'];}[a0_0x520035(0x1c6)](_0x5cb778,_0x4eb8ff){const _0x48ebe9=a0_0x520035,_0x4cacf3=[],_0x409d6b=_0x5cb778[_0x48ebe9(0x1ce)]('\x0a'),_0x5226bf=_0x4eb8ff['split']('\x0a'),_0xa555a4=Math[_0x48ebe9(0x1cb)](_0x409d6b['length'],_0x5226bf['length']);for(let _0x54d094=0x0;_0x54d094<_0xa555a4;_0x54d094++){const _0x3adfb1=_0x409d6b[_0x54d094]||'',_0x4b2a05=_0x5226bf[_0x54d094]||'';_0x3adfb1!==_0x4b2a05&&_0x4cacf3['push']({'line':_0x54d094+0x1,'type':_0x3adfb1&&_0x4b2a05?_0x48ebe9(0x1c7):_0x3adfb1?'removed':_0x48ebe9(0x1cc),'original':_0x3adfb1,'fixed':_0x4b2a05});}return _0x4cacf3;}['getSupportedExtensions'](){const _0x30934f=a0_0x520035;return['.js',_0x30934f(0x1e9),_0x30934f(0x1e5),'.cjs'];}['supportsAutoFix'](){return!![];}}export default ESLintAnalyzer;
1
+ const a0_0x3af43e=a0_0x592a;function a0_0x592a(_0x1a9749,_0x3968d3){_0x1a9749=_0x1a9749-0x1a6;const _0x503615=a0_0x5036();let _0x592ae3=_0x503615[_0x1a9749];if(a0_0x592a['sRjKBr']===undefined){var _0x3b9f51=function(_0x19443a){const _0x5ad55a='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x4313bf='',_0x538ec5='';for(let _0x14aa5d=0x0,_0x50c85c,_0x3fb552,_0x410d07=0x0;_0x3fb552=_0x19443a['charAt'](_0x410d07++);~_0x3fb552&&(_0x50c85c=_0x14aa5d%0x4?_0x50c85c*0x40+_0x3fb552:_0x3fb552,_0x14aa5d++%0x4)?_0x4313bf+=String['fromCharCode'](0xff&_0x50c85c>>(-0x2*_0x14aa5d&0x6)):0x0){_0x3fb552=_0x5ad55a['indexOf'](_0x3fb552);}for(let _0xc77d51=0x0,_0x356cbd=_0x4313bf['length'];_0xc77d51<_0x356cbd;_0xc77d51++){_0x538ec5+='%'+('00'+_0x4313bf['charCodeAt'](_0xc77d51)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x538ec5);};a0_0x592a['caBIRm']=_0x3b9f51,a0_0x592a['ozYLcn']={},a0_0x592a['sRjKBr']=!![];}const _0x501e57=_0x503615[0x0],_0xc4298f=_0x1a9749+_0x501e57,_0x5692f5=a0_0x592a['ozYLcn'][_0xc4298f];return!_0x5692f5?(_0x592ae3=a0_0x592a['caBIRm'](_0x592ae3),a0_0x592a['ozYLcn'][_0xc4298f]=_0x592ae3):_0x592ae3=_0x5692f5,_0x592ae3;}(function(_0x159dff,_0x4e0532){const _0x2e8d2a=a0_0x592a,_0x29a710=_0x159dff();while(!![]){try{const _0x28661f=parseInt(_0x2e8d2a(0x1c7))/0x1*(parseInt(_0x2e8d2a(0x1ac))/0x2)+-parseInt(_0x2e8d2a(0x1cd))/0x3+parseInt(_0x2e8d2a(0x1c9))/0x4+parseInt(_0x2e8d2a(0x1c5))/0x5+parseInt(_0x2e8d2a(0x1cc))/0x6*(-parseInt(_0x2e8d2a(0x1da))/0x7)+parseInt(_0x2e8d2a(0x1d1))/0x8*(-parseInt(_0x2e8d2a(0x1c1))/0x9)+parseInt(_0x2e8d2a(0x1dc))/0xa;if(_0x28661f===_0x4e0532)break;else _0x29a710['push'](_0x29a710['shift']());}catch(_0x304d1a){_0x29a710['push'](_0x29a710['shift']());}}}(a0_0x5036,0x4f6b3));import{ESLint}from'eslint';import a0_0x4313bf from'path';function a0_0x5036(){const _0x50ea80=['nJK3nJeYzgvqrg9f','yw5HBhL6zq','rvnmAw50igfUywX5C2LZigzHAwXLza','nLHssvPjCq','mtqZmJG3mM1bExLpAq','zw5Kq29SDw1U','C2vJDxjPDhK','ywnJzxnZ','oduYmhLoA2vrCG','B3v0Chv0','lMvZBgLUDhjJlMPZ','D2fYBG','lMvZBgLUDhjJlMnQCW','ywrKzwq','rvnmAw50igzPEcbMywLSzwq6ia','zw5KtgLUzq','lMPZ','mZCYntC1C1n0ENbP','zxnSAw50oNjLy29TBwvUzgvK','mZiZndy1mg1PBev5Dq','z2v0u3vWCg9YDgvKrxH0zw5ZAw9UCW','u0vdvvjjvfK','uevsrK9stufoq0u','Bg9Nz2vY','zML4','BwvZC2fNzq','zgvIDwC','AM9PBG','lM1QCW','Bgf0zxn0','zML4ywjSzuvYCM9Yq291BNq','rM91BMqGrvnmAw50ignVBMzPzW','Bw9KAwzPzwq','mtbkr2Lmque','v0fstKLorW','zML4ywjSzvDHCM5PBMDdB3vUDa','BwvZC2fNzxm','u0vwrvjjvfK','zgv0zwn0','C2v0DgLUz3m','rvnmAw50igzPEcbMywLSzwq','qKvtvf9quKfdveLdrq','lMPZEa','yMvZDc1WCMfJDgLJzxm','BgLUDfrLEhq','su1qt1ju','ChjLzMvYlxbYB21PC2uTCMvQzwn0lwvYCM9YCW','BgvUz3rO','CNvSzuLK','lMvZBgLUDhjJlMPZB24','zxjYB3i','q0furuDpuLK','C2v2zxjPDhK','Aw5JBhvKzxm','ndiZmfrPthruyq','zxH0zw5KCW','z2v0rvnmAw50sw5ZDgfUy2u','CMvTB3zLza','mZaWnZa3nwrdzwThvW','Bwf4','nte0odnrweL4sLK','C3bSAxq'];a0_0x5036=function(){return _0x50ea80;};return a0_0x5036();}import a0_0x538ec5 from'fs/promises';import{STATIC_ANALYSIS}from'../utilities/constants.js';class ESLintAnalyzer{constructor(_0x14aa5d=null){this['logger']=_0x14aa5d,this['eslintCache']=new Map();}async[a0_0x3af43e(0x1ca)](_0x50c85c,_0x3fb552,_0x410d07={}){const _0x358d92=a0_0x3af43e;try{const _0xc77d51=await this[_0x358d92(0x1c3)](_0x410d07),_0x356cbd=await _0xc77d51[_0x358d92(0x1b7)](_0x3fb552,{'filePath':_0x50c85c,'warnIgnored':![]}),_0x5d1288=[];if(_0x356cbd&&_0x356cbd['length']>0x0){const _0x33d612=_0x356cbd[0x0];for(const _0x1c8595 of _0x33d612[_0x358d92(0x1af)]){_0x5d1288['push'](this['formatMessage'](_0x1c8595,_0x50c85c));}}return this[_0x358d92(0x1e0)]?.['debug']('ESLint\x20analysis\x20completed',{'file':_0x50c85c,'totalDiagnostics':_0x5d1288[_0x358d92(0x1ba)],'errors':_0x5d1288['filter'](_0x3237be=>_0x3237be[_0x358d92(0x1bf)]===STATIC_ANALYSIS[_0x358d92(0x1b0)]['ERROR'])['length'],'warnings':_0x5d1288['filter'](_0x4f1ab7=>_0x4f1ab7[_0x358d92(0x1bf)]===STATIC_ANALYSIS[_0x358d92(0x1b0)][_0x358d92(0x1ad)])[_0x358d92(0x1ba)]}),_0x5d1288;}catch(_0x278b8a){return this[_0x358d92(0x1e0)]?.[_0x358d92(0x1bd)](_0x358d92(0x1cb),{'file':_0x50c85c,'error':_0x278b8a[_0x358d92(0x1e2)]}),[];}}async[a0_0x3af43e(0x1e1)](_0xe70c7e,_0x5ef0c4,_0x3fed17={}){const _0x341aaf=a0_0x3af43e;try{const _0x463a67=await this[_0x341aaf(0x1c3)]({..._0x3fed17,'fix':!![]}),_0x16e006=await _0x463a67['lintText'](_0x5ef0c4,{'filePath':_0xe70c7e,'warnIgnored':![]});if(_0x16e006&&_0x16e006[_0x341aaf(0x1ba)]>0x0){const _0x209608=_0x16e006[0x0];return{'fixed':_0x209608[_0x341aaf(0x1d2)]!==undefined,'content':_0x209608[_0x341aaf(0x1d2)]||_0x5ef0c4,'fixedCount':_0x209608['fixableErrorCount']+_0x209608[_0x341aaf(0x1ae)],'remainingErrors':_0x209608['errorCount']-_0x209608[_0x341aaf(0x1a9)],'remainingWarnings':_0x209608['warningCount']-_0x209608[_0x341aaf(0x1ae)],'changes':_0x209608['output']?this['describeChanges'](_0x5ef0c4,_0x209608[_0x341aaf(0x1d2)]):[]};}return{'fixed':![],'content':_0x5ef0c4,'fixedCount':0x0,'remainingErrors':0x0,'remainingWarnings':0x0,'changes':[]};}catch(_0x185bb8){this['logger']?.['error'](_0x341aaf(0x1b3),{'file':_0xe70c7e,'error':_0x185bb8[_0x341aaf(0x1e2)]});throw new Error(_0x341aaf(0x1d7)+_0x185bb8[_0x341aaf(0x1e2)]);}}async[a0_0x3af43e(0x1c3)](_0x5e83f1={}){const {workingDir:_0xd391fc,fix:fix=![],framework:_0x10c744}=_0x5e83f1,_0x3ae15f=await this['getESLintConfig'](_0xd391fc,_0x10c744),_0x3765c1=new ESLint({'fix':fix,'useEslintrc':!![],'overrideConfig':_0x3ae15f,'errorOnUnmatchedPattern':![]});return _0x3765c1;}async['getESLintConfig'](_0x2687db,_0x1a8701){const _0x5717c6=a0_0x3af43e,_0x2513c5={'env':{'browser':!![],'es2021':!![],'node':!![]},'parserOptions':{'ecmaVersion':_0x5717c6(0x1a8),'sourceType':'module'},'rules':{'no-unused-vars':'warn','no-undef':_0x5717c6(0x1bd),'no-console':'off','semi':['warn','always'],'quotes':[_0x5717c6(0x1d4),'single',{'avoidEscape':!![]}]}};if(_0x1a8701==='react')_0x2513c5['extends']=['eslint:recommended'],_0x2513c5['parserOptions']['ecmaFeatures']={'jsx':!![]},_0x2513c5[_0x5717c6(0x1b2)]={'react':{'version':_0x5717c6(0x1b1)}};else _0x1a8701==='vue'?_0x2513c5[_0x5717c6(0x1c2)]=[_0x5717c6(0x1db)]:_0x2513c5['extends']=[_0x5717c6(0x1db)];if(_0x2687db){const _0x578d57=[_0x5717c6(0x1d3),_0x5717c6(0x1d5),_0x5717c6(0x1bc),'eslint.config.js'];for(const _0x40ea24 of _0x578d57){try{const _0x11790f=a0_0x4313bf[_0x5717c6(0x1a6)](_0x2687db,_0x40ea24);return await a0_0x538ec5[_0x5717c6(0x1d0)](_0x11790f),this[_0x5717c6(0x1e0)]?.[_0x5717c6(0x1e3)](_0x5717c6(0x1aa),{'configFile':_0x40ea24}),{};}catch{}}}return _0x2513c5;}['formatMessage'](_0x33ddb2,_0x498e2a){const _0x451d6e=a0_0x3af43e;return{'file':_0x498e2a,'line':_0x33ddb2['line']||0x1,'column':_0x33ddb2['column']||0x1,'endLine':_0x33ddb2[_0x451d6e(0x1d8)],'endColumn':_0x33ddb2[_0x451d6e(0x1ce)],'severity':_0x33ddb2['severity']===0x2?STATIC_ANALYSIS[_0x451d6e(0x1b0)]['ERROR']:STATIC_ANALYSIS['SEVERITY'][_0x451d6e(0x1ad)],'rule':_0x33ddb2[_0x451d6e(0x1bb)]||'eslint','message':_0x33ddb2['message'],'category':this['categorizeRule'](_0x33ddb2['ruleId']),'fixable':_0x33ddb2[_0x451d6e(0x1e1)]!==undefined,'source':'eslint'};}['categorizeRule'](_0x2bd876){const _0x2c4d81=a0_0x3af43e;if(!_0x2bd876)return STATIC_ANALYSIS['CATEGORY']['STYLE'];if(_0x2bd876['includes'](_0x2c4d81(0x1cf))||_0x2bd876[_0x2c4d81(0x1c0)]('xss')||_0x2bd876==='no-eval'||_0x2bd876==='no-implied-eval')return STATIC_ANALYSIS[_0x2c4d81(0x1be)][_0x2c4d81(0x1de)];if(_0x2bd876['includes']('performance')||_0x2bd876==='no-await-in-loop'||_0x2bd876===_0x2c4d81(0x1b9))return STATIC_ANALYSIS[_0x2c4d81(0x1be)][_0x2c4d81(0x1df)];if(_0x2bd876['includes']('import')||_0x2bd876==='no-undef')return STATIC_ANALYSIS['CATEGORY'][_0x2c4d81(0x1b8)];if(_0x2bd876['includes'](_0x2c4d81(0x1b6))||_0x2bd876==='no-unused-vars'||_0x2bd876==='no-unreachable'||_0x2bd876==='no-var')return STATIC_ANALYSIS['CATEGORY'][_0x2c4d81(0x1b4)];return STATIC_ANALYSIS['CATEGORY']['STYLE'];}['describeChanges'](_0x20f540,_0x54a2d0){const _0x8824b6=a0_0x3af43e,_0x1bbcab=[],_0x4ee41d=_0x20f540['split']('\x0a'),_0x589313=_0x54a2d0[_0x8824b6(0x1c8)]('\x0a'),_0x208046=Math[_0x8824b6(0x1c6)](_0x4ee41d['length'],_0x589313[_0x8824b6(0x1ba)]);for(let _0x41affe=0x0;_0x41affe<_0x208046;_0x41affe++){const _0x553b4c=_0x4ee41d[_0x41affe]||'',_0x2109b2=_0x589313[_0x41affe]||'';_0x553b4c!==_0x2109b2&&_0x1bbcab['push']({'line':_0x41affe+0x1,'type':_0x553b4c&&_0x2109b2?_0x8824b6(0x1ab):_0x553b4c?_0x8824b6(0x1c4):_0x8824b6(0x1d6),'original':_0x553b4c,'fixed':_0x2109b2});}return _0x1bbcab;}[a0_0x3af43e(0x1dd)](){const _0xd5a94f=a0_0x3af43e;return[_0xd5a94f(0x1d9),_0xd5a94f(0x1b5),_0xd5a94f(0x1a7),'.cjs'];}['supportsAutoFix'](){return!![];}}export default ESLintAnalyzer;