@loxia-labs/loxia-autopilot-one 1.0.9 → 1.0.11

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/aiService.js +1 -1
  76. package/src/services/apiKeyManager.js +1 -1
  77. package/src/services/benchmarkService.js +1 -1
  78. package/src/services/budgetService.js +1 -1
  79. package/src/services/contextInjectionService.js +1 -1
  80. package/src/services/conversationCompactionService.js +1 -1
  81. package/src/services/errorHandler.js +1 -1
  82. package/src/services/fileAttachmentService.js +1 -1
  83. package/src/services/modelRouterService.js +1 -1
  84. package/src/services/modelsService.js +1 -1
  85. package/src/services/qualityInspector.js +1 -1
  86. package/src/services/tokenCountingService.js +1 -1
  87. package/src/tools/agentCommunicationTool.js +1 -1
  88. package/src/tools/agentDelayTool.js +1 -1
  89. package/src/tools/asyncToolManager.js +1 -1
  90. package/src/tools/baseTool.js +1 -1
  91. package/src/tools/browserTool.js +1 -1
  92. package/src/tools/cloneDetectionTool.js +1 -1
  93. package/src/tools/dependencyResolverTool.js +1 -1
  94. package/src/tools/fileContentReplaceTool.js +1 -1
  95. package/src/tools/fileSystemTool.js +1 -1
  96. package/src/tools/fileTreeTool.js +1 -1
  97. package/src/tools/imageTool.js +1 -1
  98. package/src/tools/importAnalyzerTool.js +1 -1
  99. package/src/tools/jobDoneTool.js +1 -1
  100. package/src/tools/seekTool.js +1 -1
  101. package/src/tools/staticAnalysisTool.js +1 -1
  102. package/src/tools/taskManagerTool.js +1 -1
  103. package/src/tools/terminalTool.js +1 -1
  104. package/src/tools/webTool.js +1 -1
  105. package/src/types/agent.js +1 -1
  106. package/src/types/contextReference.js +1 -1
  107. package/src/types/conversation.js +1 -1
  108. package/src/types/toolCommand.js +1 -1
  109. package/src/utilities/attachmentValidator.js +1 -1
  110. package/src/utilities/configManager.js +1 -1
  111. package/src/utilities/constants.js +1 -1
  112. package/src/utilities/directoryAccessManager.js +1 -1
  113. package/src/utilities/fileProcessor.js +1 -1
  114. package/src/utilities/logger.js +1 -1
  115. package/src/utilities/tagParser.js +1 -1
  116. package/src/utilities/toolConstants.js +1 -1
  117. package/web-ui/build/index.html +2 -2
  118. package/web-ui/build/static/{index-BzXbDs8z.js → index-C5X7qBNF.js} +63 -63
  119. package/web-ui/build/static/index-g2UFuTwG.css +1 -0
  120. package/web-ui/build/static/index-BmKxmRe3.css +0 -1
package/README.md CHANGED
@@ -99,7 +99,7 @@ npm install -g @loxia-labs/loxia-autopilot-one
99
99
 
100
100
  ```bash
101
101
  loxia --version
102
- # Should display: Loxia Autopilot One v1.0.9
102
+ # Should display: Loxia Autopilot One v1.0.11
103
103
  ```
104
104
 
105
105
  ### 4. Create an API Key
@@ -368,7 +368,7 @@ Loxia automatically compacts long conversations to stay within token limits:
368
368
 
369
369
  ## 🛣️ Roadmap
370
370
 
371
- ### Current Version (1.0.9)
371
+ ### Current Version (1.0.11)
372
372
 
373
373
  - ✅ Multi-agent orchestration
374
374
  - ✅ 18+ specialized tools
package/bin/cli.js CHANGED
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- const a0_0x69ee2=a0_0x5ce9;function a0_0x5b96(){const _0x3c8e4f=['9527392gPaXVD','SIGINT','env','slice','message','--host','Checking\x20if\x20server\x20is\x20running...','Starting\x20Terminal\x20UI...\x0a','--port','get','\x0aShutting\x20down\x20server...','10314AdswYc','Please\x20open\x20manually:\x20','destroy','node','ceil','catch','version','\x20\x20loxia\x20web\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Start\x20server\x20+\x20Web\x20UI',')\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','--help','web','length','Waiting\x20for\x20server\x20to\x20start...','199040PhcpBm','argv','Starting\x20Loxia\x20server\x20in\x20background...','help','ignore','528fQyQgH',')\x0a\x20\x20--host\x20<host>\x20\x20\x20\x20\x20Specify\x20host\x20(default:\x20','LOXIA_HOST','host','src','loxia-terminal.js','start\x20\x22\x22\x20\x22','Server\x20running\x20at\x20','\x20manually.','Server\x20is\x20running\x20at\x20','kill','3389352wsCoax','3470FINleb','utf8','\x0aLoxia\x20Autopilot\x20One\x20v','Error:','statusCode','\x0aServer\x20may\x20still\x20be\x20starting.\x20Open\x20','port','8842824gsVYYq','Run\x20\x22loxia\x20--help\x22\x20for\x20usage\x20information.','4442Hxfoqg','inherit','package.json','--version','includes','toString','422504SGjtCS','\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','675aiPpAM','open\x20\x22','\x0aPlease\x20start\x20the\x20server\x20first:','exit','http://','localhost','parse','SIGTERM','darwin','\x20\x20loxia\x20plus-terminal\x20\x20#\x20Start\x20server\x20+\x20Terminal\x20UI\x0a','platform','Loxia\x20Autopilot\x20One\x20v','Unknown\x20command:\x20','startsWith','error','log'];a0_0x5b96=function(){return _0x3c8e4f;};return a0_0x5b96();}(function(_0x3d1996,_0x3ad00e){const _0x1b329c=a0_0x5ce9,_0x2742c7=_0x3d1996();while(!![]){try{const _0x3dd8c9=parseInt(_0x1b329c(0x1b6))/0x1+-parseInt(_0x1b329c(0x1b0))/0x2*(parseInt(_0x1b329c(0x19b))/0x3)+parseInt(_0x1b329c(0x1a6))/0x4+parseInt(_0x1b329c(0x1a7))/0x5*(-parseInt(_0x1b329c(0x189))/0x6)+-parseInt(_0x1b329c(0x17e))/0x7+parseInt(_0x1b329c(0x1ae))/0x8+-parseInt(_0x1b329c(0x1b8))/0x9*(-parseInt(_0x1b329c(0x196))/0xa);if(_0x3dd8c9===_0x3ad00e)break;else _0x2742c7['push'](_0x2742c7['shift']());}catch(_0x4eb147){_0x2742c7['push'](_0x2742c7['shift']());}}}(a0_0x5b96,0xe15b1));import{fileURLToPath}from'url';import{dirname,join}from'path';import{spawn,exec}from'child_process';import{readFileSync}from'fs';import a0_0x4f5e5a from'http';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename),DEFAULT_PORT=0x1f90,DEFAULT_HOST=a0_0x69ee2(0x1bd),SERVER_STARTUP_TIMEOUT=0x3a98,SERVER_CHECK_INTERVAL=0x1f4,args=process[a0_0x69ee2(0x197)][a0_0x69ee2(0x181)](0x2),command=args[0x0]&&!args[0x0][a0_0x69ee2(0x17b)]('--')?args[0x0]:null,flags={'port':null,'host':null,'help':args['includes'](a0_0x69ee2(0x192))||args[a0_0x69ee2(0x1b4)]('-h'),'version':args[a0_0x69ee2(0x1b4)](a0_0x69ee2(0x1b3))||args[a0_0x69ee2(0x1b4)]('-v')};for(let i=0x0;i<args[a0_0x69ee2(0x194)];i++){args[i]===a0_0x69ee2(0x186)&&args[i+0x1]&&(flags[a0_0x69ee2(0x1ad)]=parseInt(args[i+0x1],0xa)),args[i]===a0_0x69ee2(0x183)&&args[i+0x1]&&(flags['host']=args[i+0x1]);}const port=flags[a0_0x69ee2(0x1ad)]||DEFAULT_PORT,host=flags[a0_0x69ee2(0x19e)]||DEFAULT_HOST,serverUrl=a0_0x69ee2(0x1bc)+host+':'+port;if(flags[a0_0x69ee2(0x18f)]){const pkgPath=join(__dirname,'..',a0_0x69ee2(0x1b2)),pkg=JSON[a0_0x69ee2(0x1be)](readFileSync(pkgPath,'utf8'));console[a0_0x69ee2(0x17d)](a0_0x69ee2(0x179)+pkg['version']),process['exit'](0x0);}if(flags[a0_0x69ee2(0x199)]||!command){const pkgPath=join(__dirname,'..',a0_0x69ee2(0x1b2)),pkg=JSON[a0_0x69ee2(0x1be)](readFileSync(pkgPath,a0_0x69ee2(0x1a8)));console['log'](a0_0x69ee2(0x1a9)+pkg[a0_0x69ee2(0x18f)]+a0_0x69ee2(0x1b7)+DEFAULT_PORT+a0_0x69ee2(0x19c)+DEFAULT_HOST+a0_0x69ee2(0x191)),process['exit'](0x0);}async function checkServerRunning(_0x382b4d,_0x5c6e10,_0x3a80a6=0x1){for(let _0x4e14eb=0x0;_0x4e14eb<_0x3a80a6;_0x4e14eb++){const _0x37b16f=await new Promise(_0x206c1e=>{const _0x266dd5=a0_0x5ce9,_0x54f5f0=a0_0x4f5e5a[_0x266dd5(0x187)]('http://'+_0x382b4d+':'+_0x5c6e10+'/api/health',_0x49a55e=>{const _0x31ba4c=_0x266dd5;_0x206c1e(_0x49a55e[_0x31ba4c(0x1ab)]===0xc8);});_0x54f5f0['on']('error',()=>_0x206c1e(![])),_0x54f5f0['setTimeout'](0x7d0,()=>{const _0x26dfb2=_0x266dd5;_0x54f5f0[_0x26dfb2(0x18b)](),_0x206c1e(![]);});});if(_0x37b16f)return!![];_0x4e14eb<_0x3a80a6-0x1&&await new Promise(_0x38892d=>setTimeout(_0x38892d,SERVER_CHECK_INTERVAL));}return![];}async function waitForServer(_0x2cf549,_0x3a2f13,_0x19d470=SERVER_STARTUP_TIMEOUT){const _0xbf2048=a0_0x69ee2,_0x509960=Math[_0xbf2048(0x18d)](_0x19d470/SERVER_CHECK_INTERVAL);return checkServerRunning(_0x2cf549,_0x3a2f13,_0x509960);}function openBrowser(_0x3593de){const _0x3be758=a0_0x69ee2,_0x3f97b5=process[_0x3be758(0x178)];let _0x5ac456;if(_0x3f97b5===_0x3be758(0x1c0))_0x5ac456=_0x3be758(0x1b9)+_0x3593de+'\x22';else _0x3f97b5==='win32'?_0x5ac456=_0x3be758(0x1a1)+_0x3593de+'\x22':_0x5ac456='xdg-open\x20\x22'+_0x3593de+'\x22';exec(_0x5ac456,_0x59645d=>{const _0x634c51=_0x3be758;_0x59645d&&(console[_0x634c51(0x17d)]('Could\x20not\x20open\x20browser\x20automatically.'),console['log'](_0x634c51(0x18a)+_0x3593de));});}function startServer(_0x417ad6=![]){const _0x4b9167=a0_0x69ee2,_0x16e2ff={...process[_0x4b9167(0x180)],'LOXIA_PORT':port[_0x4b9167(0x1b5)](),'PORT':port[_0x4b9167(0x1b5)]()};flags['host']&&(_0x16e2ff[_0x4b9167(0x19d)]=flags[_0x4b9167(0x19e)]);const _0x47cbb7=join(__dirname,'..',_0x4b9167(0x19f),'index.js'),_0x54bc1a=spawn(_0x4b9167(0x18c),[_0x47cbb7],{'cwd':join(__dirname,'..'),'env':_0x16e2ff,'stdio':_0x417ad6?['ignore',_0x4b9167(0x19a),'ignore']:_0x4b9167(0x1b1),'detached':_0x417ad6});return _0x417ad6&&_0x54bc1a['unref'](),_0x54bc1a;}function startTerminalUI(){const _0x5cebe=a0_0x69ee2,_0x484cb5=join(__dirname,_0x5cebe(0x1a0)),_0x5681a8={...process[_0x5cebe(0x180)],'LOXIA_PORT':port[_0x5cebe(0x1b5)](),'LOXIA_HOST':host},_0x5eeab8=spawn(_0x5cebe(0x18c),[_0x484cb5],{'cwd':join(__dirname,'..'),'env':_0x5681a8,'stdio':_0x5cebe(0x1b1)});return _0x5eeab8;}function a0_0x5ce9(_0x23cead,_0x3d53ba){_0x23cead=_0x23cead-0x177;const _0x5b9688=a0_0x5b96();let _0x5ce9ec=_0x5b9688[_0x23cead];return _0x5ce9ec;}const commands={'web':async()=>{const _0x53e5ea=a0_0x69ee2;console[_0x53e5ea(0x17d)]('Starting\x20Loxia\x20server...\x0a');const _0x3dc05d=startServer(![]);console[_0x53e5ea(0x17d)](_0x53e5ea(0x195));const _0x437049=await waitForServer(host,port);_0x437049?(console[_0x53e5ea(0x17d)]('\x0aOpening\x20Web\x20UI\x20at\x20'+serverUrl),openBrowser(serverUrl)):console[_0x53e5ea(0x17d)](_0x53e5ea(0x1ac)+serverUrl+_0x53e5ea(0x1a3)),process['on'](_0x53e5ea(0x17f),()=>_0x3dc05d['kill']('SIGINT')),process['on'](_0x53e5ea(0x1bf),()=>_0x3dc05d[_0x53e5ea(0x1a5)](_0x53e5ea(0x1bf))),_0x3dc05d['on'](_0x53e5ea(0x1bb),_0x2b0d57=>process[_0x53e5ea(0x1bb)](_0x2b0d57||0x0));},'plus-web':async()=>{const _0x174320=a0_0x69ee2;await commands[_0x174320(0x193)]();},'terminal':async()=>{const _0x161468=a0_0x69ee2;console[_0x161468(0x17d)](_0x161468(0x184));const _0x14c292=await checkServerRunning(host,port);!_0x14c292&&(console[_0x161468(0x17c)]('\x0aServer\x20is\x20not\x20running\x20at\x20'+serverUrl),console[_0x161468(0x17c)](_0x161468(0x1ba)),console[_0x161468(0x17c)](_0x161468(0x190)),console[_0x161468(0x17c)](_0x161468(0x177)),process[_0x161468(0x1bb)](0x1));console[_0x161468(0x17d)](_0x161468(0x1a4)+serverUrl),console[_0x161468(0x17d)]('Starting\x20Terminal\x20UI...\x0a');const _0x3dd914=startTerminalUI();process['on'](_0x161468(0x17f),()=>_0x3dd914[_0x161468(0x1a5)](_0x161468(0x17f))),process['on'](_0x161468(0x1bf),()=>_0x3dd914[_0x161468(0x1a5)](_0x161468(0x1bf))),_0x3dd914['on']('exit',_0x314cbf=>process[_0x161468(0x1bb)](_0x314cbf||0x0));},'plus-terminal':async()=>{const _0x1e6af5=a0_0x69ee2;console[_0x1e6af5(0x17d)](_0x1e6af5(0x198));const _0x19d4f2=startServer(!![]),_0x1a603b=await waitForServer(host,port);!_0x1a603b&&(console[_0x1e6af5(0x17c)]('\x0aServer\x20failed\x20to\x20start.\x20Please\x20check\x20logs.'),process[_0x1e6af5(0x1bb)](0x1));console['log'](_0x1e6af5(0x1a2)+serverUrl),console['log'](_0x1e6af5(0x185));const _0x35b02e=startTerminalUI();_0x35b02e['on']('exit',_0x5903df=>{const _0x4718af=_0x1e6af5;console[_0x4718af(0x17d)](_0x4718af(0x188));try{process[_0x4718af(0x1a5)](_0x19d4f2['pid'],'SIGTERM');}catch(_0x591db9){}process['exit'](_0x5903df||0x0);}),process['on'](_0x1e6af5(0x17f),()=>{_0x35b02e['kill']('SIGINT');}),process['on'](_0x1e6af5(0x1bf),()=>{const _0x2ff1c0=_0x1e6af5;_0x35b02e[_0x2ff1c0(0x1a5)](_0x2ff1c0(0x1bf));});}};commands[command]?commands[command]()[a0_0x69ee2(0x18e)](_0x40780e=>{const _0x4c642c=a0_0x69ee2;console[_0x4c642c(0x17c)](_0x4c642c(0x1aa),_0x40780e[_0x4c642c(0x182)]),process['exit'](0x1);}):(console['error'](a0_0x69ee2(0x17a)+command),console['error'](a0_0x69ee2(0x1af)),process['exit'](0x1));
3
+ const a0_0x219500=a0_0x13ce;(function(_0x139ca9,_0x521000){const _0x45d9d5=a0_0x13ce,_0xcedb2=_0x139ca9();while(!![]){try{const _0x379397=parseInt(_0x45d9d5(0x10f))/0x1+parseInt(_0x45d9d5(0x13e))/0x2+parseInt(_0x45d9d5(0x130))/0x3*(-parseInt(_0x45d9d5(0x114))/0x4)+parseInt(_0x45d9d5(0x136))/0x5+-parseInt(_0x45d9d5(0x142))/0x6+-parseInt(_0x45d9d5(0x106))/0x7*(parseInt(_0x45d9d5(0x117))/0x8)+parseInt(_0x45d9d5(0x13b))/0x9*(parseInt(_0x45d9d5(0x129))/0xa);if(_0x379397===_0x521000)break;else _0xcedb2['push'](_0xcedb2['shift']());}catch(_0x280530){_0xcedb2['push'](_0xcedb2['shift']());}}}(a0_0xa139,0x6a0d8));import{fileURLToPath}from'url';import{dirname,join}from'path';import{spawn,exec}from'child_process';import{readFileSync}from'fs';import a0_0x4571f8 from'http';function a0_0x13ce(_0xcad0f1,_0x369f49){_0xcad0f1=_0xcad0f1-0x106;const _0xa13997=a0_0xa139();let _0x13ce55=_0xa13997[_0xcad0f1];return _0x13ce55;}const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename),DEFAULT_PORT=0x1f90,DEFAULT_HOST=a0_0x219500(0x10d),SERVER_STARTUP_TIMEOUT=0x3a98,SERVER_CHECK_INTERVAL=0x1f4,args=process[a0_0x219500(0x108)][a0_0x219500(0x13f)](0x2),command=args[0x0]&&!args[0x0][a0_0x219500(0x112)]('--')?args[0x0]:null,flags={'port':null,'host':null,'help':args[a0_0x219500(0x14a)](a0_0x219500(0x120))||args[a0_0x219500(0x14a)]('-h'),'version':args[a0_0x219500(0x14a)]('--version')||args[a0_0x219500(0x14a)]('-v')};for(let i=0x0;i<args[a0_0x219500(0x139)];i++){args[i]===a0_0x219500(0x111)&&args[i+0x1]&&(flags[a0_0x219500(0x10c)]=parseInt(args[i+0x1],0xa)),args[i]===a0_0x219500(0x13a)&&args[i+0x1]&&(flags[a0_0x219500(0x149)]=args[i+0x1]);}const port=flags[a0_0x219500(0x10c)]||DEFAULT_PORT,host=flags[a0_0x219500(0x149)]||DEFAULT_HOST,serverUrl=a0_0x219500(0x131)+host+':'+port;if(flags['version']){const pkgPath=join(__dirname,'..',a0_0x219500(0x110)),pkg=JSON[a0_0x219500(0x123)](readFileSync(pkgPath,a0_0x219500(0x125)));console[a0_0x219500(0x14d)](a0_0x219500(0x145)+pkg[a0_0x219500(0x116)]),process[a0_0x219500(0x132)](0x0);}function a0_0xa139(){const _0x4ca4f5=['xdg-open\x20\x22','Checking\x20if\x20server\x20is\x20running...','host','includes','help','pid','log','7TpSvcz','index.js','argv','\x0aShutting\x20down\x20server...','ignore','\x0aLoxia\x20Autopilot\x20One\x20v','port','localhost','unref','23067EFVvdR','package.json','--port','startsWith','error','12nyEeyq','\x0aServer\x20is\x20not\x20running\x20at\x20','version','5321696hqnoJR','Could\x20not\x20open\x20browser\x20automatically.','start\x20\x22\x22\x20\x22','statusCode','Run\x20\x22loxia\x20--help\x22\x20for\x20usage\x20information.','SIGINT','Waiting\x20for\x20server\x20to\x20start...',')\x0a\x20\x20--host\x20<host>\x20\x20\x20\x20\x20Specify\x20host\x20(default:\x20','\x0aPlease\x20start\x20the\x20server\x20first:','--help','web','inherit','parse','get','utf8','open\x20\x22','destroy','\x0aOpening\x20Web\x20UI\x20at\x20','90UsijtE','env','catch','darwin','LOXIA_HOST','Error:','kill','324243EPyqOd','http://','exit','SIGTERM','Starting\x20Loxia\x20server...\x0a','\x20\x20loxia\x20web\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Start\x20server\x20+\x20Web\x20UI','116750mgfZfC','src','node','length','--host','1685601VPzBQg','\x20\x20loxia\x20plus-terminal\x20\x20#\x20Start\x20server\x20+\x20Terminal\x20UI\x0a','loxia-terminal.js','859518xKavFD','slice','Starting\x20Terminal\x20UI...\x0a','toString','4427580lnzuZu','Server\x20is\x20running\x20at\x20','\x0aServer\x20failed\x20to\x20start.\x20Please\x20check\x20logs.','Loxia\x20Autopilot\x20One\x20v','message'];a0_0xa139=function(){return _0x4ca4f5;};return a0_0xa139();}if(flags[a0_0x219500(0x14b)]||!command){const pkgPath=join(__dirname,'..',a0_0x219500(0x110)),pkg=JSON[a0_0x219500(0x123)](readFileSync(pkgPath,a0_0x219500(0x125)));console[a0_0x219500(0x14d)](a0_0x219500(0x10b)+pkg[a0_0x219500(0x116)]+'\x20-\x20AI\x20Agent\x20System\x0a\x0aUsage:\x0a\x20\x20loxia\x20<command>\x20[options]\x0a\x0aCommands:\x0a\x20\x20web\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Start\x20server\x20+\x20open\x20Web\x20UI\x20in\x20browser\x0a\x20\x20terminal\x20\x20\x20\x20\x20\x20\x20\x20Start\x20Terminal\x20UI\x20(server\x20must\x20be\x20running)\x0a\x20\x20plus-web\x20\x20\x20\x20\x20\x20\x20\x20Alias\x20for\x20\x27web\x27\x0a\x20\x20plus-terminal\x20\x20\x20Start\x20server\x20+\x20Terminal\x20UI\x20together\x0a\x0aOptions:\x0a\x20\x20--port\x20<number>\x20\x20\x20Specify\x20port\x20(default:\x20'+DEFAULT_PORT+a0_0x219500(0x11e)+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_0x219500(0x132)](0x0);}async function checkServerRunning(_0x12d7b2,_0x3d9964,_0x3bdc3d=0x1){for(let _0x4fc805=0x0;_0x4fc805<_0x3bdc3d;_0x4fc805++){const _0x5743cf=await new Promise(_0x40769c=>{const _0x37baf3=a0_0x13ce,_0x443980=a0_0x4571f8[_0x37baf3(0x124)](_0x37baf3(0x131)+_0x12d7b2+':'+_0x3d9964+'/api/health',_0x2b806c=>{const _0x50c468=_0x37baf3;_0x40769c(_0x2b806c[_0x50c468(0x11a)]===0xc8);});_0x443980['on'](_0x37baf3(0x113),()=>_0x40769c(![])),_0x443980['setTimeout'](0x7d0,()=>{const _0x5c49ea=_0x37baf3;_0x443980[_0x5c49ea(0x127)](),_0x40769c(![]);});});if(_0x5743cf)return!![];_0x4fc805<_0x3bdc3d-0x1&&await new Promise(_0x1d3d15=>setTimeout(_0x1d3d15,SERVER_CHECK_INTERVAL));}return![];}async function waitForServer(_0x5bad26,_0x490c1c,_0x4488e8=SERVER_STARTUP_TIMEOUT){const _0x2cc23d=Math['ceil'](_0x4488e8/SERVER_CHECK_INTERVAL);return checkServerRunning(_0x5bad26,_0x490c1c,_0x2cc23d);}function openBrowser(_0x530156){const _0x346b83=a0_0x219500,_0x28694c=process['platform'];let _0x4f0a32;if(_0x28694c===_0x346b83(0x12c))_0x4f0a32=_0x346b83(0x126)+_0x530156+'\x22';else _0x28694c==='win32'?_0x4f0a32=_0x346b83(0x119)+_0x530156+'\x22':_0x4f0a32=_0x346b83(0x147)+_0x530156+'\x22';exec(_0x4f0a32,_0x1a948c=>{const _0x5e8dca=_0x346b83;_0x1a948c&&(console[_0x5e8dca(0x14d)](_0x5e8dca(0x118)),console[_0x5e8dca(0x14d)]('Please\x20open\x20manually:\x20'+_0x530156));});}function startServer(_0xc66b98=![]){const _0x34ba44=a0_0x219500,_0x41ebd6={...process[_0x34ba44(0x12a)],'LOXIA_PORT':port[_0x34ba44(0x141)](),'PORT':port['toString']()};flags[_0x34ba44(0x149)]&&(_0x41ebd6[_0x34ba44(0x12d)]=flags[_0x34ba44(0x149)]);const _0x1451d1=join(__dirname,'..',_0x34ba44(0x137),_0x34ba44(0x107)),_0x55713f=spawn(_0x34ba44(0x138),[_0x1451d1],{'cwd':join(__dirname,'..'),'env':_0x41ebd6,'stdio':_0xc66b98?[_0x34ba44(0x10a),_0x34ba44(0x10a),'ignore']:_0x34ba44(0x122),'detached':_0xc66b98});return _0xc66b98&&_0x55713f[_0x34ba44(0x10e)](),_0x55713f;}function startTerminalUI(){const _0xbb074=a0_0x219500,_0xd489b6=join(__dirname,_0xbb074(0x13d)),_0x4f8091={...process[_0xbb074(0x12a)],'LOXIA_PORT':port[_0xbb074(0x141)](),'LOXIA_HOST':host},_0x5c86b6=spawn('node',[_0xd489b6],{'cwd':join(__dirname,'..'),'env':_0x4f8091,'stdio':_0xbb074(0x122)});return _0x5c86b6;}const commands={'web':async()=>{const _0x96861f=a0_0x219500;console['log'](_0x96861f(0x134));const _0x52f5b2=startServer(![]);console[_0x96861f(0x14d)](_0x96861f(0x11d));const _0x245c43=await waitForServer(host,port);_0x245c43?(console[_0x96861f(0x14d)](_0x96861f(0x128)+serverUrl),openBrowser(serverUrl)):console[_0x96861f(0x14d)]('\x0aServer\x20may\x20still\x20be\x20starting.\x20Open\x20'+serverUrl+'\x20manually.'),process['on']('SIGINT',()=>_0x52f5b2[_0x96861f(0x12f)](_0x96861f(0x11c))),process['on'](_0x96861f(0x133),()=>_0x52f5b2[_0x96861f(0x12f)](_0x96861f(0x133))),_0x52f5b2['on'](_0x96861f(0x132),_0x213b61=>process['exit'](_0x213b61||0x0));},'plus-web':async()=>{const _0x325394=a0_0x219500;await commands[_0x325394(0x121)]();},'terminal':async()=>{const _0x470c6a=a0_0x219500;console[_0x470c6a(0x14d)](_0x470c6a(0x148));const _0x14d49f=await checkServerRunning(host,port);!_0x14d49f&&(console[_0x470c6a(0x113)](_0x470c6a(0x115)+serverUrl),console['error'](_0x470c6a(0x11f)),console[_0x470c6a(0x113)](_0x470c6a(0x135)),console[_0x470c6a(0x113)](_0x470c6a(0x13c)),process[_0x470c6a(0x132)](0x1));console[_0x470c6a(0x14d)](_0x470c6a(0x143)+serverUrl),console['log'](_0x470c6a(0x140));const _0x161019=startTerminalUI();process['on'](_0x470c6a(0x11c),()=>_0x161019[_0x470c6a(0x12f)](_0x470c6a(0x11c))),process['on']('SIGTERM',()=>_0x161019[_0x470c6a(0x12f)](_0x470c6a(0x133))),_0x161019['on'](_0x470c6a(0x132),_0x3a9a3f=>process[_0x470c6a(0x132)](_0x3a9a3f||0x0));},'plus-terminal':async()=>{const _0x578c3e=a0_0x219500;console['log']('Starting\x20Loxia\x20server\x20in\x20background...');const _0x29827a=startServer(!![]),_0x5a54e8=await waitForServer(host,port);!_0x5a54e8&&(console[_0x578c3e(0x113)](_0x578c3e(0x144)),process[_0x578c3e(0x132)](0x1));console[_0x578c3e(0x14d)]('Server\x20running\x20at\x20'+serverUrl),console['log'](_0x578c3e(0x140));const _0x2f709a=startTerminalUI();_0x2f709a['on']('exit',_0x1ee213=>{const _0x3448d9=_0x578c3e;console[_0x3448d9(0x14d)](_0x3448d9(0x109));try{process[_0x3448d9(0x12f)](_0x29827a[_0x3448d9(0x14c)],_0x3448d9(0x133));}catch(_0xd8a9c9){}process[_0x3448d9(0x132)](_0x1ee213||0x0);}),process['on'](_0x578c3e(0x11c),()=>{const _0x172e4f=_0x578c3e;_0x2f709a[_0x172e4f(0x12f)](_0x172e4f(0x11c));}),process['on'](_0x578c3e(0x133),()=>{const _0x2ddaf8=_0x578c3e;_0x2f709a[_0x2ddaf8(0x12f)]('SIGTERM');});}};commands[command]?commands[command]()[a0_0x219500(0x12b)](_0x32c88c=>{const _0xf6be41=a0_0x219500;console[_0xf6be41(0x113)](_0xf6be41(0x12e),_0x32c88c[_0xf6be41(0x146)]),process[_0xf6be41(0x132)](0x1);}):(console[a0_0x219500(0x113)]('Unknown\x20command:\x20'+command),console['error'](a0_0x219500(0x11b)),process[a0_0x219500(0x132)](0x1));
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- const a0_0x1b0204=a0_0x2509;(function(_0x122913,_0x5a24ef){const _0x4204d8=a0_0x2509,_0x59cafb=_0x122913();while(!![]){try{const _0x533359=parseInt(_0x4204d8(0x1f6))/0x1*(parseInt(_0x4204d8(0x1fc))/0x2)+parseInt(_0x4204d8(0x1ee))/0x3+parseInt(_0x4204d8(0x1f9))/0x4*(parseInt(_0x4204d8(0x1f7))/0x5)+-parseInt(_0x4204d8(0x1ff))/0x6*(parseInt(_0x4204d8(0x1f2))/0x7)+parseInt(_0x4204d8(0x1f8))/0x8+-parseInt(_0x4204d8(0x1d4))/0x9*(-parseInt(_0x4204d8(0x1db))/0xa)+-parseInt(_0x4204d8(0x1fa))/0xb;if(_0x533359===_0x5a24ef)break;else _0x59cafb['push'](_0x59cafb['shift']());}catch(_0xf01e37){_0x59cafb['push'](_0x59cafb['shift']());}}}(a0_0x55da,0x6330d));import{spawn}from'child_process';import a0_0x5ed915 from'net';function a0_0x2509(_0x1b2660,_0x3cb548){_0x1b2660=_0x1b2660-0x1ce;const _0x55da63=a0_0x55da();let _0x2509f9=_0x55da63[_0x1b2660];return _0x2509f9;}import a0_0x1a8ee0 from'path';import{fileURLToPath}from'url';const __filename=fileURLToPath(import.meta.url),__dirname=a0_0x1a8ee0[a0_0x1b0204(0x1fb)](__filename),projectRoot=a0_0x1a8ee0['dirname'](__dirname),DEFAULT_PORT=0x1f90,DEFAULT_HOST='localhost',SERVER_STARTUP_TIMEOUT=0x2710;async function isServerRunning(_0x2a2ec2,_0x7a8725){return new Promise(_0x51ab20=>{const _0x16aaa8=a0_0x2509,_0x55781b=new a0_0x5ed915[(_0x16aaa8(0x1d7))]();_0x55781b['setTimeout'](0x7d0),_0x55781b['on'](_0x16aaa8(0x1df),()=>{const _0x55bcec=_0x16aaa8;_0x55781b[_0x55bcec(0x1dd)](),_0x51ab20(!![]);}),_0x55781b['on']('timeout',()=>{_0x55781b['destroy'](),_0x51ab20(![]);}),_0x55781b['on']('error',()=>{_0x55781b['destroy'](),_0x51ab20(![]);}),_0x55781b[_0x16aaa8(0x1df)](_0x7a8725,_0x2a2ec2);});}async function startServer(_0x9baba8,_0x271e96){const _0x405888=a0_0x1b0204;return console[_0x405888(0x1ec)](_0x405888(0x1d8)),new Promise((_0x4de3fe,_0x3c6069)=>{const _0x37e407=_0x405888,_0x47ee6e=spawn('node',[a0_0x1a8ee0[_0x37e407(0x1ce)](projectRoot,_0x37e407(0x1f3)),_0x37e407(0x1e8),_0x37e407(0x1f1),_0x37e407(0x1f0),_0x9baba8,_0x37e407(0x1da),_0x271e96[_0x37e407(0x1cf)]()],{'detached':![],'stdio':[_0x37e407(0x1e1),_0x37e407(0x1e7),_0x37e407(0x1e7)]});_0x47ee6e[_0x37e407(0x1d5)]['on']('data',()=>{}),_0x47ee6e[_0x37e407(0x1e4)]['on']('data',()=>{}),_0x47ee6e['on']('error',_0x4af05e=>{const _0x1692e4=_0x37e407;console[_0x1692e4(0x1e5)](_0x1692e4(0x1e9),_0x4af05e['message']),_0x3c6069(_0x4af05e);});const _0x3f4929=Date[_0x37e407(0x1ed)](),_0x4fe447=setInterval(async()=>{const _0x46541b=_0x37e407,_0x322c2c=await isServerRunning(_0x9baba8,_0x271e96);if(_0x322c2c)clearInterval(_0x4fe447),console[_0x46541b(0x1ec)](_0x46541b(0x1e0)+_0x9baba8+':'+_0x271e96),_0x4de3fe();else Date['now']()-_0x3f4929>SERVER_STARTUP_TIMEOUT&&(clearInterval(_0x4fe447),_0x47ee6e[_0x46541b(0x1de)](),_0x3c6069(new Error('Server\x20startup\x20timeout')));},0x1f4);});}function a0_0x55da(){const _0x42668f=['\x20\x20\x201.\x20Make\x20sure\x20no\x20other\x20process\x20is\x20using\x20port\x208080','--host','web','3396533jEBYQl','bin/cli.js','length','...','437259iXhXWX','245viEYzn','5298592HGiFlK','64472mnkSql','14864674gzKNMF','dirname','2LMVYdd','💡\x20Troubleshooting:','LOXIA_PORT','6UGzwmY','━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━','join','toString','slice','🎨\x20Launching\x20Ink-based\x20Terminal\x20UI...','🔍\x20Checking\x20if\x20server\x20is\x20running\x20at\x20','env','9KWRQGG','stdout','✗\x20Server\x20is\x20not\x20running','Socket','🚀\x20Starting\x20Loxia\x20server...','❌\x20Failed\x20to\x20start\x20Terminal\x20UI:','--port','1046620KIuTeE','✓\x20Server\x20is\x20already\x20running\x20at\x20','destroy','kill','connect','✓\x20Server\x20started\x20at\x20','ignore','\x20\x20Loxia\x20Autopilot\x20One\x20-\x20Terminal\x20UI','\x20\x20\x202.\x20Try\x20running\x20the\x20server\x20manually:\x20node\x20bin/cli.js','stderr','error','argv','pipe','--ui','Failed\x20to\x20start\x20server:','LOXIA_HOST','../src/interfaces/terminal/index.js','log','now','746433UuWggx'];a0_0x55da=function(){return _0x42668f;};return a0_0x55da();}async function main(){const _0x2da930=a0_0x1b0204;try{console[_0x2da930(0x1ec)](_0x2da930(0x200)),console[_0x2da930(0x1ec)](_0x2da930(0x1e2)),console['log'](_0x2da930(0x200)),console[_0x2da930(0x1ec)]('');const _0x72fad4=process[_0x2da930(0x1e6)][_0x2da930(0x1d0)](0x2);let _0x1b77c2=DEFAULT_HOST,_0x5ad80a=DEFAULT_PORT;for(let _0x3adf6b=0x0;_0x3adf6b<_0x72fad4[_0x2da930(0x1f4)];_0x3adf6b++){if(_0x72fad4[_0x3adf6b]===_0x2da930(0x1f0)&&_0x72fad4[_0x3adf6b+0x1])_0x1b77c2=_0x72fad4[_0x3adf6b+0x1],_0x3adf6b++;else _0x72fad4[_0x3adf6b]===_0x2da930(0x1da)&&_0x72fad4[_0x3adf6b+0x1]&&(_0x5ad80a=parseInt(_0x72fad4[_0x3adf6b+0x1],0xa),_0x3adf6b++);}console[_0x2da930(0x1ec)](_0x2da930(0x1d2)+_0x1b77c2+':'+_0x5ad80a+_0x2da930(0x1f5));const _0x1aa20c=await isServerRunning(_0x1b77c2,_0x5ad80a);!_0x1aa20c?(console['log'](_0x2da930(0x1d6)),await startServer(_0x1b77c2,_0x5ad80a)):console['log'](_0x2da930(0x1dc)+_0x1b77c2+':'+_0x5ad80a),console[_0x2da930(0x1ec)](''),console[_0x2da930(0x1ec)](_0x2da930(0x1d1)),console[_0x2da930(0x1ec)](''),await new Promise(_0x32f49f=>setTimeout(_0x32f49f,0x1f4)),process[_0x2da930(0x1d3)][_0x2da930(0x1ea)]=_0x1b77c2,process[_0x2da930(0x1d3)][_0x2da930(0x1fe)]=_0x5ad80a['toString'](),await import(_0x2da930(0x1eb));}catch(_0x5db738){console['error'](''),console['error'](_0x2da930(0x1d9)),console[_0x2da930(0x1e5)]('\x20\x20',_0x5db738['message']),console[_0x2da930(0x1e5)](''),console[_0x2da930(0x1e5)](_0x2da930(0x1fd)),console['error'](_0x2da930(0x1ef)),console[_0x2da930(0x1e5)](_0x2da930(0x1e3)),console[_0x2da930(0x1e5)]('\x20\x20\x203.\x20Check\x20logs\x20for\x20more\x20details'),console[_0x2da930(0x1e5)](''),process['exit'](0x1);}}main();
3
+ const a0_0x2927d3=a0_0x1793;(function(_0x10e616,_0xeb10bc){const _0x4efcb8=a0_0x1793,_0x577eaf=_0x10e616();while(!![]){try{const _0x1e443f=parseInt(_0x4efcb8(0x91))/0x1*(-parseInt(_0x4efcb8(0x9d))/0x2)+-parseInt(_0x4efcb8(0xa6))/0x3+-parseInt(_0x4efcb8(0xaf))/0x4*(-parseInt(_0x4efcb8(0xa5))/0x5)+-parseInt(_0x4efcb8(0xb2))/0x6*(-parseInt(_0x4efcb8(0xac))/0x7)+parseInt(_0x4efcb8(0xb8))/0x8+-parseInt(_0x4efcb8(0xbc))/0x9*(parseInt(_0x4efcb8(0x99))/0xa)+parseInt(_0x4efcb8(0x9f))/0xb*(parseInt(_0x4efcb8(0xab))/0xc);if(_0x1e443f===_0xeb10bc)break;else _0x577eaf['push'](_0x577eaf['shift']());}catch(_0x45bb5e){_0x577eaf['push'](_0x577eaf['shift']());}}}(a0_0x1c93,0x3969a));function a0_0x1793(_0x583bec,_0x292291){_0x583bec=_0x583bec-0x8e;const _0x1c93e3=a0_0x1c93();let _0x179377=_0x1c93e3[_0x583bec];return _0x179377;}function a0_0x1c93(){const _0x444891=['dirname','━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━','slice','join','✗\x20Server\x20is\x20not\x20running','302567fIhxpx','log','toString','--ui','stdout','LOXIA_HOST','node','--port','1367390OlHTMF','env','exit','Socket','2hokMnm','message','682RrRtGw','bin/cli.js','destroy','✓\x20Server\x20is\x20already\x20running\x20at\x20','now','connect','25030nmGJfq','1119294gWtiql','argv','🔍\x20Checking\x20if\x20server\x20is\x20running\x20at\x20','error','length','72372REEMXJ','21UzxfVy','\x20\x20\x203.\x20Check\x20logs\x20for\x20more\x20details','data','132vVZgTL','Server\x20startup\x20timeout','../src/interfaces/terminal/index.js','419532IsIfiZ','\x20\x20\x202.\x20Try\x20running\x20the\x20server\x20manually:\x20node\x20bin/cli.js','timeout','--host','✓\x20Server\x20started\x20at\x20','LOXIA_PORT','3483352qWdfMt','web','Failed\x20to\x20start\x20server:','💡\x20Troubleshooting:','18yTrBOE','pipe','stderr','\x20\x20\x201.\x20Make\x20sure\x20no\x20other\x20process\x20is\x20using\x20port\x208080'];a0_0x1c93=function(){return _0x444891;};return a0_0x1c93();}import{spawn}from'child_process';import a0_0x44b4f6 from'net';import a0_0x3456d9 from'path';import{fileURLToPath}from'url';const __filename=fileURLToPath(import.meta.url),__dirname=a0_0x3456d9[a0_0x2927d3(0xc0)](__filename),projectRoot=a0_0x3456d9[a0_0x2927d3(0xc0)](__dirname),DEFAULT_PORT=0x1f90,DEFAULT_HOST='localhost',SERVER_STARTUP_TIMEOUT=0x2710;async function isServerRunning(_0xda3f66,_0x2fa078){return new Promise(_0x1909cd=>{const _0xfc3d4c=a0_0x1793,_0x3fa23b=new a0_0x44b4f6[(_0xfc3d4c(0x9c))]();_0x3fa23b['setTimeout'](0x7d0),_0x3fa23b['on'](_0xfc3d4c(0xa4),()=>{const _0x5539d7=_0xfc3d4c;_0x3fa23b[_0x5539d7(0xa1)](),_0x1909cd(!![]);}),_0x3fa23b['on'](_0xfc3d4c(0xb4),()=>{_0x3fa23b['destroy'](),_0x1909cd(![]);}),_0x3fa23b['on'](_0xfc3d4c(0xa9),()=>{const _0x57a15b=_0xfc3d4c;_0x3fa23b[_0x57a15b(0xa1)](),_0x1909cd(![]);}),_0x3fa23b[_0xfc3d4c(0xa4)](_0x2fa078,_0xda3f66);});}async function startServer(_0x8720a9,_0x46b597){return console['log']('🚀\x20Starting\x20Loxia\x20server...'),new Promise((_0xfbf8ed,_0x5015f0)=>{const _0x54e5e8=a0_0x1793,_0x476a8a=spawn(_0x54e5e8(0x97),[a0_0x3456d9[_0x54e5e8(0x8f)](projectRoot,_0x54e5e8(0xa0)),_0x54e5e8(0x94),_0x54e5e8(0xb9),_0x54e5e8(0xb5),_0x8720a9,_0x54e5e8(0x98),_0x46b597[_0x54e5e8(0x93)]()],{'detached':![],'stdio':['ignore',_0x54e5e8(0xbd),_0x54e5e8(0xbd)]});_0x476a8a[_0x54e5e8(0x95)]['on']('data',()=>{}),_0x476a8a[_0x54e5e8(0xbe)]['on'](_0x54e5e8(0xae),()=>{}),_0x476a8a['on'](_0x54e5e8(0xa9),_0x31c62e=>{const _0xb397d4=_0x54e5e8;console['error'](_0xb397d4(0xba),_0x31c62e[_0xb397d4(0x9e)]),_0x5015f0(_0x31c62e);});const _0x54e3e5=Date[_0x54e5e8(0xa3)](),_0x571f16=setInterval(async()=>{const _0x4f712c=_0x54e5e8,_0x1e80d3=await isServerRunning(_0x8720a9,_0x46b597);if(_0x1e80d3)clearInterval(_0x571f16),console[_0x4f712c(0x92)](_0x4f712c(0xb6)+_0x8720a9+':'+_0x46b597),_0xfbf8ed();else Date[_0x4f712c(0xa3)]()-_0x54e3e5>SERVER_STARTUP_TIMEOUT&&(clearInterval(_0x571f16),_0x476a8a['kill'](),_0x5015f0(new Error(_0x4f712c(0xb0))));},0x1f4);});}async function main(){const _0x434c62=a0_0x2927d3;try{console['log'](_0x434c62(0xc1)),console['log']('\x20\x20Loxia\x20Autopilot\x20One\x20-\x20Terminal\x20UI'),console[_0x434c62(0x92)](_0x434c62(0xc1)),console[_0x434c62(0x92)]('');const _0x5268d8=process[_0x434c62(0xa7)][_0x434c62(0x8e)](0x2);let _0x47d820=DEFAULT_HOST,_0x21f79c=DEFAULT_PORT;for(let _0x7cb245=0x0;_0x7cb245<_0x5268d8[_0x434c62(0xaa)];_0x7cb245++){if(_0x5268d8[_0x7cb245]===_0x434c62(0xb5)&&_0x5268d8[_0x7cb245+0x1])_0x47d820=_0x5268d8[_0x7cb245+0x1],_0x7cb245++;else _0x5268d8[_0x7cb245]===_0x434c62(0x98)&&_0x5268d8[_0x7cb245+0x1]&&(_0x21f79c=parseInt(_0x5268d8[_0x7cb245+0x1],0xa),_0x7cb245++);}console[_0x434c62(0x92)](_0x434c62(0xa8)+_0x47d820+':'+_0x21f79c+'...');const _0x2c8901=await isServerRunning(_0x47d820,_0x21f79c);!_0x2c8901?(console[_0x434c62(0x92)](_0x434c62(0x90)),await startServer(_0x47d820,_0x21f79c)):console[_0x434c62(0x92)](_0x434c62(0xa2)+_0x47d820+':'+_0x21f79c),console[_0x434c62(0x92)](''),console[_0x434c62(0x92)]('🎨\x20Launching\x20Ink-based\x20Terminal\x20UI...'),console['log'](''),await new Promise(_0x38b186=>setTimeout(_0x38b186,0x1f4)),process['env'][_0x434c62(0x96)]=_0x47d820,process[_0x434c62(0x9a)][_0x434c62(0xb7)]=_0x21f79c[_0x434c62(0x93)](),await import(_0x434c62(0xb1));}catch(_0x3083ec){console[_0x434c62(0xa9)](''),console[_0x434c62(0xa9)]('❌\x20Failed\x20to\x20start\x20Terminal\x20UI:'),console[_0x434c62(0xa9)]('\x20\x20',_0x3083ec['message']),console['error'](''),console[_0x434c62(0xa9)](_0x434c62(0xbb)),console[_0x434c62(0xa9)](_0x434c62(0xbf)),console[_0x434c62(0xa9)](_0x434c62(0xb3)),console[_0x434c62(0xa9)](_0x434c62(0xad)),console[_0x434c62(0xa9)](''),process[_0x434c62(0x9b)](0x1);}}main();
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- const a0_0x3130d8=a0_0x14e4;(function(_0x5b92af,_0x28dc8e){const _0x138159=a0_0x14e4,_0x302392=_0x5b92af();while(!![]){try{const _0x5e9a86=parseInt(_0x138159(0x1e9))/0x1*(parseInt(_0x138159(0x1f1))/0x2)+parseInt(_0x138159(0x1ea))/0x3*(-parseInt(_0x138159(0x1ee))/0x4)+parseInt(_0x138159(0x1fc))/0x5+-parseInt(_0x138159(0x1ec))/0x6+-parseInt(_0x138159(0x1e8))/0x7*(parseInt(_0x138159(0x1ff))/0x8)+parseInt(_0x138159(0x1ed))/0x9+-parseInt(_0x138159(0x201))/0xa;if(_0x5e9a86===_0x28dc8e)break;else _0x302392['push'](_0x302392['shift']());}catch(_0x5beabc){_0x302392['push'](_0x302392['shift']());}}}(a0_0x13ce,0x84005));import{startTerminalUI}from'../src/interfaces/terminal/index.js';function a0_0x13ce(){const _0x4326aa=['7819983lifzGa','16LkalxO','\x20\x20npm\x20start','Starting\x20Loxia\x20Terminal\x20UI...','22682oHHaOi','LOXIA_PORT','Connecting\x20to:\x20','ERROR:\x20Terminal\x20UI\x20requires\x20an\x20interactive\x20terminal\x20(TTY).','error','catch','Press\x20Ctrl+C\x20to\x20exit\x0a','--port','--host','LOXIA_HOST','--help','5002410tiREHM','\x0aTerminal\x20UI\x20exited','isTTY','16XQzDwj','The\x20terminal\x20UI\x20cannot\x20run\x20in:','432290uGlnLK','length','env','argv','Please\x20run\x20this\x20command\x20in\x20a\x20real\x20terminal\x20without\x20pipes\x20or\x20redirection:','stdin','slice','\x20\x20npm\x20run\x20terminal-ui','log','port','host','\x20\x20-\x20Redirected\x20output\x20(e.g.,\x20>\x20file.txt,\x202>&1\x20|\x20...)','467026UATXhi','7eeAdmi','646572NbypJb','exit','2215908achEtW'];a0_0x13ce=function(){return _0x4326aa;};return a0_0x13ce();}const args=process[a0_0x3130d8(0x204)][a0_0x3130d8(0x1e2)](0x2),options={'host':'localhost','port':0x1f90};for(let i=0x0;i<args[a0_0x3130d8(0x202)];i++){const arg=args[i];if(arg===a0_0x3130d8(0x1f9)||arg==='-h')options[a0_0x3130d8(0x1e6)]=args[++i];else{if(arg===a0_0x3130d8(0x1f8)||arg==='-p')options[a0_0x3130d8(0x1e5)]=parseInt(args[++i],0xa);else arg===a0_0x3130d8(0x1fb)&&(console[a0_0x3130d8(0x1e4)]('\x0aLoxia\x20Terminal\x20UI\x0a\x0aUsage:\x0a\x20\x20loxia-terminal\x20[options]\x0a\x0aOptions:\x0a\x20\x20--host,\x20-h\x20<host>\x20\x20\x20\x20Backend\x20host\x20(default:\x20localhost)\x0a\x20\x20--port,\x20-p\x20<port>\x20\x20\x20\x20Backend\x20port\x20(default:\x208080)\x0a\x20\x20--help\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20this\x20help\x20message\x0a\x0aEnvironment\x20Variables:\x0a\x20\x20LOXIA_HOST\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Backend\x20host\x0a\x20\x20LOXIA_PORT\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Backend\x20port\x0a\x0aExamples:\x0a\x20\x20loxia-terminal\x0a\x20\x20loxia-terminal\x20--host\x20192.168.1.100\x20--port\x203000\x0a\x20\x20LOXIA_HOST=api.example.com\x20LOXIA_PORT=443\x20loxia-terminal\x0a'),process[a0_0x3130d8(0x1eb)](0x0));}}process[a0_0x3130d8(0x203)][a0_0x3130d8(0x1fa)]&&(options[a0_0x3130d8(0x1e6)]=process[a0_0x3130d8(0x203)][a0_0x3130d8(0x1fa)]);process['env']['LOXIA_PORT']&&(options[a0_0x3130d8(0x1e5)]=parseInt(process[a0_0x3130d8(0x203)][a0_0x3130d8(0x1f2)],0xa));!process[a0_0x3130d8(0x1e1)][a0_0x3130d8(0x1fe)]&&(console['error'](a0_0x3130d8(0x1f4)),console[a0_0x3130d8(0x1f5)](''),console[a0_0x3130d8(0x1f5)](a0_0x3130d8(0x200)),console[a0_0x3130d8(0x1f5)]('\x20\x20-\x20Piped\x20environments\x20(e.g.,\x20|\x20head,\x20|\x20grep)'),console[a0_0x3130d8(0x1f5)](a0_0x3130d8(0x1e7)),console[a0_0x3130d8(0x1f5)]('\x20\x20-\x20Background\x20processes\x20(e.g.,\x20&\x20at\x20the\x20end)'),console['error']('\x20\x20-\x20Some\x20CI/CD\x20environments'),console[a0_0x3130d8(0x1f5)](''),console[a0_0x3130d8(0x1f5)](a0_0x3130d8(0x205)),console[a0_0x3130d8(0x1f5)](a0_0x3130d8(0x1e3)),console['error'](''),console[a0_0x3130d8(0x1f5)]('Or\x20use\x20the\x20web\x20UI\x20instead:'),console[a0_0x3130d8(0x1f5)](a0_0x3130d8(0x1ef)),process['exit'](0x1));console[a0_0x3130d8(0x1e4)](a0_0x3130d8(0x1f0)),console[a0_0x3130d8(0x1e4)](a0_0x3130d8(0x1f3)+options['host']+':'+options[a0_0x3130d8(0x1e5)]),console[a0_0x3130d8(0x1e4)](a0_0x3130d8(0x1f7));const instance=startTerminalUI(options);function a0_0x14e4(_0xfb6a59,_0x1eb770){_0xfb6a59=_0xfb6a59-0x1e1;const _0x13cedd=a0_0x13ce();let _0x14e44c=_0x13cedd[_0xfb6a59];return _0x14e44c;}instance['waitUntilExit']()['then'](()=>{const _0x37265c=a0_0x3130d8;console[_0x37265c(0x1e4)](_0x37265c(0x1fd)),process[_0x37265c(0x1eb)](0x0);})[a0_0x3130d8(0x1f6)](_0x27f9b3=>{const _0x3462fd=a0_0x3130d8;console[_0x3462fd(0x1f5)]('\x0aTerminal\x20UI\x20error:',_0x27f9b3),process[_0x3462fd(0x1eb)](0x1);});
3
+ const a0_0x37cd60=a0_0x57eb;(function(_0x476f1e,_0x535b78){const _0x487552=a0_0x57eb,_0x3338de=_0x476f1e();while(!![]){try{const _0x109714=parseInt(_0x487552(0xbd))/0x1*(-parseInt(_0x487552(0xb8))/0x2)+parseInt(_0x487552(0xb0))/0x3+parseInt(_0x487552(0xae))/0x4+-parseInt(_0x487552(0xc3))/0x5+parseInt(_0x487552(0xb9))/0x6*(parseInt(_0x487552(0xb5))/0x7)+parseInt(_0x487552(0xa1))/0x8*(-parseInt(_0x487552(0xad))/0x9)+parseInt(_0x487552(0xc1))/0xa;if(_0x109714===_0x535b78)break;else _0x3338de['push'](_0x3338de['shift']());}catch(_0x3c2315){_0x3338de['push'](_0x3338de['shift']());}}}(a0_0xbe30,0xb72db));function a0_0x57eb(_0x2578c2,_0x145b6a){_0x2578c2=_0x2578c2-0x9e;const _0xbe3043=a0_0xbe30();let _0x57eb7c=_0xbe3043[_0x2578c2];return _0x57eb7c;}import{startTerminalUI}from'../src/interfaces/terminal/index.js';function a0_0xbe30(){const _0x5e5294=['18EDCLhl','262788HWQJKz','env','3272244VjWPcm','LOXIA_HOST','log','then','error','322zYySON','localhost','\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','148024EaSixu','42726EYdhFQ','--help','argv','--host','17WhLvuO','catch','length','--port','26435410EJppvA','ERROR:\x20Terminal\x20UI\x20requires\x20an\x20interactive\x20terminal\x20(TTY).','3635235MPMuVP','\x20\x20-\x20Some\x20CI/CD\x20environments','\x0aTerminal\x20UI\x20error:','stdin','\x0aTerminal\x20UI\x20exited','5568008vYKZNO','\x20\x20npm\x20run\x20terminal-ui','Connecting\x20to:\x20','\x20\x20npm\x20start','LOXIA_PORT','exit','Please\x20run\x20this\x20command\x20in\x20a\x20real\x20terminal\x20without\x20pipes\x20or\x20redirection:','Or\x20use\x20the\x20web\x20UI\x20instead:','host','port','Starting\x20Loxia\x20Terminal\x20UI...','\x20\x20-\x20Piped\x20environments\x20(e.g.,\x20|\x20head,\x20|\x20grep)'];a0_0xbe30=function(){return _0x5e5294;};return a0_0xbe30();}const args=process[a0_0x37cd60(0xbb)]['slice'](0x2),options={'host':a0_0x37cd60(0xb6),'port':0x1f90};for(let i=0x0;i<args[a0_0x37cd60(0xbf)];i++){const arg=args[i];if(arg===a0_0x37cd60(0xbc)||arg==='-h')options[a0_0x37cd60(0xa9)]=args[++i];else{if(arg===a0_0x37cd60(0xc0)||arg==='-p')options[a0_0x37cd60(0xaa)]=parseInt(args[++i],0xa);else arg===a0_0x37cd60(0xba)&&(console['log'](a0_0x37cd60(0xb7)),process[a0_0x37cd60(0xa6)](0x0));}}process[a0_0x37cd60(0xaf)][a0_0x37cd60(0xb1)]&&(options['host']=process[a0_0x37cd60(0xaf)][a0_0x37cd60(0xb1)]);process[a0_0x37cd60(0xaf)]['LOXIA_PORT']&&(options[a0_0x37cd60(0xaa)]=parseInt(process[a0_0x37cd60(0xaf)][a0_0x37cd60(0xa5)],0xa));!process[a0_0x37cd60(0x9f)]['isTTY']&&(console[a0_0x37cd60(0xb4)](a0_0x37cd60(0xc2)),console['error'](''),console[a0_0x37cd60(0xb4)]('The\x20terminal\x20UI\x20cannot\x20run\x20in:'),console[a0_0x37cd60(0xb4)](a0_0x37cd60(0xac)),console[a0_0x37cd60(0xb4)]('\x20\x20-\x20Redirected\x20output\x20(e.g.,\x20>\x20file.txt,\x202>&1\x20|\x20...)'),console[a0_0x37cd60(0xb4)]('\x20\x20-\x20Background\x20processes\x20(e.g.,\x20&\x20at\x20the\x20end)'),console[a0_0x37cd60(0xb4)](a0_0x37cd60(0xc4)),console[a0_0x37cd60(0xb4)](''),console[a0_0x37cd60(0xb4)](a0_0x37cd60(0xa7)),console[a0_0x37cd60(0xb4)](a0_0x37cd60(0xa2)),console['error'](''),console['error'](a0_0x37cd60(0xa8)),console[a0_0x37cd60(0xb4)](a0_0x37cd60(0xa4)),process['exit'](0x1));console[a0_0x37cd60(0xb2)](a0_0x37cd60(0xab)),console[a0_0x37cd60(0xb2)](a0_0x37cd60(0xa3)+options[a0_0x37cd60(0xa9)]+':'+options[a0_0x37cd60(0xaa)]),console['log']('Press\x20Ctrl+C\x20to\x20exit\x0a');const instance=startTerminalUI(options);instance['waitUntilExit']()[a0_0x37cd60(0xb3)](()=>{const _0x8a74b3=a0_0x37cd60;console[_0x8a74b3(0xb2)](_0x8a74b3(0xa0)),process[_0x8a74b3(0xa6)](0x0);})[a0_0x37cd60(0xbe)](_0x4a76fa=>{const _0x8badb7=a0_0x37cd60;console[_0x8badb7(0xb4)](_0x8badb7(0x9e),_0x4a76fa),process[_0x8badb7(0xa6)](0x1);});
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- const a0_0xc4add4=a0_0x4bc5;(function(_0x3a231e,_0x335da3){const _0xebab04=a0_0x4bc5,_0x435d04=_0x3a231e();while(!![]){try{const _0xda2ba0=parseInt(_0xebab04(0x159))/0x1+parseInt(_0xebab04(0x13f))/0x2+-parseInt(_0xebab04(0x152))/0x3+parseInt(_0xebab04(0x13e))/0x4*(parseInt(_0xebab04(0x14a))/0x5)+-parseInt(_0xebab04(0x146))/0x6+parseInt(_0xebab04(0x163))/0x7*(-parseInt(_0xebab04(0x168))/0x8)+-parseInt(_0xebab04(0x15e))/0x9*(-parseInt(_0xebab04(0x149))/0xa);if(_0xda2ba0===_0x335da3)break;else _0x435d04['push'](_0x435d04['shift']());}catch(_0x39626d){_0x435d04['push'](_0x435d04['shift']());}}}(a0_0xaf32,0x87860));import{spawn}from'child_process';function a0_0x4bc5(_0xe09dc7,_0x5b2824){_0xe09dc7=_0xe09dc7-0x13c;const _0xaf3273=a0_0xaf32();let _0x4bc537=_0xaf3273[_0xe09dc7];return _0x4bc537;}function a0_0xaf32(){const _0x35b572=['153RulStR','kill','message','bin','exit','153559GLmgWO','ExperimentalWarning','Failed\x20to\x20start\x20Terminal\x20UI:','PORT','🚀\x20Starting\x20Loxia\x20server...','8mTakOi','loxia-terminal.js','SIGTERM','1853608yYelFo','1251670wAlMCv','Failed\x20to\x20start\x20server:','setTimeout','statusCode','src','killed','\x0a⚠️\x20\x20Received\x20SIGTERM,\x20shutting\x20down...','5649042GXMYox','pipe','║\x20\x20\x20Loxia\x20AI\x20Agents\x20-\x20Server\x20+\x20Terminal\x20UI\x20\x20\x20\x20\x20\x20║','240780pAQFZc','5RKyeBE','stderr','log','destroy','error','env','http://localhost:','/health','1627296QmIFGk','Timeout','✅\x20Server\x20is\x20ready!','node','toString','Error\x20during\x20startup:','trim','562417eYgWgM','inherit','data','get','Server\x20returned\x20'];a0_0xaf32=function(){return _0x35b572;};return a0_0xaf32();}import{fileURLToPath}from'url';import{dirname,join}from'path';import a0_0xc8d96 from'http';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename),rootDir=join(__dirname,'..'),SERVER_PORT=process[a0_0xc4add4(0x14f)][a0_0xc4add4(0x166)]||0x1f90,STARTUP_WAIT=0x7d0;let serverProcess=null;async function checkServerReady(_0x23d54b=0xa,_0x122d80=0x1f4){const _0x2df69f=a0_0xc4add4;for(let _0x552413=0x0;_0x552413<_0x23d54b;_0x552413++){try{return await new Promise((_0x51854a,_0xa2402c)=>{const _0x428fbc=a0_0x4bc5,_0x5c627c=a0_0xc8d96[_0x428fbc(0x15c)](_0x428fbc(0x150)+SERVER_PORT+_0x428fbc(0x151),_0x1ee69d=>{const _0x836177=_0x428fbc;_0x1ee69d[_0x836177(0x142)]===0xc8?_0x51854a():_0xa2402c(new Error(_0x836177(0x15d)+_0x1ee69d[_0x836177(0x142)]));});_0x5c627c['on'](_0x428fbc(0x14e),_0xa2402c),_0x5c627c[_0x428fbc(0x141)](0x3e8,()=>{const _0x52378f=_0x428fbc;_0x5c627c[_0x52378f(0x14d)](),_0xa2402c(new Error(_0x52378f(0x153)));});}),console['log'](_0x2df69f(0x154)),!![];}catch(_0x4d7405){_0x552413<_0x23d54b-0x1&&await new Promise(_0x2d8d5c=>setTimeout(_0x2d8d5c,_0x122d80));}}return console[_0x2df69f(0x14c)]('⚠️\x20\x20Server\x20may\x20not\x20be\x20fully\x20ready,\x20but\x20continuing\x20anyway...'),![];}async function startServer(){return new Promise(_0x40268e=>{const _0x17916b=a0_0x4bc5;console[_0x17916b(0x14c)](_0x17916b(0x167));const _0x5eb723=join(rootDir,_0x17916b(0x143),'index.js');serverProcess=spawn('node',[_0x5eb723],{'cwd':rootDir,'env':{...process['env']},'stdio':['ignore',_0x17916b(0x147),'pipe'],'detached':![]}),serverProcess['stdout']['on'](_0x17916b(0x15b),_0x4d6f3f=>{const _0x121519=_0x17916b,_0xec991b=_0x4d6f3f[_0x121519(0x156)]()[_0x121519(0x158)]();_0xec991b&&console[_0x121519(0x14c)]('[SERVER]\x20'+_0xec991b);}),serverProcess[_0x17916b(0x14b)]['on'](_0x17916b(0x15b),_0x36c3af=>{const _0x192275=_0x17916b,_0x36405e=_0x36c3af[_0x192275(0x156)]()[_0x192275(0x158)]();_0x36405e&&!_0x36405e['includes'](_0x192275(0x164))&&console[_0x192275(0x14e)]('[SERVER\x20ERROR]\x20'+_0x36405e);}),serverProcess['on'](_0x17916b(0x14e),_0x566bd3=>{const _0x697b92=_0x17916b;console[_0x697b92(0x14e)](_0x697b92(0x140),_0x566bd3[_0x697b92(0x160)]),process[_0x697b92(0x162)](0x1);}),serverProcess['on'](_0x17916b(0x162),(_0x51eca3,_0x118a12)=>{_0x51eca3!==null&&_0x51eca3!==0x0&&(console['error']('Server\x20exited\x20with\x20code\x20'+_0x51eca3),process['exit'](_0x51eca3));}),setTimeout(_0x40268e,STARTUP_WAIT);});}async function startTerminalUI(){const _0x108939=a0_0xc4add4;console[_0x108939(0x14c)]('🖥️\x20\x20Starting\x20Terminal\x20UI...'),console[_0x108939(0x14c)]('');const _0x2a7f24=join(rootDir,_0x108939(0x161),_0x108939(0x13c)),_0xe3d090=spawn(_0x108939(0x155),[_0x2a7f24],{'cwd':rootDir,'env':{...process['env']},'stdio':_0x108939(0x15a)});return _0xe3d090['on'](_0x108939(0x14e),_0x48f632=>{const _0x1b734b=_0x108939;console[_0x1b734b(0x14e)](_0x1b734b(0x165),_0x48f632[_0x1b734b(0x160)]),cleanup(),process[_0x1b734b(0x162)](0x1);}),_0xe3d090['on'](_0x108939(0x162),_0xbc9e14=>{const _0xd6db03=_0x108939;console[_0xd6db03(0x14c)]('\x0a👋\x20Terminal\x20UI\x20closed.'),cleanup(),process[_0xd6db03(0x162)](_0xbc9e14||0x0);}),_0xe3d090;}function cleanup(){const _0x31c01d=a0_0xc4add4;serverProcess&&!serverProcess[_0x31c01d(0x144)]&&(console[_0x31c01d(0x14c)]('🛑\x20Stopping\x20server...'),serverProcess[_0x31c01d(0x15f)](_0x31c01d(0x13d)),setTimeout(()=>{const _0x3d380d=_0x31c01d;!serverProcess[_0x3d380d(0x144)]&&serverProcess['kill']('SIGKILL');},0x1388));}process['on']('SIGINT',()=>{const _0x479215=a0_0xc4add4;console[_0x479215(0x14c)]('\x0a⚠️\x20\x20Received\x20SIGINT,\x20shutting\x20down...'),cleanup(),process[_0x479215(0x162)](0x0);}),process['on'](a0_0xc4add4(0x13d),()=>{const _0x9bd1cb=a0_0xc4add4;console[_0x9bd1cb(0x14c)](_0x9bd1cb(0x145)),cleanup(),process[_0x9bd1cb(0x162)](0x0);}),process['on']('exit',()=>{cleanup();});async function main(){const _0x5c1bdf=a0_0xc4add4;console['log']('╔════════════════════════════════════════════════╗'),console[_0x5c1bdf(0x14c)](_0x5c1bdf(0x148)),console[_0x5c1bdf(0x14c)]('╚════════════════════════════════════════════════╝'),console['log']('');try{await startServer(),await checkServerReady(),await startTerminalUI(),await new Promise(()=>{});}catch(_0x9638f2){console[_0x5c1bdf(0x14e)](_0x5c1bdf(0x157),_0x9638f2['message']),cleanup(),process[_0x5c1bdf(0x162)](0x1);}}main();
3
+ function a0_0x1d7a(){const _0x189bcc=['destroy','SIGTERM','exit','🖥️\x20\x20Starting\x20Terminal\x20UI...','trim','stderr','229145DwqaKT','457517RBLjra','24pmQIaH','index.js','\x0a⚠️\x20\x20Received\x20SIGINT,\x20shutting\x20down...','2348758BPoGKd','🚀\x20Starting\x20Loxia\x20server...','setTimeout','kill','\x0a👋\x20Terminal\x20UI\x20closed.','data','pipe','bin','env','error','🛑\x20Stopping\x20server...','src','includes','inherit','7611608QZJmij','✅\x20Server\x20is\x20ready!','[SERVER\x20ERROR]\x20','toString','╔════════════════════════════════════════════════╗','Failed\x20to\x20start\x20Terminal\x20UI:','║\x20\x20\x20Loxia\x20AI\x20Agents\x20-\x20Server\x20+\x20Terminal\x20UI\x20\x20\x20\x20\x20\x20║','Server\x20exited\x20with\x20code\x20','Error\x20during\x20startup:','283199ZHOsuL','4555476uImJAc','log','statusCode','node','message','killed','get','/health','loxia-terminal.js','stdout','79530CLpUWI','Failed\x20to\x20start\x20server:'];a0_0x1d7a=function(){return _0x189bcc;};return a0_0x1d7a();}const a0_0x110849=a0_0x4477;(function(_0x51771e,_0x3361f6){const _0x554cbe=a0_0x4477,_0x3685db=_0x51771e();while(!![]){try{const _0xaaddc3=-parseInt(_0x554cbe(0xef))/0x1+parseInt(_0x554cbe(0xf3))/0x2+-parseInt(_0x554cbe(0xe6))/0x3+parseInt(_0x554cbe(0xf0))/0x4*(-parseInt(_0x554cbe(0xee))/0x5)+-parseInt(_0x554cbe(0x10b))/0x6+parseInt(_0x554cbe(0x10a))/0x7+parseInt(_0x554cbe(0x101))/0x8;if(_0xaaddc3===_0x3361f6)break;else _0x3685db['push'](_0x3685db['shift']());}catch(_0x398342){_0x3685db['push'](_0x3685db['shift']());}}}(a0_0x1d7a,0x9e368));import{spawn}from'child_process';import{fileURLToPath}from'url';import{dirname,join}from'path';import a0_0x41c7d4 from'http';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename),rootDir=join(__dirname,'..'),SERVER_PORT=process[a0_0x110849(0xfb)]['PORT']||0x1f90,STARTUP_WAIT=0x7d0;let serverProcess=null;async function checkServerReady(_0x23e74e=0xa,_0x3880cf=0x1f4){const _0x14f262=a0_0x110849;for(let _0xb80f5b=0x0;_0xb80f5b<_0x23e74e;_0xb80f5b++){try{return await new Promise((_0x148a88,_0x30f63c)=>{const _0x4d000e=a0_0x4477,_0x530c99=a0_0x41c7d4[_0x4d000e(0xe2)]('http://localhost:'+SERVER_PORT+_0x4d000e(0xe3),_0x3140ef=>{const _0x2c57f2=_0x4d000e;_0x3140ef[_0x2c57f2(0x10d)]===0xc8?_0x148a88():_0x30f63c(new Error('Server\x20returned\x20'+_0x3140ef[_0x2c57f2(0x10d)]));});_0x530c99['on'](_0x4d000e(0xfc),_0x30f63c),_0x530c99[_0x4d000e(0xf5)](0x3e8,()=>{const _0x35fa12=_0x4d000e;_0x530c99[_0x35fa12(0xe8)](),_0x30f63c(new Error('Timeout'));});}),console[_0x14f262(0x10c)](_0x14f262(0x102)),!![];}catch(_0x378825){_0xb80f5b<_0x23e74e-0x1&&await new Promise(_0x349f1a=>setTimeout(_0x349f1a,_0x3880cf));}}return console['log']('⚠️\x20\x20Server\x20may\x20not\x20be\x20fully\x20ready,\x20but\x20continuing\x20anyway...'),![];}async function startServer(){return new Promise(_0x40b1b9=>{const _0xbb1112=a0_0x4477;console['log'](_0xbb1112(0xf4));const _0x206d14=join(rootDir,_0xbb1112(0xfe),_0xbb1112(0xf1));serverProcess=spawn(_0xbb1112(0x10e),[_0x206d14],{'cwd':rootDir,'env':{...process[_0xbb1112(0xfb)]},'stdio':['ignore',_0xbb1112(0xf9),_0xbb1112(0xf9)],'detached':![]}),serverProcess[_0xbb1112(0xe5)]['on'](_0xbb1112(0xf8),_0x53b29a=>{const _0x56d779=_0xbb1112,_0x13bc7e=_0x53b29a['toString']()['trim']();_0x13bc7e&&console[_0x56d779(0x10c)]('[SERVER]\x20'+_0x13bc7e);}),serverProcess[_0xbb1112(0xed)]['on'](_0xbb1112(0xf8),_0x469e0f=>{const _0x592353=_0xbb1112,_0x2918a9=_0x469e0f[_0x592353(0x104)]()[_0x592353(0xec)]();_0x2918a9&&!_0x2918a9[_0x592353(0xff)]('ExperimentalWarning')&&console[_0x592353(0xfc)](_0x592353(0x103)+_0x2918a9);}),serverProcess['on']('error',_0x4facc5=>{const _0x1abbe5=_0xbb1112;console[_0x1abbe5(0xfc)](_0x1abbe5(0xe7),_0x4facc5[_0x1abbe5(0x10f)]),process[_0x1abbe5(0xea)](0x1);}),serverProcess['on'](_0xbb1112(0xea),(_0x485354,_0x4ecb4b)=>{const _0x237b5a=_0xbb1112;_0x485354!==null&&_0x485354!==0x0&&(console[_0x237b5a(0xfc)](_0x237b5a(0x108)+_0x485354),process[_0x237b5a(0xea)](_0x485354));}),setTimeout(_0x40b1b9,STARTUP_WAIT);});}function a0_0x4477(_0x5b7f03,_0x525123){_0x5b7f03=_0x5b7f03-0xe2;const _0x1d7a2a=a0_0x1d7a();let _0x447707=_0x1d7a2a[_0x5b7f03];return _0x447707;}async function startTerminalUI(){const _0x3380f6=a0_0x110849;console[_0x3380f6(0x10c)](_0x3380f6(0xeb)),console[_0x3380f6(0x10c)]('');const _0x5d00eb=join(rootDir,_0x3380f6(0xfa),_0x3380f6(0xe4)),_0x24a3df=spawn(_0x3380f6(0x10e),[_0x5d00eb],{'cwd':rootDir,'env':{...process['env']},'stdio':_0x3380f6(0x100)});return _0x24a3df['on'](_0x3380f6(0xfc),_0x48fd87=>{const _0x19e4c9=_0x3380f6;console[_0x19e4c9(0xfc)](_0x19e4c9(0x106),_0x48fd87[_0x19e4c9(0x10f)]),cleanup(),process['exit'](0x1);}),_0x24a3df['on']('exit',_0x243965=>{const _0x1e11e1=_0x3380f6;console[_0x1e11e1(0x10c)](_0x1e11e1(0xf7)),cleanup(),process[_0x1e11e1(0xea)](_0x243965||0x0);}),_0x24a3df;}function cleanup(){const _0x3e00a8=a0_0x110849;serverProcess&&!serverProcess[_0x3e00a8(0x110)]&&(console[_0x3e00a8(0x10c)](_0x3e00a8(0xfd)),serverProcess[_0x3e00a8(0xf6)]('SIGTERM'),setTimeout(()=>{const _0x25beb4=_0x3e00a8;!serverProcess[_0x25beb4(0x110)]&&serverProcess['kill']('SIGKILL');},0x1388));}process['on']('SIGINT',()=>{const _0x5da8c5=a0_0x110849;console[_0x5da8c5(0x10c)](_0x5da8c5(0xf2)),cleanup(),process['exit'](0x0);}),process['on'](a0_0x110849(0xe9),()=>{const _0x5ce051=a0_0x110849;console[_0x5ce051(0x10c)]('\x0a⚠️\x20\x20Received\x20SIGTERM,\x20shutting\x20down...'),cleanup(),process['exit'](0x0);}),process['on'](a0_0x110849(0xea),()=>{cleanup();});async function main(){const _0x94083a=a0_0x110849;console['log'](_0x94083a(0x105)),console[_0x94083a(0x10c)](_0x94083a(0x107)),console['log']('╚════════════════════════════════════════════════╝'),console[_0x94083a(0x10c)]('');try{await startServer(),await checkServerReady(),await startTerminalUI(),await new Promise(()=>{});}catch(_0x5eb9d1){console['error'](_0x94083a(0x109),_0x5eb9d1['message']),cleanup(),process[_0x94083a(0xea)](0x1);}}main();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@loxia-labs/loxia-autopilot-one",
3
- "version": "1.0.9",
3
+ "version": "1.0.11",
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
- function a0_0x26c1(){const _0x4a8c5b=['pipe','semgrep','arch','\x20\x20\x20✅\x20Python\x20found:\x20','\x20\x20\x20Semgrep\x20not\x20found\x20in\x20PATH,\x20installing\x20standalone\x20binary...','semgrep\x20--version','6253326poQELO','\x20\x20\x20pip\x20install\x20semgrep\x0a','\x20\x20\x20You\x20can\x20install\x20manually:\x20pip\x20install\x20','https','promises','8270090AIbwhp','python3','log','907692kLYkOA','37458irvakA','📦\x20Checking\x20ESLint\x20Security\x20Plugin...','\x20\x20\x20✅\x20eslint-plugin-security\x20is\x20installed\x0a','\x20\x20\x20✅\x20Semgrep\x20already\x20installed:\x20','\x0aYou\x20can\x20manually\x20install\x20scanners:','\x20-m\x20pip\x20show\x20','python','🐍\x20Checking\x20Python\x20scanners...','...','exit','platform','join','═══════════════════════════════════════════════════════════','checkov','\x20installed\x20successfully','\x0a═══════════════════════════════════════════════════════════','\x20\x20\x20To\x20enable\x20Python\x20scanning,\x20install\x20Python\x20and\x20run:','\x20\x20\x20⚠️\x20\x20No\x20Semgrep\x20binary\x20available\x20for\x20','catch','\x20\x20pip\x20install\x20semgrep\x20bandit\x20pip-audit','\x20\x20\x20⚠️\x20\x20Failed\x20to\x20install\x20Semgrep:\x20','242XcNjCH','═══════════════════════════════════════════════════════════\x0a','🔍\x20Installing\x20Semgrep...','\x20\x20\x20Installing\x20','python3\x20--version','\x20\x20\x20✅\x20','mkdir','2104PJmzoU','stdout','\x20\x20\x20Please\x20install\x20manually:\x20https://semgrep.dev/docs/getting-started/\x0a','Failed\x20to\x20download:\x20HTTP\x20','9NdjyrA','close','7WtxApK','error','then','yamllint','\x20\x20Installing\x20Security\x20Scanners','357400tCzoox','dirname','url','bandit','node_modules','.scanners','get','eslint-plugin-security','\x20\x20Installation\x20Complete','\x20\x20\x20Downloading\x20from\x20','\x20\x20\x20Note:\x20To\x20use\x20system-wide,\x20add\x20to\x20PATH\x20or\x20install\x20globally:','626755CnSNEy','❌\x20Installation\x20failed:','trim','76YiAJSQ','statusCode','startsWith','\x20\x20\x20Using\x20system-installed\x20Semgrep\x0a','270654mqkQEO','\x20-m\x20pip\x20install\x20--user\x20','message','\x20\x20\x20⚠️\x20\x20Python\x20not\x20found\x20-\x20skipping\x20Python\x20scanners','\x20\x20\x20Run:\x20npm\x20install\x20--save-dev\x20eslint-plugin-security\x0a','\x20already\x20installed'];a0_0x26c1=function(){return _0x4a8c5b;};return a0_0x26c1();}const a0_0x315ea8=a0_0x36e4;(function(_0x4853b4,_0xdb5440){const _0x37b457=a0_0x36e4,_0x489209=_0x4853b4();while(!![]){try{const _0x5a5274=parseInt(_0x37b457(0x238))/0x1+parseInt(_0x37b457(0x1f1))/0x2*(-parseInt(_0x37b457(0x226))/0x3)+-parseInt(_0x37b457(0x23b))/0x4*(-parseInt(_0x37b457(0x22d))/0x5)+parseInt(_0x37b457(0x1fd))/0x6*(parseInt(_0x37b457(0x228))/0x7)+parseInt(_0x37b457(0x222))/0x8*(-parseInt(_0x37b457(0x206))/0x9)+parseInt(_0x37b457(0x202))/0xa+parseInt(_0x37b457(0x21b))/0xb*(-parseInt(_0x37b457(0x205))/0xc);if(_0x5a5274===_0xdb5440)break;else _0x489209['push'](_0x489209['shift']());}catch(_0x3f3598){_0x489209['push'](_0x489209['shift']());}}}(a0_0x26c1,0xa8508));import{exec}from'child_process';import{promisify}from'util';import a0_0x8ffd5d from'https';import a0_0x6979db from'http';import a0_0x4a5341 from'fs';import a0_0x55fe1e from'path';import{fileURLToPath}from'url';import{createWriteStream}from'fs';import{pipeline}from'stream/promises';const execAsync=promisify(exec),__filename=fileURLToPath(import.meta.url),__dirname=a0_0x55fe1e[a0_0x315ea8(0x22e)](__filename),SCANNER_DIR=a0_0x55fe1e[a0_0x315ea8(0x211)](__dirname,'..',a0_0x315ea8(0x231),a0_0x315ea8(0x232)),SEMGREP_VERSION='v1.55.0';console[a0_0x315ea8(0x204)](a0_0x315ea8(0x212)),console['log'](a0_0x315ea8(0x22c)),console['log'](a0_0x315ea8(0x21c));async function installScanners(){const _0x5d55ee=a0_0x315ea8;await a0_0x4a5341['promises'][_0x5d55ee(0x221)](SCANNER_DIR,{'recursive':!![]}),await checkESLintSecurity(),await installSemgrep(),await installPythonScanners(),console[_0x5d55ee(0x204)](_0x5d55ee(0x215)),console['log'](_0x5d55ee(0x235)),console[_0x5d55ee(0x204)](_0x5d55ee(0x21c));}async function checkESLintSecurity(){const _0x124426=a0_0x315ea8;console[_0x124426(0x204)](_0x124426(0x207));try{await import(_0x124426(0x234)),console[_0x124426(0x204)](_0x124426(0x208));}catch(_0x41211d){console[_0x124426(0x204)]('\x20\x20\x20⚠️\x20\x20eslint-plugin-security\x20not\x20found'),console[_0x124426(0x204)](_0x124426(0x1f5));}}async function installSemgrep(){const _0x15a234=a0_0x315ea8;console[_0x15a234(0x204)](_0x15a234(0x21d));const _0x6f4215=process[_0x15a234(0x210)],_0x116359=process[_0x15a234(0x1f9)];try{const _0x317212=await execAsync(_0x15a234(0x1fc),{'timeout':0x1388});console['log'](_0x15a234(0x209)+_0x317212[_0x15a234(0x223)][_0x15a234(0x23a)]()),console[_0x15a234(0x204)](_0x15a234(0x1f0));return;}catch(_0x255feb){console['log'](_0x15a234(0x1fb));}const _0x51da98=getSemgrepBinaryInfo(_0x6f4215,_0x116359);if(!_0x51da98){console[_0x15a234(0x204)](_0x15a234(0x217)+_0x6f4215+'-'+_0x116359),console[_0x15a234(0x204)](_0x15a234(0x224));return;}try{const _0x4e8557=a0_0x55fe1e[_0x15a234(0x211)](SCANNER_DIR,_0x15a234(0x1f8));console[_0x15a234(0x204)](_0x15a234(0x236)+_0x51da98[_0x15a234(0x22f)]+_0x15a234(0x20e)),await downloadFile(_0x51da98[_0x15a234(0x22f)],_0x4e8557),await a0_0x4a5341[_0x15a234(0x201)]['chmod'](_0x4e8557,0x1ed),console[_0x15a234(0x204)]('\x20\x20\x20✅\x20Semgrep\x20installed\x20successfully'),console[_0x15a234(0x204)]('\x20\x20\x20Location:\x20'+_0x4e8557+'\x0a'),console['log'](_0x15a234(0x237)),console[_0x15a234(0x204)](_0x15a234(0x1fe));}catch(_0x18e91b){console[_0x15a234(0x204)](_0x15a234(0x21a)+_0x18e91b[_0x15a234(0x1f3)]),console[_0x15a234(0x204)]('\x20\x20\x20You\x20can\x20install\x20manually:\x20pip\x20install\x20semgrep\x0a');}}function getSemgrepBinaryInfo(_0x12866,_0x3fd507){return null;}async function installPythonScanners(){const _0x529d63=a0_0x315ea8;console['log'](_0x529d63(0x20d));let _0x5ddd44=null;try{await execAsync(_0x529d63(0x21f),{'timeout':0x1388}),_0x5ddd44=_0x529d63(0x203);}catch(_0x84cea0){try{await execAsync('python\x20--version',{'timeout':0x1388}),_0x5ddd44=_0x529d63(0x20c);}catch(_0x2669f5){console[_0x529d63(0x204)](_0x529d63(0x1f4)),console[_0x529d63(0x204)](_0x529d63(0x216)),console['log']('\x20\x20\x20pip\x20install\x20semgrep\x20bandit\x20pip-audit\x20checkov\x20yamllint\x0a');return;}}console[_0x529d63(0x204)](_0x529d63(0x1fa)+_0x5ddd44),await installViaPip('semgrep',_0x5ddd44),await installViaPip(_0x529d63(0x230),_0x5ddd44),await installViaPip('pip-audit',_0x5ddd44),await installViaPip(_0x529d63(0x213),_0x5ddd44),await installViaPip(_0x529d63(0x22b),_0x5ddd44),console[_0x529d63(0x204)]('');}function a0_0x36e4(_0x349c53,_0x48dbd2){_0x349c53=_0x349c53-0x1f0;const _0x26c18f=a0_0x26c1();let _0x36e49b=_0x26c18f[_0x349c53];return _0x36e49b;}async function installViaPip(_0x1ff293,_0x3ac438){const _0x19074e=a0_0x315ea8;try{const _0x5f0f29=await execAsync(_0x3ac438+_0x19074e(0x20b)+_0x1ff293,{'timeout':0x1388});return console['log'](_0x19074e(0x220)+_0x1ff293+_0x19074e(0x1f6)),!![];}catch(_0x27ff6e){console[_0x19074e(0x204)](_0x19074e(0x21e)+_0x1ff293+_0x19074e(0x20e));try{return await execAsync(_0x3ac438+_0x19074e(0x1f2)+_0x1ff293,{'timeout':0xea60}),console[_0x19074e(0x204)](_0x19074e(0x220)+_0x1ff293+_0x19074e(0x214)),!![];}catch(_0x448500){return console[_0x19074e(0x204)]('\x20\x20\x20⚠️\x20\x20Failed\x20to\x20install\x20'+_0x1ff293+':\x20'+_0x448500[_0x19074e(0x1f3)]),console[_0x19074e(0x204)](_0x19074e(0x1ff)+_0x1ff293),![];}}}async function downloadFile(_0x530321,_0x3575e9){return new Promise((_0x1b4a85,_0x44a2cf)=>{const _0x36d8ab=a0_0x36e4,_0x586157=_0x530321[_0x36d8ab(0x23d)](_0x36d8ab(0x200))?a0_0x8ffd5d:a0_0x6979db;_0x586157[_0x36d8ab(0x233)](_0x530321,_0x542019=>{const _0x35b5ef=_0x36d8ab;if(_0x542019[_0x35b5ef(0x23c)]===0x12e||_0x542019[_0x35b5ef(0x23c)]===0x12d){downloadFile(_0x542019['headers']['location'],_0x3575e9)[_0x35b5ef(0x22a)](_0x1b4a85)[_0x35b5ef(0x218)](_0x44a2cf);return;}if(_0x542019[_0x35b5ef(0x23c)]!==0xc8){_0x44a2cf(new Error(_0x35b5ef(0x225)+_0x542019['statusCode']));return;}const _0xc0abc5=createWriteStream(_0x3575e9);_0x542019[_0x35b5ef(0x1f7)](_0xc0abc5),_0xc0abc5['on']('finish',()=>{const _0x42d48e=_0x35b5ef;_0xc0abc5[_0x42d48e(0x227)](),_0x1b4a85();}),_0xc0abc5['on'](_0x35b5ef(0x229),_0x1dc388=>{a0_0x4a5341['unlink'](_0x3575e9,()=>{}),_0x44a2cf(_0x1dc388);});})['on'](_0x36d8ab(0x229),_0x44a2cf);});}installScanners()[a0_0x315ea8(0x218)](_0x1ea214=>{const _0x18bf0f=a0_0x315ea8;console[_0x18bf0f(0x229)](_0x18bf0f(0x239),_0x1ea214[_0x18bf0f(0x1f3)]),console[_0x18bf0f(0x229)](_0x18bf0f(0x20a)),console[_0x18bf0f(0x229)]('\x20\x20npm\x20install\x20--save-dev\x20eslint-plugin-security'),console['error'](_0x18bf0f(0x219)),process[_0x18bf0f(0x20f)](0x0);});
2
+ const a0_0xb8fada=a0_0x1d51;(function(_0x574061,_0x1adf98){const _0x446a95=a0_0x1d51,_0x37c1ec=_0x574061();while(!![]){try{const _0x3ffa19=parseInt(_0x446a95(0x126))/0x1*(-parseInt(_0x446a95(0x111))/0x2)+parseInt(_0x446a95(0xff))/0x3*(parseInt(_0x446a95(0x114))/0x4)+parseInt(_0x446a95(0x11a))/0x5*(parseInt(_0x446a95(0x12c))/0x6)+parseInt(_0x446a95(0xec))/0x7*(-parseInt(_0x446a95(0xfb))/0x8)+parseInt(_0x446a95(0x109))/0x9+-parseInt(_0x446a95(0xed))/0xa*(parseInt(_0x446a95(0xfe))/0xb)+parseInt(_0x446a95(0xf5))/0xc*(parseInt(_0x446a95(0xf1))/0xd);if(_0x3ffa19===_0x1adf98)break;else _0x37c1ec['push'](_0x37c1ec['shift']());}catch(_0x4576d2){_0x37c1ec['push'](_0x37c1ec['shift']());}}}(a0_0x47b7,0x6ebfa));import{exec}from'child_process';import{promisify}from'util';import a0_0x49c047 from'https';import a0_0xe2e62e from'http';import a0_0x28a62c from'fs';import a0_0x22d47c from'path';import{fileURLToPath}from'url';import{createWriteStream}from'fs';import{pipeline}from'stream/promises';function a0_0x47b7(){const _0x352aea=['error','\x20\x20\x20✅\x20','12MWzift','\x0aYou\x20can\x20manually\x20install\x20scanners:','exit','\x20\x20\x20⚠️\x20\x20Python\x20not\x20found\x20-\x20skipping\x20Python\x20scanners','\x20\x20\x20✅\x20eslint-plugin-security\x20is\x20installed\x0a','log','\x20\x20\x20✅\x20Python\x20found:\x20','\x20\x20npm\x20install\x20--save-dev\x20eslint-plugin-security','chmod','📦\x20Checking\x20ESLint\x20Security\x20Plugin...','🐍\x20Checking\x20Python\x20scanners...','arch','\x20\x20\x20⚠️\x20\x20Failed\x20to\x20install\x20','platform','bandit','message','trim','7CishUn','293510djbJnz','yamllint','\x20\x20\x20Downloading\x20from\x20','https','13fdcrzU','eslint-plugin-security','python3\x20--version','headers','106944QMBJVu','═══════════════════════════════════════════════════════════','semgrep\x20--version','statusCode','\x20\x20\x20pip\x20install\x20semgrep\x0a','\x20\x20\x20Run:\x20npm\x20install\x20--save-dev\x20eslint-plugin-security\x0a','3845992DZlpEN','promises','\x20\x20\x20You\x20can\x20install\x20manually:\x20pip\x20install\x20','33RevZsz','138GHAUOL','\x20\x20\x20⚠️\x20\x20Failed\x20to\x20install\x20Semgrep:\x20','startsWith','node_modules','🔍\x20Installing\x20Semgrep...','pipe','\x20\x20\x20You\x20can\x20install\x20manually:\x20pip\x20install\x20semgrep\x0a','\x20\x20\x20⚠️\x20\x20eslint-plugin-security\x20not\x20found','\x20\x20\x20Please\x20install\x20manually:\x20https://semgrep.dev/docs/getting-started/\x0a','python','1329192EqbrNo','❌\x20Installation\x20failed:','Failed\x20to\x20download:\x20HTTP\x20','\x20\x20Installation\x20Complete','join','\x20\x20\x20Note:\x20To\x20use\x20system-wide,\x20add\x20to\x20PATH\x20or\x20install\x20globally:','dirname','catch','2412EstXSC','mkdir','...','32216KbRLKd','python3','\x20-m\x20pip\x20install\x20--user\x20','\x20\x20\x20✅\x20Semgrep\x20already\x20installed:\x20','stdout','location','1398155iUdwmd','\x20\x20pip\x20install\x20semgrep\x20bandit\x20pip-audit','\x20-m\x20pip\x20show\x20','\x20\x20\x20pip\x20install\x20semgrep\x20bandit\x20pip-audit\x20checkov\x20yamllint\x0a','\x20\x20\x20Semgrep\x20not\x20found\x20in\x20PATH,\x20installing\x20standalone\x20binary...','\x20\x20\x20Installing\x20','v1.55.0','pip-audit','url','\x20\x20\x20Location:\x20','semgrep','unlink','53zEeAIj','\x20\x20\x20Using\x20system-installed\x20Semgrep\x0a','═══════════════════════════════════════════════════════════\x0a','\x20\x20Installing\x20Security\x20Scanners'];a0_0x47b7=function(){return _0x352aea;};return a0_0x47b7();}const execAsync=promisify(exec),__filename=fileURLToPath(import.meta.url),__dirname=a0_0x22d47c[a0_0xb8fada(0x10f)](__filename),SCANNER_DIR=a0_0x22d47c[a0_0xb8fada(0x10d)](__dirname,'..',a0_0xb8fada(0x102),'.scanners'),SEMGREP_VERSION=a0_0xb8fada(0x120);console['log'](a0_0xb8fada(0xf6)),console['log'](a0_0xb8fada(0x129)),console[a0_0xb8fada(0xe0)](a0_0xb8fada(0x128));async function installScanners(){const _0x1b8933=a0_0xb8fada;await a0_0x28a62c[_0x1b8933(0xfc)][_0x1b8933(0x112)](SCANNER_DIR,{'recursive':!![]}),await checkESLintSecurity(),await installSemgrep(),await installPythonScanners(),console[_0x1b8933(0xe0)]('\x0a═══════════════════════════════════════════════════════════'),console['log'](_0x1b8933(0x10c)),console[_0x1b8933(0xe0)](_0x1b8933(0x128));}function a0_0x1d51(_0x38d02e,_0x2740c6){_0x38d02e=_0x38d02e-0xdf;const _0x47b79d=a0_0x47b7();let _0x1d51ea=_0x47b79d[_0x38d02e];return _0x1d51ea;}async function checkESLintSecurity(){const _0x3f901e=a0_0xb8fada;console[_0x3f901e(0xe0)](_0x3f901e(0xe4));try{await import(_0x3f901e(0xf2)),console[_0x3f901e(0xe0)](_0x3f901e(0xdf));}catch(_0x4e120e){console['log'](_0x3f901e(0x106)),console[_0x3f901e(0xe0)](_0x3f901e(0xfa));}}async function installSemgrep(){const _0x23c78e=a0_0xb8fada;console['log'](_0x23c78e(0x103));const _0xf83ef4=process[_0x23c78e(0xe8)],_0x202101=process[_0x23c78e(0xe6)];try{const _0x5d800a=await execAsync(_0x23c78e(0xf7),{'timeout':0x1388});console[_0x23c78e(0xe0)](_0x23c78e(0x117)+_0x5d800a[_0x23c78e(0x118)][_0x23c78e(0xeb)]()),console['log'](_0x23c78e(0x127));return;}catch(_0x5abba5){console[_0x23c78e(0xe0)](_0x23c78e(0x11e));}const _0x2f746b=getSemgrepBinaryInfo(_0xf83ef4,_0x202101);if(!_0x2f746b){console['log']('\x20\x20\x20⚠️\x20\x20No\x20Semgrep\x20binary\x20available\x20for\x20'+_0xf83ef4+'-'+_0x202101),console[_0x23c78e(0xe0)](_0x23c78e(0x107));return;}try{const _0x3af34b=a0_0x22d47c[_0x23c78e(0x10d)](SCANNER_DIR,_0x23c78e(0x124));console[_0x23c78e(0xe0)](_0x23c78e(0xef)+_0x2f746b[_0x23c78e(0x122)]+_0x23c78e(0x113)),await downloadFile(_0x2f746b[_0x23c78e(0x122)],_0x3af34b),await a0_0x28a62c[_0x23c78e(0xfc)][_0x23c78e(0xe3)](_0x3af34b,0x1ed),console[_0x23c78e(0xe0)]('\x20\x20\x20✅\x20Semgrep\x20installed\x20successfully'),console[_0x23c78e(0xe0)](_0x23c78e(0x123)+_0x3af34b+'\x0a'),console[_0x23c78e(0xe0)](_0x23c78e(0x10e)),console['log'](_0x23c78e(0xf9));}catch(_0x12ec93){console[_0x23c78e(0xe0)](_0x23c78e(0x100)+_0x12ec93[_0x23c78e(0xea)]),console[_0x23c78e(0xe0)](_0x23c78e(0x105));}}function getSemgrepBinaryInfo(_0x1007d4,_0x5ef846){return null;}async function installPythonScanners(){const _0xf55292=a0_0xb8fada;console[_0xf55292(0xe0)](_0xf55292(0xe5));let _0x1c6b11=null;try{await execAsync(_0xf55292(0xf3),{'timeout':0x1388}),_0x1c6b11=_0xf55292(0x115);}catch(_0x55209b){try{await execAsync('python\x20--version',{'timeout':0x1388}),_0x1c6b11=_0xf55292(0x108);}catch(_0x2db472){console[_0xf55292(0xe0)](_0xf55292(0x12f)),console[_0xf55292(0xe0)]('\x20\x20\x20To\x20enable\x20Python\x20scanning,\x20install\x20Python\x20and\x20run:'),console[_0xf55292(0xe0)](_0xf55292(0x11d));return;}}console[_0xf55292(0xe0)](_0xf55292(0xe1)+_0x1c6b11),await installViaPip(_0xf55292(0x124),_0x1c6b11),await installViaPip(_0xf55292(0xe9),_0x1c6b11),await installViaPip(_0xf55292(0x121),_0x1c6b11),await installViaPip('checkov',_0x1c6b11),await installViaPip(_0xf55292(0xee),_0x1c6b11),console[_0xf55292(0xe0)]('');}async function installViaPip(_0x248883,_0x27b8e0){const _0x273dc7=a0_0xb8fada;try{const _0x21ad4f=await execAsync(_0x27b8e0+_0x273dc7(0x11c)+_0x248883,{'timeout':0x1388});return console['log'](_0x273dc7(0x12b)+_0x248883+'\x20already\x20installed'),!![];}catch(_0x27d14d){console[_0x273dc7(0xe0)](_0x273dc7(0x11f)+_0x248883+'...');try{return await execAsync(_0x27b8e0+_0x273dc7(0x116)+_0x248883,{'timeout':0xea60}),console['log'](_0x273dc7(0x12b)+_0x248883+'\x20installed\x20successfully'),!![];}catch(_0x5ecdad){return console['log'](_0x273dc7(0xe7)+_0x248883+':\x20'+_0x5ecdad['message']),console[_0x273dc7(0xe0)](_0x273dc7(0xfd)+_0x248883),![];}}}async function downloadFile(_0x5f201f,_0xbecb71){return new Promise((_0x23afb0,_0x152268)=>{const _0x4d1a86=a0_0x1d51,_0xa580fc=_0x5f201f[_0x4d1a86(0x101)](_0x4d1a86(0xf0))?a0_0x49c047:a0_0xe2e62e;_0xa580fc['get'](_0x5f201f,_0xff2f68=>{const _0x5a8479=_0x4d1a86;if(_0xff2f68['statusCode']===0x12e||_0xff2f68[_0x5a8479(0xf8)]===0x12d){downloadFile(_0xff2f68[_0x5a8479(0xf4)][_0x5a8479(0x119)],_0xbecb71)['then'](_0x23afb0)[_0x5a8479(0x110)](_0x152268);return;}if(_0xff2f68[_0x5a8479(0xf8)]!==0xc8){_0x152268(new Error(_0x5a8479(0x10b)+_0xff2f68[_0x5a8479(0xf8)]));return;}const _0x10a3ba=createWriteStream(_0xbecb71);_0xff2f68[_0x5a8479(0x104)](_0x10a3ba),_0x10a3ba['on']('finish',()=>{_0x10a3ba['close'](),_0x23afb0();}),_0x10a3ba['on']('error',_0x18b40e=>{const _0x58172f=_0x5a8479;a0_0x28a62c[_0x58172f(0x125)](_0xbecb71,()=>{}),_0x152268(_0x18b40e);});})['on'](_0x4d1a86(0x12a),_0x152268);});}installScanners()['catch'](_0x2c8309=>{const _0x3192fa=a0_0xb8fada;console['error'](_0x3192fa(0x10a),_0x2c8309[_0x3192fa(0xea)]),console[_0x3192fa(0x12a)](_0x3192fa(0x12d)),console[_0x3192fa(0x12a)](_0x3192fa(0xe2)),console['error'](_0x3192fa(0x11b)),process[_0x3192fa(0x12e)](0x0);});
@@ -1 +1 @@
1
- const a0_0x1df93b=a0_0x30f1;(function(_0x2aed48,_0x325631){const _0x4759ec=a0_0x30f1,_0x222f5c=_0x2aed48();while(!![]){try{const _0x1478c9=parseInt(_0x4759ec(0x160))/0x1+-parseInt(_0x4759ec(0x179))/0x2+parseInt(_0x4759ec(0x14c))/0x3+parseInt(_0x4759ec(0x184))/0x4+parseInt(_0x4759ec(0x188))/0x5*(parseInt(_0x4759ec(0x162))/0x6)+parseInt(_0x4759ec(0x165))/0x7+parseInt(_0x4759ec(0x15e))/0x8*(-parseInt(_0x4759ec(0x14f))/0x9);if(_0x1478c9===_0x325631)break;else _0x222f5c['push'](_0x222f5c['shift']());}catch(_0x56fc40){_0x222f5c['push'](_0x222f5c['shift']());}}}(a0_0x2512,0x58700));import{STATIC_ANALYSIS}from'../utilities/constants.js';function a0_0x30f1(_0x351052,_0x2f4785){_0x351052=_0x351052-0x146;const _0x2512e1=a0_0x2512();let _0x30f11d=_0x2512e1[_0x351052];if(a0_0x30f1['vwusTg']===undefined){var _0xf04ba=function(_0x5462df){const _0xfb0241='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x307ab0='',_0x747c5f='';for(let _0x18a35d=0x0,_0x54a05f,_0x3aba07,_0x3aa59d=0x0;_0x3aba07=_0x5462df['charAt'](_0x3aa59d++);~_0x3aba07&&(_0x54a05f=_0x18a35d%0x4?_0x54a05f*0x40+_0x3aba07:_0x3aba07,_0x18a35d++%0x4)?_0x307ab0+=String['fromCharCode'](0xff&_0x54a05f>>(-0x2*_0x18a35d&0x6)):0x0){_0x3aba07=_0xfb0241['indexOf'](_0x3aba07);}for(let _0x110548=0x0,_0x3c4667=_0x307ab0['length'];_0x110548<_0x3c4667;_0x110548++){_0x747c5f+='%'+('00'+_0x307ab0['charCodeAt'](_0x110548)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x747c5f);};a0_0x30f1['gpTXDg']=_0xf04ba,a0_0x30f1['RcEmMq']={},a0_0x30f1['vwusTg']=!![];}const _0x5af0b1=_0x2512e1[0x0],_0x138702=_0x351052+_0x5af0b1,_0x42d9b8=a0_0x30f1['RcEmMq'][_0x138702];return!_0x42d9b8?(_0x30f11d=a0_0x30f1['gpTXDg'](_0x30f11d),a0_0x30f1['RcEmMq'][_0x138702]=_0x30f11d):_0x30f11d=_0x42d9b8,_0x30f11d;}class CSSAnalyzer{constructor(_0x307ab0=null){const _0x471dc9=a0_0x30f1;this['logger']=_0x307ab0,this['stylelint']=null,this[_0x471dc9(0x16c)]=null,this['postcssScss']=null,this[_0x471dc9(0x148)]=null;}async[a0_0x1df93b(0x17a)](_0x747c5f,_0x18a35d,_0x54a05f={}){const _0x3ca75f=a0_0x1df93b;try{const _0x3aba07=[],_0x3aa59d=this['detectLanguage'](_0x747c5f),_0x110548=await this['checkSyntax'](_0x747c5f,_0x18a35d,_0x3aa59d);_0x3aba07['push'](..._0x110548);if(_0x110548[_0x3ca75f(0x147)]===0x0){const _0x3c4667=await this['lintStyles'](_0x747c5f,_0x18a35d,_0x3aa59d);_0x3aba07['push'](..._0x3c4667);}return this['logger']?.['debug']('CSS\x20analysis\x20completed',{'file':_0x747c5f,'language':_0x3aa59d,'totalDiagnostics':_0x3aba07[_0x3ca75f(0x147)],'errors':_0x3aba07['filter'](_0x48293b=>_0x48293b['severity']===STATIC_ANALYSIS['SEVERITY']['ERROR'])['length'],'warnings':_0x3aba07['filter'](_0x356f11=>_0x356f11[_0x3ca75f(0x183)]===STATIC_ANALYSIS[_0x3ca75f(0x16b)][_0x3ca75f(0x172)])['length']}),_0x3aba07;}catch(_0x4b6947){return this[_0x3ca75f(0x18a)]?.['error'](_0x3ca75f(0x17c),{'file':_0x747c5f,'error':_0x4b6947[_0x3ca75f(0x180)]}),[];}}async[a0_0x1df93b(0x14d)](_0x18faf0,_0x2032b9,_0x113c2b){const _0x525641=a0_0x1df93b,_0xae0f43=[];try{if(!this['postcss']){const _0x324e2b=await import('postcss');this[_0x525641(0x16c)]=_0x324e2b[_0x525641(0x15a)];}let _0x11cf28=null;if(_0x113c2b==='scss'){if(!this[_0x525641(0x15b)]){const _0x37ecb0=await import(_0x525641(0x164));this['postcssScss']=_0x37ecb0[_0x525641(0x15a)];}_0x11cf28=this['postcssScss'];}else{if(_0x113c2b==='less'){if(!this[_0x525641(0x148)]){const _0x345bb0=await import('postcss-less');this['postcssLess']=_0x345bb0[_0x525641(0x15a)];}_0x11cf28=this['postcssLess'];}}const _0x481f96=this[_0x525641(0x16c)]()['process'](_0x2032b9,{'from':_0x18faf0,'syntax':_0x11cf28}),_0x34f546=_0x481f96[_0x525641(0x163)];this['logger']?.[_0x525641(0x18c)](_0x525641(0x14b),{'file':_0x18faf0});}catch(_0x3333e7){const _0xb38233=this[_0x525641(0x16e)](_0x3333e7,_0x18faf0);_0xb38233&&_0xae0f43[_0x525641(0x150)](_0xb38233);}return _0xae0f43;}async[a0_0x1df93b(0x156)](_0x390a5d,_0x7c928,_0x2befa3){const _0x43055a=a0_0x1df93b,_0x498a7d=[];try{if(!this[_0x43055a(0x157)]){const _0xc4f61=await import('stylelint');this[_0x43055a(0x157)]=_0xc4f61['default'];}const _0x32e32a={'extends':[_0x43055a(0x15f)],'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-/',_0x43055a(0x168)]}],'media-feature-name-no-unknown':!![],'at-rule-no-unknown':_0x2befa3===_0x43055a(0x16d)?[!![],{'ignoreAtRules':['mixin',_0x43055a(0x169),'extend','if',_0x43055a(0x155),'for',_0x43055a(0x186),'while','function',_0x43055a(0x173),_0x43055a(0x16f),'use',_0x43055a(0x17f)]}]:_0x2befa3===_0x43055a(0x15c)?[!![],{'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':_0x43055a(0x158),'selector-type-case':_0x43055a(0x14a)},'customSyntax':_0x2befa3==='scss'?_0x43055a(0x164):_0x2befa3===_0x43055a(0x15c)?_0x43055a(0x187):undefined},_0x499abd=await this[_0x43055a(0x157)]['lint']({'code':_0x7c928,'codeFilename':_0x390a5d,'config':_0x32e32a});if(_0x499abd[_0x43055a(0x161)]&&_0x499abd['results']['length']>0x0){const _0x32f1c8=_0x499abd['results'][0x0];if(_0x32f1c8[_0x43055a(0x166)])for(const _0x367ba4 of _0x32f1c8['warnings']){_0x498a7d[_0x43055a(0x150)]({'file':_0x390a5d,'line':_0x367ba4['line']||0x1,'column':_0x367ba4[_0x43055a(0x149)]||0x1,'severity':_0x367ba4['severity']===_0x43055a(0x177)?STATIC_ANALYSIS['SEVERITY']['ERROR']:STATIC_ANALYSIS[_0x43055a(0x16b)][_0x43055a(0x172)],'rule':_0x367ba4['rule']||'unknown','message':_0x367ba4['text'],'category':this['categorizeStylelintRule'](_0x367ba4['rule']),'fixable':![],'source':'stylelint'});}}}catch(_0x3b8b9e){this[_0x43055a(0x18a)]?.[_0x43055a(0x146)](_0x43055a(0x18d),{'file':_0x390a5d,'error':_0x3b8b9e['message']});}return _0x498a7d;}[a0_0x1df93b(0x16e)](_0x4d7353,_0x209627){const _0x49edb9=a0_0x1df93b;return{'file':_0x209627,'line':_0x4d7353[_0x49edb9(0x181)]||0x1,'column':_0x4d7353[_0x49edb9(0x149)]||0x1,'severity':STATIC_ANALYSIS[_0x49edb9(0x16b)][_0x49edb9(0x17e)],'rule':_0x4d7353[_0x49edb9(0x159)]||'CssSyntaxError','message':_0x4d7353[_0x49edb9(0x171)]||_0x4d7353['message'],'category':STATIC_ANALYSIS[_0x49edb9(0x174)][_0x49edb9(0x175)],'fixable':![],'source':'postcss','code':_0x4d7353[_0x49edb9(0x170)]||undefined};}[a0_0x1df93b(0x153)](_0x259e18){const _0x426f7d=a0_0x1df93b;if(!_0x259e18)return STATIC_ANALYSIS[_0x426f7d(0x174)]['STYLE'];const _0x161e58=_0x259e18[_0x426f7d(0x185)]();if(_0x161e58[_0x426f7d(0x17d)]('no-invalid')||_0x161e58['includes']('no-unknown')||_0x161e58['includes'](_0x426f7d(0x167))||_0x161e58[_0x426f7d(0x17d)]('syntax'))return STATIC_ANALYSIS[_0x426f7d(0x174)]['SYNTAX'];if(_0x161e58['includes'](_0x426f7d(0x154))||_0x161e58[_0x426f7d(0x17d)](_0x426f7d(0x18b)))return STATIC_ANALYSIS['CATEGORY']['PERFORMANCE'];if(_0x161e58[_0x426f7d(0x17d)](_0x426f7d(0x16a))||_0x161e58['includes'](_0x426f7d(0x17b)))return STATIC_ANALYSIS[_0x426f7d(0x174)][_0x426f7d(0x14e)];return STATIC_ANALYSIS['CATEGORY'][_0x426f7d(0x15d)];}[a0_0x1df93b(0x152)](_0x916852){const _0x207736=a0_0x1df93b,_0x3a0379=_0x916852[_0x207736(0x185)]();if(_0x3a0379[_0x207736(0x182)]('.scss')||_0x3a0379[_0x207736(0x182)](_0x207736(0x189)))return'scss';if(_0x3a0379['endsWith']('.less'))return _0x207736(0x15c);return _0x207736(0x178);}[a0_0x1df93b(0x151)](){const _0x5449a5=a0_0x1df93b;return[_0x5449a5(0x176),'.scss',_0x5449a5(0x189),'.less'];}['supportsAutoFix'](){return![];}}export default CSSAnalyzer;function a0_0x2512(){const _0x3a6c5e=['Aw5JBhvKzq','yMvZDc1WCMfJDgLJzq','u0vwrvjjvfK','Cg9ZDgnZCW','C2nZCW','zM9YBwf0ug9ZDentu0vYCM9Y','y29UDgvUDa','C291CMnL','CMvHC29U','v0fstKLorW','CMv0DxjU','q0furuDpuLK','u1Lovefy','lMnZCW','zxjYB3i','y3nZ','ntm5mZm0BuzuDwDz','yw5HBhL6zq','CMvJB21Tzw5Kzwq','q1ntigfUywX5C2LZigzHAwXLza','Aw5JBhvKzxm','rvjst1i','zM9YD2fYza','BwvZC2fNzq','BgLUzq','zw5KC1DPDgG','C2v2zxjPDhK','mtyYmtaWog1XEwjWzG','Dg9mB3DLCKnHC2u','zwfJAa','Cg9ZDgnZCY1SzxnZ','mtiZmdeWr1nJsfzJ','lNnHC3m','Bg9Nz2vY','B3b0Aw1PEMu','zgvIDwC','u3r5BgvSAw50igfUywX5C2LZigzHAwXLza','D2fYBG','BgvUz3rO','Cg9ZDgnZC0XLC3m','y29SDw1U','Bg93zxi','ug9ZDentuYbZEw50yxGGy2HLy2SGCgfZC2vK','nJu0otKWuNv2Axvs','y2HLy2TtEw50yxG','qKvtvf9quKfdveLdrq','mtCWntv4CLzzz0G','ChvZAa','z2v0u3vWCg9YDgvKrxH0zw5ZAw9UCW','zgv0zwn0tgfUz3vHz2u','y2f0zwDVCML6zvn0EwXLBgLUDfj1Bgu','CgvYzM9YBwfUy2u','zwXZzq','BgLUDfn0EwXLCW','C3r5BgvSAw50','zg91yMXL','BMfTzq','zgvMyxvSDa','Cg9ZDgnZC1nJC3m','BgvZCW','u1rzteu','mZGWme5Nz2rWqq','C3r5BgvSAw50lwnVBMzPzY1ZDgfUzgfYza','nJmYntCWt3zxr1jc','CMvZDwX0CW','nJbkB05oswe','CM9VDa','Cg9ZDgnZCY1Zy3nZ','mJa5mdiWwvjVD2Do','D2fYBMLUz3m','BM8Tzw1WDhK','BMCTzgvLCa'];a0_0x2512=function(){return _0x3a6c5e;};return a0_0x2512();}
1
+ function a0_0x5df7(_0x1444b4,_0x5aa038){_0x1444b4=_0x1444b4-0x1a9;const _0x3ca1eb=a0_0x3ca1();let _0x5df7bf=_0x3ca1eb[_0x1444b4];if(a0_0x5df7['VOPMxo']===undefined){var _0x3c2063=function(_0x103309){const _0x3846e3='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x284c9e='',_0xc6e326='';for(let _0x1a1dc2=0x0,_0x226398,_0x1e077b,_0x231263=0x0;_0x1e077b=_0x103309['charAt'](_0x231263++);~_0x1e077b&&(_0x226398=_0x1a1dc2%0x4?_0x226398*0x40+_0x1e077b:_0x1e077b,_0x1a1dc2++%0x4)?_0x284c9e+=String['fromCharCode'](0xff&_0x226398>>(-0x2*_0x1a1dc2&0x6)):0x0){_0x1e077b=_0x3846e3['indexOf'](_0x1e077b);}for(let _0x36de3e=0x0,_0x1913fe=_0x284c9e['length'];_0x36de3e<_0x1913fe;_0x36de3e++){_0xc6e326+='%'+('00'+_0x284c9e['charCodeAt'](_0x36de3e)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0xc6e326);};a0_0x5df7['Xrudti']=_0x3c2063,a0_0x5df7['qpYMFc']={},a0_0x5df7['VOPMxo']=!![];}const _0x5d2deb=_0x3ca1eb[0x0],_0xf2cb8f=_0x1444b4+_0x5d2deb,_0x5667fa=a0_0x5df7['qpYMFc'][_0xf2cb8f];return!_0x5667fa?(_0x5df7bf=a0_0x5df7['Xrudti'](_0x5df7bf),a0_0x5df7['qpYMFc'][_0xf2cb8f]=_0x5df7bf):_0x5df7bf=_0x5667fa,_0x5df7bf;}const a0_0x5a7d58=a0_0x5df7;(function(_0x121551,_0x7c88d4){const _0xb44e51=a0_0x5df7,_0xcdd8f4=_0x121551();while(!![]){try{const _0x4d6460=parseInt(_0xb44e51(0x1ba))/0x1+-parseInt(_0xb44e51(0x1c9))/0x2+parseInt(_0xb44e51(0x1d2))/0x3*(parseInt(_0xb44e51(0x1e1))/0x4)+parseInt(_0xb44e51(0x1df))/0x5+parseInt(_0xb44e51(0x1dd))/0x6*(-parseInt(_0xb44e51(0x1ae))/0x7)+parseInt(_0xb44e51(0x1cb))/0x8*(-parseInt(_0xb44e51(0x1b2))/0x9)+parseInt(_0xb44e51(0x1cf))/0xa;if(_0x4d6460===_0x7c88d4)break;else _0xcdd8f4['push'](_0xcdd8f4['shift']());}catch(_0x15ecde){_0xcdd8f4['push'](_0xcdd8f4['shift']());}}}(a0_0x3ca1,0x7adff));function a0_0x3ca1(){const _0xce4370=['mtq4nJu5CLDdBLzy','C2nZCW','zM9YBwf0ug9ZDentu0vYCM9Y','zNvUy3rPB24','mJDlwK1uuu0','BgvZCW','y2f0zwDVCML6zvn0EwXLBgLUDfj1Bgu','BM8TDw5RBM93BG','C3LUDgf4','zw5KC1DPDgG','lNnHC3m','v0fstKLorW','otGYotKXEvHLALLK','CMvZDwX0CW','zxH0zw5K','zwXZzq','CMvHC29U','Cg9ZDgnZCW','C2v2zxjPDhK','Cg9ZDgnZC1nJC3m','BgLUDfn0EwXLCW','BwL4Aw4','Cg9ZDgnZC0XLC3m','q0furuDpuLK','y2HLy2TtEw50yxG','u1rzteu','Dg9mB3DLCKnHC2u','nJe5mJm4CxPtBxni','CNvSzq','mJmXota2nfjxqMndqW','Bg9Nz2vY','B3b0Aw1PEMu','zM9Y','mtK4ndyXmhfyseHKyG','CMvJB21Tzw5Kzwq','u3r5BgvSAw50igfUywX5C2LZigzHAwXLza','ntCYmZDLyvbHs3i','ChvZAa','yw5HBhL6zq','uevsrK9stufoq0u','C3r5BgvSAw50','lMXLC3m','CgvYzM9YBwfUy2u','zgvMyxvSDa','zg91yMXL','y29SDw1U','lMnZCW','mtu2wNLSC09I','BwvZC2fNzq','mJeXodmZmhn5AK1pvW','BgLUzq','mtmYu2PptwzI','ChjVy2vZCW','u1Lovefy','Aw5JBhvKzxm','zgvIDwC','BM8Tzw1WDhK','u0vwrvjjvfK','DxnL','q1ntigfUywX5C2LZigzHAwXLza','Cg9ZDgnZCY1SzxnZ'];a0_0x3ca1=function(){return _0xce4370;};return a0_0x3ca1();}import{STATIC_ANALYSIS}from'../utilities/constants.js';class CSSAnalyzer{constructor(_0x284c9e=null){const _0x29a94b=a0_0x5df7;this[_0x29a94b(0x1cc)]=_0x284c9e,this[_0x29a94b(0x1d6)]=null,this['postcss']=null,this[_0x29a94b(0x1c1)]=null,this[_0x29a94b(0x1c4)]=null;}async[a0_0x5a7d58(0x1d4)](_0xc6e326,_0x1a1dc2,_0x226398={}){const _0x4bf927=a0_0x5a7d58;try{const _0x1e077b=[],_0x231263=this['detectLanguage'](_0xc6e326),_0x36de3e=await this[_0x4bf927(0x1c6)](_0xc6e326,_0x1a1dc2,_0x231263);_0x1e077b['push'](..._0x36de3e);if(_0x36de3e['length']===0x0){const _0x1913fe=await this[_0x4bf927(0x1c2)](_0xc6e326,_0x1a1dc2,_0x231263);_0x1e077b['push'](..._0x1913fe);}return this[_0x4bf927(0x1cc)]?.['debug']('CSS\x20analysis\x20completed',{'file':_0xc6e326,'language':_0x231263,'totalDiagnostics':_0x1e077b['length'],'errors':_0x1e077b['filter'](_0x10fe61=>_0x10fe61['severity']===STATIC_ANALYSIS['SEVERITY']['ERROR'])['length'],'warnings':_0x1e077b['filter'](_0x34f003=>_0x34f003['severity']===STATIC_ANALYSIS['SEVERITY']['WARNING'])['length']}),_0x1e077b;}catch(_0xa38063){return this[_0x4bf927(0x1cc)]?.['error'](_0x4bf927(0x1ac),{'file':_0xc6e326,'error':_0xa38063['message']}),[];}}async[a0_0x5a7d58(0x1c6)](_0x39ce07,_0x4782d9,_0x215d13){const _0x3b02f9=a0_0x5a7d58,_0x71d397=[];try{if(!this[_0x3b02f9(0x1bf)]){const _0x23609f=await import(_0x3b02f9(0x1bf));this['postcss']=_0x23609f['default'];}let _0x187364=null;if(_0x215d13===_0x3b02f9(0x1af)){if(!this['postcssScss']){const _0x321327=await import('postcss-scss');this['postcssScss']=_0x321327['default'];}_0x187364=this[_0x3b02f9(0x1c1)];}else{if(_0x215d13===_0x3b02f9(0x1b3)){if(!this[_0x3b02f9(0x1c4)]){const _0x10c79d=await import(_0x3b02f9(0x1ad));this[_0x3b02f9(0x1c4)]=_0x10c79d[_0x3b02f9(0x1d9)];}_0x187364=this['postcssLess'];}}const _0x4ef29e=this['postcss']()[_0x3b02f9(0x1e2)](_0x4782d9,{'from':_0x39ce07,'syntax':_0x187364}),_0x3c047b=_0x4ef29e['root'];this[_0x3b02f9(0x1cc)]?.[_0x3b02f9(0x1e5)]('PostCSS\x20syntax\x20check\x20passed',{'file':_0x39ce07});}catch(_0x1e1296){const _0x3ad597=this[_0x3b02f9(0x1b0)](_0x1e1296,_0x39ce07);_0x3ad597&&_0x71d397[_0x3b02f9(0x1d3)](_0x3ad597);}return _0x71d397;}async['lintStyles'](_0x1f0863,_0x4af19f,_0x3539d3){const _0x33dc41=a0_0x5a7d58,_0x41ee84=[];try{if(!this[_0x33dc41(0x1d6)]){const _0x133253=await import(_0x33dc41(0x1d6));this[_0x33dc41(0x1d6)]=_0x133253[_0x33dc41(0x1d9)];}const _0x144920={'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-/','ng-deep']}],'media-feature-name-no-unknown':!![],'at-rule-no-unknown':_0x3539d3==='scss'?[!![],{'ignoreAtRules':[_0x33dc41(0x1c3),'include',_0x33dc41(0x1bc),'if',_0x33dc41(0x1bd),_0x33dc41(0x1ce),'each','while',_0x33dc41(0x1b1),'return','content',_0x33dc41(0x1ab),'forward']}]:_0x3539d3==='less'?[!![],{'ignoreAtRules':['plugin']}]:!![],'comment-no-empty':!![],'no-duplicate-selectors':!![],'no-empty-source':null,'block-no-empty':!![],'declaration-block-no-shorthand-property-overrides':!![],'font-family-no-missing-generic-family-keyword':!![],'function-linear-gradient-no-nonstandard-direction':!![],'no-descending-specificity':null,'no-duplicate-at-import-rules':!![],'no-extra-semicolons':!![],'no-invalid-double-slash-comments':!![],'selector-pseudo-element-colon-notation':_0x33dc41(0x1da),'selector-type-case':'lower'},'customSyntax':_0x3539d3===_0x33dc41(0x1af)?'postcss-scss':_0x3539d3==='less'?_0x33dc41(0x1ad):undefined},_0x2d5650=await this['stylelint']['lint']({'code':_0x4af19f,'codeFilename':_0x1f0863,'config':_0x144920});if(_0x2d5650[_0x33dc41(0x1bb)]&&_0x2d5650[_0x33dc41(0x1bb)]['length']>0x0){const _0x4de259=_0x2d5650['results'][0x0];if(_0x4de259['warnings'])for(const _0x1b2b12 of _0x4de259['warnings']){_0x41ee84['push']({'file':_0x1f0863,'line':_0x1b2b12[_0x33dc41(0x1e0)]||0x1,'column':_0x1b2b12[_0x33dc41(0x1db)]||0x1,'severity':_0x1b2b12[_0x33dc41(0x1c0)]==='error'?STATIC_ANALYSIS['SEVERITY']['ERROR']:STATIC_ANALYSIS['SEVERITY'][_0x33dc41(0x1b9)],'rule':_0x1b2b12[_0x33dc41(0x1ca)]||'unknown','message':_0x1b2b12['text'],'category':this[_0x33dc41(0x1b4)](_0x1b2b12['rule']),'fixable':![],'source':'stylelint'});}}}catch(_0xf0ff65){this['logger']?.['warn'](_0x33dc41(0x1d1),{'file':_0x1f0863,'error':_0xf0ff65[_0x33dc41(0x1de)]});}return _0x41ee84;}[a0_0x5a7d58(0x1b0)](_0x5874c4,_0x293733){const _0x53b9c5=a0_0x5a7d58;return{'file':_0x293733,'line':_0x5874c4['line']||0x1,'column':_0x5874c4[_0x53b9c5(0x1db)]||0x1,'severity':STATIC_ANALYSIS[_0x53b9c5(0x1aa)]['ERROR'],'rule':_0x5874c4['name']||'CssSyntaxError','message':_0x5874c4[_0x53b9c5(0x1be)]||_0x5874c4['message'],'category':STATIC_ANALYSIS['CATEGORY'][_0x53b9c5(0x1e3)],'fixable':![],'source':'postcss','code':_0x5874c4['source']||undefined};}['categorizeStylelintRule'](_0x5e0b95){const _0x64a6d6=a0_0x5a7d58;if(!_0x5e0b95)return STATIC_ANALYSIS[_0x64a6d6(0x1c5)][_0x64a6d6(0x1c7)];const _0x230c47=_0x5e0b95['toLowerCase']();if(_0x230c47[_0x64a6d6(0x1e4)]('no-invalid')||_0x230c47[_0x64a6d6(0x1e4)](_0x64a6d6(0x1b5))||_0x230c47['includes'](_0x64a6d6(0x1a9))||_0x230c47[_0x64a6d6(0x1e4)](_0x64a6d6(0x1b6)))return STATIC_ANALYSIS['CATEGORY']['SYNTAX'];if(_0x230c47[_0x64a6d6(0x1e4)](_0x64a6d6(0x1d8))||_0x230c47[_0x64a6d6(0x1e4)](_0x64a6d6(0x1cd)))return STATIC_ANALYSIS['CATEGORY'][_0x64a6d6(0x1d5)];if(_0x230c47[_0x64a6d6(0x1e4)]('best-practice')||_0x230c47['includes'](_0x64a6d6(0x1d0)))return STATIC_ANALYSIS['CATEGORY']['BEST_PRACTICE'];return STATIC_ANALYSIS['CATEGORY'][_0x64a6d6(0x1c7)];}['detectLanguage'](_0x26c835){const _0x5ec0b5=a0_0x5a7d58,_0x5aef42=_0x26c835[_0x5ec0b5(0x1c8)]();if(_0x5aef42[_0x5ec0b5(0x1b7)]('.scss')||_0x5aef42['endsWith'](_0x5ec0b5(0x1b8)))return'scss';if(_0x5aef42[_0x5ec0b5(0x1b7)]('.less'))return'less';return'css';}['getSupportedExtensions'](){const _0x3c7d06=a0_0x5a7d58;return[_0x3c7d06(0x1dc),'.scss','.sass',_0x3c7d06(0x1d7)];}['supportsAutoFix'](){return![];}}export default CSSAnalyzer;
@@ -1 +1 @@
1
- const a0_0x492102=a0_0x406e;(function(_0x4f7eb2,_0x1d603e){const _0x20a513=a0_0x406e,_0x4355e3=_0x4f7eb2();while(!![]){try{const _0xfdd2c4=parseInt(_0x20a513(0x1b4))/0x1+parseInt(_0x20a513(0x1c0))/0x2*(-parseInt(_0x20a513(0x1ad))/0x3)+parseInt(_0x20a513(0x1dc))/0x4*(parseInt(_0x20a513(0x1f5))/0x5)+-parseInt(_0x20a513(0x1be))/0x6*(parseInt(_0x20a513(0x193))/0x7)+parseInt(_0x20a513(0x1ef))/0x8*(parseInt(_0x20a513(0x199))/0x9)+parseInt(_0x20a513(0x1ea))/0xa*(parseInt(_0x20a513(0x181))/0xb)+parseInt(_0x20a513(0x1d4))/0xc*(parseInt(_0x20a513(0x184))/0xd);if(_0xfdd2c4===_0x1d603e)break;else _0x4355e3['push'](_0x4355e3['shift']());}catch(_0x294576){_0x4355e3['push'](_0x4355e3['shift']());}}}(a0_0x41a0,0xc9bda));import{exec}from'child_process';import{promisify}from'util';import a0_0x1c908d from'path';import a0_0x314b12 from'fs/promises';import{STATIC_ANALYSIS}from'../utilities/constants.js';function a0_0x406e(_0x1bc81e,_0x51b159){_0x1bc81e=_0x1bc81e-0x17f;const _0x41a0de=a0_0x41a0();let _0x406e56=_0x41a0de[_0x1bc81e];if(a0_0x406e['CTJsfX']===undefined){var _0x1e3e82=function(_0x2c75b9){const _0x3a7632='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x1c908d='',_0x314b12='';for(let _0x2b0992=0x0,_0x501d7c,_0xcc5350,_0x2b103c=0x0;_0xcc5350=_0x2c75b9['charAt'](_0x2b103c++);~_0xcc5350&&(_0x501d7c=_0x2b0992%0x4?_0x501d7c*0x40+_0xcc5350:_0xcc5350,_0x2b0992++%0x4)?_0x1c908d+=String['fromCharCode'](0xff&_0x501d7c>>(-0x2*_0x2b0992&0x6)):0x0){_0xcc5350=_0x3a7632['indexOf'](_0xcc5350);}for(let _0x29c184=0x0,_0x1b34ff=_0x1c908d['length'];_0x29c184<_0x1b34ff;_0x29c184++){_0x314b12+='%'+('00'+_0x1c908d['charCodeAt'](_0x29c184)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x314b12);};a0_0x406e['FRLYBw']=_0x1e3e82,a0_0x406e['Lsrvvw']={},a0_0x406e['CTJsfX']=!![];}const _0x15f181=_0x41a0de[0x0],_0x2c0d5b=_0x1bc81e+_0x15f181,_0x2dfb1c=a0_0x406e['Lsrvvw'][_0x2c0d5b];return!_0x2dfb1c?(_0x406e56=a0_0x406e['FRLYBw'](_0x406e56),a0_0x406e['Lsrvvw'][_0x2c0d5b]=_0x406e56):_0x406e56=_0x2dfb1c,_0x406e56;}const execAsync=promisify(exec);class ConfigValidator{constructor(_0x2b0992=null){const _0x42d219=a0_0x406e;this[_0x42d219(0x189)]=_0x2b0992,this[_0x42d219(0x1f6)]=null,this[_0x42d219(0x1c4)]=new Map();}async['detectAvailableValidators'](){const _0x39db7e=a0_0x406e;if(this['availableScanners']!==null)return this[_0x39db7e(0x1f6)];const _0x501d7c={'checkov':![],'hadolint':![],'yamllint':![],'jsonSchema':![]};try{await execAsync('checkov\x20--version',{'timeout':0x1388}),_0x501d7c['checkov']=!![],this['logger']?.['debug'](_0x39db7e(0x18f));}catch(_0xcc5350){this[_0x39db7e(0x189)]?.[_0x39db7e(0x1d6)]('checkov\x20not\x20available',{'error':_0xcc5350['message']});}try{await execAsync('hadolint\x20--version',{'timeout':0x1388}),_0x501d7c['hadolint']=!![],this['logger']?.[_0x39db7e(0x1d6)](_0x39db7e(0x187));}catch(_0x2b103c){this['logger']?.['debug'](_0x39db7e(0x1cb),{'error':_0x2b103c['message']});}try{await execAsync('yamllint\x20--version',{'timeout':0x1388}),_0x501d7c[_0x39db7e(0x1a3)]=!![],this['logger']?.[_0x39db7e(0x1d6)](_0x39db7e(0x1e8));}catch(_0x29c184){this['logger']?.['debug'](_0x39db7e(0x1e7),{'error':_0x29c184['message']});}try{await import(_0x39db7e(0x1f9)),_0x501d7c['jsonSchema']=!![],this[_0x39db7e(0x189)]?.['debug'](_0x39db7e(0x1aa));}catch(_0x1b34ff){this[_0x39db7e(0x189)]?.['debug']('ajv\x20not\x20available',{'error':_0x1b34ff['message']});}return this['availableScanners']=_0x501d7c,_0x501d7c;}async[a0_0x492102(0x190)](_0x3c0fe7,_0x5da177={}){const _0x1cf86c=a0_0x492102,_0x1aa984=[],_0x2831be=await this[_0x1cf86c(0x1c7)](),_0x124f59=this['detectFileType'](_0x3c0fe7);this['logger']?.['debug']('Validating\x20config\x20file',{'filePath':_0x3c0fe7,'fileType':_0x124f59});switch(_0x124f59){case'dockerfile':if(_0x2831be[_0x1cf86c(0x1ec)]){const _0x5ca3f7=await this['validateDockerfile'](_0x3c0fe7,_0x5da177);_0x1aa984[_0x1cf86c(0x1b7)](..._0x5ca3f7);}if(_0x2831be[_0x1cf86c(0x1c5)]){const _0x81ed1c=await this['validateWithCheckov'](_0x3c0fe7,_0x1cf86c(0x1fa),_0x5da177);_0x1aa984[_0x1cf86c(0x1b7)](..._0x81ed1c);}break;case _0x1cf86c(0x1a7):if(_0x2831be[_0x1cf86c(0x1a3)]){const _0x99a713=await this[_0x1cf86c(0x1d8)](_0x3c0fe7,_0x5da177);_0x1aa984['push'](..._0x99a713);}if(_0x2831be['checkov']){const _0x3f6559=await this[_0x1cf86c(0x1cc)](_0x3c0fe7,_0x1cf86c(0x1fc),_0x5da177);_0x1aa984['push'](..._0x3f6559);}break;case _0x1cf86c(0x1f4):if(_0x2831be['yamllint']){const _0x5a5eec=await this['validateYAML'](_0x3c0fe7,_0x5da177);_0x1aa984[_0x1cf86c(0x1b7)](..._0x5a5eec);}if(_0x2831be['checkov']){const _0x185601=await this[_0x1cf86c(0x1cc)](_0x3c0fe7,_0x1cf86c(0x1f4),_0x5da177);_0x1aa984[_0x1cf86c(0x1b7)](..._0x185601);}break;case _0x1cf86c(0x1d7):if(_0x2831be[_0x1cf86c(0x1c5)]){const _0xb11c5d=await this[_0x1cf86c(0x1cc)](_0x3c0fe7,'terraform',_0x5da177);_0x1aa984[_0x1cf86c(0x1b7)](..._0xb11c5d);}break;case'package.json':if(_0x2831be['jsonSchema']){const _0x3749c0=await this[_0x1cf86c(0x1b8)](_0x3c0fe7,_0x5da177);_0x1aa984[_0x1cf86c(0x1b7)](..._0x3749c0);}break;case _0x1cf86c(0x1d2):if(_0x2831be['jsonSchema']){const _0x52a4cc=await this['validateTsConfig'](_0x3c0fe7,_0x5da177);_0x1aa984[_0x1cf86c(0x1b7)](..._0x52a4cc);}break;case _0x1cf86c(0x1f8):if(_0x2831be['yamllint']){const _0x168be7=await this['validateYAML'](_0x3c0fe7,_0x5da177);_0x1aa984[_0x1cf86c(0x1b7)](..._0x168be7);}break;case _0x1cf86c(0x1c1):const _0x5f15cb=await this['validateEnvFile'](_0x3c0fe7,_0x5da177);_0x1aa984[_0x1cf86c(0x1b7)](..._0x5f15cb);break;case _0x1cf86c(0x1af):if(_0x2831be['yamllint']){const _0x2f178c=await this[_0x1cf86c(0x1d8)](_0x3c0fe7,_0x5da177);_0x1aa984[_0x1cf86c(0x1b7)](..._0x2f178c);}break;default:this['logger']?.['warn'](_0x1cf86c(0x1e0),{'filePath':_0x3c0fe7,'fileType':_0x124f59});return[];}return this[_0x1cf86c(0x1f3)](_0x1aa984);}async[a0_0x492102(0x19f)](_0x2dfd66,_0x4d06ea={}){const _0x25340e=a0_0x492102;try{const _0x36247a=await execAsync(_0x25340e(0x1ac)+_0x2dfd66+'\x22',{'maxBuffer':0xa*0x400*0x400,'timeout':0x7530}),_0x43be32=JSON['parse'](_0x36247a['stdout']);return this[_0x25340e(0x1e4)](_0x43be32,_0x2dfd66);}catch(_0x2a39b7){if(_0x2a39b7[_0x25340e(0x1a1)])try{const _0x33ea90=JSON['parse'](_0x2a39b7[_0x25340e(0x1a1)]);return this['parseHadolintResults'](_0x33ea90,_0x2dfd66);}catch(_0x28cc49){this['logger']?.[_0x25340e(0x1f7)]('Failed\x20to\x20parse\x20hadolint\x20output',{'error':_0x28cc49['message']});}return this['logger']?.[_0x25340e(0x1f7)](_0x25340e(0x1b2),{'error':_0x2a39b7[_0x25340e(0x1cd)]}),[];}}['parseHadolintResults'](_0x4dd37c,_0x4e88c6){const _0x394ec2=a0_0x492102,_0x26baf6=[];if(Array[_0x394ec2(0x17f)](_0x4dd37c))for(const _0x155e7a of _0x4dd37c){_0x26baf6[_0x394ec2(0x1b7)]({'file':_0x4e88c6,'line':_0x155e7a[_0x394ec2(0x19c)]||0x1,'column':_0x155e7a['column']||0x1,'severity':this[_0x394ec2(0x1da)](_0x155e7a['level']),'rule':_0x155e7a['code'],'message':_0x155e7a['message'],'category':_0x394ec2(0x1fa),'validator':_0x394ec2(0x1ec)});}return _0x26baf6;}async['validateYAML'](_0xca43e6,_0x1fb700={}){const _0x4922f8=a0_0x492102;try{const _0x4fbac1=await execAsync(_0x4922f8(0x197)+_0xca43e6+'\x22',{'maxBuffer':0xa*0x400*0x400,'timeout':0x7530});return this[_0x4922f8(0x1c8)](_0x4fbac1['stdout'],_0xca43e6);}catch(_0xdae334){if(_0xdae334['stdout'])return this['parseYamllintResults'](_0xdae334['stdout'],_0xca43e6);return this['logger']?.[_0x4922f8(0x1f7)](_0x4922f8(0x1a2),{'error':_0xdae334['message']}),[];}}[a0_0x492102(0x1c8)](_0x18505c,_0x14360a){const _0x4f5bf0=a0_0x492102,_0x4c9a9e=[],_0x2adacd=_0x18505c['split']('\x0a')['filter'](_0x2094d6=>_0x2094d6[_0x4f5bf0(0x1de)]());for(const _0x33f835 of _0x2adacd){const _0x40eef9=_0x33f835['match'](/^(.+?):(\d+):(\d+):\s*\[(\w+)\]\s*(.+?)\s*\((.+?)\)/);if(_0x40eef9){const [,_0x2f7d84,_0xd34b7f,_0x59df02,_0x4d5dcc,_0x580d70,_0x2c8b6e]=_0x40eef9;_0x4c9a9e['push']({'file':_0x14360a,'line':parseInt(_0xd34b7f,0xa),'column':parseInt(_0x59df02,0xa),'severity':this['mapYamllintSeverity'](_0x4d5dcc),'rule':_0x2c8b6e,'message':_0x580d70,'category':'yaml','validator':'yamllint'});}}return _0x4c9a9e;}async[a0_0x492102(0x1cc)](_0x4d7f7d,_0x56c5ef,_0x35ab11={}){const _0x3a14e7=a0_0x492102;try{const _0x1ce1a0=await execAsync('checkov\x20-f\x20\x22'+_0x4d7f7d+_0x3a14e7(0x1b3)+_0x56c5ef+'\x20--output\x20json\x20--compact',{'maxBuffer':0xa*0x400*0x400,'timeout':0xea60}),_0x251794=JSON[_0x3a14e7(0x1b0)](_0x1ce1a0[_0x3a14e7(0x1a1)]);return this[_0x3a14e7(0x1b5)](_0x251794,_0x4d7f7d);}catch(_0x44a675){if(_0x44a675[_0x3a14e7(0x1a1)])try{const _0x39e841=JSON['parse'](_0x44a675['stdout']);return this['parseCheckovResults'](_0x39e841,_0x4d7f7d);}catch(_0x59602b){this[_0x3a14e7(0x189)]?.[_0x3a14e7(0x1f7)]('Failed\x20to\x20parse\x20checkov\x20output',{'error':_0x59602b['message']});}return this['logger']?.['error'](_0x3a14e7(0x188),{'error':_0x44a675[_0x3a14e7(0x1cd)]}),[];}}['parseCheckovResults'](_0x84e899,_0x54410f){const _0x23472b=a0_0x492102,_0x28b0e2=[];if(_0x84e899[_0x23472b(0x1ba)]&&_0x84e899['results']['failed_checks'])for(const _0x429403 of _0x84e899[_0x23472b(0x1ba)][_0x23472b(0x185)]){_0x28b0e2[_0x23472b(0x1b7)]({'file':_0x54410f,'line':_0x429403['file_line_range']?_0x429403[_0x23472b(0x1bf)][0x0]:0x1,'column':0x1,'severity':this[_0x23472b(0x19e)](_0x429403[_0x23472b(0x1fb)]),'rule':_0x429403[_0x23472b(0x1a4)],'message':_0x429403['check_name']||_0x429403['check_id'],'category':'security','validator':'checkov','remediation':_0x429403['guideline'],'cwe':_0x429403[_0x23472b(0x180)],'references':_0x429403['guideline']?[_0x429403['guideline']]:[]});}return _0x28b0e2;}async[a0_0x492102(0x1b8)](_0x4eaafd,_0x3da684={}){const _0x587e7b=a0_0x492102;try{const _0x5a4f14=(await import('ajv'))['default'],_0x1163df=(await import(_0x587e7b(0x1a0)))['default'],_0x2796a4=await a0_0x314b12['readFile'](_0x4eaafd,'utf-8'),_0xd51720=JSON[_0x587e7b(0x1b0)](_0x2796a4),_0x4d6d95=new _0x5a4f14({'allErrors':!![],'strict':![]});_0x1163df(_0x4d6d95);const _0xd18d64={'type':_0x587e7b(0x1b6),'required':['name',_0x587e7b(0x1d3)],'properties':{'name':{'type':'string','pattern':'^(?:@[a-z0-9-~][a-z0-9-._~]*/)?[a-z0-9-~][a-z0-9-._~]*$'},'version':{'type':'string'},'description':{'type':_0x587e7b(0x1ca)},'main':{'type':'string'},'type':{'type':_0x587e7b(0x1ca),'enum':['module',_0x587e7b(0x1df)]},'scripts':{'type':'object'},'dependencies':{'type':'object'},'devDependencies':{'type':_0x587e7b(0x1b6)}},'additionalProperties':!![]},_0x4b5740=_0x4d6d95['compile'](_0xd18d64),_0x56529d=_0x4b5740(_0xd51720);if(!_0x56529d&&_0x4b5740[_0x587e7b(0x18d)])return _0x4b5740['errors'][_0x587e7b(0x1e6)](_0xf675f3=>({'file':_0x4eaafd,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS[_0x587e7b(0x1e1)][_0x587e7b(0x1bc)],'rule':'json-schema','message':_0xf675f3[_0x587e7b(0x18e)]?_0xf675f3['instancePath']+'\x20'+_0xf675f3[_0x587e7b(0x1cd)]:_0x587e7b(0x1b1)+_0xf675f3['params']['missingProperty']+'\x27','category':'validation','validator':'json-schema'}));return[];}catch(_0x33b43f){return this[_0x587e7b(0x189)]?.[_0x587e7b(0x1f7)]('package.json\x20validation\x20failed',{'error':_0x33b43f[_0x587e7b(0x1cd)]}),[{'file':_0x4eaafd,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS[_0x587e7b(0x1e1)][_0x587e7b(0x1bc)],'rule':'json-parse','message':'Invalid\x20JSON:\x20'+_0x33b43f['message'],'category':'syntax','validator':_0x587e7b(0x1f2)}];}}async['validateTsConfig'](_0x43e66,_0x799486={}){const _0x187a8a=a0_0x492102;try{const _0x37b472=await a0_0x314b12[_0x187a8a(0x1e9)](_0x43e66,_0x187a8a(0x194)),_0x21d32e=JSON[_0x187a8a(0x1b0)](_0x37b472),_0x3e8145=[];if(_0x21d32e[_0x187a8a(0x1ce)]){const _0x5b90d2=_0x21d32e['compilerOptions'];!_0x5b90d2[_0x187a8a(0x1eb)]&&_0x3e8145[_0x187a8a(0x1b7)]({'file':_0x43e66,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS['SEVERITY']['WARNING'],'rule':'strict-mode','message':_0x187a8a(0x198),'category':'best-practice','validator':_0x187a8a(0x18b)}),_0x5b90d2[_0x187a8a(0x1bd)]===![]&&_0x3e8145[_0x187a8a(0x1b7)]({'file':_0x43e66,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS['SEVERITY'][_0x187a8a(0x1db)],'rule':_0x187a8a(0x191),'message':_0x187a8a(0x192),'category':_0x187a8a(0x1e3),'validator':_0x187a8a(0x18b)});}return _0x3e8145;}catch(_0x40c52f){return this['logger']?.['error'](_0x187a8a(0x1d5),{'error':_0x40c52f[_0x187a8a(0x1cd)]}),[{'file':_0x43e66,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS[_0x187a8a(0x1e1)]['ERROR'],'rule':'json-parse','message':'Invalid\x20JSON:\x20'+_0x40c52f[_0x187a8a(0x1cd)],'category':'syntax','validator':'json-parse'}];}}async['validateEnvFile'](_0x4b5886,_0x18176f={}){const _0x237f64=a0_0x492102;try{const _0x2f35cc=await a0_0x314b12[_0x237f64(0x1e9)](_0x4b5886,_0x237f64(0x194)),_0x11fd19=[],_0x5b5d22=_0x2f35cc[_0x237f64(0x1f1)]('\x0a'),_0xf65eb2=[{'pattern':/password|passwd|pwd/i,'name':_0x237f64(0x195)},{'pattern':/api[_-]?key/i,'name':_0x237f64(0x1c6)},{'pattern':/secret/i,'name':'secret'},{'pattern':/token/i,'name':'token'},{'pattern':/private[_-]?key/i,'name':'private\x20key'},{'pattern':/aws[_-]?access/i,'name':'AWS\x20credentials'}];return _0x5b5d22['forEach']((_0x13512a,_0x1c1cbe)=>{const _0x194349=_0x237f64,_0x1dbf3e=_0x13512a['trim']();if(!_0x1dbf3e||_0x1dbf3e[_0x194349(0x18a)]('#'))return;if(_0x1dbf3e[_0x194349(0x1c9)]('=')){const [_0x5db285,_0x452546]=_0x1dbf3e[_0x194349(0x1f1)]('='),_0x2aae29=_0x5db285[_0x194349(0x1fd)](),_0x5b9d61=_0x452546?.[_0x194349(0x1de)]()||'',_0x396b89=_0x5b9d61&&_0x5b9d61!==''&&!_0x5b9d61['startsWith']('$')&&_0x5b9d61!=='your-key-here'&&_0x5b9d61!=='changeme'&&_0x5b9d61[_0x194349(0x1ee)]>0x5;if(_0x396b89)for(const {pattern:_0x1d1b22,name:_0x15f77d}of _0xf65eb2){if(_0x1d1b22[_0x194349(0x1a8)](_0x2aae29)){_0x11fd19['push']({'file':_0x4b5886,'line':_0x1c1cbe+0x1,'column':0x1,'severity':STATIC_ANALYSIS[_0x194349(0x1e1)]['CRITICAL'],'rule':_0x194349(0x19d),'message':'Potential\x20hardcoded\x20'+_0x15f77d+'\x20detected\x20in\x20.env\x20file','category':_0x194349(0x18c),'validator':'env-validator','remediation':'Use\x20environment-specific\x20.env\x20files\x20and\x20add\x20.env\x20to\x20.gitignore'});break;}}}}),_0x11fd19;}catch(_0x32688e){return this['logger']?.[_0x237f64(0x1f7)](_0x237f64(0x1f0),{'error':_0x32688e['message']}),[];}}['detectFileType'](_0xd92638){const _0x147d52=a0_0x492102,_0x21a1c6=a0_0x1c908d[_0x147d52(0x1d9)](_0xd92638)['toLowerCase'](),_0x5826ae=a0_0x1c908d['dirname'](_0xd92638);if(_0x21a1c6==='dockerfile')return _0x147d52(0x1fa);if(_0x21a1c6==='docker-compose.yml'||_0x21a1c6===_0x147d52(0x1cf))return'docker-compose';if(_0x21a1c6==='package.json')return'package.json';if(_0x21a1c6==='tsconfig.json')return _0x147d52(0x1d2);if(_0x21a1c6===_0x147d52(0x1ab)||_0x21a1c6[_0x147d52(0x186)]('.env'))return _0x147d52(0x1c1);if(_0x5826ae[_0x147d52(0x1c9)](_0x147d52(0x1a6)))return'github-actions';if(_0x5826ae[_0x147d52(0x1c9)]('kubernetes')||_0x5826ae[_0x147d52(0x1c9)]('k8s'))return'kubernetes';const _0x24d1f9=a0_0x1c908d[_0x147d52(0x1a5)](_0xd92638)['toLowerCase']();if(_0x24d1f9===_0x147d52(0x1dd)||_0x24d1f9==='.tfvars')return _0x147d52(0x1d7);if(_0x24d1f9===_0x147d52(0x19a)||_0x24d1f9==='.yaml')return _0x147d52(0x1af);if(_0x24d1f9==='.json')return'json';return'unknown';}['normalizeResults'](_0x765061){const _0x312d4a=a0_0x492102;return _0x765061['map'](_0x36617c=>({'file':_0x36617c['file'],'line':_0x36617c[_0x312d4a(0x19c)]||0x1,'column':_0x36617c[_0x312d4a(0x1d0)]||0x1,'severity':_0x36617c['severity']||STATIC_ANALYSIS[_0x312d4a(0x1e1)][_0x312d4a(0x1db)],'rule':_0x36617c[_0x312d4a(0x1c3)]||'unknown','message':_0x36617c[_0x312d4a(0x1cd)]||_0x312d4a(0x1d1),'category':_0x36617c[_0x312d4a(0x183)]||'validation','validator':_0x36617c['validator'],'cwe':_0x36617c[_0x312d4a(0x180)]||null,'remediation':_0x36617c['remediation']||null,'references':_0x36617c[_0x312d4a(0x1bb)]||[]}));}['mapHadolintSeverity'](_0x3b73f8){const _0xc0e4cb=a0_0x492102,_0x358e2a={'error':STATIC_ANALYSIS['SEVERITY'][_0xc0e4cb(0x1bc)],'warning':STATIC_ANALYSIS[_0xc0e4cb(0x1e1)][_0xc0e4cb(0x1db)],'info':STATIC_ANALYSIS['SEVERITY'][_0xc0e4cb(0x1ed)],'style':STATIC_ANALYSIS[_0xc0e4cb(0x1e1)][_0xc0e4cb(0x1ed)]};return _0x358e2a[_0x3b73f8?.['toLowerCase']()]||STATIC_ANALYSIS['SEVERITY']['WARNING'];}['mapYamllintSeverity'](_0x3621bc){const _0x182bdb=a0_0x492102,_0x44d05a={'error':STATIC_ANALYSIS['SEVERITY'][_0x182bdb(0x1bc)],'warning':STATIC_ANALYSIS[_0x182bdb(0x1e1)][_0x182bdb(0x1db)]};return _0x44d05a[_0x3621bc?.[_0x182bdb(0x1fd)]()]||STATIC_ANALYSIS[_0x182bdb(0x1e1)][_0x182bdb(0x1db)];}['mapCheckovSeverity'](_0xe79726){const _0x38269d=a0_0x492102;return STATIC_ANALYSIS['SEVERITY'][_0x38269d(0x1bc)];}async[a0_0x492102(0x1e2)](){const _0x6981f6=a0_0x492102,_0x19eaf8=await this['detectAvailableValidators']();return{'validators':_0x19eaf8,'recommendations':this[_0x6981f6(0x1b9)](_0x19eaf8)};}['getInstallRecommendations'](_0x5057a9){const _0x43afed=a0_0x492102,_0x3022e3=[];return!_0x5057a9['checkov']&&_0x3022e3[_0x43afed(0x1b7)]({'validator':'checkov','reason':_0x43afed(0x1c2),'install':_0x43afed(0x19b),'priority':'high'}),!_0x5057a9[_0x43afed(0x1ec)]&&_0x3022e3['push']({'validator':'hadolint','reason':_0x43afed(0x1a9),'install':'Download from https://github.com/hadolint/hadolint/releases','priority':'high'}),!_0x5057a9[_0x43afed(0x1a3)]&&_0x3022e3['push']({'validator':_0x43afed(0x1a3),'reason':'YAML\x20file\x20validation','install':_0x43afed(0x182),'priority':_0x43afed(0x1e5)}),!_0x5057a9['jsonSchema']&&_0x3022e3[_0x43afed(0x1b7)]({'validator':_0x43afed(0x196),'reason':_0x43afed(0x1ae),'install':'npm\x20install\x20ajv\x20ajv-formats','priority':_0x43afed(0x1e5)}),_0x3022e3;}}function a0_0x41a0(){const _0x14170a=['sLnptIbJB25MAwD1CMf0Aw9UihzHBgLKyxrPB24','EwfTBa','CgfYC2u','BxvZDcbOyxzLihjLCxvPCMvKihbYB3bLCNr5icC','AgfKB2XPBNqGDMfSAwrHDgLVBIbMywLSzwq','iIaTlwzYyw1LD29YAYa','mtuWndG5mwffrxzYDq','CgfYC2vdAgvJA292uMvZDwX0CW','B2jQzwn0','ChvZAa','DMfSAwrHDgvqywnRywDLsNnVBG','z2v0sw5ZDgfSBfjLy29TBwvUzgf0Aw9UCW','CMvZDwX0CW','CMvMzxjLBMnLCW','rvjst1i','BM9jBxbSAwnPDefUEq','nMfbtxvcqq','zMLSzv9SAw5Lx3jHBMDL','mti2mdHJuLrLEgS','zw52','sw5MCMfZDhj1y3r1CMuGyxmGq29KzsbZzwn1CML0EsbZy2fUBMLUzYaOrg9JA2vYlcblDwjLCM5LDgvZlcbuzxjYywzVCM0P','CNvSzq','C2nHBM5LCKnHy2HL','y2HLy2TVDG','qvbjigTLEq','zgv0zwn0qxzHAwXHyMXLvMfSAwrHDg9YCW','CgfYC2vzyw1SBgLUDfjLC3vSDhm','Aw5JBhvKzxm','C3rYAw5N','AgfKB2XPBNqGBM90igf2ywLSywjSzq','DMfSAwrHDgvxAxrOq2HLy2TVDG','BwvZC2fNzq','y29TCgLSzxjpChrPB25Z','zg9JA2vYlwnVBxbVC2uUEwfTBa','y29SDw1U','vMfSAwrHDgLVBIbPC3n1zsbKzxrLy3rLza','DhnJB25MAwCUANnVBG','DMvYC2LVBG','ndC3mtK0ne1is0fvDa','DhnJB25MAwCUANnVBIb2ywXPzgf0Aw9UigzHAwXLza','zgvIDwC','DgvYCMfMB3jT','DMfSAwrHDgvzqu1m','yMfZzw5HBwu','BwfWsgfKB2XPBNrtzxzLCML0Eq','v0fstKLorW','nte2mZuYu1POwMDj','lNrM','DhjPBq','y29TBw9UANm','vw5RBM93BIbJB25MAwCGzMLSzsb0ExbL','u0vwrvjjvfK','z2v0vMfSAwrHDg9Yu3rHDhvZ','yMvZDc1WCMfJDgLJzq','CgfYC2viywrVBgLUDfjLC3vSDhm','BwvKAxvT','BwfW','EwfTBgXPBNqGBM90igf2ywLSywjSzq','EwfTBgXPBNqGzgv0zwn0zwq','CMvHzezPBgu','mZbjEeriCxq','C3rYAwn0','AgfKB2XPBNq','su5gtW','BgvUz3rO','nJC5ntjev3foB1K','lMvUDIb2ywXPzgf0Aw9UigzHAwXLza','C3bSAxq','ANnVBI1WyxjZzq','BM9YBwfSAxPLuMvZDwX0CW','A3vIzxjUzxrLCW','mZbhtK1JzwC','yxzHAwXHyMXLu2nHBM5LCNm','zxjYB3i','z2L0AhvIlwfJDgLVBNm','ywP2','zg9JA2vYzMLSzq','y2HLy2TFy2XHC3m','zg9JA2vYx2nVBxbVC2u','Dg9mB3DLCKnHC2u','AxnbCNjHEq','y3DL','mteWnJq5mhLcBuvntq','CgLWigLUC3rHBgWGEwfTBgXPBNq','y2f0zwDVCNK','mtnytLniy2W','zMfPBgvKx2nOzwnRCW','zw5KC1DPDgG','AgfKB2XPBNqGzgv0zwn0zwq','y2HLy2TVDIb2ywXPzgf0Aw9UigzHAwXLza','Bg9Nz2vY','C3rHCNrZv2L0Aa','DhnJB25MAwCTDMfSAwrHDg9Y','C2vJDxjPDhK','zxjYB3jZ','Aw5ZDgfUy2vqyxrO','y2HLy2TVDIbKzxrLy3rLza','DMfSAwrHDgu','BM8TAw1WBgLJAxqTyw55','rgLZywjSAw5Nig5Vsw1WBgLJAxrbBNKGCMvKDwnLCYb0ExbLihnHzMv0Eq','ota0ode3oxvOy2L5tW','DxrMltG','CgfZC3DVCMq','ywP2icHku09oifnJAgvTysK','EwfTBgXPBNqGlwyGCgfYC2fIBguGiG','q29UC2LKzxiGzw5HyMXPBMCGiNn0CMLJDciGBw9KzsbMB3iGyMv0DgvYihr5CguGC2fMzxr5','mZC4BNnuEerg','lNLTBa','CgLWigLUC3rHBgWGy2HLy2TVDG','BgLUzq','AgfYzgnVzgvKlxnLy3jLDa','BwfWq2HLy2TVDLnLDMvYAxr5','DMfSAwrHDgveB2nRzxjMAwXL','ywP2lwzVCM1HDhm','C3rKB3v0','EwfTBgXPBNqGDMfSAwrHDgLVBIbMywLSzwq','EwfTBgXPBNq','y2HLy2TFAwq','zxH0BMfTzq','lMDPDgH1yI93B3jRzMXVD3m','zg9JA2vYlwnVBxbVC2u','DgvZDa','rg9JA2vYzMLSzsbSAw50Aw5NigfUzcbIzxn0ihbYywn0AwnLCW','sLnptIbty2HLBweGDMfSAwrHDgLVBIbHDMfPBgfIBgu','lMvUDG','AgfKB2XPBNqGls1MB3jTyxqGANnVBIaI','ntC5qxzkANrL'];a0_0x41a0=function(){return _0x14170a;};return a0_0x41a0();}export default ConfigValidator;
1
+ const a0_0x139174=a0_0x4c0b;(function(_0x5f1c09,_0xb22bfa){const _0xa4c00=a0_0x4c0b,_0x1589b2=_0x5f1c09();while(!![]){try{const _0x11b80e=-parseInt(_0xa4c00(0xa5))/0x1*(parseInt(_0xa4c00(0xc8))/0x2)+parseInt(_0xa4c00(0x117))/0x3+parseInt(_0xa4c00(0xb1))/0x4+parseInt(_0xa4c00(0xa6))/0x5*(parseInt(_0xa4c00(0x10c))/0x6)+parseInt(_0xa4c00(0xdf))/0x7*(-parseInt(_0xa4c00(0xed))/0x8)+parseInt(_0xa4c00(0xaf))/0x9+-parseInt(_0xa4c00(0x104))/0xa*(-parseInt(_0xa4c00(0x10e))/0xb);if(_0x11b80e===_0xb22bfa)break;else _0x1589b2['push'](_0x1589b2['shift']());}catch(_0x584cb9){_0x1589b2['push'](_0x1589b2['shift']());}}}(a0_0x2125,0x47502));import{exec}from'child_process';import{promisify}from'util';function a0_0x4c0b(_0x3e4144,_0x1f8f61){_0x3e4144=_0x3e4144-0xa1;const _0x212586=a0_0x2125();let _0x4c0bbb=_0x212586[_0x3e4144];if(a0_0x4c0b['IAtogF']===undefined){var _0x25f521=function(_0x2913f3){const _0x14fafe='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x540e72='',_0x11a307='';for(let _0x5df910=0x0,_0x543086,_0x5747a7,_0xad5b6c=0x0;_0x5747a7=_0x2913f3['charAt'](_0xad5b6c++);~_0x5747a7&&(_0x543086=_0x5df910%0x4?_0x543086*0x40+_0x5747a7:_0x5747a7,_0x5df910++%0x4)?_0x540e72+=String['fromCharCode'](0xff&_0x543086>>(-0x2*_0x5df910&0x6)):0x0){_0x5747a7=_0x14fafe['indexOf'](_0x5747a7);}for(let _0x496448=0x0,_0x4a511c=_0x540e72['length'];_0x496448<_0x4a511c;_0x496448++){_0x11a307+='%'+('00'+_0x540e72['charCodeAt'](_0x496448)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x11a307);};a0_0x4c0b['bJyoAD']=_0x25f521,a0_0x4c0b['KRtixn']={},a0_0x4c0b['IAtogF']=!![];}const _0x489ee9=_0x212586[0x0],_0x9cda41=_0x3e4144+_0x489ee9,_0x42f87d=a0_0x4c0b['KRtixn'][_0x9cda41];return!_0x42f87d?(_0x4c0bbb=a0_0x4c0b['bJyoAD'](_0x4c0bbb),a0_0x4c0b['KRtixn'][_0x9cda41]=_0x4c0bbb):_0x4c0bbb=_0x42f87d,_0x4c0bbb;}import a0_0x540e72 from'path';function a0_0x2125(){const _0x45f04e=['DMfSAwrHDgvzqu1m','Aw5ZDgfUy2vqyxrO','ANnVBI1Zy2HLBwe','CgfYC2viywrVBgLUDfjLC3vSDhm','zMfPBgvKx2nOzwnRCW','odaZodrUufrTt0q','yMvZDc1WCMfJDgLJzq','z2v0vMfSAwrHDg9Yu3rHDhvZ','BwvKAxvT','zw52lxzHBgLKyxrVCG','zMLSzv9SAw5Lx3jHBMDL','DMfSAwrHDgLVBG','DMfSAwrHDgvuC0nVBMzPzW','DhnJB25MAwCTDMfSAwrHDg9Y','Dw5RBM93BG','qvbjigTLEq','rgLZywjSAw5Nig5Vsw1WBgLJAxrbBNKGCMvKDwnLCYb0ExbLihnHzMv0Eq','lMPZB24','zMLSDgvY','zw5KC1DPDgG','zMLSzq','D2fYBG','qvDtignYzwrLBNrPywXZ','EwfTBgXPBNq','DMfSAwrHDgvxAxrOq2HLy2TVDG','y29TCgLSzq','BwLZC2LUz1bYB3bLCNr5','BM9YBwfSAxPLuMvZDwX0CW','mtbTzwzdvxG','rvjst1i','DgvYCMfMB3jT','u0vwrvjjvfK','DhjPBq','AxnbCNjHEq','yxzHAwXHyMXLu2nHBM5LCNm','rMfPBgvKihrVihbHCNnLignOzwnRB3yGB3v0Chv0','mtaXmZi4zwj1CeXP','BMfTzq','mtq0nZmWm29rwurQAq','zg9JA2vYlwnVBxbVC2u','CgfYC2vzyw1SBgLUDfjLC3vSDhm','zg9JA2vYzMLSzq','CgfJA2fNzs5QC29U','DxrMltG','CMvZDwX0CW','C3rYAw5N','AgfKB2XPBNqGls1MB3jTyxqGANnVBIaI','mtyWntaXoeToEK1pEG','sLnptIbty2HLBweGDMfSAwrHDgLVBIbHDMfPBgfIBgu','BwvZC2fNzq','C3rYAwn0lw1Vzgu','Bw9KDwXL','AgfKB2XPBNqGzgv0zwn0zwq','EwfTBgXPBNqGBM90igf2ywLSywjSzq','zgLYBMfTzq','zgvIDwC','B2jQzwn0','zgv0zwn0qxzHAwXHyMXLvMfSAwrHDg9YCW','zxjYB3i','CgLWigLUC3rHBgWGEwfTBgXPBNq','oda2nJj3zfDeBxa','ndvdzuvIy3i','AgLNAa','C3bSAxq','Bgv2zwW','y2HLy2TVDIaTlxzLCNnPB24','q1jjveLdquW','y2HLy2TFBMfTzq','y2HHBMDLBwu','vMfSAwrHDgLVBIbPC3n1zsbKzxrLy3rLza','mtaXmJG2CfHtCNn1','y2f0zwDVCNK','mJyXnZi0weLbBNbA','A3vIzxjUzxrLCW','y29TCgLSzxjpChrPB25Z','ywP2ig5VDcbHDMfPBgfIBgu','rg9JA2vYzMLSzsbSAw50Aw5NigfUzcbIzxn0ihbYywn0AwnLCW','CgfYC2vdAgvJA292uMvZDwX0CW','Bg9Nz2vY','xIG/oKbBys16mc05lx5Dw2eTEJaTos0Ux35DkI8Pp1THlxOWltKTFL1Bys16mc05ls5FFL0Qja','BgLUzq','C3LUDgf4','y2HLy2TVDIaTzIaI','BxvZDcbOyxzLihjLCxvPCMvKihbYB3bLCNr5icC','iIaTlwzYyw1LD29YAYa','z3vPzgvSAw5L','BNbTigLUC3rHBgWGywP2igfQDI1MB3jTyxrZ','DMfSAwrHDgveB2nRzxjMAwXL','y2HLy2TVDG','sw5MCMfZDhj1y3r1CMuGyxmGq29KzsbZzwn1CML0EsbZy2fUBMLUzYaOrg9JA2vYlcblDwjLCM5LDgvZlcbuzxjYywzVCM0P','DMfSAwrHDgu','lMvUDG','CMvMzxjLBMnLCW','ANnVBLnJAgvTyq','v0fstKLorW','mLLAyKXtuq','zg9JA2vYx2nVBxbVC2u','DMfSAwrHDg9Y','EwfTBa','Aw5JBhvKzxm','DMfSAwrHDgvfBNzgAwXL','AZHZ','y2HLy2TFy2XHC3m','CgfZC3DVCMq','su5gtW','CMvTzwrPyxrPB24','BM9jBxbSAwnPDefUEq','ANnVBG','BwfWwwfTBgXPBNrtzxzLCML0Eq','CgfYC2u','ChvZAa','z2v0sw5ZDgfSBfjLy29TBwvUzgf0Aw9UCW','y29SDw1U','zxH0BMfTzq','ANnVBI1WyxjZzq','BM8TAw1WBgLJAxqTyw55','ywP2','CMvHzezPBgu','mZy0BLjJvhnT','DMvYC2LVBG','y2HLy2TVDIb2ywXPzgf0Aw9UigzHAwXLza','C3rKB3v0','y29Kzq','AgfKB2XPBNq','DhnJB25MAwCUANnVBIb2ywXPzgf0Aw9UigzHAwXLza','C2nHBM5LCKnHy2HL','zw52'];a0_0x2125=function(){return _0x45f04e;};return a0_0x2125();}import a0_0x11a307 from'fs/promises';import{STATIC_ANALYSIS}from'../utilities/constants.js';const execAsync=promisify(exec);class ConfigValidator{constructor(_0x5df910=null){const _0x3331d1=a0_0x4c0b;this['logger']=_0x5df910,this[_0x3331d1(0x10a)]=null,this[_0x3331d1(0xe6)]=new Map();}async['detectAvailableValidators'](){const _0xf621e6=a0_0x4c0b;if(this['availableScanners']!==null)return this['availableScanners'];const _0x543086={'checkov':![],'hadolint':![],'yamllint':![],'jsonSchema':![]};try{await execAsync(_0xf621e6(0xaa),{'timeout':0x1388}),_0x543086[_0xf621e6(0xc1)]=!![],this[_0xf621e6(0xb7)]?.['debug']('checkov\x20detected');}catch(_0x5747a7){this['logger']?.['debug']('checkov\x20not\x20available',{'error':_0x5747a7['message']});}try{await execAsync('hadolint\x20--version',{'timeout':0x1388}),_0x543086[_0xf621e6(0xe4)]=!![],this['logger']?.[_0xf621e6(0x11f)](_0xf621e6(0x11c));}catch(_0xad5b6c){this[_0xf621e6(0xb7)]?.[_0xf621e6(0x11f)]('hadolint\x20not\x20available',{'error':_0xad5b6c[_0xf621e6(0x119)]});}try{await execAsync('yamllint\x20--version',{'timeout':0x1388}),_0x543086[_0xf621e6(0xff)]=!![],this[_0xf621e6(0xb7)]?.[_0xf621e6(0x11f)]('yamllint\x20detected');}catch(_0x496448){this['logger']?.[_0xf621e6(0x11f)](_0xf621e6(0x11d),{'error':_0x496448[_0xf621e6(0x119)]});}try{await import(_0xf621e6(0xdd)),_0x543086['jsonSchema']=!![],this[_0xf621e6(0xb7)]?.['debug'](_0xf621e6(0x118));}catch(_0x4a511c){this[_0xf621e6(0xb7)]?.[_0xf621e6(0x11f)](_0xf621e6(0xb4),{'error':_0x4a511c['message']});}return this[_0xf621e6(0x10a)]=_0x543086,_0x543086;}async[a0_0x139174(0xc3)](_0x4a1e59,_0x5cf3fe={}){const _0xcb4374=a0_0x139174,_0x3eceb9=[],_0x14d43f=await this['detectAvailableValidators'](),_0xf47cd8=this['detectFileType'](_0x4a1e59);this[_0xcb4374(0xb7)]?.['debug']('Validating\x20config\x20file',{'filePath':_0x4a1e59,'fileType':_0xf47cd8});switch(_0xf47cd8){case _0xcb4374(0x111):if(_0x14d43f[_0xcb4374(0xe4)]){const _0x8b6624=await this[_0xcb4374(0xc0)](_0x4a1e59,_0x5cf3fe);_0x3eceb9['push'](..._0x8b6624);}if(_0x14d43f['checkov']){const _0x295a6c=await this['validateWithCheckov'](_0x4a1e59,'dockerfile',_0x5cf3fe);_0x3eceb9[_0xcb4374(0xd7)](..._0x295a6c);}break;case _0xcb4374(0x10f):if(_0x14d43f[_0xcb4374(0xff)]){const _0x370c28=await this[_0xcb4374(0xe8)](_0x4a1e59,_0x5cf3fe);_0x3eceb9['push'](..._0x370c28);}if(_0x14d43f['checkov']){const _0x165e83=await this[_0xcb4374(0x100)](_0x4a1e59,_0xcb4374(0xc9),_0x5cf3fe);_0x3eceb9[_0xcb4374(0xd7)](..._0x165e83);}break;case'kubernetes':if(_0x14d43f[_0xcb4374(0xff)]){const _0x47e036=await this[_0xcb4374(0xe8)](_0x4a1e59,_0x5cf3fe);_0x3eceb9[_0xcb4374(0xd7)](..._0x47e036);}if(_0x14d43f[_0xcb4374(0xc1)]){const _0x31fec2=await this['validateWithCheckov'](_0x4a1e59,'kubernetes',_0x5cf3fe);_0x3eceb9['push'](..._0x31fec2);}break;case _0xcb4374(0x106):if(_0x14d43f[_0xcb4374(0xc1)]){const _0x571777=await this['validateWithCheckov'](_0x4a1e59,'terraform',_0x5cf3fe);_0x3eceb9['push'](..._0x571777);}break;case'package.json':if(_0x14d43f[_0xcb4374(0xc6)]){const _0x1cf00b=await this['validatePackageJson'](_0x4a1e59,_0x5cf3fe);_0x3eceb9[_0xcb4374(0xd7)](..._0x1cf00b);}break;case'tsconfig.json':if(_0x14d43f[_0xcb4374(0xc6)]){const _0x3ebc98=await this['validateTsConfig'](_0x4a1e59,_0x5cf3fe);_0x3eceb9['push'](..._0x3ebc98);}break;case'github-actions':if(_0x14d43f[_0xcb4374(0xff)]){const _0x5d0137=await this[_0xcb4374(0xe8)](_0x4a1e59,_0x5cf3fe);_0x3eceb9['push'](..._0x5d0137);}break;case _0xcb4374(0xe7):const _0x22eede=await this[_0xcb4374(0xcd)](_0x4a1e59,_0x5cf3fe);_0x3eceb9[_0xcb4374(0xd7)](..._0x22eede);break;case _0xcb4374(0xcb):if(_0x14d43f['yamllint']){const _0x410ee8=await this['validateYAML'](_0x4a1e59,_0x5cf3fe);_0x3eceb9[_0xcb4374(0xd7)](..._0x410ee8);}break;default:this[_0xcb4374(0xb7)]?.[_0xcb4374(0xfd)]('Unknown\x20config\x20file\x20type',{'filePath':_0x4a1e59,'fileType':_0xf47cd8});return[];}return this[_0xcb4374(0x103)](_0x3eceb9);}async[a0_0x139174(0xc0)](_0x3dadb1,_0x16dea7={}){const _0x35019b=a0_0x139174;try{const _0x17b6a6=await execAsync(_0x35019b(0x116)+_0x3dadb1+'\x22',{'maxBuffer':0xa*0x400*0x400,'timeout':0x7530}),_0xe8ffb1=JSON[_0x35019b(0xd6)](_0x17b6a6[_0x35019b(0xe2)]);return this[_0x35019b(0xeb)](_0xe8ffb1,_0x3dadb1);}catch(_0x522163){if(_0x522163['stdout'])try{const _0x29913e=JSON[_0x35019b(0xd6)](_0x522163[_0x35019b(0xe2)]);return this['parseHadolintResults'](_0x29913e,_0x3dadb1);}catch(_0x50a703){this[_0x35019b(0xb7)]?.['error']('Failed\x20to\x20parse\x20hadolint\x20output',{'error':_0x50a703[_0x35019b(0x119)]});}return this[_0x35019b(0xb7)]?.['error']('hadolint\x20validation\x20failed',{'error':_0x522163['message']}),[];}}[a0_0x139174(0xeb)](_0x3324a2,_0xf06f28){const _0x4ea50e=a0_0x139174,_0x6e14b=[];if(Array[_0x4ea50e(0x109)](_0x3324a2))for(const _0x1b8539 of _0x3324a2){_0x6e14b['push']({'file':_0xf06f28,'line':_0x1b8539['line']||0x1,'column':_0x1b8539['column']||0x1,'severity':this['mapHadolintSeverity'](_0x1b8539[_0x4ea50e(0xa9)]),'rule':_0x1b8539[_0x4ea50e(0xe3)],'message':_0x1b8539[_0x4ea50e(0x119)],'category':'dockerfile','validator':'hadolint'});}return _0x6e14b;}async[a0_0x139174(0xe8)](_0x4baf84,_0x214011={}){const _0x181b2a=a0_0x139174;try{const _0x2f9df1=await execAsync('yamllint\x20-f\x20parsable\x20\x22'+_0x4baf84+'\x22',{'maxBuffer':0xa*0x400*0x400,'timeout':0x7530});return this['parseYamllintResults'](_0x2f9df1[_0x181b2a(0xe2)],_0x4baf84);}catch(_0x2c1dfe){if(_0x2c1dfe[_0x181b2a(0xe2)])return this[_0x181b2a(0x110)](_0x2c1dfe['stdout'],_0x4baf84);return this['logger']?.['error']('yamllint\x20validation\x20failed',{'error':_0x2c1dfe['message']}),[];}}[a0_0x139174(0x110)](_0x231d67,_0x26cf3e){const _0x248696=a0_0x139174,_0x1594dc=[],_0x556488=_0x231d67['split']('\x0a')[_0x248696(0xfa)](_0x6c67fb=>_0x6c67fb[_0x248696(0x108)]());for(const _0x330a60 of _0x556488){const _0x2aff0f=_0x330a60['match'](/^(.+?):(\d+):(\d+):\s*\[(\w+)\]\s*(.+?)\s*\((.+?)\)/);if(_0x2aff0f){const [,_0x4bee1e,_0x5c2d76,_0x58ea7d,_0xcfa77b,_0xb7e7d3,_0x488e86]=_0x2aff0f;_0x1594dc['push']({'file':_0x26cf3e,'line':parseInt(_0x5c2d76,0xa),'column':parseInt(_0x58ea7d,0xa),'severity':this[_0x248696(0xd5)](_0xcfa77b),'rule':_0x488e86,'message':_0xb7e7d3,'category':_0x248696(0xcb),'validator':'yamllint'});}}return _0x1594dc;}async['validateWithCheckov'](_0x18d8df,_0x237633,_0x39d821={}){const _0x37ebef=a0_0x139174;try{const _0x4a3a58=await execAsync(_0x37ebef(0xbb)+_0x18d8df+_0x37ebef(0xbd)+_0x237633+'\x20--output\x20json\x20--compact',{'maxBuffer':0xa*0x400*0x400,'timeout':0xea60}),_0x132980=JSON[_0x37ebef(0xd6)](_0x4a3a58['stdout']);return this[_0x37ebef(0xb6)](_0x132980,_0x18d8df);}catch(_0x177ee8){if(_0x177ee8['stdout'])try{const _0x59fc1c=JSON['parse'](_0x177ee8[_0x37ebef(0xe2)]);return this['parseCheckovResults'](_0x59fc1c,_0x18d8df);}catch(_0x50dc7c){this[_0x37ebef(0xb7)]?.[_0x37ebef(0xa3)](_0x37ebef(0x10b),{'error':_0x50dc7c['message']});}return this[_0x37ebef(0xb7)]?.[_0x37ebef(0xa3)](_0x37ebef(0xe1),{'error':_0x177ee8[_0x37ebef(0x119)]}),[];}}['parseCheckovResults'](_0x9b4ac5,_0x3424c6){const _0xf53fd2=a0_0x139174,_0x5c06bc=[];if(_0x9b4ac5['results']&&_0x9b4ac5[_0xf53fd2(0x114)][_0xf53fd2(0xec)])for(const _0x34267a of _0x9b4ac5[_0xf53fd2(0x114)]['failed_checks']){_0x5c06bc['push']({'file':_0x3424c6,'line':_0x34267a[_0xf53fd2(0xf2)]?_0x34267a[_0xf53fd2(0xf2)][0x0]:0x1,'column':0x1,'severity':this['mapCheckovSeverity'](_0x34267a[_0xf53fd2(0xcf)]),'rule':_0x34267a['check_id'],'message':_0x34267a[_0xf53fd2(0xac)]||_0x34267a['check_id'],'category':'security','validator':_0xf53fd2(0xc1),'remediation':_0x34267a['guideline'],'cwe':_0x34267a['cwe'],'references':_0x34267a['guideline']?[_0x34267a[_0xf53fd2(0xbe)]]:[]});}return _0x5c06bc;}async['validatePackageJson'](_0x666994,_0xe9feca={}){const _0x5e7203=a0_0x139174;try{const _0x55b227=(await import(_0x5e7203(0xdd)))['default'],_0x1788aa=(await import('ajv-formats'))['default'],_0x13bba2=await a0_0x11a307[_0x5e7203(0xde)](_0x666994,'utf-8'),_0x5dd2f6=JSON['parse'](_0x13bba2),_0x1fb457=new _0x55b227({'allErrors':!![],'strict':![]});_0x1788aa(_0x1fb457);const _0x1ca704={'type':_0x5e7203(0xa1),'required':[_0x5e7203(0x10d),_0x5e7203(0xe0)],'properties':{'name':{'type':_0x5e7203(0x115),'pattern':_0x5e7203(0xb8)},'version':{'type':_0x5e7203(0x115)},'description':{'type':_0x5e7203(0x115)},'main':{'type':'string'},'type':{'type':'string','enum':[_0x5e7203(0x11b),'commonjs']},'scripts':{'type':'object'},'dependencies':{'type':_0x5e7203(0xa1)},'devDependencies':{'type':_0x5e7203(0xa1)}},'additionalProperties':!![]},_0x4df503=_0x1fb457[_0x5e7203(0x101)](_0x1ca704),_0x42341d=_0x4df503(_0x5dd2f6);if(!_0x42341d&&_0x4df503['errors'])return _0x4df503['errors']['map'](_0xbdc974=>({'file':_0x666994,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS[_0x5e7203(0x107)]['ERROR'],'rule':_0x5e7203(0xea),'message':_0xbdc974[_0x5e7203(0xe9)]?_0xbdc974[_0x5e7203(0xe9)]+'\x20'+_0xbdc974[_0x5e7203(0x119)]:_0x5e7203(0xbc)+_0xbdc974['params'][_0x5e7203(0x102)]+'\x27','category':_0x5e7203(0xf3),'validator':_0x5e7203(0xea)}));return[];}catch(_0x4f80de){return this[_0x5e7203(0xb7)]?.[_0x5e7203(0xa3)]('package.json\x20validation\x20failed',{'error':_0x4f80de[_0x5e7203(0x119)]}),[{'file':_0x666994,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS[_0x5e7203(0x107)]['ERROR'],'rule':'json-parse','message':'Invalid\x20JSON:\x20'+_0x4f80de[_0x5e7203(0x119)],'category':_0x5e7203(0xba),'validator':_0x5e7203(0xdb)}];}}async[a0_0x139174(0xf4)](_0x3ce75a,_0x18eba7={}){const _0x2fc977=a0_0x139174;try{const _0x116a72=await a0_0x11a307['readFile'](_0x3ce75a,'utf-8'),_0x6105dd=JSON['parse'](_0x116a72),_0x10b297=[];if(_0x6105dd['compilerOptions']){const _0x4a8883=_0x6105dd[_0x2fc977(0xb3)];!_0x4a8883['strict']&&_0x10b297['push']({'file':_0x3ce75a,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS[_0x2fc977(0x107)]['WARNING'],'rule':_0x2fc977(0x11a),'message':'Consider\x20enabling\x20\x22strict\x22\x20mode\x20for\x20better\x20type\x20safety','category':_0x2fc977(0xee),'validator':'tsconfig-validator'}),_0x4a8883[_0x2fc977(0xd3)]===![]&&_0x10b297[_0x2fc977(0xd7)]({'file':_0x3ce75a,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS[_0x2fc977(0x107)]['WARNING'],'rule':_0x2fc977(0xdc),'message':_0x2fc977(0xf8),'category':'best-practice','validator':_0x2fc977(0xf5)});}return _0x10b297;}catch(_0x3223ac){return this[_0x2fc977(0xb7)]?.['error'](_0x2fc977(0xe5),{'error':_0x3223ac['message']}),[{'file':_0x3ce75a,'line':0x1,'column':0x1,'severity':STATIC_ANALYSIS['SEVERITY']['ERROR'],'rule':'json-parse','message':'Invalid\x20JSON:\x20'+_0x3223ac[_0x2fc977(0x119)],'category':'syntax','validator':'json-parse'}];}}async[a0_0x139174(0xcd)](_0x3683e7,_0x23905d={}){const _0x4abb6b=a0_0x139174;try{const _0x41aa08=await a0_0x11a307['readFile'](_0x3683e7,_0x4abb6b(0x113)),_0x567c10=[],_0x2f0d14=_0x41aa08[_0x4abb6b(0xa8)]('\x0a'),_0x2e496e=[{'pattern':/password|passwd|pwd/i,'name':_0x4abb6b(0xd0)},{'pattern':/api[_-]?key/i,'name':_0x4abb6b(0xf7)},{'pattern':/secret/i,'name':'secret'},{'pattern':/token/i,'name':'token'},{'pattern':/private[_-]?key/i,'name':'private\x20key'},{'pattern':/aws[_-]?access/i,'name':_0x4abb6b(0xfe)}];return _0x2f0d14['forEach']((_0x8d4845,_0x1a5023)=>{const _0x52dbd6=_0x4abb6b,_0x572620=_0x8d4845['trim']();if(!_0x572620||_0x572620['startsWith']('#'))return;if(_0x572620[_0x52dbd6(0xcc)]('=')){const [_0x2e30a2,_0x209831]=_0x572620['split']('='),_0x3dfc84=_0x2e30a2['toLowerCase'](),_0x39cdbd=_0x209831?.['trim']()||'',_0x5cee4f=_0x39cdbd&&_0x39cdbd!==''&&!_0x39cdbd['startsWith']('$')&&_0x39cdbd!=='your-key-here'&&_0x39cdbd!==_0x52dbd6(0xad)&&_0x39cdbd['length']>0x5;if(_0x5cee4f)for(const {pattern:_0x5d1dfe,name:_0x4eb37a}of _0x2e496e){if(_0x5d1dfe['test'](_0x3dfc84)){_0x567c10[_0x52dbd6(0xd7)]({'file':_0x3683e7,'line':_0x1a5023+0x1,'column':0x1,'severity':STATIC_ANALYSIS['SEVERITY'][_0x52dbd6(0xab)],'rule':'hardcoded-secret','message':'Potential\x20hardcoded\x20'+_0x4eb37a+'\x20detected\x20in\x20.env\x20file','category':'security','validator':_0x52dbd6(0xf1),'remediation':'Use\x20environment-specific\x20.env\x20files\x20and\x20add\x20.env\x20to\x20.gitignore'});break;}}}}),_0x567c10;}catch(_0x2a7eb4){return this[_0x4abb6b(0xb7)]?.[_0x4abb6b(0xa3)]('.env\x20validation\x20failed',{'error':_0x2a7eb4[_0x4abb6b(0x119)]}),[];}}['detectFileType'](_0x2b8479){const _0x30622a=a0_0x139174,_0x5b195a=a0_0x540e72['basename'](_0x2b8479)['toLowerCase'](),_0x2394ff=a0_0x540e72[_0x30622a(0x11e)](_0x2b8479);if(_0x5b195a===_0x30622a(0x111))return'dockerfile';if(_0x5b195a==='docker-compose.yml'||_0x5b195a==='docker-compose.yaml')return'docker-compose';if(_0x5b195a===_0x30622a(0x112))return _0x30622a(0x112);if(_0x5b195a==='tsconfig.json')return'tsconfig.json';if(_0x5b195a==='.env'||_0x5b195a[_0x30622a(0xfb)](_0x30622a(0xc4)))return'env';if(_0x2394ff[_0x30622a(0xcc)]('.github/workflows'))return'github-actions';if(_0x2394ff['includes'](_0x30622a(0xb2))||_0x2394ff['includes'](_0x30622a(0xce)))return _0x30622a(0xb2);const _0x2f7dc1=a0_0x540e72[_0x30622a(0xda)](_0x2b8479)['toLowerCase']();if(_0x2f7dc1==='.tf'||_0x2f7dc1==='.tfvars')return'terraform';if(_0x2f7dc1==='.yml'||_0x2f7dc1==='.yaml')return'yaml';if(_0x2f7dc1===_0x30622a(0xf9))return _0x30622a(0xd4);return'unknown';}['normalizeResults'](_0x1c0acb){const _0x3b65dc=a0_0x139174;return _0x1c0acb['map'](_0x1eb77a=>({'file':_0x1eb77a[_0x3b65dc(0xfc)],'line':_0x1eb77a[_0x3b65dc(0xb9)]||0x1,'column':_0x1eb77a[_0x3b65dc(0xd9)]||0x1,'severity':_0x1eb77a['severity']||STATIC_ANALYSIS['SEVERITY']['WARNING'],'rule':_0x1eb77a['rule']||_0x3b65dc(0xf6),'message':_0x1eb77a['message']||_0x3b65dc(0xae),'category':_0x1eb77a[_0x3b65dc(0xb0)]||_0x3b65dc(0xf3),'validator':_0x1eb77a[_0x3b65dc(0xca)],'cwe':_0x1eb77a['cwe']||null,'remediation':_0x1eb77a[_0x3b65dc(0xd2)]||null,'references':_0x1eb77a[_0x3b65dc(0xc5)]||[]}));}['mapHadolintSeverity'](_0x25636b){const _0x489655=a0_0x139174,_0x599a03={'error':STATIC_ANALYSIS[_0x489655(0x107)]['ERROR'],'warning':STATIC_ANALYSIS['SEVERITY'][_0x489655(0xc7)],'info':STATIC_ANALYSIS[_0x489655(0x107)][_0x489655(0xd1)],'style':STATIC_ANALYSIS[_0x489655(0x107)][_0x489655(0xd1)]};return _0x599a03[_0x25636b?.['toLowerCase']()]||STATIC_ANALYSIS['SEVERITY'][_0x489655(0xc7)];}['mapYamllintSeverity'](_0x412bef){const _0x4f48e7=a0_0x139174,_0x5dbf7d={'error':STATIC_ANALYSIS['SEVERITY'][_0x4f48e7(0x105)],'warning':STATIC_ANALYSIS[_0x4f48e7(0x107)]['WARNING']};return _0x5dbf7d[_0x412bef?.['toLowerCase']()]||STATIC_ANALYSIS[_0x4f48e7(0x107)]['WARNING'];}['mapCheckovSeverity'](_0x55c748){return STATIC_ANALYSIS['SEVERITY']['ERROR'];}async[a0_0x139174(0xef)](){const _0x543270=a0_0x139174,_0x335a65=await this[_0x543270(0xa2)]();return{'validators':_0x335a65,'recommendations':this[_0x543270(0xd8)](_0x335a65)};}[a0_0x139174(0xd8)](_0x34c020){const _0x22281b=a0_0x139174,_0x34acf6=[];return!_0x34c020[_0x22281b(0xc1)]&&_0x34acf6['push']({'validator':'checkov','reason':_0x22281b(0xc2),'install':'pip\x20install\x20checkov','priority':_0x22281b(0xa7)}),!_0x34c020[_0x22281b(0xe4)]&&_0x34acf6['push']({'validator':_0x22281b(0xe4),'reason':_0x22281b(0xb5),'install':'Download from https://github.com/hadolint/hadolint/releases','priority':'high'}),!_0x34c020['yamllint']&&_0x34acf6['push']({'validator':_0x22281b(0xff),'reason':'YAML\x20file\x20validation','install':_0x22281b(0xa4),'priority':'medium'}),!_0x34c020['jsonSchema']&&_0x34acf6['push']({'validator':'ajv\x20(JSON\x20Schema)','reason':'JSON\x20configuration\x20validation','install':_0x22281b(0xbf),'priority':_0x22281b(0xf0)}),_0x34acf6;}}export default ConfigValidator;
@@ -1 +1 @@
1
- const a0_0x13952d=a0_0x5b80;(function(_0x7cf9cf,_0x3fbef2){const _0x2605c5=a0_0x5b80,_0x3ef45c=_0x7cf9cf();while(!![]){try{const _0x214f46=parseInt(_0x2605c5(0xfb))/0x1+-parseInt(_0x2605c5(0x101))/0x2+-parseInt(_0x2605c5(0x108))/0x3*(-parseInt(_0x2605c5(0x102))/0x4)+-parseInt(_0x2605c5(0xf0))/0x5*(parseInt(_0x2605c5(0x115))/0x6)+parseInt(_0x2605c5(0x126))/0x7+-parseInt(_0x2605c5(0x106))/0x8*(parseInt(_0x2605c5(0x114))/0x9)+-parseInt(_0x2605c5(0x105))/0xa*(-parseInt(_0x2605c5(0x12b))/0xb);if(_0x214f46===_0x3fbef2)break;else _0x3ef45c['push'](_0x3ef45c['shift']());}catch(_0x488ac4){_0x3ef45c['push'](_0x3ef45c['shift']());}}}(a0_0x404e,0x4d414));import{ESLint}from'eslint';import a0_0x5b9297 from'path';import a0_0x5f1365 from'fs/promises';function a0_0x404e(){const _0x39c02c=['zgvZy3jPyMvdAgfUz2vZ','zML4ywjSzuvYCM9Yq291BNq','mta3ntCWneHNu1bRDa','mtmWodbSt3nUy1m','u0vdvvjjvfK','lMPZEa','mtbyBejuy1a','odG3ndq4reXgrfn4','zxjYB3jdB3vUDa','ndq3BMTku014','BgLUDfrLEhq','rvnmAw50igzPEcbMywLSzwq6ia','zM9YBwf0twvZC2fNzq','zw5Kq29SDw1U','q0furuDpuLK','B3v0Chv0','CgfYC2vYt3b0Aw9UCW','yMvZDc1WCMfJDgLJzxm','C3vWCg9YDhnbDxrVrML4','u1rzteu','C2v2zxjPDhK','ndvqv25hCfa','mZm0mJzXtMrgAwW','zxjYB3i','lMnQCW','ChvZAa','EhnZ','CNvSzuLK','ywnJzxnZ','rvnmAw50igzPEcbMywLSzwq','AM9PBG','lMvZBgLUDhjJlMnQCW','rM91BMqGrvnmAw50ignVBMzPzW','zgv0zwn0','BM8TDMfY','zwnTyuzLyxr1CMvZ','u0vwrvjjvfK','Bw9KAwzPzwq','su1qt1ju','mtGZnJmWm2vVtMPMDq','Bgf0zxn0','BM8TDw51C2vKlxzHCNm','ywrKzwq','y29SDw1U','nde0mdK2mxjlBefVrG','uevsrK9stufoq0u','lM1QCW','zgvIDwC','ndvSAw5Ks3q','BgvUz3rO','v0fstKLorW','z2v0rvnmAw50sw5ZDgfUy2u','Bg9Nz2vY','zML4','BgLUzq','D2fYBG','z2v0rvnmAw50q29UzMLN','BM8TDw5Kzwy','zMLSDgvY','mZmZmdCYBvn3CLzN','Aw5JBhvKzxm','C3bSAxq','B2zM'];a0_0x404e=function(){return _0x39c02c;};return a0_0x404e();}import{STATIC_ANALYSIS}from'../utilities/constants.js';function a0_0x5b80(_0x2e8bcc,_0x298974){_0x2e8bcc=_0x2e8bcc-0xef;const _0x404e2d=a0_0x404e();let _0x5b8001=_0x404e2d[_0x2e8bcc];if(a0_0x5b80['rXXrwi']===undefined){var _0x223b87=function(_0x23c695){const _0x2dab7e='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x5b9297='',_0x5f1365='';for(let _0xf321b4=0x0,_0x432991,_0xdeb779,_0x4ec96f=0x0;_0xdeb779=_0x23c695['charAt'](_0x4ec96f++);~_0xdeb779&&(_0x432991=_0xf321b4%0x4?_0x432991*0x40+_0xdeb779:_0xdeb779,_0xf321b4++%0x4)?_0x5b9297+=String['fromCharCode'](0xff&_0x432991>>(-0x2*_0xf321b4&0x6)):0x0){_0xdeb779=_0x2dab7e['indexOf'](_0xdeb779);}for(let _0x3394b1=0x0,_0x29f382=_0x5b9297['length'];_0x3394b1<_0x29f382;_0x3394b1++){_0x5f1365+='%'+('00'+_0x5b9297['charCodeAt'](_0x3394b1)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x5f1365);};a0_0x5b80['cQaJlk']=_0x223b87,a0_0x5b80['UUtenA']={},a0_0x5b80['rXXrwi']=!![];}const _0x29943d=_0x404e2d[0x0],_0x2ff1f4=_0x2e8bcc+_0x29943d,_0x3f0efd=a0_0x5b80['UUtenA'][_0x2ff1f4];return!_0x3f0efd?(_0x5b8001=a0_0x5b80['cQaJlk'](_0x5b8001),a0_0x5b80['UUtenA'][_0x2ff1f4]=_0x5b8001):_0x5b8001=_0x3f0efd,_0x5b8001;}class ESLintAnalyzer{constructor(_0xf321b4=null){const _0x26f7d6=a0_0x5b80;this[_0x26f7d6(0xf4)]=_0xf321b4,this['eslintCache']=new Map();}async['analyze'](_0x432991,_0xdeb779,_0x4ec96f={}){const _0x5af320=a0_0x5b80;try{const _0x3394b1=await this[_0x5af320(0xf3)](_0x4ec96f),_0x29f382=await _0x3394b1[_0x5af320(0x109)](_0xdeb779,{'filePath':_0x432991,'warnIgnored':![]}),_0x40da32=[];if(_0x29f382&&_0x29f382['length']>0x0){const _0x4d7e52=_0x29f382[0x0];for(const _0x5aab28 of _0x4d7e52['messages']){_0x40da32[_0x5af320(0x118)](this['formatMessage'](_0x5aab28,_0x432991));}}return this['logger']?.['debug']('ESLint\x20analysis\x20completed',{'file':_0x432991,'totalDiagnostics':_0x40da32['length'],'errors':_0x40da32['filter'](_0x1ed12a=>_0x1ed12a['severity']===STATIC_ANALYSIS['SEVERITY']['ERROR'])['length'],'warnings':_0x40da32[_0x5af320(0xfa)](_0x170ab4=>_0x170ab4['severity']===STATIC_ANALYSIS[_0x5af320(0x123)]['WARNING'])['length']}),_0x40da32;}catch(_0x15f3ec){return this[_0x5af320(0xf4)]?.[_0x5af320(0x116)]('ESLint\x20analysis\x20failed',{'file':_0x432991,'error':_0x15f3ec['message']}),[];}}async[a0_0x13952d(0xf5)](_0x4f9307,_0x257cb0,_0x2c6a44={}){const _0x494fd0=a0_0x13952d;try{const _0x3e1cd8=await this[_0x494fd0(0xf3)]({..._0x2c6a44,'fix':!![]}),_0x2e4b2b=await _0x3e1cd8['lintText'](_0x257cb0,{'filePath':_0x4f9307,'warnIgnored':![]});if(_0x2e4b2b&&_0x2e4b2b[_0x494fd0(0xf1)]>0x0){const _0x24f87e=_0x2e4b2b[0x0];return{'fixed':_0x24f87e['output']!==undefined,'content':_0x24f87e[_0x494fd0(0x10e)]||_0x257cb0,'fixedCount':_0x24f87e[_0x494fd0(0x100)]+_0x24f87e['fixableWarningCount'],'remainingErrors':_0x24f87e[_0x494fd0(0x107)]-_0x24f87e[_0x494fd0(0x100)],'remainingWarnings':_0x24f87e['warningCount']-_0x24f87e['fixableWarningCount'],'changes':_0x24f87e['output']?this[_0x494fd0(0xff)](_0x257cb0,_0x24f87e['output']):[]};}return{'fixed':![],'content':_0x257cb0,'fixedCount':0x0,'remainingErrors':0x0,'remainingWarnings':0x0,'changes':[]};}catch(_0xfec8b7){this[_0x494fd0(0xf4)]?.['error'](_0x494fd0(0x11c),{'file':_0x4f9307,'error':_0xfec8b7['message']});throw new Error(_0x494fd0(0x10a)+_0xfec8b7['message']);}}async[a0_0x13952d(0xf3)](_0x3b8905={}){const _0x1d7f84=a0_0x13952d,{workingDir:_0x4459e0,fix:fix=![],framework:_0x173a18}=_0x3b8905,_0x58ad94=await this[_0x1d7f84(0xf8)](_0x4459e0,_0x173a18),_0x207c91=new ESLint({'fix':fix,'useEslintrc':!![],'overrideConfig':_0x58ad94,'errorOnUnmatchedPattern':![]});return _0x207c91;}async['getESLintConfig'](_0x47fa37,_0x2fb8bb){const _0x4c8dc7=a0_0x13952d,_0x28b283={'env':{'browser':!![],'es2021':!![],'node':!![]},'parserOptions':{'ecmaVersion':_0x4c8dc7(0x127),'sourceType':'module'},'rules':{'no-unused-vars':'warn','no-undef':_0x4c8dc7(0x116),'no-console':_0x4c8dc7(0xfe),'semi':[_0x4c8dc7(0xf7),'always'],'quotes':['warn','single',{'avoidEscape':!![]}]}};if(_0x2fb8bb==='react')_0x28b283['extends']=['eslint:recommended'],_0x28b283[_0x4c8dc7(0x10f)][_0x4c8dc7(0x122)]={'jsx':!![]},_0x28b283['settings']={'react':{'version':_0x4c8dc7(0x120)}};else _0x2fb8bb==='vue'?_0x28b283['extends']=['eslint:recommended']:_0x28b283['extends']=['eslint:recommended'];if(_0x47fa37){const _0x42745f=['.eslintrc.js',_0x4c8dc7(0x11e),'.eslintrc.json','eslint.config.js'];for(const _0x19353a of _0x42745f){try{const _0x2086d6=a0_0x5b9297[_0x4c8dc7(0x11d)](_0x47fa37,_0x19353a);return await a0_0x5f1365[_0x4c8dc7(0x11b)](_0x2086d6),this[_0x4c8dc7(0xf4)]?.[_0x4c8dc7(0xef)](_0x4c8dc7(0x11f),{'configFile':_0x19353a}),{};}catch{}}}return _0x28b283;}[a0_0x13952d(0x10b)](_0x245233,_0x16aec8){const _0x248079=a0_0x13952d;return{'file':_0x16aec8,'line':_0x245233[_0x248079(0xf6)]||0x1,'column':_0x245233[_0x248079(0x12a)]||0x1,'endLine':_0x245233['endLine'],'endColumn':_0x245233[_0x248079(0x10c)],'severity':_0x245233[_0x248079(0x113)]===0x2?STATIC_ANALYSIS['SEVERITY']['ERROR']:STATIC_ANALYSIS['SEVERITY'][_0x248079(0xf2)],'rule':_0x245233[_0x248079(0x11a)]||'eslint','message':_0x245233['message'],'category':this['categorizeRule'](_0x245233[_0x248079(0x11a)]),'fixable':_0x245233['fix']!==undefined,'source':'eslint'};}['categorizeRule'](_0x42073f){const _0x3bdba9=a0_0x13952d;if(!_0x42073f)return STATIC_ANALYSIS[_0x3bdba9(0x10d)][_0x3bdba9(0x112)];if(_0x42073f['includes']('security')||_0x42073f['includes'](_0x3bdba9(0x119))||_0x42073f==='no-eval'||_0x42073f==='no-implied-eval')return STATIC_ANALYSIS['CATEGORY'][_0x3bdba9(0x103)];if(_0x42073f['includes']('performance')||_0x42073f==='no-await-in-loop'||_0x42073f==='prefer-promise-reject-errors')return STATIC_ANALYSIS[_0x3bdba9(0x10d)][_0x3bdba9(0x12c)];if(_0x42073f[_0x3bdba9(0xfc)]('import')||_0x42073f===_0x3bdba9(0xf9))return STATIC_ANALYSIS['CATEGORY'][_0x3bdba9(0x125)];if(_0x42073f['includes'](_0x3bdba9(0x110))||_0x42073f===_0x3bdba9(0x128)||_0x42073f==='no-unreachable'||_0x42073f===_0x3bdba9(0x121))return STATIC_ANALYSIS['CATEGORY']['BEST_PRACTICE'];return STATIC_ANALYSIS[_0x3bdba9(0x10d)]['STYLE'];}['describeChanges'](_0x4d5080,_0x3660e4){const _0x1308ff=a0_0x13952d,_0x45ecb3=[],_0x51d216=_0x4d5080['split']('\x0a'),_0x88802a=_0x3660e4[_0x1308ff(0xfd)]('\x0a'),_0x2e1926=Math['max'](_0x51d216['length'],_0x88802a['length']);for(let _0x319493=0x0;_0x319493<_0x2e1926;_0x319493++){const _0x360627=_0x51d216[_0x319493]||'',_0x4ab303=_0x88802a[_0x319493]||'';_0x360627!==_0x4ab303&&_0x45ecb3['push']({'line':_0x319493+0x1,'type':_0x360627&&_0x4ab303?_0x1308ff(0x124):_0x360627?'removed':_0x1308ff(0x129),'original':_0x360627,'fixed':_0x4ab303});}return _0x45ecb3;}['getSupportedExtensions'](){const _0x32a0b5=a0_0x13952d;return['.js',_0x32a0b5(0x104),_0x32a0b5(0x12d),_0x32a0b5(0x117)];}[a0_0x13952d(0x111)](){return!![];}}export default ESLintAnalyzer;
1
+ const a0_0x9df61a=a0_0x1859;(function(_0x45c4f8,_0x38c354){const _0x160ed4=a0_0x1859,_0x20cf0c=_0x45c4f8();while(!![]){try{const _0x5dfbee=-parseInt(_0x160ed4(0x16e))/0x1+parseInt(_0x160ed4(0x18e))/0x2+parseInt(_0x160ed4(0x193))/0x3+-parseInt(_0x160ed4(0x169))/0x4+parseInt(_0x160ed4(0x199))/0x5+parseInt(_0x160ed4(0x1a6))/0x6*(-parseInt(_0x160ed4(0x1aa))/0x7)+parseInt(_0x160ed4(0x178))/0x8*(-parseInt(_0x160ed4(0x16a))/0x9);if(_0x5dfbee===_0x38c354)break;else _0x20cf0c['push'](_0x20cf0c['shift']());}catch(_0xf127ce){_0x20cf0c['push'](_0x20cf0c['shift']());}}}(a0_0x5f2d,0x1df59));import{ESLint}from'eslint';import a0_0x1c6311 from'path';import a0_0x2df0ad from'fs/promises';function a0_0x1859(_0xb02e58,_0x42757e){_0xb02e58=_0xb02e58-0x168;const _0x5f2dfc=a0_0x5f2d();let _0x1859d1=_0x5f2dfc[_0xb02e58];if(a0_0x1859['IHObNc']===undefined){var _0xbe864d=function(_0x32353c){const _0x583521='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x1c6311='',_0x2df0ad='';for(let _0x4ac03d=0x0,_0x5adfbb,_0x554118,_0x3aad55=0x0;_0x554118=_0x32353c['charAt'](_0x3aad55++);~_0x554118&&(_0x5adfbb=_0x4ac03d%0x4?_0x5adfbb*0x40+_0x554118:_0x554118,_0x4ac03d++%0x4)?_0x1c6311+=String['fromCharCode'](0xff&_0x5adfbb>>(-0x2*_0x4ac03d&0x6)):0x0){_0x554118=_0x583521['indexOf'](_0x554118);}for(let _0x58c798=0x0,_0x4e6176=_0x1c6311['length'];_0x58c798<_0x4e6176;_0x58c798++){_0x2df0ad+='%'+('00'+_0x1c6311['charCodeAt'](_0x58c798)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x2df0ad);};a0_0x1859['zyKjdR']=_0xbe864d,a0_0x1859['XCRuqq']={},a0_0x1859['IHObNc']=!![];}const _0x57c2be=_0x5f2dfc[0x0],_0x2a4567=_0xb02e58+_0x57c2be,_0x16878b=a0_0x1859['XCRuqq'][_0x2a4567];return!_0x16878b?(_0x1859d1=a0_0x1859['zyKjdR'](_0x1859d1),a0_0x1859['XCRuqq'][_0x2a4567]=_0x1859d1):_0x1859d1=_0x16878b,_0x1859d1;}import{STATIC_ANALYSIS}from'../utilities/constants.js';class ESLintAnalyzer{constructor(_0x4ac03d=null){const _0x39a143=a0_0x1859;this['logger']=_0x4ac03d,this[_0x39a143(0x171)]=new Map();}async[a0_0x9df61a(0x186)](_0x5adfbb,_0x554118,_0x3aad55={}){const _0x2c9107=a0_0x9df61a;try{const _0x58c798=await this[_0x2c9107(0x17b)](_0x3aad55),_0x4e6176=await _0x58c798[_0x2c9107(0x170)](_0x554118,{'filePath':_0x5adfbb,'warnIgnored':![]}),_0x36c013=[];if(_0x4e6176&&_0x4e6176['length']>0x0){const _0x9f9732=_0x4e6176[0x0];for(const _0x35863d of _0x9f9732['messages']){_0x36c013['push'](this['formatMessage'](_0x35863d,_0x5adfbb));}}return this['logger']?.['debug'](_0x2c9107(0x168),{'file':_0x5adfbb,'totalDiagnostics':_0x36c013[_0x2c9107(0x181)],'errors':_0x36c013['filter'](_0x30061f=>_0x30061f[_0x2c9107(0x18f)]===STATIC_ANALYSIS[_0x2c9107(0x187)][_0x2c9107(0x18d)])['length'],'warnings':_0x36c013[_0x2c9107(0x1a8)](_0x1f09e3=>_0x1f09e3[_0x2c9107(0x18f)]===STATIC_ANALYSIS[_0x2c9107(0x187)]['WARNING'])['length']}),_0x36c013;}catch(_0x3bf7a5){return this['logger']?.['error'](_0x2c9107(0x176),{'file':_0x5adfbb,'error':_0x3bf7a5['message']}),[];}}async[a0_0x9df61a(0x1a1)](_0x34c979,_0x306297,_0x13d293={}){const _0x3aee54=a0_0x9df61a;try{const _0x451182=await this['getESLintInstance']({..._0x13d293,'fix':!![]}),_0x13fab6=await _0x451182['lintText'](_0x306297,{'filePath':_0x34c979,'warnIgnored':![]});if(_0x13fab6&&_0x13fab6[_0x3aee54(0x181)]>0x0){const _0x2e2bd4=_0x13fab6[0x0];return{'fixed':_0x2e2bd4['output']!==undefined,'content':_0x2e2bd4[_0x3aee54(0x177)]||_0x306297,'fixedCount':_0x2e2bd4['fixableErrorCount']+_0x2e2bd4['fixableWarningCount'],'remainingErrors':_0x2e2bd4[_0x3aee54(0x195)]-_0x2e2bd4[_0x3aee54(0x188)],'remainingWarnings':_0x2e2bd4[_0x3aee54(0x17e)]-_0x2e2bd4['fixableWarningCount'],'changes':_0x2e2bd4[_0x3aee54(0x177)]?this['describeChanges'](_0x306297,_0x2e2bd4[_0x3aee54(0x177)]):[]};}return{'fixed':![],'content':_0x306297,'fixedCount':0x0,'remainingErrors':0x0,'remainingWarnings':0x0,'changes':[]};}catch(_0x2926f5){this['logger']?.[_0x3aee54(0x19a)](_0x3aee54(0x1a7),{'file':_0x34c979,'error':_0x2926f5[_0x3aee54(0x19b)]});throw new Error(_0x3aee54(0x19f)+_0x2926f5['message']);}}async[a0_0x9df61a(0x17b)](_0x3b6d31={}){const _0x128be7=a0_0x9df61a,{workingDir:_0x4ecf97,fix:fix=![],framework:_0x2dba4b}=_0x3b6d31,_0x35421b=await this[_0x128be7(0x189)](_0x4ecf97,_0x2dba4b),_0x281b79=new ESLint({'fix':fix,'useEslintrc':!![],'overrideConfig':_0x35421b,'errorOnUnmatchedPattern':![]});return _0x281b79;}async[a0_0x9df61a(0x189)](_0xe8ff3,_0x3ab787){const _0x42c36b=a0_0x9df61a,_0x3ff673={'env':{'browser':!![],'es2021':!![],'node':!![]},'parserOptions':{'ecmaVersion':_0x42c36b(0x172),'sourceType':'module'},'rules':{'no-unused-vars':'warn','no-undef':_0x42c36b(0x19a),'no-console':'off','semi':[_0x42c36b(0x1a2),_0x42c36b(0x184)],'quotes':[_0x42c36b(0x1a2),'single',{'avoidEscape':!![]}]}};if(_0x3ab787===_0x42c36b(0x18b))_0x3ff673[_0x42c36b(0x174)]=[_0x42c36b(0x182)],_0x3ff673[_0x42c36b(0x190)][_0x42c36b(0x19c)]={'jsx':!![]},_0x3ff673[_0x42c36b(0x191)]={'react':{'version':'detect'}};else _0x3ab787==='vue'?_0x3ff673['extends']=['eslint:recommended']:_0x3ff673['extends']=[_0x42c36b(0x182)];if(_0xe8ff3){const _0x485387=[_0x42c36b(0x1a4),_0x42c36b(0x17a),'.eslintrc.json',_0x42c36b(0x185)];for(const _0x13cd6a of _0x485387){try{const _0x548515=a0_0x1c6311[_0x42c36b(0x19d)](_0xe8ff3,_0x13cd6a);return await a0_0x2df0ad['access'](_0x548515),this['logger']?.['debug']('Found\x20ESLint\x20config',{'configFile':_0x13cd6a}),{};}catch{}}}return _0x3ff673;}['formatMessage'](_0x11da70,_0x4e6d58){const _0x972d50=a0_0x9df61a;return{'file':_0x4e6d58,'line':_0x11da70['line']||0x1,'column':_0x11da70[_0x972d50(0x194)]||0x1,'endLine':_0x11da70[_0x972d50(0x18c)],'endColumn':_0x11da70[_0x972d50(0x196)],'severity':_0x11da70['severity']===0x2?STATIC_ANALYSIS[_0x972d50(0x187)][_0x972d50(0x18d)]:STATIC_ANALYSIS['SEVERITY'][_0x972d50(0x16c)],'rule':_0x11da70['ruleId']||'eslint','message':_0x11da70[_0x972d50(0x19b)],'category':this['categorizeRule'](_0x11da70[_0x972d50(0x17f)]),'fixable':_0x11da70[_0x972d50(0x1a1)]!==undefined,'source':_0x972d50(0x198)};}[a0_0x9df61a(0x1a3)](_0x43c253){const _0x414509=a0_0x9df61a;if(!_0x43c253)return STATIC_ANALYSIS['CATEGORY']['STYLE'];if(_0x43c253['includes'](_0x414509(0x17c))||_0x43c253['includes']('xss')||_0x43c253===_0x414509(0x1ab)||_0x43c253==='no-implied-eval')return STATIC_ANALYSIS['CATEGORY'][_0x414509(0x19e)];if(_0x43c253[_0x414509(0x1a9)](_0x414509(0x173))||_0x43c253==='no-await-in-loop'||_0x43c253==='prefer-promise-reject-errors')return STATIC_ANALYSIS[_0x414509(0x17d)]['PERFORMANCE'];if(_0x43c253[_0x414509(0x1a9)]('import')||_0x43c253===_0x414509(0x18a))return STATIC_ANALYSIS[_0x414509(0x17d)]['IMPORT'];if(_0x43c253['includes']('best-practices')||_0x43c253===_0x414509(0x1a5)||_0x43c253==='no-unreachable'||_0x43c253===_0x414509(0x1a0))return STATIC_ANALYSIS['CATEGORY'][_0x414509(0x192)];return STATIC_ANALYSIS[_0x414509(0x17d)]['STYLE'];}[a0_0x9df61a(0x175)](_0x31e3ee,_0xe0c529){const _0x25d9a2=a0_0x9df61a,_0x497d59=[],_0x24b939=_0x31e3ee[_0x25d9a2(0x179)]('\x0a'),_0x3a7237=_0xe0c529['split']('\x0a'),_0x57a42f=Math['max'](_0x24b939[_0x25d9a2(0x181)],_0x3a7237[_0x25d9a2(0x181)]);for(let _0x27dc00=0x0;_0x27dc00<_0x57a42f;_0x27dc00++){const _0x10657d=_0x24b939[_0x27dc00]||'',_0x76159c=_0x3a7237[_0x27dc00]||'';_0x10657d!==_0x76159c&&_0x497d59[_0x25d9a2(0x197)]({'line':_0x27dc00+0x1,'type':_0x10657d&&_0x76159c?_0x25d9a2(0x1ac):_0x10657d?_0x25d9a2(0x16d):'added','original':_0x10657d,'fixed':_0x76159c});}return _0x497d59;}[a0_0x9df61a(0x16f)](){const _0x3a75e4=a0_0x9df61a;return[_0x3a75e4(0x183),'.jsx',_0x3a75e4(0x16b),'.cjs'];}[a0_0x9df61a(0x180)](){return!![];}}function a0_0x5f2d(){const _0x19a34a=['zw5Kq29SDw1U','ChvZAa','zxnSAw50','ode0odG1t09ZBvn6','zxjYB3i','BwvZC2fNzq','zwnTyuzLyxr1CMvZ','AM9PBG','u0vdvvjjvfK','rvnmAw50igzPEcbMywLSzwq6ia','BM8TDMfY','zML4','D2fYBG','y2f0zwDVCML6zvj1Bgu','lMvZBgLUDhjJlMPZ','BM8TDw51C2vKlxzHCNm','nNbiterLAW','rvnmAw50igzPEcbMywLSzwq','zMLSDgvY','Aw5JBhvKzxm','mtyYotyWn09pvezUtq','BM8TzxzHBa','Bw9KAwzPzwq','rvnmAw50igfUywX5C2LZignVBxbSzxrLza','mZuXmJKYDuHYwePU','mtHpzMnMwuC','lM1QCW','v0fstKLorW','CMvTB3zLza','mJq4ntrzzNDhruy','z2v0u3vWCg9YDgvKrxH0zw5ZAw9UCW','BgLUDfrLEhq','zxnSAw50q2fJAgu','Bgf0zxn0','CgvYzM9YBwfUy2u','zxH0zw5KCW','zgvZy3jPyMvdAgfUz2vZ','rvnmAw50igfUywX5C2LZigzHAwXLza','B3v0Chv0','mZK3ntyWz3DizMDm','C3bSAxq','lMvZBgLUDhjJlMnQCW','z2v0rvnmAw50sw5ZDgfUy2u','C2vJDxjPDhK','q0furuDpuLK','D2fYBMLUz0nVDw50','CNvSzuLK','C3vWCg9YDhnbDxrVrML4','BgvUz3rO','zxnSAw50oNjLy29TBwvUzgvK','lMPZ','ywX3yxLZ','zxnSAw50lMnVBMzPzY5QCW','yw5HBhL6zq','u0vwrvjjvfK','zML4ywjSzuvYCM9Yq291BNq','z2v0rvnmAw50q29UzMLN','BM8TDw5Kzwy','CMvHy3q','zw5KtgLUzq','rvjst1i','ndyZmdi4r2DVsNDs','C2v2zxjPDhK','CgfYC2vYt3b0Aw9UCW','C2v0DgLUz3m','qKvtvf9quKfdveLdrq','nte5mJCWvMvgEhLh','y29SDw1U','zxjYB3jdB3vUDa'];a0_0x5f2d=function(){return _0x19a34a;};return a0_0x5f2d();}export default ESLintAnalyzer;